@grackle-ai/web 0.28.0 → 0.29.1
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.
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import{r as o1,a as S,j as h,v as r1,b as c1,t as Er,i as u1,f as d1,M as uf,c as df}from"./markdown-gcy1Jmzi.js";import{r as f1,d as Pg,H as qg,P as Yg,i as h1,B as m1,a as p1,C as g1,M as v1}from"./dagview-EHk2VaeR.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(c){if(c.ep)return;c.ep=!0;const d=l(c);fetch(c.href,d)}})();var md={exports:{}},Ml={},pd={exports:{}},gd={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* scheduler.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 Kg;function y1(){return Kg||(Kg=1,(function(n){function s(U,X){var ee=U.length;U.push(X);e:for(;0<ee;){var Ae=ee-1>>>1,Ee=U[Ae];if(0<c(Ee,X))U[Ae]=X,U[ee]=Ee,ee=Ae;else break e}}function l(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var X=U[0],ee=U.pop();if(ee!==X){U[0]=ee;e:for(var Ae=0,Ee=U.length,Ge=Ee>>>1;Ae<Ge;){var we=2*(Ae+1)-1,_e=U[we],Ce=we+1,Q=U[Ce];if(0>c(_e,ee))Ce<Ee&&0>c(Q,_e)?(U[Ae]=Q,U[Ce]=ee,Ae=Ce):(U[Ae]=_e,U[we]=ee,Ae=we);else if(Ce<Ee&&0>c(Q,ee))U[Ae]=Q,U[Ce]=ee,Ae=Ce;else break e}}return X}function c(U,X){var ee=U.sortIndex-X.sortIndex;return ee!==0?ee:U.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var f=Date,m=f.now();n.unstable_now=function(){return f.now()-m}}var p=[],v=[],y=1,b=null,_=3,T=!1,N=!1,D=!1,w=!1,j=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function $(U){for(var X=l(v);X!==null;){if(X.callback===null)o(v);else if(X.startTime<=U)o(v),X.sortIndex=X.expirationTime,s(p,X);else break;X=l(v)}}function H(U){if(D=!1,$(U),!N)if(l(p)!==null)N=!0,J||(J=!0,ge());else{var X=l(v);X!==null&&G(H,X.startTime-U)}}var J=!1,te=-1,K=5,W=-1;function he(){return w?!0:!(n.unstable_now()-W<K)}function R(){if(w=!1,J){var U=n.unstable_now();W=U;var X=!0;try{e:{N=!1,D&&(D=!1,V(te),te=-1),T=!0;var ee=_;try{t:{for($(U),b=l(p);b!==null&&!(b.expirationTime>U&&he());){var Ae=b.callback;if(typeof Ae=="function"){b.callback=null,_=b.priorityLevel;var Ee=Ae(b.expirationTime<=U);if(U=n.unstable_now(),typeof Ee=="function"){b.callback=Ee,$(U),X=!0;break t}b===l(p)&&o(p),$(U)}else o(p);b=l(p)}if(b!==null)X=!0;else{var Ge=l(v);Ge!==null&&G(H,Ge.startTime-U),X=!1}}break e}finally{b=null,_=ee,T=!1}X=void 0}}finally{X?ge():J=!1}}}var ge;if(typeof M=="function")ge=function(){M(R)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,je=ne.port2;ne.port1.onmessage=R,ge=function(){je.postMessage(null)}}else ge=function(){j(R,0)};function G(U,X){te=j(function(){U(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(U){switch(_){case 1:case 2:case 3:var X=3;break;default:X=_}var ee=_;_=X;try{return U()}finally{_=ee}},n.unstable_requestPaint=function(){w=!0},n.unstable_runWithPriority=function(U,X){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ee=_;_=U;try{return X()}finally{_=ee}},n.unstable_scheduleCallback=function(U,X,ee){var Ae=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?Ae+ee:Ae):ee=Ae,U){case 1:var Ee=-1;break;case 2:Ee=250;break;case 5:Ee=1073741823;break;case 4:Ee=1e4;break;default:Ee=5e3}return Ee=ee+Ee,U={id:y++,callback:X,priorityLevel:U,startTime:ee,expirationTime:Ee,sortIndex:-1},ee>Ae?(U.sortIndex=ee,s(v,U),l(p)===null&&U===l(v)&&(D?(V(te),te=-1):D=!0,G(H,ee-Ae))):(U.sortIndex=Ee,s(p,U),N||T||(N=!0,J||(J=!0,ge()))),U},n.unstable_shouldYield=he,n.unstable_wrapCallback=function(U){var X=_;return function(){var ee=_;_=X;try{return U.apply(this,arguments)}finally{_=ee}}}})(gd)),gd}var Zg;function b1(){return Zg||(Zg=1,pd.exports=y1()),pd.exports}/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-dom-client.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 Xg;function S1(){if(Xg)return Ml;Xg=1;var n=b1(),s=o1(),l=f1();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(o(188))}function v(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,i=t;;){var r=a.return;if(r===null)break;var u=r.alternate;if(u===null){if(i=r.return,i!==null){a=i;continue}break}if(r.child===u.child){for(u=r.child;u;){if(u===a)return p(r),e;if(u===i)return p(r),t;u=u.sibling}throw Error(o(188))}if(a.return!==i.return)a=r,i=u;else{for(var g=!1,x=r.child;x;){if(x===a){g=!0,a=r,i=u;break}if(x===i){g=!0,i=r,a=u;break}x=x.sibling}if(!g){for(x=u.child;x;){if(x===a){g=!0,a=u,i=r;break}if(x===i){g=!0,i=u,a=r;break}x=x.sibling}if(!g)throw Error(o(189))}}if(a.alternate!==i)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,_=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),M=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),he=Symbol.for("react.memo_cache_sentinel"),R=Symbol.iterator;function ge(e){return e===null||typeof e!="object"?null:(e=R&&e[R]||e["@@iterator"],typeof e=="function"?e:null)}var ne=Symbol.for("react.client.reference");function je(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case j:return"Profiler";case w:return"StrictMode";case H:return"Suspense";case J:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case M:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:je(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return je(e(t))}catch{}}return null}var G=Array.isArray,U=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},Ae=[],Ee=-1;function Ge(e){return{current:e}}function we(e){0>Ee||(e.current=Ae[Ee],Ae[Ee]=null,Ee--)}function _e(e,t){Ee++,Ae[Ee]=e.current,e.current=t}var Ce=Ge(null),Q=Ge(null),ce=Ge(null),Ie=Ge(null);function F(e,t){switch(_e(ce,t),_e(Q,e),_e(Ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fg(t),e=hg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}we(Ce),_e(Ce,e)}function sn(){we(Ce),we(Q),we(ce)}function Qn(e){e.memoizedState!==null&&_e(Ie,e);var t=Ce.current,a=hg(t,e.type);t!==a&&(_e(Q,e),_e(Ce,a))}function ln(e){Q.current===e&&(we(Ce),we(Q)),Ie.current===e&&(we(Ie),wl._currentValue=ee)}var jn,dt;function Jt(e){if(jn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);jn=t&&t[1]||"",dt=-1<a.stack.indexOf(`
|
|
18
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+jn+e+dt}var Hn=!1;function In(e,t){if(!e||Hn)return"";Hn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(z){var L=z}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(z){L=z}e.call(Y.prototype)}}else{try{throw Error()}catch(z){L=z}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(z){if(z&&L&&typeof z.stack=="string")return[z.stack,L.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=i.DetermineComponentFrameRoot(),g=u[0],x=u[1];if(g&&x){var E=g.split(`
|
|
20
|
-
`),B=x.split(`
|
|
21
|
-
`);for(r=i=0;i<E.length&&!E[i].includes("DetermineComponentFrameRoot");)i++;for(;r<B.length&&!B[r].includes("DetermineComponentFrameRoot");)r++;if(i===E.length||r===B.length)for(i=E.length-1,r=B.length-1;1<=i&&0<=r&&E[i]!==B[r];)r--;for(;1<=i&&0<=r;i--,r--)if(E[i]!==B[r]){if(i!==1||r!==1)do if(i--,r--,0>r||E[i]!==B[r]){var I=`
|
|
22
|
-
`+E[i].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),I}while(1<=i&&0<=r);break}}}finally{Hn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Jt(a):""}function mn(e,t){switch(e.tag){case 26:case 27:case 5:return Jt(e.type);case 16:return Jt("Lazy");case 13:return e.child!==t&&t!==null?Jt("Suspense Fallback"):Jt("Suspense");case 19:return Jt("SuspenseList");case 0:case 15:return In(e.type,!1);case 11:return In(e.type.render,!1);case 1:return In(e.type,!0);case 31:return Jt("Activity");default:return""}}function Gn(e){try{var t="",a=null;do t+=mn(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
|
|
23
|
-
Error generating stack: `+i.message+`
|
|
24
|
-
`+i.stack}}var Yt=Object.prototype.hasOwnProperty,Pn=n.unstable_scheduleCallback,Z=n.unstable_cancelCallback,se=n.unstable_shouldYield,oe=n.unstable_requestPaint,ue=n.unstable_now,Se=n.unstable_getCurrentPriorityLevel,xe=n.unstable_ImmediatePriority,Xe=n.unstable_UserBlockingPriority,Re=n.unstable_NormalPriority,nt=n.unstable_LowPriority,xt=n.unstable_IdlePriority,pt=n.log,At=n.unstable_setDisableYieldValue,at=null,gt=null;function Wt(e){if(typeof pt=="function"&&At(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(at,e)}catch{}}var ft=Math.clz32?Math.clz32:cs,Lt=Math.log,Ut=Math.LN2;function cs(e){return e>>>=0,e===0?32:31-(Lt(e)/Ut|0)|0}var qn=256,ae=262144,pe=4194304;function le(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Te(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var r=0,u=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var x=i&134217727;return x!==0?(i=x&~u,i!==0?r=le(i):(g&=x,g!==0?r=le(g):a||(a=x&~e,a!==0&&(r=le(a))))):(x=i&~u,x!==0?r=le(x):g!==0?r=le(g):a||(a=i&~e,a!==0&&(r=le(a)))),r===0?0:t!==0&&t!==r&&(t&u)===0&&(u=r&-r,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:r}function P(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function on(){var e=pe;return pe<<=1,(pe&62914560)===0&&(pe=4194304),e}function Us(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ra(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ro(e,t,a,i,r,u){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var x=e.entanglements,E=e.expirationTimes,B=e.hiddenUpdates;for(a=g&~a;0<a;){var I=31-ft(a),Y=1<<I;x[I]=0,E[I]=-1;var L=B[I];if(L!==null)for(B[I]=null,I=0;I<L.length;I++){var z=L[I];z!==null&&(z.lane&=-536870913)}a&=~Y}i!==0&&Ii(e,i,0),u!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=u&~(g&~t))}function Ii(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-ft(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function Gi(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-ft(a),r=1<<i;r&t|e[i]&t&&(e[i]|=t),a&=~r}}function Pi(e,t){var a=t&-t;return a=(a&42)!==0?1:zs(a),(a&(e.suspendedLanes|t))!==0?0:a}function zs(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 Vs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function qi(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:Lg(e.type))}function Yi(e,t){var a=X.p;try{return X.p=e,t()}finally{X.p=a}}var Yn=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Yn,Vt="__reactProps$"+Yn,ra="__reactContainer$"+Yn,Hs="__reactEvents$"+Yn,co="__reactListeners$"+Yn,uo="__reactHandles$"+Yn,ie="__reactResources$"+Yn,Oe="__reactMarker$"+Yn;function Me(e){delete e[Nt],delete e[Vt],delete e[Hs],delete e[co],delete e[uo]}function ke(e){var t=e[Nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ra]||a[Nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Sg(e);e!==null;){if(a=e[Nt])return a;e=Sg(e)}return t}e=a,a=e.parentNode}return null}function Kt(e){if(e=e[Nt]||e[ra]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Zt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function rt(e){var t=e[ie];return t||(t=e[ie]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ue(e){e[Oe]=!0}var Ma=new Set,th={};function us(e,t){Is(e,t),Is(e+"Capture",t)}function Is(e,t){for(th[e]=t,e=0;e<t.length;e++)Ma.add(t[e])}var Jb=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]*$"),nh={},ah={};function Wb(e){return Yt.call(ah,e)?!0:Yt.call(nh,e)?!1:Jb.test(e)?ah[e]=!0:(nh[e]=!0,!1)}function fo(e,t,a){if(Wb(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ho(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ca(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function Cn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function eS(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var r=i.get,u=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(g){a=""+g,u.call(this,g)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function oc(e){if(!e._valueTracker){var t=sh(e)?"checked":"value";e._valueTracker=eS(e,t,""+e[t])}}function ih(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=sh(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function mo(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 tS=/[\n"\\]/g;function An(e){return e.replace(tS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function rc(e,t,a,i,r,u,g,x){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Cn(t)):e.value!==""+Cn(t)&&(e.value=""+Cn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?cc(e,g,Cn(t)):a!=null?cc(e,g,Cn(a)):i!=null&&e.removeAttribute("value"),r==null&&u!=null&&(e.defaultChecked=!!u),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Cn(x):e.removeAttribute("name")}function lh(e,t,a,i,r,u,g,x){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){oc(e);return}a=a!=null?""+Cn(a):"",t=t!=null?""+Cn(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}i=i??r,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=x?e.checked:!!i,e.defaultChecked=!!i,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),oc(e)}function cc(e,t,a){t==="number"&&mo(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Gs(e,t,a,i){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&i&&(e[a].defaultSelected=!0)}else{for(a=""+Cn(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,i&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function oh(e,t,a){if(t!=null&&(t=""+Cn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Cn(a):""}function rh(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(o(92));if(G(i)){if(1<i.length)throw Error(o(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=Cn(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),oc(e)}function Ps(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var nS=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 ch(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||nS.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function uh(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var r in t)i=t[r],t.hasOwnProperty(r)&&a[r]!==i&&ch(e,r,i)}else for(var u in t)t.hasOwnProperty(u)&&ch(e,u,t[u])}function uc(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 aS=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"]]),sS=/^[\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 po(e){return sS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ua(){}var dc=null;function fc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qs=null,Ys=null;function dh(e){var t=Kt(e);if(t&&(e=t.stateNode)){var a=e[Vt]||null;e:switch(e=t.stateNode,t.type){case"input":if(rc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+An(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var r=i[Vt]||null;if(!r)throw Error(o(90));rc(i,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&ih(i)}break e;case"textarea":oh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Gs(e,!!a.multiple,t,!1)}}}var hc=!1;function fh(e,t,a){if(hc)return e(t,a);hc=!0;try{var i=e(t);return i}finally{if(hc=!1,(qs!==null||Ys!==null)&&(nr(),qs&&(t=qs,e=Ys,Ys=qs=null,dh(t),e)))for(t=0;t<e.length;t++)dh(e[t])}}function Ki(e,t){var a=e.stateNode;if(a===null)return null;var i=a[Vt]||null;if(i===null)return null;a=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mc=!1;if(da)try{var Zi={};Object.defineProperty(Zi,"passive",{get:function(){mc=!0}}),window.addEventListener("test",Zi,Zi),window.removeEventListener("test",Zi,Zi)}catch{mc=!1}var Oa=null,pc=null,go=null;function hh(){if(go)return go;var e,t=pc,a=t.length,i,r="value"in Oa?Oa.value:Oa.textContent,u=r.length;for(e=0;e<a&&t[e]===r[e];e++);var g=a-e;for(i=1;i<=g&&t[a-i]===r[u-i];i++);return go=r.slice(e,1<i?1-i:void 0)}function vo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yo(){return!0}function mh(){return!1}function rn(e){function t(a,i,r,u,g){this._reactName=a,this._targetInst=r,this.type=i,this.nativeEvent=u,this.target=g,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(u):u[x]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?yo:mh,this.isPropagationStopped=mh,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=yo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=yo)},persist:function(){},isPersistent:yo}),t}var ds={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bo=rn(ds),Xi=b({},ds,{view:0,detail:0}),iS=rn(Xi),gc,vc,$i,So=b({},Xi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bc,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!==$i&&($i&&e.type==="mousemove"?(gc=e.screenX-$i.screenX,vc=e.screenY-$i.screenY):vc=gc=0,$i=e),gc)},movementY:function(e){return"movementY"in e?e.movementY:vc}}),ph=rn(So),lS=b({},So,{dataTransfer:0}),oS=rn(lS),rS=b({},Xi,{relatedTarget:0}),yc=rn(rS),cS=b({},ds,{animationName:0,elapsedTime:0,pseudoElement:0}),uS=rn(cS),dS=b({},ds,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fS=rn(dS),hS=b({},ds,{data:0}),gh=rn(hS),mS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pS={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"},gS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gS[e])?!!t[e]:!1}function bc(){return vS}var yS=b({},Xi,{key:function(e){if(e.key){var t=mS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bc,charCode:function(e){return e.type==="keypress"?vo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bS=rn(yS),SS=b({},So,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vh=rn(SS),xS=b({},Xi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bc}),_S=rn(xS),TS=b({},ds,{propertyName:0,elapsedTime:0,pseudoElement:0}),ES=rn(TS),jS=b({},So,{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}),CS=rn(jS),AS=b({},ds,{newState:0,oldState:0}),NS=rn(AS),wS=[9,13,27,32],Sc=da&&"CompositionEvent"in window,Qi=null;da&&"documentMode"in document&&(Qi=document.documentMode);var DS=da&&"TextEvent"in window&&!Qi,yh=da&&(!Sc||Qi&&8<Qi&&11>=Qi),bh=" ",Sh=!1;function xh(e,t){switch(e){case"keyup":return wS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _h(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ks=!1;function kS(e,t){switch(e){case"compositionend":return _h(t);case"keypress":return t.which!==32?null:(Sh=!0,bh);case"textInput":return e=t.data,e===bh&&Sh?null:e;default:return null}}function RS(e,t){if(Ks)return e==="compositionend"||!Sc&&xh(e,t)?(e=hh(),go=pc=Oa=null,Ks=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return yh&&t.locale!=="ko"?null:t.data;default:return null}}var MS={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 Th(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!MS[e.type]:t==="textarea"}function Eh(e,t,a,i){qs?Ys?Ys.push(i):Ys=[i]:qs=i,t=cr(t,"onChange"),0<t.length&&(a=new bo("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var Fi=null,Ji=null;function OS(e){lg(e,0)}function xo(e){var t=Zt(e);if(ih(t))return e}function jh(e,t){if(e==="change")return t}var Ch=!1;if(da){var xc;if(da){var _c="oninput"in document;if(!_c){var Ah=document.createElement("div");Ah.setAttribute("oninput","return;"),_c=typeof Ah.oninput=="function"}xc=_c}else xc=!1;Ch=xc&&(!document.documentMode||9<document.documentMode)}function Nh(){Fi&&(Fi.detachEvent("onpropertychange",wh),Ji=Fi=null)}function wh(e){if(e.propertyName==="value"&&xo(Ji)){var t=[];Eh(t,Ji,e,fc(e)),fh(OS,t)}}function BS(e,t,a){e==="focusin"?(Nh(),Fi=t,Ji=a,Fi.attachEvent("onpropertychange",wh)):e==="focusout"&&Nh()}function LS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xo(Ji)}function US(e,t){if(e==="click")return xo(t)}function zS(e,t){if(e==="input"||e==="change")return xo(t)}function VS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pn=typeof Object.is=="function"?Object.is:VS;function Wi(e,t){if(pn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var r=a[i];if(!Yt.call(t,r)||!pn(e[r],t[r]))return!1}return!0}function Dh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kh(e,t){var a=Dh(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Dh(a)}}function Rh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=mo(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=mo(e.document)}return t}function Tc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var HS=da&&"documentMode"in document&&11>=document.documentMode,Zs=null,Ec=null,el=null,jc=!1;function Oh(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;jc||Zs==null||Zs!==mo(i)||(i=Zs,"selectionStart"in i&&Tc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),el&&Wi(el,i)||(el=i,i=cr(Ec,"onSelect"),0<i.length&&(t=new bo("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=Zs)))}function fs(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Xs={animationend:fs("Animation","AnimationEnd"),animationiteration:fs("Animation","AnimationIteration"),animationstart:fs("Animation","AnimationStart"),transitionrun:fs("Transition","TransitionRun"),transitionstart:fs("Transition","TransitionStart"),transitioncancel:fs("Transition","TransitionCancel"),transitionend:fs("Transition","TransitionEnd")},Cc={},Bh={};da&&(Bh=document.createElement("div").style,"AnimationEvent"in window||(delete Xs.animationend.animation,delete Xs.animationiteration.animation,delete Xs.animationstart.animation),"TransitionEvent"in window||delete Xs.transitionend.transition);function hs(e){if(Cc[e])return Cc[e];if(!Xs[e])return e;var t=Xs[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Bh)return Cc[e]=t[a];return e}var Lh=hs("animationend"),Uh=hs("animationiteration"),zh=hs("animationstart"),IS=hs("transitionrun"),GS=hs("transitionstart"),PS=hs("transitioncancel"),Vh=hs("transitionend"),Hh=new Map,Ac="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(" ");Ac.push("scrollEnd");function Kn(e,t){Hh.set(e,t),us(t,[e])}var _o=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Nn=[],$s=0,Nc=0;function To(){for(var e=$s,t=Nc=$s=0;t<e;){var a=Nn[t];Nn[t++]=null;var i=Nn[t];Nn[t++]=null;var r=Nn[t];Nn[t++]=null;var u=Nn[t];if(Nn[t++]=null,i!==null&&r!==null){var g=i.pending;g===null?r.next=r:(r.next=g.next,g.next=r),i.pending=r}u!==0&&Ih(a,r,u)}}function Eo(e,t,a,i){Nn[$s++]=e,Nn[$s++]=t,Nn[$s++]=a,Nn[$s++]=i,Nc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function wc(e,t,a,i){return Eo(e,t,a,i),jo(e)}function ms(e,t){return Eo(e,null,null,t),jo(e)}function Ih(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var r=!1,u=e.return;u!==null;)u.childLanes|=a,i=u.alternate,i!==null&&(i.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(r=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,r&&t!==null&&(r=31-ft(a),e=u.hiddenUpdates,i=e[r],i===null?e[r]=[t]:i.push(t),t.lane=a|536870912),u):null}function jo(e){if(50<_l)throw _l=0,zu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qs={};function qS(e,t,a,i){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(e,t,a,i){return new qS(e,t,a,i)}function Dc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fa(e,t){var a=e.alternate;return a===null?(a=gn(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Gh(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Co(e,t,a,i,r,u){var g=0;if(i=e,typeof e=="function")Dc(e)&&(g=1);else if(typeof e=="string")g=$x(e,a,Ce.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=gn(31,a,t,r),e.elementType=W,e.lanes=u,e;case D:return ps(a.children,r,u,t);case w:g=8,r|=24;break;case j:return e=gn(12,a,t,r|2),e.elementType=j,e.lanes=u,e;case H:return e=gn(13,a,t,r),e.elementType=H,e.lanes=u,e;case J:return e=gn(19,a,t,r),e.elementType=J,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:g=10;break e;case V:g=9;break e;case $:g=11;break e;case te:g=14;break e;case K:g=16,i=null;break e}g=29,a=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=gn(g,a,t,r),t.elementType=e,t.type=i,t.lanes=u,t}function ps(e,t,a,i){return e=gn(7,e,i,t),e.lanes=a,e}function kc(e,t,a){return e=gn(6,e,null,t),e.lanes=a,e}function Ph(e){var t=gn(18,null,null,0);return t.stateNode=e,t}function Rc(e,t,a){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qh=new WeakMap;function wn(e,t){if(typeof e=="object"&&e!==null){var a=qh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Gn(t)},qh.set(e,t),t)}return{value:e,source:t,stack:Gn(t)}}var Fs=[],Js=0,Ao=null,tl=0,Dn=[],kn=0,Ba=null,Fn=1,Jn="";function ha(e,t){Fs[Js++]=tl,Fs[Js++]=Ao,Ao=e,tl=t}function Yh(e,t,a){Dn[kn++]=Fn,Dn[kn++]=Jn,Dn[kn++]=Ba,Ba=e;var i=Fn;e=Jn;var r=32-ft(i)-1;i&=~(1<<r),a+=1;var u=32-ft(t)+r;if(30<u){var g=r-r%5;u=(i&(1<<g)-1).toString(32),i>>=g,r-=g,Fn=1<<32-ft(t)+r|a<<r|i,Jn=u+e}else Fn=1<<u|a<<r|i,Jn=e}function Mc(e){e.return!==null&&(ha(e,1),Yh(e,1,0))}function Oc(e){for(;e===Ao;)Ao=Fs[--Js],Fs[Js]=null,tl=Fs[--Js],Fs[Js]=null;for(;e===Ba;)Ba=Dn[--kn],Dn[kn]=null,Jn=Dn[--kn],Dn[kn]=null,Fn=Dn[--kn],Dn[kn]=null}function Kh(e,t){Dn[kn++]=Fn,Dn[kn++]=Jn,Dn[kn++]=Ba,Fn=t.id,Jn=t.overflow,Ba=e}var Ht=null,st=null,He=!1,La=null,Rn=!1,Bc=Error(o(519));function Ua(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw nl(wn(t,e)),Bc}function Zh(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[Nt]=e,t[Vt]=i,a){case"dialog":Le("cancel",t),Le("close",t);break;case"iframe":case"object":case"embed":Le("load",t);break;case"video":case"audio":for(a=0;a<El.length;a++)Le(El[a],t);break;case"source":Le("error",t);break;case"img":case"image":case"link":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"input":Le("invalid",t),lh(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Le("invalid",t);break;case"textarea":Le("invalid",t),rh(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||ug(t.textContent,a)?(i.popover!=null&&(Le("beforetoggle",t),Le("toggle",t)),i.onScroll!=null&&Le("scroll",t),i.onScrollEnd!=null&&Le("scrollend",t),i.onClick!=null&&(t.onclick=ua),t=!0):t=!1,t||Ua(e,!0)}function Xh(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Ht=Ht.return}}function Ws(e){if(e!==Ht)return!1;if(!He)return Xh(e),He=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Wu(e.type,e.memoizedProps)),a=!a),a&&st&&Ua(e),Xh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));st=bg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));st=bg(e)}else t===27?(t=st,Fa(e.type)?(e=sd,sd=null,st=e):st=t):st=Ht?On(e.stateNode.nextSibling):null;return!0}function gs(){st=Ht=null,He=!1}function Lc(){var e=La;return e!==null&&(fn===null?fn=e:fn.push.apply(fn,e),La=null),e}function nl(e){La===null?La=[e]:La.push(e)}var Uc=Ge(null),vs=null,ma=null;function za(e,t,a){_e(Uc,t._currentValue),t._currentValue=a}function pa(e){e._currentValue=Uc.current,we(Uc)}function zc(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function Vc(e,t,a,i){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var u=r.dependencies;if(u!==null){var g=r.child;u=u.firstContext;e:for(;u!==null;){var x=u;u=r;for(var E=0;E<t.length;E++)if(x.context===t[E]){u.lanes|=a,x=u.alternate,x!==null&&(x.lanes|=a),zc(u.return,a,e),i||(g=null);break e}u=x.next}}else if(r.tag===18){if(g=r.return,g===null)throw Error(o(341));g.lanes|=a,u=g.alternate,u!==null&&(u.lanes|=a),zc(g,a,e),g=null}else g=r.child;if(g!==null)g.return=r;else for(g=r;g!==null;){if(g===e){g=null;break}if(r=g.sibling,r!==null){r.return=g.return,g=r;break}g=g.return}r=g}}function ei(e,t,a,i){e=null;for(var r=t,u=!1;r!==null;){if(!u){if((r.flags&524288)!==0)u=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var g=r.alternate;if(g===null)throw Error(o(387));if(g=g.memoizedProps,g!==null){var x=r.type;pn(r.pendingProps.value,g.value)||(e!==null?e.push(x):e=[x])}}else if(r===Ie.current){if(g=r.alternate,g===null)throw Error(o(387));g.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(wl):e=[wl])}r=r.return}e!==null&&Vc(t,e,a,i),t.flags|=262144}function No(e){for(e=e.firstContext;e!==null;){if(!pn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ys(e){vs=e,ma=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function It(e){return $h(vs,e)}function wo(e,t){return vs===null&&ys(e),$h(e,t)}function $h(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ma===null){if(e===null)throw Error(o(308));ma=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ma=ma.next=t;return a}var YS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},KS=n.unstable_scheduleCallback,ZS=n.unstable_NormalPriority,wt={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hc(){return{controller:new YS,data:new Map,refCount:0}}function al(e){e.refCount--,e.refCount===0&&KS(ZS,function(){e.controller.abort()})}var sl=null,Ic=0,ti=0,ni=null;function XS(e,t){if(sl===null){var a=sl=[];Ic=0,ti=qu(),ni={status:"pending",value:void 0,then:function(i){a.push(i)}}}return Ic++,t.then(Qh,Qh),t}function Qh(){if(--Ic===0&&sl!==null){ni!==null&&(ni.status="fulfilled");var e=sl;sl=null,ti=0,ni=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function $S(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(i.status="rejected",i.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),i}var Fh=U.S;U.S=function(e,t){Op=ue(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&XS(e,t),Fh!==null&&Fh(e,t)};var bs=Ge(null);function Gc(){var e=bs.current;return e!==null?e:tt.pooledCache}function Do(e,t){t===null?_e(bs,bs.current):_e(bs,t.pool)}function Jh(){var e=Gc();return e===null?null:{parent:wt._currentValue,pool:e}}var ai=Error(o(460)),Pc=Error(o(474)),ko=Error(o(542)),Ro={then:function(){}};function Wh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function em(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ua,ua),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,nm(e),e;default:if(typeof t.status=="string")t.then(ua,ua);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=i}},function(i){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,nm(e),e}throw xs=t,ai}}function Ss(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(xs=a,ai):a}}var xs=null;function tm(){if(xs===null)throw Error(o(459));var e=xs;return xs=null,e}function nm(e){if(e===ai||e===ko)throw Error(o(483))}var si=null,il=0;function Mo(e){var t=il;return il+=1,si===null&&(si=[]),em(si,e,t)}function ll(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Oo(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function am(e){function t(k,C){if(e){var O=k.deletions;O===null?(k.deletions=[C],k.flags|=16):O.push(C)}}function a(k,C){if(!e)return null;for(;C!==null;)t(k,C),C=C.sibling;return null}function i(k){for(var C=new Map;k!==null;)k.key!==null?C.set(k.key,k):C.set(k.index,k),k=k.sibling;return C}function r(k,C){return k=fa(k,C),k.index=0,k.sibling=null,k}function u(k,C,O){return k.index=O,e?(O=k.alternate,O!==null?(O=O.index,O<C?(k.flags|=67108866,C):O):(k.flags|=67108866,C)):(k.flags|=1048576,C)}function g(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function x(k,C,O,q){return C===null||C.tag!==6?(C=kc(O,k.mode,q),C.return=k,C):(C=r(C,O),C.return=k,C)}function E(k,C,O,q){var ve=O.type;return ve===D?I(k,C,O.props.children,q,O.key):C!==null&&(C.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===K&&Ss(ve)===C.type)?(C=r(C,O.props),ll(C,O),C.return=k,C):(C=Co(O.type,O.key,O.props,null,k.mode,q),ll(C,O),C.return=k,C)}function B(k,C,O,q){return C===null||C.tag!==4||C.stateNode.containerInfo!==O.containerInfo||C.stateNode.implementation!==O.implementation?(C=Rc(O,k.mode,q),C.return=k,C):(C=r(C,O.children||[]),C.return=k,C)}function I(k,C,O,q,ve){return C===null||C.tag!==7?(C=ps(O,k.mode,q,ve),C.return=k,C):(C=r(C,O),C.return=k,C)}function Y(k,C,O){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=kc(""+C,k.mode,O),C.return=k,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case T:return O=Co(C.type,C.key,C.props,null,k.mode,O),ll(O,C),O.return=k,O;case N:return C=Rc(C,k.mode,O),C.return=k,C;case K:return C=Ss(C),Y(k,C,O)}if(G(C)||ge(C))return C=ps(C,k.mode,O,null),C.return=k,C;if(typeof C.then=="function")return Y(k,Mo(C),O);if(C.$$typeof===M)return Y(k,wo(k,C),O);Oo(k,C)}return null}function L(k,C,O,q){var ve=C!==null?C.key:null;if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return ve!==null?null:x(k,C,""+O,q);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case T:return O.key===ve?E(k,C,O,q):null;case N:return O.key===ve?B(k,C,O,q):null;case K:return O=Ss(O),L(k,C,O,q)}if(G(O)||ge(O))return ve!==null?null:I(k,C,O,q,null);if(typeof O.then=="function")return L(k,C,Mo(O),q);if(O.$$typeof===M)return L(k,C,wo(k,O),q);Oo(k,O)}return null}function z(k,C,O,q,ve){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return k=k.get(O)||null,x(C,k,""+q,ve);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case T:return k=k.get(q.key===null?O:q.key)||null,E(C,k,q,ve);case N:return k=k.get(q.key===null?O:q.key)||null,B(C,k,q,ve);case K:return q=Ss(q),z(k,C,O,q,ve)}if(G(q)||ge(q))return k=k.get(O)||null,I(C,k,q,ve,null);if(typeof q.then=="function")return z(k,C,O,Mo(q),ve);if(q.$$typeof===M)return z(k,C,O,wo(C,q),ve);Oo(C,q)}return null}function re(k,C,O,q){for(var ve=null,Pe=null,me=C,De=C=0,Ve=null;me!==null&&De<O.length;De++){me.index>De?(Ve=me,me=null):Ve=me.sibling;var qe=L(k,me,O[De],q);if(qe===null){me===null&&(me=Ve);break}e&&me&&qe.alternate===null&&t(k,me),C=u(qe,C,De),Pe===null?ve=qe:Pe.sibling=qe,Pe=qe,me=Ve}if(De===O.length)return a(k,me),He&&ha(k,De),ve;if(me===null){for(;De<O.length;De++)me=Y(k,O[De],q),me!==null&&(C=u(me,C,De),Pe===null?ve=me:Pe.sibling=me,Pe=me);return He&&ha(k,De),ve}for(me=i(me);De<O.length;De++)Ve=z(me,k,De,O[De],q),Ve!==null&&(e&&Ve.alternate!==null&&me.delete(Ve.key===null?De:Ve.key),C=u(Ve,C,De),Pe===null?ve=Ve:Pe.sibling=Ve,Pe=Ve);return e&&me.forEach(function(ns){return t(k,ns)}),He&&ha(k,De),ve}function ye(k,C,O,q){if(O==null)throw Error(o(151));for(var ve=null,Pe=null,me=C,De=C=0,Ve=null,qe=O.next();me!==null&&!qe.done;De++,qe=O.next()){me.index>De?(Ve=me,me=null):Ve=me.sibling;var ns=L(k,me,qe.value,q);if(ns===null){me===null&&(me=Ve);break}e&&me&&ns.alternate===null&&t(k,me),C=u(ns,C,De),Pe===null?ve=ns:Pe.sibling=ns,Pe=ns,me=Ve}if(qe.done)return a(k,me),He&&ha(k,De),ve;if(me===null){for(;!qe.done;De++,qe=O.next())qe=Y(k,qe.value,q),qe!==null&&(C=u(qe,C,De),Pe===null?ve=qe:Pe.sibling=qe,Pe=qe);return He&&ha(k,De),ve}for(me=i(me);!qe.done;De++,qe=O.next())qe=z(me,k,De,qe.value,q),qe!==null&&(e&&qe.alternate!==null&&me.delete(qe.key===null?De:qe.key),C=u(qe,C,De),Pe===null?ve=qe:Pe.sibling=qe,Pe=qe);return e&&me.forEach(function(l1){return t(k,l1)}),He&&ha(k,De),ve}function et(k,C,O,q){if(typeof O=="object"&&O!==null&&O.type===D&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case T:e:{for(var ve=O.key;C!==null;){if(C.key===ve){if(ve=O.type,ve===D){if(C.tag===7){a(k,C.sibling),q=r(C,O.props.children),q.return=k,k=q;break e}}else if(C.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===K&&Ss(ve)===C.type){a(k,C.sibling),q=r(C,O.props),ll(q,O),q.return=k,k=q;break e}a(k,C);break}else t(k,C);C=C.sibling}O.type===D?(q=ps(O.props.children,k.mode,q,O.key),q.return=k,k=q):(q=Co(O.type,O.key,O.props,null,k.mode,q),ll(q,O),q.return=k,k=q)}return g(k);case N:e:{for(ve=O.key;C!==null;){if(C.key===ve)if(C.tag===4&&C.stateNode.containerInfo===O.containerInfo&&C.stateNode.implementation===O.implementation){a(k,C.sibling),q=r(C,O.children||[]),q.return=k,k=q;break e}else{a(k,C);break}else t(k,C);C=C.sibling}q=Rc(O,k.mode,q),q.return=k,k=q}return g(k);case K:return O=Ss(O),et(k,C,O,q)}if(G(O))return re(k,C,O,q);if(ge(O)){if(ve=ge(O),typeof ve!="function")throw Error(o(150));return O=ve.call(O),ye(k,C,O,q)}if(typeof O.then=="function")return et(k,C,Mo(O),q);if(O.$$typeof===M)return et(k,C,wo(k,O),q);Oo(k,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,C!==null&&C.tag===6?(a(k,C.sibling),q=r(C,O),q.return=k,k=q):(a(k,C),q=kc(O,k.mode,q),q.return=k,k=q),g(k)):a(k,C)}return function(k,C,O,q){try{il=0;var ve=et(k,C,O,q);return si=null,ve}catch(me){if(me===ai||me===ko)throw me;var Pe=gn(29,me,null,k.mode);return Pe.lanes=q,Pe.return=k,Pe}finally{}}}var _s=am(!0),sm=am(!1),Va=!1;function qc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ye&2)!==0){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=jo(e),Ih(e,null,a),t}return Eo(e,i,t,a),jo(e)}function ol(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Gi(e,a)}}function Kc(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var r=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?r=u=g:u=u.next=g,a=a.next}while(a!==null);u===null?r=u=t:u=u.next=t}else r=u=t;a={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:u,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Zc=!1;function rl(){if(Zc){var e=ni;if(e!==null)throw e}}function cl(e,t,a,i){Zc=!1;var r=e.updateQueue;Va=!1;var u=r.firstBaseUpdate,g=r.lastBaseUpdate,x=r.shared.pending;if(x!==null){r.shared.pending=null;var E=x,B=E.next;E.next=null,g===null?u=B:g.next=B,g=E;var I=e.alternate;I!==null&&(I=I.updateQueue,x=I.lastBaseUpdate,x!==g&&(x===null?I.firstBaseUpdate=B:x.next=B,I.lastBaseUpdate=E))}if(u!==null){var Y=r.baseState;g=0,I=B=E=null,x=u;do{var L=x.lane&-536870913,z=L!==x.lane;if(z?(ze&L)===L:(i&L)===L){L!==0&&L===ti&&(Zc=!0),I!==null&&(I=I.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var re=e,ye=x;L=t;var et=a;switch(ye.tag){case 1:if(re=ye.payload,typeof re=="function"){Y=re.call(et,Y,L);break e}Y=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=ye.payload,L=typeof re=="function"?re.call(et,Y,L):re,L==null)break e;Y=b({},Y,L);break e;case 2:Va=!0}}L=x.callback,L!==null&&(e.flags|=64,z&&(e.flags|=8192),z=r.callbacks,z===null?r.callbacks=[L]:z.push(L))}else z={lane:L,tag:x.tag,payload:x.payload,callback:x.callback,next:null},I===null?(B=I=z,E=Y):I=I.next=z,g|=L;if(x=x.next,x===null){if(x=r.shared.pending,x===null)break;z=x,x=z.next,z.next=null,r.lastBaseUpdate=z,r.shared.pending=null}}while(!0);I===null&&(E=Y),r.baseState=E,r.firstBaseUpdate=B,r.lastBaseUpdate=I,u===null&&(r.shared.lanes=0),Ka|=g,e.lanes=g,e.memoizedState=Y}}function im(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function lm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)im(a[e],t)}var ii=Ge(null),Bo=Ge(0);function om(e,t){e=Ea,_e(Bo,e),_e(ii,t),Ea=e|t.baseLanes}function Xc(){_e(Bo,Ea),_e(ii,ii.current)}function $c(){Ea=Bo.current,we(ii),we(Bo)}var vn=Ge(null),Mn=null;function Ga(e){var t=e.alternate;_e(_t,_t.current&1),_e(vn,e),Mn===null&&(t===null||ii.current!==null||t.memoizedState!==null)&&(Mn=e)}function Qc(e){_e(_t,_t.current),_e(vn,e),Mn===null&&(Mn=e)}function rm(e){e.tag===22?(_e(_t,_t.current),_e(vn,e),Mn===null&&(Mn=e)):Pa()}function Pa(){_e(_t,_t.current),_e(vn,vn.current)}function yn(e){we(vn),Mn===e&&(Mn=null),we(_t)}var _t=Ge(0);function Lo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||nd(a)||ad(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ga=0,Ne=null,Je=null,Dt=null,Uo=!1,li=!1,Ts=!1,zo=0,ul=0,oi=null,QS=0;function vt(){throw Error(o(321))}function Fc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!pn(e[a],t[a]))return!1;return!0}function Jc(e,t,a,i,r,u){return ga=u,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Ym:hu,Ts=!1,u=a(i,r),Ts=!1,li&&(u=um(t,a,i,r)),cm(e),u}function cm(e){U.H=hl;var t=Je!==null&&Je.next!==null;if(ga=0,Dt=Je=Ne=null,Uo=!1,ul=0,oi=null,t)throw Error(o(300));e===null||kt||(e=e.dependencies,e!==null&&No(e)&&(kt=!0))}function um(e,t,a,i){Ne=e;var r=0;do{if(li&&(oi=null),ul=0,li=!1,25<=r)throw Error(o(301));if(r+=1,Dt=Je=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}U.H=Km,u=t(a,i)}while(li);return u}function FS(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?dl(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Wc(){var e=zo!==0;return zo=0,e}function eu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function tu(e){if(Uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Uo=!1}ga=0,Dt=Je=Ne=null,li=!1,ul=zo=0,oi=null}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?Ne.memoizedState=Dt=e:Dt=Dt.next=e,Dt}function Tt(){if(Je===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=Dt===null?Ne.memoizedState:Dt.next;if(t!==null)Dt=t,Je=e;else{if(e===null)throw Ne.alternate===null?Error(o(467)):Error(o(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},Dt===null?Ne.memoizedState=Dt=e:Dt=Dt.next=e}return Dt}function Vo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function dl(e){var t=ul;return ul+=1,oi===null&&(oi=[]),e=em(oi,e,t),t=Ne,(Dt===null?t.memoizedState:Dt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Ym:hu),e}function Ho(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return dl(e);if(e.$$typeof===M)return It(e)}throw Error(o(438,String(e)))}function nu(e){var t=null,a=Ne.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=Ne.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Vo(),Ne.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=he;return t.index++,a}function va(e,t){return typeof t=="function"?t(e):t}function Io(e){var t=Tt();return au(t,Je,e)}function au(e,t,a){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=a;var r=e.baseQueue,u=i.pending;if(u!==null){if(r!==null){var g=r.next;r.next=u.next,u.next=g}t.baseQueue=r=u,i.pending=null}if(u=e.baseState,r===null)e.memoizedState=u;else{t=r.next;var x=g=null,E=null,B=t,I=!1;do{var Y=B.lane&-536870913;if(Y!==B.lane?(ze&Y)===Y:(ga&Y)===Y){var L=B.revertLane;if(L===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),Y===ti&&(I=!0);else if((ga&L)===L){B=B.next,L===ti&&(I=!0);continue}else Y={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},E===null?(x=E=Y,g=u):E=E.next=Y,Ne.lanes|=L,Ka|=L;Y=B.action,Ts&&a(u,Y),u=B.hasEagerState?B.eagerState:a(u,Y)}else L={lane:Y,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},E===null?(x=E=L,g=u):E=E.next=L,Ne.lanes|=Y,Ka|=Y;B=B.next}while(B!==null&&B!==t);if(E===null?g=u:E.next=x,!pn(u,e.memoizedState)&&(kt=!0,I&&(a=ni,a!==null)))throw a;e.memoizedState=u,e.baseState=g,e.baseQueue=E,i.lastRenderedState=u}return r===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function su(e){var t=Tt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=a.dispatch,r=a.pending,u=t.memoizedState;if(r!==null){a.pending=null;var g=r=r.next;do u=e(u,g.action),g=g.next;while(g!==r);pn(u,t.memoizedState)||(kt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,i]}function dm(e,t,a){var i=Ne,r=Tt(),u=He;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var g=!pn((Je||r).memoizedState,a);if(g&&(r.memoizedState=a,kt=!0),r=r.queue,ou(mm.bind(null,i,r,e),[e]),r.getSnapshot!==t||g||Dt!==null&&Dt.memoizedState.tag&1){if(i.flags|=2048,ri(9,{destroy:void 0},hm.bind(null,i,r,a,t),null),tt===null)throw Error(o(349));u||(ga&127)!==0||fm(i,t,a)}return a}function fm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ne.updateQueue,t===null?(t=Vo(),Ne.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function hm(e,t,a,i){t.value=a,t.getSnapshot=i,pm(t)&&gm(e)}function mm(e,t,a){return a(function(){pm(t)&&gm(e)})}function pm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!pn(e,a)}catch{return!0}}function gm(e){var t=ms(e,2);t!==null&&hn(t,e,2)}function iu(e){var t=en();if(typeof e=="function"){var a=e;if(e=a(),Ts){Wt(!0);try{a()}finally{Wt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:e},t}function vm(e,t,a,i){return e.baseState=a,au(e,Je,typeof i=="function"?i:va)}function JS(e,t,a,i,r){if(qo(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){u.listeners.push(g)}};U.T!==null?a(!0):u.isTransition=!1,i(u),a=t.pending,a===null?(u.next=t.pending=u,ym(t,u)):(u.next=a.next,t.pending=a.next=u)}}function ym(e,t){var a=t.action,i=t.payload,r=e.state;if(t.isTransition){var u=U.T,g={};U.T=g;try{var x=a(r,i),E=U.S;E!==null&&E(g,x),bm(e,t,x)}catch(B){lu(e,t,B)}finally{u!==null&&g.types!==null&&(u.types=g.types),U.T=u}}else try{u=a(r,i),bm(e,t,u)}catch(B){lu(e,t,B)}}function bm(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){Sm(e,t,i)},function(i){return lu(e,t,i)}):Sm(e,t,a)}function Sm(e,t,a){t.status="fulfilled",t.value=a,xm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,ym(e,a)))}function lu(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,xm(t),t=t.next;while(t!==i)}e.action=null}function xm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _m(e,t){return t}function Tm(e,t){if(He){var a=tt.formState;if(a!==null){e:{var i=Ne;if(He){if(st){t:{for(var r=st,u=Rn;r.nodeType!==8;){if(!u){r=null;break t}if(r=On(r.nextSibling),r===null){r=null;break t}}u=r.data,r=u==="F!"||u==="F"?r:null}if(r){st=On(r.nextSibling),i=r.data==="F!";break e}}Ua(i)}i=!1}i&&(t=a[0])}}return a=en(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_m,lastRenderedState:t},a.queue=i,a=Gm.bind(null,Ne,i),i.dispatch=a,i=iu(!1),u=fu.bind(null,Ne,!1,i.queue),i=en(),r={state:t,dispatch:null,action:e,pending:null},i.queue=r,a=JS.bind(null,Ne,r,u,a),r.dispatch=a,i.memoizedState=e,[t,a,!1]}function Em(e){var t=Tt();return jm(t,Je,e)}function jm(e,t,a){if(t=au(e,t,_m)[0],e=Io(va)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=dl(t)}catch(g){throw g===ai?ko:g}else i=t;t=Tt();var r=t.queue,u=r.dispatch;return a!==t.memoizedState&&(Ne.flags|=2048,ri(9,{destroy:void 0},WS.bind(null,r,a),null)),[i,u,e]}function WS(e,t){e.action=t}function Cm(e){var t=Tt(),a=Je;if(a!==null)return jm(t,a,e);Tt(),t=t.memoizedState,a=Tt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function ri(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=Vo(),Ne.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function Am(){return Tt().memoizedState}function Go(e,t,a,i){var r=en();Ne.flags|=e,r.memoizedState=ri(1|t,{destroy:void 0},a,i===void 0?null:i)}function Po(e,t,a,i){var r=Tt();i=i===void 0?null:i;var u=r.memoizedState.inst;Je!==null&&i!==null&&Fc(i,Je.memoizedState.deps)?r.memoizedState=ri(t,u,a,i):(Ne.flags|=e,r.memoizedState=ri(1|t,u,a,i))}function Nm(e,t){Go(8390656,8,e,t)}function ou(e,t){Po(2048,8,e,t)}function ex(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=Vo(),Ne.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function wm(e){var t=Tt().memoizedState;return ex({ref:t,nextImpl:e}),function(){if((Ye&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Dm(e,t){return Po(4,2,e,t)}function km(e,t){return Po(4,4,e,t)}function Rm(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Mm(e,t,a){a=a!=null?a.concat([e]):null,Po(4,4,Rm.bind(null,t,e),a)}function ru(){}function Om(e,t){var a=Tt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&Fc(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function Bm(e,t){var a=Tt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&Fc(t,i[1]))return i[0];if(i=e(),Ts){Wt(!0);try{e()}finally{Wt(!1)}}return a.memoizedState=[i,t],i}function cu(e,t,a){return a===void 0||(ga&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Lp(),Ne.lanes|=e,Ka|=e,a)}function Lm(e,t,a,i){return pn(a,t)?a:ii.current!==null?(e=cu(e,a,i),pn(e,t)||(kt=!0),e):(ga&42)===0||(ga&1073741824)!==0&&(ze&261930)===0?(kt=!0,e.memoizedState=a):(e=Lp(),Ne.lanes|=e,Ka|=e,t)}function Um(e,t,a,i,r){var u=X.p;X.p=u!==0&&8>u?u:8;var g=U.T,x={};U.T=x,fu(e,!1,t,a);try{var E=r(),B=U.S;if(B!==null&&B(x,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var I=$S(E,i);fl(e,t,I,xn(e))}else fl(e,t,i,xn(e))}catch(Y){fl(e,t,{then:function(){},status:"rejected",reason:Y},xn())}finally{X.p=u,g!==null&&x.types!==null&&(g.types=x.types),U.T=g}}function tx(){}function uu(e,t,a,i){if(e.tag!==5)throw Error(o(476));var r=zm(e).queue;Um(e,r,t,ee,a===null?tx:function(){return Vm(e),a(i)})}function zm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:ee},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Vm(e){var t=zm(e);t.next===null&&(t=e.alternate.memoizedState),fl(e,t.next.queue,{},xn())}function du(){return It(wl)}function Hm(){return Tt().memoizedState}function Im(){return Tt().memoizedState}function nx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=xn();e=Ha(a);var i=Ia(t,e,a);i!==null&&(hn(i,t,a),ol(i,t,a)),t={cache:Hc()},e.payload=t;return}t=t.return}}function ax(e,t,a){var i=xn();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},qo(e)?Pm(t,a):(a=wc(e,t,a,i),a!==null&&(hn(a,e,i),qm(a,t,i)))}function Gm(e,t,a){var i=xn();fl(e,t,a,i)}function fl(e,t,a,i){var r={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(qo(e))Pm(t,r);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var g=t.lastRenderedState,x=u(g,a);if(r.hasEagerState=!0,r.eagerState=x,pn(x,g))return Eo(e,t,r,0),tt===null&&To(),!1}catch{}finally{}if(a=wc(e,t,r,i),a!==null)return hn(a,e,i),qm(a,t,i),!0}return!1}function fu(e,t,a,i){if(i={lane:2,revertLane:qu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},qo(e)){if(t)throw Error(o(479))}else t=wc(e,a,i,2),t!==null&&hn(t,e,2)}function qo(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Pm(e,t){li=Uo=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function qm(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Gi(e,a)}}var hl={readContext:It,use:Ho,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useLayoutEffect:vt,useInsertionEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useSyncExternalStore:vt,useId:vt,useHostTransitionStatus:vt,useFormState:vt,useActionState:vt,useOptimistic:vt,useMemoCache:vt,useCacheRefresh:vt};hl.useEffectEvent=vt;var Ym={readContext:It,use:Ho,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:Nm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Go(4194308,4,Rm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Go(4194308,4,e,t)},useInsertionEffect:function(e,t){Go(4,2,e,t)},useMemo:function(e,t){var a=en();t=t===void 0?null:t;var i=e();if(Ts){Wt(!0);try{e()}finally{Wt(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=en();if(a!==void 0){var r=a(t);if(Ts){Wt(!0);try{a(t)}finally{Wt(!1)}}}else r=t;return i.memoizedState=i.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=ax.bind(null,Ne,e),[i.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:function(e){e=iu(e);var t=e.queue,a=Gm.bind(null,Ne,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ru,useDeferredValue:function(e,t){var a=en();return cu(a,e,t)},useTransition:function(){var e=iu(!1);return e=Um.bind(null,Ne,e.queue,!0,!1),en().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=Ne,r=en();if(He){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),tt===null)throw Error(o(349));(ze&127)!==0||fm(i,t,a)}r.memoizedState=a;var u={value:a,getSnapshot:t};return r.queue=u,Nm(mm.bind(null,i,u,e),[e]),i.flags|=2048,ri(9,{destroy:void 0},hm.bind(null,i,u,a,t),null),a},useId:function(){var e=en(),t=tt.identifierPrefix;if(He){var a=Jn,i=Fn;a=(i&~(1<<32-ft(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=zo++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=QS++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:du,useFormState:Tm,useActionState:Tm,useOptimistic:function(e){var t=en();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=fu.bind(null,Ne,!0,a),a.dispatch=t,[e,t]},useMemoCache:nu,useCacheRefresh:function(){return en().memoizedState=nx.bind(null,Ne)},useEffectEvent:function(e){var t=en(),a={impl:e};return t.memoizedState=a,function(){if((Ye&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},hu={readContext:It,use:Ho,useCallback:Om,useContext:It,useEffect:ou,useImperativeHandle:Mm,useInsertionEffect:Dm,useLayoutEffect:km,useMemo:Bm,useReducer:Io,useRef:Am,useState:function(){return Io(va)},useDebugValue:ru,useDeferredValue:function(e,t){var a=Tt();return Lm(a,Je.memoizedState,e,t)},useTransition:function(){var e=Io(va)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:dl(e),t]},useSyncExternalStore:dm,useId:Hm,useHostTransitionStatus:du,useFormState:Em,useActionState:Em,useOptimistic:function(e,t){var a=Tt();return vm(a,Je,e,t)},useMemoCache:nu,useCacheRefresh:Im};hu.useEffectEvent=wm;var Km={readContext:It,use:Ho,useCallback:Om,useContext:It,useEffect:ou,useImperativeHandle:Mm,useInsertionEffect:Dm,useLayoutEffect:km,useMemo:Bm,useReducer:su,useRef:Am,useState:function(){return su(va)},useDebugValue:ru,useDeferredValue:function(e,t){var a=Tt();return Je===null?cu(a,e,t):Lm(a,Je.memoizedState,e,t)},useTransition:function(){var e=su(va)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:dl(e),t]},useSyncExternalStore:dm,useId:Hm,useHostTransitionStatus:du,useFormState:Cm,useActionState:Cm,useOptimistic:function(e,t){var a=Tt();return Je!==null?vm(a,Je,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:nu,useCacheRefresh:Im};Km.useEffectEvent=wm;function mu(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var pu={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=xn(),r=Ha(i);r.payload=t,a!=null&&(r.callback=a),t=Ia(e,r,i),t!==null&&(hn(t,e,i),ol(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=xn(),r=Ha(i);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=Ia(e,r,i),t!==null&&(hn(t,e,i),ol(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=xn(),i=Ha(a);i.tag=2,t!=null&&(i.callback=t),t=Ia(e,i,a),t!==null&&(hn(t,e,a),ol(t,e,a))}};function Zm(e,t,a,i,r,u,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,u,g):t.prototype&&t.prototype.isPureReactComponent?!Wi(a,i)||!Wi(r,u):!0}function Xm(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&pu.enqueueReplaceState(t,t.state,null)}function Es(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function $m(e){_o(e)}function Qm(e){console.error(e)}function Fm(e){_o(e)}function Yo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Jm(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function gu(e,t,a){return a=Ha(a),a.tag=3,a.payload={element:null},a.callback=function(){Yo(e,t)},a}function Wm(e){return e=Ha(e),e.tag=3,e}function ep(e,t,a,i){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var u=i.value;e.payload=function(){return r(u)},e.callback=function(){Jm(t,a,i)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Jm(t,a,i),typeof r!="function"&&(Za===null?Za=new Set([this]):Za.add(this));var x=i.stack;this.componentDidCatch(i.value,{componentStack:x!==null?x:""})})}function sx(e,t,a,i,r){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&ei(t,a,r,!0),a=vn.current,a!==null){switch(a.tag){case 31:case 13:return Mn===null?ar():a.alternate===null&&yt===0&&(yt=3),a.flags&=-257,a.flags|=65536,a.lanes=r,i===Ro?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),Iu(e,i,r)),!1;case 22:return a.flags|=65536,i===Ro?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),Iu(e,i,r)),!1}throw Error(o(435,a.tag))}return Iu(e,i,r),ar(),!1}if(He)return t=vn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,i!==Bc&&(e=Error(o(422),{cause:i}),nl(wn(e,a)))):(i!==Bc&&(t=Error(o(423),{cause:i}),nl(wn(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,i=wn(i,a),r=gu(e.stateNode,i,r),Kc(e,r),yt!==4&&(yt=2)),!1;var u=Error(o(520),{cause:i});if(u=wn(u,a),xl===null?xl=[u]:xl.push(u),yt!==4&&(yt=2),t===null)return!0;i=wn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=gu(a.stateNode,i,e),Kc(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Za===null||!Za.has(u))))return a.flags|=65536,r&=-r,a.lanes|=r,r=Wm(r),ep(r,e,a,i),Kc(a,r),!1}a=a.return}while(a!==null);return!1}var vu=Error(o(461)),kt=!1;function Gt(e,t,a,i){t.child=e===null?sm(t,null,a,i):_s(t,e.child,a,i)}function tp(e,t,a,i,r){a=a.render;var u=t.ref;if("ref"in i){var g={};for(var x in i)x!=="ref"&&(g[x]=i[x])}else g=i;return ys(t),i=Jc(e,t,a,g,u,r),x=Wc(),e!==null&&!kt?(eu(e,t,r),ya(e,t,r)):(He&&x&&Mc(t),t.flags|=1,Gt(e,t,i,r),t.child)}function np(e,t,a,i,r){if(e===null){var u=a.type;return typeof u=="function"&&!Dc(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,ap(e,t,u,i,r)):(e=Co(a.type,null,i,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!ju(e,r)){var g=u.memoizedProps;if(a=a.compare,a=a!==null?a:Wi,a(g,i)&&e.ref===t.ref)return ya(e,t,r)}return t.flags|=1,e=fa(u,i),e.ref=t.ref,e.return=t,t.child=e}function ap(e,t,a,i,r){if(e!==null){var u=e.memoizedProps;if(Wi(u,i)&&e.ref===t.ref)if(kt=!1,t.pendingProps=i=u,ju(e,r))(e.flags&131072)!==0&&(kt=!0);else return t.lanes=e.lanes,ya(e,t,r)}return yu(e,t,a,i,r)}function sp(e,t,a,i){var r=i.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(i=t.child=e.child,r=0;i!==null;)r=r|i.lanes|i.childLanes,i=i.sibling;i=r&~u}else i=0,t.child=null;return ip(e,t,u,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Do(t,u!==null?u.cachePool:null),u!==null?om(t,u):Xc(),rm(t);else return i=t.lanes=536870912,ip(e,t,u!==null?u.baseLanes|a:a,a,i)}else u!==null?(Do(t,u.cachePool),om(t,u),Pa(),t.memoizedState=null):(e!==null&&Do(t,null),Xc(),Pa());return Gt(e,t,r,a),t.child}function ml(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ip(e,t,a,i,r){var u=Gc();return u=u===null?null:{parent:wt._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&Do(t,null),Xc(),rm(t),e!==null&&ei(e,t,i,!0),t.childLanes=r,null}function Ko(e,t){return t=Xo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lp(e,t,a){return _s(t,e.child,null,a),e=Ko(t,t.pendingProps),e.flags|=2,yn(t),t.memoizedState=null,e}function ix(e,t,a){var i=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(He){if(i.mode==="hidden")return e=Ko(t,i),t.lanes=536870912,ml(null,e);if(Qc(t),(e=st)?(e=yg(e,Rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:Fn,overflow:Jn}:null,retryLane:536870912,hydrationErrors:null},a=Ph(e),a.return=t,t.child=a,Ht=t,st=null)):e=null,e===null)throw Ua(t);return t.lanes=536870912,null}return Ko(t,i)}var u=e.memoizedState;if(u!==null){var g=u.dehydrated;if(Qc(t),r)if(t.flags&256)t.flags&=-257,t=lp(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(kt||ei(e,t,a,!1),r=(a&e.childLanes)!==0,kt||r){if(i=tt,i!==null&&(g=Pi(i,a),g!==0&&g!==u.retryLane))throw u.retryLane=g,ms(e,g),hn(i,e,g),vu;ar(),t=lp(e,t,a)}else e=u.treeContext,st=On(g.nextSibling),Ht=t,He=!0,La=null,Rn=!1,e!==null&&Kh(t,e),t=Ko(t,i),t.flags|=4096;return t}return e=fa(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Zo(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function yu(e,t,a,i,r){return ys(t),a=Jc(e,t,a,i,void 0,r),i=Wc(),e!==null&&!kt?(eu(e,t,r),ya(e,t,r)):(He&&i&&Mc(t),t.flags|=1,Gt(e,t,a,r),t.child)}function op(e,t,a,i,r,u){return ys(t),t.updateQueue=null,a=um(t,i,a,r),cm(e),i=Wc(),e!==null&&!kt?(eu(e,t,u),ya(e,t,u)):(He&&i&&Mc(t),t.flags|=1,Gt(e,t,a,u),t.child)}function rp(e,t,a,i,r){if(ys(t),t.stateNode===null){var u=Qs,g=a.contextType;typeof g=="object"&&g!==null&&(u=It(g)),u=new a(i,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=pu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=i,u.state=t.memoizedState,u.refs={},qc(t),g=a.contextType,u.context=typeof g=="object"&&g!==null?It(g):Qs,u.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(mu(t,a,g,i),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(g=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),g!==u.state&&pu.enqueueReplaceState(u,u.state,null),cl(t,i,u,r),rl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){u=t.stateNode;var x=t.memoizedProps,E=Es(a,x);u.props=E;var B=u.context,I=a.contextType;g=Qs,typeof I=="object"&&I!==null&&(g=It(I));var Y=a.getDerivedStateFromProps;I=typeof Y=="function"||typeof u.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,I||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x||B!==g)&&Xm(t,u,i,g),Va=!1;var L=t.memoizedState;u.state=L,cl(t,i,u,r),rl(),B=t.memoizedState,x||L!==B||Va?(typeof Y=="function"&&(mu(t,a,Y,i),B=t.memoizedState),(E=Va||Zm(t,a,E,i,L,B,g))?(I||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=B),u.props=i,u.state=B,u.context=g,i=E):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{u=t.stateNode,Yc(e,t),g=t.memoizedProps,I=Es(a,g),u.props=I,Y=t.pendingProps,L=u.context,B=a.contextType,E=Qs,typeof B=="object"&&B!==null&&(E=It(B)),x=a.getDerivedStateFromProps,(B=typeof x=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g!==Y||L!==E)&&Xm(t,u,i,E),Va=!1,L=t.memoizedState,u.state=L,cl(t,i,u,r),rl();var z=t.memoizedState;g!==Y||L!==z||Va||e!==null&&e.dependencies!==null&&No(e.dependencies)?(typeof x=="function"&&(mu(t,a,x,i),z=t.memoizedState),(I=Va||Zm(t,a,I,i,L,z,E)||e!==null&&e.dependencies!==null&&No(e.dependencies))?(B||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(i,z,E),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(i,z,E)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=z),u.props=i,u.state=z,u.context=E,i=I):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),i=!1)}return u=i,Zo(e,t),i=(t.flags&128)!==0,u||i?(u=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&i?(t.child=_s(t,e.child,null,r),t.child=_s(t,null,a,r)):Gt(e,t,a,r),t.memoizedState=u.state,e=t.child):e=ya(e,t,r),e}function cp(e,t,a,i){return gs(),t.flags|=256,Gt(e,t,a,i),t.child}var bu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Su(e){return{baseLanes:e,cachePool:Jh()}}function xu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Sn),e}function up(e,t,a){var i=t.pendingProps,r=!1,u=(t.flags&128)!==0,g;if((g=u)||(g=e!==null&&e.memoizedState===null?!1:(_t.current&2)!==0),g&&(r=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(He){if(r?Ga(t):Pa(),(e=st)?(e=yg(e,Rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:Fn,overflow:Jn}:null,retryLane:536870912,hydrationErrors:null},a=Ph(e),a.return=t,t.child=a,Ht=t,st=null)):e=null,e===null)throw Ua(t);return ad(e)?t.lanes=32:t.lanes=536870912,null}var x=i.children;return i=i.fallback,r?(Pa(),r=t.mode,x=Xo({mode:"hidden",children:x},r),i=ps(i,r,a,null),x.return=t,i.return=t,x.sibling=i,t.child=x,i=t.child,i.memoizedState=Su(a),i.childLanes=xu(e,g,a),t.memoizedState=bu,ml(null,i)):(Ga(t),_u(t,x))}var E=e.memoizedState;if(E!==null&&(x=E.dehydrated,x!==null)){if(u)t.flags&256?(Ga(t),t.flags&=-257,t=Tu(e,t,a)):t.memoizedState!==null?(Pa(),t.child=e.child,t.flags|=128,t=null):(Pa(),x=i.fallback,r=t.mode,i=Xo({mode:"visible",children:i.children},r),x=ps(x,r,a,null),x.flags|=2,i.return=t,x.return=t,i.sibling=x,t.child=i,_s(t,e.child,null,a),i=t.child,i.memoizedState=Su(a),i.childLanes=xu(e,g,a),t.memoizedState=bu,t=ml(null,i));else if(Ga(t),ad(x)){if(g=x.nextSibling&&x.nextSibling.dataset,g)var B=g.dgst;g=B,i=Error(o(419)),i.stack="",i.digest=g,nl({value:i,source:null,stack:null}),t=Tu(e,t,a)}else if(kt||ei(e,t,a,!1),g=(a&e.childLanes)!==0,kt||g){if(g=tt,g!==null&&(i=Pi(g,a),i!==0&&i!==E.retryLane))throw E.retryLane=i,ms(e,i),hn(g,e,i),vu;nd(x)||ar(),t=Tu(e,t,a)}else nd(x)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,st=On(x.nextSibling),Ht=t,He=!0,La=null,Rn=!1,e!==null&&Kh(t,e),t=_u(t,i.children),t.flags|=4096);return t}return r?(Pa(),x=i.fallback,r=t.mode,E=e.child,B=E.sibling,i=fa(E,{mode:"hidden",children:i.children}),i.subtreeFlags=E.subtreeFlags&65011712,B!==null?x=fa(B,x):(x=ps(x,r,a,null),x.flags|=2),x.return=t,i.return=t,i.sibling=x,t.child=i,ml(null,i),i=t.child,x=e.child.memoizedState,x===null?x=Su(a):(r=x.cachePool,r!==null?(E=wt._currentValue,r=r.parent!==E?{parent:E,pool:E}:r):r=Jh(),x={baseLanes:x.baseLanes|a,cachePool:r}),i.memoizedState=x,i.childLanes=xu(e,g,a),t.memoizedState=bu,ml(e.child,i)):(Ga(t),a=e.child,e=a.sibling,a=fa(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function _u(e,t){return t=Xo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Xo(e,t){return e=gn(22,e,null,t),e.lanes=0,e}function Tu(e,t,a){return _s(t,e.child,null,a),e=_u(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dp(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),zc(e.return,t,a)}function Eu(e,t,a,i,r,u){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:r,treeForkCount:u}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=i,g.tail=a,g.tailMode=r,g.treeForkCount=u)}function fp(e,t,a){var i=t.pendingProps,r=i.revealOrder,u=i.tail;i=i.children;var g=_t.current,x=(g&2)!==0;if(x?(g=g&1|2,t.flags|=128):g&=1,_e(_t,g),Gt(e,t,i,a),i=He?tl:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dp(e,a,t);else if(e.tag===19)dp(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Lo(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),Eu(t,!1,r,a,u,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Lo(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}Eu(t,!0,a,null,u,i);break;case"together":Eu(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function ya(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ka|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(ei(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=fa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=fa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ju(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&No(e)))}function lx(e,t,a){switch(t.tag){case 3:F(t,t.stateNode.containerInfo),za(t,wt,e.memoizedState.cache),gs();break;case 27:case 5:Qn(t);break;case 4:F(t,t.stateNode.containerInfo);break;case 10:za(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Ga(t),t.flags|=128,null):(a&t.child.childLanes)!==0?up(e,t,a):(Ga(t),e=ya(e,t,a),e!==null?e.sibling:null);Ga(t);break;case 19:var r=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(ei(e,t,a,!1),i=(a&t.childLanes)!==0),r){if(i)return fp(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),_e(_t,_t.current),i)break;return null;case 22:return t.lanes=0,sp(e,t,a,t.pendingProps);case 24:za(t,wt,e.memoizedState.cache)}return ya(e,t,a)}function hp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)kt=!0;else{if(!ju(e,a)&&(t.flags&128)===0)return kt=!1,lx(e,t,a);kt=(e.flags&131072)!==0}else kt=!1,He&&(t.flags&1048576)!==0&&Yh(t,tl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Ss(t.elementType),t.type=e,typeof e=="function")Dc(e)?(i=Es(e,i),t.tag=1,t=rp(null,t,e,i,a)):(t.tag=0,t=yu(null,t,e,i,a));else{if(e!=null){var r=e.$$typeof;if(r===$){t.tag=11,t=tp(null,t,e,i,a);break e}else if(r===te){t.tag=14,t=np(null,t,e,i,a);break e}}throw t=je(e)||e,Error(o(306,t,""))}}return t;case 0:return yu(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,r=Es(i,t.pendingProps),rp(e,t,i,r,a);case 3:e:{if(F(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var u=t.memoizedState;r=u.element,Yc(e,t),cl(t,i,null,a);var g=t.memoizedState;if(i=g.cache,za(t,wt,i),i!==u.cache&&Vc(t,[wt],a,!0),rl(),i=g.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=cp(e,t,i,a);break e}else if(i!==r){r=wn(Error(o(424)),t),nl(r),t=cp(e,t,i,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(st=On(e.firstChild),Ht=t,He=!0,La=null,Rn=!0,a=sm(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(gs(),i===r){t=ya(e,t,a);break e}Gt(e,t,i,a)}t=t.child}return t;case 26:return Zo(e,t),e===null?(a=Eg(t.type,null,t.pendingProps,null))?t.memoizedState=a:He||(a=t.type,e=t.pendingProps,i=ur(ce.current).createElement(a),i[Nt]=t,i[Vt]=e,Pt(i,a,e),Ue(i),t.stateNode=i):t.memoizedState=Eg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Qn(t),e===null&&He&&(i=t.stateNode=xg(t.type,t.pendingProps,ce.current),Ht=t,Rn=!0,r=st,Fa(t.type)?(sd=r,st=On(i.firstChild)):st=r),Gt(e,t,t.pendingProps.children,a),Zo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&He&&((r=i=st)&&(i=Lx(i,t.type,t.pendingProps,Rn),i!==null?(t.stateNode=i,Ht=t,st=On(i.firstChild),Rn=!1,r=!0):r=!1),r||Ua(t)),Qn(t),r=t.type,u=t.pendingProps,g=e!==null?e.memoizedProps:null,i=u.children,Wu(r,u)?i=null:g!==null&&Wu(r,g)&&(t.flags|=32),t.memoizedState!==null&&(r=Jc(e,t,FS,null,null,a),wl._currentValue=r),Zo(e,t),Gt(e,t,i,a),t.child;case 6:return e===null&&He&&((e=a=st)&&(a=Ux(a,t.pendingProps,Rn),a!==null?(t.stateNode=a,Ht=t,st=null,e=!0):e=!1),e||Ua(t)),null;case 13:return up(e,t,a);case 4:return F(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=_s(t,null,i,a):Gt(e,t,i,a),t.child;case 11:return tp(e,t,t.type,t.pendingProps,a);case 7:return Gt(e,t,t.pendingProps,a),t.child;case 8:return Gt(e,t,t.pendingProps.children,a),t.child;case 12:return Gt(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,za(t,t.type,i.value),Gt(e,t,i.children,a),t.child;case 9:return r=t.type._context,i=t.pendingProps.children,ys(t),r=It(r),i=i(r),t.flags|=1,Gt(e,t,i,a),t.child;case 14:return np(e,t,t.type,t.pendingProps,a);case 15:return ap(e,t,t.type,t.pendingProps,a);case 19:return fp(e,t,a);case 31:return ix(e,t,a);case 22:return sp(e,t,a,t.pendingProps);case 24:return ys(t),i=It(wt),e===null?(r=Gc(),r===null&&(r=tt,u=Hc(),r.pooledCache=u,u.refCount++,u!==null&&(r.pooledCacheLanes|=a),r=u),t.memoizedState={parent:i,cache:r},qc(t),za(t,wt,r)):((e.lanes&a)!==0&&(Yc(e,t),cl(t,null,null,a),rl()),r=e.memoizedState,u=t.memoizedState,r.parent!==i?(r={parent:i,cache:i},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),za(t,wt,i)):(i=u.cache,za(t,wt,i),i!==r.cache&&Vc(t,[wt],a,!0))),Gt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ba(e){e.flags|=4}function Cu(e,t,a,i,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Hp())e.flags|=8192;else throw xs=Ro,Pc}else e.flags&=-16777217}function mp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wg(t))if(Hp())e.flags|=8192;else throw xs=Ro,Pc}function $o(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?on():536870912,e.lanes|=t,fi|=t)}function pl(e,t){if(!He)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function it(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags&65011712,i|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function ox(e,t,a){var i=t.pendingProps;switch(Oc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return it(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),pa(wt),sn(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ws(t)?ba(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Lc())),it(t),null;case 26:var r=t.type,u=t.memoizedState;return e===null?(ba(t),u!==null?(it(t),mp(t,u)):(it(t),Cu(t,r,null,i,a))):u?u!==e.memoizedState?(ba(t),it(t),mp(t,u)):(it(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&ba(t),it(t),Cu(t,r,e,i,a)),null;case 27:if(ln(t),a=ce.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ba(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return it(t),null}e=Ce.current,Ws(t)?Zh(t):(e=xg(r,i,a),t.stateNode=e,ba(t))}return it(t),null;case 5:if(ln(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ba(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return it(t),null}if(u=Ce.current,Ws(t))Zh(t);else{var g=ur(ce.current);switch(u){case 1:u=g.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:u=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":u=g.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":u=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":u=g.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof i.is=="string"?g.createElement("select",{is:i.is}):g.createElement("select"),i.multiple?u.multiple=!0:i.size&&(u.size=i.size);break;default:u=typeof i.is=="string"?g.createElement(r,{is:i.is}):g.createElement(r)}}u[Nt]=t,u[Vt]=i;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)u.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=u;e:switch(Pt(u,r,i),r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&ba(t)}}return it(t),Cu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&ba(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=ce.current,Ws(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,r=Ht,r!==null)switch(r.tag){case 27:case 5:i=r.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||ug(e.nodeValue,a)),e||Ua(t,!0)}else e=ur(e).createTextNode(i),e[Nt]=t,t.stateNode=e}return it(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=Ws(t),a!==null){if(e===null){if(!i)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Nt]=t}else gs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),e=!1}else a=Lc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(yn(t),t):(yn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return it(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ws(t),i!==null&&i.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[Nt]=t}else gs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),r=!1}else r=Lc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(yn(t),t):(yn(t),null)}return yn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,r=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(r=i.alternate.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==r&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),$o(t,t.updateQueue),it(t),null);case 4:return sn(),e===null&&Xu(t.stateNode.containerInfo),it(t),null;case 10:return pa(t.type),it(t),null;case 19:if(we(_t),i=t.memoizedState,i===null)return it(t),null;if(r=(t.flags&128)!==0,u=i.rendering,u===null)if(r)pl(i,!1);else{if(yt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Lo(e),u!==null){for(t.flags|=128,pl(i,!1),e=u.updateQueue,t.updateQueue=e,$o(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Gh(a,e),a=a.sibling;return _e(_t,_t.current&1|2),He&&ha(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&ue()>er&&(t.flags|=128,r=!0,pl(i,!1),t.lanes=4194304)}else{if(!r)if(e=Lo(u),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,$o(t,e),pl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!u.alternate&&!He)return it(t),null}else 2*ue()-i.renderingStartTime>er&&a!==536870912&&(t.flags|=128,r=!0,pl(i,!1),t.lanes=4194304);i.isBackwards?(u.sibling=t.child,t.child=u):(e=i.last,e!==null?e.sibling=u:t.child=u,i.last=u)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=ue(),e.sibling=null,a=_t.current,_e(_t,r?a&1|2:a&1),He&&ha(t,i.treeForkCount),e):(it(t),null);case 22:case 23:return yn(t),$c(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),a=t.updateQueue,a!==null&&$o(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&we(bs),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),pa(wt),it(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function rx(e,t){switch(Oc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pa(wt),sn(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ln(t),null;case 31:if(t.memoizedState!==null){if(yn(t),t.alternate===null)throw Error(o(340));gs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(yn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));gs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(_t),null;case 4:return sn(),null;case 10:return pa(t.type),null;case 22:case 23:return yn(t),$c(),e!==null&&we(bs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pa(wt),null;case 25:return null;default:return null}}function pp(e,t){switch(Oc(t),t.tag){case 3:pa(wt),sn();break;case 26:case 27:case 5:ln(t);break;case 4:sn();break;case 31:t.memoizedState!==null&&yn(t);break;case 13:yn(t);break;case 19:we(_t);break;case 10:pa(t.type);break;case 22:case 23:yn(t),$c(),e!==null&&we(bs);break;case 24:pa(wt)}}function gl(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var r=i.next;a=r;do{if((a.tag&e)===e){i=void 0;var u=a.create,g=a.inst;i=u(),g.destroy=i}a=a.next}while(a!==r)}}catch(x){Qe(t,t.return,x)}}function qa(e,t,a){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var u=r.next;i=u;do{if((i.tag&e)===e){var g=i.inst,x=g.destroy;if(x!==void 0){g.destroy=void 0,r=t;var E=a,B=x;try{B()}catch(I){Qe(r,E,I)}}}i=i.next}while(i!==u)}}catch(I){Qe(t,t.return,I)}}function gp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{lm(t,a)}catch(i){Qe(e,e.return,i)}}}function vp(e,t,a){a.props=Es(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Qe(e,t,i)}}function vl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(r){Qe(e,t,r)}}function Wn(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(r){Qe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Qe(e,t,r)}else a.current=null}function yp(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(r){Qe(e,e.return,r)}}function Au(e,t,a){try{var i=e.stateNode;Dx(i,e.type,a,t),i[Vt]=t}catch(r){Qe(e,e.return,r)}}function bp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Fa(e.type)||e.tag===4}function Nu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bp(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&&Fa(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 wu(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ua));else if(i!==4&&(i===27&&Fa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(wu(e,t,a),e=e.sibling;e!==null;)wu(e,t,a),e=e.sibling}function Qo(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&Fa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Qo(e,t,a),e=e.sibling;e!==null;)Qo(e,t,a),e=e.sibling}function Sp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Pt(t,i,a),t[Nt]=e,t[Vt]=a}catch(u){Qe(e,e.return,u)}}var Sa=!1,Rt=!1,Du=!1,xp=typeof WeakSet=="function"?WeakSet:Set,zt=null;function cx(e,t){if(e=e.containerInfo,Fu=vr,e=Mh(e),Tc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var r=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var g=0,x=-1,E=-1,B=0,I=0,Y=e,L=null;t:for(;;){for(var z;Y!==a||r!==0&&Y.nodeType!==3||(x=g+r),Y!==u||i!==0&&Y.nodeType!==3||(E=g+i),Y.nodeType===3&&(g+=Y.nodeValue.length),(z=Y.firstChild)!==null;)L=Y,Y=z;for(;;){if(Y===e)break t;if(L===a&&++B===r&&(x=g),L===u&&++I===i&&(E=g),(z=Y.nextSibling)!==null)break;Y=L,L=Y.parentNode}Y=z}a=x===-1||E===-1?null:{start:x,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ju={focusedElem:e,selectionRange:a},vr=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,r=u.memoizedProps,u=u.memoizedState,i=a.stateNode;try{var re=Es(a.type,r);e=i.getSnapshotBeforeUpdate(re,u),i.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Qe(a,a.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)td(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":td(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,zt=e;break}zt=t.return}}function _p(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:_a(e,a),i&4&&gl(5,a);break;case 1:if(_a(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Qe(a,a.return,g)}else{var r=Es(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Qe(a,a.return,g)}}i&64&&gp(a),i&512&&vl(a,a.return);break;case 3:if(_a(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{lm(e,t)}catch(g){Qe(a,a.return,g)}}break;case 27:t===null&&i&4&&Sp(a);case 26:case 5:_a(e,a),t===null&&i&4&&yp(a),i&512&&vl(a,a.return);break;case 12:_a(e,a);break;case 31:_a(e,a),i&4&&jp(e,a);break;case 13:_a(e,a),i&4&&Cp(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=yx.bind(null,a),zx(e,a))));break;case 22:if(i=a.memoizedState!==null||Sa,!i){t=t!==null&&t.memoizedState!==null||Rt,r=Sa;var u=Rt;Sa=i,(Rt=t)&&!u?Ta(e,a,(a.subtreeFlags&8772)!==0):_a(e,a),Sa=r,Rt=u}break;case 30:break;default:_a(e,a)}}function Tp(e){var t=e.alternate;t!==null&&(e.alternate=null,Tp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Me(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ct=null,cn=!1;function xa(e,t,a){for(a=a.child;a!==null;)Ep(e,t,a),a=a.sibling}function Ep(e,t,a){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(at,a)}catch{}switch(a.tag){case 26:Rt||Wn(a,t),xa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Rt||Wn(a,t);var i=ct,r=cn;Fa(a.type)&&(ct=a.stateNode,cn=!1),xa(e,t,a),Cl(a.stateNode),ct=i,cn=r;break;case 5:Rt||Wn(a,t);case 6:if(i=ct,r=cn,ct=null,xa(e,t,a),ct=i,cn=r,ct!==null)if(cn)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(a.stateNode)}catch(u){Qe(a,t,u)}else try{ct.removeChild(a.stateNode)}catch(u){Qe(a,t,u)}break;case 18:ct!==null&&(cn?(e=ct,gg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Si(e)):gg(ct,a.stateNode));break;case 4:i=ct,r=cn,ct=a.stateNode.containerInfo,cn=!0,xa(e,t,a),ct=i,cn=r;break;case 0:case 11:case 14:case 15:qa(2,a,t),Rt||qa(4,a,t),xa(e,t,a);break;case 1:Rt||(Wn(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&vp(a,t,i)),xa(e,t,a);break;case 21:xa(e,t,a);break;case 22:Rt=(i=Rt)||a.memoizedState!==null,xa(e,t,a),Rt=i;break;default:xa(e,t,a)}}function jp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Si(e)}catch(a){Qe(t,t.return,a)}}}function Cp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Si(e)}catch(a){Qe(t,t.return,a)}}function ux(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xp),t;default:throw Error(o(435,e.tag))}}function Fo(e,t){var a=ux(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var r=bx.bind(null,e,i);i.then(r,r)}})}function un(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var r=a[i],u=e,g=t,x=g;e:for(;x!==null;){switch(x.tag){case 27:if(Fa(x.type)){ct=x.stateNode,cn=!1;break e}break;case 5:ct=x.stateNode,cn=!1;break e;case 3:case 4:ct=x.stateNode.containerInfo,cn=!0;break e}x=x.return}if(ct===null)throw Error(o(160));Ep(u,g,r),ct=null,cn=!1,u=r.alternate,u!==null&&(u.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ap(t,e),t=t.sibling}var Zn=null;function Ap(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:un(t,e),dn(e),i&4&&(qa(3,e,e.return),gl(3,e),qa(5,e,e.return));break;case 1:un(t,e),dn(e),i&512&&(Rt||a===null||Wn(a,a.return)),i&64&&Sa&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var r=Zn;if(un(t,e),dn(e),i&512&&(Rt||a===null||Wn(a,a.return)),i&4){var u=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(i){case"title":u=r.getElementsByTagName("title")[0],(!u||u[Oe]||u[Nt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=r.createElement(i),r.head.insertBefore(u,r.querySelector("head > title"))),Pt(u,i,a),u[Nt]=e,Ue(u),i=u;break e;case"link":var g=Ag("link","href",r).get(i+(a.href||""));if(g){for(var x=0;x<g.length;x++)if(u=g[x],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(x,1);break t}}u=r.createElement(i),Pt(u,i,a),r.head.appendChild(u);break;case"meta":if(g=Ag("meta","content",r).get(i+(a.content||""))){for(x=0;x<g.length;x++)if(u=g[x],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(x,1);break t}}u=r.createElement(i),Pt(u,i,a),r.head.appendChild(u);break;default:throw Error(o(468,i))}u[Nt]=e,Ue(u),i=u}e.stateNode=i}else Ng(r,e.type,e.stateNode);else e.stateNode=Cg(r,i,e.memoizedProps);else u!==i?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,i===null?Ng(r,e.type,e.stateNode):Cg(r,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Au(e,e.memoizedProps,a.memoizedProps)}break;case 27:un(t,e),dn(e),i&512&&(Rt||a===null||Wn(a,a.return)),a!==null&&i&4&&Au(e,e.memoizedProps,a.memoizedProps);break;case 5:if(un(t,e),dn(e),i&512&&(Rt||a===null||Wn(a,a.return)),e.flags&32){r=e.stateNode;try{Ps(r,"")}catch(re){Qe(e,e.return,re)}}i&4&&e.stateNode!=null&&(r=e.memoizedProps,Au(e,r,a!==null?a.memoizedProps:r)),i&1024&&(Du=!0);break;case 6:if(un(t,e),dn(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(re){Qe(e,e.return,re)}}break;case 3:if(hr=null,r=Zn,Zn=dr(t.containerInfo),un(t,e),Zn=r,dn(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Si(t.containerInfo)}catch(re){Qe(e,e.return,re)}Du&&(Du=!1,Np(e));break;case 4:i=Zn,Zn=dr(e.stateNode.containerInfo),un(t,e),dn(e),Zn=i;break;case 12:un(t,e),dn(e);break;case 31:un(t,e),dn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Fo(e,i)));break;case 13:un(t,e),dn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Wo=ue()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Fo(e,i)));break;case 22:r=e.memoizedState!==null;var E=a!==null&&a.memoizedState!==null,B=Sa,I=Rt;if(Sa=B||r,Rt=I||E,un(t,e),Rt=I,Sa=B,dn(e),i&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||E||Sa||Rt||js(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){E=a=t;try{if(u=E.stateNode,r)g=u.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{x=E.stateNode;var Y=E.memoizedProps.style,L=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;x.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(re){Qe(E,E.return,re)}}}else if(t.tag===6){if(a===null){E=t;try{E.stateNode.nodeValue=r?"":E.memoizedProps}catch(re){Qe(E,E.return,re)}}}else if(t.tag===18){if(a===null){E=t;try{var z=E.stateNode;r?vg(z,!0):vg(E.stateNode,!1)}catch(re){Qe(E,E.return,re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,Fo(e,a))));break;case 19:un(t,e),dn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Fo(e,i)));break;case 30:break;case 21:break;default:un(t,e),dn(e)}}function dn(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(bp(i)){a=i;break}i=i.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var r=a.stateNode,u=Nu(e);Qo(e,u,r);break;case 5:var g=a.stateNode;a.flags&32&&(Ps(g,""),a.flags&=-33);var x=Nu(e);Qo(e,x,g);break;case 3:case 4:var E=a.stateNode.containerInfo,B=Nu(e);wu(e,B,E);break;default:throw Error(o(161))}}catch(I){Qe(e,e.return,I)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Np(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Np(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _a(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_p(e,t.alternate,t),t=t.sibling}function js(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qa(4,t,t.return),js(t);break;case 1:Wn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&vp(t,t.return,a),js(t);break;case 27:Cl(t.stateNode);case 26:case 5:Wn(t,t.return),js(t);break;case 22:t.memoizedState===null&&js(t);break;case 30:js(t);break;default:js(t)}e=e.sibling}}function Ta(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,r=e,u=t,g=u.flags;switch(u.tag){case 0:case 11:case 15:Ta(r,u,a),gl(4,u);break;case 1:if(Ta(r,u,a),i=u,r=i.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(B){Qe(i,i.return,B)}if(i=u,r=i.updateQueue,r!==null){var x=i.stateNode;try{var E=r.shared.hiddenCallbacks;if(E!==null)for(r.shared.hiddenCallbacks=null,r=0;r<E.length;r++)im(E[r],x)}catch(B){Qe(i,i.return,B)}}a&&g&64&&gp(u),vl(u,u.return);break;case 27:Sp(u);case 26:case 5:Ta(r,u,a),a&&i===null&&g&4&&yp(u),vl(u,u.return);break;case 12:Ta(r,u,a);break;case 31:Ta(r,u,a),a&&g&4&&jp(r,u);break;case 13:Ta(r,u,a),a&&g&4&&Cp(r,u);break;case 22:u.memoizedState===null&&Ta(r,u,a),vl(u,u.return);break;case 30:break;default:Ta(r,u,a)}t=t.sibling}}function ku(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&al(a))}function Ru(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&al(e))}function Xn(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wp(e,t,a,i),t=t.sibling}function wp(e,t,a,i){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Xn(e,t,a,i),r&2048&&gl(9,t);break;case 1:Xn(e,t,a,i);break;case 3:Xn(e,t,a,i),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&al(e)));break;case 12:if(r&2048){Xn(e,t,a,i),e=t.stateNode;try{var u=t.memoizedProps,g=u.id,x=u.onPostCommit;typeof x=="function"&&x(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){Qe(t,t.return,E)}}else Xn(e,t,a,i);break;case 31:Xn(e,t,a,i);break;case 13:Xn(e,t,a,i);break;case 23:break;case 22:u=t.stateNode,g=t.alternate,t.memoizedState!==null?u._visibility&2?Xn(e,t,a,i):yl(e,t):u._visibility&2?Xn(e,t,a,i):(u._visibility|=2,ci(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),r&2048&&ku(g,t);break;case 24:Xn(e,t,a,i),r&2048&&Ru(t.alternate,t);break;default:Xn(e,t,a,i)}}function ci(e,t,a,i,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,g=t,x=a,E=i,B=g.flags;switch(g.tag){case 0:case 11:case 15:ci(u,g,x,E,r),gl(8,g);break;case 23:break;case 22:var I=g.stateNode;g.memoizedState!==null?I._visibility&2?ci(u,g,x,E,r):yl(u,g):(I._visibility|=2,ci(u,g,x,E,r)),r&&B&2048&&ku(g.alternate,g);break;case 24:ci(u,g,x,E,r),r&&B&2048&&Ru(g.alternate,g);break;default:ci(u,g,x,E,r)}t=t.sibling}}function yl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,r=i.flags;switch(i.tag){case 22:yl(a,i),r&2048&&ku(i.alternate,i);break;case 24:yl(a,i),r&2048&&Ru(i.alternate,i);break;default:yl(a,i)}t=t.sibling}}var bl=8192;function ui(e,t,a){if(e.subtreeFlags&bl)for(e=e.child;e!==null;)Dp(e,t,a),e=e.sibling}function Dp(e,t,a){switch(e.tag){case 26:ui(e,t,a),e.flags&bl&&e.memoizedState!==null&&Qx(a,Zn,e.memoizedState,e.memoizedProps);break;case 5:ui(e,t,a);break;case 3:case 4:var i=Zn;Zn=dr(e.stateNode.containerInfo),ui(e,t,a),Zn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=bl,bl=16777216,ui(e,t,a),bl=i):ui(e,t,a));break;default:ui(e,t,a)}}function kp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Sl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];zt=i,Mp(i,e)}kp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rp(e),e=e.sibling}function Rp(e){switch(e.tag){case 0:case 11:case 15:Sl(e),e.flags&2048&&qa(9,e,e.return);break;case 3:Sl(e);break;case 12:Sl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Jo(e)):Sl(e);break;default:Sl(e)}}function Jo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];zt=i,Mp(i,e)}kp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qa(8,t,t.return),Jo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Jo(t));break;default:Jo(t)}e=e.sibling}}function Mp(e,t){for(;zt!==null;){var a=zt;switch(a.tag){case 0:case 11:case 15:qa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:al(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,zt=i;else e:for(a=e;zt!==null;){i=zt;var r=i.sibling,u=i.return;if(Tp(i),i===a){zt=null;break e}if(r!==null){r.return=u,zt=r;break e}zt=u}}}var dx={getCacheForType:function(e){var t=It(wt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return It(wt).controller.signal}},fx=typeof WeakMap=="function"?WeakMap:Map,Ye=0,tt=null,Be=null,ze=0,$e=0,bn=null,Ya=!1,di=!1,Mu=!1,Ea=0,yt=0,Ka=0,Cs=0,Ou=0,Sn=0,fi=0,xl=null,fn=null,Bu=!1,Wo=0,Op=0,er=1/0,tr=null,Za=null,Ot=0,Xa=null,hi=null,ja=0,Lu=0,Uu=null,Bp=null,_l=0,zu=null;function xn(){return(Ye&2)!==0&&ze!==0?ze&-ze:U.T!==null?qu():qi()}function Lp(){if(Sn===0)if((ze&536870912)===0||He){var e=ae;ae<<=1,(ae&3932160)===0&&(ae=262144),Sn=e}else Sn=536870912;return e=vn.current,e!==null&&(e.flags|=32),Sn}function hn(e,t,a){(e===tt&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(mi(e,0),$a(e,ze,Sn,!1)),Ra(e,a),((Ye&2)===0||e!==tt)&&(e===tt&&((Ye&2)===0&&(Cs|=a),yt===4&&$a(e,ze,Sn,!1)),ea(e))}function Up(e,t,a){if((Ye&6)!==0)throw Error(o(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||P(e,t),r=i?px(e,t):Hu(e,t,!0),u=i;do{if(r===0){di&&!i&&$a(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!hx(a)){r=Hu(e,t,!1),u=!1;continue}if(r===2){if(u=t,e.errorRecoveryDisabledLanes&u)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var x=e;r=xl;var E=x.current.memoizedState.isDehydrated;if(E&&(mi(x,g).flags|=256),g=Hu(x,g,!1),g!==2){if(Mu&&!E){x.errorRecoveryDisabledLanes|=u,Cs|=u,r=4;break e}u=fn,fn=r,u!==null&&(fn===null?fn=u:fn.push.apply(fn,u))}r=g}if(u=!1,r!==2)continue}}if(r===1){mi(e,0),$a(e,t,0,!0);break}e:{switch(i=e,u=r,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:$a(i,t,Sn,!Ya);break e;case 2:fn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=Wo+300-ue(),10<r)){if($a(i,t,Sn,!Ya),Te(i,0,!0)!==0)break e;ja=t,i.timeoutHandle=mg(zp.bind(null,i,a,fn,tr,Bu,t,Sn,Cs,fi,Ya,u,"Throttled",-0,0),r);break e}zp(i,a,fn,tr,Bu,t,Sn,Cs,fi,Ya,u,null,-0,0)}}break}while(!0);ea(e)}function zp(e,t,a,i,r,u,g,x,E,B,I,Y,L,z){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ua},Dp(t,u,Y);var re=(u&62914560)===u?Wo-ue():(u&4194048)===u?Op-ue():0;if(re=Fx(Y,re),re!==null){ja=u,e.cancelPendingCommit=re(Kp.bind(null,e,t,u,a,i,r,g,x,E,I,Y,null,L,z)),$a(e,u,g,!B);return}}Kp(e,t,u,a,i,r,g,x,E)}function hx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var r=a[i],u=r.getSnapshot;r=r.value;try{if(!pn(u(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function $a(e,t,a,i){t&=~Ou,t&=~Cs,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var r=t;0<r;){var u=31-ft(r),g=1<<u;i[u]=-1,r&=~g}a!==0&&Ii(e,a,t)}function nr(){return(Ye&6)===0?(Tl(0),!1):!0}function Vu(){if(Be!==null){if($e===0)var e=Be.return;else e=Be,ma=vs=null,tu(e),si=null,il=0,e=Be;for(;e!==null;)pp(e.alternate,e),e=e.return;Be=null}}function mi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Mx(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ja=0,Vu(),tt=e,Be=a=fa(e.current,null),ze=t,$e=0,bn=null,Ya=!1,di=P(e,t),Mu=!1,fi=Sn=Ou=Cs=Ka=yt=0,fn=xl=null,Bu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var r=31-ft(i),u=1<<r;t|=e[r],i&=~u}return Ea=t,To(),a}function Vp(e,t){Ne=null,U.H=hl,t===ai||t===ko?(t=tm(),$e=3):t===Pc?(t=tm(),$e=4):$e=t===vu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bn=t,Be===null&&(yt=1,Yo(e,wn(t,e.current)))}function Hp(){var e=vn.current;return e===null?!0:(ze&4194048)===ze?Mn===null:(ze&62914560)===ze||(ze&536870912)!==0?e===Mn:!1}function Ip(){var e=U.H;return U.H=hl,e===null?hl:e}function Gp(){var e=U.A;return U.A=dx,e}function ar(){yt=4,Ya||(ze&4194048)!==ze&&vn.current!==null||(di=!0),(Ka&134217727)===0&&(Cs&134217727)===0||tt===null||$a(tt,ze,Sn,!1)}function Hu(e,t,a){var i=Ye;Ye|=2;var r=Ip(),u=Gp();(tt!==e||ze!==t)&&(tr=null,mi(e,t)),t=!1;var g=yt;e:do try{if($e!==0&&Be!==null){var x=Be,E=bn;switch($e){case 8:Vu(),g=6;break e;case 3:case 2:case 9:case 6:vn.current===null&&(t=!0);var B=$e;if($e=0,bn=null,pi(e,x,E,B),a&&di){g=0;break e}break;default:B=$e,$e=0,bn=null,pi(e,x,E,B)}}mx(),g=yt;break}catch(I){Vp(e,I)}while(!0);return t&&e.shellSuspendCounter++,ma=vs=null,Ye=i,U.H=r,U.A=u,Be===null&&(tt=null,ze=0,To()),g}function mx(){for(;Be!==null;)Pp(Be)}function px(e,t){var a=Ye;Ye|=2;var i=Ip(),r=Gp();tt!==e||ze!==t?(tr=null,er=ue()+500,mi(e,t)):di=P(e,t);e:do try{if($e!==0&&Be!==null){t=Be;var u=bn;t:switch($e){case 1:$e=0,bn=null,pi(e,t,u,1);break;case 2:case 9:if(Wh(u)){$e=0,bn=null,qp(t);break}t=function(){$e!==2&&$e!==9||tt!==e||($e=7),ea(e)},u.then(t,t);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:Wh(u)?($e=0,bn=null,qp(t)):($e=0,bn=null,pi(e,t,u,7));break;case 5:var g=null;switch(Be.tag){case 26:g=Be.memoizedState;case 5:case 27:var x=Be;if(g?wg(g):x.stateNode.complete){$e=0,bn=null;var E=x.sibling;if(E!==null)Be=E;else{var B=x.return;B!==null?(Be=B,sr(B)):Be=null}break t}}$e=0,bn=null,pi(e,t,u,5);break;case 6:$e=0,bn=null,pi(e,t,u,6);break;case 8:Vu(),yt=6;break e;default:throw Error(o(462))}}gx();break}catch(I){Vp(e,I)}while(!0);return ma=vs=null,U.H=i,U.A=r,Ye=a,Be!==null?0:(tt=null,ze=0,To(),yt)}function gx(){for(;Be!==null&&!se();)Pp(Be)}function Pp(e){var t=hp(e.alternate,e,Ea);e.memoizedProps=e.pendingProps,t===null?sr(e):Be=t}function qp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=op(a,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=op(a,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:tu(t);default:pp(a,t),t=Be=Gh(t,Ea),t=hp(a,t,Ea)}e.memoizedProps=e.pendingProps,t===null?sr(e):Be=t}function pi(e,t,a,i){ma=vs=null,tu(t),si=null,il=0;var r=t.return;try{if(sx(e,r,t,a,ze)){yt=1,Yo(e,wn(a,e.current)),Be=null;return}}catch(u){if(r!==null)throw Be=r,u;yt=1,Yo(e,wn(a,e.current)),Be=null;return}t.flags&32768?(He||i===1?e=!0:di||(ze&536870912)!==0?e=!1:(Ya=e=!0,(i===2||i===9||i===3||i===6)&&(i=vn.current,i!==null&&i.tag===13&&(i.flags|=16384))),Yp(t,e)):sr(t)}function sr(e){var t=e;do{if((t.flags&32768)!==0){Yp(t,Ya);return}e=t.return;var a=ox(t.alternate,t,Ea);if(a!==null){Be=a;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);yt===0&&(yt=5)}function Yp(e,t){do{var a=rx(e.alternate,e);if(a!==null){a.flags&=32767,Be=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=a}while(e!==null);yt=6,Be=null}function Kp(e,t,a,i,r,u,g,x,E){e.cancelPendingCommit=null;do ir();while(Ot!==0);if((Ye&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=Nc,ro(e,a,u,g,x,E),e===tt&&(Be=tt=null,ze=0),hi=t,Xa=e,ja=a,Lu=u,Uu=r,Bp=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Sx(Re,function(){return Fp(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=U.T,U.T=null,r=X.p,X.p=2,g=Ye,Ye|=4;try{cx(e,t,a)}finally{Ye=g,X.p=r,U.T=i}}Ot=1,Zp(),Xp(),$p()}}function Zp(){if(Ot===1){Ot=0;var e=Xa,t=hi,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var i=X.p;X.p=2;var r=Ye;Ye|=4;try{Ap(t,e);var u=Ju,g=Mh(e.containerInfo),x=u.focusedElem,E=u.selectionRange;if(g!==x&&x&&x.ownerDocument&&Rh(x.ownerDocument.documentElement,x)){if(E!==null&&Tc(x)){var B=E.start,I=E.end;if(I===void 0&&(I=B),"selectionStart"in x)x.selectionStart=B,x.selectionEnd=Math.min(I,x.value.length);else{var Y=x.ownerDocument||document,L=Y&&Y.defaultView||window;if(L.getSelection){var z=L.getSelection(),re=x.textContent.length,ye=Math.min(E.start,re),et=E.end===void 0?ye:Math.min(E.end,re);!z.extend&&ye>et&&(g=et,et=ye,ye=g);var k=kh(x,ye),C=kh(x,et);if(k&&C&&(z.rangeCount!==1||z.anchorNode!==k.node||z.anchorOffset!==k.offset||z.focusNode!==C.node||z.focusOffset!==C.offset)){var O=Y.createRange();O.setStart(k.node,k.offset),z.removeAllRanges(),ye>et?(z.addRange(O),z.extend(C.node,C.offset)):(O.setEnd(C.node,C.offset),z.addRange(O))}}}}for(Y=[],z=x;z=z.parentNode;)z.nodeType===1&&Y.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<Y.length;x++){var q=Y[x];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}vr=!!Fu,Ju=Fu=null}finally{Ye=r,X.p=i,U.T=a}}e.current=t,Ot=2}}function Xp(){if(Ot===2){Ot=0;var e=Xa,t=hi,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var i=X.p;X.p=2;var r=Ye;Ye|=4;try{_p(e,t.alternate,t)}finally{Ye=r,X.p=i,U.T=a}}Ot=3}}function $p(){if(Ot===4||Ot===3){Ot=0,oe();var e=Xa,t=hi,a=ja,i=Bp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ot=5:(Ot=0,hi=Xa=null,Qp(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Za=null),Vs(a),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(at,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=U.T,r=X.p,X.p=2,U.T=null;try{for(var u=e.onRecoverableError,g=0;g<i.length;g++){var x=i[g];u(x.value,{componentStack:x.stack})}}finally{U.T=t,X.p=r}}(ja&3)!==0&&ir(),ea(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===zu?_l++:(_l=0,zu=e):_l=0,Tl(0)}}function Qp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,al(t)))}function ir(){return Zp(),Xp(),$p(),Fp()}function Fp(){if(Ot!==5)return!1;var e=Xa,t=Lu;Lu=0;var a=Vs(ja),i=U.T,r=X.p;try{X.p=32>a?32:a,U.T=null,a=Uu,Uu=null;var u=Xa,g=ja;if(Ot=0,hi=Xa=null,ja=0,(Ye&6)!==0)throw Error(o(331));var x=Ye;if(Ye|=4,Rp(u.current),wp(u,u.current,g,a),Ye=x,Tl(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(at,u)}catch{}return!0}finally{X.p=r,U.T=i,Qp(e,t)}}function Jp(e,t,a){t=wn(a,t),t=gu(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(Ra(e,2),ea(e))}function Qe(e,t,a){if(e.tag===3)Jp(e,e,a);else for(;t!==null;){if(t.tag===3){Jp(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Za===null||!Za.has(i))){e=wn(a,e),a=Wm(2),i=Ia(t,a,2),i!==null&&(ep(a,i,t,e),Ra(i,2),ea(i));break}}t=t.return}}function Iu(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new fx;var r=new Set;i.set(t,r)}else r=i.get(t),r===void 0&&(r=new Set,i.set(t,r));r.has(a)||(Mu=!0,r.add(a),e=vx.bind(null,e,t,a),t.then(e,e))}function vx(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,tt===e&&(ze&a)===a&&(yt===4||yt===3&&(ze&62914560)===ze&&300>ue()-Wo?(Ye&2)===0&&mi(e,0):Ou|=a,fi===ze&&(fi=0)),ea(e)}function Wp(e,t){t===0&&(t=on()),e=ms(e,t),e!==null&&(Ra(e,t),ea(e))}function yx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Wp(e,a)}function bx(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),Wp(e,a)}function Sx(e,t){return Pn(e,t)}var lr=null,gi=null,Gu=!1,or=!1,Pu=!1,Qa=0;function ea(e){e!==gi&&e.next===null&&(gi===null?lr=gi=e:gi=gi.next=e),or=!0,Gu||(Gu=!0,_x())}function Tl(e,t){if(!Pu&&or){Pu=!0;do for(var a=!1,i=lr;i!==null;){if(e!==0){var r=i.pendingLanes;if(r===0)var u=0;else{var g=i.suspendedLanes,x=i.pingedLanes;u=(1<<31-ft(42|e)+1)-1,u&=r&~(g&~x),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,ag(i,u))}else u=ze,u=Te(i,i===tt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(u&3)===0||P(i,u)||(a=!0,ag(i,u));i=i.next}while(a);Pu=!1}}function xx(){eg()}function eg(){or=Gu=!1;var e=0;Qa!==0&&Rx()&&(e=Qa);for(var t=ue(),a=null,i=lr;i!==null;){var r=i.next,u=tg(i,t);u===0?(i.next=null,a===null?lr=r:a.next=r,r===null&&(gi=a)):(a=i,(e!==0||(u&3)!==0)&&(or=!0)),i=r}Ot!==0&&Ot!==5||Tl(e),Qa!==0&&(Qa=0)}function tg(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var g=31-ft(u),x=1<<g,E=r[g];E===-1?((x&a)===0||(x&i)!==0)&&(r[g]=Fe(x,t)):E<=t&&(e.expiredLanes|=x),u&=~x}if(t=tt,a=ze,a=Te(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&($e===2||$e===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Z(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||P(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&Z(i),Vs(a)){case 2:case 8:a=Xe;break;case 32:a=Re;break;case 268435456:a=xt;break;default:a=Re}return i=ng.bind(null,e),a=Pn(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&Z(i),e.callbackPriority=2,e.callbackNode=null,2}function ng(e,t){if(Ot!==0&&Ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(ir()&&e.callbackNode!==a)return null;var i=ze;return i=Te(e,e===tt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Up(e,i,t),tg(e,ue()),e.callbackNode!=null&&e.callbackNode===a?ng.bind(null,e):null)}function ag(e,t){if(ir())return null;Up(e,t,!0)}function _x(){Ox(function(){(Ye&6)!==0?Pn(xe,xx):eg()})}function qu(){if(Qa===0){var e=ti;e===0&&(e=qn,qn<<=1,(qn&261888)===0&&(qn=256)),Qa=e}return Qa}function sg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:po(""+e)}function ig(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Tx(e,t,a,i,r){if(t==="submit"&&a&&a.stateNode===r){var u=sg((r[Vt]||null).action),g=i.submitter;g&&(t=(t=g[Vt]||null)?sg(t.formAction):g.getAttribute("formAction"),t!==null&&(u=t,g=null));var x=new bo("action","action",null,i,r);e.push({event:x,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Qa!==0){var E=g?ig(r,g):new FormData(r);uu(a,{pending:!0,data:E,method:r.method,action:u},null,E)}}else typeof u=="function"&&(x.preventDefault(),E=g?ig(r,g):new FormData(r),uu(a,{pending:!0,data:E,method:r.method,action:u},u,E))},currentTarget:r}]})}}for(var Yu=0;Yu<Ac.length;Yu++){var Ku=Ac[Yu],Ex=Ku.toLowerCase(),jx=Ku[0].toUpperCase()+Ku.slice(1);Kn(Ex,"on"+jx)}Kn(Lh,"onAnimationEnd"),Kn(Uh,"onAnimationIteration"),Kn(zh,"onAnimationStart"),Kn("dblclick","onDoubleClick"),Kn("focusin","onFocus"),Kn("focusout","onBlur"),Kn(IS,"onTransitionRun"),Kn(GS,"onTransitionStart"),Kn(PS,"onTransitionCancel"),Kn(Vh,"onTransitionEnd"),Is("onMouseEnter",["mouseout","mouseover"]),Is("onMouseLeave",["mouseout","mouseover"]),Is("onPointerEnter",["pointerout","pointerover"]),Is("onPointerLeave",["pointerout","pointerover"]),us("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),us("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),us("onBeforeInput",["compositionend","keypress","textInput","paste"]),us("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),us("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),us("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var El="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(" "),Cx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(El));function lg(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],r=i.event;i=i.listeners;e:{var u=void 0;if(t)for(var g=i.length-1;0<=g;g--){var x=i[g],E=x.instance,B=x.currentTarget;if(x=x.listener,E!==u&&r.isPropagationStopped())break e;u=x,r.currentTarget=B;try{u(r)}catch(I){_o(I)}r.currentTarget=null,u=E}else for(g=0;g<i.length;g++){if(x=i[g],E=x.instance,B=x.currentTarget,x=x.listener,E!==u&&r.isPropagationStopped())break e;u=x,r.currentTarget=B;try{u(r)}catch(I){_o(I)}r.currentTarget=null,u=E}}}}function Le(e,t){var a=t[Hs];a===void 0&&(a=t[Hs]=new Set);var i=e+"__bubble";a.has(i)||(og(t,e,2,!1),a.add(i))}function Zu(e,t,a){var i=0;t&&(i|=4),og(a,e,i,t)}var rr="_reactListening"+Math.random().toString(36).slice(2);function Xu(e){if(!e[rr]){e[rr]=!0,Ma.forEach(function(a){a!=="selectionchange"&&(Cx.has(a)||Zu(a,!1,e),Zu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[rr]||(t[rr]=!0,Zu("selectionchange",!1,t))}}function og(e,t,a,i){switch(Lg(t)){case 2:var r=e1;break;case 8:r=t1;break;default:r=cd}a=r.bind(null,t,a,e),r=void 0,!mc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),i?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function $u(e,t,a,i,r){var u=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var g=i.tag;if(g===3||g===4){var x=i.stateNode.containerInfo;if(x===r)break;if(g===4)for(g=i.return;g!==null;){var E=g.tag;if((E===3||E===4)&&g.stateNode.containerInfo===r)return;g=g.return}for(;x!==null;){if(g=ke(x),g===null)return;if(E=g.tag,E===5||E===6||E===26||E===27){i=u=g;continue e}x=x.parentNode}}i=i.return}fh(function(){var B=u,I=fc(a),Y=[];e:{var L=Hh.get(e);if(L!==void 0){var z=bo,re=e;switch(e){case"keypress":if(vo(a)===0)break e;case"keydown":case"keyup":z=bS;break;case"focusin":re="focus",z=yc;break;case"focusout":re="blur",z=yc;break;case"beforeblur":case"afterblur":z=yc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=ph;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=oS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=_S;break;case Lh:case Uh:case zh:z=uS;break;case Vh:z=ES;break;case"scroll":case"scrollend":z=iS;break;case"wheel":z=CS;break;case"copy":case"cut":case"paste":z=fS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=vh;break;case"toggle":case"beforetoggle":z=NS}var ye=(t&4)!==0,et=!ye&&(e==="scroll"||e==="scrollend"),k=ye?L!==null?L+"Capture":null:L;ye=[];for(var C=B,O;C!==null;){var q=C;if(O=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||O===null||k===null||(q=Ki(C,k),q!=null&&ye.push(jl(C,q,O))),et)break;C=C.return}0<ye.length&&(L=new z(L,re,null,a,I),Y.push({event:L,listeners:ye}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",L&&a!==dc&&(re=a.relatedTarget||a.fromElement)&&(ke(re)||re[ra]))break e;if((z||L)&&(L=I.window===I?I:(L=I.ownerDocument)?L.defaultView||L.parentWindow:window,z?(re=a.relatedTarget||a.toElement,z=B,re=re?ke(re):null,re!==null&&(et=d(re),ye=re.tag,re!==et||ye!==5&&ye!==27&&ye!==6)&&(re=null)):(z=null,re=B),z!==re)){if(ye=ph,q="onMouseLeave",k="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(ye=vh,q="onPointerLeave",k="onPointerEnter",C="pointer"),et=z==null?L:Zt(z),O=re==null?L:Zt(re),L=new ye(q,C+"leave",z,a,I),L.target=et,L.relatedTarget=O,q=null,ke(I)===B&&(ye=new ye(k,C+"enter",re,a,I),ye.target=O,ye.relatedTarget=et,q=ye),et=q,z&&re)t:{for(ye=Ax,k=z,C=re,O=0,q=k;q;q=ye(q))O++;q=0;for(var ve=C;ve;ve=ye(ve))q++;for(;0<O-q;)k=ye(k),O--;for(;0<q-O;)C=ye(C),q--;for(;O--;){if(k===C||C!==null&&k===C.alternate){ye=k;break t}k=ye(k),C=ye(C)}ye=null}else ye=null;z!==null&&rg(Y,L,z,ye,!1),re!==null&&et!==null&&rg(Y,et,re,ye,!0)}}e:{if(L=B?Zt(B):window,z=L.nodeName&&L.nodeName.toLowerCase(),z==="select"||z==="input"&&L.type==="file")var Pe=jh;else if(Th(L))if(Ch)Pe=zS;else{Pe=LS;var me=BS}else z=L.nodeName,!z||z.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?B&&uc(B.elementType)&&(Pe=jh):Pe=US;if(Pe&&(Pe=Pe(e,B))){Eh(Y,Pe,a,I);break e}me&&me(e,L,B),e==="focusout"&&B&&L.type==="number"&&B.memoizedProps.value!=null&&cc(L,"number",L.value)}switch(me=B?Zt(B):window,e){case"focusin":(Th(me)||me.contentEditable==="true")&&(Zs=me,Ec=B,el=null);break;case"focusout":el=Ec=Zs=null;break;case"mousedown":jc=!0;break;case"contextmenu":case"mouseup":case"dragend":jc=!1,Oh(Y,a,I);break;case"selectionchange":if(HS)break;case"keydown":case"keyup":Oh(Y,a,I)}var De;if(Sc)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else Ks?xh(e,a)&&(Ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ve="onCompositionStart");Ve&&(yh&&a.locale!=="ko"&&(Ks||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Ks&&(De=hh()):(Oa=I,pc="value"in Oa?Oa.value:Oa.textContent,Ks=!0)),me=cr(B,Ve),0<me.length&&(Ve=new gh(Ve,e,null,a,I),Y.push({event:Ve,listeners:me}),De?Ve.data=De:(De=_h(a),De!==null&&(Ve.data=De)))),(De=DS?kS(e,a):RS(e,a))&&(Ve=cr(B,"onBeforeInput"),0<Ve.length&&(me=new gh("onBeforeInput","beforeinput",null,a,I),Y.push({event:me,listeners:Ve}),me.data=De)),Tx(Y,e,B,a,I)}lg(Y,t)})}function jl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function cr(e,t){for(var a=t+"Capture",i=[];e!==null;){var r=e,u=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||u===null||(r=Ki(e,a),r!=null&&i.unshift(jl(e,r,u)),r=Ki(e,t),r!=null&&i.push(jl(e,r,u))),e.tag===3)return i;e=e.return}return[]}function Ax(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rg(e,t,a,i,r){for(var u=t._reactName,g=[];a!==null&&a!==i;){var x=a,E=x.alternate,B=x.stateNode;if(x=x.tag,E!==null&&E===i)break;x!==5&&x!==26&&x!==27||B===null||(E=B,r?(B=Ki(a,u),B!=null&&g.unshift(jl(a,B,E))):r||(B=Ki(a,u),B!=null&&g.push(jl(a,B,E)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var Nx=/\r\n?/g,wx=/\u0000|\uFFFD/g;function cg(e){return(typeof e=="string"?e:""+e).replace(Nx,`
|
|
25
|
-
`).replace(wx,"")}function ug(e,t){return t=cg(t),cg(e)===t}function We(e,t,a,i,r,u){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Ps(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Ps(e,""+i);break;case"className":ho(e,"class",i);break;case"tabIndex":ho(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":ho(e,a,i);break;case"style":uh(e,i,u);break;case"data":if(t!=="object"){ho(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=po(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"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 u=="function"&&(a==="formAction"?(t!=="input"&&We(e,t,"name",r.name,r,null),We(e,t,"formEncType",r.formEncType,r,null),We(e,t,"formMethod",r.formMethod,r,null),We(e,t,"formTarget",r.formTarget,r,null)):(We(e,t,"encType",r.encType,r,null),We(e,t,"method",r.method,r,null),We(e,t,"target",r.target,r,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=po(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=ua);break;case"onScroll":i!=null&&Le("scroll",e);break;case"onScrollEnd":i!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=po(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):e.removeAttribute(a);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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Le("beforetoggle",e),Le("toggle",e),fo(e,"popover",i);break;case"xlinkActuate":ca(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":ca(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":ca(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":ca(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":ca(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":ca(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":ca(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":ca(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":ca(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":fo(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=aS.get(a)||a,fo(e,a,i))}}function Qu(e,t,a,i,r,u){switch(a){case"style":uh(e,i,u);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof i=="string"?Ps(e,i):(typeof i=="number"||typeof i=="bigint")&&Ps(e,""+i);break;case"onScroll":i!=null&&Le("scroll",e);break;case"onScrollEnd":i!=null&&Le("scrollend",e);break;case"onClick":i!=null&&(e.onclick=ua);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!th.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),u=e[Vt]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,r),typeof i=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,r);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):fo(e,a,i)}}}function Pt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var i=!1,r=!1,u;for(u in a)if(a.hasOwnProperty(u)){var g=a[u];if(g!=null)switch(u){case"src":i=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:We(e,t,u,g,a,null)}}r&&We(e,t,"srcSet",a.srcSet,a,null),i&&We(e,t,"src",a.src,a,null);return;case"input":Le("invalid",e);var x=u=g=r=null,E=null,B=null;for(i in a)if(a.hasOwnProperty(i)){var I=a[i];if(I!=null)switch(i){case"name":r=I;break;case"type":g=I;break;case"checked":E=I;break;case"defaultChecked":B=I;break;case"value":u=I;break;case"defaultValue":x=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(137,t));break;default:We(e,t,i,I,a,null)}}lh(e,u,x,E,B,g,r,!1);return;case"select":Le("invalid",e),i=g=u=null;for(r in a)if(a.hasOwnProperty(r)&&(x=a[r],x!=null))switch(r){case"value":u=x;break;case"defaultValue":g=x;break;case"multiple":i=x;default:We(e,t,r,x,a,null)}t=u,a=g,e.multiple=!!i,t!=null?Gs(e,!!i,t,!1):a!=null&&Gs(e,!!i,a,!0);return;case"textarea":Le("invalid",e),u=r=i=null;for(g in a)if(a.hasOwnProperty(g)&&(x=a[g],x!=null))switch(g){case"value":i=x;break;case"defaultValue":r=x;break;case"children":u=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:We(e,t,g,x,a,null)}rh(e,i,r,u);return;case"option":for(E in a)if(a.hasOwnProperty(E)&&(i=a[E],i!=null))switch(E){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:We(e,t,E,i,a,null)}return;case"dialog":Le("beforetoggle",e),Le("toggle",e),Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(i=0;i<El.length;i++)Le(El[i],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("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 a)if(a.hasOwnProperty(B)&&(i=a[B],i!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:We(e,t,B,i,a,null)}return;default:if(uc(t)){for(I in a)a.hasOwnProperty(I)&&(i=a[I],i!==void 0&&Qu(e,t,I,i,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(i=a[x],i!=null&&We(e,t,x,i,a,null))}function Dx(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,u=null,g=null,x=null,E=null,B=null,I=null;for(z in a){var Y=a[z];if(a.hasOwnProperty(z)&&Y!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":E=Y;default:i.hasOwnProperty(z)||We(e,t,z,null,i,Y)}}for(var L in i){var z=i[L];if(Y=a[L],i.hasOwnProperty(L)&&(z!=null||Y!=null))switch(L){case"type":u=z;break;case"name":r=z;break;case"checked":B=z;break;case"defaultChecked":I=z;break;case"value":g=z;break;case"defaultValue":x=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:z!==Y&&We(e,t,L,z,i,Y)}}rc(e,g,x,E,B,I,u,r);return;case"select":z=g=x=L=null;for(u in a)if(E=a[u],a.hasOwnProperty(u)&&E!=null)switch(u){case"value":break;case"multiple":z=E;default:i.hasOwnProperty(u)||We(e,t,u,null,i,E)}for(r in i)if(u=i[r],E=a[r],i.hasOwnProperty(r)&&(u!=null||E!=null))switch(r){case"value":L=u;break;case"defaultValue":x=u;break;case"multiple":g=u;default:u!==E&&We(e,t,r,u,i,E)}t=x,a=g,i=z,L!=null?Gs(e,!!a,L,!1):!!i!=!!a&&(t!=null?Gs(e,!!a,t,!0):Gs(e,!!a,a?[]:"",!1));return;case"textarea":z=L=null;for(x in a)if(r=a[x],a.hasOwnProperty(x)&&r!=null&&!i.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:We(e,t,x,null,i,r)}for(g in i)if(r=i[g],u=a[g],i.hasOwnProperty(g)&&(r!=null||u!=null))switch(g){case"value":L=r;break;case"defaultValue":z=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==u&&We(e,t,g,r,i,u)}oh(e,L,z);return;case"option":for(var re in a)if(L=a[re],a.hasOwnProperty(re)&&L!=null&&!i.hasOwnProperty(re))switch(re){case"selected":e.selected=!1;break;default:We(e,t,re,null,i,L)}for(E in i)if(L=i[E],z=a[E],i.hasOwnProperty(E)&&L!==z&&(L!=null||z!=null))switch(E){case"selected":e.selected=L&&typeof L!="function"&&typeof L!="symbol";break;default:We(e,t,E,L,i,z)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ye in a)L=a[ye],a.hasOwnProperty(ye)&&L!=null&&!i.hasOwnProperty(ye)&&We(e,t,ye,null,i,L);for(B in i)if(L=i[B],z=a[B],i.hasOwnProperty(B)&&L!==z&&(L!=null||z!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,t));break;default:We(e,t,B,L,i,z)}return;default:if(uc(t)){for(var et in a)L=a[et],a.hasOwnProperty(et)&&L!==void 0&&!i.hasOwnProperty(et)&&Qu(e,t,et,void 0,i,L);for(I in i)L=i[I],z=a[I],!i.hasOwnProperty(I)||L===z||L===void 0&&z===void 0||Qu(e,t,I,L,i,z);return}}for(var k in a)L=a[k],a.hasOwnProperty(k)&&L!=null&&!i.hasOwnProperty(k)&&We(e,t,k,null,i,L);for(Y in i)L=i[Y],z=a[Y],!i.hasOwnProperty(Y)||L===z||L==null&&z==null||We(e,t,Y,L,i,z)}function dg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var r=a[i],u=r.transferSize,g=r.initiatorType,x=r.duration;if(u&&x&&dg(g)){for(g=0,x=r.responseEnd,i+=1;i<a.length;i++){var E=a[i],B=E.startTime;if(B>x)break;var I=E.transferSize,Y=E.initiatorType;I&&dg(Y)&&(E=E.responseEnd,g+=I*(E<x?1:(x-B)/(E-B)))}if(--i,t+=8*(u+g)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Fu=null,Ju=null;function ur(e){return e.nodeType===9?e:e.ownerDocument}function fg(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 hg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Wu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ed=null;function Rx(){var e=window.event;return e&&e.type==="popstate"?e===ed?!1:(ed=e,!0):(ed=null,!1)}var mg=typeof setTimeout=="function"?setTimeout:void 0,Mx=typeof clearTimeout=="function"?clearTimeout:void 0,pg=typeof Promise=="function"?Promise:void 0,Ox=typeof queueMicrotask=="function"?queueMicrotask:typeof pg<"u"?function(e){return pg.resolve(null).then(e).catch(Bx)}:mg;function Bx(e){setTimeout(function(){throw e})}function Fa(e){return e==="head"}function gg(e,t){var a=t,i=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(r),Si(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")Cl(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Cl(a);for(var u=a.firstChild;u;){var g=u.nextSibling,x=u.nodeName;u[Oe]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=g}}else a==="body"&&Cl(e.ownerDocument.body);a=r}while(a);Si(t)}function vg(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function td(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":td(a),Me(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Lx(e,t,a,i){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Oe])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=On(e.nextSibling),e===null)break}return null}function Ux(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=On(e.nextSibling),e===null))return null;return e}function yg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=On(e.nextSibling),e===null))return null;return e}function nd(e){return e.data==="$?"||e.data==="$~"}function ad(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function zx(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function On(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var sd=null;function bg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return On(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Sg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function xg(e,t,a){switch(t=ur(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Cl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Me(e)}var Bn=new Map,_g=new Set;function dr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ca=X.d;X.d={f:Vx,r:Hx,D:Ix,C:Gx,L:Px,m:qx,X:Kx,S:Yx,M:Zx};function Vx(){var e=Ca.f(),t=nr();return e||t}function Hx(e){var t=Kt(e);t!==null&&t.tag===5&&t.type==="form"?Vm(t):Ca.r(e)}var vi=typeof document>"u"?null:document;function Tg(e,t,a){var i=vi;if(i&&typeof t=="string"&&t){var r=An(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),_g.has(r)||(_g.add(r),e={rel:e,crossOrigin:a,href:t},i.querySelector(r)===null&&(t=i.createElement("link"),Pt(t,"link",e),Ue(t),i.head.appendChild(t)))}}function Ix(e){Ca.D(e),Tg("dns-prefetch",e,null)}function Gx(e,t){Ca.C(e,t),Tg("preconnect",e,t)}function Px(e,t,a){Ca.L(e,t,a);var i=vi;if(i&&e&&t){var r='link[rel="preload"][as="'+An(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+An(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+An(a.imageSizes)+'"]')):r+='[href="'+An(e)+'"]';var u=r;switch(t){case"style":u=yi(e);break;case"script":u=bi(e)}Bn.has(u)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Bn.set(u,e),i.querySelector(r)!==null||t==="style"&&i.querySelector(Al(u))||t==="script"&&i.querySelector(Nl(u))||(t=i.createElement("link"),Pt(t,"link",e),Ue(t),i.head.appendChild(t)))}}function qx(e,t){Ca.m(e,t);var a=vi;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+An(i)+'"][href="'+An(e)+'"]',u=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=bi(e)}if(!Bn.has(u)&&(e=b({rel:"modulepreload",href:e},t),Bn.set(u,e),a.querySelector(r)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Nl(u)))return}i=a.createElement("link"),Pt(i,"link",e),Ue(i),a.head.appendChild(i)}}}function Yx(e,t,a){Ca.S(e,t,a);var i=vi;if(i&&e){var r=rt(i).hoistableStyles,u=yi(e);t=t||"default";var g=r.get(u);if(!g){var x={loading:0,preload:null};if(g=i.querySelector(Al(u)))x.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Bn.get(u))&&id(e,a);var E=g=i.createElement("link");Ue(E),Pt(E,"link",e),E._p=new Promise(function(B,I){E.onload=B,E.onerror=I}),E.addEventListener("load",function(){x.loading|=1}),E.addEventListener("error",function(){x.loading|=2}),x.loading|=4,fr(g,t,i)}g={type:"stylesheet",instance:g,count:1,state:x},r.set(u,g)}}}function Kx(e,t){Ca.X(e,t);var a=vi;if(a&&e){var i=rt(a).hoistableScripts,r=bi(e),u=i.get(r);u||(u=a.querySelector(Nl(r)),u||(e=b({src:e,async:!0},t),(t=Bn.get(r))&&ld(e,t),u=a.createElement("script"),Ue(u),Pt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(r,u))}}function Zx(e,t){Ca.M(e,t);var a=vi;if(a&&e){var i=rt(a).hoistableScripts,r=bi(e),u=i.get(r);u||(u=a.querySelector(Nl(r)),u||(e=b({src:e,async:!0,type:"module"},t),(t=Bn.get(r))&&ld(e,t),u=a.createElement("script"),Ue(u),Pt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(r,u))}}function Eg(e,t,a,i){var r=(r=ce.current)?dr(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=yi(a.href),a=rt(r).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=yi(a.href);var u=rt(r).hoistableStyles,g=u.get(e);if(g||(r=r.ownerDocument||r,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,g),(u=r.querySelector(Al(e)))&&!u._p&&(g.instance=u,g.state.loading=5),Bn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Bn.set(e,a),u||Xx(r,e,a,g.state))),t&&i===null)throw Error(o(528,""));return g}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=bi(a),a=rt(r).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function yi(e){return'href="'+An(e)+'"'}function Al(e){return'link[rel="stylesheet"]['+e+"]"}function jg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Xx(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Pt(t,"link",a),Ue(t),e.head.appendChild(t))}function bi(e){return'[src="'+An(e)+'"]'}function Nl(e){return"script[async]"+e}function Cg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+An(a.href)+'"]');if(i)return t.instance=i,Ue(i),i;var r=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ue(i),Pt(i,"style",r),fr(i,a.precedence,e),t.instance=i;case"stylesheet":r=yi(a.href);var u=e.querySelector(Al(r));if(u)return t.state.loading|=4,t.instance=u,Ue(u),u;i=jg(a),(r=Bn.get(r))&&id(i,r),u=(e.ownerDocument||e).createElement("link"),Ue(u);var g=u;return g._p=new Promise(function(x,E){g.onload=x,g.onerror=E}),Pt(u,"link",i),t.state.loading|=4,fr(u,a.precedence,e),t.instance=u;case"script":return u=bi(a.src),(r=e.querySelector(Nl(u)))?(t.instance=r,Ue(r),r):(i=a,(r=Bn.get(u))&&(i=b({},a),ld(i,r)),e=e.ownerDocument||e,r=e.createElement("script"),Ue(r),Pt(r,"link",i),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,fr(i,a.precedence,e));return t.instance}function fr(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,u=r,g=0;g<i.length;g++){var x=i[g];if(x.dataset.precedence===t)u=x;else if(u!==r)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function id(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ld(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hr=null;function Ag(e,t,a){if(hr===null){var i=new Map,r=hr=new Map;r.set(a,i)}else r=hr,i=r.get(a),i||(i=new Map,r.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var u=a[r];if(!(u[Oe]||u[Nt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var g=u.getAttribute(t)||"";g=e+g;var x=i.get(g);x?x.push(u):i.set(g,[u])}}return i}function Ng(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function $x(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function wg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Qx(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=yi(i.href),u=t.querySelector(Al(r));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=mr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,Ue(u);return}u=t.ownerDocument||t,i=jg(i),(r=Bn.get(r))&&id(i,r),u=u.createElement("link"),Ue(u);var g=u;g._p=new Promise(function(x,E){g.onload=x,g.onerror=E}),Pt(u,"link",i),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=mr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var od=0;function Fx(e,t){return e.stylesheets&&e.count===0&&gr(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&gr(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&od===0&&(od=62500*kx());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&gr(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>od?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(r)}}:null}function mr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pr=null;function gr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pr=new Map,t.forEach(Jx,e),pr=null,mr.call(e))}function Jx(e,t){if(!(t.state.loading&4)){var a=pr.get(e);if(a)var i=a.get(null);else{a=new Map,pr.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<r.length;u++){var g=r[u];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),i=g)}i&&a.set(null,i)}r=t.instance,g=r.getAttribute("data-precedence"),u=a.get(g)||i,u===i&&a.set(null,r),a.set(g,r),this.count++,i=mr.bind(this),r.addEventListener("load",i),r.addEventListener("error",i),u?u.parentNode.insertBefore(r,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var wl={$$typeof:M,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Wx(e,t,a,i,r,u,g,x,E){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=Us(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Us(0),this.hiddenUpdates=Us(null),this.identifierPrefix=i,this.onUncaughtError=r,this.onCaughtError=u,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Dg(e,t,a,i,r,u,g,x,E,B,I,Y){return e=new Wx(e,t,a,g,E,B,I,Y,x),t=1,u===!0&&(t|=24),u=gn(3,null,null,t),e.current=u,u.stateNode=e,t=Hc(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:i,isDehydrated:a,cache:t},qc(u),e}function kg(e){return e?(e=Qs,e):Qs}function Rg(e,t,a,i,r,u){r=kg(r),i.context===null?i.context=r:i.pendingContext=r,i=Ha(t),i.payload={element:a},u=u===void 0?null:u,u!==null&&(i.callback=u),a=Ia(e,i,t),a!==null&&(hn(a,e,t),ol(a,e,t))}function Mg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function rd(e,t){Mg(e,t),(e=e.alternate)&&Mg(e,t)}function Og(e){if(e.tag===13||e.tag===31){var t=ms(e,67108864);t!==null&&hn(t,e,67108864),rd(e,67108864)}}function Bg(e){if(e.tag===13||e.tag===31){var t=xn();t=zs(t);var a=ms(e,t);a!==null&&hn(a,e,t),rd(e,t)}}var vr=!0;function e1(e,t,a,i){var r=U.T;U.T=null;var u=X.p;try{X.p=2,cd(e,t,a,i)}finally{X.p=u,U.T=r}}function t1(e,t,a,i){var r=U.T;U.T=null;var u=X.p;try{X.p=8,cd(e,t,a,i)}finally{X.p=u,U.T=r}}function cd(e,t,a,i){if(vr){var r=ud(i);if(r===null)$u(e,t,i,yr,a),Ug(e,i);else if(a1(r,e,t,a,i))i.stopPropagation();else if(Ug(e,i),t&4&&-1<n1.indexOf(e)){for(;r!==null;){var u=Kt(r);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var g=le(u.pendingLanes);if(g!==0){var x=u;for(x.pendingLanes|=2,x.entangledLanes|=2;g;){var E=1<<31-ft(g);x.entanglements[1]|=E,g&=~E}ea(u),(Ye&6)===0&&(er=ue()+500,Tl(0))}}break;case 31:case 13:x=ms(u,2),x!==null&&hn(x,u,2),nr(),rd(u,2)}if(u=ud(i),u===null&&$u(e,t,i,yr,a),u===r)break;r=u}r!==null&&i.stopPropagation()}else $u(e,t,i,null,a)}}function ud(e){return e=fc(e),dd(e)}var yr=null;function dd(e){if(yr=null,e=ke(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=f(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yr=e,null}function Lg(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(Se()){case xe:return 2;case Xe:return 8;case Re:case nt:return 32;case xt:return 268435456;default:return 32}default:return 32}}var fd=!1,Ja=null,Wa=null,es=null,Dl=new Map,kl=new Map,ts=[],n1="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 Ug(e,t){switch(e){case"focusin":case"focusout":Ja=null;break;case"dragenter":case"dragleave":Wa=null;break;case"mouseover":case"mouseout":es=null;break;case"pointerover":case"pointerout":Dl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function Rl(e,t,a,i,r,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:u,targetContainers:[r]},t!==null&&(t=Kt(t),t!==null&&Og(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function a1(e,t,a,i,r){switch(t){case"focusin":return Ja=Rl(Ja,e,t,a,i,r),!0;case"dragenter":return Wa=Rl(Wa,e,t,a,i,r),!0;case"mouseover":return es=Rl(es,e,t,a,i,r),!0;case"pointerover":var u=r.pointerId;return Dl.set(u,Rl(Dl.get(u)||null,e,t,a,i,r)),!0;case"gotpointercapture":return u=r.pointerId,kl.set(u,Rl(kl.get(u)||null,e,t,a,i,r)),!0}return!1}function zg(e){var t=ke(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=f(a),t!==null){e.blockedOn=t,Yi(e.priority,function(){Bg(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,Yi(e.priority,function(){Bg(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function br(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ud(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);dc=i,a.target.dispatchEvent(i),dc=null}else return t=Kt(a),t!==null&&Og(t),e.blockedOn=a,!1;t.shift()}return!0}function Vg(e,t,a){br(e)&&a.delete(t)}function s1(){fd=!1,Ja!==null&&br(Ja)&&(Ja=null),Wa!==null&&br(Wa)&&(Wa=null),es!==null&&br(es)&&(es=null),Dl.forEach(Vg),kl.forEach(Vg)}function Sr(e,t){e.blockedOn===t&&(e.blockedOn=null,fd||(fd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,s1)))}var xr=null;function Hg(e){xr!==e&&(xr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){xr===e&&(xr=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],r=e[t+2];if(typeof i!="function"){if(dd(i||a)===null)continue;break}var u=Kt(a);u!==null&&(e.splice(t,3),t-=3,uu(u,{pending:!0,data:r,method:a.method,action:i},i,r))}}))}function Si(e){function t(E){return Sr(E,e)}Ja!==null&&Sr(Ja,e),Wa!==null&&Sr(Wa,e),es!==null&&Sr(es,e),Dl.forEach(t),kl.forEach(t);for(var a=0;a<ts.length;a++){var i=ts[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<ts.length&&(a=ts[0],a.blockedOn===null);)zg(a),a.blockedOn===null&&ts.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var r=a[i],u=a[i+1],g=r[Vt]||null;if(typeof u=="function")g||Hg(a);else if(g){var x=null;if(u&&u.hasAttribute("formAction")){if(r=u,g=u[Vt]||null)x=g.formAction;else if(dd(r)!==null)continue}else x=g.action;typeof x=="function"?a[i+1]=x:(a.splice(i,3),i-=3),Hg(a)}}}function Ig(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(g){return r=g})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function hd(e){this._internalRoot=e}_r.prototype.render=hd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,i=xn();Rg(a,i,e,t,null,null)},_r.prototype.unmount=hd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rg(e.current,2,null,e,null,null),nr(),t[ra]=null}};function _r(e){this._internalRoot=e}_r.prototype.unstable_scheduleHydration=function(e){if(e){var t=qi();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ts.length&&t!==0&&t<ts[a].priority;a++);ts.splice(a,0,e),a===0&&zg(e)}};var Gg=s.version;if(Gg!=="19.2.4")throw Error(o(527,Gg,"19.2.4"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=v(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var i1={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tr.isDisabled&&Tr.supportsFiber)try{at=Tr.inject(i1),gt=Tr}catch{}}return Ml.createRoot=function(e,t){if(!c(e))throw Error(o(299));var a=!1,i="",r=$m,u=Qm,g=Fm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=Dg(e,1,!1,null,null,a,i,null,r,u,g,Ig),e[ra]=t.current,Xu(e),new hd(t)},Ml.hydrateRoot=function(e,t,a){if(!c(e))throw Error(o(299));var i=!1,r="",u=$m,g=Qm,x=Fm,E=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(E=a.formState)),t=Dg(e,1,!0,t,a??null,i,r,E,u,g,x,Ig),t.context=kg(null),a=t.current,i=xn(),i=zs(i),r=Ha(i),r.callback=null,Ia(a,r,i),a=i,t.current.lanes=a,Ra(t,a),ea(t),e[ra]=t.current,Xu(e),new _r(t)},Ml.version="19.2.4",Ml}var $g;function x1(){if($g)return md.exports;$g=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),md.exports=S1(),md.exports}var _1=x1();function Qt(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Il(n,s){return console.warn(`[ws] Malformed "${n}" message: ${s}`),!1}function T1(n){return Qt(n)&&typeof n.id=="string"&&typeof n.displayName=="string"&&typeof n.adapterType=="string"&&typeof n.defaultRuntime=="string"&&typeof n.status=="string"&&typeof n.bootstrapped=="boolean"}function Qg(n){return Qt(n)&&typeof n.id=="string"&&typeof n.environmentId=="string"&&typeof n.runtime=="string"&&typeof n.status=="string"&&typeof n.prompt=="string"&&typeof n.startedAt=="string"&&(n.endedAt===void 0||typeof n.endedAt=="string")&&(n.error===void 0||typeof n.error=="string")}function Fg(n){return Qt(n)&&typeof n.sessionId=="string"&&typeof n.eventType=="string"&&typeof n.timestamp=="string"&&typeof n.content=="string"&&(n.raw===void 0||typeof n.raw=="string")}function E1(n){return Qt(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.repoUrl=="string"&&typeof n.defaultEnvironmentId=="string"&&typeof n.status=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function j1(n){return Qt(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.title=="string"&&typeof n.status=="string"&&typeof n.branch=="string"&&typeof n.sortOrder=="number"&&typeof n.depth=="number"&&Array.isArray(n.dependsOn)&&Array.isArray(n.childTaskIds)}function C1(n){return Qt(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.taskId=="string"&&typeof n.sessionId=="string"&&typeof n.category=="string"&&typeof n.title=="string"&&typeof n.content=="string"&&Array.isArray(n.tags)&&typeof n.createdAt=="string"}function A1(n){return Qt(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const N1=new Set(["off","subscription","api_key"]),vd=new Set(["off","on"]);function w1(n){return Qt(n)&&N1.has(n.claude)&&vd.has(n.github)&&vd.has(n.copilot)&&vd.has(n.codex)}function D1(n){return Qt(n)&&typeof n.environmentId=="string"&&typeof n.stage=="string"&&typeof n.message=="string"&&typeof n.progress=="number"}function k1(n){return Qt(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function R1(n){return Qt(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.systemPrompt=="string"&&typeof n.toolConfig=="string"&&typeof n.runtime=="string"&&typeof n.model=="string"&&typeof n.maxTurns=="number"&&typeof n.mcpServers=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function ta(n,s,l,o){return Array.isArray(n)?n.filter((c,d)=>s(c)?!0:(Il(l,`item at index ${d} in "${o}" has unexpected shape`),!1)):(Il(l,`expected "${o}" to be an array, got ${typeof n}`),[])}function M1(n){let s;try{s=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!Qt(s)||typeof s.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",s);return}return{type:s.type,payload:Qt(s.payload)?s.payload:void 0}}function O1(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const B1=3e3,xi=5e3;function L1(n){const s=typeof window<"u"&&window.__GRACKLE_API_KEY__||"",l=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}?token=${encodeURIComponent(s)}`:"ws://localhost:3000",o=S.useRef(void 0),[c,d]=S.useState(!1),[f,m]=S.useState([]),[p,v]=S.useState([]),[y,b]=S.useState([]),[_,T]=S.useState(0),[N,D]=S.useState(void 0),[w,j]=S.useState([]),[V,M]=S.useState([]),[$,H]=S.useState([]),[J,te]=S.useState([]),[K,W]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[he,R]=S.useState({}),[ge,ne]=S.useState([]),[je,G]=S.useState(""),[U,X]=S.useState(""),[ee,Ae]=S.useState(!1),[Ee,Ge]=S.useState([]),[we,_e]=S.useState({}),[Ce,Q]=S.useState(!1),[ce,Ie]=S.useState(void 0),F=S.useCallback(ae=>{var pe;((pe=o.current)==null?void 0:pe.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(ae))},[]);S.useEffect(()=>{let ae,pe;function le(){ae=new WebSocket(l),o.current=ae,ae.onopen=()=>{d(!0),F({type:"list_environments"}),F({type:"list_sessions"}),F({type:"list_projects"}),F({type:"list_tokens"}),F({type:"get_credential_providers"}),F({type:"list_personas"}),F({type:"subscribe_all"})},ae.onmessage=Te=>{var Fe,on,Us,Ra,ro,Ii,Gi,Pi,zs,Vs,qi,Yi,Yn,Nt,Vt,ra,Hs,co,uo;if(typeof Te.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const P=M1(Te.data);if(P)switch(P.type){case"environments":m(ta((Fe=P.payload)==null?void 0:Fe.environments,T1,"environments","environments"));break;case"sessions":v(ie=>{var Zt;const Oe=ta((Zt=P.payload)==null?void 0:Zt.sessions,Qg,"sessions","sessions"),Me=new Map(ie.map(rt=>[rt.id,rt.status])),ke=new Set(["pending","running","idle"]),Kt=new Set(["completed","failed","interrupted"]);return Oe.map(rt=>{const Ue=Me.get(rt.id);if(!Ue||Ue===rt.status)return rt;if(Kt.has(Ue)&&ke.has(rt.status))return{...rt,status:Ue};if(ke.has(Ue)&&ke.has(rt.status)){const Ma=["pending","running","idle"];if(Ma.indexOf(Ue)>Ma.indexOf(rt.status))return{...rt,status:Ue}}return rt})});break;case"session_event":{if(!Fg(P.payload)){Il("session_event","payload is not a valid SessionEvent");break}const ie=P.payload;let Oe=0;if(b(Me=>{const ke=[...Me,ie];return ke.length>xi?(Oe=ke.length-xi,ke.slice(-xi)):ke}),Oe>0&&T(Me=>Me+Oe),ie.eventType==="status"){const Me=O1(ie.content);v(ke=>ke.some(Zt=>Zt.id===ie.sessionId)?ke.map(Zt=>Zt.id===ie.sessionId?{...Zt,status:Me}:Zt):[...ke,{id:ie.sessionId,environmentId:"",runtime:"",status:Me,prompt:"",startedAt:ie.timestamp}])}break}case"session_events":{const ie=ta((on=P.payload)==null?void 0:on.events,Fg,"session_events","events"),Oe=(Us=P.payload)==null?void 0:Us.sessionId;if(typeof Oe!="string"){Il("session_events","missing or non-string sessionId");break}if(ie.length>0){let Me=0;b(ke=>{const Kt=new Set;for(const Ue of ke)Ue.sessionId===Oe&&Kt.add(`${Ue.timestamp}|${Ue.eventType}`);const Zt=ie.filter(Ue=>!Kt.has(`${Ue.timestamp}|${Ue.eventType}`)),rt=[...ke,...Zt].sort((Ue,Ma)=>Ue.sessionId!==Ma.sessionId?0:Ue.timestamp.localeCompare(Ma.timestamp));return rt.length>xi?(Me=rt.length-xi,rt.slice(-xi)):rt}),Me>0&&T(ke=>ke+Me)}break}case"spawned":{const ie=(Ra=P.payload)==null?void 0:Ra.sessionId;typeof ie=="string"&&ie&&D(ie),F({type:"list_sessions"});break}case"projects":j(ta((ro=P.payload)==null?void 0:ro.projects,E1,"projects","projects"));break;case"project_created":Q(!1),F({type:"list_projects"});break;case"project_archived":F({type:"list_projects"});break;case"project_updated":F({type:"list_projects"});break;case"tasks":{const ie=ta((Ii=P.payload)==null?void 0:Ii.tasks,j1,"tasks","tasks"),Oe=(typeof((Gi=P.payload)==null?void 0:Gi.projectId)=="string"?P.payload.projectId:"")||(ie.length>0?ie[0].projectId:"");if(!Oe){M(ie);break}M(Me=>[...Me.filter(ke=>ke.projectId!==Oe),...ie]);break}case"task_created":{const ie=(Pi=P.payload)==null?void 0:Pi.task;if(Qt(ie)){const Oe=typeof ie.project_id=="string"?ie.project_id:typeof ie.projectId=="string"?ie.projectId:"";Oe&&F({type:"list_tasks",payload:{projectId:Oe}})}break}case"task_started":{const ie=P.payload;if(!Qt(ie))break;Ie(Me=>ie.taskId&&Me===ie.taskId?void 0:Me),ie.sessionId&&(F({type:"list_sessions"}),typeof ie.taskId=="string"&&typeof ie.sessionId=="string"&&M(Me=>Me.map(ke=>ke.id===ie.taskId?{...ke,latestSessionId:ie.sessionId}:ke)));const Oe=typeof ie.projectId=="string"?ie.projectId:void 0;Oe?F({type:"list_tasks",payload:{projectId:Oe}}):ie.taskId&&M(Me=>{const ke=Me.find(Kt=>Kt.id===ie.taskId);return ke&&F({type:"list_tasks",payload:{projectId:ke.projectId}}),Me});break}case"task_completed":case"task_deleted":case"task_updated":{const ie=P.payload;if(!Qt(ie))break;const Oe=typeof ie.projectId=="string"?ie.projectId:void 0;Oe?F({type:"list_tasks",payload:{projectId:Oe}}):ie.taskId&&M(Me=>{const ke=Me.find(Kt=>Kt.id===ie.taskId);return ke&&F({type:"list_tasks",payload:{projectId:ke.projectId}}),Me});break}case"findings":H(ta((zs=P.payload)==null?void 0:zs.findings,C1,"findings","findings"));break;case"finding_posted":typeof((Vs=P.payload)==null?void 0:Vs.projectId)=="string"&&F({type:"list_findings",payload:{projectId:P.payload.projectId}});break;case"tokens":te(ta((qi=P.payload)==null?void 0:qi.tokens,A1,"tokens","tokens"));break;case"token_changed":F({type:"list_tokens"});break;case"credential_providers":w1(P.payload)&&W(P.payload);break;case"provision_progress":{if(!D1(P.payload)){Il("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const ie=P.payload;R(Oe=>({...Oe,[ie.environmentId]:{stage:ie.stage,message:ie.message,progress:ie.progress}})),ie.stage==="ready"&&setTimeout(()=>{R(Me=>{const ke={...Me};return delete ke[ie.environmentId],ke})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((Yi=P.payload)==null?void 0:Yi.environmentId)=="string"){const ie=P.payload.environmentId;m(Oe=>Oe.filter(Me=>Me.id!==ie)),R(Oe=>{const Me={...Oe};return delete Me[ie],Me})}F({type:"list_sessions"});break;case"codespaces_list":{const ie=ta((Yn=P.payload)==null?void 0:Yn.codespaces,k1,"codespaces_list","codespaces"),Oe=typeof((Nt=P.payload)==null?void 0:Nt.error)=="string"?P.payload.error:"";ne(ie),X(Oe);break}case"codespace_created":{Ae(!1),F({type:"list_codespaces"});break}case"codespace_create_error":{Ae(!1);const ie=typeof((Vt=P.payload)==null?void 0:Vt.message)=="string"?P.payload.message:"Failed to create codespace";G(ie);break}case"personas":{const ie=ta((ra=P.payload)==null?void 0:ra.personas,R1,"personas","personas");Ge(ie);break}case"persona_created":case"persona_updated":case"persona_deleted":F({type:"list_personas"});break;case"task_sessions":{const ie=(Hs=P.payload)==null?void 0:Hs.taskId;if(typeof ie!="string"||!ie)break;const Oe=ta((co=P.payload)==null?void 0:co.sessions,Qg,"task_sessions","sessions");_e(Me=>({...Me,[ie]:Oe}));break}case"error":console.error("[ws]",(uo=P.payload)==null?void 0:uo.message);break}},ae.onclose=()=>{d(!1),o.current=void 0,Q(!1),Ie(void 0),clearTimeout(pe),pe=setTimeout(le,B1)},ae.onerror=()=>{ae.close()}}return le(),()=>{clearTimeout(pe),ae==null||ae.close()}},[l,F]);const sn=S.useCallback((ae,pe,le,Te,P,Fe)=>{F({type:"spawn",payload:{environmentId:ae,prompt:pe,model:le||"",runtime:Te||"",personaId:P||"",worktreeBasePath:Fe||""}})},[F]),Qn=S.useCallback((ae,pe)=>{F({type:"send_input",payload:{sessionId:ae,text:pe}})},[F]),ln=S.useCallback(ae=>{F({type:"kill",payload:{sessionId:ae}})},[F]),jn=S.useCallback(()=>{F({type:"list_environments"}),F({type:"list_sessions"}),F({type:"list_projects"}),F({type:"list_tokens"})},[F]),dt=S.useCallback(ae=>{F({type:"get_session_events",payload:{sessionId:ae}})},[F]),Jt=S.useCallback(()=>{b([]),T(0)},[]),Hn=S.useCallback((ae,pe,le,Te)=>{Q(!0),F({type:"create_project",payload:{name:ae,description:pe||"",repoUrl:le||"",defaultEnvironmentId:Te||""}})},[F]),In=S.useCallback(ae=>{F({type:"archive_project",payload:{projectId:ae}})},[F]),mn=S.useCallback((ae,pe)=>{F({type:"update_project",payload:{projectId:ae,...pe}})},[F]),Gn=S.useCallback(ae=>{F({type:"list_tasks",payload:{projectId:ae}})},[F]),Yt=S.useCallback((ae,pe,le,Te,P)=>{F({type:"create_task",payload:{projectId:ae,title:pe,description:le||"",dependsOn:Te||[],parentTaskId:P||""}})},[F]),Pn=S.useCallback((ae,pe,le,Te,P,Fe)=>{Ie(ae),F({type:"start_task",payload:{taskId:ae,runtime:pe||"",model:le||"",personaId:Te||"",environmentId:P||"",notes:Fe||""}})},[F]),Z=S.useCallback(ae=>{F({type:"complete_task",payload:{taskId:ae}})},[F]),se=S.useCallback(ae=>{F({type:"resume_task",payload:{taskId:ae}})},[F]),oe=S.useCallback((ae,pe,le,Te)=>{F({type:"update_task",payload:{taskId:ae,title:pe,description:le,dependsOn:Te}})},[F]),ue=S.useCallback(ae=>{F({type:"delete_task",payload:{taskId:ae}})},[F]),Se=S.useCallback(ae=>{F({type:"list_findings",payload:{projectId:ae}})},[F]),xe=S.useCallback((ae,pe,le,Te,P)=>{F({type:"post_finding",payload:{projectId:ae,title:pe,content:le,category:Te||"general",tags:P||[]}})},[F]),Xe=S.useCallback(()=>{F({type:"list_tokens"})},[F]),Re=S.useCallback((ae,pe,le,Te,P)=>{F({type:"set_token",payload:{name:ae,value:pe,tokenType:le,envVar:Te,filePath:P}})},[F]),nt=S.useCallback(ae=>{F({type:"delete_token",payload:{name:ae}})},[F]),xt=S.useCallback(ae=>{F({type:"set_credential_providers",payload:ae})},[F]),pt=S.useCallback((ae,pe,le,Te)=>{const P={displayName:ae,adapterType:pe,adapterConfig:le||{}};Te&&(P.defaultRuntime=Te),F({type:"add_environment",payload:P})},[F]),At=S.useCallback(ae=>{F({type:"provision_environment",payload:{environmentId:ae}})},[F]),at=S.useCallback(ae=>{F({type:"stop_environment",payload:{environmentId:ae}})},[F]),gt=S.useCallback(ae=>{F({type:"remove_environment",payload:{environmentId:ae}})},[F]),Wt=S.useCallback(()=>{F({type:"list_codespaces"})},[F]),ft=S.useCallback((ae,pe)=>{if(!c){G("Not connected to server. Please try again once the connection is restored.");return}Ae(!0),G("");const le={repo:ae};pe&&(le.machine=pe),F({type:"create_codespace",payload:le})},[F,c]),Lt=S.useCallback((ae,pe,le,Te,P,Fe)=>{F({type:"create_persona",payload:{name:ae,description:pe,systemPrompt:le,runtime:Te||"",model:P||"",maxTurns:Fe||0}})},[F]),Ut=S.useCallback((ae,pe,le,Te,P,Fe,on)=>{F({type:"update_persona",payload:{personaId:ae,name:pe||"",description:le||"",systemPrompt:Te||"",runtime:P||"",model:Fe||"",maxTurns:on||0}})},[F]),cs=S.useCallback(ae=>{F({type:"delete_persona",payload:{personaId:ae}})},[F]),qn=S.useCallback(ae=>{F({type:"get_task_sessions",payload:{taskId:ae}})},[F]);return{connected:c,environments:f,sessions:p,events:y,eventsDropped:_,lastSpawnedId:N,projects:w,tasks:V,findings:$,tokens:J,spawn:sn,sendInput:Qn,kill:ln,refresh:jn,loadSessionEvents:dt,clearEvents:Jt,createProject:Hn,archiveProject:In,updateProject:mn,loadTasks:Gn,createTask:Yt,startTask:Pn,completeTask:Z,resumeTask:se,updateTask:oe,deleteTask:ue,loadFindings:Se,postFinding:xe,addEnvironment:pt,loadTokens:Xe,setToken:Re,deleteToken:nt,credentialProviders:K,updateCredentialProviders:xt,provisionStatus:he,provisionEnvironment:At,stopEnvironment:at,removeEnvironment:gt,codespaces:ge,codespaceError:je,codespaceListError:U,codespaceCreating:ee,listCodespaces:Wt,createCodespace:ft,projectCreating:Ce,taskStartingId:ce,personas:Ee,createPersona:Lt,updatePersona:Ut,deletePersona:cs,taskSessions:we,loadTaskSessions:qn}}const ff=S.createContext(void 0);function U1({children:n}){const s=L1();return h.jsx(ff.Provider,{value:s,children:n})}function Ft(){const n=S.useContext(ff);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const z1=[{id:"env-local-01",displayName:"Local Dev",adapterType:"local",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-docker-01",displayName:"Docker Sandbox",adapterType:"docker",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-cs-01",displayName:"GitHub Codespace",adapterType:"codespace",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-remote-01",displayName:"Staging (SSH)",adapterType:"ssh",defaultRuntime:"claude-code",status:"disconnected",bootstrapped:!1}],V1=[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z",endedAt:"2026-02-26T15:12:00Z",error:"Context window exceeded before completing implementation"},{id:"sess-001",environmentId:"env-local-01",runtime:"node",status:"running",prompt:"Refactor the authentication middleware to use JWT tokens",startedAt:"2026-02-27T08:15:00Z"},{id:"sess-002",environmentId:"env-docker-01",runtime:"python",status:"completed",prompt:"Write unit tests for the user registration endpoint",startedAt:"2026-02-27T07:30:00Z"},{id:"sess-003",environmentId:"env-local-01",runtime:"node",status:"failed",prompt:"Migrate database schema to add audit_log table",startedAt:"2026-02-26T22:45:00Z"},{id:"sess-004",environmentId:"env-docker-01",runtime:"python",status:"running",prompt:"Implement rate limiting for the public API",startedAt:"2026-02-27T09:00:00Z"}],H1=[{sessionId:"sess-001-prev",eventType:"status",timestamp:"2026-02-26T14:00:01Z",content:"running"},{sessionId:"sess-001-prev",eventType:"output",timestamp:"2026-02-26T14:00:05Z",content:"Reading src/middleware/auth.ts to understand the current authentication flow..."},{sessionId:"sess-001-prev",eventType:"error",timestamp:"2026-02-26T15:12:00Z",content:"Context window exceeded before completing implementation"},{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
|
|
26
|
-
- src/middleware/auth.ts
|
|
27
|
-
- src/routes/login.ts
|
|
28
|
-
- src/routes/protected.ts`},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:07Z",content:"Installing jsonwebtoken and @types/jsonwebtoken..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:12Z",content:`Rewriting auth middleware:
|
|
29
|
-
\`\`\`typescript
|
|
30
|
-
import jwt from "jsonwebtoken";
|
|
31
|
-
import type { Request, Response, NextFunction } from "express";
|
|
32
|
-
|
|
33
|
-
const JWT_SECRET = process.env.JWT_SECRET || "change-me";
|
|
34
|
-
|
|
35
|
-
export function verifyToken(req: Request, res: Response, next: NextFunction): void {
|
|
36
|
-
const header = req.headers.authorization;
|
|
37
|
-
if (!header?.startsWith("Bearer ")) {
|
|
38
|
-
res.status(401).json({ error: "Missing token" });
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
try {
|
|
42
|
-
const decoded = jwt.verify(header.slice(7), JWT_SECRET);
|
|
43
|
-
req.user = decoded;
|
|
44
|
-
next();
|
|
45
|
-
} catch {
|
|
46
|
-
res.status(403).json({ error: "Invalid token" });
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
\`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],I1=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",worktreeBasePath:"",createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",worktreeBasePath:"",createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",worktreeBasePath:"",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],G1=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"working",branch:"feat/jwt-auth",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"complete",branch:"feat/jwt-auth/design-token-schema",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"working",branch:"feat/jwt-auth/implement-auth-middleware",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-001c",projectId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"paused",branch:"feat/openapi-docs",latestSessionId:"sess-002",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"complete",branch:"feat/db-pool",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-005",projectId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"not_started",branch:"fix/user-list-n1",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-006",projectId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"working",branch:"feat/parquet-export",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"complete",branch:"feat/parquet-export/define-parquet-schema-mapping",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"complete",branch:"feat/parquet-export/implement-row-group-writer",latestSessionId:"",dependsOn:["task-006a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"working",branch:"feat/parquet-export/add-compression-options",latestSessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006d",projectId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-006c"],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"working",branch:"feat/incremental",latestSessionId:"sess-004",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"complete",branch:"feat/incremental/design-watermark-storage",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-007b",projectId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",latestSessionId:"",dependsOn:["task-007a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"paused",branch:"feat/monitoring",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1}],Jg=[{id:"find-001",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"architecture",title:"Auth middleware is tightly coupled to Express",content:"The current auth middleware directly references Express Request/Response types. Consider extracting a framework-agnostic token verification layer so we can reuse it in the WebSocket auth path.",tags:["auth","decoupling","middleware"],createdAt:"2026-02-27T08:16:00Z"},{id:"find-002",projectId:"proj-alpha",taskId:"task-003",sessionId:"sess-002",category:"api",title:"Missing pagination on GET /api/users",content:"The users endpoint returns all rows without limit/offset. For datasets over 10k rows this will cause timeouts. Recommend cursor-based pagination with a default page size of 50.",tags:["api","pagination","performance"],createdAt:"2026-02-27T07:31:00Z"},{id:"find-003",projectId:"proj-alpha",taskId:"task-005",sessionId:"sess-003",category:"bug",title:"Race condition in session cleanup",content:"When two requests hit /api/logout concurrently, the second call throws a 500 because the session row has already been deleted. Needs an idempotent DELETE or a conditional check.",tags:["bug","concurrency","sessions"],createdAt:"2026-02-26T22:50:00Z"},{id:"find-004",projectId:"proj-alpha",taskId:"task-004",sessionId:"",category:"decision",title:"Chose pg-pool over knex connection pool",content:"pg-pool gives us direct control over idle timeout, max connections, and health check queries. Knex wraps pg-pool anyway and adds overhead we don't need since we write raw SQL.",tags:["database","decision","postgres"],createdAt:"2026-02-23T11:30:00Z"},{id:"find-005",projectId:"proj-alpha",taskId:"",sessionId:"",category:"dependency",title:"jsonwebtoken has 3 high-severity CVEs",content:"The jsonwebtoken package (v8.x) has known vulnerabilities. Consider migrating to jose which is maintained, supports ESM, and covers the same JWS/JWE surface area with zero dependencies.",tags:["security","dependency","jwt"],createdAt:"2026-02-27T08:20:00Z"},{id:"find-006",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"pattern",title:"Consistent error response shape",content:"All error responses should follow the shape `{ error: string, code: string, details?: unknown }`. Currently some routes return `{ message: string }` and others return `{ error: string }`.",tags:["api","consistency","error-handling"],createdAt:"2026-02-27T08:17:00Z"},{id:"find-007",projectId:"proj-beta",taskId:"task-007",sessionId:"sess-004",category:"architecture",title:"Watermark storage should be pluggable",content:"The incremental load watermarks are currently stored in a local SQLite file. For production multi-worker scenarios, this needs to be backed by a shared store (Redis or Postgres).",tags:["architecture","pipeline","scalability"],createdAt:"2026-02-27T09:05:00Z"}],P1=[{name:"anthropic",tokenType:"env_var",envVar:"ANTHROPIC_API_KEY",filePath:"",expiresAt:""},{name:"github",tokenType:"env_var",envVar:"GITHUB_TOKEN",filePath:"",expiresAt:"2026-12-31T23:59:59Z"},{name:"gcp-service-account",tokenType:"file",envVar:"",filePath:"/home/user/.config/gcloud/credentials.json",expiresAt:""}],q1=[{id:"persona-arch",name:"Software Architect",description:"Designs system architecture, defines interfaces, and decomposes large features into implementable tasks.",systemPrompt:"You are a senior software architect. Focus on clean interfaces, separation of concerns, and scalable patterns. When decomposing work, create concrete subtasks with clear acceptance criteria.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:50,mcpServers:"[]",createdAt:"2026-02-20T10:00:00Z",updatedAt:"2026-02-20T10:00:00Z"},{id:"persona-fe",name:"Frontend Engineer",description:"React specialist — builds UI components, writes CSS, implements routing, and creates Playwright tests.",systemPrompt:"You are a frontend engineer specializing in React, TypeScript, and modern CSS. Follow component composition patterns, use semantic HTML, and write accessible markup.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:100,mcpServers:"[]",createdAt:"2026-02-20T10:05:00Z",updatedAt:"2026-02-20T10:05:00Z"},{id:"persona-reviewer",name:"Code Reviewer",description:"Reviews diffs for correctness, security, and style. Posts findings for issues discovered.",systemPrompt:"You are a meticulous code reviewer. Check for security vulnerabilities, performance issues, and style consistency. Post findings for anything noteworthy.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:30,mcpServers:"[]",createdAt:"2026-02-20T10:10:00Z",updatedAt:"2026-02-20T10:10:00Z"},{id:"persona-tester",name:"QA Engineer",description:"Writes comprehensive test suites — unit tests, integration tests, and E2E Playwright specs.",systemPrompt:"You are a QA engineer focused on test coverage. Write tests that cover happy paths, edge cases, error scenarios, and accessibility. Use Playwright for E2E tests.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:80,mcpServers:"[]",createdAt:"2026-02-20T10:15:00Z",updatedAt:"2026-02-20T10:15:00Z"}],Y1={"task-001b":[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z"},{id:"sess-001",environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:"Implement auth middleware",startedAt:"2026-02-27T08:15:00Z"}],"task-006c":[{id:"sess-004",environmentId:"env-docker-01",runtime:"claude-code",status:"running",prompt:"Add compression options",startedAt:"2026-02-27T09:00:00Z"}]};function Bt(n){return new Date(Date.now()+n).toISOString()}const Wg=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Bt(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Bt(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Bt(1600),content:`Found 5 endpoints that need refactoring:
|
|
50
|
-
- GET /api/users
|
|
51
|
-
- POST /api/users
|
|
52
|
-
- GET /api/users/:id
|
|
53
|
-
- PUT /api/users/:id
|
|
54
|
-
- DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:Bt(2800),content:"Refactoring to use Express Router with middleware chain...\n```typescript\nconst router = Router();\nrouter.use(authenticate);\nrouter.use(validateBody);\n```"}},{delayMs:4e3,event:{eventType:"output",timestamp:Bt(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Bt(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Bt(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Bt(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Bt(1400),content:`Found tables to modify:
|
|
55
|
-
- users (add column: last_login_at)
|
|
56
|
-
- sessions (add index on expires_at)
|
|
57
|
-
- audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:Bt(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
|
|
58
|
-
The table has 50,000+ rows — this may lock the table briefly.
|
|
59
|
-
|
|
60
|
-
Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:Bt(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Bt(1e3),content:`Migration 001_add_last_login.sql applied successfully.
|
|
61
|
-
Migration 002_sessions_index.sql applied successfully.
|
|
62
|
-
Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:Bt(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Bt(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Bt(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Bt(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Bt(1800),content:`Writing test cases:
|
|
63
|
-
- should calculate monthly total
|
|
64
|
-
- should apply discount codes
|
|
65
|
-
- should handle currency conversion
|
|
66
|
-
- should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:Bt(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
|
|
67
|
-
The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:Bt(3500),content:"failed"}}]}],ev=400;function K1({children:n}){const[s,l]=S.useState(V1),[o,c]=S.useState(H1),[d,f]=S.useState(void 0),[m,p]=S.useState(I1),[v,y]=S.useState(G1),[b,_]=S.useState(Jg),[T,N]=S.useState(P1),[D,w]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[j,V]=S.useState(q1),[M]=S.useState(Y1),$=S.useRef(0),H=S.useRef(0),J=S.useRef(new Set),te=S.useRef(new Map),K=S.useRef(v);K.current=v;const W=S.useRef(new Map),he=S.useRef(new Map),R=S.useCallback(Z=>($.current+=1,`mock-${Z}-${String($.current).padStart(3,"0")}`),[]),ge=S.useCallback(()=>{const Z=Wg[H.current%Wg.length];return H.current+=1,Z},[]),ne=S.useCallback((Z,se,oe)=>{const ue=setTimeout(()=>{var Se;J.current.delete(ue),oe&&((Se=te.current.get(oe))==null||Se.delete(ue)),Z()},se);J.current.add(ue),oe&&(te.current.has(oe)||te.current.set(oe,new Set),te.current.get(oe).add(ue))},[]),je=S.useCallback(Z=>{const se=te.current.get(Z);se&&(se.forEach(oe=>{clearTimeout(oe),J.current.delete(oe)}),te.current.delete(Z))},[]),G=S.useCallback((Z,se)=>{l(oe=>oe.map(ue=>ue.id===Z?{...ue,status:se}:ue))},[]),U=S.useCallback(Z=>{c(se=>[...se,Z])},[]),X=S.useCallback((Z,se,oe)=>{se.forEach((ue,Se)=>{ne(()=>{const xe={sessionId:Z,...ue.event,timestamp:new Date().toISOString()};U(xe),ue.event.eventType==="status"&&G(Z,ue.event.content),Se===se.length-1&&oe&&oe()},ue.delayMs,Z)})},[ne,U,G]),ee=S.useCallback((Z,se,oe,ue)=>{console.log("[MockGrackle] spawn",{environmentId:Z,prompt:se,runtime:ue});const Se=R("sess"),xe={id:Se,environmentId:Z,runtime:ue||"claude-code",status:"running",prompt:se,startedAt:new Date().toISOString()};l(Re=>[...Re,xe]),f(Se);const Xe=ge();if(console.log(`[MockGrackle] Playing scenario: ${Xe.label}`),Xe.pauseForInput){const Re=Xe.pauseAfterStep??Xe.steps.length-1,nt=Xe.steps.slice(0,Re+1),xt=nt.length>0?nt[nt.length-1].delayMs:0;X(Se,nt),ne(()=>{G(Se,"idle"),U({sessionId:Se,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},xt+ev,Se),Xe.resumeSteps&&W.current.set(Se,Xe.resumeSteps)}else X(Se,Xe.steps)},[R,ge,X,ne,G,U]),Ae=S.useCallback(Z=>{console.log("[MockGrackle] kill",Z),je(Z),W.current.delete(Z),G(Z,"interrupted"),U({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),y(se=>se.map(oe=>oe.latestSessionId===Z&&oe.status==="working"?{...oe,status:"not_started"}:oe))},[je,G,U]),Ee=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),Ge=S.useCallback(Z=>{console.log("[MockGrackle] loadSessionEvents",Z)},[]),we=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),c([])},[]),_e=S.useCallback((Z,se,oe,ue)=>{console.log("[MockGrackle] createProject",{name:Z,description:se});const Se={id:R("proj"),name:Z,description:se||"",repoUrl:oe||"",defaultEnvironmentId:ue||"",status:"active",worktreeBasePath:"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(xe=>[...xe,Se])},[R]),Ce=S.useCallback(Z=>{console.log("[MockGrackle] archiveProject",Z),p(se=>se.map(oe=>oe.id===Z?{...oe,status:"archived"}:oe))},[]),Q=S.useCallback(Z=>{console.log("[MockGrackle] loadTasks",Z)},[]),ce=S.useCallback((Z,se,oe,ue,Se)=>{console.log("[MockGrackle] createTask",{projectId:Z,title:se,parentTaskId:Se}),y(xe=>{const Re=xe.filter(At=>At.projectId===Z).reduce((At,at)=>Math.max(At,at.sortOrder),0),nt=Se?xe.find(At=>At.id===Se):void 0;if(Se&&!nt)return console.warn("[MockGrackle] Parent task not found:",Se),xe;if(nt&&!nt.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",Se),xe;const xt=nt?nt.depth+1:0,pt={id:R("task"),projectId:Z,title:se,description:oe||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:ue||[],reviewNotes:void 0,sortOrder:Re+1,createdAt:new Date().toISOString(),parentTaskId:Se||"",depth:xt,childTaskIds:[],canDecompose:!Se};return[...xe,pt]})},[R]),Ie=S.useCallback((Z,se,oe)=>{var nt;console.log("[MockGrackle] startTask",{taskId:Z,runtime:se});const ue=K.current.find(xt=>xt.id===Z),Se=(ue==null?void 0:ue.title)??"",xe=R("sess"),Xe={id:xe,environmentId:"env-local-01",runtime:se||"claude-code",status:"running",prompt:Se||Z,startedAt:new Date().toISOString()};l(xt=>[...xt,Xe]),y(xt=>xt.map(pt=>pt.id===Z?{...pt,status:"working",latestSessionId:xe,branch:`mock/${Z.slice(0,8)}`}:pt));const Re=ge();if(console.log(`[MockGrackle] Playing task scenario: ${Re.label}`),Re.pauseForInput){const xt=Re.pauseAfterStep??Re.steps.length-1,pt=Re.steps.slice(0,xt+1),At=pt.length>0?pt[pt.length-1].delayMs:0;if(X(xe,pt),ne(()=>{G(xe,"idle"),U({sessionId:xe,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},At+ev,xe),Re.resumeSteps){const at=[...Re.resumeSteps];W.current.set(xe,at);const gt=at.reduce((Wt,ft)=>Math.max(Wt,ft.delayMs),0);he.current.set(xe,{taskId:Z,delayAfterResume:gt+200})}}else{const xt=Re.steps.length>0?Re.steps[Re.steps.length-1].delayMs:0;X(xe,Re.steps);const pt=(nt=Re.steps[Re.steps.length-1])==null?void 0:nt.event.content;ne(()=>{pt==="completed"?y(At=>At.map(at=>at.id===Z&&at.status==="working"?{...at,status:"paused"}:at)):pt==="failed"&&y(At=>At.map(at=>at.id===Z&&at.status==="working"?{...at,status:"failed"}:at))},xt+100,xe)}},[R,ge,X,ne,G,U]),F=S.useCallback((Z,se)=>{console.log("[MockGrackle] sendInput",{sessionId:Z,text:se}),U({sessionId:Z,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${se}`}),G(Z,"running"),U({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const oe=W.current.get(Z);if(oe)W.current.delete(Z),X(Z,oe);else{const Se=[{delayMs:500,event:{eventType:"output",timestamp:new Date().toISOString(),content:"I received your input, continuing..."}},{delayMs:1500,event:{eventType:"status",timestamp:new Date().toISOString(),content:"completed"}}];X(Z,Se)}const ue=he.current.get(Z);ue&&(he.current.delete(Z),ne(()=>{y(Se=>Se.map(xe=>xe.id===ue.taskId&&xe.status==="working"?{...xe,status:"paused"}:xe))},ue.delayAfterResume,Z))},[U,G,X,ne]),sn=S.useCallback(Z=>{console.log("[MockGrackle] completeTask",Z),y(se=>se.map(oe=>oe.id===Z?{...oe,status:"complete"}:oe))},[]),Qn=S.useCallback(Z=>{console.log("[MockGrackle] resumeTask",Z)},[]),ln=S.useCallback((Z,se,oe,ue)=>{console.log("[MockGrackle] updateTask",{taskId:Z,title:se}),y(Se=>Se.map(xe=>xe.id===Z?{...xe,title:se.trim()||xe.title,description:oe,dependsOn:ue}:xe))},[]),jn=S.useCallback(Z=>{console.log("[MockGrackle] deleteTask",Z),y(se=>se.filter(oe=>oe.id!==Z))},[]),dt=S.useCallback(Z=>{console.log("[MockGrackle] loadFindings",Z),_(Jg.filter(se=>se.projectId===Z))},[]),Jt=S.useCallback((Z,se,oe,ue,Se)=>{console.log("[MockGrackle] postFinding",{projectId:Z,title:se});const xe={id:R("find"),projectId:Z,taskId:"",sessionId:"",category:ue||"general",title:se,content:oe,tags:Se||[],createdAt:new Date().toISOString()};_(Xe=>[...Xe,xe])},[R]),Hn=S.useCallback((Z,se,oe,ue)=>{console.log("[MockGrackle] addEnvironment",{displayName:Z,adapterType:se,adapterConfig:oe,defaultRuntime:ue})},[]),In=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),mn=S.useCallback((Z,se,oe,ue,Se)=>{console.log("[MockGrackle] setToken",{name:Z,tokenType:oe}),N(xe=>[...xe.filter(Re=>Re.name!==Z),{name:Z,tokenType:oe,envVar:ue,filePath:Se,expiresAt:""}])},[]),Gn=S.useCallback(Z=>{console.log("[MockGrackle] deleteToken",Z),N(se=>se.filter(oe=>oe.name!==Z))},[]),Yt=S.useCallback(Z=>{console.log("[MockGrackle] updateCredentialProviders",Z),w(Z)},[]);S.useEffect(()=>()=>{J.current.forEach(clearTimeout),J.current.clear()},[]);const Pn=S.useMemo(()=>({connected:!0,environments:z1,sessions:s,events:o,eventsDropped:0,lastSpawnedId:d,projects:m,tasks:v,findings:b,tokens:T,credentialProviders:D,spawn:ee,sendInput:F,kill:Ae,refresh:Ee,loadSessionEvents:Ge,clearEvents:we,createProject:_e,archiveProject:Ce,updateProject:(Z,se)=>{console.log("[MockGrackle] updateProject",{projectId:Z,...se}),p(oe=>oe.map(ue=>ue.id!==Z?ue:{...ue,...se.name!==void 0?{name:se.name}:{},...se.description!==void 0?{description:se.description}:{},...se.repoUrl!==void 0?{repoUrl:se.repoUrl}:{},...se.defaultEnvironmentId!==void 0?{defaultEnvironmentId:se.defaultEnvironmentId}:{},updatedAt:new Date().toISOString()}))},loadTasks:Q,createTask:ce,startTask:Ie,completeTask:sn,resumeTask:Qn,updateTask:ln,deleteTask:jn,loadFindings:dt,postFinding:Jt,addEnvironment:Hn,loadTokens:In,setToken:mn,deleteToken:Gn,updateCredentialProviders:Yt,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:j,createPersona:(Z,se,oe,ue,Se,xe)=>{console.log("[MockGrackle] createPersona",{name:Z});const Xe={id:`mock-persona-${Date.now()}`,name:Z,description:se,systemPrompt:oe,toolConfig:"{}",runtime:ue??"claude-code",model:Se||"",maxTurns:xe||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};V(Re=>[...Re,Xe])},updatePersona:(Z,se,oe,ue,Se,xe,Xe)=>{console.log("[MockGrackle] updatePersona",{personaId:Z,name:se}),V(Re=>Re.map(nt=>nt.id!==Z?nt:{...nt,...se!==void 0?{name:se}:{},...oe!==void 0?{description:oe}:{},...ue!==void 0?{systemPrompt:ue}:{},...Se!==void 0?{runtime:Se}:{},...xe!==void 0?{model:xe}:{},...Xe!==void 0?{maxTurns:Xe}:{},updatedAt:new Date().toISOString()}))},deletePersona:Z=>{console.log("[MockGrackle] deletePersona",Z),V(se=>se.filter(oe=>oe.id!==Z))},taskSessions:M,loadTaskSessions:Z=>{console.log("[MockGrackle] loadTaskSessions",Z)}}),[s,o,d,m,v,b,T,D,j,M,ee,F,Ae,Ee,Ge,we,_e,Ce,Q,ce,Ie,sn,Qn,ln,jn,dt,Jt,Hn,In,mn,Gn,Yt]);return h.jsx(ff.Provider,{value:Pn,children:n})}const Iy=S.createContext(void 0),Z1=4e3;function X1({children:n}){const[s,l]=S.useState([]),o=S.useRef(0),c=S.useCallback(f=>{l(m=>m.filter(p=>p.id!==f))},[]),d=S.useCallback((f,m="info",p=Z1)=>{const v=`toast-${++o.current}`;l(y=>[...y,{id:v,message:f,variant:m,duration:p}])},[]);return h.jsx(Iy.Provider,{value:{toasts:s,showToast:d,dismissToast:c},children:n})}function to(){const n=S.useContext(Iy);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const Xr=[{id:"grackle",label:"Grackle",description:"The default Grackle theme — iridescent purple on clean dark.",swatches:["#0e1218","#8b5cf6","#60a5fa","#e5e7eb","#34d399"],variantLightId:"grackle-light",variantDarkId:"grackle-dark"},{id:"grackle-light",label:"Grackle Light",description:"Light Grackle variant.",hidden:!0},{id:"grackle-dark",label:"Grackle Dark",description:"Dark Grackle variant.",hidden:!0},{id:"glass",label:"Glassmorphism",description:"Dark frosted-glass aesthetic with backdrop blur effects.",swatches:["#0a0c14","#4ecca3","#70a1ff","#e2e8f0","#a855f7"]},{id:"matrix",label:"Matrix",description:"Phosphor-green CRT terminal with scanlines and glow.",swatches:["#050505","#00ff41","#00bfff","#33ff77","#ffb000"]},{id:"brutalist",label:"Neubrutalism",description:"Thick borders, raw colors, bold type — ugly on purpose.",swatches:["#f5f0e8","#ff5757","#5ce1e6","#1a1a1a","#ffde59"],variantLightId:"brutalist-light",variantDarkId:"brutalist-dark"},{id:"brutalist-light",label:"Neubrutalism Light",description:"Light neubrutalism variant.",hidden:!0},{id:"brutalist-dark",label:"Neubrutalism Dark",description:"Dark neubrutalism variant.",hidden:!0},{id:"monokai",label:"Monokai",description:"Classic warm editor palette — pink, green, and purple.",swatches:["#272822","#f92672","#a6e22e","#f8f8f2","#ae81ff"],variantLightId:"monokai-light",variantDarkId:"monokai-dark"},{id:"monokai-dark",label:"Monokai Dark",description:"Dark Monokai variant.",hidden:!0},{id:"monokai-light",label:"Monokai Light",description:"Light Monokai variant.",hidden:!0},{id:"ubuntu",label:"Ubuntu",description:"Aubergine terminal with the GNOME Tango palette.",swatches:["#300a24","#8ae234","#ef2929","#eeeeec","#fce94f"]},{id:"sandstone",label:"Sandstone",description:"Warm terracotta accent on dark brown, in the style of Claude Code.",swatches:["#1a1815","#C15F3C","#6b8afd","#e8e6e3","#a78bfa"]},{id:"verdigris",label:"Verdigris",description:"Teal accent on charcoal, in the style of ChatGPT.",swatches:["#141414","#00a67e","#3b82f6","#ececec","#ab68ff"]},{id:"primer",label:"Primer",description:"Blue accent on ink-dark grey, in the style of GitHub.",swatches:["#0d1117","#58a6ff","#3fb950","#c9d1d9","#bc8cff"]}],Gy=new Set(Xr.map(n=>n.id)),tv="grackle";function Vd(n){return Xr.find(s=>s.id===n)}const Hd="grackle-theme",Py="grackle-prefer-system",qy="(prefers-color-scheme: dark)";let Ul=[],Rr;function yd(){Rr=void 0;for(const n of Ul)n()}function Id(){return typeof window>"u"?!1:window.matchMedia(qy).matches}function Gl(){if(typeof localStorage>"u")return tv;try{const n=localStorage.getItem(Hd);if(n!==null&&Gy.has(n))return n}catch{}return tv}function Vr(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(Py)==="true"}catch{return!1}}function Gd(n){return Xr.find(s=>s.variantLightId===n||s.variantDarkId===n)}function Yy(n,s){const l=Vd(n);if(l!=null&&l.variantDarkId)return s&&l.variantLightId?Id()?l.variantDarkId:l.variantLightId:l.variantDarkId;if(l!=null&&l.hidden&&s){const o=Gd(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return Id()?o.variantDarkId:o.variantLightId}return n}function Ti(n,s,l=!1){l&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=Yy(n,s),l&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Ti(Gl(),Vr());function $1(){return Rr===void 0&&(Rr={themeId:Gl(),systemDark:Id(),preferSystem:Vr()}),Rr}function Q1(n){return Ul=[...Ul,n],()=>{Ul=Ul.filter(s=>s!==n)}}function F1(){const n=S.useSyncExternalStore(Q1,$1),{themeId:s,preferSystem:l}=n,o=Yy(s,l),c=S.useCallback(f=>{if(Gy.has(f)){try{localStorage.setItem(Hd,f)}catch{}Ti(f,Vr(),!0),yd()}},[]),d=S.useCallback(f=>{try{localStorage.setItem(Py,f?"true":"false")}catch{}if(f){const m=Gl(),p=Vd(m);if(p!=null&&p.hidden){const v=Gd(m);if(v)try{localStorage.setItem(Hd,v.id)}catch{}}}Ti(Gl(),f,!0),yd()},[]);return S.useEffect(()=>{Ti(s,l)},[s,l]),S.useEffect(()=>{if(typeof window>"u")return;const f=window.matchMedia(qy),m=()=>{const p=Gl(),v=Vr();if(v){const y=Vd(p);if(y!=null&&y.variantDarkId&&y.variantLightId&&Ti(p,v),y!=null&&y.hidden){const b=Gd(p);b!=null&&b.variantDarkId&&b.variantLightId&&Ti(p,v)}}yd()};return f.addEventListener("change",m),()=>{f.removeEventListener("change",m)}},[]),{themeId:s,setTheme:c,resolvedThemeId:o,preferSystem:l,setPreferSystem:d}}const Ky=S.createContext(void 0);function J1({children:n}){const s=F1();return h.jsx(Ky.Provider,{value:s,children:n})}function Zy(){const n=S.useContext(Ky);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}/**
|
|
68
|
-
* react-router v7.13.1
|
|
69
|
-
*
|
|
70
|
-
* Copyright (c) Remix Software Inc.
|
|
71
|
-
*
|
|
72
|
-
* This source code is licensed under the MIT license found in the
|
|
73
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
74
|
-
*
|
|
75
|
-
* @license MIT
|
|
76
|
-
*/var nv="popstate";function av(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function W1(n={}){function s(o,c){var v;let d=(v=c.state)==null?void 0:v.masked,{pathname:f,search:m,hash:p}=d||o.location;return Pd("",{pathname:f,search:m,hash:p},c.state&&c.state.usr||null,c.state&&c.state.key||"default",d?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function l(o,c){return typeof c=="string"?c:Zl(c)}return t_(s,l,null,n)}function lt(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function zn(n,s){if(!n){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function e_(){return Math.random().toString(36).substring(2,10)}function sv(n,s){return{usr:n.state,key:n.key,idx:s,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Pd(n,s,l=null,o,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof s=="string"?Bi(s):s,state:l,key:s&&s.key||o||e_(),unstable_mask:c}}function Zl({pathname:n="/",search:s="",hash:l=""}){return s&&s!=="?"&&(n+=s.charAt(0)==="?"?s:"?"+s),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Bi(n){let s={};if(n){let l=n.indexOf("#");l>=0&&(s.hash=n.substring(l),n=n.substring(0,l));let o=n.indexOf("?");o>=0&&(s.search=n.substring(o),n=n.substring(0,o)),n&&(s.pathname=n)}return s}function t_(n,s,l,o={}){let{window:c=document.defaultView,v5Compat:d=!1}=o,f=c.history,m="POP",p=null,v=y();v==null&&(v=0,f.replaceState({...f.state,idx:v},""));function y(){return(f.state||{idx:null}).idx}function b(){m="POP";let w=y(),j=w==null?null:w-v;v=w,p&&p({action:m,location:D.location,delta:j})}function _(w,j){m="PUSH";let V=av(w)?w:Pd(D.location,w,j);v=y()+1;let M=sv(V,v),$=D.createHref(V.unstable_mask||V);try{f.pushState(M,"",$)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;c.location.assign($)}d&&p&&p({action:m,location:D.location,delta:1})}function T(w,j){m="REPLACE";let V=av(w)?w:Pd(D.location,w,j);v=y();let M=sv(V,v),$=D.createHref(V.unstable_mask||V);f.replaceState(M,"",$),d&&p&&p({action:m,location:D.location,delta:0})}function N(w){return n_(w)}let D={get action(){return m},get location(){return n(c,f)},listen(w){if(p)throw new Error("A history only accepts one active listener");return c.addEventListener(nv,b),p=w,()=>{c.removeEventListener(nv,b),p=null}},createHref(w){return s(c,w)},createURL:N,encodeLocation(w){let j=N(w);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:_,replace:T,go(w){return f.go(w)}};return D}function n_(n,s=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),lt(l,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:Zl(n);return o=o.replace(/ $/,"%20"),!s&&o.startsWith("//")&&(o=l+o),new URL(o,l)}function Xy(n,s,l="/"){return a_(n,s,l,!1)}function a_(n,s,l,o){let c=typeof s=="string"?Bi(s):s,d=Da(c.pathname||"/",l);if(d==null)return null;let f=$y(n);s_(f);let m=null;for(let p=0;m==null&&p<f.length;++p){let v=Fy(d);m=h_(f[p],v,o)}return m}function $y(n,s=[],l=[],o="",c=!1){let d=(f,m,p=c,v)=>{let y={relativePath:v===void 0?f.path||"":v,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&p)return;lt(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let b=aa([o,y.relativePath]),_=l.concat(y);f.children&&f.children.length>0&&(lt(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),$y(f.children,s,_,b,p)),!(f.path==null&&!f.index)&&s.push({path:b,score:d_(b,f.index),routesMeta:_})};return n.forEach((f,m)=>{var p;if(f.path===""||!((p=f.path)!=null&&p.includes("?")))d(f,m);else for(let v of Qy(f.path))d(f,m,!0,v)}),s}function Qy(n){let s=n.split("/");if(s.length===0)return[];let[l,...o]=s,c=l.endsWith("?"),d=l.replace(/\?$/,"");if(o.length===0)return c?[d,""]:[d];let f=Qy(o.join("/")),m=[];return m.push(...f.map(p=>p===""?d:[d,p].join("/"))),c&&m.push(...f),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function s_(n){n.sort((s,l)=>s.score!==l.score?l.score-s.score:f_(s.routesMeta.map(o=>o.childrenIndex),l.routesMeta.map(o=>o.childrenIndex)))}var i_=/^:[\w-]+$/,l_=3,o_=2,r_=1,c_=10,u_=-2,iv=n=>n==="*";function d_(n,s){let l=n.split("/"),o=l.length;return l.some(iv)&&(o+=u_),s&&(o+=o_),l.filter(c=>!iv(c)).reduce((c,d)=>c+(i_.test(d)?l_:d===""?r_:c_),o)}function f_(n,s){return n.length===s.length&&n.slice(0,-1).every((o,c)=>o===s[c])?n[n.length-1]-s[s.length-1]:0}function h_(n,s,l=!1){let{routesMeta:o}=n,c={},d="/",f=[];for(let m=0;m<o.length;++m){let p=o[m],v=m===o.length-1,y=d==="/"?s:s.slice(d.length)||"/",b=Xl({path:p.relativePath,caseSensitive:p.caseSensitive,end:v},y),_=p.route;if(!b&&v&&l&&!o[o.length-1].route.index&&(b=Xl({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!b)return null;Object.assign(c,b.params),f.push({params:c,pathname:aa([d,b.pathname]),pathnameBase:y_(aa([d,b.pathnameBase])),route:_}),b.pathnameBase!=="/"&&(d=aa([d,b.pathnameBase]))}return f}function Xl(n,s){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,o]=m_(n.path,n.caseSensitive,n.end),c=s.match(l);if(!c)return null;let d=c[0],f=d.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:o.reduce((v,{paramName:y,isOptional:b},_)=>{if(y==="*"){let N=m[_]||"";f=d.slice(0,d.length-N.length).replace(/(.)\/+$/,"$1")}const T=m[_];return b&&!T?v[y]=void 0:v[y]=(T||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:f,pattern:n}}function m_(n,s=!1,l=!0){zn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,m,p,v,y)=>{if(o.push({paramName:m,isOptional:p!=null}),p){let b=y.charAt(v+f.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,s?void 0:"i"),o]}function Fy(n){try{return n.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return zn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),n}}function Da(n,s){if(s==="/")return n;if(!n.toLowerCase().startsWith(s.toLowerCase()))return null;let l=s.endsWith("/")?s.length-1:s.length,o=n.charAt(l);return o&&o!=="/"?null:n.slice(l)||"/"}var p_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function g_(n,s="/"){let{pathname:l,search:o="",hash:c=""}=typeof n=="string"?Bi(n):n,d;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?d=lv(l.substring(1),"/"):d=lv(l,s)):d=s,{pathname:d,search:b_(o),hash:S_(c)}}function lv(n,s){let l=s.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?l.length>1&&l.pop():c!=="."&&l.push(c)}),l.length>1?l.join("/"):"/"}function bd(n,s,l,o){return`Cannot include a '${n}' character in a manually specified \`to.${s}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function v_(n){return n.filter((s,l)=>l===0||s.route.path&&s.route.path.length>0)}function hf(n){let s=v_(n);return s.map((l,o)=>o===s.length-1?l.pathname:l.pathnameBase)}function $r(n,s,l,o=!1){let c;typeof n=="string"?c=Bi(n):(c={...n},lt(!c.pathname||!c.pathname.includes("?"),bd("?","pathname","search",c)),lt(!c.pathname||!c.pathname.includes("#"),bd("#","pathname","hash",c)),lt(!c.search||!c.search.includes("#"),bd("#","search","hash",c)));let d=n===""||c.pathname==="",f=d?"/":c.pathname,m;if(f==null)m=l;else{let b=s.length-1;if(!o&&f.startsWith("..")){let _=f.split("/");for(;_[0]==="..";)_.shift(),b-=1;c.pathname=_.join("/")}m=b>=0?s[b]:"/"}let p=g_(c,m),v=f&&f!=="/"&&f.endsWith("/"),y=(d||f===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(v||y)&&(p.pathname+="/"),p}var aa=n=>n.join("/").replace(/\/\/+/g,"/"),y_=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),b_=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,S_=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,x_=class{constructor(n,s,l,o=!1){this.status=n,this.statusText=s||"",this.internal=o,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function __(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function T_(n){return n.map(s=>s.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Jy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wy(n,s){let l=n;if(typeof l!="string"||!p_.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let o=l,c=!1;if(Jy)try{let d=new URL(window.location.href),f=l.startsWith("//")?new URL(d.protocol+l):new URL(l),m=Da(f.pathname,s);f.origin===d.origin&&m!=null?l=m+f.search+f.hash:c=!0}catch{zn(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:c,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var e0=["POST","PUT","PATCH","DELETE"];new Set(e0);var E_=["GET",...e0];new Set(E_);var Li=S.createContext(null);Li.displayName="DataRouter";var Qr=S.createContext(null);Qr.displayName="DataRouterState";var j_=S.createContext(!1),t0=S.createContext({isTransitioning:!1});t0.displayName="ViewTransition";var C_=S.createContext(new Map);C_.displayName="Fetchers";var A_=S.createContext(null);A_.displayName="Await";var En=S.createContext(null);En.displayName="Navigation";var no=S.createContext(null);no.displayName="Location";var Vn=S.createContext({outlet:null,matches:[],isDataRoute:!1});Vn.displayName="Route";var mf=S.createContext(null);mf.displayName="RouteError";var n0="REACT_ROUTER_ERROR",N_="REDIRECT",w_="ROUTE_ERROR_RESPONSE";function D_(n){if(n.startsWith(`${n0}:${N_}:{`))try{let s=JSON.parse(n.slice(28));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.location=="string"&&typeof s.reloadDocument=="boolean"&&typeof s.replace=="boolean")return s}catch{}}function k_(n){if(n.startsWith(`${n0}:${w_}:{`))try{let s=JSON.parse(n.slice(40));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string")return new x_(s.status,s.statusText,s.data)}catch{}}function R_(n,{relative:s}={}){lt(Bs(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:o}=S.useContext(En),{hash:c,pathname:d,search:f}=ao(n,{relative:s}),m=d;return l!=="/"&&(m=d==="/"?l:aa([l,d])),o.createHref({pathname:m,search:f,hash:c})}function Bs(){return S.useContext(no)!=null}function an(){return lt(Bs(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(no).location}function tn(n){lt(Bs(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:s}=an();return S.useMemo(()=>Xl(n,Fy(s)),[s,n])}var a0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function s0(n){S.useContext(En).static||S.useLayoutEffect(n)}function Fr(){let{isDataRoute:n}=S.useContext(Vn);return n?Z_():M_()}function M_(){lt(Bs(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Li),{basename:s,navigator:l}=S.useContext(En),{matches:o}=S.useContext(Vn),{pathname:c}=an(),d=JSON.stringify(hf(o)),f=S.useRef(!1);return s0(()=>{f.current=!0}),S.useCallback((p,v={})=>{if(zn(f.current,a0),!f.current)return;if(typeof p=="number"){l.go(p);return}let y=$r(p,JSON.parse(d),c,v.relative==="path");n==null&&s!=="/"&&(y.pathname=y.pathname==="/"?s:aa([s,y.pathname])),(v.replace?l.replace:l.push)(y,v.state,v)},[s,l,d,c,n])}var O_=S.createContext(null);function B_(n){let s=S.useContext(Vn).outlet;return S.useMemo(()=>s&&S.createElement(O_.Provider,{value:n},s),[s,n])}function Jr(){let{matches:n}=S.useContext(Vn),s=n[n.length-1];return s?s.params:{}}function ao(n,{relative:s}={}){let{matches:l}=S.useContext(Vn),{pathname:o}=an(),c=JSON.stringify(hf(l));return S.useMemo(()=>$r(n,JSON.parse(c),o,s==="path"),[n,c,o,s])}function L_(n,s){return i0(n,s)}function i0(n,s,l){var w;lt(Bs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(En),{matches:c}=S.useContext(Vn),d=c[c.length-1],f=d?d.params:{},m=d?d.pathname:"/",p=d?d.pathnameBase:"/",v=d&&d.route;{let j=v&&v.path||"";o0(m,!v||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
77
|
-
|
|
78
|
-
Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let y=an(),b;if(s){let j=typeof s=="string"?Bi(s):s;lt(p==="/"||((w=j.pathname)==null?void 0:w.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${j.pathname}" was given in the \`location\` prop.`),b=j}else b=y;let _=b.pathname||"/",T=_;if(p!=="/"){let j=p.replace(/^\//,"").split("/");T="/"+_.replace(/^\//,"").split("/").slice(j.length).join("/")}let N=Xy(n,{pathname:T});zn(v||N!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),zn(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let D=I_(N&&N.map(j=>Object.assign({},j,{params:Object.assign({},f,j.params),pathname:aa([p,o.encodeLocation?o.encodeLocation(j.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?p:aa([p,o.encodeLocation?o.encodeLocation(j.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),c,l);return s&&D?S.createElement(no.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},D):D}function U_(){let n=K_(),s=__(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:o},d={padding:"2px 4px",backgroundColor:o},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:d},"ErrorBoundary")," or"," ",S.createElement("code",{style:d},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},s),l?S.createElement("pre",{style:c},l):null,f)}var z_=S.createElement(U_,null),l0=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,s){return s.location!==n.location||s.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:s.error,location:s.location,revalidation:n.revalidation||s.revalidation}}componentDidCatch(n,s){this.props.onError?this.props.onError(n,s):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const l=k_(n.digest);l&&(n=l)}let s=n!==void 0?S.createElement(Vn.Provider,{value:this.props.routeContext},S.createElement(mf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(V_,{error:n},s):s}};l0.contextType=j_;var Sd=new WeakMap;function V_({children:n,error:s}){let{basename:l}=S.useContext(En);if(typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){let o=D_(s.digest);if(o){let c=Sd.get(s);if(c)throw c;let d=Wy(o.location,l);if(Jy&&!Sd.get(s))if(d.isExternal||o.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:o.replace}));throw Sd.set(s,f),f}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function H_({routeContext:n,match:s,children:l}){let o=S.useContext(Li);return o&&o.static&&o.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=s.route.id),S.createElement(Vn.Provider,{value:n},l)}function I_(n,s=[],l){let o=l==null?void 0:l.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(s.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let c=n,d=o==null?void 0:o.errors;if(d!=null){let y=c.findIndex(b=>b.route.id&&(d==null?void 0:d[b.route.id])!==void 0);lt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,y+1))}let f=!1,m=-1;if(l&&o){f=o.renderFallback;for(let y=0;y<c.length;y++){let b=c[y];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=y),b.route.id){let{loaderData:_,errors:T}=o,N=b.route.loader&&!_.hasOwnProperty(b.route.id)&&(!T||T[b.route.id]===void 0);if(b.route.lazy||N){l.isStatic&&(f=!0),m>=0?c=c.slice(0,m+1):c=[c[0]];break}}}}let p=l==null?void 0:l.onError,v=o&&p?(y,b)=>{var _,T;p(y,{location:o.location,params:((T=(_=o.matches)==null?void 0:_[0])==null?void 0:T.params)??{},unstable_pattern:T_(o.matches),errorInfo:b})}:void 0;return c.reduceRight((y,b,_)=>{let T,N=!1,D=null,w=null;o&&(T=d&&b.route.id?d[b.route.id]:void 0,D=b.route.errorElement||z_,f&&(m<0&&_===0?(o0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,w=null):m===_&&(N=!0,w=b.route.hydrateFallbackElement||null)));let j=s.concat(c.slice(0,_+1)),V=()=>{let M;return T?M=D:N?M=w:b.route.Component?M=S.createElement(b.route.Component,null):b.route.element?M=b.route.element:M=y,S.createElement(H_,{match:b,routeContext:{outlet:y,matches:j,isDataRoute:o!=null},children:M})};return o&&(b.route.ErrorBoundary||b.route.errorElement||_===0)?S.createElement(l0,{location:o.location,revalidation:o.revalidation,component:D,error:T,children:V(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:v}):V()},null)}function pf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function G_(n){let s=S.useContext(Li);return lt(s,pf(n)),s}function P_(n){let s=S.useContext(Qr);return lt(s,pf(n)),s}function q_(n){let s=S.useContext(Vn);return lt(s,pf(n)),s}function gf(n){let s=q_(n),l=s.matches[s.matches.length-1];return lt(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function Y_(){return gf("useRouteId")}function K_(){var o;let n=S.useContext(mf),s=P_("useRouteError"),l=gf("useRouteError");return n!==void 0?n:(o=s.errors)==null?void 0:o[l]}function Z_(){let{router:n}=G_("useNavigate"),s=gf("useNavigate"),l=S.useRef(!1);return s0(()=>{l.current=!0}),S.useCallback(async(c,d={})=>{zn(l.current,a0),l.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:s,...d}))},[n,s])}var ov={};function o0(n,s,l){!s&&!ov[n]&&(ov[n]=!0,zn(!1,l))}S.memo(X_);function X_({routes:n,future:s,state:l,isStatic:o,onError:c}){return i0(n,void 0,{state:l,isStatic:o,onError:c})}function Mr({to:n,replace:s,state:l,relative:o}){lt(Bs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c}=S.useContext(En);zn(!c,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=S.useContext(Vn),{pathname:f}=an(),m=Fr(),p=$r(n,hf(d),f,o==="path"),v=JSON.stringify(p);return S.useEffect(()=>{m(JSON.parse(v),{replace:s,state:l,relative:o})},[m,v,o,s,l]),null}function r0(n){return B_(n.context)}function jt(n){lt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function $_({basename:n="/",children:s=null,location:l,navigationType:o="POP",navigator:c,static:d=!1,unstable_useTransitions:f}){lt(!Bs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),p=S.useMemo(()=>({basename:m,navigator:c,static:d,unstable_useTransitions:f,future:{}}),[m,c,d,f]);typeof l=="string"&&(l=Bi(l));let{pathname:v="/",search:y="",hash:b="",state:_=null,key:T="default",unstable_mask:N}=l,D=S.useMemo(()=>{let w=Da(v,m);return w==null?null:{location:{pathname:w,search:y,hash:b,state:_,key:T,unstable_mask:N},navigationType:o}},[m,v,y,b,_,T,o,N]);return zn(D!=null,`<Router basename="${m}"> is not able to match the URL "${v}${y}${b}" because it does not start with the basename, so the <Router> won't render anything.`),D==null?null:S.createElement(En.Provider,{value:p},S.createElement(no.Provider,{children:s,value:D}))}function Q_({children:n,location:s}){return L_(qd(n),s)}function qd(n,s=[]){let l=[];return S.Children.forEach(n,(o,c)=>{if(!S.isValidElement(o))return;let d=[...s,c];if(o.type===S.Fragment){l.push.apply(l,qd(o.props.children,d));return}lt(o.type===jt,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),lt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let f={id:o.props.id||d.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(f.children=qd(o.props.children,d)),l.push(f)}),l}var Or="get",Br="application/x-www-form-urlencoded";function Wr(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function F_(n){return Wr(n)&&n.tagName.toLowerCase()==="button"}function J_(n){return Wr(n)&&n.tagName.toLowerCase()==="form"}function W_(n){return Wr(n)&&n.tagName.toLowerCase()==="input"}function eT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function tT(n,s){return n.button===0&&(!s||s==="_self")&&!eT(n)}function Yd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((s,l)=>{let o=n[l];return s.concat(Array.isArray(o)?o.map(c=>[l,c]):[[l,o]])},[]))}function nT(n,s){let l=Yd(n);return s&&s.forEach((o,c)=>{l.has(c)||s.getAll(c).forEach(d=>{l.append(c,d)})}),l}var jr=null;function aT(){if(jr===null)try{new FormData(document.createElement("form"),0),jr=!1}catch{jr=!0}return jr}var sT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xd(n){return n!=null&&!sT.has(n)?(zn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Br}"`),null):n}function iT(n,s){let l,o,c,d,f;if(J_(n)){let m=n.getAttribute("action");o=m?Da(m,s):null,l=n.getAttribute("method")||Or,c=xd(n.getAttribute("enctype"))||Br,d=new FormData(n)}else if(F_(n)||W_(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||m.getAttribute("action");if(o=p?Da(p,s):null,l=n.getAttribute("formmethod")||m.getAttribute("method")||Or,c=xd(n.getAttribute("formenctype"))||xd(m.getAttribute("enctype"))||Br,d=new FormData(m,n),!aT()){let{name:v,type:y,value:b}=n;if(y==="image"){let _=v?`${v}.`:"";d.append(`${_}x`,"0"),d.append(`${_}y`,"0")}else v&&d.append(v,b)}}else{if(Wr(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Or,o=null,c=Br,f=n}return d&&c==="text/plain"&&(f=d,d=void 0),{action:o,method:l.toLowerCase(),encType:c,formData:d,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vf(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function lT(n,s,l,o){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return l?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${o}`:c.pathname=`${c.pathname}.${o}`:c.pathname==="/"?c.pathname=`_root.${o}`:s&&Da(c.pathname,s)==="/"?c.pathname=`${s.replace(/\/$/,"")}/_root.${o}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${o}`,c}async function oT(n,s){if(n.id in s)return s[n.id];try{let l=await import(n.module);return s[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function rT(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function cT(n,s,l){let o=await Promise.all(n.map(async c=>{let d=s.routes[c.route.id];if(d){let f=await oT(d,l);return f.links?f.links():[]}return[]}));return hT(o.flat(1).filter(rT).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function rv(n,s,l,o,c,d){let f=(p,v)=>l[v]?p.route.id!==l[v].route.id:!0,m=(p,v)=>{var y;return l[v].pathname!==p.pathname||((y=l[v].route.path)==null?void 0:y.endsWith("*"))&&l[v].params["*"]!==p.params["*"]};return d==="assets"?s.filter((p,v)=>f(p,v)||m(p,v)):d==="data"?s.filter((p,v)=>{var b;let y=o.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(f(p,v)||m(p,v))return!0;if(p.route.shouldRevalidate){let _=p.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:((b=l[0])==null?void 0:b.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function uT(n,s,{includeHydrateFallback:l}={}){return dT(n.map(o=>{let c=s.routes[o.route.id];if(!c)return[];let d=[c.module];return c.clientActionModule&&(d=d.concat(c.clientActionModule)),c.clientLoaderModule&&(d=d.concat(c.clientLoaderModule)),l&&c.hydrateFallbackModule&&(d=d.concat(c.hydrateFallbackModule)),c.imports&&(d=d.concat(c.imports)),d}).flat(1))}function dT(n){return[...new Set(n)]}function fT(n){let s={},l=Object.keys(n).sort();for(let o of l)s[o]=n[o];return s}function hT(n,s){let l=new Set;return new Set(s),n.reduce((o,c)=>{let d=JSON.stringify(fT(c));return l.has(d)||(l.add(d),o.push({key:d,link:c})),o},[])}function c0(){let n=S.useContext(Li);return vf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function mT(){let n=S.useContext(Qr);return vf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var yf=S.createContext(void 0);yf.displayName="FrameworkContext";function u0(){let n=S.useContext(yf);return vf(n,"You must render this element inside a <HydratedRouter> element"),n}function pT(n,s){let l=S.useContext(yf),[o,c]=S.useState(!1),[d,f]=S.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:v,onMouseLeave:y,onTouchStart:b}=s,_=S.useRef(null);S.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let D=j=>{j.forEach(V=>{f(V.isIntersecting)})},w=new IntersectionObserver(D,{threshold:.5});return _.current&&w.observe(_.current),()=>{w.disconnect()}}},[n]),S.useEffect(()=>{if(o){let D=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(D)}}},[o]);let T=()=>{c(!0)},N=()=>{c(!1),f(!1)};return l?n!=="intent"?[d,_,{}]:[d,_,{onFocus:Ol(m,T),onBlur:Ol(p,N),onMouseEnter:Ol(v,T),onMouseLeave:Ol(y,N),onTouchStart:Ol(b,T)}]:[!1,_,{}]}function Ol(n,s){return l=>{n&&n(l),l.defaultPrevented||s(l)}}function gT({page:n,...s}){let{router:l}=c0(),o=S.useMemo(()=>Xy(l.routes,n,l.basename),[l.routes,n,l.basename]);return o?S.createElement(yT,{page:n,matches:o,...s}):null}function vT(n){let{manifest:s,routeModules:l}=u0(),[o,c]=S.useState([]);return S.useEffect(()=>{let d=!1;return cT(n,s,l).then(f=>{d||c(f)}),()=>{d=!0}},[n,s,l]),o}function yT({page:n,matches:s,...l}){let o=an(),{future:c,manifest:d,routeModules:f}=u0(),{basename:m}=c0(),{loaderData:p,matches:v}=mT(),y=S.useMemo(()=>rv(n,s,v,d,o,"data"),[n,s,v,d,o]),b=S.useMemo(()=>rv(n,s,v,d,o,"assets"),[n,s,v,d,o]),_=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let D=new Set,w=!1;if(s.forEach(V=>{var $;let M=d.routes[V.route.id];!M||!M.hasLoader||(!y.some(H=>H.route.id===V.route.id)&&V.route.id in p&&(($=f[V.route.id])!=null&&$.shouldRevalidate)||M.hasClientLoader?w=!0:D.add(V.route.id))}),D.size===0)return[];let j=lT(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return w&&D.size>0&&j.searchParams.set("_routes",s.filter(V=>D.has(V.route.id)).map(V=>V.route.id).join(",")),[j.pathname+j.search]},[m,c.unstable_trailingSlashAwareDataRequests,p,o,d,y,s,n,f]),T=S.useMemo(()=>uT(b,d),[b,d]),N=vT(b);return S.createElement(S.Fragment,null,_.map(D=>S.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...l})),T.map(D=>S.createElement("link",{key:D,rel:"modulepreload",href:D,...l})),N.map(({key:D,link:w})=>S.createElement("link",{key:D,nonce:l.nonce,...w,crossOrigin:w.crossOrigin??l.crossOrigin})))}function bT(...n){return s=>{n.forEach(l=>{typeof l=="function"?l(s):l!=null&&(l.current=s)})}}var ST=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ST&&(window.__reactRouterVersion="7.13.1")}catch{}function xT({basename:n,children:s,unstable_useTransitions:l,window:o}){let c=S.useRef();c.current==null&&(c.current=W1({window:o,v5Compat:!0}));let d=c.current,[f,m]=S.useState({action:d.action,location:d.location}),p=S.useCallback(v=>{l===!1?m(v):S.startTransition(()=>m(v))},[l]);return S.useLayoutEffect(()=>d.listen(p),[d,p]),S.createElement($_,{basename:n,children:s,location:f.location,navigationType:f.action,navigator:d,unstable_useTransitions:l})}var d0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bf=S.forwardRef(function({onClick:s,discover:l="render",prefetch:o="none",relative:c,reloadDocument:d,replace:f,unstable_mask:m,state:p,target:v,to:y,preventScrollReset:b,viewTransition:_,unstable_defaultShouldRevalidate:T,...N},D){let{basename:w,navigator:j,unstable_useTransitions:V}=S.useContext(En),M=typeof y=="string"&&d0.test(y),$=Wy(y,w);y=$.to;let H=R_(y,{relative:c}),J=an(),te=null;if(m){let G=$r(m,[],J.unstable_mask?J.unstable_mask.pathname:"/",!0);w!=="/"&&(G.pathname=G.pathname==="/"?w:aa([w,G.pathname])),te=j.createHref(G)}let[K,W,he]=pT(o,N),R=jT(y,{replace:f,unstable_mask:m,state:p,target:v,preventScrollReset:b,relative:c,viewTransition:_,unstable_defaultShouldRevalidate:T,unstable_useTransitions:V});function ge(G){s&&s(G),G.defaultPrevented||R(G)}let ne=!($.isExternal||d),je=S.createElement("a",{...N,...he,href:(ne?te:void 0)||$.absoluteURL||H,onClick:ne?ge:s,ref:bT(D,W),target:v,"data-discover":!M&&l==="render"?"true":void 0});return K&&!M?S.createElement(S.Fragment,null,je,S.createElement(gT,{page:H})):je});bf.displayName="Link";var _T=S.forwardRef(function({"aria-current":s="page",caseSensitive:l=!1,className:o="",end:c=!1,style:d,to:f,viewTransition:m,children:p,...v},y){let b=ao(f,{relative:v.relative}),_=an(),T=S.useContext(Qr),{navigator:N,basename:D}=S.useContext(En),w=T!=null&&DT(b)&&m===!0,j=N.encodeLocation?N.encodeLocation(b).pathname:b.pathname,V=_.pathname,M=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;l||(V=V.toLowerCase(),M=M?M.toLowerCase():null,j=j.toLowerCase()),M&&D&&(M=Da(M,D)||M);const $=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let H=V===j||!c&&V.startsWith(j)&&V.charAt($)==="/",J=M!=null&&(M===j||!c&&M.startsWith(j)&&M.charAt(j.length)==="/"),te={isActive:H,isPending:J,isTransitioning:w},K=H?s:void 0,W;typeof o=="function"?W=o(te):W=[o,H?"active":null,J?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let he=typeof d=="function"?d(te):d;return S.createElement(bf,{...v,"aria-current":K,className:W,ref:y,style:he,to:f,viewTransition:m},typeof p=="function"?p(te):p)});_T.displayName="NavLink";var TT=S.forwardRef(({discover:n="render",fetcherKey:s,navigate:l,reloadDocument:o,replace:c,state:d,method:f=Or,action:m,onSubmit:p,relative:v,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:_,...T},N)=>{let{unstable_useTransitions:D}=S.useContext(En),w=NT(),j=wT(m,{relative:v}),V=f.toLowerCase()==="get"?"get":"post",M=typeof m=="string"&&d0.test(m),$=H=>{if(p&&p(H),H.defaultPrevented)return;H.preventDefault();let J=H.nativeEvent.submitter,te=(J==null?void 0:J.getAttribute("formmethod"))||f,K=()=>w(J||H.currentTarget,{fetcherKey:s,method:te,navigate:l,replace:c,state:d,relative:v,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:_});D&&l!==!1?S.startTransition(()=>K()):K()};return S.createElement("form",{ref:N,method:V,action:j,onSubmit:o?p:$,...T,"data-discover":!M&&n==="render"?"true":void 0})});TT.displayName="Form";function ET(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function f0(n){let s=S.useContext(Li);return lt(s,ET(n)),s}function jT(n,{target:s,replace:l,unstable_mask:o,state:c,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:p,unstable_useTransitions:v}={}){let y=Fr(),b=an(),_=ao(n,{relative:f});return S.useCallback(T=>{if(tT(T,s)){T.preventDefault();let N=l!==void 0?l:Zl(b)===Zl(_),D=()=>y(n,{replace:N,unstable_mask:o,state:c,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:p});v?S.startTransition(()=>D()):D()}},[b,y,_,l,o,c,s,n,d,f,m,p,v])}function Sf(n){zn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let s=S.useRef(Yd(n)),l=S.useRef(!1),o=an(),c=S.useMemo(()=>nT(o.search,l.current?null:s.current),[o.search]),d=Fr(),f=S.useCallback((m,p)=>{const v=Yd(typeof m=="function"?m(new URLSearchParams(c)):m);l.current=!0,d("?"+v,p)},[d,c]);return[c,f]}var CT=0,AT=()=>`__${String(++CT)}__`;function NT(){let{router:n}=f0("useSubmit"),{basename:s}=S.useContext(En),l=Y_(),o=n.fetch,c=n.navigate;return S.useCallback(async(d,f={})=>{let{action:m,method:p,encType:v,formData:y,body:b}=iT(d,s);if(f.navigate===!1){let _=f.fetcherKey||AT();await o(_,l,f.action||m,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:b,formMethod:f.method||p,formEncType:f.encType||v,flushSync:f.flushSync})}else await c(f.action||m,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:b,formMethod:f.method||p,formEncType:f.encType||v,replace:f.replace,state:f.state,fromRouteId:l,flushSync:f.flushSync,viewTransition:f.viewTransition})},[o,c,s,l])}function wT(n,{relative:s}={}){let{basename:l}=S.useContext(En),o=S.useContext(Vn);lt(o,"useFormAction must be used inside a RouteContext");let[c]=o.matches.slice(-1),d={...ao(n||".",{relative:s})},f=an();if(n==null){d.search=f.search;let m=new URLSearchParams(d.search),p=m.getAll("index");if(p.some(y=>y==="")){m.delete("index"),p.filter(b=>b).forEach(b=>m.append("index",b));let y=m.toString();d.search=y?`?${y}`:""}}return(!n||n===".")&&c.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(d.pathname=d.pathname==="/"?l:aa([l,d.pathname])),Zl(d)}function DT(n,{relative:s}={}){let l=S.useContext(t0);lt(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=f0("useViewTransitionState"),c=ao(n,{relative:s});if(!l.isTransitioning)return!1;let d=Da(l.currentLocation.pathname,o)||l.currentLocation.pathname,f=Da(l.nextLocation.pathname,o)||l.nextLocation.pathname;return Xl(c.pathname,f)!=null||Xl(c.pathname,d)!=null}function oa(){const n=Fr();return S.useCallback((s,l)=>{typeof s=="number"?n(s):n(s,l)},[n])}function h0(n){return`/sessions/${encodeURIComponent(n)}`}function $l(n){return`/projects/${encodeURIComponent(n)}`}function Di(n,s){const l=`/tasks/${encodeURIComponent(n)}`;return s?`${l}/${s}`:l}function kT(n){return`/tasks/${encodeURIComponent(n)}/edit`}function ki(n,s){const l=new URLSearchParams({project:n});return s&&l.set("parent",s),`/tasks/new?${l.toString()}`}function m0(n,s){return`/sessions/new?${new URLSearchParams({env:n,runtime:s}).toString()}`}const cv="/environments/new",wi="/settings",RT="_container_1he30_1",MT="_brand_1he30_27",OT="_info_1he30_43",BT="_connectionDot_1he30_51",LT="_connected_1he30_54",UT="_disconnected_1he30_58",zT="_settingsButton_1he30_62",As={container:RT,brand:MT,info:OT,connectionDot:BT,connected:LT,disconnected:UT,settingsButton:zT};function VT(){const{connected:n,environments:s,sessions:l}=Ft(),o=oa(),c=s.length,d=s.filter(m=>m.status==="connected").length,f=l.filter(m=>["running","idle"].includes(m.status)).length;return h.jsxs("div",{className:As.container,children:[h.jsx("button",{type:"button",className:As.brand,onClick:()=>o("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:As.info,children:[h.jsxs("span",{children:[h.jsx("span",{className:`${As.connectionDot} ${n?As.connected:As.disconnected}`,children:"●"})," ",n?"Connected":"Disconnected"]}),h.jsxs("span",{children:[d,"/",c," env",c!==1?"s":""]}),h.jsxs("span",{children:[f," active"]}),h.jsx("button",{className:As.settingsButton,onClick:()=>o(wi),title:"Settings",children:"⚙"})]})]})}const xf=S.createContext({});function _f(n){const s=S.useRef(null);return s.current===null&&(s.current=n()),s.current}const ec=S.createContext(null),Tf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class HT extends S.Component{getSnapshotBeforeUpdate(s){const l=this.props.childRef.current;if(l&&s.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=l.offsetHeight||0,o.width=l.offsetWidth||0,o.top=l.offsetTop,o.left=l.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function IT({children:n,isPresent:s}){const l=S.useId(),o=S.useRef(null),c=S.useRef({width:0,height:0,top:0,left:0}),{nonce:d}=S.useContext(Tf);return S.useInsertionEffect(()=>{const{width:f,height:m,top:p,left:v}=c.current;if(s||!o.current||!f||!m)return;o.current.dataset.motionPopId=l;const y=document.createElement("style");return d&&(y.nonce=d),document.head.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
79
|
-
[data-motion-pop-id="${l}"] {
|
|
80
|
-
position: absolute !important;
|
|
81
|
-
width: ${f}px !important;
|
|
82
|
-
height: ${m}px !important;
|
|
83
|
-
top: ${p}px !important;
|
|
84
|
-
left: ${v}px !important;
|
|
85
|
-
}
|
|
86
|
-
`),()=>{document.head.removeChild(y)}},[s]),h.jsx(HT,{isPresent:s,childRef:o,sizeRef:c,children:S.cloneElement(n,{ref:o})})}const GT=({children:n,initial:s,isPresent:l,onExitComplete:o,custom:c,presenceAffectsLayout:d,mode:f})=>{const m=_f(PT),p=S.useId(),v=S.useCallback(b=>{m.set(b,!0);for(const _ of m.values())if(!_)return;o&&o()},[m,o]),y=S.useMemo(()=>({id:p,initial:s,isPresent:l,custom:c,onExitComplete:v,register:b=>(m.set(b,!1),()=>m.delete(b))}),d?[Math.random(),v]:[l,v]);return S.useMemo(()=>{m.forEach((b,_)=>m.set(_,!1))},[l]),S.useEffect(()=>{!l&&!m.size&&o&&o()},[l]),f==="popLayout"&&(n=h.jsx(IT,{isPresent:l,children:n})),h.jsx(ec.Provider,{value:y,children:n})};function PT(){return new Map}function p0(n=!0){const s=S.useContext(ec);if(s===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:c}=s,d=S.useId();S.useEffect(()=>{n&&c(d)},[n]);const f=S.useCallback(()=>n&&o&&o(d),[d,o,n]);return!l&&o?[!1,f]:[!0]}const Cr=n=>n.key||"";function uv(n){const s=[];return S.Children.forEach(n,l=>{S.isValidElement(l)&&s.push(l)}),s}const Ef=typeof window<"u",g0=Ef?S.useLayoutEffect:S.useEffect,Ui=({children:n,custom:s,initial:l=!0,onExitComplete:o,presenceAffectsLayout:c=!0,mode:d="sync",propagate:f=!1})=>{const[m,p]=p0(f),v=S.useMemo(()=>uv(n),[n]),y=f&&!m?[]:v.map(Cr),b=S.useRef(!0),_=S.useRef(v),T=_f(()=>new Map),[N,D]=S.useState(v),[w,j]=S.useState(v);g0(()=>{b.current=!1,_.current=v;for(let $=0;$<w.length;$++){const H=Cr(w[$]);y.includes(H)?T.delete(H):T.get(H)!==!0&&T.set(H,!1)}},[w,y.length,y.join("-")]);const V=[];if(v!==N){let $=[...v];for(let H=0;H<w.length;H++){const J=w[H],te=Cr(J);y.includes(te)||($.splice(H,0,J),V.push(J))}d==="wait"&&V.length&&($=V),j(uv($)),D(v);return}const{forceRender:M}=S.useContext(xf);return h.jsx(h.Fragment,{children:w.map($=>{const H=Cr($),J=f&&!m?!1:v===w||y.includes(H),te=()=>{if(T.has(H))T.set(H,!0);else return;let K=!0;T.forEach(W=>{W||(K=!1)}),K&&(M==null||M(),j(_.current),f&&(p==null||p()),o&&o())};return h.jsx(GT,{isPresent:J,initial:!b.current||l?void 0:!1,custom:J?void 0:s,presenceAffectsLayout:c,mode:d,onExitComplete:J?void 0:te,children:$},H)})})},_n=n=>n;let v0=_n;const qT={useManualTiming:!1};function YT(n){let s=new Set,l=new Set,o=!1,c=!1;const d=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function m(v){d.has(v)&&(p.schedule(v),n()),v(f)}const p={schedule:(v,y=!1,b=!1)=>{const T=b&&o?s:l;return y&&d.add(v),T.has(v)||T.add(v),v},cancel:v=>{l.delete(v),d.delete(v)},process:v=>{if(f=v,o){c=!0;return}o=!0,[s,l]=[l,s],s.forEach(m),s.clear(),o=!1,c&&(c=!1,p.process(v))}};return p}const Ar=["read","resolveKeyframes","update","preRender","render","postRender"],KT=40;function y0(n,s){let l=!1,o=!0;const c={delta:0,timestamp:0,isProcessing:!1},d=()=>l=!0,f=Ar.reduce((j,V)=>(j[V]=YT(d),j),{}),{read:m,resolveKeyframes:p,update:v,preRender:y,render:b,postRender:_}=f,T=()=>{const j=performance.now();l=!1,c.delta=o?1e3/60:Math.max(Math.min(j-c.timestamp,KT),1),c.timestamp=j,c.isProcessing=!0,m.process(c),p.process(c),v.process(c),y.process(c),b.process(c),_.process(c),c.isProcessing=!1,l&&s&&(o=!1,n(T))},N=()=>{l=!0,o=!0,c.isProcessing||n(T)};return{schedule:Ar.reduce((j,V)=>{const M=f[V];return j[V]=($,H=!1,J=!1)=>(l||N(),M.schedule($,H,J)),j},{}),cancel:j=>{for(let V=0;V<Ar.length;V++)f[Ar[V]].cancel(j)},state:c,steps:f}}const{schedule:ot,cancel:ls,state:qt,steps:_d}=y0(typeof requestAnimationFrame<"u"?requestAnimationFrame:_n,!0),b0=S.createContext({strict:!1}),dv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ri={};for(const n in dv)Ri[n]={isEnabled:s=>dv[n].some(l=>!!s[l])};function ZT(n){for(const s in n)Ri[s]={...Ri[s],...n[s]}}const XT=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Hr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||XT.has(n)}let S0=n=>!Hr(n);function $T(n){n&&(S0=s=>s.startsWith("on")?!Hr(s):n(s))}try{$T(require("@emotion/is-prop-valid").default)}catch{}function QT(n,s,l){const o={};for(const c in n)c==="values"&&typeof n.values=="object"||(S0(c)||l===!0&&Hr(c)||!s&&!Hr(c)||n.draggable&&c.startsWith("onDrag"))&&(o[c]=n[c]);return o}function FT(n){if(typeof Proxy>"u")return n;const s=new Map,l=(...o)=>n(...o);return new Proxy(l,{get:(o,c)=>c==="create"?n:(s.has(c)||s.set(c,n(c)),s.get(c))})}const tc=S.createContext({});function Ql(n){return typeof n=="string"||Array.isArray(n)}function nc(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const jf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Cf=["initial",...jf];function ac(n){return nc(n.animate)||Cf.some(s=>Ql(n[s]))}function x0(n){return!!(ac(n)||n.variants)}function JT(n,s){if(ac(n)){const{initial:l,animate:o}=n;return{initial:l===!1||Ql(l)?l:void 0,animate:Ql(o)?o:void 0}}return n.inherit!==!1?s:{}}function WT(n){const{initial:s,animate:l}=JT(n,S.useContext(tc));return S.useMemo(()=>({initial:s,animate:l}),[fv(s),fv(l)])}function fv(n){return Array.isArray(n)?n.join(" "):n}const eE=Symbol.for("motionComponentSymbol");function Ei(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function tE(n,s,l){return S.useCallback(o=>{o&&n.onMount&&n.onMount(o),s&&(o?s.mount(o):s.unmount()),l&&(typeof l=="function"?l(o):Ei(l)&&(l.current=o))},[s])}const Af=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),nE="framerAppearId",_0="data-"+Af(nE),{schedule:Nf}=y0(queueMicrotask,!1),T0=S.createContext({});function aE(n,s,l,o,c){var d,f;const{visualElement:m}=S.useContext(tc),p=S.useContext(b0),v=S.useContext(ec),y=S.useContext(Tf).reducedMotion,b=S.useRef(null);o=o||p.renderer,!b.current&&o&&(b.current=o(n,{visualState:s,parent:m,props:l,presenceContext:v,blockInitialAnimation:v?v.initial===!1:!1,reducedMotionConfig:y}));const _=b.current,T=S.useContext(T0);_&&!_.projection&&c&&(_.type==="html"||_.type==="svg")&&sE(b.current,l,c,T);const N=S.useRef(!1);S.useInsertionEffect(()=>{_&&N.current&&_.update(l,v)});const D=l[_0],w=S.useRef(!!D&&!(!((d=window.MotionHandoffIsComplete)===null||d===void 0)&&d.call(window,D))&&((f=window.MotionHasOptimisedAnimation)===null||f===void 0?void 0:f.call(window,D)));return g0(()=>{_&&(N.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),Nf.render(_.render),w.current&&_.animationState&&_.animationState.animateChanges())}),S.useEffect(()=>{_&&(!w.current&&_.animationState&&_.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)===null||j===void 0||j.call(window,D)}),w.current=!1))}),_}function sE(n,s,l,o){const{layoutId:c,layout:d,drag:f,dragConstraints:m,layoutScroll:p,layoutRoot:v}=s;n.projection=new l(n.latestValues,s["data-framer-portal-id"]?void 0:E0(n.parent)),n.projection.setOptions({layoutId:c,layout:d,alwaysMeasureLayout:!!f||m&&Ei(m),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:o,layoutScroll:p,layoutRoot:v})}function E0(n){if(n)return n.options.allowProjection!==!1?n.projection:E0(n.parent)}function iE({preloadedFeatures:n,createVisualElement:s,useRender:l,useVisualState:o,Component:c}){var d,f;n&&ZT(n);function m(v,y){let b;const _={...S.useContext(Tf),...v,layoutId:lE(v)},{isStatic:T}=_,N=WT(v),D=o(v,T);if(!T&&Ef){oE();const w=rE(_);b=w.MeasureLayout,N.visualElement=aE(c,D,_,s,w.ProjectionNode)}return h.jsxs(tc.Provider,{value:N,children:[b&&N.visualElement?h.jsx(b,{visualElement:N.visualElement,..._}):null,l(c,v,tE(D,N.visualElement,y),D,T,N.visualElement)]})}m.displayName=`motion.${typeof c=="string"?c:`create(${(f=(d=c.displayName)!==null&&d!==void 0?d:c.name)!==null&&f!==void 0?f:""})`}`;const p=S.forwardRef(m);return p[eE]=c,p}function lE({layoutId:n}){const s=S.useContext(xf).id;return s&&n!==void 0?s+"-"+n:n}function oE(n,s){S.useContext(b0).strict}function rE(n){const{drag:s,layout:l}=Ri;if(!s&&!l)return{};const o={...s,...l};return{MeasureLayout:s!=null&&s.isEnabled(n)||l!=null&&l.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const cE=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function wf(n){return typeof n!="string"||n.includes("-")?!1:!!(cE.indexOf(n)>-1||/[A-Z]/u.test(n))}function hv(n){const s=[{},{}];return n==null||n.values.forEach((l,o)=>{s[0][o]=l.get(),s[1][o]=l.getVelocity()}),s}function Df(n,s,l,o){if(typeof s=="function"){const[c,d]=hv(o);s=s(l!==void 0?l:n.custom,c,d)}if(typeof s=="string"&&(s=n.variants&&n.variants[s]),typeof s=="function"){const[c,d]=hv(o);s=s(l!==void 0?l:n.custom,c,d)}return s}const Kd=n=>Array.isArray(n),uE=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),dE=n=>Kd(n)?n[n.length-1]||0:n,$t=n=>!!(n&&n.getVelocity);function Lr(n){const s=$t(n)?n.get():n;return uE(s)?s.toValue():s}function fE({scrapeMotionValuesFromProps:n,createRenderState:s,onUpdate:l},o,c,d){const f={latestValues:hE(o,c,d,n),renderState:s()};return l&&(f.onMount=m=>l({props:o,current:m,...f}),f.onUpdate=m=>l(m)),f}const j0=n=>(s,l)=>{const o=S.useContext(tc),c=S.useContext(ec),d=()=>fE(n,s,o,c);return l?d():_f(d)};function hE(n,s,l,o){const c={},d=o(n,{});for(const _ in d)c[_]=Lr(d[_]);let{initial:f,animate:m}=n;const p=ac(n),v=x0(n);s&&v&&!p&&n.inherit!==!1&&(f===void 0&&(f=s.initial),m===void 0&&(m=s.animate));let y=l?l.initial===!1:!1;y=y||f===!1;const b=y?m:f;if(b&&typeof b!="boolean"&&!nc(b)){const _=Array.isArray(b)?b:[b];for(let T=0;T<_.length;T++){const N=Df(n,_[T]);if(N){const{transitionEnd:D,transition:w,...j}=N;for(const V in j){let M=j[V];if(Array.isArray(M)){const $=y?M.length-1:0;M=M[$]}M!==null&&(c[V]=M)}for(const V in D)c[V]=D[V]}}}return c}const zi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ls=new Set(zi),C0=n=>s=>typeof s=="string"&&s.startsWith(n),A0=C0("--"),mE=C0("var(--"),kf=n=>mE(n)?pE.test(n.split("/*")[0].trim()):!1,pE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,N0=(n,s)=>s&&typeof n=="number"?s.transform(n):n,ka=(n,s,l)=>l>s?s:l<n?n:l,Vi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Fl={...Vi,transform:n=>ka(0,1,n)},Nr={...Vi,default:1},so=n=>({test:s=>typeof s=="string"&&s.endsWith(n)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${n}`}),as=so("deg"),sa=so("%"),be=so("px"),gE=so("vh"),vE=so("vw"),mv={...sa,parse:n=>sa.parse(n)/100,transform:n=>sa.transform(n*100)},yE={borderWidth:be,borderTopWidth:be,borderRightWidth:be,borderBottomWidth:be,borderLeftWidth:be,borderRadius:be,radius:be,borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomRightRadius:be,borderBottomLeftRadius:be,width:be,maxWidth:be,height:be,maxHeight:be,top:be,right:be,bottom:be,left:be,padding:be,paddingTop:be,paddingRight:be,paddingBottom:be,paddingLeft:be,margin:be,marginTop:be,marginRight:be,marginBottom:be,marginLeft:be,backgroundPositionX:be,backgroundPositionY:be},bE={rotate:as,rotateX:as,rotateY:as,rotateZ:as,scale:Nr,scaleX:Nr,scaleY:Nr,scaleZ:Nr,skew:as,skewX:as,skewY:as,distance:be,translateX:be,translateY:be,translateZ:be,x:be,y:be,z:be,perspective:be,transformPerspective:be,opacity:Fl,originX:mv,originY:mv,originZ:be},pv={...Vi,transform:Math.round},Rf={...yE,...bE,zIndex:pv,size:be,fillOpacity:Fl,strokeOpacity:Fl,numOctaves:pv},SE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xE=zi.length;function _E(n,s,l){let o="",c=!0;for(let d=0;d<xE;d++){const f=zi[d],m=n[f];if(m===void 0)continue;let p=!0;if(typeof m=="number"?p=m===(f.startsWith("scale")?1:0):p=parseFloat(m)===0,!p||l){const v=N0(m,Rf[f]);if(!p){c=!1;const y=SE[f]||f;o+=`${y}(${v}) `}l&&(s[f]=v)}}return o=o.trim(),l?o=l(s,c?"":o):c&&(o="none"),o}function Mf(n,s,l){const{style:o,vars:c,transformOrigin:d}=n;let f=!1,m=!1;for(const p in s){const v=s[p];if(Ls.has(p)){f=!0;continue}else if(A0(p)){c[p]=v;continue}else{const y=N0(v,Rf[p]);p.startsWith("origin")?(m=!0,d[p]=y):o[p]=y}}if(s.transform||(f||l?o.transform=_E(s,n.transform,l):o.transform&&(o.transform="none")),m){const{originX:p="50%",originY:v="50%",originZ:y=0}=d;o.transformOrigin=`${p} ${v} ${y}`}}const TE={offset:"stroke-dashoffset",array:"stroke-dasharray"},EE={offset:"strokeDashoffset",array:"strokeDasharray"};function jE(n,s,l=1,o=0,c=!0){n.pathLength=1;const d=c?TE:EE;n[d.offset]=be.transform(-o);const f=be.transform(s),m=be.transform(l);n[d.array]=`${f} ${m}`}function gv(n,s,l){return typeof n=="string"?n:be.transform(s+l*n)}function CE(n,s,l){const o=gv(s,n.x,n.width),c=gv(l,n.y,n.height);return`${o} ${c}`}function Of(n,{attrX:s,attrY:l,attrScale:o,originX:c,originY:d,pathLength:f,pathSpacing:m=1,pathOffset:p=0,...v},y,b){if(Mf(n,v,b),y){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:T,dimensions:N}=n;_.transform&&(N&&(T.transform=_.transform),delete _.transform),N&&(c!==void 0||d!==void 0||T.transform)&&(T.transformOrigin=CE(N,c!==void 0?c:.5,d!==void 0?d:.5)),s!==void 0&&(_.x=s),l!==void 0&&(_.y=l),o!==void 0&&(_.scale=o),f!==void 0&&jE(_,f,m,p,!1)}const Bf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),w0=()=>({...Bf(),attrs:{}}),Lf=n=>typeof n=="string"&&n.toLowerCase()==="svg";function D0(n,{style:s,vars:l},o,c){Object.assign(n.style,s,c&&c.getProjectionStyles(o));for(const d in l)n.style.setProperty(d,l[d])}const k0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function R0(n,s,l,o){D0(n,s,void 0,o);for(const c in s.attrs)n.setAttribute(k0.has(c)?c:Af(c),s.attrs[c])}const Ir={};function AE(n){Object.assign(Ir,n)}function M0(n,{layout:s,layoutId:l}){return Ls.has(n)||n.startsWith("origin")||(s||l!==void 0)&&(!!Ir[n]||n==="opacity")}function Uf(n,s,l){var o;const{style:c}=n,d={};for(const f in c)($t(c[f])||s.style&&$t(s.style[f])||M0(f,n)||((o=l==null?void 0:l.getValue(f))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(d[f]=c[f]);return d}function O0(n,s,l){const o=Uf(n,s,l);for(const c in n)if($t(n[c])||$t(s[c])){const d=zi.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;o[d]=n[c]}return o}function NE(n,s){try{s.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{s.dimensions={x:0,y:0,width:0,height:0}}}const vv=["x","y","width","height","cx","cy","r"],wE={useVisualState:j0({scrapeMotionValuesFromProps:O0,createRenderState:w0,onUpdate:({props:n,prevProps:s,current:l,renderState:o,latestValues:c})=>{if(!l)return;let d=!!n.drag;if(!d){for(const m in c)if(Ls.has(m)){d=!0;break}}if(!d)return;let f=!s;if(s)for(let m=0;m<vv.length;m++){const p=vv[m];n[p]!==s[p]&&(f=!0)}f&&ot.read(()=>{NE(l,o),ot.render(()=>{Of(o,c,Lf(l.tagName),n.transformTemplate),R0(l,o)})})}})},DE={useVisualState:j0({scrapeMotionValuesFromProps:Uf,createRenderState:Bf})};function B0(n,s,l){for(const o in s)!$t(s[o])&&!M0(o,l)&&(n[o]=s[o])}function kE({transformTemplate:n},s){return S.useMemo(()=>{const l=Bf();return Mf(l,s,n),Object.assign({},l.vars,l.style)},[s])}function RE(n,s){const l=n.style||{},o={};return B0(o,l,n),Object.assign(o,kE(n,s)),o}function ME(n,s){const l={},o=RE(n,s);return n.drag&&n.dragListener!==!1&&(l.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(l.tabIndex=0),l.style=o,l}function OE(n,s,l,o){const c=S.useMemo(()=>{const d=w0();return Of(d,s,Lf(o),n.transformTemplate),{...d.attrs,style:{...d.style}}},[s]);if(n.style){const d={};B0(d,n.style,n),c.style={...d,...c.style}}return c}function BE(n=!1){return(l,o,c,{latestValues:d},f)=>{const p=(wf(l)?OE:ME)(o,d,f,l),v=QT(o,typeof l=="string",n),y=l!==S.Fragment?{...v,...p,ref:c}:{},{children:b}=o,_=S.useMemo(()=>$t(b)?b.get():b,[b]);return S.createElement(l,{...y,children:_})}}function LE(n,s){return function(o,{forwardMotionProps:c}={forwardMotionProps:!1}){const f={...wf(o)?wE:DE,preloadedFeatures:n,useRender:BE(c),createVisualElement:s,Component:o};return iE(f)}}function L0(n,s){if(!Array.isArray(s))return!1;const l=s.length;if(l!==n.length)return!1;for(let o=0;o<l;o++)if(s[o]!==n[o])return!1;return!0}function sc(n,s,l){const o=n.getProps();return Df(o,s,l!==void 0?l:o.custom,n)}function zf(n,s){return n?n[s]||n.default||n:void 0}const U0=new Set(["width","height","top","left","right","bottom",...zi]);let Ur;function UE(){Ur=void 0}const ia={now:()=>(Ur===void 0&&ia.set(qt.isProcessing||qT.useManualTiming?qt.timestamp:performance.now()),Ur),set:n=>{Ur=n,queueMicrotask(UE)}};function Vf(n,s){n.indexOf(s)===-1&&n.push(s)}function Hf(n,s){const l=n.indexOf(s);l>-1&&n.splice(l,1)}class If{constructor(){this.subscriptions=[]}add(s){return Vf(this.subscriptions,s),()=>Hf(this.subscriptions,s)}notify(s,l,o){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](s,l,o);else for(let d=0;d<c;d++){const f=this.subscriptions[d];f&&f(s,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function z0(n,s){return s?n*(1e3/s):0}const yv=30,zE=n=>!isNaN(parseFloat(n));class VE{constructor(s,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,c=!0)=>{const d=ia.now();this.updatedAt!==d&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),c&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(s),this.owner=l.owner}setCurrent(s){this.current=s,this.updatedAt=ia.now(),this.canTrackVelocity===null&&s!==void 0&&(this.canTrackVelocity=zE(this.current))}setPrevFrameValue(s=this.current){this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt}onChange(s){return this.on("change",s)}on(s,l){this.events[s]||(this.events[s]=new If);const o=this.events[s].add(l);return s==="change"?()=>{o(),ot.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const s in this.events)this.events[s].clear()}attach(s,l){this.passiveEffect=s,this.stopPassiveEffect=l}set(s,l=!0){!l||!this.passiveEffect?this.updateAndNotify(s,l):this.passiveEffect(s,this.updateAndNotify)}setWithVelocity(s,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt-o}jump(s,l=!0){this.updateAndNotify(s),this.prev=s,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const s=ia.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||s-this.updatedAt>yv)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,yv);return z0(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(s){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=s(l),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Jl(n,s){return new VE(n,s)}function HE(n,s,l){n.hasValue(s)?n.getValue(s).set(l):n.addValue(s,Jl(l))}function IE(n,s){const l=sc(n,s);let{transitionEnd:o={},transition:c={},...d}=l||{};d={...d,...o};for(const f in d){const m=dE(d[f]);HE(n,f,m)}}function GE(n){return!!($t(n)&&n.add)}function Zd(n,s){const l=n.getValue("willChange");if(GE(l))return l.add(s)}function V0(n){return n.props[_0]}function Gf(n){let s;return()=>(s===void 0&&(s=n()),s)}const PE=Gf(()=>window.ScrollTimeline!==void 0);class qE{constructor(s){this.stop=()=>this.runAll("stop"),this.animations=s.filter(Boolean)}get finished(){return Promise.all(this.animations.map(s=>"finished"in s?s.finished:s))}getAll(s){return this.animations[0][s]}setAll(s,l){for(let o=0;o<this.animations.length;o++)this.animations[o][s]=l}attachTimeline(s,l){const o=this.animations.map(c=>{if(PE()&&c.attachTimeline)return c.attachTimeline(s);if(typeof l=="function")return l(c)});return()=>{o.forEach((c,d)=>{c&&c(),this.animations[d].stop()})}}get time(){return this.getAll("time")}set time(s){this.setAll("time",s)}get speed(){return this.getAll("speed")}set speed(s){this.setAll("speed",s)}get startTime(){return this.getAll("startTime")}get duration(){let s=0;for(let l=0;l<this.animations.length;l++)s=Math.max(s,this.animations[l].duration);return s}runAll(s){this.animations.forEach(l=>l[s]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class YE extends qE{then(s,l){return Promise.all(this.animations).then(s).catch(l)}}const Na=n=>n*1e3,wa=n=>n/1e3;function Pf(n){return typeof n=="function"}function bv(n,s){n.timeline=s,n.onfinish=null}const qf=n=>Array.isArray(n)&&typeof n[0]=="number",KE={linearEasing:void 0};function ZE(n,s){const l=Gf(n);return()=>{var o;return(o=KE[s])!==null&&o!==void 0?o:l()}}const Gr=ZE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mi=(n,s,l)=>{const o=s-n;return o===0?1:(l-n)/o},H0=(n,s,l=10)=>{let o="";const c=Math.max(Math.round(s/l),2);for(let d=0;d<c;d++)o+=n(Mi(0,c-1,d))+", ";return`linear(${o.substring(0,o.length-2)})`};function I0(n){return!!(typeof n=="function"&&Gr()||!n||typeof n=="string"&&(n in Xd||Gr())||qf(n)||Array.isArray(n)&&n.every(I0))}const zl=([n,s,l,o])=>`cubic-bezier(${n}, ${s}, ${l}, ${o})`,Xd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:zl([0,.65,.55,1]),circOut:zl([.55,0,1,.45]),backIn:zl([.31,.01,.66,-.59]),backOut:zl([.33,1.53,.69,.99])};function G0(n,s){if(n)return typeof n=="function"&&Gr()?H0(n,s):qf(n)?zl(n):Array.isArray(n)?n.map(l=>G0(l,s)||Xd.easeOut):Xd[n]}const P0=(n,s,l)=>(((1-3*l+3*s)*n+(3*l-6*s))*n+3*s)*n,XE=1e-7,$E=12;function QE(n,s,l,o,c){let d,f,m=0;do f=s+(l-s)/2,d=P0(f,o,c)-n,d>0?l=f:s=f;while(Math.abs(d)>XE&&++m<$E);return f}function io(n,s,l,o){if(n===s&&l===o)return _n;const c=d=>QE(d,0,1,n,l);return d=>d===0||d===1?d:P0(c(d),s,o)}const q0=n=>s=>s<=.5?n(2*s)/2:(2-n(2*(1-s)))/2,Y0=n=>s=>1-n(1-s),K0=io(.33,1.53,.69,.99),Yf=Y0(K0),Z0=q0(Yf),X0=n=>(n*=2)<1?.5*Yf(n):.5*(2-Math.pow(2,-10*(n-1))),Kf=n=>1-Math.sin(Math.acos(n)),$0=Y0(Kf),Q0=q0(Kf),F0=n=>/^0[^.\s]+$/u.test(n);function FE(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||F0(n):!0}const Pl=n=>Math.round(n*1e5)/1e5,Zf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function JE(n){return n==null}const WE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Xf=(n,s)=>l=>!!(typeof l=="string"&&WE.test(l)&&l.startsWith(n)||s&&!JE(l)&&Object.prototype.hasOwnProperty.call(l,s)),J0=(n,s,l)=>o=>{if(typeof o!="string")return o;const[c,d,f,m]=o.match(Zf);return{[n]:parseFloat(c),[s]:parseFloat(d),[l]:parseFloat(f),alpha:m!==void 0?parseFloat(m):1}},e2=n=>ka(0,255,n),Td={...Vi,transform:n=>Math.round(e2(n))},Rs={test:Xf("rgb","red"),parse:J0("red","green","blue"),transform:({red:n,green:s,blue:l,alpha:o=1})=>"rgba("+Td.transform(n)+", "+Td.transform(s)+", "+Td.transform(l)+", "+Pl(Fl.transform(o))+")"};function t2(n){let s="",l="",o="",c="";return n.length>5?(s=n.substring(1,3),l=n.substring(3,5),o=n.substring(5,7),c=n.substring(7,9)):(s=n.substring(1,2),l=n.substring(2,3),o=n.substring(3,4),c=n.substring(4,5),s+=s,l+=l,o+=o,c+=c),{red:parseInt(s,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:c?parseInt(c,16)/255:1}}const $d={test:Xf("#"),parse:t2,transform:Rs.transform},ji={test:Xf("hsl","hue"),parse:J0("hue","saturation","lightness"),transform:({hue:n,saturation:s,lightness:l,alpha:o=1})=>"hsla("+Math.round(n)+", "+sa.transform(Pl(s))+", "+sa.transform(Pl(l))+", "+Pl(Fl.transform(o))+")"},Xt={test:n=>Rs.test(n)||$d.test(n)||ji.test(n),parse:n=>Rs.test(n)?Rs.parse(n):ji.test(n)?ji.parse(n):$d.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Rs.transform(n):ji.transform(n)},n2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function a2(n){var s,l;return isNaN(n)&&typeof n=="string"&&(((s=n.match(Zf))===null||s===void 0?void 0:s.length)||0)+(((l=n.match(n2))===null||l===void 0?void 0:l.length)||0)>0}const W0="number",eb="color",s2="var",i2="var(",Sv="${}",l2=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Wl(n){const s=n.toString(),l=[],o={color:[],number:[],var:[]},c=[];let d=0;const m=s.replace(l2,p=>(Xt.test(p)?(o.color.push(d),c.push(eb),l.push(Xt.parse(p))):p.startsWith(i2)?(o.var.push(d),c.push(s2),l.push(p)):(o.number.push(d),c.push(W0),l.push(parseFloat(p))),++d,Sv)).split(Sv);return{values:l,split:m,indexes:o,types:c}}function tb(n){return Wl(n).values}function nb(n){const{split:s,types:l}=Wl(n),o=s.length;return c=>{let d="";for(let f=0;f<o;f++)if(d+=s[f],c[f]!==void 0){const m=l[f];m===W0?d+=Pl(c[f]):m===eb?d+=Xt.transform(c[f]):d+=c[f]}return d}}const o2=n=>typeof n=="number"?0:n;function r2(n){const s=tb(n);return nb(n)(s.map(o2))}const os={test:a2,parse:tb,createTransformer:nb,getAnimatableNone:r2},c2=new Set(["brightness","contrast","saturate","opacity"]);function u2(n){const[s,l]=n.slice(0,-1).split("(");if(s==="drop-shadow")return n;const[o]=l.match(Zf)||[];if(!o)return n;const c=l.replace(o,"");let d=c2.has(s)?1:0;return o!==l&&(d*=100),s+"("+d+c+")"}const d2=/\b([a-z-]*)\(.*?\)/gu,Qd={...os,getAnimatableNone:n=>{const s=n.match(d2);return s?s.map(u2).join(" "):n}},f2={...Rf,color:Xt,backgroundColor:Xt,outlineColor:Xt,fill:Xt,stroke:Xt,borderColor:Xt,borderTopColor:Xt,borderRightColor:Xt,borderBottomColor:Xt,borderLeftColor:Xt,filter:Qd,WebkitFilter:Qd},$f=n=>f2[n];function ab(n,s){let l=$f(n);return l!==Qd&&(l=os),l.getAnimatableNone?l.getAnimatableNone(s):void 0}const h2=new Set(["auto","none","0"]);function m2(n,s,l){let o=0,c;for(;o<n.length&&!c;){const d=n[o];typeof d=="string"&&!h2.has(d)&&Wl(d).values.length&&(c=n[o]),o++}if(c&&l)for(const d of s)n[d]=ab(l,c)}const xv=n=>n===Vi||n===be,_v=(n,s)=>parseFloat(n.split(", ")[s]),Tv=(n,s)=>(l,{transform:o})=>{if(o==="none"||!o)return 0;const c=o.match(/^matrix3d\((.+)\)$/u);if(c)return _v(c[1],s);{const d=o.match(/^matrix\((.+)\)$/u);return d?_v(d[1],n):0}},p2=new Set(["x","y","z"]),g2=zi.filter(n=>!p2.has(n));function v2(n){const s=[];return g2.forEach(l=>{const o=n.getValue(l);o!==void 0&&(s.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),s}const Oi={width:({x:n},{paddingLeft:s="0",paddingRight:l="0"})=>n.max-n.min-parseFloat(s)-parseFloat(l),height:({y:n},{paddingTop:s="0",paddingBottom:l="0"})=>n.max-n.min-parseFloat(s)-parseFloat(l),top:(n,{top:s})=>parseFloat(s),left:(n,{left:s})=>parseFloat(s),bottom:({y:n},{top:s})=>parseFloat(s)+(n.max-n.min),right:({x:n},{left:s})=>parseFloat(s)+(n.max-n.min),x:Tv(4,13),y:Tv(5,14)};Oi.translateX=Oi.x;Oi.translateY=Oi.y;const Ms=new Set;let Fd=!1,Jd=!1;function sb(){if(Jd){const n=Array.from(Ms).filter(o=>o.needsMeasurement),s=new Set(n.map(o=>o.element)),l=new Map;s.forEach(o=>{const c=v2(o);c.length&&(l.set(o,c),o.render())}),n.forEach(o=>o.measureInitialState()),s.forEach(o=>{o.render();const c=l.get(o);c&&c.forEach(([d,f])=>{var m;(m=o.getValue(d))===null||m===void 0||m.set(f)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Jd=!1,Fd=!1,Ms.forEach(n=>n.complete()),Ms.clear()}function ib(){Ms.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(Jd=!0)})}function y2(){ib(),sb()}class Qf{constructor(s,l,o,c,d,f=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...s],this.onComplete=l,this.name=o,this.motionValue=c,this.element=d,this.isAsync=f}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ms.add(this),Fd||(Fd=!0,ot.read(ib),ot.resolveKeyframes(sb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:s,name:l,element:o,motionValue:c}=this;for(let d=0;d<s.length;d++)if(s[d]===null)if(d===0){const f=c==null?void 0:c.get(),m=s[s.length-1];if(f!==void 0)s[0]=f;else if(o&&l){const p=o.readValue(l,m);p!=null&&(s[0]=p)}s[0]===void 0&&(s[0]=m),c&&f===void 0&&c.set(s[0])}else s[d]=s[d-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ms.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ms.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const lb=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),b2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function S2(n){const s=b2.exec(n);if(!s)return[,];const[,l,o,c]=s;return[`--${l??o}`,c]}function ob(n,s,l=1){const[o,c]=S2(n);if(!o)return;const d=window.getComputedStyle(s).getPropertyValue(o);if(d){const f=d.trim();return lb(f)?parseFloat(f):f}return kf(c)?ob(c,s,l+1):c}const rb=n=>s=>s.test(n),x2={test:n=>n==="auto",parse:n=>n},cb=[Vi,be,sa,as,vE,gE,x2],Ev=n=>cb.find(rb(n));class ub extends Qf{constructor(s,l,o,c,d){super(s,l,o,c,d,!0)}readKeyframes(){const{unresolvedKeyframes:s,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let p=0;p<s.length;p++){let v=s[p];if(typeof v=="string"&&(v=v.trim(),kf(v))){const y=ob(v,l.current);y!==void 0&&(s[p]=y),p===s.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!U0.has(o)||s.length!==2)return;const[c,d]=s,f=Ev(c),m=Ev(d);if(f!==m)if(xv(f)&&xv(m))for(let p=0;p<s.length;p++){const v=s[p];typeof v=="string"&&(s[p]=parseFloat(v))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:s,name:l}=this,o=[];for(let c=0;c<s.length;c++)FE(s[c])&&o.push(c);o.length&&m2(s,o,l)}measureInitialState(){const{element:s,unresolvedKeyframes:l,name:o}=this;if(!s||!s.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Oi[o](s.measureViewportBox(),window.getComputedStyle(s.current)),l[0]=this.measuredOrigin;const c=l[l.length-1];c!==void 0&&s.getValue(o,c).jump(c,!1)}measureEndState(){var s;const{element:l,name:o,unresolvedKeyframes:c}=this;if(!l||!l.current)return;const d=l.getValue(o);d&&d.jump(this.measuredOrigin,!1);const f=c.length-1,m=c[f];c[f]=Oi[o](l.measureViewportBox(),window.getComputedStyle(l.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),!((s=this.removedTransforms)===null||s===void 0)&&s.length&&this.removedTransforms.forEach(([p,v])=>{l.getValue(p).set(v)}),this.resolveNoneKeyframes()}}const jv=(n,s)=>s==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(os.test(n)||n==="0")&&!n.startsWith("url("));function _2(n){const s=n[0];if(n.length===1)return!0;for(let l=0;l<n.length;l++)if(n[l]!==s)return!0}function T2(n,s,l,o){const c=n[0];if(c===null)return!1;if(s==="display"||s==="visibility")return!0;const d=n[n.length-1],f=jv(c,s),m=jv(d,s);return!f||!m?!1:_2(n)||(l==="spring"||Pf(l))&&o}const E2=n=>n!==null;function ic(n,{repeat:s,repeatType:l="loop"},o){const c=n.filter(E2),d=s&&l!=="loop"&&s%2===1?0:c.length-1;return!d||o===void 0?c[d]:o}const j2=40;class db{constructor({autoplay:s=!0,delay:l=0,type:o="keyframes",repeat:c=0,repeatDelay:d=0,repeatType:f="loop",...m}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ia.now(),this.options={autoplay:s,delay:l,type:o,repeat:c,repeatDelay:d,repeatType:f,...m},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>j2?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&y2(),this._resolved}onKeyframesResolved(s,l){this.resolvedAt=ia.now(),this.hasAttemptedResolve=!0;const{name:o,type:c,velocity:d,delay:f,onComplete:m,onUpdate:p,isGenerator:v}=this.options;if(!v&&!T2(s,o,c,d))if(f)this.options.duration=0;else{p&&p(ic(s,this.options,l)),m&&m(),this.resolveFinishedPromise();return}const y=this.initPlayback(s,l);y!==!1&&(this._resolved={keyframes:s,finalKeyframe:l,...y},this.onPostResolved())}onPostResolved(){}then(s,l){return this.currentFinishedPromise.then(s,l)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(s=>{this.resolveFinishedPromise=s})}}const Wd=2e4;function fb(n){let s=0;const l=50;let o=n.next(s);for(;!o.done&&s<Wd;)s+=l,o=n.next(s);return s>=Wd?1/0:s}const mt=(n,s,l)=>n+(s-n)*l;function Ed(n,s,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?n+(s-n)*6*l:l<1/2?s:l<2/3?n+(s-n)*(2/3-l)*6:n}function C2({hue:n,saturation:s,lightness:l,alpha:o}){n/=360,s/=100,l/=100;let c=0,d=0,f=0;if(!s)c=d=f=l;else{const m=l<.5?l*(1+s):l+s-l*s,p=2*l-m;c=Ed(p,m,n+1/3),d=Ed(p,m,n),f=Ed(p,m,n-1/3)}return{red:Math.round(c*255),green:Math.round(d*255),blue:Math.round(f*255),alpha:o}}function Pr(n,s){return l=>l>0?s:n}const jd=(n,s,l)=>{const o=n*n,c=l*(s*s-o)+o;return c<0?0:Math.sqrt(c)},A2=[$d,Rs,ji],N2=n=>A2.find(s=>s.test(n));function Cv(n){const s=N2(n);if(!s)return!1;let l=s.parse(n);return s===ji&&(l=C2(l)),l}const Av=(n,s)=>{const l=Cv(n),o=Cv(s);if(!l||!o)return Pr(n,s);const c={...l};return d=>(c.red=jd(l.red,o.red,d),c.green=jd(l.green,o.green,d),c.blue=jd(l.blue,o.blue,d),c.alpha=mt(l.alpha,o.alpha,d),Rs.transform(c))},w2=(n,s)=>l=>s(n(l)),lo=(...n)=>n.reduce(w2),ef=new Set(["none","hidden"]);function D2(n,s){return ef.has(n)?l=>l<=0?n:s:l=>l>=1?s:n}function k2(n,s){return l=>mt(n,s,l)}function Ff(n){return typeof n=="number"?k2:typeof n=="string"?kf(n)?Pr:Xt.test(n)?Av:O2:Array.isArray(n)?hb:typeof n=="object"?Xt.test(n)?Av:R2:Pr}function hb(n,s){const l=[...n],o=l.length,c=n.map((d,f)=>Ff(d)(d,s[f]));return d=>{for(let f=0;f<o;f++)l[f]=c[f](d);return l}}function R2(n,s){const l={...n,...s},o={};for(const c in l)n[c]!==void 0&&s[c]!==void 0&&(o[c]=Ff(n[c])(n[c],s[c]));return c=>{for(const d in o)l[d]=o[d](c);return l}}function M2(n,s){var l;const o=[],c={color:0,var:0,number:0};for(let d=0;d<s.values.length;d++){const f=s.types[d],m=n.indexes[f][c[f]],p=(l=n.values[m])!==null&&l!==void 0?l:0;o[d]=p,c[f]++}return o}const O2=(n,s)=>{const l=os.createTransformer(s),o=Wl(n),c=Wl(s);return o.indexes.var.length===c.indexes.var.length&&o.indexes.color.length===c.indexes.color.length&&o.indexes.number.length>=c.indexes.number.length?ef.has(n)&&!c.values.length||ef.has(s)&&!o.values.length?D2(n,s):lo(hb(M2(o,c),c.values),l):Pr(n,s)};function mb(n,s,l){return typeof n=="number"&&typeof s=="number"&&typeof l=="number"?mt(n,s,l):Ff(n)(n,s)}const B2=5;function pb(n,s,l){const o=Math.max(s-B2,0);return z0(l-n(o),s-o)}const bt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Cd=.001;function L2({duration:n=bt.duration,bounce:s=bt.bounce,velocity:l=bt.velocity,mass:o=bt.mass}){let c,d,f=1-s;f=ka(bt.minDamping,bt.maxDamping,f),n=ka(bt.minDuration,bt.maxDuration,wa(n)),f<1?(c=v=>{const y=v*f,b=y*n,_=y-l,T=tf(v,f),N=Math.exp(-b);return Cd-_/T*N},d=v=>{const b=v*f*n,_=b*l+l,T=Math.pow(f,2)*Math.pow(v,2)*n,N=Math.exp(-b),D=tf(Math.pow(v,2),f);return(-c(v)+Cd>0?-1:1)*((_-T)*N)/D}):(c=v=>{const y=Math.exp(-v*n),b=(v-l)*n+1;return-Cd+y*b},d=v=>{const y=Math.exp(-v*n),b=(l-v)*(n*n);return y*b});const m=5/n,p=z2(c,d,m);if(n=Na(n),isNaN(p))return{stiffness:bt.stiffness,damping:bt.damping,duration:n};{const v=Math.pow(p,2)*o;return{stiffness:v,damping:f*2*Math.sqrt(o*v),duration:n}}}const U2=12;function z2(n,s,l){let o=l;for(let c=1;c<U2;c++)o=o-n(o)/s(o);return o}function tf(n,s){return n*Math.sqrt(1-s*s)}const V2=["duration","bounce"],H2=["stiffness","damping","mass"];function Nv(n,s){return s.some(l=>n[l]!==void 0)}function I2(n){let s={velocity:bt.velocity,stiffness:bt.stiffness,damping:bt.damping,mass:bt.mass,isResolvedFromDuration:!1,...n};if(!Nv(n,H2)&&Nv(n,V2))if(n.visualDuration){const l=n.visualDuration,o=2*Math.PI/(l*1.2),c=o*o,d=2*ka(.05,1,1-(n.bounce||0))*Math.sqrt(c);s={...s,mass:bt.mass,stiffness:c,damping:d}}else{const l=L2(n);s={...s,...l,mass:bt.mass},s.isResolvedFromDuration=!0}return s}function gb(n=bt.visualDuration,s=bt.bounce){const l=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:s}:n;let{restSpeed:o,restDelta:c}=l;const d=l.keyframes[0],f=l.keyframes[l.keyframes.length-1],m={done:!1,value:d},{stiffness:p,damping:v,mass:y,duration:b,velocity:_,isResolvedFromDuration:T}=I2({...l,velocity:-wa(l.velocity||0)}),N=_||0,D=v/(2*Math.sqrt(p*y)),w=f-d,j=wa(Math.sqrt(p/y)),V=Math.abs(w)<5;o||(o=V?bt.restSpeed.granular:bt.restSpeed.default),c||(c=V?bt.restDelta.granular:bt.restDelta.default);let M;if(D<1){const H=tf(j,D);M=J=>{const te=Math.exp(-D*j*J);return f-te*((N+D*j*w)/H*Math.sin(H*J)+w*Math.cos(H*J))}}else if(D===1)M=H=>f-Math.exp(-j*H)*(w+(N+j*w)*H);else{const H=j*Math.sqrt(D*D-1);M=J=>{const te=Math.exp(-D*j*J),K=Math.min(H*J,300);return f-te*((N+D*j*w)*Math.sinh(K)+H*w*Math.cosh(K))/H}}const $={calculatedDuration:T&&b||null,next:H=>{const J=M(H);if(T)m.done=H>=b;else{let te=0;D<1&&(te=H===0?Na(N):pb(M,H,J));const K=Math.abs(te)<=o,W=Math.abs(f-J)<=c;m.done=K&&W}return m.value=m.done?f:J,m},toString:()=>{const H=Math.min(fb($),Wd),J=H0(te=>$.next(H*te).value,H,30);return H+"ms "+J}};return $}function wv({keyframes:n,velocity:s=0,power:l=.8,timeConstant:o=325,bounceDamping:c=10,bounceStiffness:d=500,modifyTarget:f,min:m,max:p,restDelta:v=.5,restSpeed:y}){const b=n[0],_={done:!1,value:b},T=K=>m!==void 0&&K<m||p!==void 0&&K>p,N=K=>m===void 0?p:p===void 0||Math.abs(m-K)<Math.abs(p-K)?m:p;let D=l*s;const w=b+D,j=f===void 0?w:f(w);j!==w&&(D=j-b);const V=K=>-D*Math.exp(-K/o),M=K=>j+V(K),$=K=>{const W=V(K),he=M(K);_.done=Math.abs(W)<=v,_.value=_.done?j:he};let H,J;const te=K=>{T(_.value)&&(H=K,J=gb({keyframes:[_.value,N(_.value)],velocity:pb(M,K,_.value),damping:c,stiffness:d,restDelta:v,restSpeed:y}))};return te(0),{calculatedDuration:null,next:K=>{let W=!1;return!J&&H===void 0&&(W=!0,$(K),te(K)),H!==void 0&&K>=H?J.next(K-H):(!W&&$(K),_)}}}const G2=io(.42,0,1,1),P2=io(0,0,.58,1),vb=io(.42,0,.58,1),q2=n=>Array.isArray(n)&&typeof n[0]!="number",Y2={linear:_n,easeIn:G2,easeInOut:vb,easeOut:P2,circIn:Kf,circInOut:Q0,circOut:$0,backIn:Yf,backInOut:Z0,backOut:K0,anticipate:X0},Dv=n=>{if(qf(n)){v0(n.length===4);const[s,l,o,c]=n;return io(s,l,o,c)}else if(typeof n=="string")return Y2[n];return n};function K2(n,s,l){const o=[],c=l||mb,d=n.length-1;for(let f=0;f<d;f++){let m=c(n[f],n[f+1]);if(s){const p=Array.isArray(s)?s[f]||_n:s;m=lo(p,m)}o.push(m)}return o}function Z2(n,s,{clamp:l=!0,ease:o,mixer:c}={}){const d=n.length;if(v0(d===s.length),d===1)return()=>s[0];if(d===2&&s[0]===s[1])return()=>s[1];const f=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),s=[...s].reverse());const m=K2(s,o,c),p=m.length,v=y=>{if(f&&y<n[0])return s[0];let b=0;if(p>1)for(;b<n.length-2&&!(y<n[b+1]);b++);const _=Mi(n[b],n[b+1],y);return m[b](_)};return l?y=>v(ka(n[0],n[d-1],y)):v}function X2(n,s){const l=n[n.length-1];for(let o=1;o<=s;o++){const c=Mi(0,s,o);n.push(mt(l,1,c))}}function $2(n){const s=[0];return X2(s,n.length-1),s}function Q2(n,s){return n.map(l=>l*s)}function F2(n,s){return n.map(()=>s||vb).splice(0,n.length-1)}function qr({duration:n=300,keyframes:s,times:l,ease:o="easeInOut"}){const c=q2(o)?o.map(Dv):Dv(o),d={done:!1,value:s[0]},f=Q2(l&&l.length===s.length?l:$2(s),n),m=Z2(f,s,{ease:Array.isArray(c)?c:F2(s,c)});return{calculatedDuration:n,next:p=>(d.value=m(p),d.done=p>=n,d)}}const J2=n=>{const s=({timestamp:l})=>n(l);return{start:()=>ot.update(s,!0),stop:()=>ls(s),now:()=>qt.isProcessing?qt.timestamp:ia.now()}},W2={decay:wv,inertia:wv,tween:qr,keyframes:qr,spring:gb},ej=n=>n/100;class Jf extends db{constructor(s){super(s),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:p}=this.options;p&&p()};const{name:l,motionValue:o,element:c,keyframes:d}=this.options,f=(c==null?void 0:c.KeyframeResolver)||Qf,m=(p,v)=>this.onKeyframesResolved(p,v);this.resolver=new f(d,m,l,o,c),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(s){const{type:l="keyframes",repeat:o=0,repeatDelay:c=0,repeatType:d,velocity:f=0}=this.options,m=Pf(l)?l:W2[l]||qr;let p,v;m!==qr&&typeof s[0]!="number"&&(p=lo(ej,mb(s[0],s[1])),s=[0,100]);const y=m({...this.options,keyframes:s});d==="mirror"&&(v=m({...this.options,keyframes:[...s].reverse(),velocity:-f})),y.calculatedDuration===null&&(y.calculatedDuration=fb(y));const{calculatedDuration:b}=y,_=b+c,T=_*(o+1)-c;return{generator:y,mirroredGenerator:v,mapPercentToKeyframes:p,calculatedDuration:b,resolvedDuration:_,totalDuration:T}}onPostResolved(){const{autoplay:s=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!s?this.pause():this.state=this.pendingPlayState}tick(s,l=!1){const{resolved:o}=this;if(!o){const{keyframes:K}=this.options;return{done:!0,value:K[K.length-1]}}const{finalKeyframe:c,generator:d,mirroredGenerator:f,mapPercentToKeyframes:m,keyframes:p,calculatedDuration:v,totalDuration:y,resolvedDuration:b}=o;if(this.startTime===null)return d.next(0);const{delay:_,repeat:T,repeatType:N,repeatDelay:D,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,s):this.speed<0&&(this.startTime=Math.min(s-y/this.speed,this.startTime)),l?this.currentTime=s:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(s-this.startTime)*this.speed;const j=this.currentTime-_*(this.speed>=0?1:-1),V=this.speed>=0?j<0:j>y;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=y);let M=this.currentTime,$=d;if(T){const K=Math.min(this.currentTime,y)/b;let W=Math.floor(K),he=K%1;!he&&K>=1&&(he=1),he===1&&W--,W=Math.min(W,T+1),!!(W%2)&&(N==="reverse"?(he=1-he,D&&(he-=D/b)):N==="mirror"&&($=f)),M=ka(0,1,he)*b}const H=V?{done:!1,value:p[0]}:$.next(M);m&&(H.value=m(H.value));let{done:J}=H;!V&&v!==null&&(J=this.speed>=0?this.currentTime>=y:this.currentTime<=0);const te=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&J);return te&&c!==void 0&&(H.value=ic(p,this.options,c)),w&&w(H.value),te&&this.finish(),H}get duration(){const{resolved:s}=this;return s?wa(s.calculatedDuration):0}get time(){return wa(this.currentTime)}set time(s){s=Na(s),this.currentTime=s,this.holdTime!==null||this.speed===0?this.holdTime=s:this.driver&&(this.startTime=this.driver.now()-s/this.speed)}get speed(){return this.playbackSpeed}set speed(s){const l=this.playbackSpeed!==s;this.playbackSpeed=s,l&&(this.time=wa(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:s=J2,onPlay:l,startTime:o}=this.options;this.driver||(this.driver=s(d=>this.tick(d))),l&&l();const c=this.driver.now();this.holdTime!==null?this.startTime=c-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=c):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var s;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(s=this.currentTime)!==null&&s!==void 0?s:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:s}=this.options;s&&s()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(s){return this.startTime=0,this.tick(s,!0)}}const tj=new Set(["opacity","clipPath","filter","transform"]);function nj(n,s,l,{delay:o=0,duration:c=300,repeat:d=0,repeatType:f="loop",ease:m="easeInOut",times:p}={}){const v={[s]:l};p&&(v.offset=p);const y=G0(m,c);return Array.isArray(y)&&(v.easing=y),n.animate(v,{delay:o,duration:c,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:d+1,direction:f==="reverse"?"alternate":"normal"})}const aj=Gf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Yr=10,sj=2e4;function ij(n){return Pf(n.type)||n.type==="spring"||!I0(n.ease)}function lj(n,s){const l=new Jf({...s,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const c=[];let d=0;for(;!o.done&&d<sj;)o=l.sample(d),c.push(o.value),d+=Yr;return{times:void 0,keyframes:c,duration:d-Yr,ease:"linear"}}const yb={anticipate:X0,backInOut:Z0,circInOut:Q0};function oj(n){return n in yb}class kv extends db{constructor(s){super(s);const{name:l,motionValue:o,element:c,keyframes:d}=this.options;this.resolver=new ub(d,(f,m)=>this.onKeyframesResolved(f,m),l,o,c),this.resolver.scheduleResolve()}initPlayback(s,l){let{duration:o=300,times:c,ease:d,type:f,motionValue:m,name:p,startTime:v}=this.options;if(!m.owner||!m.owner.current)return!1;if(typeof d=="string"&&Gr()&&oj(d)&&(d=yb[d]),ij(this.options)){const{onComplete:b,onUpdate:_,motionValue:T,element:N,...D}=this.options,w=lj(s,D);s=w.keyframes,s.length===1&&(s[1]=s[0]),o=w.duration,c=w.times,d=w.ease,f="keyframes"}const y=nj(m.owner.current,p,s,{...this.options,duration:o,times:c,ease:d});return y.startTime=v??this.calcStartTime(),this.pendingTimeline?(bv(y,this.pendingTimeline),this.pendingTimeline=void 0):y.onfinish=()=>{const{onComplete:b}=this.options;m.set(ic(s,this.options,l)),b&&b(),this.cancel(),this.resolveFinishedPromise()},{animation:y,duration:o,times:c,type:f,ease:d,keyframes:s}}get duration(){const{resolved:s}=this;if(!s)return 0;const{duration:l}=s;return wa(l)}get time(){const{resolved:s}=this;if(!s)return 0;const{animation:l}=s;return wa(l.currentTime||0)}set time(s){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.currentTime=Na(s)}get speed(){const{resolved:s}=this;if(!s)return 1;const{animation:l}=s;return l.playbackRate}set speed(s){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.playbackRate=s}get state(){const{resolved:s}=this;if(!s)return"idle";const{animation:l}=s;return l.playState}get startTime(){const{resolved:s}=this;if(!s)return null;const{animation:l}=s;return l.startTime}attachTimeline(s){if(!this._resolved)this.pendingTimeline=s;else{const{resolved:l}=this;if(!l)return _n;const{animation:o}=l;bv(o,s)}return _n}play(){if(this.isStopped)return;const{resolved:s}=this;if(!s)return;const{animation:l}=s;l.playState==="finished"&&this.updateFinishedPromise(),l.play()}pause(){const{resolved:s}=this;if(!s)return;const{animation:l}=s;l.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:s}=this;if(!s)return;const{animation:l,keyframes:o,duration:c,type:d,ease:f,times:m}=s;if(l.playState==="idle"||l.playState==="finished")return;if(this.time){const{motionValue:v,onUpdate:y,onComplete:b,element:_,...T}=this.options,N=new Jf({...T,keyframes:o,duration:c,type:d,ease:f,times:m,isGenerator:!0}),D=Na(this.time);v.setWithVelocity(N.sample(D-Yr).value,N.sample(D).value,Yr)}const{onStop:p}=this.options;p&&p(),this.cancel()}complete(){const{resolved:s}=this;s&&s.animation.finish()}cancel(){const{resolved:s}=this;s&&s.animation.cancel()}static supports(s){const{motionValue:l,name:o,repeatDelay:c,repeatType:d,damping:f,type:m}=s;if(!l||!l.owner||!(l.owner.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:v}=l.owner.getProps();return aj()&&o&&tj.has(o)&&!p&&!v&&!c&&d!=="mirror"&&f!==0&&m!=="inertia"}}const rj={type:"spring",stiffness:500,damping:25,restSpeed:10},cj=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),uj={type:"keyframes",duration:.8},dj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},fj=(n,{keyframes:s})=>s.length>2?uj:Ls.has(n)?n.startsWith("scale")?cj(s[1]):rj:dj;function hj({when:n,delay:s,delayChildren:l,staggerChildren:o,staggerDirection:c,repeat:d,repeatType:f,repeatDelay:m,from:p,elapsed:v,...y}){return!!Object.keys(y).length}const Wf=(n,s,l,o={},c,d)=>f=>{const m=zf(o,n)||{},p=m.delay||o.delay||0;let{elapsed:v=0}=o;v=v-Na(p);let y={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:s.getVelocity(),...m,delay:-v,onUpdate:_=>{s.set(_),m.onUpdate&&m.onUpdate(_)},onComplete:()=>{f(),m.onComplete&&m.onComplete()},name:n,motionValue:s,element:d?void 0:c};hj(m)||(y={...y,...fj(n,y)}),y.duration&&(y.duration=Na(y.duration)),y.repeatDelay&&(y.repeatDelay=Na(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let b=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(y.duration=0,y.delay===0&&(b=!0)),b&&!d&&s.get()!==void 0){const _=ic(y.keyframes,m);if(_!==void 0)return ot.update(()=>{y.onUpdate(_),y.onComplete()}),new YE([])}return!d&&kv.supports(y)?new kv(y):new Jf(y)};function mj({protectedKeys:n,needsAnimating:s},l){const o=n.hasOwnProperty(l)&&s[l]!==!0;return s[l]=!1,o}function bb(n,s,{delay:l=0,transitionOverride:o,type:c}={}){var d;let{transition:f=n.getDefaultTransition(),transitionEnd:m,...p}=s;o&&(f=o);const v=[],y=c&&n.animationState&&n.animationState.getState()[c];for(const b in p){const _=n.getValue(b,(d=n.latestValues[b])!==null&&d!==void 0?d:null),T=p[b];if(T===void 0||y&&mj(y,b))continue;const N={delay:l,...zf(f||{},b)};let D=!1;if(window.MotionHandoffAnimation){const j=V0(n);if(j){const V=window.MotionHandoffAnimation(j,b,ot);V!==null&&(N.startTime=V,D=!0)}}Zd(n,b),_.start(Wf(b,_,T,n.shouldReduceMotion&&U0.has(b)?{type:!1}:N,n,D));const w=_.animation;w&&v.push(w)}return m&&Promise.all(v).then(()=>{ot.update(()=>{m&&IE(n,m)})}),v}function nf(n,s,l={}){var o;const c=sc(n,s,l.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:d=n.getDefaultTransition()||{}}=c||{};l.transitionOverride&&(d=l.transitionOverride);const f=c?()=>Promise.all(bb(n,c,l)):()=>Promise.resolve(),m=n.variantChildren&&n.variantChildren.size?(v=0)=>{const{delayChildren:y=0,staggerChildren:b,staggerDirection:_}=d;return pj(n,s,y+v,b,_,l)}:()=>Promise.resolve(),{when:p}=d;if(p){const[v,y]=p==="beforeChildren"?[f,m]:[m,f];return v().then(()=>y())}else return Promise.all([f(),m(l.delay)])}function pj(n,s,l=0,o=0,c=1,d){const f=[],m=(n.variantChildren.size-1)*o,p=c===1?(v=0)=>v*o:(v=0)=>m-v*o;return Array.from(n.variantChildren).sort(gj).forEach((v,y)=>{v.notify("AnimationStart",s),f.push(nf(v,s,{...d,delay:l+p(y)}).then(()=>v.notify("AnimationComplete",s)))}),Promise.all(f)}function gj(n,s){return n.sortNodePosition(s)}function vj(n,s,l={}){n.notify("AnimationStart",s);let o;if(Array.isArray(s)){const c=s.map(d=>nf(n,d,l));o=Promise.all(c)}else if(typeof s=="string")o=nf(n,s,l);else{const c=typeof s=="function"?sc(n,s,l.custom):s;o=Promise.all(bb(n,c,l))}return o.then(()=>{n.notify("AnimationComplete",s)})}const yj=Cf.length;function Sb(n){if(!n)return;if(!n.isControllingVariants){const l=n.parent?Sb(n.parent)||{}:{};return n.props.initial!==void 0&&(l.initial=n.props.initial),l}const s={};for(let l=0;l<yj;l++){const o=Cf[l],c=n.props[o];(Ql(c)||c===!1)&&(s[o]=c)}return s}const bj=[...jf].reverse(),Sj=jf.length;function xj(n){return s=>Promise.all(s.map(({animation:l,options:o})=>vj(n,l,o)))}function _j(n){let s=xj(n),l=Rv(),o=!0;const c=p=>(v,y)=>{var b;const _=sc(n,y,p==="exit"?(b=n.presenceContext)===null||b===void 0?void 0:b.custom:void 0);if(_){const{transition:T,transitionEnd:N,...D}=_;v={...v,...D,...N}}return v};function d(p){s=p(n)}function f(p){const{props:v}=n,y=Sb(n.parent)||{},b=[],_=new Set;let T={},N=1/0;for(let w=0;w<Sj;w++){const j=bj[w],V=l[j],M=v[j]!==void 0?v[j]:y[j],$=Ql(M),H=j===p?V.isActive:null;H===!1&&(N=w);let J=M===y[j]&&M!==v[j]&&$;if(J&&o&&n.manuallyAnimateOnMount&&(J=!1),V.protectedKeys={...T},!V.isActive&&H===null||!M&&!V.prevProp||nc(M)||typeof M=="boolean")continue;const te=Tj(V.prevProp,M);let K=te||j===p&&V.isActive&&!J&&$||w>N&&$,W=!1;const he=Array.isArray(M)?M:[M];let R=he.reduce(c(j),{});H===!1&&(R={});const{prevResolvedValues:ge={}}=V,ne={...ge,...R},je=X=>{K=!0,_.has(X)&&(W=!0,_.delete(X)),V.needsAnimating[X]=!0;const ee=n.getValue(X);ee&&(ee.liveStyle=!1)};for(const X in ne){const ee=R[X],Ae=ge[X];if(T.hasOwnProperty(X))continue;let Ee=!1;Kd(ee)&&Kd(Ae)?Ee=!L0(ee,Ae):Ee=ee!==Ae,Ee?ee!=null?je(X):_.add(X):ee!==void 0&&_.has(X)?je(X):V.protectedKeys[X]=!0}V.prevProp=M,V.prevResolvedValues=R,V.isActive&&(T={...T,...R}),o&&n.blockInitialAnimation&&(K=!1),K&&(!(J&&te)||W)&&b.push(...he.map(X=>({animation:X,options:{type:j}})))}if(_.size){const w={};_.forEach(j=>{const V=n.getBaseTarget(j),M=n.getValue(j);M&&(M.liveStyle=!0),w[j]=V??null}),b.push({animation:w})}let D=!!b.length;return o&&(v.initial===!1||v.initial===v.animate)&&!n.manuallyAnimateOnMount&&(D=!1),o=!1,D?s(b):Promise.resolve()}function m(p,v){var y;if(l[p].isActive===v)return Promise.resolve();(y=n.variantChildren)===null||y===void 0||y.forEach(_=>{var T;return(T=_.animationState)===null||T===void 0?void 0:T.setActive(p,v)}),l[p].isActive=v;const b=f(p);for(const _ in l)l[_].protectedKeys={};return b}return{animateChanges:f,setActive:m,setAnimateFunction:d,getState:()=>l,reset:()=>{l=Rv(),o=!0}}}function Tj(n,s){return typeof s=="string"?s!==n:Array.isArray(s)?!L0(s,n):!1}function Ns(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rv(){return{animate:Ns(!0),whileInView:Ns(),whileHover:Ns(),whileTap:Ns(),whileDrag:Ns(),whileFocus:Ns(),exit:Ns()}}class rs{constructor(s){this.isMounted=!1,this.node=s}update(){}}class Ej extends rs{constructor(s){super(s),s.animationState||(s.animationState=_j(s))}updateAnimationControlsSubscription(){const{animate:s}=this.node.getProps();nc(s)&&(this.unmountControls=s.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:s}=this.node.getProps(),{animate:l}=this.node.prevProps||{};s!==l&&this.updateAnimationControlsSubscription()}unmount(){var s;this.node.animationState.reset(),(s=this.unmountControls)===null||s===void 0||s.call(this)}}let jj=0;class Cj extends rs{constructor(){super(...arguments),this.id=jj++}update(){if(!this.node.presenceContext)return;const{isPresent:s,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||s===o)return;const c=this.node.animationState.setActive("exit",!s);l&&!s&&c.then(()=>l(this.id))}mount(){const{register:s}=this.node.presenceContext||{};s&&(this.unmount=s(this.id))}unmount(){}}const Aj={animation:{Feature:Ej},exit:{Feature:Cj}},$n={x:!1,y:!1};function xb(){return $n.x||$n.y}function Nj(n){return n==="x"||n==="y"?$n[n]?null:($n[n]=!0,()=>{$n[n]=!1}):$n.x||$n.y?null:($n.x=$n.y=!0,()=>{$n.x=$n.y=!1})}const eh=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function eo(n,s,l,o={passive:!0}){return n.addEventListener(s,l,o),()=>n.removeEventListener(s,l)}function oo(n){return{point:{x:n.pageX,y:n.pageY}}}const wj=n=>s=>eh(s)&&n(s,oo(s));function ql(n,s,l,o){return eo(n,s,wj(l),o)}const Mv=(n,s)=>Math.abs(n-s);function Dj(n,s){const l=Mv(n.x,s.x),o=Mv(n.y,s.y);return Math.sqrt(l**2+o**2)}class _b{constructor(s,l,{transformPagePoint:o,contextWindow:c,dragSnapToOrigin:d=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Nd(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,T=Dj(b.offset,{x:0,y:0})>=3;if(!_&&!T)return;const{point:N}=b,{timestamp:D}=qt;this.history.push({...N,timestamp:D});const{onStart:w,onMove:j}=this.handlers;_||(w&&w(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,b)},this.handlePointerMove=(b,_)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Ad(_,this.transformPagePoint),ot.update(this.updatePoint,!0)},this.handlePointerUp=(b,_)=>{this.end();const{onEnd:T,onSessionEnd:N,resumeAnimation:D}=this.handlers;if(this.dragSnapToOrigin&&D&&D(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Nd(b.type==="pointercancel"?this.lastMoveEventInfo:Ad(_,this.transformPagePoint),this.history);this.startEvent&&T&&T(b,w),N&&N(b,w)},!eh(s))return;this.dragSnapToOrigin=d,this.handlers=l,this.transformPagePoint=o,this.contextWindow=c||window;const f=oo(s),m=Ad(f,this.transformPagePoint),{point:p}=m,{timestamp:v}=qt;this.history=[{...p,timestamp:v}];const{onSessionStart:y}=l;y&&y(s,Nd(m,this.history)),this.removeListeners=lo(ql(this.contextWindow,"pointermove",this.handlePointerMove),ql(this.contextWindow,"pointerup",this.handlePointerUp),ql(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(s){this.handlers=s}end(){this.removeListeners&&this.removeListeners(),ls(this.updatePoint)}}function Ad(n,s){return s?{point:s(n.point)}:n}function Ov(n,s){return{x:n.x-s.x,y:n.y-s.y}}function Nd({point:n},s){return{point:n,delta:Ov(n,Tb(s)),offset:Ov(n,kj(s)),velocity:Rj(s,.1)}}function kj(n){return n[0]}function Tb(n){return n[n.length-1]}function Rj(n,s){if(n.length<2)return{x:0,y:0};let l=n.length-1,o=null;const c=Tb(n);for(;l>=0&&(o=n[l],!(c.timestamp-o.timestamp>Na(s)));)l--;if(!o)return{x:0,y:0};const d=wa(c.timestamp-o.timestamp);if(d===0)return{x:0,y:0};const f={x:(c.x-o.x)/d,y:(c.y-o.y)/d};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}const Eb=1e-4,Mj=1-Eb,Oj=1+Eb,jb=.01,Bj=0-jb,Lj=0+jb;function Tn(n){return n.max-n.min}function Uj(n,s,l){return Math.abs(n-s)<=l}function Bv(n,s,l,o=.5){n.origin=o,n.originPoint=mt(s.min,s.max,n.origin),n.scale=Tn(l)/Tn(s),n.translate=mt(l.min,l.max,n.origin)-n.originPoint,(n.scale>=Mj&&n.scale<=Oj||isNaN(n.scale))&&(n.scale=1),(n.translate>=Bj&&n.translate<=Lj||isNaN(n.translate))&&(n.translate=0)}function Yl(n,s,l,o){Bv(n.x,s.x,l.x,o?o.originX:void 0),Bv(n.y,s.y,l.y,o?o.originY:void 0)}function Lv(n,s,l){n.min=l.min+s.min,n.max=n.min+Tn(s)}function zj(n,s,l){Lv(n.x,s.x,l.x),Lv(n.y,s.y,l.y)}function Uv(n,s,l){n.min=s.min-l.min,n.max=n.min+Tn(s)}function Kl(n,s,l){Uv(n.x,s.x,l.x),Uv(n.y,s.y,l.y)}function Vj(n,{min:s,max:l},o){return s!==void 0&&n<s?n=o?mt(s,n,o.min):Math.max(n,s):l!==void 0&&n>l&&(n=o?mt(l,n,o.max):Math.min(n,l)),n}function zv(n,s,l){return{min:s!==void 0?n.min+s:void 0,max:l!==void 0?n.max+l-(n.max-n.min):void 0}}function Hj(n,{top:s,left:l,bottom:o,right:c}){return{x:zv(n.x,l,c),y:zv(n.y,s,o)}}function Vv(n,s){let l=s.min-n.min,o=s.max-n.max;return s.max-s.min<n.max-n.min&&([l,o]=[o,l]),{min:l,max:o}}function Ij(n,s){return{x:Vv(n.x,s.x),y:Vv(n.y,s.y)}}function Gj(n,s){let l=.5;const o=Tn(n),c=Tn(s);return c>o?l=Mi(s.min,s.max-o,n.min):o>c&&(l=Mi(n.min,n.max-c,s.min)),ka(0,1,l)}function Pj(n,s){const l={};return s.min!==void 0&&(l.min=s.min-n.min),s.max!==void 0&&(l.max=s.max-n.min),l}const af=.35;function qj(n=af){return n===!1?n=0:n===!0&&(n=af),{x:Hv(n,"left","right"),y:Hv(n,"top","bottom")}}function Hv(n,s,l){return{min:Iv(n,s),max:Iv(n,l)}}function Iv(n,s){return typeof n=="number"?n:n[s]||0}const Gv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ci=()=>({x:Gv(),y:Gv()}),Pv=()=>({min:0,max:0}),Ct=()=>({x:Pv(),y:Pv()});function Un(n){return[n("x"),n("y")]}function Cb({top:n,left:s,right:l,bottom:o}){return{x:{min:s,max:l},y:{min:n,max:o}}}function Yj({x:n,y:s}){return{top:s.min,right:n.max,bottom:s.max,left:n.min}}function Kj(n,s){if(!s)return n;const l=s({x:n.left,y:n.top}),o=s({x:n.right,y:n.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function wd(n){return n===void 0||n===1}function sf({scale:n,scaleX:s,scaleY:l}){return!wd(n)||!wd(s)||!wd(l)}function Ds(n){return sf(n)||Ab(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function Ab(n){return qv(n.x)||qv(n.y)}function qv(n){return n&&n!=="0%"}function Kr(n,s,l){const o=n-l,c=s*o;return l+c}function Yv(n,s,l,o,c){return c!==void 0&&(n=Kr(n,c,o)),Kr(n,l,o)+s}function lf(n,s=0,l=1,o,c){n.min=Yv(n.min,s,l,o,c),n.max=Yv(n.max,s,l,o,c)}function Nb(n,{x:s,y:l}){lf(n.x,s.translate,s.scale,s.originPoint),lf(n.y,l.translate,l.scale,l.originPoint)}const Kv=.999999999999,Zv=1.0000000000001;function Zj(n,s,l,o=!1){const c=l.length;if(!c)return;s.x=s.y=1;let d,f;for(let m=0;m<c;m++){d=l[m],f=d.projectionDelta;const{visualElement:p}=d.options;p&&p.props.style&&p.props.style.display==="contents"||(o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Ni(n,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),f&&(s.x*=f.x.scale,s.y*=f.y.scale,Nb(n,f)),o&&Ds(d.latestValues)&&Ni(n,d.latestValues))}s.x<Zv&&s.x>Kv&&(s.x=1),s.y<Zv&&s.y>Kv&&(s.y=1)}function Ai(n,s){n.min=n.min+s,n.max=n.max+s}function Xv(n,s,l,o,c=.5){const d=mt(n.min,n.max,c);lf(n,s,l,d,o)}function Ni(n,s){Xv(n.x,s.x,s.scaleX,s.scale,s.originX),Xv(n.y,s.y,s.scaleY,s.scale,s.originY)}function wb(n,s){return Cb(Kj(n.getBoundingClientRect(),s))}function Xj(n,s,l){const o=wb(n,l),{scroll:c}=s;return c&&(Ai(o.x,c.offset.x),Ai(o.y,c.offset.y)),o}const Db=({current:n})=>n?n.ownerDocument.defaultView:null,$j=new WeakMap;class Qj{constructor(s){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ct(),this.visualElement=s}start(s,{snapToCursor:l=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const c=y=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),l&&this.snapToCursor(oo(y).point)},d=(y,b)=>{const{drag:_,dragPropagation:T,onDragStart:N}=this.getProps();if(_&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Nj(_),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Un(w=>{let j=this.getAxisMotionValue(w).get()||0;if(sa.test(j)){const{projection:V}=this.visualElement;if(V&&V.layout){const M=V.layout.layoutBox[w];M&&(j=Tn(M)*(parseFloat(j)/100))}}this.originPoint[w]=j}),N&&ot.postRender(()=>N(y,b)),Zd(this.visualElement,"transform");const{animationState:D}=this.visualElement;D&&D.setActive("whileDrag",!0)},f=(y,b)=>{const{dragPropagation:_,dragDirectionLock:T,onDirectionLock:N,onDrag:D}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:w}=b;if(T&&this.currentDirection===null){this.currentDirection=Fj(w),this.currentDirection!==null&&N&&N(this.currentDirection);return}this.updateAxis("x",b.point,w),this.updateAxis("y",b.point,w),this.visualElement.render(),D&&D(y,b)},m=(y,b)=>this.stop(y,b),p=()=>Un(y=>{var b;return this.getAnimationState(y)==="paused"&&((b=this.getAxisMotionValue(y).animation)===null||b===void 0?void 0:b.play())}),{dragSnapToOrigin:v}=this.getProps();this.panSession=new _b(s,{onSessionStart:c,onStart:d,onMove:f,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,contextWindow:Db(this.visualElement)})}stop(s,l){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:c}=l;this.startAnimation(c);const{onDragEnd:d}=this.getProps();d&&ot.postRender(()=>d(s,l))}cancel(){this.isDragging=!1;const{projection:s,animationState:l}=this.visualElement;s&&(s.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}updateAxis(s,l,o){const{drag:c}=this.getProps();if(!o||!wr(s,c,this.currentDirection))return;const d=this.getAxisMotionValue(s);let f=this.originPoint[s]+o[s];this.constraints&&this.constraints[s]&&(f=Vj(f,this.constraints[s],this.elastic[s])),d.set(f)}resolveConstraints(){var s;const{dragConstraints:l,dragElastic:o}=this.getProps(),c=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)===null||s===void 0?void 0:s.layout,d=this.constraints;l&&Ei(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&c?this.constraints=Hj(c.layoutBox,l):this.constraints=!1,this.elastic=qj(o),d!==this.constraints&&c&&this.constraints&&!this.hasMutatedConstraints&&Un(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=Pj(c.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:s,onMeasureDragConstraints:l}=this.getProps();if(!s||!Ei(s))return!1;const o=s.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;const d=Xj(o,c.root,this.visualElement.getTransformPagePoint());let f=Ij(c.layout.layoutBox,d);if(l){const m=l(Yj(f));this.hasMutatedConstraints=!!m,m&&(f=Cb(m))}return f}startAnimation(s){const{drag:l,dragMomentum:o,dragElastic:c,dragTransition:d,dragSnapToOrigin:f,onDragTransitionEnd:m}=this.getProps(),p=this.constraints||{},v=Un(y=>{if(!wr(y,l,this.currentDirection))return;let b=p&&p[y]||{};f&&(b={min:0,max:0});const _=c?200:1e6,T=c?40:1e7,N={type:"inertia",velocity:o?s[y]:0,bounceStiffness:_,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...d,...b};return this.startAxisValueAnimation(y,N)});return Promise.all(v).then(m)}startAxisValueAnimation(s,l){const o=this.getAxisMotionValue(s);return Zd(this.visualElement,s),o.start(Wf(s,o,0,l,this.visualElement,!1))}stopAnimation(){Un(s=>this.getAxisMotionValue(s).stop())}pauseAnimation(){Un(s=>{var l;return(l=this.getAxisMotionValue(s).animation)===null||l===void 0?void 0:l.pause()})}getAnimationState(s){var l;return(l=this.getAxisMotionValue(s).animation)===null||l===void 0?void 0:l.state}getAxisMotionValue(s){const l=`_drag${s.toUpperCase()}`,o=this.visualElement.getProps(),c=o[l];return c||this.visualElement.getValue(s,(o.initial?o.initial[s]:void 0)||0)}snapToCursor(s){Un(l=>{const{drag:o}=this.getProps();if(!wr(l,o,this.currentDirection))return;const{projection:c}=this.visualElement,d=this.getAxisMotionValue(l);if(c&&c.layout){const{min:f,max:m}=c.layout.layoutBox[l];d.set(s[l]-mt(f,m,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:s,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!Ei(l)||!o||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};Un(f=>{const m=this.getAxisMotionValue(f);if(m&&this.constraints!==!1){const p=m.get();c[f]=Gj({min:p,max:p},this.constraints[f])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Un(f=>{if(!wr(f,s,null))return;const m=this.getAxisMotionValue(f),{min:p,max:v}=this.constraints[f];m.set(mt(p,v,c[f]))})}addListeners(){if(!this.visualElement.current)return;$j.set(this.visualElement,this);const s=this.visualElement.current,l=ql(s,"pointerdown",p=>{const{drag:v,dragListener:y=!0}=this.getProps();v&&y&&this.start(p)}),o=()=>{const{dragConstraints:p}=this.getProps();Ei(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:c}=this.visualElement,d=c.addEventListener("measure",o);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),ot.read(o);const f=eo(window,"resize",()=>this.scalePositionWithinConstraints()),m=c.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:v})=>{this.isDragging&&v&&(Un(y=>{const b=this.getAxisMotionValue(y);b&&(this.originPoint[y]+=p[y].translate,b.set(b.get()+p[y].translate))}),this.visualElement.render())}));return()=>{f(),l(),d(),m&&m()}}getProps(){const s=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:c=!1,dragConstraints:d=!1,dragElastic:f=af,dragMomentum:m=!0}=s;return{...s,drag:l,dragDirectionLock:o,dragPropagation:c,dragConstraints:d,dragElastic:f,dragMomentum:m}}}function wr(n,s,l){return(s===!0||s===n)&&(l===null||l===n)}function Fj(n,s=10){let l=null;return Math.abs(n.y)>s?l="y":Math.abs(n.x)>s&&(l="x"),l}class Jj extends rs{constructor(s){super(s),this.removeGroupControls=_n,this.removeListeners=_n,this.controls=new Qj(s)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_n}unmount(){this.removeGroupControls(),this.removeListeners()}}const $v=n=>(s,l)=>{n&&ot.postRender(()=>n(s,l))};class Wj extends rs{constructor(){super(...arguments),this.removePointerDownListener=_n}onPointerDown(s){this.session=new _b(s,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Db(this.node)})}createPanHandlers(){const{onPanSessionStart:s,onPanStart:l,onPan:o,onPanEnd:c}=this.node.getProps();return{onSessionStart:$v(s),onStart:$v(l),onMove:o,onEnd:(d,f)=>{delete this.session,c&&ot.postRender(()=>c(d,f))}}}mount(){this.removePointerDownListener=ql(this.node.current,"pointerdown",s=>this.onPointerDown(s))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const zr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Qv(n,s){return s.max===s.min?0:n/(s.max-s.min)*100}const Bl={correct:(n,s)=>{if(!s.target)return n;if(typeof n=="string")if(be.test(n))n=parseFloat(n);else return n;const l=Qv(n,s.target.x),o=Qv(n,s.target.y);return`${l}% ${o}%`}},eC={correct:(n,{treeScale:s,projectionDelta:l})=>{const o=n,c=os.parse(n);if(c.length>5)return o;const d=os.createTransformer(n),f=typeof c[0]!="number"?1:0,m=l.x.scale*s.x,p=l.y.scale*s.y;c[0+f]/=m,c[1+f]/=p;const v=mt(m,p,.5);return typeof c[2+f]=="number"&&(c[2+f]/=v),typeof c[3+f]=="number"&&(c[3+f]/=v),d(c)}};class tC extends S.Component{componentDidMount(){const{visualElement:s,layoutGroup:l,switchLayoutGroup:o,layoutId:c}=this.props,{projection:d}=s;AE(nC),d&&(l.group&&l.group.add(d),o&&o.register&&c&&o.register(d),d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,onExitComplete:()=>this.safeToRemove()})),zr.hasEverUpdated=!0}getSnapshotBeforeUpdate(s){const{layoutDependency:l,visualElement:o,drag:c,isPresent:d}=this.props,f=o.projection;return f&&(f.isPresent=d,c||s.layoutDependency!==l||l===void 0?f.willUpdate():this.safeToRemove(),s.isPresent!==d&&(d?f.promote():f.relegate()||ot.postRender(()=>{const m=f.getStack();(!m||!m.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:s}=this.props.visualElement;s&&(s.root.didUpdate(),Nf.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:s,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:c}=s;c&&(c.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(c),o&&o.deregister&&o.deregister(c))}safeToRemove(){const{safeToRemove:s}=this.props;s&&s()}render(){return null}}function kb(n){const[s,l]=p0(),o=S.useContext(xf);return h.jsx(tC,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(T0),isPresent:s,safeToRemove:l})}const nC={borderRadius:{...Bl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Bl,borderTopRightRadius:Bl,borderBottomLeftRadius:Bl,borderBottomRightRadius:Bl,boxShadow:eC};function aC(n,s,l){const o=$t(n)?n:Jl(n);return o.start(Wf("",o,s,l)),o.animation}function sC(n){return n instanceof SVGElement&&n.tagName!=="svg"}const iC=(n,s)=>n.depth-s.depth;class lC{constructor(){this.children=[],this.isDirty=!1}add(s){Vf(this.children,s),this.isDirty=!0}remove(s){Hf(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(iC),this.isDirty=!1,this.children.forEach(s)}}function oC(n,s){const l=ia.now(),o=({timestamp:c})=>{const d=c-l;d>=s&&(ls(o),n(d-s))};return ot.read(o,!0),()=>ls(o)}const Rb=["TopLeft","TopRight","BottomLeft","BottomRight"],rC=Rb.length,Fv=n=>typeof n=="string"?parseFloat(n):n,Jv=n=>typeof n=="number"||be.test(n);function cC(n,s,l,o,c,d){c?(n.opacity=mt(0,l.opacity!==void 0?l.opacity:1,uC(o)),n.opacityExit=mt(s.opacity!==void 0?s.opacity:1,0,dC(o))):d&&(n.opacity=mt(s.opacity!==void 0?s.opacity:1,l.opacity!==void 0?l.opacity:1,o));for(let f=0;f<rC;f++){const m=`border${Rb[f]}Radius`;let p=Wv(s,m),v=Wv(l,m);if(p===void 0&&v===void 0)continue;p||(p=0),v||(v=0),p===0||v===0||Jv(p)===Jv(v)?(n[m]=Math.max(mt(Fv(p),Fv(v),o),0),(sa.test(v)||sa.test(p))&&(n[m]+="%")):n[m]=v}(s.rotate||l.rotate)&&(n.rotate=mt(s.rotate||0,l.rotate||0,o))}function Wv(n,s){return n[s]!==void 0?n[s]:n.borderRadius}const uC=Mb(0,.5,$0),dC=Mb(.5,.95,_n);function Mb(n,s,l){return o=>o<n?0:o>s?1:l(Mi(n,s,o))}function ey(n,s){n.min=s.min,n.max=s.max}function Ln(n,s){ey(n.x,s.x),ey(n.y,s.y)}function ty(n,s){n.translate=s.translate,n.scale=s.scale,n.originPoint=s.originPoint,n.origin=s.origin}function ny(n,s,l,o,c){return n-=s,n=Kr(n,1/l,o),c!==void 0&&(n=Kr(n,1/c,o)),n}function fC(n,s=0,l=1,o=.5,c,d=n,f=n){if(sa.test(s)&&(s=parseFloat(s),s=mt(f.min,f.max,s/100)-f.min),typeof s!="number")return;let m=mt(d.min,d.max,o);n===d&&(m-=s),n.min=ny(n.min,s,l,m,c),n.max=ny(n.max,s,l,m,c)}function ay(n,s,[l,o,c],d,f){fC(n,s[l],s[o],s[c],s.scale,d,f)}const hC=["x","scaleX","originX"],mC=["y","scaleY","originY"];function sy(n,s,l,o){ay(n.x,s,hC,l?l.x:void 0,o?o.x:void 0),ay(n.y,s,mC,l?l.y:void 0,o?o.y:void 0)}function iy(n){return n.translate===0&&n.scale===1}function Ob(n){return iy(n.x)&&iy(n.y)}function ly(n,s){return n.min===s.min&&n.max===s.max}function pC(n,s){return ly(n.x,s.x)&&ly(n.y,s.y)}function oy(n,s){return Math.round(n.min)===Math.round(s.min)&&Math.round(n.max)===Math.round(s.max)}function Bb(n,s){return oy(n.x,s.x)&&oy(n.y,s.y)}function ry(n){return Tn(n.x)/Tn(n.y)}function cy(n,s){return n.translate===s.translate&&n.scale===s.scale&&n.originPoint===s.originPoint}class gC{constructor(){this.members=[]}add(s){Vf(this.members,s),s.scheduleRender()}remove(s){if(Hf(this.members,s),s===this.prevLead&&(this.prevLead=void 0),s===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(s){const l=this.members.findIndex(c=>s===c);if(l===0)return!1;let o;for(let c=l;c>=0;c--){const d=this.members[c];if(d.isPresent!==!1){o=d;break}}return o?(this.promote(o),!0):!1}promote(s,l){const o=this.lead;if(s!==o&&(this.prevLead=o,this.lead=s,s.show(),o)){o.instance&&o.scheduleRender(),s.scheduleRender(),s.resumeFrom=o,l&&(s.resumeFrom.preserveOpacity=!0),o.snapshot&&(s.snapshot=o.snapshot,s.snapshot.latestValues=o.animationValues||o.latestValues),s.root&&s.root.isUpdating&&(s.isLayoutDirty=!0);const{crossfade:c}=s.options;c===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(s=>{const{options:l,resumingFrom:o}=s;l.onExitComplete&&l.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(s=>{s.instance&&s.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vC(n,s,l){let o="";const c=n.x.translate/s.x,d=n.y.translate/s.y,f=(l==null?void 0:l.z)||0;if((c||d||f)&&(o=`translate3d(${c}px, ${d}px, ${f}px) `),(s.x!==1||s.y!==1)&&(o+=`scale(${1/s.x}, ${1/s.y}) `),l){const{transformPerspective:v,rotate:y,rotateX:b,rotateY:_,skewX:T,skewY:N}=l;v&&(o=`perspective(${v}px) ${o}`),y&&(o+=`rotate(${y}deg) `),b&&(o+=`rotateX(${b}deg) `),_&&(o+=`rotateY(${_}deg) `),T&&(o+=`skewX(${T}deg) `),N&&(o+=`skewY(${N}deg) `)}const m=n.x.scale*s.x,p=n.y.scale*s.y;return(m!==1||p!==1)&&(o+=`scale(${m}, ${p})`),o||"none"}const ks={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Vl=typeof window<"u"&&window.MotionDebug!==void 0,Dd=["","X","Y","Z"],yC={visibility:"hidden"},uy=1e3;let bC=0;function kd(n,s,l,o){const{latestValues:c}=s;c[n]&&(l[n]=c[n],s.setStaticValue(n,0),o&&(o[n]=0))}function Lb(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:s}=n.options;if(!s)return;const l=V0(s);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:c,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(l,"transform",ot,!(c||d))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&Lb(o)}function Ub({attachResizeListener:n,defaultParent:s,measureScroll:l,checkIsScrollRoot:o,resetTransform:c}){return class{constructor(f={},m=s==null?void 0:s()){this.id=bC++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Vl&&(ks.totalNodes=ks.resolvedTargetDeltas=ks.recalculatedProjection=0),this.nodes.forEach(_C),this.nodes.forEach(AC),this.nodes.forEach(NC),this.nodes.forEach(TC),Vl&&window.MotionDebug.record(ks)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=m?m.root||m:this,this.path=m?[...m.path,m]:[],this.parent=m,this.depth=m?m.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new lC)}addEventListener(f,m){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new If),this.eventHandlers.get(f).add(m)}notifyListeners(f,...m){const p=this.eventHandlers.get(f);p&&p.notify(...m)}hasListeners(f){return this.eventHandlers.has(f)}mount(f,m=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=sC(f),this.instance=f;const{layoutId:p,layout:v,visualElement:y}=this.options;if(y&&!y.current&&y.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),m&&(v||p)&&(this.isLayoutDirty=!0),n){let b;const _=()=>this.root.updateBlockedByResize=!1;n(f,()=>{this.root.updateBlockedByResize=!0,b&&b(),b=oC(_,250),zr.hasAnimatedSinceResize&&(zr.hasAnimatedSinceResize=!1,this.nodes.forEach(fy))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&y&&(p||v)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:_,hasRelativeTargetChanged:T,layout:N})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const D=this.options.transition||y.getDefaultTransition()||MC,{onLayoutAnimationStart:w,onLayoutAnimationComplete:j}=y.getProps(),V=!this.targetLayout||!Bb(this.targetLayout,N)||T,M=!_&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||M||_&&(V||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(b,M);const $={...zf(D,"layout"),onPlay:w,onComplete:j};(y.shouldReduceMotion||this.options.layoutRoot)&&($.delay=0,$.type=!1),this.startAnimation($)}else _||fy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=N})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ls(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(wC),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Lb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const b=this.path[y];b.shouldResetTransform=!0,b.updateScroll("snapshot"),b.options.layoutRoot&&b.willUpdate(!1)}const{layoutId:m,layout:p}=this.options;if(m===void 0&&!p)return;const v=this.getTransformTemplate();this.prevTransformTemplateValue=v?v(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(dy);return}this.isUpdating||this.nodes.forEach(jC),this.isUpdating=!1,this.nodes.forEach(CC),this.nodes.forEach(SC),this.nodes.forEach(xC),this.clearAllSnapshots();const m=ia.now();qt.delta=ka(0,1e3/60,m-qt.timestamp),qt.timestamp=m,qt.isProcessing=!0,_d.update.process(qt),_d.preRender.process(qt),_d.render.process(qt),qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(EC),this.sharedNodes.forEach(DC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ot.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ot.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let p=0;p<this.path.length;p++)this.path[p].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ct(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:m}=this.options;m&&m.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let m=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(m=!1),m){const p=o(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:p,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!c)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,m=this.projectionDelta&&!Ob(this.projectionDelta),p=this.getTransformTemplate(),v=p?p(this.latestValues,""):void 0,y=v!==this.prevTransformTemplateValue;f&&(m||Ds(this.latestValues)||y)&&(c(this.instance,v),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const m=this.measurePageBox();let p=this.removeElementScroll(m);return f&&(p=this.removeTransform(p)),OC(p),{animationId:this.root.animationId,measuredBox:m,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:m}=this.options;if(!m)return Ct();const p=m.measureViewportBox();if(!(((f=this.scroll)===null||f===void 0?void 0:f.wasRoot)||this.path.some(BC))){const{scroll:y}=this.root;y&&(Ai(p.x,y.offset.x),Ai(p.y,y.offset.y))}return p}removeElementScroll(f){var m;const p=Ct();if(Ln(p,f),!((m=this.scroll)===null||m===void 0)&&m.wasRoot)return p;for(let v=0;v<this.path.length;v++){const y=this.path[v],{scroll:b,options:_}=y;y!==this.root&&b&&_.layoutScroll&&(b.wasRoot&&Ln(p,f),Ai(p.x,b.offset.x),Ai(p.y,b.offset.y))}return p}applyTransform(f,m=!1){const p=Ct();Ln(p,f);for(let v=0;v<this.path.length;v++){const y=this.path[v];!m&&y.options.layoutScroll&&y.scroll&&y!==y.root&&Ni(p,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),Ds(y.latestValues)&&Ni(p,y.latestValues)}return Ds(this.latestValues)&&Ni(p,this.latestValues),p}removeTransform(f){const m=Ct();Ln(m,f);for(let p=0;p<this.path.length;p++){const v=this.path[p];if(!v.instance||!Ds(v.latestValues))continue;sf(v.latestValues)&&v.updateSnapshot();const y=Ct(),b=v.measurePageBox();Ln(y,b),sy(m,v.latestValues,v.snapshot?v.snapshot.layoutBox:void 0,y)}return Ds(this.latestValues)&&sy(m,this.latestValues),m}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){var m;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const v=!!this.resumingFrom||this!==p;if(!(f||v&&this.isSharedProjectionDirty||this.isProjectionDirty||!((m=this.parent)===null||m===void 0)&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:_}=this.options;if(!(!this.layout||!(b||_))){if(this.resolvedRelativeTargetAt=qt.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ct(),this.relativeTargetOrigin=Ct(),Kl(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),Ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ct(),this.targetWithTransforms=Ct()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),zj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ln(this.target,this.layout.layoutBox),Nb(this.target,this.targetDelta)):Ln(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const T=this.getClosestProjectingParent();T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ct(),this.relativeTargetOrigin=Ct(),Kl(this.relativeTargetOrigin,this.target,T.target),Ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Vl&&ks.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||sf(this.parent.latestValues)||Ab(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var f;const m=this.getLead(),p=!!this.resumingFrom||this!==m;let v=!0;if((this.isProjectionDirty||!((f=this.parent)===null||f===void 0)&&f.isProjectionDirty)&&(v=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(v=!1),this.resolvedRelativeTargetAt===qt.timestamp&&(v=!1),v)return;const{layout:y,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(y||b))return;Ln(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,T=this.treeScale.y;Zj(this.layoutCorrected,this.treeScale,this.path,p),m.layout&&!m.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(m.target=m.layout.layoutBox,m.targetWithTransforms=Ct());const{target:N}=m;if(!N){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ty(this.prevProjectionDelta.x,this.projectionDelta.x),ty(this.prevProjectionDelta.y,this.projectionDelta.y)),Yl(this.projectionDelta,this.layoutCorrected,N,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==T||!cy(this.projectionDelta.x,this.prevProjectionDelta.x)||!cy(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",N)),Vl&&ks.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var m;if((m=this.options.visualElement)===null||m===void 0||m.scheduleRender(),f){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ci(),this.projectionDelta=Ci(),this.projectionDeltaWithTransform=Ci()}setAnimationOrigin(f,m=!1){const p=this.snapshot,v=p?p.latestValues:{},y={...this.latestValues},b=Ci();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!m;const _=Ct(),T=p?p.source:void 0,N=this.layout?this.layout.source:void 0,D=T!==N,w=this.getStack(),j=!w||w.members.length<=1,V=!!(D&&!j&&this.options.crossfade===!0&&!this.path.some(RC));this.animationProgress=0;let M;this.mixTargetDelta=$=>{const H=$/1e3;hy(b.x,f.x,H),hy(b.y,f.y,H),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kl(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kC(this.relativeTarget,this.relativeTargetOrigin,_,H),M&&pC(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=Ct()),Ln(M,this.relativeTarget)),D&&(this.animationValues=y,cC(y,v,this.latestValues,H,V,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=H},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ls(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ot.update(()=>{zr.hasAnimatedSinceResize=!0,this.currentAnimation=aC(0,uy,{...f,onUpdate:m=>{this.mixTargetDelta(m),f.onUpdate&&f.onUpdate(m)},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:m,target:p,layout:v,latestValues:y}=f;if(!(!m||!p||!v)){if(this!==f&&this.layout&&v&&zb(this.options.animationType,this.layout.layoutBox,v.layoutBox)){p=this.target||Ct();const b=Tn(this.layout.layoutBox.x);p.x.min=f.target.x.min,p.x.max=p.x.min+b;const _=Tn(this.layout.layoutBox.y);p.y.min=f.target.y.min,p.y.max=p.y.min+_}Ln(m,p),Ni(m,y),Yl(this.projectionDeltaWithTransform,this.layoutCorrected,m,y)}}registerSharedNode(f,m){this.sharedNodes.has(f)||this.sharedNodes.set(f,new gC),this.sharedNodes.get(f).add(m);const v=m.options.initialPromotionConfig;m.promote({transition:v?v.transition:void 0,preserveFollowOpacity:v&&v.shouldPreserveFollowOpacity?v.shouldPreserveFollowOpacity(m):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var f;const{layoutId:m}=this.options;return m?((f=this.getStack())===null||f===void 0?void 0:f.lead)||this:this}getPrevLead(){var f;const{layoutId:m}=this.options;return m?(f=this.getStack())===null||f===void 0?void 0:f.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:m,preserveFollowOpacity:p}={}){const v=this.getStack();v&&v.promote(this,p),f&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let m=!1;const{latestValues:p}=f;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(m=!0),!m)return;const v={};p.z&&kd("z",f,v,this.animationValues);for(let y=0;y<Dd.length;y++)kd(`rotate${Dd[y]}`,f,v,this.animationValues),kd(`skew${Dd[y]}`,f,v,this.animationValues);f.render();for(const y in v)f.setStaticValue(y,v[y]),this.animationValues&&(this.animationValues[y]=v[y]);f.scheduleRender()}getProjectionStyles(f){var m,p;if(!this.instance||this.isSVG)return;if(!this.isVisible)return yC;const v={visibility:""},y=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,v.opacity="",v.pointerEvents=Lr(f==null?void 0:f.pointerEvents)||"",v.transform=y?y(this.latestValues,""):"none",v;const b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){const D={};return this.options.layoutId&&(D.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,D.pointerEvents=Lr(f==null?void 0:f.pointerEvents)||""),this.hasProjected&&!Ds(this.latestValues)&&(D.transform=y?y({},""):"none",this.hasProjected=!1),D}const _=b.animationValues||b.latestValues;this.applyTransformsToTarget(),v.transform=vC(this.projectionDeltaWithTransform,this.treeScale,_),y&&(v.transform=y(_,v.transform));const{x:T,y:N}=this.projectionDelta;v.transformOrigin=`${T.origin*100}% ${N.origin*100}% 0`,b.animationValues?v.opacity=b===this?(p=(m=_.opacity)!==null&&m!==void 0?m:this.latestValues.opacity)!==null&&p!==void 0?p:1:this.preserveOpacity?this.latestValues.opacity:_.opacityExit:v.opacity=b===this?_.opacity!==void 0?_.opacity:"":_.opacityExit!==void 0?_.opacityExit:0;for(const D in Ir){if(_[D]===void 0)continue;const{correct:w,applyTo:j}=Ir[D],V=v.transform==="none"?_[D]:w(_[D],b);if(j){const M=j.length;for(let $=0;$<M;$++)v[j[$]]=V}else v[D]=V}return this.options.layoutId&&(v.pointerEvents=b===this?Lr(f==null?void 0:f.pointerEvents)||"":"none"),v}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var m;return(m=f.currentAnimation)===null||m===void 0?void 0:m.stop()}),this.root.nodes.forEach(dy),this.root.sharedNodes.clear()}}}function SC(n){n.updateLayout()}function xC(n){var s;const l=((s=n.resumeFrom)===null||s===void 0?void 0:s.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&l&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:c}=n.layout,{animationType:d}=n.options,f=l.source!==n.layout.source;d==="size"?Un(b=>{const _=f?l.measuredBox[b]:l.layoutBox[b],T=Tn(_);_.min=o[b].min,_.max=_.min+T}):zb(d,l.layoutBox,o)&&Un(b=>{const _=f?l.measuredBox[b]:l.layoutBox[b],T=Tn(o[b]);_.max=_.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+T)});const m=Ci();Yl(m,o,l.layoutBox);const p=Ci();f?Yl(p,n.applyTransform(c,!0),l.measuredBox):Yl(p,o,l.layoutBox);const v=!Ob(m);let y=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:_,layout:T}=b;if(_&&T){const N=Ct();Kl(N,l.layoutBox,_.layoutBox);const D=Ct();Kl(D,o,T.layoutBox),Bb(N,D)||(y=!0),b.options.layoutRoot&&(n.relativeTarget=D,n.relativeTargetOrigin=N,n.relativeParent=b)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:l,delta:p,layoutDelta:m,hasLayoutChanged:v,hasRelativeTargetChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function _C(n){Vl&&ks.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function TC(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function EC(n){n.clearSnapshot()}function dy(n){n.clearMeasurements()}function jC(n){n.isLayoutDirty=!1}function CC(n){const{visualElement:s}=n.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),n.resetTransform()}function fy(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function AC(n){n.resolveTargetDelta()}function NC(n){n.calcProjection()}function wC(n){n.resetSkewAndRotation()}function DC(n){n.removeLeadSnapshot()}function hy(n,s,l){n.translate=mt(s.translate,0,l),n.scale=mt(s.scale,1,l),n.origin=s.origin,n.originPoint=s.originPoint}function my(n,s,l,o){n.min=mt(s.min,l.min,o),n.max=mt(s.max,l.max,o)}function kC(n,s,l,o){my(n.x,s.x,l.x,o),my(n.y,s.y,l.y,o)}function RC(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const MC={duration:.45,ease:[.4,0,.1,1]},py=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),gy=py("applewebkit/")&&!py("chrome/")?Math.round:_n;function vy(n){n.min=gy(n.min),n.max=gy(n.max)}function OC(n){vy(n.x),vy(n.y)}function zb(n,s,l){return n==="position"||n==="preserve-aspect"&&!Uj(ry(s),ry(l),.2)}function BC(n){var s;return n!==n.root&&((s=n.scroll)===null||s===void 0?void 0:s.wasRoot)}const LC=Ub({attachResizeListener:(n,s)=>eo(n,"resize",s),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rd={current:void 0},Vb=Ub({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Rd.current){const n=new LC({});n.mount(window),n.setOptions({layoutScroll:!0}),Rd.current=n}return Rd.current},resetTransform:(n,s)=>{n.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),UC={pan:{Feature:Wj},drag:{Feature:Jj,ProjectionNode:Vb,MeasureLayout:kb}};function zC(n,s,l){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let c=document;const d=(o=void 0)!==null&&o!==void 0?o:c.querySelectorAll(n);return d?Array.from(d):[]}return Array.from(n)}function Hb(n,s){const l=zC(n),o=new AbortController,c={passive:!0,...s,signal:o.signal};return[l,c,()=>o.abort()]}function yy(n){return s=>{s.pointerType==="touch"||xb()||n(s)}}function VC(n,s,l={}){const[o,c,d]=Hb(n,l),f=yy(m=>{const{target:p}=m,v=s(m);if(typeof v!="function"||!p)return;const y=yy(b=>{v(b),p.removeEventListener("pointerleave",y)});p.addEventListener("pointerleave",y,c)});return o.forEach(m=>{m.addEventListener("pointerenter",f,c)}),d}function by(n,s,l){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",l==="Start");const c="onHover"+l,d=o[c];d&&ot.postRender(()=>d(s,oo(s)))}class HC extends rs{mount(){const{current:s}=this.node;s&&(this.unmount=VC(s,l=>(by(this.node,l,"Start"),o=>by(this.node,o,"End"))))}unmount(){}}class IC extends rs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let s=!1;try{s=this.node.current.matches(":focus-visible")}catch{s=!0}!s||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lo(eo(this.node.current,"focus",()=>this.onFocus()),eo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ib=(n,s)=>s?n===s?!0:Ib(n,s.parentElement):!1,GC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function PC(n){return GC.has(n.tagName)||n.tabIndex!==-1}const Hl=new WeakSet;function Sy(n){return s=>{s.key==="Enter"&&n(s)}}function Md(n,s){n.dispatchEvent(new PointerEvent("pointer"+s,{isPrimary:!0,bubbles:!0}))}const qC=(n,s)=>{const l=n.currentTarget;if(!l)return;const o=Sy(()=>{if(Hl.has(l))return;Md(l,"down");const c=Sy(()=>{Md(l,"up")}),d=()=>Md(l,"cancel");l.addEventListener("keyup",c,s),l.addEventListener("blur",d,s)});l.addEventListener("keydown",o,s),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),s)};function xy(n){return eh(n)&&!xb()}function YC(n,s,l={}){const[o,c,d]=Hb(n,l),f=m=>{const p=m.currentTarget;if(!xy(m)||Hl.has(p))return;Hl.add(p);const v=s(m),y=(T,N)=>{window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",_),!(!xy(T)||!Hl.has(p))&&(Hl.delete(p),typeof v=="function"&&v(T,{success:N}))},b=T=>{y(T,l.useGlobalTarget||Ib(p,T.target))},_=T=>{y(T,!1)};window.addEventListener("pointerup",b,c),window.addEventListener("pointercancel",_,c)};return o.forEach(m=>{!PC(m)&&m.getAttribute("tabindex")===null&&(m.tabIndex=0),(l.useGlobalTarget?window:m).addEventListener("pointerdown",f,c),m.addEventListener("focus",v=>qC(v,c),c)}),d}function _y(n,s,l){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",l==="Start");const c="onTap"+(l==="End"?"":l),d=o[c];d&&ot.postRender(()=>d(s,oo(s)))}class KC extends rs{mount(){const{current:s}=this.node;s&&(this.unmount=YC(s,l=>(_y(this.node,l,"Start"),(o,{success:c})=>_y(this.node,o,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const of=new WeakMap,Od=new WeakMap,ZC=n=>{const s=of.get(n.target);s&&s(n)},XC=n=>{n.forEach(ZC)};function $C({root:n,...s}){const l=n||document;Od.has(l)||Od.set(l,{});const o=Od.get(l),c=JSON.stringify(s);return o[c]||(o[c]=new IntersectionObserver(XC,{root:n,...s})),o[c]}function QC(n,s,l){const o=$C(s);return of.set(n,l),o.observe(n),()=>{of.delete(n),o.unobserve(n)}}const FC={some:0,all:1};class JC extends rs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:s={}}=this.node.getProps(),{root:l,margin:o,amount:c="some",once:d}=s,f={root:l?l.current:void 0,rootMargin:o,threshold:typeof c=="number"?c:FC[c]},m=p=>{const{isIntersecting:v}=p;if(this.isInView===v||(this.isInView=v,d&&!v&&this.hasEnteredView))return;v&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",v);const{onViewportEnter:y,onViewportLeave:b}=this.node.getProps(),_=v?y:b;_&&_(p)};return QC(this.node.current,f,m)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:s,prevProps:l}=this.node;["amount","margin","root"].some(WC(s,l))&&this.startObserver()}unmount(){}}function WC({viewport:n={}},{viewport:s={}}={}){return l=>n[l]!==s[l]}const eA={inView:{Feature:JC},tap:{Feature:KC},focus:{Feature:IC},hover:{Feature:HC}},tA={layout:{ProjectionNode:Vb,MeasureLayout:kb}},rf={current:null},Gb={current:!1};function nA(){if(Gb.current=!0,!!Ef)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),s=()=>rf.current=n.matches;n.addListener(s),s()}else rf.current=!1}const aA=[...cb,Xt,os],sA=n=>aA.find(rb(n)),Ty=new WeakMap;function iA(n,s,l){for(const o in s){const c=s[o],d=l[o];if($t(c))n.addValue(o,c);else if($t(d))n.addValue(o,Jl(c,{owner:n}));else if(d!==c)if(n.hasValue(o)){const f=n.getValue(o);f.liveStyle===!0?f.jump(c):f.hasAnimated||f.set(c)}else{const f=n.getStaticValue(o);n.addValue(o,Jl(f!==void 0?f:c,{owner:n}))}}for(const o in l)s[o]===void 0&&n.removeValue(o);return s}const Ey=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lA{scrapeMotionValuesFromProps(s,l,o){return{}}constructor({parent:s,props:l,presenceContext:o,reducedMotionConfig:c,blockInitialAnimation:d,visualState:f},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const T=ia.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,ot.render(this.render,!1,!0))};const{latestValues:p,renderState:v,onUpdate:y}=f;this.onUpdate=y,this.latestValues=p,this.baseTarget={...p},this.initialValues=l.initial?{...p}:{},this.renderState=v,this.parent=s,this.props=l,this.presenceContext=o,this.depth=s?s.depth+1:0,this.reducedMotionConfig=c,this.options=m,this.blockInitialAnimation=!!d,this.isControllingVariants=ac(l),this.isVariantNode=x0(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(s&&s.current);const{willChange:b,..._}=this.scrapeMotionValuesFromProps(l,{},this);for(const T in _){const N=_[T];p[T]!==void 0&&$t(N)&&N.set(p[T],!1)}}mount(s){this.current=s,Ty.set(s,this),this.projection&&!this.projection.instance&&this.projection.mount(s),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,o)=>this.bindToMotionValue(o,l)),Gb.current||nA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:rf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ty.delete(this.current),this.projection&&this.projection.unmount(),ls(this.notifyUpdate),ls(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const l=this.features[s];l&&(l.unmount(),l.isMounted=!1)}this.current=null}bindToMotionValue(s,l){this.valueSubscriptions.has(s)&&this.valueSubscriptions.get(s)();const o=Ls.has(s),c=l.on("change",m=>{this.latestValues[s]=m,this.props.onUpdate&&ot.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),d=l.on("renderRequest",this.scheduleRender);let f;window.MotionCheckAppearSync&&(f=window.MotionCheckAppearSync(this,s,l)),this.valueSubscriptions.set(s,()=>{c(),d(),f&&f(),l.owner&&l.stop()})}sortNodePosition(s){return!this.current||!this.sortInstanceNodePosition||this.type!==s.type?0:this.sortInstanceNodePosition(this.current,s.current)}updateFeatures(){let s="animation";for(s in Ri){const l=Ri[s];if(!l)continue;const{isEnabled:o,Feature:c}=l;if(!this.features[s]&&c&&o(this.props)&&(this.features[s]=new c(this)),this.features[s]){const d=this.features[s];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ct()}getStaticValue(s){return this.latestValues[s]}setStaticValue(s,l){this.latestValues[s]=l}update(s,l){(s.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=s,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<Ey.length;o++){const c=Ey[o];this.propEventSubscriptions[c]&&(this.propEventSubscriptions[c](),delete this.propEventSubscriptions[c]);const d="on"+c,f=s[d];f&&(this.propEventSubscriptions[c]=this.on(c,f))}this.prevMotionValues=iA(this,this.scrapeMotionValuesFromProps(s,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(s){return this.props.variants?this.props.variants[s]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(s){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(s),()=>l.variantChildren.delete(s)}addValue(s,l){const o=this.values.get(s);l!==o&&(o&&this.removeValue(s),this.bindToMotionValue(s,l),this.values.set(s,l),this.latestValues[s]=l.get())}removeValue(s){this.values.delete(s);const l=this.valueSubscriptions.get(s);l&&(l(),this.valueSubscriptions.delete(s)),delete this.latestValues[s],this.removeValueFromRenderState(s,this.renderState)}hasValue(s){return this.values.has(s)}getValue(s,l){if(this.props.values&&this.props.values[s])return this.props.values[s];let o=this.values.get(s);return o===void 0&&l!==void 0&&(o=Jl(l===null?void 0:l,{owner:this}),this.addValue(s,o)),o}readValue(s,l){var o;let c=this.latestValues[s]!==void 0||!this.current?this.latestValues[s]:(o=this.getBaseTargetFromProps(this.props,s))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,s,this.options);return c!=null&&(typeof c=="string"&&(lb(c)||F0(c))?c=parseFloat(c):!sA(c)&&os.test(l)&&(c=ab(s,l)),this.setBaseTarget(s,$t(c)?c.get():c)),$t(c)?c.get():c}setBaseTarget(s,l){this.baseTarget[s]=l}getBaseTarget(s){var l;const{initial:o}=this.props;let c;if(typeof o=="string"||typeof o=="object"){const f=Df(this.props,o,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);f&&(c=f[s])}if(o&&c!==void 0)return c;const d=this.getBaseTargetFromProps(this.props,s);return d!==void 0&&!$t(d)?d:this.initialValues[s]!==void 0&&c===void 0?void 0:this.baseTarget[s]}on(s,l){return this.events[s]||(this.events[s]=new If),this.events[s].add(l)}notify(s,...l){this.events[s]&&this.events[s].notify(...l)}}class Pb extends lA{constructor(){super(...arguments),this.KeyframeResolver=ub}sortInstanceNodePosition(s,l){return s.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(s,l){return s.style?s.style[l]:void 0}removeValueFromRenderState(s,{vars:l,style:o}){delete l[s],delete o[s]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:s}=this.props;$t(s)&&(this.childSubscription=s.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function oA(n){return window.getComputedStyle(n)}class rA extends Pb{constructor(){super(...arguments),this.type="html",this.renderInstance=D0}readValueFromInstance(s,l){if(Ls.has(l)){const o=$f(l);return o&&o.default||0}else{const o=oA(s),c=(A0(l)?o.getPropertyValue(l):o[l])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(s,{transformPagePoint:l}){return wb(s,l)}build(s,l,o){Mf(s,l,o.transformTemplate)}scrapeMotionValuesFromProps(s,l,o){return Uf(s,l,o)}}class cA extends Pb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ct}getBaseTargetFromProps(s,l){return s[l]}readValueFromInstance(s,l){if(Ls.has(l)){const o=$f(l);return o&&o.default||0}return l=k0.has(l)?l:Af(l),s.getAttribute(l)}scrapeMotionValuesFromProps(s,l,o){return O0(s,l,o)}build(s,l,o){Of(s,l,this.isSVGTag,o.transformTemplate)}renderInstance(s,l,o,c){R0(s,l,o,c)}mount(s){this.isSVGTag=Lf(s.tagName),super.mount(s)}}const uA=(n,s)=>wf(n)?new cA(s):new rA(s,{allowProjection:n!==S.Fragment}),dA=LE({...Aj,...eA,...UC,...tA},uA),la=FT(dA);var St;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.TEXT=1]="TEXT",n[n.TOOL_USE=2]="TOOL_USE",n[n.TOOL_RESULT=3]="TOOL_RESULT",n[n.ERROR=4]="ERROR",n[n.STATUS=5]="STATUS",n[n.SYSTEM=6]="SYSTEM",n[n.FINDING=7]="FINDING",n[n.SUBTASK_CREATE=8]="SUBTASK_CREATE",n[n.USER_INPUT=9]="USER_INPUT"})(St||(St={}));var Mt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.NOT_STARTED=1]="NOT_STARTED",n[n.WORKING=3]="WORKING",n[n.PAUSED=4]="PAUSED",n[n.COMPLETE=5]="COMPLETE",n[n.FAILED=6]="FAILED"})(Mt||(Mt={}));var ss;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(ss||(ss={}));var is;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(is||(is={}));const fA=8;Object.assign(Object.create(null),{"":St.UNSPECIFIED,text:St.TEXT,tool_use:St.TOOL_USE,tool_result:St.TOOL_RESULT,error:St.ERROR,status:St.STATUS,system:St.SYSTEM,finding:St.FINDING,subtask_create:St.SUBTASK_CREATE,user_input:St.USER_INPUT});St.UNSPECIFIED+"",St.TEXT+"",St.TOOL_USE+"",St.TOOL_RESULT+"",St.ERROR+"",St.STATUS+"",St.SYSTEM+"",St.FINDING+"",St.SUBTASK_CREATE+"",St.USER_INPUT+"";Object.assign(Object.create(null),{"":Mt.UNSPECIFIED,not_started:Mt.NOT_STARTED,working:Mt.WORKING,paused:Mt.PAUSED,complete:Mt.COMPLETE,failed:Mt.FAILED,pending:Mt.NOT_STARTED,assigned:Mt.NOT_STARTED,in_progress:Mt.WORKING,waiting_input:Mt.PAUSED,review:Mt.PAUSED,done:Mt.COMPLETE});Mt.UNSPECIFIED+"",Mt.NOT_STARTED+"",Mt.WORKING+"",Mt.PAUSED+"",Mt.COMPLETE+"",Mt.FAILED+"";Object.assign(Object.create(null),{"":ss.UNSPECIFIED,active:ss.ACTIVE,archived:ss.ARCHIVED});ss.UNSPECIFIED+"",ss.ACTIVE+"",ss.ARCHIVED+"";Object.assign(Object.create(null),{"":is.UNSPECIFIED,open:is.OPEN,closed:is.CLOSED});is.UNSPECIFIED+"",is.OPEN+"",is.CLOSED+"";const hA="_breadcrumbs_17or2_1",mA="_list_17or2_11",pA="_item_17or2_21",gA="_separator_17or2_28",vA="_link_17or2_34",yA="_current_17or2_57",_i={breadcrumbs:hA,list:mA,item:pA,separator:gA,link:vA,current:yA},bA="›";function Hi({segments:n}){return h.jsx("nav",{className:_i.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:_i.list,children:n.map((s,l)=>{const o=l===n.length-1;return h.jsxs("li",{className:_i.item,children:[l>0&&h.jsx("span",{className:_i.separator,"aria-hidden":"true",children:bA}),s.url&&!o?h.jsx(bf,{className:_i.link,to:s.url,title:s.label,children:s.label}):h.jsx("span",{className:_i.current,"aria-current":"page",title:s.label,children:s.label})]},l)})})})}function cf(){cf=function(c,d){return new l(c,void 0,d)};var n=RegExp.prototype,s=new WeakMap;function l(c,d,f){var m=new RegExp(c,d);return s.set(m,f||s.get(c)),Zr(m,l.prototype)}function o(c,d){var f=s.get(d);return Object.keys(f).reduce(function(m,p){var v=f[p];if(typeof v=="number")m[p]=c[v];else{for(var y=0;c[v[y]]===void 0&&y+1<v.length;)y++;m[p]=c[v[y]]}return m},Object.create(null))}return(function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(d&&d.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),d&&Zr(c,d)})(l,RegExp),l.prototype.exec=function(c){var d=n.exec.call(this,c);if(d){d.groups=o(d,this);var f=d.indices;f&&(f.groups=o(f,this))}return d},l.prototype[Symbol.replace]=function(c,d){if(typeof d=="string"){var f=s.get(this);return n[Symbol.replace].call(this,c,d.replace(/\$<([^>]+)>/g,function(p,v){var y=f[v];return"$"+(Array.isArray(y)?y.join("$"):y)}))}if(typeof d=="function"){var m=this;return n[Symbol.replace].call(this,c,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(o(p,m)),d.apply(this,p)})}return n[Symbol.replace].call(this,c,d)},cf.apply(this,arguments)}function Zr(n,s){return Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,o){return l.__proto__=o,l},Zr(n,s)}function jy(n,s){(s==null||s>n.length)&&(s=n.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=n[l];return o}function Bd(n,s){var l=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l)return(l=l.call(n)).next.bind(l);if(Array.isArray(n)||(l=(function(c,d){if(c){if(typeof c=="string")return jy(c,d);var f=Object.prototype.toString.call(c).slice(8,-1);return f==="Object"&&c.constructor&&(f=c.constructor.name),f==="Map"||f==="Set"?Array.from(c):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?jy(c,d):void 0}})(n))||s){l&&(n=l);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
87
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var SA=(function(n){return function(s){return s===void 0&&(s={}),(function(o,c){if(c&&!o.registered(c))throw new Error('The default language "'+c+'" is not registered with refractor.')})(n,s.defaultLanguage),function(o){r1(o,"element",l)};function l(o,c,d){var f,m;if(d&&d.tagName==="pre"&&o.tagName==="code"){var p=(o==null||(f=o.data)==null?void 0:f.meta)||(o==null||(m=o.properties)==null?void 0:m.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var v,y,b=(function(H){for(var J,te=Bd(H.properties.className);!(J=te()).done;){var K=J.value;if(K.slice(0,9)==="language-")return K.slice(9).toLowerCase()}return null})(o);if(!b&&s.defaultLanguage&&o.properties.className.push("language-"+(b=s.defaultLanguage)),o.properties.className.push("code-highlight"),b)try{var _,T;T=(_=b)!=null&&_.includes("diff-")?b.split("-")[1]:b,v=n.highlight(Er(o),T),d.properties.className=(d.properties.className||[]).concat("language-"+T)}catch(H){if(!s.ignoreMissing||!/Unknown language/.test(H.message))throw H;v=o}else v=o;v.children=(y=1,function H(J){return J.reduce(function(te,K){if(K.type==="text"){var W=K.value,he=(W.match(/\n/g)||"").length;if(he===0)K.position={start:{line:y,column:1},end:{line:y,column:1}},te.push(K);else for(var R,ge=W.split(`
|
|
88
|
-
`),ne=Bd(ge.entries());!(R=ne()).done;){var je=R.value,G=je[0],U=je[1];te.push({type:"text",value:G===ge.length-1?U:U+`
|
|
89
|
-
`,position:{start:{line:y+G,column:1},end:{line:y+G,column:1}}})}return y+=he,te}if(Object.prototype.hasOwnProperty.call(K,"children")){var X=y;return K.children=H(K.children),te.push(K),K.position={start:{line:X,column:1},end:{line:y,column:1}},te}return te.push(K),te},[])})(v.children),v.position=v.children.length>0?{start:{line:v.children[0].position.start.line,column:0},end:{line:v.children[v.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var N,D=(function(H){var J=/{([\d,-]+)}/,te=H.split(",").map(function(he){return he.trim()}).join();if(J.test(te)){var K=J.exec(te)[1],W=u1(K);return function(he){return W.includes(he+1)}}return function(){return!1}})(p),w=(function(H){var J=cf(/showLineNumbers=(\d+)/i,{lines:1});if(J.test(H)){var te=J.exec(H);return Number(te.groups.lines)}return 1})(p),j=(function(H){for(var J=new Array(H),te=0;te<H;te++)J[te]={type:"element",tagName:"span",properties:{className:[]},children:[]};return J})(v.position.end.line),V=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],M=function(){var H,J,te=N.value,K=te[0],W=te[1];W.properties.className=["code-line"];var he=d1(v,function(R){return R.position.start.line<=K+1&&R.position.end.line>=K+1});W.children=he.children,(p.toLowerCase().includes("showLineNumbers".toLowerCase())||s.showLineNumbers===!0||typeof s.showLineNumbers=="object"&&s.showLineNumbers.includes(b))&&!V.some(function(R){return p.toLowerCase().includes(R)})&&(W.properties.line=[(K+w).toString()],W.properties.className.push("line-number")),D(K)&&W.properties.className.push("highlight-line"),(b==="diff"||(H=b)!=null&&H.includes("diff-"))&&Er(W).substring(0,1)==="-"?W.properties.className.push("deleted"):(b==="diff"||(J=b)!=null&&J.includes("diff-"))&&Er(W).substring(0,1)==="+"&&W.properties.className.push("inserted")},$=Bd(j.entries());!(N=$()).done;)M();j.length>0&&Er(j[j.length-1]).trim()===""&&j.pop(),o.children=j}}}})(c1);const xA="_systemEvent_2kh3g_1",_A="_systemTimestamp_2kh3g_9",TA="_textEvent_2kh3g_13",EA="_toolUseEvent_2kh3g_100",jA="_toolUseHeader_2kh3g_116",CA="_toolUsePrefix_2kh3g_123",AA="_toolUseName_2kh3g_128",NA="_toolUseArgs_2kh3g_133",wA="_toolResultEvent_2kh3g_144",DA="_toolResultHeader_2kh3g_150",kA="_toolResultIndicatorOk_2kh3g_174",RA="_toolResultIndicatorError_2kh3g_181",MA="_toolResultLabel_2kh3g_188",OA="_toolResultToggle_2kh3g_192",BA="_toolResultCommand_2kh3g_198",LA="_toolResultEllipsis_2kh3g_208",UA="_toolResultPre_2kh3g_212",zA="_errorEvent_2kh3g_227",VA="_statusEvent_2kh3g_236",HA="_userInputEvent_2kh3g_246",IA="_userInputContent_2kh3g_253",GA="_defaultEvent_2kh3g_265",ht={systemEvent:xA,systemTimestamp:_A,textEvent:TA,toolUseEvent:EA,toolUseHeader:jA,toolUsePrefix:CA,toolUseName:AA,toolUseArgs:NA,toolResultEvent:wA,toolResultHeader:DA,toolResultIndicatorOk:kA,toolResultIndicatorError:RA,toolResultLabel:MA,toolResultToggle:OA,toolResultCommand:BA,toolResultEllipsis:LA,toolResultPre:UA,errorEvent:zA,statusEvent:VA,userInputEvent:HA,userInputContent:IA,defaultEvent:GA};function PA({time:n,content:s}){return h.jsxs("div",{className:ht.systemEvent,children:[h.jsxs("span",{className:ht.systemTimestamp,children:["[",n,"]"]})," ",s]})}function qA({content:n}){return h.jsx("div",{className:ht.textEvent,children:h.jsx(uf,{remarkPlugins:[df],rehypePlugins:[SA],children:n})})}function YA({content:n}){let s="",l=n;try{const o=JSON.parse(n);s=o.tool||"",l=JSON.stringify(o.args,null,2)}catch{}return h.jsxs("div",{className:ht.toolUseEvent,children:[h.jsxs("div",{className:ht.toolUseHeader,children:[h.jsx("span",{className:ht.toolUsePrefix,children:">"}),s?h.jsx("span",{className:ht.toolUseName,children:s}):null]}),h.jsx("pre",{className:ht.toolUseArgs,children:l})]})}const Cy=5;function KA(n,s){if(s==null)return"";if(typeof s!="object")return String(s);const l=s;if(typeof l.command=="string")return l.command;if(typeof l.file_path=="string")return l.file_path;if(typeof l.pattern=="string"){const o=typeof l.path=="string"?` in ${l.path}`:"";return`${l.pattern}${o}`}if(typeof l.path=="string")return l.path;if(typeof l.query=="string")return l.query;try{const o=JSON.stringify(s);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function ZA({content:n,raw:s,toolUseCtx:l}){const[o,c]=S.useState(!1);let d=!1;if(s)try{d=JSON.parse(s).is_error===!0}catch{}const f=n.split(`
|
|
90
|
-
`),m=f.length>Cy,p=o?n:f.slice(0,Cy).join(`
|
|
91
|
-
`),y=((l==null?void 0:l.tool)??"")||(d?"Tool error":"Tool output"),b=l?KA(l.tool,l.args):"",_=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:d?ht.toolResultIndicatorError:ht.toolResultIndicatorOk,"aria-label":d?"error":"success",children:d?"✗":"✓"}),h.jsx("span",{className:ht.toolResultLabel,children:y}),m&&h.jsx("span",{className:ht.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:ht.toolResultEvent,children:[m?h.jsx("button",{className:ht.toolResultHeader,onClick:()=>{c(T=>!T)},"aria-expanded":o,children:_}):h.jsx("div",{className:ht.toolResultHeader,children:_}),b&&h.jsx("div",{className:ht.toolResultCommand,children:b}),h.jsxs("pre",{className:ht.toolResultPre,children:[p,!o&&m&&h.jsx("span",{className:ht.toolResultEllipsis,children:"…"})]})]})}function XA({content:n}){return h.jsxs("div",{className:ht.errorEvent,children:["Error: ",n]})}function $A({content:n}){return h.jsxs("div",{className:ht.statusEvent,children:["--- ",n," ---"]})}function QA({content:n}){return h.jsx("div",{className:ht.userInputEvent,children:h.jsx("span",{className:ht.userInputContent,children:n})})}function FA({content:n}){return h.jsx("div",{className:ht.defaultEvent,children:n})}function qb({event:n,toolUseCtx:s}){const l=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(PA,{time:l,content:n.content});case"text":case"output":return h.jsx(qA,{content:n.content});case"tool_use":return h.jsx(YA,{content:n.content});case"tool_result":return h.jsx(ZA,{content:n.content,raw:n.raw,toolUseCtx:s});case"error":return h.jsx(XA,{content:n.content});case"status":return h.jsx($A,{content:n.content});case"user_input":return h.jsx(QA,{content:n.content});default:return h.jsx(FA,{content:n.content})}}const JA="_overlay_cmicx_1",WA="_dialog_cmicx_11",eN="_title_cmicx_30",tN="_description_cmicx_38",nN="_actions_cmicx_45",aN="_cancelButton_cmicx_52",sN="_confirmButton_cmicx_79",ws={overlay:JA,dialog:WA,title:eN,description:tN,actions:nN,cancelButton:aN,confirmButton:sN};function lc({isOpen:n,title:s,description:l,confirmLabel:o="Delete",onConfirm:c,onCancel:d}){const f=S.useId(),m=S.useId();return h.jsx(Ui,{children:n&&h.jsx(la.div,{className:ws.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:d,onKeyDown:p=>{p.key==="Escape"&&d()},role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":l?m:void 0,children:h.jsxs(la.div,{className:ws.dialog,initial:{opacity:0,scale:.93,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.93,y:-10},transition:{duration:.15,ease:[.16,1,.3,1]},onClick:p=>p.stopPropagation(),children:[h.jsx("h3",{id:f,className:ws.title,children:s}),l&&h.jsx("p",{id:m,className:ws.description,children:l}),h.jsxs("div",{className:ws.actions,children:[h.jsx("button",{type:"button",className:ws.cancelButton,onClick:d,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:ws.confirmButton,onClick:c,children:o})]})]})})})}const iN="_spinner_13c8l_1",lN="_spin_13c8l_1",oN="_sm_13c8l_14",rN="_md_13c8l_20",cN="_lg_13c8l_26",Ay={spinner:iN,spin:lN,sm:oN,md:rN,lg:cN};function Ny({size:n="md",className:s,label:l="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${Ay.spinner} ${Ay[n]} ${s??""}`,role:o?"status":void 0,"aria-label":l,"aria-hidden":o?void 0:!0})}const uN="_container_7z2xb_1",dN="_header_7z2xb_5",fN="_addButton_7z2xb_17",hN="_createForm_7z2xb_44",mN="_createInput_7z2xb_50",pN="_createButton_7z2xb_81",gN="_creatingHint_7z2xb_122",vN="_projectRow_7z2xb_131",yN="_selected_7z2xb_149",bN="_expandArrow_7z2xb_154",SN="_expanded_7z2xb_161",xN="_projectName_7z2xb_165",_N="_taskCount_7z2xb_169",TN="_newTaskButton_7z2xb_175",EN="_taskRow_7z2xb_202",jN="_taskStatusIcon_7z2xb_227",CN="_taskTitle_7z2xb_231",AN="_dependencyBadge_7z2xb_238",NN="_blockedBadge_7z2xb_250",wN="_leafSpacer_7z2xb_255",DN="_childCountBadge_7z2xb_260",kN="_addChildButton_7z2xb_273",RN="_emptyCta_7z2xb_317",MN="_ctaDescription_7z2xb_330",ON="_ctaButton_7z2xb_336",BN="_emptyTaskCta_7z2xb_371",LN="_createTaskLink_7z2xb_376",Ze={container:uN,header:dN,addButton:fN,createForm:hN,createInput:mN,createButton:pN,creatingHint:gN,projectRow:vN,selected:yN,expandArrow:bN,expanded:SN,projectName:xN,taskCount:_N,newTaskButton:TN,taskRow:EN,taskStatusIcon:jN,taskTitle:CN,dependencyBadge:AN,blockedBadge:NN,leafSpacer:wN,childCountBadge:DN,addChildButton:kN,emptyCta:RN,ctaDescription:MN,ctaButton:ON,emptyTaskCta:BN,createTaskLink:LN},wy={not_started:{color:"var(--text-tertiary)",icon:"○"},working:{color:"var(--accent-green)",icon:"●"},paused:{color:"var(--accent-yellow)",icon:"◉"},complete:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"}};function UN(n){const s=new Map(n.map(o=>[o.id,{...o,children:[]}])),l=[];for(const o of s.values())o.parentTaskId&&s.has(o.parentTaskId)?s.get(o.parentTaskId).children.push(o):l.push(o);for(const o of s.values())o.children.sort((c,d)=>c.sortOrder-d.sortOrder);return l.sort((o,c)=>o.sortOrder-c.sortOrder)}const zN=34,VN=16;function Yb({node:n,depth:s,expandedTasks:l,toggleTask:o,selectedTaskId:c,navigate:d,projectId:f,taskStatusById:m}){const p=wy[n.status]||wy.not_started,v=n.dependsOn.length>0&&n.dependsOn.some(N=>m.get(N)!=="complete"),y=l.has(n.id),b=n.children.length>0,_=c===n.id,T=zN+s*VN;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>d(Di(n.id)),className:`${Ze.taskRow} ${_?Ze.selected:""}`,style:{paddingLeft:T},"data-task-id":n.id,children:[b&&h.jsx("span",{className:`${Ze.expandArrow} ${y?Ze.expanded:""}`,role:"button",tabIndex:0,"aria-label":y?"Collapse task":"Expand task",onClick:N=>{N.stopPropagation(),o(n.id)},onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),N.stopPropagation(),o(n.id))},children:"▸"}),!b&&h.jsx("span",{className:Ze.leafSpacer}),h.jsx("span",{className:Ze.taskStatusIcon,style:{color:p.color},children:p.icon}),h.jsx("span",{className:Ze.taskTitle,title:n.title,children:n.title}),b&&h.jsxs("span",{className:Ze.childCountBadge,children:[n.children.filter(N=>N.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${Ze.dependencyBadge} ${v?Ze.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:v?"blocked":"dep"}),s<fA&&h.jsx("button",{onClick:N=>{N.stopPropagation(),d(ki(f,n.id))},title:"Add child task","aria-label":"Add child task",className:Ze.addChildButton,children:"+"})]}),h.jsx(Ui,{children:b&&y&&h.jsx(la.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:n.children.map(N=>h.jsx(Yb,{node:N,depth:s+1,expandedTasks:l,toggleTask:o,selectedTaskId:c,navigate:d,projectId:f,taskStatusById:m},N.id))})})]})}function HN(){const{projects:n,tasks:s,loadTasks:l,createProject:o,projectCreating:c}=Ft(),d=oa(),[f,m]=S.useState(new Set),[p,v]=S.useState(new Set),[y,b]=S.useState(new Set),[_,T]=S.useState(!1),[N,D]=S.useState(""),w=tn("/tasks/:taskId/*"),j=tn("/projects/:projectId"),V=(w==null?void 0:w.params.taskId)!=="new"?w==null?void 0:w.params.taskId:void 0,M=j==null?void 0:j.params.projectId,$=S.useRef(f);$.current=f;const H=S.useMemo(()=>new Map(s.map(W=>[W.id,W.status])),[s]),J=W=>{m(he=>{const R=new Set(he);return R.has(W)?R.delete(W):(R.add(W),l(W)),R})},te=W=>{v(he=>{const R=new Set(he);return R.has(W)?(R.delete(W),b(ge=>new Set(ge).add(W))):(R.add(W),b(ge=>{const ne=new Set(ge);return ne.delete(W),ne})),R})};S.useEffect(()=>{const W=new Set(s.filter(he=>he.parentTaskId).map(he=>he.parentTaskId));W.size>0&&v(he=>{const R=new Set(he);for(const ge of W)y.has(ge)||R.add(ge);return R})},[s,y]),S.useEffect(()=>{M&&!$.current.has(M)&&(m(W=>new Set(W).add(M)),l(M))},[M,l]);const K=()=>{!N.trim()||c||(o(N.trim()),D(""),T(!1))};return h.jsxs("div",{className:Ze.container,children:[h.jsxs("div",{className:Ze.header,children:[h.jsx("span",{children:"Projects"}),h.jsx("button",{className:Ze.addButton,onClick:()=>T(!_),"aria-label":"Create project",title:"Create project",children:"+"})]}),_&&h.jsxs("div",{className:Ze.createForm,children:[h.jsx("input",{type:"text",value:N,onChange:W=>D(W.target.value),onKeyDown:W=>W.key==="Enter"&&K(),placeholder:"Project name...",autoFocus:!0,disabled:c,className:Ze.createInput}),h.jsx("button",{onClick:K,className:Ze.createButton,disabled:c,children:c?h.jsx(Ny,{size:"sm",label:"Creating project"}):"OK"})]}),c&&h.jsxs("div",{className:Ze.creatingHint,children:[h.jsx(Ny,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!_&&h.jsxs("div",{className:Ze.emptyCta,children:[h.jsx("button",{className:Ze.ctaButton,onClick:()=>T(!0),children:"Create Project"}),h.jsx("div",{className:Ze.ctaDescription,children:"Organize your work into projects"})]}),n.map(W=>{const he=f.has(W.id),R=s.filter(je=>je.projectId===W.id),ge=M===W.id,ne=he?UN(R):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{ge?J(W.id):(he||J(W.id),d($l(W.id)))},className:`${Ze.projectRow} ${ge?Ze.selected:""}`,children:[h.jsx("span",{className:`${Ze.expandArrow} ${he?Ze.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ze.projectName,title:W.name,children:W.name}),h.jsx("span",{className:Ze.taskCount,children:R.length>0&&`${R.filter(je=>je.status==="complete").length}/${R.length}`}),h.jsx("button",{onClick:je=>{je.stopPropagation(),d(ki(W.id))},title:"New task",className:Ze.newTaskButton,children:"+"})]}),h.jsx(Ui,{children:he&&h.jsxs(la.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:[ne.map(je=>h.jsx(Yb,{node:je,depth:0,expandedTasks:p,toggleTask:te,selectedTaskId:V,navigate:d,projectId:W.id,taskStatusById:H},je.id)),R.length===0&&h.jsx("div",{className:Ze.emptyTaskCta,children:h.jsx("button",{className:Ze.createTaskLink,onClick:()=>d(ki(W.id)),children:"+ Create Task"})})]})})]},W.id)})]})}const IN="_container_1purk_1",GN="_content_1purk_30",Dy={container:IN,content:GN},PN=320,Kb=220,Zb=600,Xb="grackle-sidebar-width";function qN(){try{const n=localStorage.getItem(Xb);if(n!==null){const s=Number(n);if(Number.isFinite(s)&&s>=Kb&&s<=Zb)return s}}catch{}return PN}function YN(n){try{localStorage.setItem(Xb,String(n))}catch{}}function KN(){const[n]=S.useState(qN),s=S.useRef(null);return S.useEffect(()=>{const l=s.current;if(!l)return;const o=new ResizeObserver(c=>{for(const d of c){const f=d.borderBoxSize[0];if(f){const m=Math.round(f.inlineSize);m>=Kb&&m<=Zb&&YN(m)}}});return o.observe(l),()=>{o.disconnect()}},[]),h.jsx("div",{className:Dy.container,ref:s,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:Dy.content,children:h.jsx(HN,{})})})}const ZN="_bar_teqep_1",XN="_barColumn_teqep_26",$N="_barRow_teqep_52",QN="_input_teqep_58",FN="_inputSmall_teqep_87",JN="_select_teqep_150",WN="_btnPrimary_teqep_180",ew="_btnDanger_teqep_211",tw="_btnGhost_teqep_250",nw="_badge_teqep_278",aw="_statusText_teqep_288",sw="_statusCompleted_teqep_293",iw="_statusFailed_teqep_297",lw="_statusBlocked_teqep_301",ow="_hintText_teqep_306",rw="_creatingHint_teqep_311",cw="_errorHint_teqep_319",uw="_disconnectHint_teqep_325",de={bar:ZN,barColumn:XN,barRow:$N,input:QN,inputSmall:FN,select:JN,btnPrimary:WN,btnDanger:ew,btnGhost:tw,badge:nw,statusText:aw,statusCompleted:sw,statusFailed:iw,statusBlocked:lw,hintText:ow,creatingHint:rw,errorHint:cw,disconnectHint:uw};function ky({value:n,onChange:s,testId:l}){return h.jsxs("select",{"data-testid":l,value:n,onChange:o=>s(o.target.value),className:de.select,children:[h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"stub",children:"stub"})]})}function Ry(n,s){if(!n)return!1;const l=s.find(o=>o.id===n);return l!==void 0&&(l.status==="disconnected"||l.status==="error")}function My({environmentId:n,onReconnect:s}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:de.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>s(n),className:de.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function dw(){const{spawn:n,sendInput:s,kill:l,sessions:o,tasks:c,environments:d,personas:f,addEnvironment:m,provisionEnvironment:p,codespaces:v,codespaceError:y,codespaceListError:b,codespaceCreating:_,listCodespaces:T,createCodespace:N}=Ft(),{showToast:D}=to(),w=oa(),[j]=Sf(),V=tn("/sessions/:sessionId"),M=tn("/tasks/:taskId"),$=tn("/tasks/:taskId/stream"),H=tn("/tasks/:taskId/findings"),J=tn("/tasks/:taskId/edit"),te=tn("/sessions/new"),K=tn("/environments/new"),W=tn("/projects/:projectId"),he=tn("/tasks/new"),R=tn("/"),ge=tn("/settings/*"),ne=V==null?void 0:V.params.sessionId,je=(M==null?void 0:M.params.taskId)??($==null?void 0:$.params.taskId)??(H==null?void 0:H.params.taskId),G=!!te,U=!!K,X=!!W,ee=!!he,Ae=!!J,Ee=!!R&&!G&&!U&&!X&&!ee,Ge=!!ge,we=G?j.get("env")??"":"",_e=G?j.get("runtime")??"claude-code":"claude-code",[Ce,Q]=S.useState(""),[ce,Ie]=S.useState(G?_e:"claude-code"),[F,sn]=S.useState(""),Qn=pe=>{if(sn(pe),pe){const le=f.find(Te=>Te.id===pe);le!=null&&le.runtime&&Ie(le.runtime)}},[ln,jn]=S.useState(""),[dt,Jt]=S.useState("local"),[Hn,In]=S.useState("claude-code"),[mn,Gn]=S.useState(""),[Yt,Pn]=S.useState(""),[Z,se]=S.useState(""),[oe,ue]=S.useState(""),[Se,xe]=S.useState(""),[Xe,Re]=S.useState(""),[nt,xt]=S.useState(""),[pt,At]=S.useState(""),[at,gt]=S.useState(""),[Wt,ft]=S.useState("pick");S.useEffect(()=>{G&&Ie(_e)},[G,_e]);const Lt=ne?o.find(pe=>pe.id===ne):void 0,Ut=je?c.find(pe=>pe.id===je):void 0,cs=(Ut==null?void 0:Ut.latestSessionId)||void 0,qn=cs?o.find(pe=>pe.id===cs):void 0,ae=Ut?Ut.dependsOn.some(pe=>{const le=c.find(Te=>Te.id===pe);return le&&le.status!=="complete"}):!1;if(Ee||Ge)return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:de.hintText,children:"Select a session or click + to start"})});if(Ae||ee)return h.jsx(h.Fragment,{});if(U){const pe=P=>{if(!P.trim())return!0;const Fe=Number(P);return Number.isInteger(Fe)&&Fe>=1&&Fe<=65535},le=()=>!(!ln.trim()||dt==="ssh"&&!mn.trim()||dt==="codespace"&&!Xe.trim()||(dt==="local"||dt==="ssh")&&!pe(Yt)),Te=()=>{if(!le())return;const P={};if(dt==="local"){if(mn.trim()&&(P.host=mn.trim()),Yt.trim()){const Fe=Number(Yt);Number.isInteger(Fe)&&(P.port=Fe)}}else if(dt==="ssh"){if(P.host=mn.trim(),Z.trim()&&(P.user=Z.trim()),Yt.trim()){const Fe=Number(Yt);Number.isInteger(Fe)&&(P.sshPort=Fe)}nt.trim()&&(P.identityFile=nt.trim())}else dt==="docker"?(oe.trim()&&(P.image=oe.trim()),Se.trim()&&(P.repo=Se.trim())):dt==="codespace"&&(P.codespaceName=Xe.trim());m(ln.trim(),dt,P,Hn),D("Environment added successfully","success"),jn(""),Jt("local"),In("claude-code"),Gn(""),Pn(""),se(""),ue(""),xe(""),Re(""),xt(""),At(""),gt(""),ft("pick"),w(wi,{replace:!0})};return h.jsxs("div",{className:de.barColumn,children:[h.jsxs("div",{className:de.barRow,children:[h.jsx("span",{className:de.badge,children:"new env"}),h.jsx("input",{type:"text",value:ln,onChange:P=>jn(P.target.value),placeholder:"Environment name...",autoFocus:!0,className:de.input}),h.jsxs("select",{value:dt,onChange:P=>{Jt(P.target.value),P.target.value==="codespace"&&(T(),ft("pick"),Re(""))},className:de.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx(ky,{value:Hn,onChange:In,testId:"new-environment-runtime-select"}),h.jsx("button",{onClick:Te,disabled:!le(),className:de.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:de.barRow,children:[dt==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:mn,onChange:P=>Gn(P.target.value),placeholder:"Host (optional)...",className:de.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Yt,onChange:P=>Pn(P.target.value),placeholder:"Port (optional)...",className:de.inputSmall})]}),dt==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:mn,onChange:P=>Gn(P.target.value),placeholder:"Host (required)...",className:de.inputSmall}),h.jsx("input",{type:"text",value:Z,onChange:P=>se(P.target.value),placeholder:"User (optional)...",className:de.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Yt,onChange:P=>Pn(P.target.value),placeholder:"SSH port (optional)...",className:de.inputSmall}),h.jsx("input",{type:"text",value:nt,onChange:P=>xt(P.target.value),placeholder:"Identity file (optional)...",className:de.inputSmall})]}),dt==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:oe,onChange:P=>ue(P.target.value),placeholder:"Image (optional)...",className:de.inputSmall}),h.jsx("input",{type:"text",value:Se,onChange:P=>xe(P.target.value),placeholder:"Repo (optional)...",className:de.inputSmall})]}),dt==="codespace"&&Wt==="pick"&&h.jsxs(h.Fragment,{children:[!b&&h.jsxs("select",{value:Xe,onChange:P=>{P.target.value==="__create__"?(ft("create"),Re("")):(Re(P.target.value),P.target.value&&!ln.trim()&&jn(P.target.value))},disabled:_,className:de.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),v.map(P=>h.jsxs("option",{value:P.name,children:[P.name," (",P.repository,") — ",P.state]},P.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),_&&h.jsx("span",{className:de.creatingHint,children:"Creating codespace..."}),b&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:de.errorHint,children:b}),h.jsx("input",{type:"text",value:Xe,onChange:P=>Re(P.target.value),placeholder:"Or enter codespace name manually...",className:de.inputSmall})]}),y&&!b&&h.jsx("span",{className:de.errorHint,children:y})]}),dt==="codespace"&&Wt==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:pt,onChange:P=>At(P.target.value),placeholder:"owner/repo",className:de.inputSmall}),h.jsx("input",{type:"text",value:at,onChange:P=>gt(P.target.value),placeholder:"Machine type (optional)...",className:de.inputSmall}),h.jsx("button",{onClick:()=>{pt.trim()&&(N(pt.trim(),at.trim()||void 0),ft("pick"),At(""),gt(""))},disabled:!pt.trim(),className:de.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{ft("pick"),At(""),gt("")},className:de.btnGhost,children:"Cancel"})]})]})]})}if(X)return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:de.hintText,children:"Select a task or click + to create one"})});if(je&&Ut){if(Ut.status==="not_started"){const pe=ae?Ut.dependsOn.map(le=>c.find(Te=>Te.id===le)).filter(le=>le&&le.status!=="complete").map(le=>le.title):[];return h.jsx("div",{className:de.bar,children:ae?h.jsxs("span",{className:de.statusBlocked,children:["Blocked by: ",pe.join(", ")]}):h.jsx("span",{className:de.hintText,children:"Use the buttons above to start or manage this task"})})}if(Ut.status==="working"||Ut.status==="paused"){if((qn==null?void 0:qn.status)==="idle"){const le=qn.environmentId,Te=Ry(le,d),P=Fe=>{Fe.preventDefault();const on=Ut.latestSessionId||cs;!Ce.trim()||!on||Te||(s(on,Ce),Q(""))};return h.jsxs("form",{onSubmit:P,className:de.bar,children:[Te&&le&&h.jsx(My,{environmentId:le,onReconnect:p}),h.jsx("input",{type:"text",value:Ce,onChange:Fe=>Q(Fe.target.value),placeholder:"Type a message...",autoFocus:!Te,disabled:Te,className:de.input}),h.jsx("span",{title:Te?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Ce.trim()||Te,className:de.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:de.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:de.input})})}if(Ut.status==="complete")return h.jsxs("div",{className:de.bar,children:[h.jsx("span",{className:`${de.statusText} ${de.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>w(ki(Ut.projectId)),className:de.btnPrimary,children:"+ New Task"})]});if(Ut.status==="failed")return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:`${de.statusText} ${de.statusFailed}`,children:"Task failed"})})}if(G){const pe=le=>{le.preventDefault(),!(!Ce.trim()||!we)&&(n(we,Ce,void 0,ce,F),D("Session started","success"),Q(""),sn(""))};return h.jsxs("form",{onSubmit:pe,className:de.bar,children:[h.jsx("span",{className:de.badge,children:"new chat"}),h.jsx("input",{type:"text",value:Ce,onChange:le=>Q(le.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:de.input}),h.jsx(ky,{value:ce,onChange:Ie,testId:"new-chat-runtime-select"}),h.jsxs("select",{value:F,onChange:le=>Qn(le.target.value),className:de.select,children:[h.jsx("option",{value:"",children:"No persona"}),f.map(le=>h.jsx("option",{value:le.id,children:le.name},le.id))]}),h.jsx("button",{type:"submit",disabled:!Ce.trim()||!we,className:de.btnPrimary,children:"Go"})]})}if(ne){const pe=(Lt==null?void 0:Lt.status)==="running",le=(Lt==null?void 0:Lt.status)==="idle",Te=Lt!==void 0&&["completed","failed","interrupted"].includes(Lt.status);if(pe)return h.jsxs("div",{className:de.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:de.input}),h.jsx("button",{onClick:()=>l(ne),className:de.btnDanger,title:"Stop session",children:"Stop"})]});if(le){const P=Ry(Lt.environmentId,d),Fe=on=>{on.preventDefault(),!(!Ce.trim()||P)&&(s(ne,Ce),Q(""))};return h.jsxs("form",{onSubmit:Fe,className:de.bar,children:[P&&Lt.environmentId&&h.jsx(My,{environmentId:Lt.environmentId,onReconnect:p}),h.jsx("input",{type:"text",value:Ce,onChange:on=>Q(on.target.value),placeholder:"Type a message...",autoFocus:!P,disabled:P,className:de.input}),h.jsx("span",{title:P?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Ce.trim()||P,className:de.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>l(ne),className:de.btnDanger,title:"Stop session",children:"Stop"})]})}if(Te)return h.jsxs("div",{className:de.bar,children:[h.jsxs("span",{className:`${de.statusText} ${de.hintText}`,children:["Session ",Lt.status]}),h.jsx("button",{onClick:()=>w(m0(Lt.environmentId,Lt.runtime)),className:de.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:de.hintText,children:"Loading..."})})}const fw="_toast_da8ll_1",hw="_success_da8ll_18",mw="_icon_da8ll_22",pw="_error_da8ll_25",gw="_warning_da8ll_32",vw="_info_da8ll_38",yw="_message_da8ll_53",bw="_close_da8ll_60",Ll={toast:fw,success:hw,icon:mw,error:pw,warning:gw,info:vw,message:yw,close:bw},Sw={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function xw({toast:n,onDismiss:s}){return S.useEffect(()=>{const l=setTimeout(()=>s(n.id),n.duration);return()=>clearTimeout(l)},[n.id,n.duration,s]),h.jsxs(la.div,{className:`${Ll.toast} ${Ll[n.variant]}`,role:"status",initial:{opacity:0,y:-16,scale:.94},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.94},transition:{duration:.2,ease:"easeOut"},layout:!0,children:[h.jsx("span",{className:Ll.icon,"aria-hidden":"true",children:Sw[n.variant]}),h.jsx("span",{className:Ll.message,children:n.message}),h.jsx("button",{type:"button",className:Ll.close,onClick:()=>s(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const _w="_container_qqse2_1",Tw={container:_w};function Ew(){const{toasts:n,dismissToast:s}=to();return h.jsx("div",{className:Tw.container,"data-testid":"toast-container",children:h.jsx(Ui,{children:n.map(l=>h.jsx(xw,{toast:l,onDismiss:s},l.id))})})}function jw(n,s){const l=S.useRef(null);S.useEffect(()=>{const o=l.current;if(l.current=n,o===null)return;const c=new Map;for(const f of o)c.set(f.id,f);const d=new Set;for(const f of n){d.add(f.id);const m=c.get(f.id);m&&m.status!==f.status&&(f.status==="connecting"||f.status==="sleeping"||(f.status==="connected"?s("Environment connected","success"):f.status==="error"?s("Environment provision failed","error"):f.status==="disconnected"&&(m.status==="connected"?s("Environment disconnected","warning"):s("Environment stopped","info"))))}for(const f of o)d.has(f.id)||s("Environment removed","info")},[n,s])}const Cw="_panelContainer_1blx0_1",Aw="_emptyState_1blx0_8",Nw="_projectSummary_1blx0_17",ww="_projectSummaryTitle_1blx0_28",Dw="_projectSummarySubtitle_1blx0_32",kw="_header_1blx0_36",Rw="_headerInfo_1blx0_63",Mw="_killButton_1blx0_69",Ow="_headerTitle_1blx0_98",Bw="_headerActions_1blx0_108",Lw="_taskStatusBadge_1blx0_115",Uw="_taskBranch_1blx0_124",zw="_taskBlockedBadge_1blx0_130",Vw="_btnPrimary_1blx0_138",Hw="_btnDanger_1blx0_169",Iw="_btnGhost_1blx0_208",Gw="_tabBar_1blx0_264",Pw="_tab_1blx0_264",qw="_active_1blx0_285",Yw="_eventScroll_1blx0_290",Kw="_tabContent_1blx0_296",Zw="_noContext_1blx0_301",Xw="_overviewContent_1blx0_307",$w="_overviewDashboard_1blx0_316",Qw="_overviewHero_1blx0_322",Fw="_statusBadge_1blx0_329",Jw="_statusPending_1blx0_341",Ww="_statusInProgress_1blx0_351",eD="_statusDone_1blx0_361",tD="_statusFailed_1blx0_366",nD="_statusWaitingInput_1blx0_371",aD="_overviewBranchPill_1blx0_376",sD="_branchLink_1blx0_391",iD="_overviewSection_1blx0_402",lD="_overviewLabel_1blx0_408",oD="_overviewValue_1blx0_415",rD="_overviewMuted_1blx0_420",cD="_overviewMarkdown_1blx0_426",uD="_envRow_1blx0_495",dD="_envDot_1blx0_501",fD="_envDotGreen_1blx0_508",hD="_envDotYellow_1blx0_512",mD="_envDotRed_1blx0_516",pD="_envDotGray_1blx0_520",gD="_depList_1blx0_524",vD="_depItem_1blx0_530",yD="_depBlocked_1blx0_537",bD="_depDone_1blx0_541",SD="_timeline_1blx0_545",xD="_timelineRow_1blx0_551",_D="_timelineKey_1blx0_558",TD="_timelineValue_1blx0_564",ED="_timelineDelta_1blx0_568",jD="_reviewNotes_1blx0_579",CD="_waitingMessage_1blx0_596",AD="_errorMessage_1blx0_600",ND="_eventOverflowWarning_1blx0_604",wD="_attemptSelector_1blx0_618",DD="_attemptLabel_1blx0_629",kD="_attemptButton_1blx0_633",RD="_attemptActive_1blx0_650",MD="_attemptStatus_1blx0_656",OD="_emptyCta_1blx0_662",BD="_ctaTitle_1blx0_674",LD="_ctaDescription_1blx0_680",UD="_ctaButton_1blx0_687",zD="_projectHeader_1blx0_736",VD="_projectName_1blx0_761",HD="_projectMeta_1blx0_774",ID="_metaRow_1blx0_782",GD="_metaLabel_1blx0_789",PD="_metaValue_1blx0_799",qD="_metaPlaceholder_1blx0_809",YD="_editButton_1blx0_814",KD="_editInput_1blx0_830",ZD="_editTextarea_1blx0_862",XD="_editSelect_1blx0_898",$D="_archiveButton_1blx0_931",QD="_repoLink_1blx0_961",FD="_metaValueClickable_1blx0_971",JD="_editHint_1blx0_990",WD="_editError_1blx0_999",ek="_editInputInvalid_1blx0_1006",tk="_unsavedDot_1blx0_1011",nk="_metaToggle_1blx0_1019",ak="_metaToggleArrow_1blx0_1040",sk="_metaToggleArrowOpen_1blx0_1045",ik="_progressBarContainer_1blx0_1049",lk="_progressBar_1blx0_1049",ok="_progressFill_1blx0_1065",rk="_progressLabel_1blx0_1072",ck="_metaTimestamps_1blx0_1079",uk="_metaTimestamp_1blx0_1079",dk="_editFieldWrapper_1blx0_1095",A={panelContainer:Cw,emptyState:Aw,projectSummary:Nw,projectSummaryTitle:ww,projectSummarySubtitle:Dw,header:kw,headerInfo:Rw,killButton:Mw,headerTitle:Ow,headerActions:Bw,taskStatusBadge:Lw,taskBranch:Uw,taskBlockedBadge:zw,btnPrimary:Vw,btnDanger:Hw,btnGhost:Iw,tabBar:Gw,tab:Pw,active:qw,eventScroll:Yw,tabContent:Kw,noContext:Zw,overviewContent:Xw,overviewDashboard:$w,overviewHero:Qw,statusBadge:Fw,statusPending:Jw,statusInProgress:Ww,statusDone:eD,statusFailed:tD,statusWaitingInput:nD,overviewBranchPill:aD,branchLink:sD,overviewSection:iD,overviewLabel:lD,overviewValue:oD,overviewMuted:rD,overviewMarkdown:cD,envRow:uD,envDot:dD,envDotGreen:fD,envDotYellow:hD,envDotRed:mD,envDotGray:pD,depList:gD,depItem:vD,depBlocked:yD,depDone:bD,timeline:SD,timelineRow:xD,timelineKey:_D,timelineValue:TD,timelineDelta:ED,reviewNotes:jD,waitingMessage:CD,errorMessage:AD,eventOverflowWarning:ND,attemptSelector:wD,attemptLabel:DD,attemptButton:kD,attemptActive:RD,attemptStatus:MD,emptyCta:OD,ctaTitle:BD,ctaDescription:LD,ctaButton:UD,projectHeader:zD,projectName:VD,projectMeta:HD,metaRow:ID,metaLabel:GD,metaValue:PD,metaPlaceholder:qD,editButton:YD,editInput:KD,editTextarea:ZD,editSelect:XD,archiveButton:$D,repoLink:QD,metaValueClickable:FD,editHint:JD,editError:WD,editInputInvalid:ek,unsavedDot:tk,metaToggle:nk,metaToggleArrow:ak,metaToggleArrowOpen:sk,progressBarContainer:ik,progressBar:lk,progressFill:ok,progressLabel:rk,metaTimestamps:ck,metaTimestamp:uk,editFieldWrapper:dk};function fk(){const{projects:n,createProject:s}=Ft();return n.length===0?h.jsxs("div",{className:A.emptyCta,children:[h.jsx("div",{className:A.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:A.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),h.jsx("button",{className:A.ctaButton,onClick:()=>{const l=window.prompt("Project name:");l!=null&&l.trim()&&s(l.trim())},children:"Create Your First Project"})]}):h.jsx("div",{className:A.emptyState,children:"Select a project or task to get started"})}function hk(n,s){const l=[];let o=n;const c=new Set;for(;o&&s.has(o)&&!c.has(o);){c.add(o);const d=s.get(o);l.unshift(d),o=d.parentTaskId||void 0}return l}const Os={label:"Home",url:"/"};function mk(n){return n?[Os,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Os,{label:"Settings",url:void 0}]}function pk(){return[Os,{label:"New Environment",url:void 0}]}function gk(){return[Os,{label:"New Chat",url:void 0}]}function vk(n){return[Os,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function yk(n,s){const l=s.find(o=>o.id===n);return[Os,{label:(l==null?void 0:l.name)??"Project",url:void 0}]}function bk(n,s,l){const o=hk(n,l),c=l.get(n),d=c==null?void 0:c.projectId,f=d?s.find(v=>v.id===d):void 0,m=[Os];f&&m.push({label:f.name,url:$l(f.id)});for(let v=0;v<o.length-1;v++)m.push({label:o[v].title,url:Di(o[v].id)});const p=o[o.length-1];return m.push({label:(p==null?void 0:p.title)??n,url:void 0}),m}function Sk(){const n=gk();return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Hi,{segments:n}),h.jsx("div",{className:A.emptyState,children:"Enter a prompt below to start a new session"})]})}function $b(n){const s=[];for(const l of n){const o=s[s.length-1];l.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?s[s.length-1]={...o,content:o.content+l.content}:s.push(l)}return s}function Qb(n){const s=new Map;for(const d of n)if(d.raw)try{s.set(d,JSON.parse(d.raw))}catch{}const l=new Map;for(const d of n){if(d.eventType!=="tool_use")continue;const f=s.get(d);if(!(!f||typeof f.id!="string"))try{const m=JSON.parse(d.content);l.set(f.id,{tool:m.tool,args:m.args})}catch{}}const o=new Set;return n.map(d=>{if(d.eventType!=="tool_result")return d;const f=s.get(d);if(!f||typeof f.tool_use_id!="string")return d;const m=l.get(f.tool_use_id);return m?(o.add(f.tool_use_id),{...d,toolUseCtx:m}):d}).filter(d=>{if(d.eventType!=="tool_use")return!0;const f=s.get(d);return f&&typeof f.id=="string"?!o.has(f.id):!0})}function xk({sessionId:n,session:s,isActive:l,onKill:o}){return h.jsxs("div",{className:A.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),s&&` | ${s.runtime} | ${s.status}`]}),h.jsxs("span",{className:A.headerInfo,children:[s&&h.jsx("span",{children:s.prompt.length>60?s.prompt.slice(0,60)+"...":s.prompt}),l&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:A.killButton,children:"×"})]})]})}function _k({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:A.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function Tk({sessionEvents:n,session:s,eventsDropped:l,scrollRef:o}){const c=s&&["completed","failed","interrupted"].includes(s.status),d=c?`Session ${s.status} with no events recorded.`:"Waiting for events...";return h.jsxs("div",{ref:o,className:A.eventScroll,children:[n.length===0&&h.jsx("div",{className:c?A.errorMessage:A.waitingMessage,children:d}),h.jsx(_k,{eventsDropped:l}),n.map((f,m)=>h.jsx(qb,{event:f,toolUseCtx:f.toolUseCtx},`${f.sessionId}-${f.timestamp}-${m}`))]})}function Ek(){const{sessionId:n}=Jr(),{events:s,eventsDropped:l,sessions:o,kill:c,loadSessionEvents:d}=Ft(),f=S.useRef(null),m=S.useRef(void 0),p=vk(n),v=o.find(_=>_.id===n)??void 0,y=S.useMemo(()=>{const _=n?s.filter(T=>T.sessionId===n):[];return Qb($b(_))},[s,n]);if(S.useEffect(()=>{n&&n!==m.current&&(m.current=n,d(n))},[n,d]),S.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight)},[y.length]),!n)return h.jsx("div",{className:A.emptyState,children:"No session selected"});const b=(v==null?void 0:v.status)==="running"||(v==null?void 0:v.status)==="idle";return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Hi,{segments:p}),h.jsx(xk,{sessionId:n,session:v,isActive:b,onKill:c}),h.jsx(Tk,{sessionEvents:y,session:v,eventsDropped:l,scrollRef:f})]})}const Oy=220,By=70,jk=40,Ck=60,Ak="hierarchy",Nk="dependency";function wk(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const s=new Pg.graphlib.Graph({multigraph:!0});s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:"TB",nodesep:jk,ranksep:Ck});const l=new Map(n.map(f=>[f.id,f])),o=new Map;for(const f of n)if(f.parentTaskId&&l.has(f.parentTaskId)){const m=o.get(f.parentTaskId)||[];m.push(f),o.set(f.parentTaskId,m)}for(const f of n)s.setNode(f.id,{width:Oy,height:By});const c=[];for(const f of n){if(f.parentTaskId&&l.has(f.parentTaskId)){const m=`hierarchy-${f.parentTaskId}-${f.id}`;s.setEdge(f.parentTaskId,f.id,{},m),c.push({id:m,source:f.parentTaskId,target:f.id,type:"smoothstep",data:{edgeType:Ak},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const m of f.dependsOn)if(l.has(m)){const p=`dependency-${m}-${f.id}`;s.setEdge(m,f.id,{},p),c.push({id:p,source:m,target:f.id,type:"smoothstep",data:{edgeType:Nk},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return Pg.layout(s),{nodes:n.map(f=>{const m=s.node(f.id),p=o.get(f.id)||[];return{id:f.id,type:"task",position:{x:m.x-Oy/2,y:m.y-By/2},data:{task:f,childCount:p.length,doneChildCount:p.filter(v=>v.status==="complete").length,hasDependencies:f.dependsOn.length>0}}}),edges:c}},[n])}const Dk="_dagContainer_3al6d_1",kk="_taskNode_3al6d_26",Rk="_taskNodeBorder_3al6d_48",Mk="_taskNodeContent_3al6d_54",Ok="_taskNodeHeader_3al6d_64",Bk="_taskNodeIcon_3al6d_71",Lk="_taskNodeTitle_3al6d_76",Uk="_taskNodeBadges_3al6d_84",zk="_childBadge_3al6d_89",Vk="_depBadge_3al6d_101",Hk="_handle_3al6d_113",Ik="_emptyCta_3al6d_120",Gk="_ctaDescription_3al6d_131",Pk="_ctaButton_3al6d_138",nn={dagContainer:Dk,taskNode:kk,taskNodeBorder:Rk,taskNodeContent:Mk,taskNodeHeader:Ok,taskNodeIcon:Bk,taskNodeTitle:Lk,taskNodeBadges:Uk,childBadge:zk,depBadge:Vk,handle:Hk,emptyCta:Ik,ctaDescription:Gk,ctaButton:Pk},Ly={not_started:{color:"var(--text-tertiary)",icon:"○"},working:{color:"var(--accent-green)",icon:"●"},paused:{color:"var(--accent-yellow)",icon:"◉"},complete:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"}};function qk({data:n}){const{task:s,childCount:l,doneChildCount:o,hasDependencies:c}=n,d=Ly[s.status]||Ly.not_started;return h.jsxs("div",{className:nn.taskNode,"data-task-id":s.id,"data-task-title":s.title,children:[h.jsx(qg,{type:"target",position:Yg.Top,className:nn.handle}),h.jsx("div",{className:nn.taskNodeBorder,style:{backgroundColor:d.color}}),h.jsxs("div",{className:nn.taskNodeContent,children:[h.jsxs("div",{className:nn.taskNodeHeader,children:[h.jsx("span",{className:nn.taskNodeIcon,style:{color:d.color},children:d.icon}),h.jsx("span",{className:nn.taskNodeTitle,children:s.title})]}),h.jsxs("div",{className:nn.taskNodeBadges,children:[l>0&&h.jsxs("span",{className:nn.childBadge,children:[o,"/",l]}),c&&h.jsx("span",{className:nn.depBadge,children:"dep"})]})]}),h.jsx(qg,{type:"source",position:Yg.Bottom,className:nn.handle})]})}const Yk={pending:"--text-tertiary",assigned:"--accent-blue",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",failed:"--accent-red",waiting_input:"--accent-yellow"},Kk={task:qk};function Zk({projectId:n}){const{tasks:s}=Ft(),l=oa(),{resolvedThemeId:o}=Zy(),c=S.useMemo(()=>s.filter(y=>y.projectId===n),[s,n]),{nodes:d,edges:f}=wk(c),m=S.useMemo(()=>{const y=getComputedStyle(document.documentElement),b={};for(const[_,T]of Object.entries(Yk))b[_]=y.getPropertyValue(T).trim()||"#6b7a8d";return b},[o]),p=S.useCallback((y,b)=>{l(Di(b.id))},[l]),v=S.useCallback(y=>{const b=y.data;return m[b.task.status]||m.pending},[m]);return c.length===0?h.jsxs("div",{className:nn.emptyCta,children:[h.jsx("button",{className:nn.ctaButton,onClick:()=>l(ki(n)),children:"Create Task"}),h.jsx("div",{className:nn.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:nn.dagContainer,children:h.jsxs(h1,{nodes:d,edges:f,nodeTypes:Kk,onNodeClick:p,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(m1,{variant:p1.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(g1,{showInteractive:!1}),h.jsx(v1,{nodeColor:v,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function Xk(n){const s=n.toLowerCase();return s==="ready"||s==="running"||s==="available"||s==="connected"?A.envDotGreen:s==="provisioning"||s==="starting"||s==="pending"||s==="connecting"?A.envDotYellow:s==="error"||s==="failed"||s==="disconnected"?A.envDotRed:A.envDotGray}function Uy(n){if(!n)return"";const s=new Date(n);if(isNaN(s.getTime()))return"";const o=Date.now()-s.getTime();if(o<0)return"just now";const c=Math.floor(o/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;const d=Math.floor(c/60);if(d<24)return`${d}h ago`;const f=Math.floor(d/24);return f<30?`${f}d ago`:s.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function $k(){const{projectId:n}=Jr(),s=oa(),{tasks:l,environments:o,projects:c,archiveProject:d,updateProject:f}=Ft(),[m,p]=S.useState("tasks"),[v,y]=S.useState(!1),[b,_]=S.useState(null),[T,N]=S.useState(""),[D,w]=S.useState(""),[j,V]=S.useState(!1),M=S.useRef(void 0),$=S.useRef(null),H=S.useRef(null),J=S.useRef(null),te=S.useRef(null),K=S.useRef(null),W=S.useRef(null),he=yk(n,c);S.useEffect(()=>{const Q=M.current;M.current=n,!(Q===void 0||Q===n)&&(b!==null||T!=="")&&(_(null),N(""))},[n,b,T]),S.useEffect(()=>{if(b===null)return;const Q=b==="name"?H.current:b==="description"?J.current:b==="repoUrl"?te.current:b==="worktreeBasePath"?W.current:K.current;if(!Q)return;const ce=window.setTimeout(()=>{Q.focus()},0);return()=>{window.clearTimeout(ce)}},[b]);const R=c.find(Q=>Q.id===n),ge=l.filter(Q=>Q.projectId===n),ne=ge.filter(Q=>Q.status==="complete").length,je=ge.length,G=je>0?Math.round(ne/je*100):0,U=100,X=(Q,ce)=>{$.current=Q,_(Q),N(ce),w("")},ee=()=>{$.current=null,_(null),N(""),w("")},Ae=(Q,ce)=>{if(Q==="name"){const Ie=ce.trim();if(!Ie)return"Name is required";if(Ie.length>U)return`Max ${U} characters`}if(Q==="repoUrl"){const Ie=ce.trim();if(Ie&&!/^https?:\/\/.+/.test(Ie))return"Must be a valid http(s) URL"}return""},Ee=Q=>{if(!R)return;const ce=T.trim(),Ie=Ae(Q,T);if(Ie){w(Ie);return}if(Q==="name"){if(ce===R.name){ee();return}f(R.id,{name:ce})}else if(Q==="description"){const F=T;if(F===R.description){ee();return}f(R.id,{description:F})}else if(Q==="repoUrl"){if(ce===R.repoUrl){ee();return}f(R.id,{repoUrl:ce})}else if(Q==="defaultEnvironmentId"){if(T===R.defaultEnvironmentId){ee();return}f(R.id,{defaultEnvironmentId:T})}else{if(ce===R.worktreeBasePath){ee();return}f(R.id,{worktreeBasePath:ce})}ee()},Ge=(Q,ce)=>{Q.key==="Escape"?ee():Q.key==="Enter"&&ce!=="description"&&Ee(ce)},we=Q=>R?Q==="name"?T.trim()!==R.name:Q==="description"?T!==R.description:Q==="repoUrl"?T.trim()!==R.repoUrl:Q==="defaultEnvironmentId"?T!==R.defaultEnvironmentId:T.trim()!==R.worktreeBasePath:!1,_e=o.find(Q=>Q.id===(R==null?void 0:R.defaultEnvironmentId)),Ce=b==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Hi,{segments:he}),h.jsxs("div",{className:A.projectHeader,children:[h.jsx("span",{className:A.projectName,"data-testid":"project-name",children:b==="name"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("input",{ref:H,className:`${A.editInput} ${D?A.editInputInvalid:""}`,value:T,onChange:Q=>{N(Q.target.value),w("")},onBlur:Q=>{if($.current==="name"){$.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="name"||Ee("name")},onKeyDown:Q=>Ge(Q,"name"),maxLength:U,"aria-label":"Project name","data-testid":"edit-name-input"}),we("name")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),D&&h.jsx("span",{className:A.editError,"data-testid":"edit-error",children:D}),h.jsx("span",{className:A.editHint,children:Ce})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>X("name",(R==null?void 0:R.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(R==null?void 0:R.name)||n}`,"data-testid":"edit-name-button",children:[(R==null?void 0:R.name)||n,h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})}),h.jsx("button",{className:A.archiveButton,onClick:()=>y(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),h.jsxs("button",{className:A.metaToggle,onClick:()=>V(!j),"aria-expanded":!j,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${A.metaToggleArrow} ${j?"":A.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!j&&h.jsxs("div",{className:A.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Description"}),h.jsx("div",{className:A.metaValue,children:b==="description"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("textarea",{ref:J,className:A.editTextarea,value:T,onChange:Q=>{N(Q.target.value),w("")},onBlur:Q=>{if($.current==="description"){$.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="description"||Ee("description")},onKeyDown:Q=>Ge(Q,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),we("description")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),h.jsx("span",{className:A.editHint,children:Ce})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>X("description",(R==null?void 0:R.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[R!=null&&R.description?h.jsx("span",{className:A.overviewMarkdown,children:h.jsx(uf,{remarkPlugins:[df],children:R.description})}):h.jsx("span",{className:A.metaPlaceholder,children:"No description"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Repository"}),h.jsx("div",{className:A.metaValue,children:b==="repoUrl"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("input",{ref:te,className:`${A.editInput} ${D?A.editInputInvalid:""}`,value:T,onChange:Q=>{N(Q.target.value),w("")},onBlur:Q=>{if($.current==="repoUrl"){$.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="repoUrl"||Ee("repoUrl")},onKeyDown:Q=>Ge(Q,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),we("repoUrl")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),D&&h.jsx("span",{className:A.editError,"data-testid":"edit-error",children:D}),h.jsx("span",{className:A.editHint,children:Ce})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:Q=>{Q.preventDefault(),X("repoUrl",(R==null?void 0:R.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[R!=null&&R.repoUrl&&/^https?:\/\//i.test(R.repoUrl)?h.jsx("a",{className:A.repoLink,href:R.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:Q=>Q.stopPropagation(),children:R.repoUrl}):R!=null&&R.repoUrl?h.jsx("span",{children:R.repoUrl}):h.jsx("span",{className:A.metaPlaceholder,children:"No repository"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Environment"}),h.jsx("div",{className:A.metaValue,children:b==="defaultEnvironmentId"?h.jsxs("select",{ref:K,className:A.editSelect,value:T,onChange:Q=>{$.current=null,N(Q.target.value);const ce=Q.target.value;R&&ce!==R.defaultEnvironmentId&&f(R.id,{defaultEnvironmentId:ce}),ee()},onBlur:Q=>{if($.current==="defaultEnvironmentId"){$.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="defaultEnvironmentId"||ee()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[h.jsx("option",{value:"",children:"None"}),o.map(Q=>h.jsx("option",{value:Q.id,children:Q.displayName},Q.id))]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>X("defaultEnvironmentId",(R==null?void 0:R.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[_e?h.jsxs("span",{className:A.envRow,children:[h.jsx("span",{className:`${A.envDot} ${Xk(_e.status)}`}),_e.displayName]}):h.jsx("span",{className:A.metaPlaceholder,children:(R==null?void 0:R.defaultEnvironmentId)||"No default environment"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Worktree Base"}),h.jsx("div",{className:A.metaValue,children:b==="worktreeBasePath"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("input",{ref:W,className:`${A.editInput} ${D?A.editInputInvalid:""}`,value:T,onChange:Q=>{N(Q.target.value),w("")},onBlur:Q=>{if($.current==="worktreeBasePath"){$.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="worktreeBasePath"||Ee("worktreeBasePath")},onKeyDown:Q=>Ge(Q,"worktreeBasePath"),placeholder:"/workspaces/my-repo","aria-label":"Worktree base path","data-testid":"edit-worktree-base-path-input"}),we("worktreeBasePath")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),D&&h.jsx("span",{className:A.editError,"data-testid":"edit-error",children:D}),h.jsx("span",{className:A.editHint,children:Ce})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>X("worktreeBasePath",(R==null?void 0:R.worktreeBasePath)||""),title:"Click to edit worktree base path","aria-label":"Edit worktree base path","data-testid":"edit-worktree-base-path-button",children:[R!=null&&R.worktreeBasePath?h.jsx("span",{children:R.worktreeBasePath}):h.jsx("span",{className:A.metaPlaceholder,children:"Default (server default)"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),R&&h.jsxs("div",{className:A.metaTimestamps,children:[h.jsxs("span",{className:A.metaTimestamp,children:["Created ",Uy(R.createdAt)]}),R.updatedAt&&R.updatedAt!==R.createdAt&&h.jsxs("span",{className:A.metaTimestamp,children:["· Updated ",Uy(R.updatedAt)]})]})]}),je>0&&h.jsxs("div",{className:A.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:A.progressBar,children:h.jsx("div",{className:A.progressFill,style:{width:`${G}%`}})}),h.jsxs("span",{className:A.progressLabel,children:[ne,"/",je]})]}),h.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Project view",children:[h.jsx("button",{role:"tab","aria-selected":m==="graph",className:`${A.tab} ${m==="graph"?A.active:""}`,onClick:()=>p("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":m==="tasks",className:`${A.tab} ${m==="tasks"?A.active:""}`,onClick:()=>p("tasks"),children:"Tasks"})]}),m==="tasks"&&je>0&&h.jsxs("div",{className:A.projectSummary,children:[h.jsx("span",{className:A.projectSummaryTitle,children:`${ne}/${je} tasks complete`}),h.jsx("span",{className:A.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&je===0&&h.jsxs("div",{className:A.emptyCta,children:[h.jsx("button",{className:A.ctaButton,onClick:()=>s(ki(n)),children:"Create Task"}),h.jsx("div",{className:A.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),m==="graph"&&h.jsx(Zk,{projectId:n}),h.jsx(lc,{isOpen:v,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{R&&(d(R.id),s("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const Qk="_container_yc33j_1",Fk="_header_yc33j_8",Jk="_headerTitle_yc33j_35",Wk="_badge_yc33j_44",eR="_headerActions_yc33j_54",tR="_body_yc33j_61",nR="_formContent_yc33j_68",aR="_section_yc33j_75",sR="_label_yc33j_81",iR="_titleInput_yc33j_88",lR="_descriptionTextarea_yc33j_121",oR="_parentContext_yc33j_157",rR="_parentLabel_yc33j_165",cR="_parentName_yc33j_172",uR="_depList_yc33j_210",dR="_depItem_yc33j_216",fR="_depItemSelected_yc33j_238",hR="_noDeps_yc33j_242",mR="_btnPrimary_yc33j_248",pR="_btnGhost_yc33j_279",ut={container:Qk,header:Fk,headerTitle:Jk,badge:Wk,headerActions:eR,body:tR,formContent:nR,section:aR,label:sR,titleInput:iR,descriptionTextarea:lR,parentContext:oR,parentLabel:rR,parentName:cR,depList:uR,depItem:dR,depItemSelected:fR,noDeps:hR,btnPrimary:mR,btnGhost:pR};function Fb({mode:n,taskId:s,projectId:l,parentTaskId:o}){const{tasks:c,createTask:d,updateTask:f}=Ft(),{showToast:m}=to(),p=oa(),v=n==="edit",y=v&&s?c.find(R=>R.id===s):void 0,b=v?(y==null?void 0:y.projectId)??"":l??"",_=v?(y==null?void 0:y.parentTaskId)??"":o??"",T=_?c.find(R=>R.id===_):void 0,[N,D]=S.useState((y==null?void 0:y.title)??""),[w,j]=S.useState((y==null?void 0:y.description)??""),[V,M]=S.useState((y==null?void 0:y.dependsOn)??[]),$=S.useRef(!1);S.useEffect(()=>{v&&y&&!$.current&&($.current=!0,D(y.title),j(y.description),M(y.dependsOn))},[v,y]);const H=c.filter(R=>R.projectId===b&&(!v||R.id!==s)&&R.id!==_),J=N.trim().length>0&&(!v||y!==void 0)&&(v||b.length>0),te=R=>{M(ge=>ge.includes(R)?ge.filter(ne=>ne!==R):[...ge,R])},K=()=>{J&&(v&&y===void 0||(v&&s?(f(s,N.trim(),w,V),m("Task updated","success"),p(Di(s),{replace:!0})):(d(b,N.trim(),w,V.length>0?V:void 0,_||void 0),m("Task created","success"),p($l(b),{replace:!0}))))},W=()=>{p(v&&s?Di(s):$l(b))},he=v?"edit task":_?"child task":"new task";return h.jsxs("div",{className:ut.container,children:[h.jsxs("div",{className:ut.header,children:[h.jsxs("div",{className:ut.headerTitle,children:[h.jsx("span",{className:ut.badge,children:he}),T&&h.jsxs("span",{className:ut.parentContext,children:[h.jsx("span",{className:ut.parentLabel,children:"Child of"}),h.jsx("span",{className:ut.parentName,children:T.title})]})]}),h.jsxs("div",{className:ut.headerActions,children:[h.jsx("button",{onClick:K,disabled:!J,className:ut.btnPrimary,"data-testid":"task-edit-save",children:v?"Save Changes":"Create"}),h.jsx("button",{onClick:W,className:ut.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:ut.body,children:h.jsxs("div",{className:ut.formContent,children:[h.jsxs("div",{className:ut.section,children:[h.jsx("label",{className:ut.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:N,onChange:R=>D(R.target.value),placeholder:"Task title...",autoFocus:!0,className:ut.titleInput,"data-testid":"task-edit-title",onKeyDown:R=>{R.key==="Enter"&&J&&K()}})]}),h.jsxs("div",{className:ut.section,children:[h.jsx("label",{className:ut.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:w,onChange:R=>j(R.target.value),placeholder:"Describe the task... (markdown supported)",className:ut.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:ut.section,children:[h.jsx("div",{className:ut.label,children:"Dependencies"}),H.length===0?h.jsx("div",{className:ut.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:ut.depList,children:H.map(R=>{const ge=V.includes(R.id);return h.jsxs("label",{className:`${ut.depItem} ${ge?ut.depItemSelected:""}`,"data-testid":`dep-option-${R.id}`,children:[h.jsx("input",{type:"checkbox",checked:ge,onChange:()=>te(R.id)}),R.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",R.status,")"]})]},R.id)})})]})]})})]})}function gR(){const[n]=Sf(),s=n.get("project")??"",l=n.get("parent")??void 0;return s?h.jsx(Fb,{mode:"new",projectId:s,parentTaskId:l}):h.jsx(Mr,{to:"/",replace:!0})}function vR(){const{taskId:n}=Jr();return h.jsx(Fb,{mode:"edit",taskId:n})}const yR="_container_u6n1v_1",bR="_emptyState_u6n1v_8",SR="_card_u6n1v_14",xR="_cardHeader_u6n1v_34",_R="_categoryBadge_u6n1v_41",TR="_findingTitle_u6n1v_49",ER="_findingDate_u6n1v_55",jR="_findingContent_u6n1v_61",CR="_tags_u6n1v_67",AR="_tag_u6n1v_67",na={container:yR,emptyState:bR,card:SR,cardHeader:xR,categoryBadge:_R,findingTitle:TR,findingDate:ER,findingContent:jR,tags:CR,tag:AR};function NR(n){const s=new Date(n),l=new Date,o=l.getTime()-s.getTime(),c=Math.floor(o/1e3),d=Math.floor(c/60),f=Math.floor(d/60),m=Math.floor(f/24);if(c<60)return"just now";if(d<60)return`${d}m ago`;if(f<24)return`${f}h ago`;if(m===1)return"yesterday";if(m<7)return`${m} days ago`;const p=s.getFullYear()===l.getFullYear(),v=s.toLocaleString("en-US",{month:"short"}),y=s.getDate();return p?`${v} ${y}`:`${v} ${y} ${s.getFullYear()}`}const zy={architecture:{text:"var(--accent-blue)",bg:"var(--accent-blue-dim)"},api:{text:"var(--accent-green)",bg:"var(--accent-green-dim)"},bug:{text:"var(--accent-red)",bg:"var(--accent-red-dim)"},decision:{text:"var(--accent-yellow)",bg:"var(--accent-yellow-dim)"},dependency:{text:"var(--accent-purple)",bg:"var(--accent-purple-dim)"},pattern:{text:"var(--accent-cyan)",bg:"var(--accent-cyan-dim)"},general:{text:"var(--text-secondary)",bg:"var(--bg-elevated)"}};function wR({projectId:n}){const{findings:s}=Ft(),l=s.filter(o=>o.projectId===n);return l.length===0?h.jsx("div",{className:na.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:na.container,children:l.map((o,c)=>{const d=zy[o.category]||zy.general;return h.jsxs(la.div,{className:na.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:c*.05,duration:.2},children:[h.jsxs("div",{className:na.cardHeader,children:[h.jsx("span",{className:na.categoryBadge,style:{background:d.bg,color:d.text},children:o.category}),h.jsx("span",{className:na.findingTitle,children:o.title}),h.jsx("span",{className:na.findingDate,title:o.createdAt,children:NR(o.createdAt)})]}),h.jsx("div",{className:na.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:na.tags,children:o.tags.map(f=>h.jsx("span",{className:na.tag,style:{color:d.text,textShadow:`0 0 8px ${d.text}`},children:f},f))})]},o.id)})})}function Dr(n){if(!n)return"—";const s=new Date(n);return isNaN(s.getTime())?"—":s.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Ld(n,s){if(!n||!s)return;const l=new Date(s).getTime()-new Date(n).getTime();if(isNaN(l)||l<0)return;const o=Math.floor(l/6e4),c=Math.floor(l%6e4/1e3);if(o===0)return`${c}s`;const d=Math.floor(o/60),f=o%60;return d===0?`${o}m ${c}s`:`${d}h ${f}m`}function DR(n){const s=n.toLowerCase();return s==="ready"||s==="running"||s==="available"||s==="connected"?A.envDotGreen:s==="provisioning"||s==="starting"||s==="pending"||s==="connecting"?A.envDotYellow:s==="error"||s==="failed"||s==="disconnected"?A.envDotRed:A.envDotGray}function kR({status:n}){const s={not_started:"Not Started",working:"Working",paused:"Paused",complete:"Complete",failed:"Failed"},l={not_started:A.statusPending,working:A.statusInProgress,paused:A.statusWaitingInput,complete:A.statusDone,failed:A.statusFailed};return h.jsx("span",{className:`${A.statusBadge} ${l[n]??A.statusPending}`,children:s[n]??n})}function RR({task:n,tasksById:s,environments:l,projects:o,taskSessions:c}){const d=c.length>0?c[c.length-1]:void 0,f=(d==null?void 0:d.environmentId)??"",m=f?l.find(y=>y.id===f):void 0,p=o.find(y=>y.id===n.projectId),v=n.branch&&(p!=null&&p.repoUrl)?`${p.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:A.overviewDashboard,children:[h.jsxs("div",{className:A.overviewHero,children:[h.jsx(kR,{status:n.status}),n.branch&&h.jsx("span",{className:A.overviewBranchPill,children:v?h.jsxs("a",{href:v,target:"_blank",rel:"noreferrer noopener",className:A.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Description"}),h.jsx("div",{className:A.overviewMarkdown,children:h.jsx(uf,{remarkPlugins:[df],children:n.description})})]}),f&&h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Environment"}),h.jsxs("div",{className:A.envRow,children:[m&&h.jsx("span",{className:`${A.envDot} ${DR(m.status)}`,title:m.status,"aria-label":`Status: ${m.status}`,role:"img"}),h.jsx("span",{className:A.overviewValue,children:(m==null?void 0:m.displayName)??f})]})]}),h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:A.overviewMuted,children:"None"}):h.jsx("div",{className:A.depList,children:n.dependsOn.map(y=>{const b=s.get(y),_=(b==null?void 0:b.status)==="complete";return h.jsxs("div",{className:`${A.depItem} ${_?A.depDone:A.depBlocked}`,children:[h.jsx("span",{children:_?"✓":"○"}),h.jsx("span",{children:(b==null?void 0:b.title)??y})]},y)})})]}),h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:A.timeline,children:[n.createdAt&&h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Created"}),h.jsx("span",{className:A.timelineValue,children:Dr(n.createdAt)})]}),n.assignedAt&&(()=>{const y=Ld(n.createdAt,n.assignedAt);return h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Assigned"}),h.jsx("span",{className:A.timelineValue,children:Dr(n.assignedAt)}),y!==void 0&&h.jsx("span",{className:A.timelineDelta,children:y})]})})(),n.startedAt&&(()=>{const y=Ld(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Started"}),h.jsx("span",{className:A.timelineValue,children:Dr(n.startedAt)}),y!==void 0&&h.jsx("span",{className:A.timelineDelta,children:y})]})})(),n.completedAt&&(()=>{const y=Ld(n.startedAt,n.completedAt);return h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Completed"}),h.jsx("span",{className:A.timelineValue,children:Dr(n.completedAt)}),y!==void 0&&h.jsx("span",{className:A.timelineDelta,children:y})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:A.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:A.reviewNotes,children:n.reviewNotes})]})]})}function MR({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:A.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown."]})}function OR({task:n,sessionId:s,isBlocked:l,onStart:o,onResume:c,onStop:d,onComplete:f,onDelete:m,onEdit:p}){if(n.status==="not_started")return l?h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:p,className:A.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:o,className:A.btnPrimary,children:"Start"}),h.jsx("button",{onClick:p,className:A.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsx("div",{className:A.headerActions,children:h.jsx("button",{onClick:d,disabled:!s,className:A.btnDanger,children:"Stop"})});if(n.status==="paused")return h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:f,className:A.btnPrimary,children:"Complete"}),h.jsx("button",{onClick:c,className:A.btnGhost,children:"Resume"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:A.headerActions,children:h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:o,className:A.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]})}function BR({taskSessions:n,selectedSessionId:s,onSelect:l}){if(!(n.length<2))return h.jsxs("div",{className:A.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:A.attemptLabel,children:"Attempts:"}),n.map((o,c)=>{const d=o.id===s,f=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${A.attemptButton} ${d?A.attemptActive:""}`,onClick:()=>l(o.id),title:`Attempt #${c+1} — ${o.status}`,"aria-label":`Attempt #${c+1}, ${o.status}`,"aria-pressed":d,"data-testid":`attempt-${c+1}`,children:["#",c+1,f&&h.jsx("span",{className:A.attemptStatus,children:f})]},o.id)})]})}function Ud(){const{taskId:n}=Jr(),s=an(),l=oa(),{events:o,eventsDropped:c,tasks:d,environments:f,loadSessionEvents:m,loadFindings:p,kill:v,startTask:y,resumeTask:b,completeTask:_,deleteTask:T,projects:N,taskSessions:D,loadTaskSessions:w}=Ft(),j=S.useRef(null),V=S.useRef(void 0),M=S.useRef(void 0),$=S.useRef(void 0),H=S.useRef(void 0),J=S.useRef(void 0),te=s.pathname.endsWith("/stream")?"stream":s.pathname.endsWith("/findings")?"findings":"overview",[K,W]=S.useState(te),[he,R]=S.useState(!1),[ge,ne]=S.useState(void 0),je=S.useRef(te);te!==je.current&&(je.current=te,te!==K&&W(te));const G=d.find(ce=>ce.id===n),U=(G==null?void 0:G.projectId)||void 0,X=G?D[G.id]??[]:[];let ee;ge&&X.some(ce=>ce.id===ge)?ee=ge:ee=(G==null?void 0:G.latestSessionId)||void 0;const Ae=()=>{R(!0)},Ee=()=>{G&&(T(G.id),R(!1),l($l(G.projectId),{replace:!0}))};if((G==null?void 0:G.id)!==M.current&&(M.current=G==null?void 0:G.id,ge!==void 0&&ne(void 0)),S.useEffect(()=>{if(!(G!=null&&G.id))return;const ce=G.id!==H.current,Ie=G.latestSessionId!==J.current;(ce||Ie)&&(H.current=G.id,J.current=G.latestSessionId,w(G.id))},[G==null?void 0:G.id,G==null?void 0:G.latestSessionId,w]),(G==null?void 0:G.status)!==$.current){$.current=G==null?void 0:G.status;const ce=(G==null?void 0:G.status)==="not_started"?"overview":(G==null?void 0:G.status)==="working"||(G==null?void 0:G.status)==="paused"?"stream":(G==null?void 0:G.status)==="complete"?"findings":void 0;ce&&ce!==K&&W(ce)}const Ge=S.useMemo(()=>new Map(d.map(ce=>[ce.id,ce])),[d]),we=S.useMemo(()=>{const ce=ee?o.filter(Ie=>Ie.sessionId===ee):[];return Qb($b(ce))},[o,ee]),_e=G?G.dependsOn.some(ce=>{const Ie=Ge.get(ce);return Ie!==void 0&&Ie.status!=="complete"}):!1,Ce=S.useMemo(()=>bk(n,N,Ge),[n,N,Ge]);S.useEffect(()=>{ee&&ee!==V.current&&(V.current=ee,m(ee))},[ee,m]),S.useEffect(()=>{K==="findings"&&U&&p(U)},[K,U,p]),S.useEffect(()=>{j.current&&K==="stream"&&(j.current.scrollTop=j.current.scrollHeight)},[we.length,K]);const Q=ce=>{W(ce),l(Di(n,ce==="overview"?void 0:ce))};return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Hi,{segments:Ce}),h.jsxs("div",{className:A.header,children:[h.jsxs("span",{className:A.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(G==null?void 0:G.title)||n}),G&&h.jsx("span",{className:A.taskStatusBadge,"data-testid":"task-status",children:G.status}),(G==null?void 0:G.branch)&&h.jsx("span",{className:A.taskBranch,children:G.branch}),_e&&h.jsx("span",{className:A.taskBlockedBadge,children:"blocked"})]}),G&&h.jsx(OR,{task:G,sessionId:ee,isBlocked:_e,onStart:()=>y(G.id),onResume:()=>b(G.id),onStop:()=>ee&&v(ee),onComplete:()=>_(G.id),onDelete:Ae,onEdit:()=>l(kT(G.id))})]}),h.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":K==="overview",className:`${A.tab} ${K==="overview"?A.active:""}`,onClick:()=>Q("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":K==="stream",className:`${A.tab} ${K==="stream"?A.active:""}`,onClick:()=>Q("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":K==="findings",className:`${A.tab} ${K==="findings"?A.active:""}`,onClick:()=>Q("findings"),children:"Findings"})]}),h.jsxs(Ui,{mode:"wait",children:[K==="overview"&&h.jsx(la.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.overviewContent,children:G?h.jsx(RR,{task:G,tasksById:Ge,environments:f,projects:N,taskSessions:X}):h.jsx("div",{className:A.waitingMessage,children:"No additional details"})},"overview"),K==="stream"&&h.jsxs(la.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden"},children:[h.jsx(BR,{taskSessions:X,selectedSessionId:ee,onSelect:ce=>ne(ce)}),h.jsxs("div",{ref:j,className:A.eventScroll,children:[!ee&&G&&h.jsxs("div",{className:A.emptyCta,children:[h.jsx("button",{className:A.ctaButton,onClick:()=>y(G.id),children:"Start Task"}),h.jsx("div",{className:A.ctaDescription,children:"Click to begin agent execution"})]}),ee&&we.length===0&&h.jsx("div",{className:A.waitingMessage,children:"Waiting for events..."}),h.jsx(MR,{eventsDropped:c}),we.map((ce,Ie)=>h.jsx(qb,{event:ce,toolUseCtx:ce.toolUseCtx},`${ce.sessionId}-${ce.timestamp}-${Ie}`))]})]},"stream"),K==="findings"&&h.jsx(la.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.tabContent,children:U?h.jsx(wR,{projectId:U}):h.jsx("div",{className:A.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),G&&h.jsx(lc,{isOpen:he,title:"Delete Task?",description:`"${G.title}" will be permanently removed.`,onConfirm:Ee,onCancel:()=>R(!1)})]})}function LR(){const n=pk();return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Hi,{segments:n}),h.jsx("div",{className:A.emptyState,children:"Configure the new environment below"})]})}const UR="_layout_1sbe4_1",zR="_content_1sbe4_8",Vy={layout:UR,content:zR},VR={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function HR(){const s=an().pathname.replace(/^\/settings\/?/,"").split("/")[0],l=VR[s],o=mk(l);return h.jsxs("div",{className:Vy.layout,children:[h.jsx(Hi,{segments:o}),h.jsx("div",{className:Vy.content,children:h.jsx(r0,{})})]})}const IR="_nav_29xjr_1",GR="_tab_29xjr_30",PR="_tabIcon_29xjr_56",qR="_tabActive_29xjr_62",kr={nav:IR,tab:GR,tabIcon:PR,tabActive:qR},Aa=[{path:"environments",label:"Environments",icon:"🖥️"},{path:"credentials",label:"Credentials",icon:"🔑"},{path:"personas",label:"Personas",icon:"👤"},{path:"appearance",label:"Appearance",icon:"🎨"},{path:"about",label:"About",icon:"ℹ️"}];function YR(){var f;const n=an(),s=oa(),l=S.useRef(null),o=((f=Aa.find(m=>n.pathname===`${wi}/${m.path}`))==null?void 0:f.path)??Aa[0].path,c=S.useCallback(m=>{s(`${wi}/${m}`)},[s]),d=S.useCallback(m=>{var T,N;const p=(T=l.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!p)return;const v=Array.from(p).findIndex(D=>D===document.activeElement),y=v>=0?v:Aa.findIndex(D=>D.path===o);let b=y;if(m.key==="ArrowDown")m.preventDefault(),b=(y+1)%Aa.length;else if(m.key==="ArrowUp")m.preventDefault(),b=(y-1+Aa.length)%Aa.length;else if(m.key==="Home")m.preventDefault(),b=0;else if(m.key==="End")m.preventDefault(),b=Aa.length-1;else return;const _=Aa[b].path;s(`${wi}/${_}`),(N=p[b])==null||N.focus()},[o,s]);return h.jsx("nav",{className:kr.nav,ref:l,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:d,children:Aa.map(m=>{const p=m.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":p,tabIndex:p?0:-1,className:`${kr.tab} ${p?kr.tabActive:""}`,onClick:()=>c(m.path),children:[h.jsx("span",{className:kr.tabIcon,"aria-hidden":"true",children:m.icon}),m.label]},m.path)})})}const KR="_container_1nk8c_1",ZR="_header_1nk8c_5",XR="_headerLabel_1nk8c_12",$R="_addButton_1nk8c_20",QR="_envRow_1nk8c_55",FR="_targeted_1nk8c_69",JR="_expanded_1nk8c_72",WR="_statusDot_1nk8c_76",eM="_pulse_1nk8c_79",tM="_envName_1nk8c_83",nM="_envActions_1nk8c_87",aM="_idleLabel_1nk8c_94",sM="_newChatButton_1nk8c_99",iM="_envActionsRow_1nk8c_126",lM="_connectButton_1nk8c_134",oM="_stopButton_1nk8c_160",rM="_deleteButton_1nk8c_186",cM="_provisionMessage_1nk8c_213",uM="_errorMessage_1nk8c_220",dM="_sessionRow_1nk8c_227",fM="_selected_1nk8c_243",hM="_sessionDot_1nk8c_248",mM="_sessionSummaryRow_1nk8c_252",pM="_sessionExpandArrow_1nk8c_272",gM="_sessionSummaryText_1nk8c_283",vM="_sessionCountBadge_1nk8c_290",yM="_emptyCta_1nk8c_313",bM="_ctaDescription_1nk8c_326",SM="_ctaButton_1nk8c_332",Ke={container:KR,header:ZR,headerLabel:XR,addButton:$R,envRow:QR,targeted:FR,expanded:JR,statusDot:WR,pulse:eM,envName:tM,envActions:nM,idleLabel:aM,newChatButton:sM,envActionsRow:iM,connectButton:lM,stopButton:oM,deleteButton:rM,provisionMessage:cM,errorMessage:uM,sessionRow:dM,selected:fM,sessionDot:hM,sessionSummaryRow:mM,sessionExpandArrow:pM,sessionSummaryText:gM,sessionCountBadge:vM,emptyCta:yM,ctaDescription:bM,ctaButton:SM},xM={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},_M={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},Hy=["running","idle","failed","interrupted","completed"],TM=.2;function EM(n){const s={};for(const d of n)s[d.status]=(s[d.status]||0)+1;const l=Hy.filter(d=>s[d]>0).map(d=>`${s[d]} ${_M[d]||d}`),o=new Set(Hy),c=Object.keys(s).filter(d=>!o.has(d)).sort().map(d=>`${s[d]} ${d}`);return[...l,...c].join(", ")}function jM({status:n}){const s=n==="running"?"var(--accent-green)":n==="idle"?"var(--accent-yellow)":n==="completed"?"var(--text-secondary)":n==="failed"||n==="interrupted"?"var(--accent-red)":"var(--text-tertiary)";return h.jsx("span",{className:Ke.sessionDot,style:{color:s},children:"●"})}function CM({env:n,envSessions:s,selectedSessionId:l,isNewChatTarget:o,expanded:c,onToggleExpand:d,sessionsExpanded:f,onToggleSessionsExpand:m,provisionProgress:p,onProvision:v,onStop:y,onRemove:b,navigate:_}){const[T,N]=S.useState(!1),D=xM[n.status]||"var(--text-tertiary)",w=n.status==="connected",j=n.status==="connecting",V=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(lc,{isOpen:T,title:"Delete Environment?",description:`"${n.displayName||n.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{b(n.id),N(!1)},onCancel:()=>N(!1)}),h.jsxs("div",{className:`${Ke.envRow} ${o?Ke.targeted:""} ${c?Ke.expanded:""}`,"data-testid":"env-row",onClick:d,children:[h.jsx("span",{className:`${Ke.statusDot} ${w?Ke.pulse:""}`,style:{color:D},children:"●"}),h.jsx("span",{className:Ke.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:Ke.envActions,children:[s.length===0&&!o&&!c&&h.jsx("span",{className:Ke.idleLabel,children:"(idle)"}),w&&h.jsx("button",{onClick:M=>{M.stopPropagation(),_(m0(n.id,n.defaultRuntime||"claude-code"))},title:"New chat",className:Ke.newChatButton,children:"+"})]})]}),c&&h.jsxs("div",{className:Ke.envActionsRow,children:[j&&p&&h.jsx("span",{className:Ke.provisionMessage,children:p.message}),n.status==="error"&&(p==null?void 0:p.stage)==="error"&&h.jsx("span",{className:Ke.errorMessage,children:p.message}),V&&h.jsx("button",{onClick:M=>{M.stopPropagation(),v(n.id)},className:Ke.connectButton,children:n.status==="error"?"Retry":"Connect"}),w&&h.jsx("button",{onClick:M=>{M.stopPropagation(),y(n.id)},className:Ke.stopButton,children:"Stop"}),!j&&h.jsx("button",{onClick:M=>{M.stopPropagation(),N(!0)},className:Ke.deleteButton,children:"Delete"})]}),s.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Ke.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":f,"aria-label":f?"Collapse sessions":"Expand sessions",onClick:m,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),m())},children:[h.jsx("span",{className:`${Ke.sessionExpandArrow} ${f?Ke.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ke.sessionSummaryText,children:EM(s)}),h.jsx("span",{className:Ke.sessionCountBadge,children:s.length})]}),h.jsx(Ui,{children:f&&h.jsx(la.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:TM,ease:"easeInOut"},style:{overflow:"hidden"},children:s.map(M=>h.jsxs("div",{onClick:$=>{$.stopPropagation(),_(h0(M.id))},className:`${Ke.sessionRow} ${l===M.id?Ke.selected:""}`,title:M.prompt,"data-testid":"session-row",children:[h.jsx(jM,{status:M.status})," ",M.prompt.length>24?M.prompt.slice(0,24)+"...":M.prompt]},M.id))})})]})]})}function AM(){const{environments:n,sessions:s,provisionStatus:l,provisionEnvironment:o,stopEnvironment:c,removeEnvironment:d}=Ft(),f=oa(),[m,p]=S.useState(null),[v,y]=S.useState(new Set),b=tn("/sessions/:sessionId"),_=tn("/sessions/new"),T=(b==null?void 0:b.params.sessionId)!=="new"?b==null?void 0:b.params.sessionId:void 0,[N]=Sf(),D=_?N.get("env")??void 0:void 0;return h.jsxs("div",{className:Ke.container,children:[h.jsxs("div",{className:Ke.header,children:[h.jsx("span",{className:Ke.headerLabel,children:"Environments"}),h.jsx("button",{className:Ke.addButton,onClick:()=>f(cv),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:Ke.emptyCta,children:[h.jsx("button",{className:Ke.ctaButton,onClick:()=>f(cv),children:"Add Environment"}),h.jsx("div",{className:Ke.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(w=>{const j=s.filter(V=>V.environmentId===w.id);return h.jsx(CM,{env:w,envSessions:j,selectedSessionId:T,isNewChatTarget:D===w.id,expanded:m===w.id,onToggleExpand:()=>p(m===w.id?null:w.id),sessionsExpanded:v.has(w.id),onToggleSessionsExpand:()=>{y(V=>{const M=new Set(V);return M.has(w.id)?M.delete(w.id):M.add(w.id),M})},provisionProgress:l[w.id],onProvision:o,onStop:c,onRemove:d,navigate:f},w.id)})]})}function NM(){return h.jsx(AM,{})}const wM="_section_1ingb_14",DM="_sectionTitle_1ingb_26",kM="_sectionDescription_1ingb_35",RM="_tokenList_1ingb_48",MM="_tokenRow_1ingb_55",OM="_tokenBadge_1ingb_68",BM="_tokenName_1ingb_83",LM="_tokenTarget_1ingb_90",UM="_deleteButton_1ingb_99",zM="_addForm_1ingb_113",VM="_formRow_1ingb_119",HM="_input_1ingb_125",IM="_select_1ingb_155",GM="_addButton_1ingb_187",PM="_emptyStateInfo_1ingb_221",qM="_themeOptions_1ingb_229",YM="_themeOption_1ingb_229",KM="_themeOptionSelected_1ingb_254",ZM="_themeOptionHeader_1ingb_259",XM="_themeOptionLabel_1ingb_266",$M="_themeOptionDesc_1ingb_273",QM="_variantToggle_1ingb_279",FM="_variantButton_1ingb_286",JM="_variantActive_1ingb_305",WM="_themeSwatches_1ingb_311",e3="_themeSwatch_1ingb_311",t3="_systemToggle_1ingb_325",n3="_systemToggleHint_1ingb_341",a3="_themeActive_1ingb_348",s3="_aboutGrid_1ingb_354",i3="_aboutItem_1ingb_360",l3="_aboutLabel_1ingb_373",o3="_aboutValue_1ingb_379",r3="_aboutDot_1ingb_387",c3="_aboutDotConnected_1ingb_394",u3="_aboutDotDisconnected_1ingb_398",fe={section:wM,sectionTitle:DM,sectionDescription:kM,tokenList:RM,tokenRow:MM,tokenBadge:OM,tokenName:BM,tokenTarget:LM,deleteButton:UM,addForm:zM,formRow:VM,input:HM,select:IM,addButton:GM,emptyStateInfo:PM,themeOptions:qM,themeOption:YM,themeOptionSelected:KM,themeOptionHeader:ZM,themeOptionLabel:XM,themeOptionDesc:$M,variantToggle:QM,variantButton:FM,variantActive:JM,themeSwatches:WM,themeSwatch:e3,systemToggle:t3,systemToggleHint:n3,themeActive:a3,aboutGrid:s3,aboutItem:i3,aboutLabel:l3,aboutValue:o3,aboutDot:r3,aboutDotConnected:c3,aboutDotDisconnected:u3},d3=[{key:"claude",label:"Claude",description:"Forward Claude credentials for AI agent access.",options:[{value:"off",label:"Off"},{value:"subscription",label:"Subscription"},{value:"api_key",label:"API Key"}]},{key:"github",label:"GitHub",description:"Forward GITHUB_TOKEN and GH_TOKEN for git operations.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"copilot",label:"Copilot",description:"Forward Copilot tokens (COPILOT_GITHUB_TOKEN, CLI config).",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"codex",label:"Codex",description:"Forward OPENAI_API_KEY for Codex/OpenAI access.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]}];function f3(){const{credentialProviders:n,updateCredentialProviders:s}=Ft(),l=(o,c)=>{const d={...n};o==="claude"?d.claude=c:d[o]=c,s(d)};return h.jsxs("section",{className:fe.section,children:[h.jsx("h3",{className:fe.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:fe.sectionDescription,children:"Enable providers to automatically forward credentials to environments at task start. Credentials are read fresh from the host each time."}),h.jsx("div",{className:fe.tokenList,children:d3.map(o=>h.jsxs("div",{className:fe.tokenRow,children:[h.jsx("span",{className:fe.tokenName,children:o.label}),h.jsx("span",{className:fe.tokenTarget,children:o.description}),h.jsx("select",{className:fe.select,value:n[o.key],onChange:c=>l(o.key,c.target.value),children:o.options.map(c=>h.jsx("option",{value:c.value,children:c.label},c.value))})]},o.key))})]})}const h3=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function m3(){const{tokens:n,setToken:s,deleteToken:l}=Ft(),{showToast:o}=to(),[c,d]=S.useState(""),[f,m]=S.useState(""),[p,v]=S.useState("env_var"),[y,b]=S.useState(""),[_,T]=S.useState(null),N=j=>{if(j.preventDefault(),!c||!f)return;const V=p==="env_var"?y||c.toUpperCase()+"_TOKEN":"";s(c,f,p,V,p==="file"?y:""),o("Token saved successfully","success"),d(""),m(""),b("")},D=j=>{T(j)},w=()=>{_&&(l(_),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(lc,{isOpen:_!==null,title:"Delete Token?",description:_?`"${_}" will be permanently removed.`:void 0,onConfirm:w,onCancel:()=>T(null)}),h.jsxs("section",{className:fe.section,children:[h.jsx("h3",{className:fe.sectionTitle,children:"Tokens"}),h.jsx("p",{className:fe.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:fe.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:fe.tokenList,children:n.map(j=>h.jsxs("div",{className:fe.tokenRow,children:[h.jsx("span",{className:fe.tokenBadge,children:j.tokenType}),h.jsx("span",{className:fe.tokenName,children:j.name}),h.jsx("span",{className:fe.tokenTarget,children:j.tokenType==="env_var"?j.envVar:j.filePath}),h.jsx("button",{className:fe.deleteButton,onClick:()=>D(j.name),title:`Delete ${j.name}`,children:"×"})]},j.name))}),h.jsxs("form",{className:fe.addForm,onSubmit:N,children:[h.jsxs("div",{className:fe.formRow,children:[h.jsx("input",{className:fe.input,type:"text",placeholder:"Token name",value:c,onChange:j=>d(j.target.value)}),h.jsx("input",{className:fe.input,type:"password",placeholder:"Value",value:f,onChange:j=>m(j.target.value)})]}),h.jsxs("div",{className:fe.formRow,children:[h.jsx("select",{className:fe.select,value:p,onChange:j=>v(j.target.value),children:h3.map(j=>h.jsx("option",{value:j.value,children:j.label},j.value))}),h.jsx("input",{className:fe.input,type:"text",placeholder:p==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:y,onChange:j=>b(j.target.value)}),h.jsx("button",{className:fe.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function p3(){return h.jsxs(h.Fragment,{children:[h.jsx(f3,{}),h.jsx(m3,{})]})}const g3="_container_1xcp7_1",v3="_header_1xcp7_7",y3="_form_1xcp7_19",b3="_formActions_1xcp7_87",S3="_list_1xcp7_93",x3="_card_1xcp7_99",_3="_active_1xcp7_109",T3="_cardHeader_1xcp7_113",E3="_cardActions_1xcp7_123",j3="_description_1xcp7_128",C3="_meta_1xcp7_134",A3="_promptDetails_1xcp7_151",N3="_promptText_1xcp7_163",w3="_empty_1xcp7_180",D3="_btnPrimary_1xcp7_186",k3="_btnSecondary_1xcp7_220",R3="_btnSmall_1xcp7_247",M3="_btnDanger_1xcp7_273",Et={container:g3,header:v3,form:y3,formActions:b3,list:S3,card:x3,active:_3,cardHeader:T3,cardActions:E3,description:j3,meta:C3,promptDetails:A3,promptText:N3,empty:w3,btnPrimary:D3,btnSecondary:k3,btnSmall:R3,btnDanger:M3};function O3(){const{personas:n,createPersona:s,updatePersona:l,deletePersona:o}=Ft(),[c,d]=S.useState(null),[f,m]=S.useState(!1),[p,v]=S.useState(null),[y,b]=S.useState(""),[_,T]=S.useState(""),[N,D]=S.useState(""),[w,j]=S.useState(""),[V,M]=S.useState(""),[$,H]=S.useState(0),J=()=>{b(""),T(""),D(""),j(""),M(""),H(0)},te=()=>{J(),d(null),m(!0)},K=ne=>{b(ne.name),T(ne.description),D(ne.systemPrompt),j(ne.runtime),M(ne.model),H(ne.maxTurns),d(ne),m(!1)},W=ne=>{ne.preventDefault(),!(!y.trim()||!N.trim())&&(c?(l(c.id,y,_,N,w,V,$),d(null)):(s(y,_,N,w,V,$),m(!1)),J())},he=ne=>{o(ne),v(null),(c==null?void 0:c.id)===ne&&(d(null),J())},R=()=>{d(null),m(!1),J()},ge=()=>h.jsxs("form",{onSubmit:W,className:Et.form,children:[h.jsx("h3",{children:c?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:y,onChange:ne=>b(ne.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:_,onChange:ne=>T(ne.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:w,onChange:ne=>j(ne.target.value),children:[h.jsx("option",{value:"",children:"Default"}),h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"})]})]}),h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:V,onChange:ne=>M(ne.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:$,onChange:ne=>H(parseInt(ne.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:N,onChange:ne=>D(ne.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:Et.formActions,children:[h.jsx("button",{type:"submit",className:Et.btnPrimary,children:c?"Save":"Create"}),h.jsx("button",{type:"button",onClick:R,className:Et.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:Et.container,children:[h.jsxs("div",{className:Et.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:te,className:Et.btnPrimary,children:"+ New Persona"})]}),(f||c)&&ge(),n.length===0&&!f?h.jsx("p",{className:Et.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:Et.list,children:n.map(ne=>h.jsxs("div",{className:`${Et.card} ${(c==null?void 0:c.id)===ne.id?Et.active:""}`,children:[h.jsxs("div",{className:Et.cardHeader,children:[h.jsx("strong",{children:ne.name}),h.jsxs("div",{className:Et.cardActions,children:[h.jsx("button",{onClick:()=>K(ne),className:Et.btnSmall,children:"Edit"}),p===ne.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>he(ne.id),className:Et.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>v(null),className:Et.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>v(ne.id),className:Et.btnSmall,children:"Delete"})]})]}),ne.description&&h.jsx("p",{className:Et.description,children:ne.description}),h.jsxs("div",{className:Et.meta,children:[ne.runtime&&h.jsxs("span",{children:["Runtime: ",ne.runtime]}),ne.model&&h.jsxs("span",{children:["Model: ",ne.model]}),ne.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",ne.maxTurns]})]}),h.jsxs("details",{className:Et.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:Et.promptText,children:ne.systemPrompt})]})]},ne.id))})]})}function B3(){return h.jsx(O3,{})}function L3(){const{themeId:n,resolvedThemeId:s,setTheme:l,preferSystem:o,setPreferSystem:c}=Zy();return h.jsxs("section",{className:fe.section,children:[h.jsx("h3",{className:fe.sectionTitle,children:"Appearance"}),h.jsx("p",{className:fe.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:fe.themeOptions,children:Xr.filter(d=>!d.hidden).map(d=>{const f=!!(d.variantLightId&&d.variantDarkId),m=f?n===d.id||n===d.variantLightId||n===d.variantDarkId:n===d.id,p=f&&s===d.variantLightId;return h.jsxs("button",{type:"button",className:`${fe.themeOption} ${m?fe.themeOptionSelected:""}`,"aria-pressed":m,onClick:()=>l(d.id),children:[h.jsxs("span",{className:fe.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:fe.themeOptionLabel,children:d.label}),h.jsx("span",{className:fe.themeOptionDesc,children:d.description})]}),f&&h.jsxs("span",{className:fe.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${fe.variantButton} ${m&&p?fe.variantActive:""}`,onClick:v=>{v.stopPropagation(),c(!1),l(d.variantLightId)},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),v.stopPropagation(),c(!1),l(d.variantLightId))},"aria-label":"Light variant","aria-pressed":m&&p,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${fe.variantButton} ${m&&!p?fe.variantActive:""}`,onClick:v=>{v.stopPropagation(),c(!1),l(d.variantDarkId)},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),v.stopPropagation(),c(!1),l(d.variantDarkId))},"aria-label":"Dark variant","aria-pressed":m&&!p,children:"☾"})]})]}),d.swatches&&h.jsx("span",{className:fe.themeSwatches,children:d.swatches.map((v,y)=>h.jsx("span",{className:fe.themeSwatch,style:{background:v}},y))})]},d.id)})}),h.jsxs("label",{className:fe.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:d=>c(d.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:fe.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:fe.themeActive,children:["Active theme: ",h.jsx("strong",{children:s})]})]})}function U3(){return h.jsx(L3,{})}function z3(){const{connected:n,environments:s,sessions:l}=Ft(),o=s.filter(f=>f.status==="connected").length,c=s.length,d=l.filter(f=>["running","idle"].includes(f.status)).length;return h.jsxs("section",{className:fe.section,children:[h.jsx("h3",{className:fe.sectionTitle,children:"About"}),h.jsx("p",{className:fe.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:fe.aboutGrid,children:[h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Connection"}),h.jsxs("span",{className:fe.aboutValue,children:[h.jsx("span",{className:`${fe.aboutDot} ${n?fe.aboutDotConnected:fe.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Environments"}),h.jsxs("span",{className:fe.aboutValue,children:[o,"/",c," connected"]})]}),h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:fe.aboutValue,children:d})]}),h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Version"}),h.jsx("span",{className:fe.aboutValue,children:"0.27.0"})]})]})]})}function V3(){return h.jsx(z3,{})}const H3="_root_cdda9_1",I3="_body_cdda9_7",G3="_main_cdda9_13",zd={root:H3,body:I3,main:G3},P3=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function q3(){const{lastSpawnedId:n,environments:s}=Ft(),{showToast:l}=to();jw(s,l);const o=oa(),c=an(),d=c.pathname.startsWith(wi);return S.useEffect(()=>{n&&!c.pathname.startsWith("/tasks/")&&o(h0(n),{replace:!0})},[n,o,c.pathname]),h.jsxs("div",{className:zd.root,children:[h.jsx(VT,{}),h.jsxs("div",{className:zd.body,children:[d?h.jsx(YR,{}):h.jsx(KN,{}),h.jsxs("div",{className:zd.main,children:[h.jsx(r0,{}),h.jsx(dw,{})]})]}),h.jsx(Ew,{})]})}function Y3(){return h.jsx(Q_,{children:h.jsxs(jt,{element:h.jsx(q3,{}),children:[h.jsx(jt,{index:!0,element:h.jsx(fk,{})}),h.jsx(jt,{path:"sessions/new",element:h.jsx(Sk,{})}),h.jsx(jt,{path:"sessions/:sessionId",element:h.jsx(Ek,{})}),h.jsx(jt,{path:"projects/:projectId",element:h.jsx($k,{})}),h.jsx(jt,{path:"tasks/new",element:h.jsx(gR,{})}),h.jsx(jt,{path:"tasks/:taskId",element:h.jsx(Ud,{})}),h.jsx(jt,{path:"tasks/:taskId/stream",element:h.jsx(Ud,{})}),h.jsx(jt,{path:"tasks/:taskId/findings",element:h.jsx(Ud,{})}),h.jsx(jt,{path:"tasks/:taskId/edit",element:h.jsx(vR,{})}),h.jsx(jt,{path:"environments/new",element:h.jsx(LR,{})}),h.jsxs(jt,{path:"settings",element:h.jsx(HR,{}),children:[h.jsx(jt,{index:!0,element:h.jsx(Mr,{to:"environments",replace:!0})}),h.jsx(jt,{path:"environments",element:h.jsx(NM,{})}),h.jsx(jt,{path:"credentials",element:h.jsx(p3,{})}),h.jsx(jt,{path:"tokens",element:h.jsx(Mr,{to:"../credentials",replace:!0})}),h.jsx(jt,{path:"personas",element:h.jsx(B3,{})}),h.jsx(jt,{path:"appearance",element:h.jsx(U3,{})}),h.jsx(jt,{path:"about",element:h.jsx(V3,{})})]}),h.jsx(jt,{path:"*",element:h.jsx(Mr,{to:"/",replace:!0})})]})})}function K3(){const n=P3?K1:U1;return h.jsx(J1,{children:h.jsx(X1,{children:h.jsx(n,{children:h.jsx(xT,{children:h.jsx(Y3,{})})})})})}_1.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(K3,{})}));
|