@grackle-ai/web 0.35.1 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import{r as Z_,a as S,j as h,v as X_,b as Q_,t as Br,i as J_,f as W_,M as kf,c as Rf}from"./markdown-gcy1Jmzi.js";import{r as ex,d as hy,H as my,P as py,i as tx,B as nx,a as ax,C as sx,M as ix}from"./dagview-EHk2VaeR.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function l(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(r){if(r.ep)return;r.ep=!0;const u=l(r);fetch(r.href,u)}})();var Nd={exports:{}},ql={},wd={exports:{}},Dd={};/**
|
|
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 gy;function lx(){return gy||(gy=1,(function(n){function a(z,Y){var ee=z.length;z.push(Y);e:for(;0<ee;){var ke=ee-1>>>1,je=z[ke];if(0<r(je,Y))z[ke]=Y,z[ee]=je,ee=ke;else break e}}function l(z){return z.length===0?null:z[0]}function o(z){if(z.length===0)return null;var Y=z[0],ee=z.pop();if(ee!==Y){z[0]=ee;e:for(var ke=0,je=z.length,qe=je>>>1;ke<qe;){var we=2*(ke+1)-1,_e=z[we],Ce=we+1,Q=z[Ce];if(0>r(_e,ee))Ce<je&&0>r(Q,_e)?(z[ke]=Q,z[Ce]=ee,ke=Ce):(z[ke]=_e,z[we]=ee,ke=we);else if(Ce<je&&0>r(Q,ee))z[ke]=Q,z[Ce]=ee,ke=Ce;else break e}}return Y}function r(z,Y){var ee=z.sortIndex-Y.sortIndex;return ee!==0?ee:z.id-Y.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var p=[],g=[],y=1,b=null,x=3,T=!1,A=!1,j=!1,N=!1,C=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function X(z){for(var Y=l(g);Y!==null;){if(Y.callback===null)o(g);else if(Y.startTime<=z)o(g),Y.sortIndex=Y.expirationTime,a(p,Y);else break;Y=l(g)}}function H(z){if(j=!1,X(z),!A)if(l(p)!==null)A=!0,J||(J=!0,pe());else{var Y=l(g);Y!==null&&G(H,Y.startTime-z)}}var J=!1,W=-1,F=5,ne=-1;function ge(){return N?!0:!(n.unstable_now()-ne<F)}function L(){if(N=!1,J){var z=n.unstable_now();ne=z;var Y=!0;try{e:{A=!1,j&&(j=!1,B(W),W=-1),T=!0;var ee=x;try{t:{for(X(z),b=l(p);b!==null&&!(b.expirationTime>z&&ge());){var ke=b.callback;if(typeof ke=="function"){b.callback=null,x=b.priorityLevel;var je=ke(b.expirationTime<=z);if(z=n.unstable_now(),typeof je=="function"){b.callback=je,X(z),Y=!0;break t}b===l(p)&&o(p),X(z)}else o(p);b=l(p)}if(b!==null)Y=!0;else{var qe=l(g);qe!==null&&G(H,qe.startTime-z),Y=!1}}break e}finally{b=null,x=ee,T=!1}Y=void 0}}finally{Y?pe():J=!1}}}var pe;if(typeof R=="function")pe=function(){R(L)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ve=te.port2;te.port1.onmessage=L,pe=function(){ve.postMessage(null)}}else pe=function(){C(L,0)};function G(z,Y){W=C(function(){z(n.unstable_now())},Y)}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(z){z.callback=null},n.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<z?Math.floor(1e3/z):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(z){switch(x){case 1:case 2:case 3:var Y=3;break;default:Y=x}var ee=x;x=Y;try{return z()}finally{x=ee}},n.unstable_requestPaint=function(){N=!0},n.unstable_runWithPriority=function(z,Y){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ee=x;x=z;try{return Y()}finally{x=ee}},n.unstable_scheduleCallback=function(z,Y,ee){var ke=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ke+ee:ke):ee=ke,z){case 1:var je=-1;break;case 2:je=250;break;case 5:je=1073741823;break;case 4:je=1e4;break;default:je=5e3}return je=ee+je,z={id:y++,callback:Y,priorityLevel:z,startTime:ee,expirationTime:je,sortIndex:-1},ee>ke?(z.sortIndex=ee,a(g,z),l(p)===null&&z===l(g)&&(j?(B(W),W=-1):j=!0,G(H,ee-ke))):(z.sortIndex=je,a(p,z),A||T||(A=!0,J||(J=!0,pe()))),z},n.unstable_shouldYield=ge,n.unstable_wrapCallback=function(z){var Y=x;return function(){var ee=x;x=Y;try{return z.apply(this,arguments)}finally{x=ee}}}})(Dd)),Dd}var yy;function ox(){return yy||(yy=1,wd.exports=lx()),wd.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 vy;function rx(){if(vy)return ql;vy=1;var n=ox(),a=Z_(),l=ex();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}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 r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function d(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(u(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(o(188));return t!==e?null:e}for(var s=e,i=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(i=c.return,i!==null){s=i;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return p(c),e;if(f===i)return p(c),t;f=f.sibling}throw Error(o(188))}if(s.return!==i.return)s=c,i=f;else{for(var v=!1,_=c.child;_;){if(_===s){v=!0,s=c,i=f;break}if(_===i){v=!0,i=c,s=f;break}_=_.sibling}if(!v){for(_=f.child;_;){if(_===s){v=!0,s=f,i=c;break}if(_===i){v=!0,i=f,s=c;break}_=_.sibling}if(!v)throw Error(o(189))}}if(s.alternate!==i)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?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,x=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),R=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function pe(e){return e===null||typeof e!="object"?null:(e=L&&e[L]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function ve(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case C:return"Profiler";case N:return"StrictMode";case H:return"Suspense";case J:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case R:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return t=e.displayName||null,t!==null?t:ve(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var G=Array.isArray,z=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ke=[],je=-1;function qe(e){return{current:e}}function we(e){0>je||(e.current=ke[je],ke[je]=null,je--)}function _e(e,t){je++,ke[je]=e.current,e.current=t}var Ce=qe(null),Q=qe(null),q=qe(null),I=qe(null);function De(e,t){switch(_e(q,t),_e(Q,e),_e(Ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Lg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Lg(t),e=Ug(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}we(Ce),_e(Ce,e)}function $e(){we(Ce),we(Q),we(q)}function yt(e){e.memoizedState!==null&&_e(I,e);var t=Ce.current,s=Ug(t,e.type);t!==s&&(_e(Q,e),_e(Ce,s))}function xt(e){Q.current===e&&(we(Ce),we(Q)),I.current===e&&(we(I),Il._currentValue=ee)}var Pt,We;function Ze(e){if(Pt===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Pt=t&&t[1]||"",We=-1<s.stack.indexOf(`
|
|
18
|
-
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+Pt+e+We}var Ue=!1;function Sn(e,t){if(!e||Ue)return"";Ue=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(V){var U=V}Reflect.construct(e,[],K)}else{try{K.call()}catch(V){U=V}e.call(K.prototype)}}else{try{throw Error()}catch(V){U=V}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(V){if(V&&U&&typeof V.stack=="string")return[V.stack,U.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=i.DetermineComponentFrameRoot(),v=f[0],_=f[1];if(v&&_){var E=v.split(`
|
|
20
|
-
`),O=_.split(`
|
|
21
|
-
`);for(c=i=0;i<E.length&&!E[i].includes("DetermineComponentFrameRoot");)i++;for(;c<O.length&&!O[c].includes("DetermineComponentFrameRoot");)c++;if(i===E.length||c===O.length)for(i=E.length-1,c=O.length-1;1<=i&&0<=c&&E[i]!==O[c];)c--;for(;1<=i&&0<=c;i--,c--)if(E[i]!==O[c]){if(i!==1||c!==1)do if(i--,c--,0>c||E[i]!==O[c]){var P=`
|
|
22
|
-
`+E[i].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=i&&0<=c);break}}}finally{Ue=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Ze(s):""}function _n(e,t){switch(e.tag){case 26:case 27:case 5:return Ze(e.type);case 16:return Ze("Lazy");case 13:return e.child!==t&&t!==null?Ze("Suspense Fallback"):Ze("Suspense");case 19:return Ze("SuspenseList");case 0:case 15:return Sn(e.type,!1);case 11:return Sn(e.type.render,!1);case 1:return Sn(e.type,!0);case 31:return Ze("Activity");default:return""}}function Zn(e){try{var t="",s=null;do t+=_n(e,s),s=e,e=e.return;while(e);return t}catch(i){return`
|
|
23
|
-
Error generating stack: `+i.message+`
|
|
24
|
-
`+i.stack}}var an=Object.prototype.hasOwnProperty,Xn=n.unstable_scheduleCallback,Z=n.unstable_cancelCallback,ie=n.unstable_shouldYield,ce=n.unstable_requestPaint,de=n.unstable_now,Te=n.unstable_getCurrentPriorityLevel,Ee=n.unstable_ImmediatePriority,et=n.unstable_UserBlockingPriority,Le=n.unstable_NormalPriority,ot=n.unstable_LowPriority,Dt=n.unstable_IdlePriority,Tt=n.log,Lt=n.unstable_setDisableYieldValue,rt=null,Et=null;function cn(e){if(typeof Tt=="function"&&Lt(e),Et&&typeof Et.setStrictMode=="function")try{Et.setStrictMode(rt,e)}catch{}}var vt=Math.clz32?Math.clz32:_s,$t=Math.log,Yt=Math.LN2;function _s(e){return e>>>=0,e===0?32:31-($t(e)/Yt|0)|0}var ae=256,Me=262144,be=4194304;function re(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 le(e,t,s){var i=e.pendingLanes;if(i===0)return 0;var c=0,f=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var _=i&134217727;return _!==0?(i=_&~f,i!==0?c=re(i):(v&=_,v!==0?c=re(v):s||(s=_&~e,s!==0&&(c=re(s))))):(_=i&~f,_!==0?c=re(_):v!==0?c=re(v):s||(s=i&~e,s!==0&&(c=re(s)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,s=t&-t,f>=s||f===32&&(s&4194048)!==0)?t:c}function se(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ct(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 Mn(){var e=be;return be<<=1,(be&62914560)===0&&(be=4194304),e}function Xs(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Ia(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _o(e,t,s,i,c,f){var v=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var _=e.entanglements,E=e.expirationTimes,O=e.hiddenUpdates;for(s=v&~s;0<s;){var P=31-vt(s),K=1<<P;_[P]=0,E[P]=-1;var U=O[P];if(U!==null)for(O[P]=null,P=0;P<U.length;P++){var V=U[P];V!==null&&(V.lane&=-536870913)}s&=~K}i!==0&&Ji(e,i,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~t))}function Ji(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-vt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|s&261930}function Wi(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var i=31-vt(s),c=1<<i;c&t|e[i]&t&&(e[i]|=t),s&=~c}}function el(e,t){var s=t&-t;return s=(s&42)!==0?1:Qs(s),(s&(e.suspendedLanes|t))!==0?0:s}function Qs(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 Js(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function tl(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:ly(e.type))}function nl(e,t){var s=Y.p;try{return Y.p=e,t()}finally{Y.p=s}}var Qn=Math.random().toString(36).slice(2),Ut="__reactFiber$"+Qn,Zt="__reactProps$"+Qn,ma="__reactContainer$"+Qn,Ws="__reactEvents$"+Qn,xo="__reactListeners$"+Qn,oe="__reactHandles$"+Qn,Fe="__reactResources$"+Qn,Be="__reactMarker$"+Qn;function Ie(e){delete e[Ut],delete e[Zt],delete e[Ws],delete e[xo],delete e[oe]}function sn(e){var t=e[Ut];if(t)return t;for(var s=e.parentNode;s;){if(t=s[ma]||s[Ut]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=qg(e);e!==null;){if(s=e[Ut])return s;e=qg(e)}return t}e=s,s=e.parentNode}return null}function Xt(e){if(e=e[Ut]||e[ma]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ht(e){var t=e[Fe];return t||(t=e[Fe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[Be]=!0}var Eh=new Set,Ch={};function xs(e,t){ei(e,t),ei(e+"Capture",t)}function ei(e,t){for(Ch[e]=t,e=0;e<t.length;e++)Eh.add(t[e])}var I1=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ah={},jh={};function H1(e){return an.call(jh,e)?!0:an.call(Ah,e)?!1:I1.test(e)?jh[e]=!0:(Ah[e]=!0,!1)}function To(e,t,s){if(H1(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){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,""+s)}}function Eo(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function pa(e,t,s,i){if(i===null)e.removeAttribute(s);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+i)}}function On(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function G1(e,t,s){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,f=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(v){s=""+v,f.call(this,v)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return s},setValue:function(v){s=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _c(e){if(!e._valueTracker){var t=Nh(e)?"checked":"value";e._valueTracker=G1(e,t,""+e[t])}}function wh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),i="";return e&&(i=Nh(e)?e.checked?"true":"false":e.value),e=i,e!==s?(t.setValue(e),!0):!1}function Co(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 P1=/[\n"\\]/g;function Bn(e){return e.replace(P1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xc(e,t,s,i,c,f,v,_){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+On(t)):e.value!==""+On(t)&&(e.value=""+On(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?Tc(e,v,On(t)):s!=null?Tc(e,v,On(s)):i!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+On(_):e.removeAttribute("name")}function Dh(e,t,s,i,c,f,v,_){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){_c(e);return}s=s!=null?""+On(s):"",t=t!=null?""+On(t):s,_||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=_?e.checked:!!i,e.defaultChecked=!!i,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),_c(e)}function Tc(e,t,s){t==="number"&&Co(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function ti(e,t,s,i){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&i&&(e[s].defaultSelected=!0)}else{for(s=""+On(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function kh(e,t,s){if(t!=null&&(t=""+On(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+On(s):""}function Rh(e,t,s,i){if(t==null){if(i!=null){if(s!=null)throw Error(o(92));if(G(i)){if(1<i.length)throw Error(o(93));i=i[0]}s=i}s==null&&(s=""),t=s}s=On(t),e.defaultValue=s,i=e.textContent,i===s&&i!==""&&i!==null&&(e.value=i),_c(e)}function ni(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var q1=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 Mh(e,t,s){var i=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,s):typeof s!="number"||s===0||q1.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function Oh(e,t,s){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,s!=null){for(var i in s)!s.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var c in t)i=t[c],t.hasOwnProperty(c)&&s[c]!==i&&Mh(e,c,i)}else for(var f in t)t.hasOwnProperty(f)&&Mh(e,f,t[f])}function Ec(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 F1=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"]]),$1=/^[\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 Ao(e){return $1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ga(){}var Cc=null;function Ac(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ai=null,si=null;function Bh(e){var t=Xt(e);if(t&&(e=t.stateNode)){var s=e[Zt]||null;e:switch(e=t.stateNode,t.type){case"input":if(xc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Bn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var i=s[t];if(i!==e&&i.form===e.form){var c=i[Zt]||null;if(!c)throw Error(o(90));xc(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<s.length;t++)i=s[t],i.form===e.form&&wh(i)}break e;case"textarea":kh(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&ti(e,!!s.multiple,t,!1)}}}var jc=!1;function Lh(e,t,s){if(jc)return e(t,s);jc=!0;try{var i=e(t);return i}finally{if(jc=!1,(ai!==null||si!==null)&&(hr(),ai&&(t=ai,e=si,si=ai=null,Bh(t),e)))for(t=0;t<e.length;t++)Bh(e[t])}}function al(e,t){var s=e.stateNode;if(s===null)return null;var i=s[Zt]||null;if(i===null)return null;s=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(s&&typeof s!="function")throw Error(o(231,t,typeof s));return s}var ya=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nc=!1;if(ya)try{var sl={};Object.defineProperty(sl,"passive",{get:function(){Nc=!0}}),window.addEventListener("test",sl,sl),window.removeEventListener("test",sl,sl)}catch{Nc=!1}var Ha=null,wc=null,jo=null;function Uh(){if(jo)return jo;var e,t=wc,s=t.length,i,c="value"in Ha?Ha.value:Ha.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var v=s-e;for(i=1;i<=v&&t[s-i]===c[f-i];i++);return jo=c.slice(e,1<i?1-i:void 0)}function No(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 wo(){return!0}function zh(){return!1}function mn(e){function t(s,i,c,f,v){this._reactName=s,this._targetInst=c,this.type=i,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(s=e[_],this[_]=s?s(f):f[_]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?wo:zh,this.isPropagationStopped=zh,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=wo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=wo)},persist:function(){},isPersistent:wo}),t}var Ts={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=mn(Ts),il=b({},Ts,{view:0,detail:0}),Y1=mn(il),Dc,kc,ll,ko=b({},il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mc,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!==ll&&(ll&&e.type==="mousemove"?(Dc=e.screenX-ll.screenX,kc=e.screenY-ll.screenY):kc=Dc=0,ll=e),Dc)},movementY:function(e){return"movementY"in e?e.movementY:kc}}),Vh=mn(ko),K1=b({},ko,{dataTransfer:0}),Z1=mn(K1),X1=b({},il,{relatedTarget:0}),Rc=mn(X1),Q1=b({},Ts,{animationName:0,elapsedTime:0,pseudoElement:0}),J1=mn(Q1),W1=b({},Ts,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),eS=mn(W1),tS=b({},Ts,{data:0}),Ih=mn(tS),nS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aS={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"},sS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sS[e])?!!t[e]:!1}function Mc(){return iS}var lS=b({},il,{key:function(e){if(e.key){var t=nS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=No(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?aS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mc,charCode:function(e){return e.type==="keypress"?No(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?No(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),oS=mn(lS),rS=b({},ko,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hh=mn(rS),cS=b({},il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mc}),uS=mn(cS),dS=b({},Ts,{propertyName:0,elapsedTime:0,pseudoElement:0}),fS=mn(dS),hS=b({},ko,{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}),mS=mn(hS),pS=b({},Ts,{newState:0,oldState:0}),gS=mn(pS),yS=[9,13,27,32],Oc=ya&&"CompositionEvent"in window,ol=null;ya&&"documentMode"in document&&(ol=document.documentMode);var vS=ya&&"TextEvent"in window&&!ol,Gh=ya&&(!Oc||ol&&8<ol&&11>=ol),Ph=" ",qh=!1;function Fh(e,t){switch(e){case"keyup":return yS.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 ii=!1;function bS(e,t){switch(e){case"compositionend":return $h(t);case"keypress":return t.which!==32?null:(qh=!0,Ph);case"textInput":return e=t.data,e===Ph&&qh?null:e;default:return null}}function SS(e,t){if(ii)return e==="compositionend"||!Oc&&Fh(e,t)?(e=Uh(),jo=wc=Ha=null,ii=!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 Gh&&t.locale!=="ko"?null:t.data;default:return null}}var _S={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 Yh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_S[e.type]:t==="textarea"}function Kh(e,t,s,i){ai?si?si.push(i):si=[i]:ai=i,t=Sr(t,"onChange"),0<t.length&&(s=new Do("onChange","change",null,s,i),e.push({event:s,listeners:t}))}var rl=null,cl=null;function xS(e){Dg(e,0)}function Ro(e){var t=bt(e);if(wh(t))return e}function Zh(e,t){if(e==="change")return t}var Xh=!1;if(ya){var Bc;if(ya){var Lc="oninput"in document;if(!Lc){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),Lc=typeof Qh.oninput=="function"}Bc=Lc}else Bc=!1;Xh=Bc&&(!document.documentMode||9<document.documentMode)}function Jh(){rl&&(rl.detachEvent("onpropertychange",Wh),cl=rl=null)}function Wh(e){if(e.propertyName==="value"&&Ro(cl)){var t=[];Kh(t,cl,e,Ac(e)),Lh(xS,t)}}function TS(e,t,s){e==="focusin"?(Jh(),rl=t,cl=s,rl.attachEvent("onpropertychange",Wh)):e==="focusout"&&Jh()}function ES(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ro(cl)}function CS(e,t){if(e==="click")return Ro(t)}function AS(e,t){if(e==="input"||e==="change")return Ro(t)}function jS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:jS;function ul(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(i=0;i<s.length;i++){var c=s[i];if(!an.call(t,c)||!xn(e[c],t[c]))return!1}return!0}function em(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tm(e,t){var s=em(e);e=0;for(var i;s;){if(s.nodeType===3){if(i=e+s.textContent.length,e<=t&&i>=t)return{node:s,offset:t-e};e=i}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=em(s)}}function nm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function am(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Co(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=Co(e.document)}return t}function Uc(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 NS=ya&&"documentMode"in document&&11>=document.documentMode,li=null,zc=null,dl=null,Vc=!1;function sm(e,t,s){var i=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Vc||li==null||li!==Co(i)||(i=li,"selectionStart"in i&&Uc(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}),dl&&ul(dl,i)||(dl=i,i=Sr(zc,"onSelect"),0<i.length&&(t=new Do("onSelect","select",null,t,s),e.push({event:t,listeners:i}),t.target=li)))}function Es(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var oi={animationend:Es("Animation","AnimationEnd"),animationiteration:Es("Animation","AnimationIteration"),animationstart:Es("Animation","AnimationStart"),transitionrun:Es("Transition","TransitionRun"),transitionstart:Es("Transition","TransitionStart"),transitioncancel:Es("Transition","TransitionCancel"),transitionend:Es("Transition","TransitionEnd")},Ic={},im={};ya&&(im=document.createElement("div").style,"AnimationEvent"in window||(delete oi.animationend.animation,delete oi.animationiteration.animation,delete oi.animationstart.animation),"TransitionEvent"in window||delete oi.transitionend.transition);function Cs(e){if(Ic[e])return Ic[e];if(!oi[e])return e;var t=oi[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in im)return Ic[e]=t[s];return e}var lm=Cs("animationend"),om=Cs("animationiteration"),rm=Cs("animationstart"),wS=Cs("transitionrun"),DS=Cs("transitionstart"),kS=Cs("transitioncancel"),cm=Cs("transitionend"),um=new Map,Hc="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(" ");Hc.push("scrollEnd");function Jn(e,t){um.set(e,t),xs(t,[e])}var Mo=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)},Ln=[],ri=0,Gc=0;function Oo(){for(var e=ri,t=Gc=ri=0;t<e;){var s=Ln[t];Ln[t++]=null;var i=Ln[t];Ln[t++]=null;var c=Ln[t];Ln[t++]=null;var f=Ln[t];if(Ln[t++]=null,i!==null&&c!==null){var v=i.pending;v===null?c.next=c:(c.next=v.next,v.next=c),i.pending=c}f!==0&&dm(s,c,f)}}function Bo(e,t,s,i){Ln[ri++]=e,Ln[ri++]=t,Ln[ri++]=s,Ln[ri++]=i,Gc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Pc(e,t,s,i){return Bo(e,t,s,i),Lo(e)}function As(e,t){return Bo(e,null,null,t),Lo(e)}function dm(e,t,s){e.lanes|=s;var i=e.alternate;i!==null&&(i.lanes|=s);for(var c=!1,f=e.return;f!==null;)f.childLanes|=s,i=f.alternate,i!==null&&(i.childLanes|=s),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-vt(s),e=f.hiddenUpdates,i=e[c],i===null?e[c]=[t]:i.push(t),t.lane=s|536870912),f):null}function Lo(e){if(50<Ml)throw Ml=0,Ju=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ci={};function RS(e,t,s,i){this.tag=e,this.key=s,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 Tn(e,t,s,i){return new RS(e,t,s,i)}function qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function va(e,t){var s=e.alternate;return s===null?(s=Tn(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function fm(e,t){e.flags&=65011714;var s=e.alternate;return s===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=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Uo(e,t,s,i,c,f){var v=0;if(i=e,typeof e=="function")qc(e)&&(v=1);else if(typeof e=="string")v=U_(e,s,Ce.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=Tn(31,s,t,c),e.elementType=ne,e.lanes=f,e;case j:return js(s.children,c,f,t);case N:v=8,c|=24;break;case C:return e=Tn(12,s,t,c|2),e.elementType=C,e.lanes=f,e;case H:return e=Tn(13,s,t,c),e.elementType=H,e.lanes=f,e;case J:return e=Tn(19,s,t,c),e.elementType=J,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:v=10;break e;case B:v=9;break e;case X:v=11;break e;case W:v=14;break e;case F:v=16,i=null;break e}v=29,s=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=Tn(v,s,t,c),t.elementType=e,t.type=i,t.lanes=f,t}function js(e,t,s,i){return e=Tn(7,e,i,t),e.lanes=s,e}function Fc(e,t,s){return e=Tn(6,e,null,t),e.lanes=s,e}function hm(e){var t=Tn(18,null,null,0);return t.stateNode=e,t}function $c(e,t,s){return t=Tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mm=new WeakMap;function Un(e,t){if(typeof e=="object"&&e!==null){var s=mm.get(e);return s!==void 0?s:(t={value:e,source:t,stack:Zn(t)},mm.set(e,t),t)}return{value:e,source:t,stack:Zn(t)}}var ui=[],di=0,zo=null,fl=0,zn=[],Vn=0,Ga=null,aa=1,sa="";function ba(e,t){ui[di++]=fl,ui[di++]=zo,zo=e,fl=t}function pm(e,t,s){zn[Vn++]=aa,zn[Vn++]=sa,zn[Vn++]=Ga,Ga=e;var i=aa;e=sa;var c=32-vt(i)-1;i&=~(1<<c),s+=1;var f=32-vt(t)+c;if(30<f){var v=c-c%5;f=(i&(1<<v)-1).toString(32),i>>=v,c-=v,aa=1<<32-vt(t)+c|s<<c|i,sa=f+e}else aa=1<<f|s<<c|i,sa=e}function Yc(e){e.return!==null&&(ba(e,1),pm(e,1,0))}function Kc(e){for(;e===zo;)zo=ui[--di],ui[di]=null,fl=ui[--di],ui[di]=null;for(;e===Ga;)Ga=zn[--Vn],zn[Vn]=null,sa=zn[--Vn],zn[Vn]=null,aa=zn[--Vn],zn[Vn]=null}function gm(e,t){zn[Vn++]=aa,zn[Vn++]=sa,zn[Vn++]=Ga,aa=t.id,sa=t.overflow,Ga=e}var Qt=null,ct=null,Pe=!1,Pa=null,In=!1,Zc=Error(o(519));function qa(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hl(Un(t,e)),Zc}function ym(e){var t=e.stateNode,s=e.type,i=e.memoizedProps;switch(t[Ut]=e,t[Zt]=i,s){case"dialog":Ve("cancel",t),Ve("close",t);break;case"iframe":case"object":case"embed":Ve("load",t);break;case"video":case"audio":for(s=0;s<Bl.length;s++)Ve(Bl[s],t);break;case"source":Ve("error",t);break;case"img":case"image":case"link":Ve("error",t),Ve("load",t);break;case"details":Ve("toggle",t);break;case"input":Ve("invalid",t),Dh(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ve("invalid",t);break;case"textarea":Ve("invalid",t),Rh(t,i.value,i.defaultValue,i.children)}s=i.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||i.suppressHydrationWarning===!0||Og(t.textContent,s)?(i.popover!=null&&(Ve("beforetoggle",t),Ve("toggle",t)),i.onScroll!=null&&Ve("scroll",t),i.onScrollEnd!=null&&Ve("scrollend",t),i.onClick!=null&&(t.onclick=ga),t=!0):t=!1,t||qa(e,!0)}function vm(e){for(Qt=e.return;Qt;)switch(Qt.tag){case 5:case 31:case 13:In=!1;return;case 27:case 3:In=!0;return;default:Qt=Qt.return}}function fi(e){if(e!==Qt)return!1;if(!Pe)return vm(e),Pe=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||hd(e.type,e.memoizedProps)),s=!s),s&&ct&&qa(e),vm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ct=Pg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ct=Pg(e)}else t===27?(t=ct,ss(e.type)?(e=vd,vd=null,ct=e):ct=t):ct=Qt?Gn(e.stateNode.nextSibling):null;return!0}function Ns(){ct=Qt=null,Pe=!1}function Xc(){var e=Pa;return e!==null&&(vn===null?vn=e:vn.push.apply(vn,e),Pa=null),e}function hl(e){Pa===null?Pa=[e]:Pa.push(e)}var Qc=qe(null),ws=null,Sa=null;function Fa(e,t,s){_e(Qc,t._currentValue),t._currentValue=s}function _a(e){e._currentValue=Qc.current,we(Qc)}function Jc(e,t,s){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===s)break;e=e.return}}function Wc(e,t,s,i){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var v=c.child;f=f.firstContext;e:for(;f!==null;){var _=f;f=c;for(var E=0;E<t.length;E++)if(_.context===t[E]){f.lanes|=s,_=f.alternate,_!==null&&(_.lanes|=s),Jc(f.return,s,e),i||(v=null);break e}f=_.next}}else if(c.tag===18){if(v=c.return,v===null)throw Error(o(341));v.lanes|=s,f=v.alternate,f!==null&&(f.lanes|=s),Jc(v,s,e),v=null}else v=c.child;if(v!==null)v.return=c;else for(v=c;v!==null;){if(v===e){v=null;break}if(c=v.sibling,c!==null){c.return=v.return,v=c;break}v=v.return}c=v}}function hi(e,t,s,i){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var v=c.alternate;if(v===null)throw Error(o(387));if(v=v.memoizedProps,v!==null){var _=c.type;xn(c.pendingProps.value,v.value)||(e!==null?e.push(_):e=[_])}}else if(c===I.current){if(v=c.alternate,v===null)throw Error(o(387));v.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Il):e=[Il])}c=c.return}e!==null&&Wc(t,e,s,i),t.flags|=262144}function Vo(e){for(e=e.firstContext;e!==null;){if(!xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ds(e){ws=e,Sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Jt(e){return bm(ws,e)}function Io(e,t){return ws===null&&Ds(e),bm(e,t)}function bm(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},Sa===null){if(e===null)throw Error(o(308));Sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Sa=Sa.next=t;return s}var MS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},OS=n.unstable_scheduleCallback,BS=n.unstable_NormalPriority,zt={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function eu(){return{controller:new MS,data:new Map,refCount:0}}function ml(e){e.refCount--,e.refCount===0&&OS(BS,function(){e.controller.abort()})}var pl=null,tu=0,mi=0,pi=null;function LS(e,t){if(pl===null){var s=pl=[];tu=0,mi=sd(),pi={status:"pending",value:void 0,then:function(i){s.push(i)}}}return tu++,t.then(Sm,Sm),t}function Sm(){if(--tu===0&&pl!==null){pi!==null&&(pi.status="fulfilled");var e=pl;pl=null,mi=0,pi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function US(e,t){var s=[],i={status:"pending",value:null,reason:null,then:function(c){s.push(c)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var c=0;c<s.length;c++)(0,s[c])(t)},function(c){for(i.status="rejected",i.reason=c,c=0;c<s.length;c++)(0,s[c])(void 0)}),i}var _m=z.S;z.S=function(e,t){sg=de(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&LS(e,t),_m!==null&&_m(e,t)};var ks=qe(null);function nu(){var e=ks.current;return e!==null?e:lt.pooledCache}function Ho(e,t){t===null?_e(ks,ks.current):_e(ks,t.pool)}function xm(){var e=nu();return e===null?null:{parent:zt._currentValue,pool:e}}var gi=Error(o(460)),au=Error(o(474)),Go=Error(o(542)),Po={then:function(){}};function Tm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Em(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(ga,ga),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Am(e),e;default:if(typeof t.status=="string")t.then(ga,ga);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=i}},function(i){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Am(e),e}throw Ms=t,gi}}function Rs(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ms=s,gi):s}}var Ms=null;function Cm(){if(Ms===null)throw Error(o(459));var e=Ms;return Ms=null,e}function Am(e){if(e===gi||e===Go)throw Error(o(483))}var yi=null,gl=0;function qo(e){var t=gl;return gl+=1,yi===null&&(yi=[]),Em(yi,e,t)}function yl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Fo(e,t){throw t.$$typeof===x?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function jm(e){function t(k,w){if(e){var M=k.deletions;M===null?(k.deletions=[w],k.flags|=16):M.push(w)}}function s(k,w){if(!e)return null;for(;w!==null;)t(k,w),w=w.sibling;return null}function i(k){for(var w=new Map;k!==null;)k.key!==null?w.set(k.key,k):w.set(k.index,k),k=k.sibling;return w}function c(k,w){return k=va(k,w),k.index=0,k.sibling=null,k}function f(k,w,M){return k.index=M,e?(M=k.alternate,M!==null?(M=M.index,M<w?(k.flags|=67108866,w):M):(k.flags|=67108866,w)):(k.flags|=1048576,w)}function v(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function _(k,w,M,$){return w===null||w.tag!==6?(w=Fc(M,k.mode,$),w.return=k,w):(w=c(w,M),w.return=k,w)}function E(k,w,M,$){var ye=M.type;return ye===j?P(k,w,M.props.children,$,M.key):w!==null&&(w.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===F&&Rs(ye)===w.type)?(w=c(w,M.props),yl(w,M),w.return=k,w):(w=Uo(M.type,M.key,M.props,null,k.mode,$),yl(w,M),w.return=k,w)}function O(k,w,M,$){return w===null||w.tag!==4||w.stateNode.containerInfo!==M.containerInfo||w.stateNode.implementation!==M.implementation?(w=$c(M,k.mode,$),w.return=k,w):(w=c(w,M.children||[]),w.return=k,w)}function P(k,w,M,$,ye){return w===null||w.tag!==7?(w=js(M,k.mode,$,ye),w.return=k,w):(w=c(w,M),w.return=k,w)}function K(k,w,M){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=Fc(""+w,k.mode,M),w.return=k,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case T:return M=Uo(w.type,w.key,w.props,null,k.mode,M),yl(M,w),M.return=k,M;case A:return w=$c(w,k.mode,M),w.return=k,w;case F:return w=Rs(w),K(k,w,M)}if(G(w)||pe(w))return w=js(w,k.mode,M,null),w.return=k,w;if(typeof w.then=="function")return K(k,qo(w),M);if(w.$$typeof===R)return K(k,Io(k,w),M);Fo(k,w)}return null}function U(k,w,M,$){var ye=w!==null?w.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ye!==null?null:_(k,w,""+M,$);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case T:return M.key===ye?E(k,w,M,$):null;case A:return M.key===ye?O(k,w,M,$):null;case F:return M=Rs(M),U(k,w,M,$)}if(G(M)||pe(M))return ye!==null?null:P(k,w,M,$,null);if(typeof M.then=="function")return U(k,w,qo(M),$);if(M.$$typeof===R)return U(k,w,Io(k,M),$);Fo(k,M)}return null}function V(k,w,M,$,ye){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return k=k.get(M)||null,_(w,k,""+$,ye);if(typeof $=="object"&&$!==null){switch($.$$typeof){case T:return k=k.get($.key===null?M:$.key)||null,E(w,k,$,ye);case A:return k=k.get($.key===null?M:$.key)||null,O(w,k,$,ye);case F:return $=Rs($),V(k,w,M,$,ye)}if(G($)||pe($))return k=k.get(M)||null,P(w,k,$,ye,null);if(typeof $.then=="function")return V(k,w,M,qo($),ye);if($.$$typeof===R)return V(k,w,M,Io(w,$),ye);Fo(w,$)}return null}function ue(k,w,M,$){for(var ye=null,Ye=null,me=w,Oe=w=0,Ge=null;me!==null&&Oe<M.length;Oe++){me.index>Oe?(Ge=me,me=null):Ge=me.sibling;var Ke=U(k,me,M[Oe],$);if(Ke===null){me===null&&(me=Ge);break}e&&me&&Ke.alternate===null&&t(k,me),w=f(Ke,w,Oe),Ye===null?ye=Ke:Ye.sibling=Ke,Ye=Ke,me=Ge}if(Oe===M.length)return s(k,me),Pe&&ba(k,Oe),ye;if(me===null){for(;Oe<M.length;Oe++)me=K(k,M[Oe],$),me!==null&&(w=f(me,w,Oe),Ye===null?ye=me:Ye.sibling=me,Ye=me);return Pe&&ba(k,Oe),ye}for(me=i(me);Oe<M.length;Oe++)Ge=V(me,k,Oe,M[Oe],$),Ge!==null&&(e&&Ge.alternate!==null&&me.delete(Ge.key===null?Oe:Ge.key),w=f(Ge,w,Oe),Ye===null?ye=Ge:Ye.sibling=Ge,Ye=Ge);return e&&me.forEach(function(cs){return t(k,cs)}),Pe&&ba(k,Oe),ye}function Se(k,w,M,$){if(M==null)throw Error(o(151));for(var ye=null,Ye=null,me=w,Oe=w=0,Ge=null,Ke=M.next();me!==null&&!Ke.done;Oe++,Ke=M.next()){me.index>Oe?(Ge=me,me=null):Ge=me.sibling;var cs=U(k,me,Ke.value,$);if(cs===null){me===null&&(me=Ge);break}e&&me&&cs.alternate===null&&t(k,me),w=f(cs,w,Oe),Ye===null?ye=cs:Ye.sibling=cs,Ye=cs,me=Ge}if(Ke.done)return s(k,me),Pe&&ba(k,Oe),ye;if(me===null){for(;!Ke.done;Oe++,Ke=M.next())Ke=K(k,Ke.value,$),Ke!==null&&(w=f(Ke,w,Oe),Ye===null?ye=Ke:Ye.sibling=Ke,Ye=Ke);return Pe&&ba(k,Oe),ye}for(me=i(me);!Ke.done;Oe++,Ke=M.next())Ke=V(me,k,Oe,Ke.value,$),Ke!==null&&(e&&Ke.alternate!==null&&me.delete(Ke.key===null?Oe:Ke.key),w=f(Ke,w,Oe),Ye===null?ye=Ke:Ye.sibling=Ke,Ye=Ke);return e&&me.forEach(function(K_){return t(k,K_)}),Pe&&ba(k,Oe),ye}function it(k,w,M,$){if(typeof M=="object"&&M!==null&&M.type===j&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case T:e:{for(var ye=M.key;w!==null;){if(w.key===ye){if(ye=M.type,ye===j){if(w.tag===7){s(k,w.sibling),$=c(w,M.props.children),$.return=k,k=$;break e}}else if(w.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===F&&Rs(ye)===w.type){s(k,w.sibling),$=c(w,M.props),yl($,M),$.return=k,k=$;break e}s(k,w);break}else t(k,w);w=w.sibling}M.type===j?($=js(M.props.children,k.mode,$,M.key),$.return=k,k=$):($=Uo(M.type,M.key,M.props,null,k.mode,$),yl($,M),$.return=k,k=$)}return v(k);case A:e:{for(ye=M.key;w!==null;){if(w.key===ye)if(w.tag===4&&w.stateNode.containerInfo===M.containerInfo&&w.stateNode.implementation===M.implementation){s(k,w.sibling),$=c(w,M.children||[]),$.return=k,k=$;break e}else{s(k,w);break}else t(k,w);w=w.sibling}$=$c(M,k.mode,$),$.return=k,k=$}return v(k);case F:return M=Rs(M),it(k,w,M,$)}if(G(M))return ue(k,w,M,$);if(pe(M)){if(ye=pe(M),typeof ye!="function")throw Error(o(150));return M=ye.call(M),Se(k,w,M,$)}if(typeof M.then=="function")return it(k,w,qo(M),$);if(M.$$typeof===R)return it(k,w,Io(k,M),$);Fo(k,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,w!==null&&w.tag===6?(s(k,w.sibling),$=c(w,M),$.return=k,k=$):(s(k,w),$=Fc(M,k.mode,$),$.return=k,k=$),v(k)):s(k,w)}return function(k,w,M,$){try{gl=0;var ye=it(k,w,M,$);return yi=null,ye}catch(me){if(me===gi||me===Go)throw me;var Ye=Tn(29,me,null,k.mode);return Ye.lanes=$,Ye.return=k,Ye}finally{}}}var Os=jm(!0),Nm=jm(!1),$a=!1;function su(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function iu(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 Ya(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,s){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Xe&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,t=Lo(e),dm(e,null,s),t}return Bo(e,i,t,s),Lo(e)}function vl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,s|=i,t.lanes=s,Wi(e,s)}}function lu(e,t){var s=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,s===i)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var v={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?c=f=v:f=f.next=v,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:i.shared,callbacks:i.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var ou=!1;function bl(){if(ou){var e=pi;if(e!==null)throw e}}function Sl(e,t,s,i){ou=!1;var c=e.updateQueue;$a=!1;var f=c.firstBaseUpdate,v=c.lastBaseUpdate,_=c.shared.pending;if(_!==null){c.shared.pending=null;var E=_,O=E.next;E.next=null,v===null?f=O:v.next=O,v=E;var P=e.alternate;P!==null&&(P=P.updateQueue,_=P.lastBaseUpdate,_!==v&&(_===null?P.firstBaseUpdate=O:_.next=O,P.lastBaseUpdate=E))}if(f!==null){var K=c.baseState;v=0,P=O=E=null,_=f;do{var U=_.lane&-536870913,V=U!==_.lane;if(V?(He&U)===U:(i&U)===U){U!==0&&U===mi&&(ou=!0),P!==null&&(P=P.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var ue=e,Se=_;U=t;var it=s;switch(Se.tag){case 1:if(ue=Se.payload,typeof ue=="function"){K=ue.call(it,K,U);break e}K=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=Se.payload,U=typeof ue=="function"?ue.call(it,K,U):ue,U==null)break e;K=b({},K,U);break e;case 2:$a=!0}}U=_.callback,U!==null&&(e.flags|=64,V&&(e.flags|=8192),V=c.callbacks,V===null?c.callbacks=[U]:V.push(U))}else V={lane:U,tag:_.tag,payload:_.payload,callback:_.callback,next:null},P===null?(O=P=V,E=K):P=P.next=V,v|=U;if(_=_.next,_===null){if(_=c.shared.pending,_===null)break;V=_,_=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);P===null&&(E=K),c.baseState=E,c.firstBaseUpdate=O,c.lastBaseUpdate=P,f===null&&(c.shared.lanes=0),Wa|=v,e.lanes=v,e.memoizedState=K}}function wm(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Dm(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)wm(s[e],t)}var vi=qe(null),$o=qe(0);function km(e,t){e=Da,_e($o,e),_e(vi,t),Da=e|t.baseLanes}function ru(){_e($o,Da),_e(vi,vi.current)}function cu(){Da=$o.current,we(vi),we($o)}var En=qe(null),Hn=null;function Za(e){var t=e.alternate;_e(kt,kt.current&1),_e(En,e),Hn===null&&(t===null||vi.current!==null||t.memoizedState!==null)&&(Hn=e)}function uu(e){_e(kt,kt.current),_e(En,e),Hn===null&&(Hn=e)}function Rm(e){e.tag===22?(_e(kt,kt.current),_e(En,e),Hn===null&&(Hn=e)):Xa()}function Xa(){_e(kt,kt.current),_e(En,En.current)}function Cn(e){we(En),Hn===e&&(Hn=null),we(kt)}var kt=qe(0);function Yo(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||gd(s)||yd(s)))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 xa=0,Re=null,at=null,Vt=null,Ko=!1,bi=!1,Bs=!1,Zo=0,_l=0,Si=null,zS=0;function At(){throw Error(o(321))}function du(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!xn(e[s],t[s]))return!1;return!0}function fu(e,t,s,i,c,f){return xa=f,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?pp:ju,Bs=!1,f=s(i,c),Bs=!1,bi&&(f=Om(t,s,i,c)),Mm(e),f}function Mm(e){z.H=El;var t=at!==null&&at.next!==null;if(xa=0,Vt=at=Re=null,Ko=!1,_l=0,Si=null,t)throw Error(o(300));e===null||It||(e=e.dependencies,e!==null&&Vo(e)&&(It=!0))}function Om(e,t,s,i){Re=e;var c=0;do{if(bi&&(Si=null),_l=0,bi=!1,25<=c)throw Error(o(301));if(c+=1,Vt=at=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}z.H=gp,f=t(s,i)}while(bi);return f}function VS(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?xl(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Re.flags|=1024),t}function hu(){var e=Zo!==0;return Zo=0,e}function mu(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function pu(e){if(Ko){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ko=!1}xa=0,Vt=at=Re=null,bi=!1,_l=Zo=0,Si=null}function un(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?Re.memoizedState=Vt=e:Vt=Vt.next=e,Vt}function Rt(){if(at===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=Vt===null?Re.memoizedState:Vt.next;if(t!==null)Vt=t,at=e;else{if(e===null)throw Re.alternate===null?Error(o(467)):Error(o(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Vt===null?Re.memoizedState=Vt=e:Vt=Vt.next=e}return Vt}function Xo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xl(e){var t=_l;return _l+=1,Si===null&&(Si=[]),e=Em(Si,e,t),t=Re,(Vt===null?t.memoizedState:Vt.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?pp:ju),e}function Qo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xl(e);if(e.$$typeof===R)return Jt(e)}throw Error(o(438,String(e)))}function gu(e){var t=null,s=Re.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var i=Re.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=Xo(),Re.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),i=0;i<e;i++)s[i]=ge;return t.index++,s}function Ta(e,t){return typeof t=="function"?t(e):t}function Jo(e){var t=Rt();return yu(t,at,e)}function yu(e,t,s){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=s;var c=e.baseQueue,f=i.pending;if(f!==null){if(c!==null){var v=c.next;c.next=f.next,f.next=v}t.baseQueue=c=f,i.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var _=v=null,E=null,O=t,P=!1;do{var K=O.lane&-536870913;if(K!==O.lane?(He&K)===K:(xa&K)===K){var U=O.revertLane;if(U===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),K===mi&&(P=!0);else if((xa&U)===U){O=O.next,U===mi&&(P=!0);continue}else K={lane:0,revertLane:O.revertLane,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},E===null?(_=E=K,v=f):E=E.next=K,Re.lanes|=U,Wa|=U;K=O.action,Bs&&s(f,K),f=O.hasEagerState?O.eagerState:s(f,K)}else U={lane:K,revertLane:O.revertLane,gesture:O.gesture,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},E===null?(_=E=U,v=f):E=E.next=U,Re.lanes|=K,Wa|=K;O=O.next}while(O!==null&&O!==t);if(E===null?v=f:E.next=_,!xn(f,e.memoizedState)&&(It=!0,P&&(s=pi,s!==null)))throw s;e.memoizedState=f,e.baseState=v,e.baseQueue=E,i.lastRenderedState=f}return c===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function vu(e){var t=Rt(),s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var i=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var v=c=c.next;do f=e(f,v.action),v=v.next;while(v!==c);xn(f,t.memoizedState)||(It=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,i]}function Bm(e,t,s){var i=Re,c=Rt(),f=Pe;if(f){if(s===void 0)throw Error(o(407));s=s()}else s=t();var v=!xn((at||c).memoizedState,s);if(v&&(c.memoizedState=s,It=!0),c=c.queue,_u(zm.bind(null,i,c,e),[e]),c.getSnapshot!==t||v||Vt!==null&&Vt.memoizedState.tag&1){if(i.flags|=2048,_i(9,{destroy:void 0},Um.bind(null,i,c,s,t),null),lt===null)throw Error(o(349));f||(xa&127)!==0||Lm(i,t,s)}return s}function Lm(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Re.updateQueue,t===null?(t=Xo(),Re.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Um(e,t,s,i){t.value=s,t.getSnapshot=i,Vm(t)&&Im(e)}function zm(e,t,s){return s(function(){Vm(t)&&Im(e)})}function Vm(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!xn(e,s)}catch{return!0}}function Im(e){var t=As(e,2);t!==null&&bn(t,e,2)}function bu(e){var t=un();if(typeof e=="function"){var s=e;if(e=s(),Bs){cn(!0);try{s()}finally{cn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:e},t}function Hm(e,t,s,i){return e.baseState=s,yu(e,at,typeof i=="function"?i:Ta)}function IS(e,t,s,i,c){if(tr(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){f.listeners.push(v)}};z.T!==null?s(!0):f.isTransition=!1,i(f),s=t.pending,s===null?(f.next=t.pending=f,Gm(t,f)):(f.next=s.next,t.pending=s.next=f)}}function Gm(e,t){var s=t.action,i=t.payload,c=e.state;if(t.isTransition){var f=z.T,v={};z.T=v;try{var _=s(c,i),E=z.S;E!==null&&E(v,_),Pm(e,t,_)}catch(O){Su(e,t,O)}finally{f!==null&&v.types!==null&&(f.types=v.types),z.T=f}}else try{f=s(c,i),Pm(e,t,f)}catch(O){Su(e,t,O)}}function Pm(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(i){qm(e,t,i)},function(i){return Su(e,t,i)}):qm(e,t,s)}function qm(e,t,s){t.status="fulfilled",t.value=s,Fm(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Gm(e,s)))}function Su(e,t,s){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=s,Fm(t),t=t.next;while(t!==i)}e.action=null}function Fm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $m(e,t){return t}function Ym(e,t){if(Pe){var s=lt.formState;if(s!==null){e:{var i=Re;if(Pe){if(ct){t:{for(var c=ct,f=In;c.nodeType!==8;){if(!f){c=null;break t}if(c=Gn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){ct=Gn(c.nextSibling),i=c.data==="F!";break e}}qa(i)}i=!1}i&&(t=s[0])}}return s=un(),s.memoizedState=s.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$m,lastRenderedState:t},s.queue=i,s=fp.bind(null,Re,i),i.dispatch=s,i=bu(!1),f=Au.bind(null,Re,!1,i.queue),i=un(),c={state:t,dispatch:null,action:e,pending:null},i.queue=c,s=IS.bind(null,Re,c,f,s),c.dispatch=s,i.memoizedState=e,[t,s,!1]}function Km(e){var t=Rt();return Zm(t,at,e)}function Zm(e,t,s){if(t=yu(e,t,$m)[0],e=Jo(Ta)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=xl(t)}catch(v){throw v===gi?Go:v}else i=t;t=Rt();var c=t.queue,f=c.dispatch;return s!==t.memoizedState&&(Re.flags|=2048,_i(9,{destroy:void 0},HS.bind(null,c,s),null)),[i,f,e]}function HS(e,t){e.action=t}function Xm(e){var t=Rt(),s=at;if(s!==null)return Zm(t,s,e);Rt(),t=t.memoizedState,s=Rt();var i=s.queue.dispatch;return s.memoizedState=e,[t,i,!1]}function _i(e,t,s,i){return e={tag:e,create:s,deps:i,inst:t,next:null},t=Re.updateQueue,t===null&&(t=Xo(),Re.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(i=s.next,s.next=e,e.next=i,t.lastEffect=e),e}function Qm(){return Rt().memoizedState}function Wo(e,t,s,i){var c=un();Re.flags|=e,c.memoizedState=_i(1|t,{destroy:void 0},s,i===void 0?null:i)}function er(e,t,s,i){var c=Rt();i=i===void 0?null:i;var f=c.memoizedState.inst;at!==null&&i!==null&&du(i,at.memoizedState.deps)?c.memoizedState=_i(t,f,s,i):(Re.flags|=e,c.memoizedState=_i(1|t,f,s,i))}function Jm(e,t){Wo(8390656,8,e,t)}function _u(e,t){er(2048,8,e,t)}function GS(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=Xo(),Re.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function Wm(e){var t=Rt().memoizedState;return GS({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function ep(e,t){return er(4,2,e,t)}function tp(e,t){return er(4,4,e,t)}function np(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ap(e,t,s){s=s!=null?s.concat([e]):null,er(4,4,np.bind(null,t,e),s)}function xu(){}function sp(e,t){var s=Rt();t=t===void 0?null:t;var i=s.memoizedState;return t!==null&&du(t,i[1])?i[0]:(s.memoizedState=[e,t],e)}function ip(e,t){var s=Rt();t=t===void 0?null:t;var i=s.memoizedState;if(t!==null&&du(t,i[1]))return i[0];if(i=e(),Bs){cn(!0);try{e()}finally{cn(!1)}}return s.memoizedState=[i,t],i}function Tu(e,t,s){return s===void 0||(xa&1073741824)!==0&&(He&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=lg(),Re.lanes|=e,Wa|=e,s)}function lp(e,t,s,i){return xn(s,t)?s:vi.current!==null?(e=Tu(e,s,i),xn(e,t)||(It=!0),e):(xa&42)===0||(xa&1073741824)!==0&&(He&261930)===0?(It=!0,e.memoizedState=s):(e=lg(),Re.lanes|=e,Wa|=e,t)}function op(e,t,s,i,c){var f=Y.p;Y.p=f!==0&&8>f?f:8;var v=z.T,_={};z.T=_,Au(e,!1,t,s);try{var E=c(),O=z.S;if(O!==null&&O(_,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var P=US(E,i);Tl(e,t,P,Nn(e))}else Tl(e,t,i,Nn(e))}catch(K){Tl(e,t,{then:function(){},status:"rejected",reason:K},Nn())}finally{Y.p=f,v!==null&&_.types!==null&&(v.types=_.types),z.T=v}}function PS(){}function Eu(e,t,s,i){if(e.tag!==5)throw Error(o(476));var c=rp(e).queue;op(e,c,t,ee,s===null?PS:function(){return cp(e),s(i)})}function rp(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:Ta,lastRenderedState:ee},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ta,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function cp(e){var t=rp(e);t.next===null&&(t=e.alternate.memoizedState),Tl(e,t.next.queue,{},Nn())}function Cu(){return Jt(Il)}function up(){return Rt().memoizedState}function dp(){return Rt().memoizedState}function qS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=Nn();e=Ya(s);var i=Ka(t,e,s);i!==null&&(bn(i,t,s),vl(i,t,s)),t={cache:eu()},e.payload=t;return}t=t.return}}function FS(e,t,s){var i=Nn();s={lane:i,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tr(e)?hp(t,s):(s=Pc(e,t,s,i),s!==null&&(bn(s,e,i),mp(s,t,i)))}function fp(e,t,s){var i=Nn();Tl(e,t,s,i)}function Tl(e,t,s,i){var c={lane:i,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(tr(e))hp(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var v=t.lastRenderedState,_=f(v,s);if(c.hasEagerState=!0,c.eagerState=_,xn(_,v))return Bo(e,t,c,0),lt===null&&Oo(),!1}catch{}finally{}if(s=Pc(e,t,c,i),s!==null)return bn(s,e,i),mp(s,t,i),!0}return!1}function Au(e,t,s,i){if(i={lane:2,revertLane:sd(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},tr(e)){if(t)throw Error(o(479))}else t=Pc(e,s,i,2),t!==null&&bn(t,e,2)}function tr(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function hp(e,t){bi=Ko=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function mp(e,t,s){if((s&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,s|=i,t.lanes=s,Wi(e,s)}}var El={readContext:Jt,use:Qo,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};El.useEffectEvent=At;var pp={readContext:Jt,use:Qo,useCallback:function(e,t){return un().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:Jm,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Wo(4194308,4,np.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Wo(4194308,4,e,t)},useInsertionEffect:function(e,t){Wo(4,2,e,t)},useMemo:function(e,t){var s=un();t=t===void 0?null:t;var i=e();if(Bs){cn(!0);try{e()}finally{cn(!1)}}return s.memoizedState=[i,t],i},useReducer:function(e,t,s){var i=un();if(s!==void 0){var c=s(t);if(Bs){cn(!0);try{s(t)}finally{cn(!1)}}}else c=t;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=FS.bind(null,Re,e),[i.memoizedState,e]},useRef:function(e){var t=un();return e={current:e},t.memoizedState=e},useState:function(e){e=bu(e);var t=e.queue,s=fp.bind(null,Re,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:xu,useDeferredValue:function(e,t){var s=un();return Tu(s,e,t)},useTransition:function(){var e=bu(!1);return e=op.bind(null,Re,e.queue,!0,!1),un().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var i=Re,c=un();if(Pe){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),lt===null)throw Error(o(349));(He&127)!==0||Lm(i,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,Jm(zm.bind(null,i,f,e),[e]),i.flags|=2048,_i(9,{destroy:void 0},Um.bind(null,i,f,s,t),null),s},useId:function(){var e=un(),t=lt.identifierPrefix;if(Pe){var s=sa,i=aa;s=(i&~(1<<32-vt(i)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Zo++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=zS++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Cu,useFormState:Ym,useActionState:Ym,useOptimistic:function(e){var t=un();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=Au.bind(null,Re,!0,s),s.dispatch=t,[e,t]},useMemoCache:gu,useCacheRefresh:function(){return un().memoizedState=qS.bind(null,Re)},useEffectEvent:function(e){var t=un(),s={impl:e};return t.memoizedState=s,function(){if((Xe&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},ju={readContext:Jt,use:Qo,useCallback:sp,useContext:Jt,useEffect:_u,useImperativeHandle:ap,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:ip,useReducer:Jo,useRef:Qm,useState:function(){return Jo(Ta)},useDebugValue:xu,useDeferredValue:function(e,t){var s=Rt();return lp(s,at.memoizedState,e,t)},useTransition:function(){var e=Jo(Ta)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:xl(e),t]},useSyncExternalStore:Bm,useId:up,useHostTransitionStatus:Cu,useFormState:Km,useActionState:Km,useOptimistic:function(e,t){var s=Rt();return Hm(s,at,e,t)},useMemoCache:gu,useCacheRefresh:dp};ju.useEffectEvent=Wm;var gp={readContext:Jt,use:Qo,useCallback:sp,useContext:Jt,useEffect:_u,useImperativeHandle:ap,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:ip,useReducer:vu,useRef:Qm,useState:function(){return vu(Ta)},useDebugValue:xu,useDeferredValue:function(e,t){var s=Rt();return at===null?Tu(s,e,t):lp(s,at.memoizedState,e,t)},useTransition:function(){var e=vu(Ta)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:xl(e),t]},useSyncExternalStore:Bm,useId:up,useHostTransitionStatus:Cu,useFormState:Xm,useActionState:Xm,useOptimistic:function(e,t){var s=Rt();return at!==null?Hm(s,at,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:gu,useCacheRefresh:dp};gp.useEffectEvent=Wm;function Nu(e,t,s,i){t=e.memoizedState,s=s(i,t),s=s==null?t:b({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var wu={enqueueSetState:function(e,t,s){e=e._reactInternals;var i=Nn(),c=Ya(i);c.payload=t,s!=null&&(c.callback=s),t=Ka(e,c,i),t!==null&&(bn(t,e,i),vl(t,e,i))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var i=Nn(),c=Ya(i);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=Ka(e,c,i),t!==null&&(bn(t,e,i),vl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=Nn(),i=Ya(s);i.tag=2,t!=null&&(i.callback=t),t=Ka(e,i,s),t!==null&&(bn(t,e,s),vl(t,e,s))}};function yp(e,t,s,i,c,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,v):t.prototype&&t.prototype.isPureReactComponent?!ul(s,i)||!ul(c,f):!0}function vp(e,t,s,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,i),t.state!==e&&wu.enqueueReplaceState(t,t.state,null)}function Ls(e,t){var s=t;if("ref"in t){s={};for(var i in t)i!=="ref"&&(s[i]=t[i])}if(e=e.defaultProps){s===t&&(s=b({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}function bp(e){Mo(e)}function Sp(e){console.error(e)}function _p(e){Mo(e)}function nr(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function xp(e,t,s){try{var i=e.onCaughtError;i(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Du(e,t,s){return s=Ya(s),s.tag=3,s.payload={element:null},s.callback=function(){nr(e,t)},s}function Tp(e){return e=Ya(e),e.tag=3,e}function Ep(e,t,s,i){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var f=i.value;e.payload=function(){return c(f)},e.callback=function(){xp(t,s,i)}}var v=s.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){xp(t,s,i),typeof c!="function"&&(es===null?es=new Set([this]):es.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})})}function $S(e,t,s,i,c){if(s.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=s.alternate,t!==null&&hi(t,s,c,!0),s=En.current,s!==null){switch(s.tag){case 31:case 13:return Hn===null?mr():s.alternate===null&&jt===0&&(jt=3),s.flags&=-257,s.flags|=65536,s.lanes=c,i===Po?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([i]):t.add(i),td(e,i,c)),!1;case 22:return s.flags|=65536,i===Po?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([i]):s.add(i)),td(e,i,c)),!1}throw Error(o(435,s.tag))}return td(e,i,c),mr(),!1}if(Pe)return t=En.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,i!==Zc&&(e=Error(o(422),{cause:i}),hl(Un(e,s)))):(i!==Zc&&(t=Error(o(423),{cause:i}),hl(Un(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,i=Un(i,s),c=Du(e.stateNode,i,c),lu(e,c),jt!==4&&(jt=2)),!1;var f=Error(o(520),{cause:i});if(f=Un(f,s),Rl===null?Rl=[f]:Rl.push(f),jt!==4&&(jt=2),t===null)return!0;i=Un(i,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=Du(s.stateNode,i,e),lu(s,e),!1;case 1:if(t=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(es===null||!es.has(f))))return s.flags|=65536,c&=-c,s.lanes|=c,c=Tp(c),Ep(c,e,s,i),lu(s,c),!1}s=s.return}while(s!==null);return!1}var ku=Error(o(461)),It=!1;function Wt(e,t,s,i){t.child=e===null?Nm(t,null,s,i):Os(t,e.child,s,i)}function Cp(e,t,s,i,c){s=s.render;var f=t.ref;if("ref"in i){var v={};for(var _ in i)_!=="ref"&&(v[_]=i[_])}else v=i;return Ds(t),i=fu(e,t,s,v,f,c),_=hu(),e!==null&&!It?(mu(e,t,c),Ea(e,t,c)):(Pe&&_&&Yc(t),t.flags|=1,Wt(e,t,i,c),t.child)}function Ap(e,t,s,i,c){if(e===null){var f=s.type;return typeof f=="function"&&!qc(f)&&f.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=f,jp(e,t,f,i,c)):(e=Uo(s.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Vu(e,c)){var v=f.memoizedProps;if(s=s.compare,s=s!==null?s:ul,s(v,i)&&e.ref===t.ref)return Ea(e,t,c)}return t.flags|=1,e=va(f,i),e.ref=t.ref,e.return=t,t.child=e}function jp(e,t,s,i,c){if(e!==null){var f=e.memoizedProps;if(ul(f,i)&&e.ref===t.ref)if(It=!1,t.pendingProps=i=f,Vu(e,c))(e.flags&131072)!==0&&(It=!0);else return t.lanes=e.lanes,Ea(e,t,c)}return Ru(e,t,s,i,c)}function Np(e,t,s,i){var c=i.children,f=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(f=f!==null?f.baseLanes|s:s,e!==null){for(i=t.child=e.child,c=0;i!==null;)c=c|i.lanes|i.childLanes,i=i.sibling;i=c&~f}else i=0,t.child=null;return wp(e,t,f,s,i)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ho(t,f!==null?f.cachePool:null),f!==null?km(t,f):ru(),Rm(t);else return i=t.lanes=536870912,wp(e,t,f!==null?f.baseLanes|s:s,s,i)}else f!==null?(Ho(t,f.cachePool),km(t,f),Xa(),t.memoizedState=null):(e!==null&&Ho(t,null),ru(),Xa());return Wt(e,t,c,s),t.child}function Cl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function wp(e,t,s,i,c){var f=nu();return f=f===null?null:{parent:zt._currentValue,pool:f},t.memoizedState={baseLanes:s,cachePool:f},e!==null&&Ho(t,null),ru(),Rm(t),e!==null&&hi(e,t,i,!0),t.childLanes=c,null}function ar(e,t){return t=ir({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Dp(e,t,s){return Os(t,e.child,null,s),e=ar(t,t.pendingProps),e.flags|=2,Cn(t),t.memoizedState=null,e}function YS(e,t,s){var i=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(i.mode==="hidden")return e=ar(t,i),t.lanes=536870912,Cl(null,e);if(uu(t),(e=ct)?(e=Gg(e,In),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:aa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},s=hm(e),s.return=t,t.child=s,Qt=t,ct=null)):e=null,e===null)throw qa(t);return t.lanes=536870912,null}return ar(t,i)}var f=e.memoizedState;if(f!==null){var v=f.dehydrated;if(uu(t),c)if(t.flags&256)t.flags&=-257,t=Dp(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(It||hi(e,t,s,!1),c=(s&e.childLanes)!==0,It||c){if(i=lt,i!==null&&(v=el(i,s),v!==0&&v!==f.retryLane))throw f.retryLane=v,As(e,v),bn(i,e,v),ku;mr(),t=Dp(e,t,s)}else e=f.treeContext,ct=Gn(v.nextSibling),Qt=t,Pe=!0,Pa=null,In=!1,e!==null&&gm(t,e),t=ar(t,i),t.flags|=4096;return t}return e=va(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function sr(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function Ru(e,t,s,i,c){return Ds(t),s=fu(e,t,s,i,void 0,c),i=hu(),e!==null&&!It?(mu(e,t,c),Ea(e,t,c)):(Pe&&i&&Yc(t),t.flags|=1,Wt(e,t,s,c),t.child)}function kp(e,t,s,i,c,f){return Ds(t),t.updateQueue=null,s=Om(t,i,s,c),Mm(e),i=hu(),e!==null&&!It?(mu(e,t,f),Ea(e,t,f)):(Pe&&i&&Yc(t),t.flags|=1,Wt(e,t,s,f),t.child)}function Rp(e,t,s,i,c){if(Ds(t),t.stateNode===null){var f=ci,v=s.contextType;typeof v=="object"&&v!==null&&(f=Jt(v)),f=new s(i,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=wu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=i,f.state=t.memoizedState,f.refs={},su(t),v=s.contextType,f.context=typeof v=="object"&&v!==null?Jt(v):ci,f.state=t.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(Nu(t,s,v,i),f.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(v=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),v!==f.state&&wu.enqueueReplaceState(f,f.state,null),Sl(t,i,f,c),bl(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){f=t.stateNode;var _=t.memoizedProps,E=Ls(s,_);f.props=E;var O=f.context,P=s.contextType;v=ci,typeof P=="object"&&P!==null&&(v=Jt(P));var K=s.getDerivedStateFromProps;P=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=t.pendingProps!==_,P||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||O!==v)&&vp(t,f,i,v),$a=!1;var U=t.memoizedState;f.state=U,Sl(t,i,f,c),bl(),O=t.memoizedState,_||U!==O||$a?(typeof K=="function"&&(Nu(t,s,K,i),O=t.memoizedState),(E=$a||yp(t,s,E,i,U,O,v))?(P||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=O),f.props=i,f.state=O,f.context=v,i=E):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{f=t.stateNode,iu(e,t),v=t.memoizedProps,P=Ls(s,v),f.props=P,K=t.pendingProps,U=f.context,O=s.contextType,E=ci,typeof O=="object"&&O!==null&&(E=Jt(O)),_=s.getDerivedStateFromProps,(O=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==K||U!==E)&&vp(t,f,i,E),$a=!1,U=t.memoizedState,f.state=U,Sl(t,i,f,c),bl();var V=t.memoizedState;v!==K||U!==V||$a||e!==null&&e.dependencies!==null&&Vo(e.dependencies)?(typeof _=="function"&&(Nu(t,s,_,i),V=t.memoizedState),(P=$a||yp(t,s,P,i,U,V,E)||e!==null&&e.dependencies!==null&&Vo(e.dependencies))?(O||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,V,E),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,V,E)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=V),f.props=i,f.state=V,f.context=E,i=P):(typeof f.componentDidUpdate!="function"||v===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),i=!1)}return f=i,sr(e,t),i=(t.flags&128)!==0,f||i?(f=t.stateNode,s=i&&typeof s.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&i?(t.child=Os(t,e.child,null,c),t.child=Os(t,null,s,c)):Wt(e,t,s,c),t.memoizedState=f.state,e=t.child):e=Ea(e,t,c),e}function Mp(e,t,s,i){return Ns(),t.flags|=256,Wt(e,t,s,i),t.child}var Mu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ou(e){return{baseLanes:e,cachePool:xm()}}function Bu(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=jn),e}function Op(e,t,s){var i=t.pendingProps,c=!1,f=(t.flags&128)!==0,v;if((v=f)||(v=e!==null&&e.memoizedState===null?!1:(kt.current&2)!==0),v&&(c=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(c?Za(t):Xa(),(e=ct)?(e=Gg(e,In),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:aa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},s=hm(e),s.return=t,t.child=s,Qt=t,ct=null)):e=null,e===null)throw qa(t);return yd(e)?t.lanes=32:t.lanes=536870912,null}var _=i.children;return i=i.fallback,c?(Xa(),c=t.mode,_=ir({mode:"hidden",children:_},c),i=js(i,c,s,null),_.return=t,i.return=t,_.sibling=i,t.child=_,i=t.child,i.memoizedState=Ou(s),i.childLanes=Bu(e,v,s),t.memoizedState=Mu,Cl(null,i)):(Za(t),Lu(t,_))}var E=e.memoizedState;if(E!==null&&(_=E.dehydrated,_!==null)){if(f)t.flags&256?(Za(t),t.flags&=-257,t=Uu(e,t,s)):t.memoizedState!==null?(Xa(),t.child=e.child,t.flags|=128,t=null):(Xa(),_=i.fallback,c=t.mode,i=ir({mode:"visible",children:i.children},c),_=js(_,c,s,null),_.flags|=2,i.return=t,_.return=t,i.sibling=_,t.child=i,Os(t,e.child,null,s),i=t.child,i.memoizedState=Ou(s),i.childLanes=Bu(e,v,s),t.memoizedState=Mu,t=Cl(null,i));else if(Za(t),yd(_)){if(v=_.nextSibling&&_.nextSibling.dataset,v)var O=v.dgst;v=O,i=Error(o(419)),i.stack="",i.digest=v,hl({value:i,source:null,stack:null}),t=Uu(e,t,s)}else if(It||hi(e,t,s,!1),v=(s&e.childLanes)!==0,It||v){if(v=lt,v!==null&&(i=el(v,s),i!==0&&i!==E.retryLane))throw E.retryLane=i,As(e,i),bn(v,e,i),ku;gd(_)||mr(),t=Uu(e,t,s)}else gd(_)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,ct=Gn(_.nextSibling),Qt=t,Pe=!0,Pa=null,In=!1,e!==null&&gm(t,e),t=Lu(t,i.children),t.flags|=4096);return t}return c?(Xa(),_=i.fallback,c=t.mode,E=e.child,O=E.sibling,i=va(E,{mode:"hidden",children:i.children}),i.subtreeFlags=E.subtreeFlags&65011712,O!==null?_=va(O,_):(_=js(_,c,s,null),_.flags|=2),_.return=t,i.return=t,i.sibling=_,t.child=i,Cl(null,i),i=t.child,_=e.child.memoizedState,_===null?_=Ou(s):(c=_.cachePool,c!==null?(E=zt._currentValue,c=c.parent!==E?{parent:E,pool:E}:c):c=xm(),_={baseLanes:_.baseLanes|s,cachePool:c}),i.memoizedState=_,i.childLanes=Bu(e,v,s),t.memoizedState=Mu,Cl(e.child,i)):(Za(t),s=e.child,e=s.sibling,s=va(s,{mode:"visible",children:i.children}),s.return=t,s.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=s,t.memoizedState=null,s)}function Lu(e,t){return t=ir({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ir(e,t){return e=Tn(22,e,null,t),e.lanes=0,e}function Uu(e,t,s){return Os(t,e.child,null,s),e=Lu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Bp(e,t,s){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Jc(e.return,t,s)}function zu(e,t,s,i,c,f){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:s,tailMode:c,treeForkCount:f}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=i,v.tail=s,v.tailMode=c,v.treeForkCount=f)}function Lp(e,t,s){var i=t.pendingProps,c=i.revealOrder,f=i.tail;i=i.children;var v=kt.current,_=(v&2)!==0;if(_?(v=v&1|2,t.flags|=128):v&=1,_e(kt,v),Wt(e,t,i,s),i=Pe?fl:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bp(e,s,t);else if(e.tag===19)Bp(e,s,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(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&Yo(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),zu(t,!1,c,s,f,i);break;case"backwards":case"unstable_legacy-backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Yo(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}zu(t,!0,s,null,f,i);break;case"together":zu(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function Ea(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Wa|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(hi(e,t,s,!1),(s&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,s=va(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=va(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Vu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Vo(e)))}function KS(e,t,s){switch(t.tag){case 3:De(t,t.stateNode.containerInfo),Fa(t,zt,e.memoizedState.cache),Ns();break;case 27:case 5:yt(t);break;case 4:De(t,t.stateNode.containerInfo);break;case 10:Fa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,uu(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Za(t),t.flags|=128,null):(s&t.child.childLanes)!==0?Op(e,t,s):(Za(t),e=Ea(e,t,s),e!==null?e.sibling:null);Za(t);break;case 19:var c=(e.flags&128)!==0;if(i=(s&t.childLanes)!==0,i||(hi(e,t,s,!1),i=(s&t.childLanes)!==0),c){if(i)return Lp(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),_e(kt,kt.current),i)break;return null;case 22:return t.lanes=0,Np(e,t,s,t.pendingProps);case 24:Fa(t,zt,e.memoizedState.cache)}return Ea(e,t,s)}function Up(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)It=!0;else{if(!Vu(e,s)&&(t.flags&128)===0)return It=!1,KS(e,t,s);It=(e.flags&131072)!==0}else It=!1,Pe&&(t.flags&1048576)!==0&&pm(t,fl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Rs(t.elementType),t.type=e,typeof e=="function")qc(e)?(i=Ls(e,i),t.tag=1,t=Rp(null,t,e,i,s)):(t.tag=0,t=Ru(null,t,e,i,s));else{if(e!=null){var c=e.$$typeof;if(c===X){t.tag=11,t=Cp(null,t,e,i,s);break e}else if(c===W){t.tag=14,t=Ap(null,t,e,i,s);break e}}throw t=ve(e)||e,Error(o(306,t,""))}}return t;case 0:return Ru(e,t,t.type,t.pendingProps,s);case 1:return i=t.type,c=Ls(i,t.pendingProps),Rp(e,t,i,c,s);case 3:e:{if(De(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var f=t.memoizedState;c=f.element,iu(e,t),Sl(t,i,null,s);var v=t.memoizedState;if(i=v.cache,Fa(t,zt,i),i!==f.cache&&Wc(t,[zt],s,!0),bl(),i=v.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Mp(e,t,i,s);break e}else if(i!==c){c=Un(Error(o(424)),t),hl(c),t=Mp(e,t,i,s);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(ct=Gn(e.firstChild),Qt=t,Pe=!0,Pa=null,In=!0,s=Nm(t,null,i,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Ns(),i===c){t=Ea(e,t,s);break e}Wt(e,t,i,s)}t=t.child}return t;case 26:return sr(e,t),e===null?(s=Kg(t.type,null,t.pendingProps,null))?t.memoizedState=s:Pe||(s=t.type,e=t.pendingProps,i=_r(q.current).createElement(s),i[Ut]=t,i[Zt]=e,en(i,s,e),mt(i),t.stateNode=i):t.memoizedState=Kg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return yt(t),e===null&&Pe&&(i=t.stateNode=Fg(t.type,t.pendingProps,q.current),Qt=t,In=!0,c=ct,ss(t.type)?(vd=c,ct=Gn(i.firstChild)):ct=c),Wt(e,t,t.pendingProps.children,s),sr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((c=i=ct)&&(i=E_(i,t.type,t.pendingProps,In),i!==null?(t.stateNode=i,Qt=t,ct=Gn(i.firstChild),In=!1,c=!0):c=!1),c||qa(t)),yt(t),c=t.type,f=t.pendingProps,v=e!==null?e.memoizedProps:null,i=f.children,hd(c,f)?i=null:v!==null&&hd(c,v)&&(t.flags|=32),t.memoizedState!==null&&(c=fu(e,t,VS,null,null,s),Il._currentValue=c),sr(e,t),Wt(e,t,i,s),t.child;case 6:return e===null&&Pe&&((e=s=ct)&&(s=C_(s,t.pendingProps,In),s!==null?(t.stateNode=s,Qt=t,ct=null,e=!0):e=!1),e||qa(t)),null;case 13:return Op(e,t,s);case 4:return De(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Os(t,null,i,s):Wt(e,t,i,s),t.child;case 11:return Cp(e,t,t.type,t.pendingProps,s);case 7:return Wt(e,t,t.pendingProps,s),t.child;case 8:return Wt(e,t,t.pendingProps.children,s),t.child;case 12:return Wt(e,t,t.pendingProps.children,s),t.child;case 10:return i=t.pendingProps,Fa(t,t.type,i.value),Wt(e,t,i.children,s),t.child;case 9:return c=t.type._context,i=t.pendingProps.children,Ds(t),c=Jt(c),i=i(c),t.flags|=1,Wt(e,t,i,s),t.child;case 14:return Ap(e,t,t.type,t.pendingProps,s);case 15:return jp(e,t,t.type,t.pendingProps,s);case 19:return Lp(e,t,s);case 31:return YS(e,t,s);case 22:return Np(e,t,s,t.pendingProps);case 24:return Ds(t),i=Jt(zt),e===null?(c=nu(),c===null&&(c=lt,f=eu(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=s),c=f),t.memoizedState={parent:i,cache:c},su(t),Fa(t,zt,c)):((e.lanes&s)!==0&&(iu(e,t),Sl(t,null,null,s),bl()),c=e.memoizedState,f=t.memoizedState,c.parent!==i?(c={parent:i,cache:i},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Fa(t,zt,i)):(i=f.cache,Fa(t,zt,i),i!==c.cache&&Wc(t,[zt],s,!0))),Wt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Ca(e){e.flags|=4}function Iu(e,t,s,i,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(ug())e.flags|=8192;else throw Ms=Po,au}else e.flags&=-16777217}function zp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Wg(t))if(ug())e.flags|=8192;else throw Ms=Po,au}function lr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Mn():536870912,e.lanes|=t,Ci|=t)}function Al(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var i=null;s!==null;)s.alternate!==null&&(i=s),s=s.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,i=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,i|=c.subtreeFlags&65011712,i|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=s,t}function ZS(e,t,s){var i=t.pendingProps;switch(Kc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return ut(t),null;case 3:return s=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),_a(zt),$e(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(fi(t)?Ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xc())),ut(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(Ca(t),f!==null?(ut(t),zp(t,f)):(ut(t),Iu(t,c,null,i,s))):f?f!==e.memoizedState?(Ca(t),ut(t),zp(t,f)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&Ca(t),ut(t),Iu(t,c,e,i,s)),null;case 27:if(xt(t),s=q.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ca(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return ut(t),null}e=Ce.current,fi(t)?ym(t):(e=Fg(c,i,s),t.stateNode=e,Ca(t))}return ut(t),null;case 5:if(xt(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Ca(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return ut(t),null}if(f=Ce.current,fi(t))ym(t);else{var v=_r(q.current);switch(f){case 1:f=v.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=v.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=v.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof i.is=="string"?v.createElement("select",{is:i.is}):v.createElement("select"),i.multiple?f.multiple=!0:i.size&&(f.size=i.size);break;default:f=typeof i.is=="string"?v.createElement(c,{is:i.is}):v.createElement(c)}}f[Ut]=t,f[Zt]=i;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)f.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=f;e:switch(en(f,c,i),c){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Ca(t)}}return ut(t),Iu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Ca(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=q.current,fi(t)){if(e=t.stateNode,s=t.memoizedProps,i=null,c=Qt,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[Ut]=t,e=!!(e.nodeValue===s||i!==null&&i.suppressHydrationWarning===!0||Og(e.nodeValue,s)),e||qa(t,!0)}else e=_r(e).createTextNode(i),e[Ut]=t,t.stateNode=e}return ut(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(i=fi(t),s!==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[Ut]=t}else Ns(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else s=Xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(Cn(t),t):(Cn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ut(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=fi(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[Ut]=t}else Ns(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),c=!1}else c=Xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Cn(t),t):(Cn(t),null)}return Cn(t),(t.flags&128)!==0?(t.lanes=s,t):(s=i!==null,e=e!==null&&e.memoizedState!==null,s&&(i=t.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool),f=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==c&&(i.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),lr(t,t.updateQueue),ut(t),null);case 4:return $e(),e===null&&rd(t.stateNode.containerInfo),ut(t),null;case 10:return _a(t.type),ut(t),null;case 19:if(we(kt),i=t.memoizedState,i===null)return ut(t),null;if(c=(t.flags&128)!==0,f=i.rendering,f===null)if(c)Al(i,!1);else{if(jt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Yo(e),f!==null){for(t.flags|=128,Al(i,!1),e=f.updateQueue,t.updateQueue=e,lr(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)fm(s,e),s=s.sibling;return _e(kt,kt.current&1|2),Pe&&ba(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&de()>dr&&(t.flags|=128,c=!0,Al(i,!1),t.lanes=4194304)}else{if(!c)if(e=Yo(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,lr(t,e),Al(i,!0),i.tail===null&&i.tailMode==="hidden"&&!f.alternate&&!Pe)return ut(t),null}else 2*de()-i.renderingStartTime>dr&&s!==536870912&&(t.flags|=128,c=!0,Al(i,!1),t.lanes=4194304);i.isBackwards?(f.sibling=t.child,t.child=f):(e=i.last,e!==null?e.sibling=f:t.child=f,i.last=f)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=de(),e.sibling=null,s=kt.current,_e(kt,c?s&1|2:s&1),Pe&&ba(t,i.treeForkCount),e):(ut(t),null);case 22:case 23:return Cn(t),cu(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(s&536870912)!==0&&(t.flags&128)===0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),s=t.updateQueue,s!==null&&lr(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==s&&(t.flags|=2048),e!==null&&we(ks),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),_a(zt),ut(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function XS(e,t){switch(Kc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _a(zt),$e(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xt(t),null;case 31:if(t.memoizedState!==null){if(Cn(t),t.alternate===null)throw Error(o(340));Ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Cn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(kt),null;case 4:return $e(),null;case 10:return _a(t.type),null;case 22:case 23:return Cn(t),cu(),e!==null&&we(ks),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _a(zt),null;case 25:return null;default:return null}}function Vp(e,t){switch(Kc(t),t.tag){case 3:_a(zt),$e();break;case 26:case 27:case 5:xt(t);break;case 4:$e();break;case 31:t.memoizedState!==null&&Cn(t);break;case 13:Cn(t);break;case 19:we(kt);break;case 10:_a(t.type);break;case 22:case 23:Cn(t),cu(),e!==null&&we(ks);break;case 24:_a(zt)}}function jl(e,t){try{var s=t.updateQueue,i=s!==null?s.lastEffect:null;if(i!==null){var c=i.next;s=c;do{if((s.tag&e)===e){i=void 0;var f=s.create,v=s.inst;i=f(),v.destroy=i}s=s.next}while(s!==c)}}catch(_){nt(t,t.return,_)}}function Qa(e,t,s){try{var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var f=c.next;i=f;do{if((i.tag&e)===e){var v=i.inst,_=v.destroy;if(_!==void 0){v.destroy=void 0,c=t;var E=s,O=_;try{O()}catch(P){nt(c,E,P)}}}i=i.next}while(i!==f)}}catch(P){nt(t,t.return,P)}}function Ip(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{Dm(t,s)}catch(i){nt(e,e.return,i)}}}function Hp(e,t,s){s.props=Ls(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(i){nt(e,t,i)}}function Nl(e,t){try{var s=e.ref;if(s!==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 s=="function"?e.refCleanup=s(i):s.current=i}}catch(c){nt(e,t,c)}}function ia(e,t){var s=e.ref,i=e.refCleanup;if(s!==null)if(typeof i=="function")try{i()}catch(c){nt(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){nt(e,t,c)}else s.current=null}function Gp(e){var t=e.type,s=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&i.focus();break e;case"img":s.src?i.src=s.src:s.srcSet&&(i.srcset=s.srcSet)}}catch(c){nt(e,e.return,c)}}function Hu(e,t,s){try{var i=e.stateNode;v_(i,e.type,s,t),i[Zt]=t}catch(c){nt(e,e.return,c)}}function Pp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ss(e.type)||e.tag===4}function Gu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ss(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 Pu(e,t,s){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=ga));else if(i!==4&&(i===27&&ss(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Pu(e,t,s),e=e.sibling;e!==null;)Pu(e,t,s),e=e.sibling}function or(e,t,s){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(i!==4&&(i===27&&ss(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(or(e,t,s),e=e.sibling;e!==null;)or(e,t,s),e=e.sibling}function qp(e){var t=e.stateNode,s=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);en(t,i,s),t[Ut]=e,t[Zt]=s}catch(f){nt(e,e.return,f)}}var Aa=!1,Ht=!1,qu=!1,Fp=typeof WeakSet=="function"?WeakSet:Set,Kt=null;function QS(e,t){if(e=e.containerInfo,dd=Nr,e=am(e),Uc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var i=s.getSelection&&s.getSelection();if(i&&i.rangeCount!==0){s=i.anchorNode;var c=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var v=0,_=-1,E=-1,O=0,P=0,K=e,U=null;t:for(;;){for(var V;K!==s||c!==0&&K.nodeType!==3||(_=v+c),K!==f||i!==0&&K.nodeType!==3||(E=v+i),K.nodeType===3&&(v+=K.nodeValue.length),(V=K.firstChild)!==null;)U=K,K=V;for(;;){if(K===e)break t;if(U===s&&++O===c&&(_=v),U===f&&++P===i&&(E=v),(V=K.nextSibling)!==null)break;K=U,U=K.parentNode}K=V}s=_===-1||E===-1?null:{start:_,end:E}}else s=null}s=s||{start:0,end:0}}else s=null;for(fd={focusedElem:e,selectionRange:s},Nr=!1,Kt=t;Kt!==null;)if(t=Kt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Kt=e;else for(;Kt!==null;){switch(t=Kt,f=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(s=0;s<e.length;s++)c=e[s],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,s=t,c=f.memoizedProps,f=f.memoizedState,i=s.stateNode;try{var ue=Ls(s.type,c);e=i.getSnapshotBeforeUpdate(ue,f),i.__reactInternalSnapshotBeforeUpdate=e}catch(Se){nt(s,s.return,Se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)pd(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pd(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,Kt=e;break}Kt=t.return}}function $p(e,t,s){var i=s.flags;switch(s.tag){case 0:case 11:case 15:Na(e,s),i&4&&jl(5,s);break;case 1:if(Na(e,s),i&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(v){nt(s,s.return,v)}else{var c=Ls(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){nt(s,s.return,v)}}i&64&&Ip(s),i&512&&Nl(s,s.return);break;case 3:if(Na(e,s),i&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{Dm(e,t)}catch(v){nt(s,s.return,v)}}break;case 27:t===null&&i&4&&qp(s);case 26:case 5:Na(e,s),t===null&&i&4&&Gp(s),i&512&&Nl(s,s.return);break;case 12:Na(e,s);break;case 31:Na(e,s),i&4&&Zp(e,s);break;case 13:Na(e,s),i&4&&Xp(e,s),i&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=l_.bind(null,s),A_(e,s))));break;case 22:if(i=s.memoizedState!==null||Aa,!i){t=t!==null&&t.memoizedState!==null||Ht,c=Aa;var f=Ht;Aa=i,(Ht=t)&&!f?wa(e,s,(s.subtreeFlags&8772)!==0):Na(e,s),Aa=c,Ht=f}break;case 30:break;default:Na(e,s)}}function Yp(e){var t=e.alternate;t!==null&&(e.alternate=null,Yp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ie(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 pt=null,pn=!1;function ja(e,t,s){for(s=s.child;s!==null;)Kp(e,t,s),s=s.sibling}function Kp(e,t,s){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(rt,s)}catch{}switch(s.tag){case 26:Ht||ia(s,t),ja(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Ht||ia(s,t);var i=pt,c=pn;ss(s.type)&&(pt=s.stateNode,pn=!1),ja(e,t,s),Ul(s.stateNode),pt=i,pn=c;break;case 5:Ht||ia(s,t);case 6:if(i=pt,c=pn,pt=null,ja(e,t,s),pt=i,pn=c,pt!==null)if(pn)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(s.stateNode)}catch(f){nt(s,t,f)}else try{pt.removeChild(s.stateNode)}catch(f){nt(s,t,f)}break;case 18:pt!==null&&(pn?(e=pt,Ig(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Mi(e)):Ig(pt,s.stateNode));break;case 4:i=pt,c=pn,pt=s.stateNode.containerInfo,pn=!0,ja(e,t,s),pt=i,pn=c;break;case 0:case 11:case 14:case 15:Qa(2,s,t),Ht||Qa(4,s,t),ja(e,t,s);break;case 1:Ht||(ia(s,t),i=s.stateNode,typeof i.componentWillUnmount=="function"&&Hp(s,t,i)),ja(e,t,s);break;case 21:ja(e,t,s);break;case 22:Ht=(i=Ht)||s.memoizedState!==null,ja(e,t,s),Ht=i;break;default:ja(e,t,s)}}function Zp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Mi(e)}catch(s){nt(t,t.return,s)}}}function Xp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Mi(e)}catch(s){nt(t,t.return,s)}}function JS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Fp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Fp),t;default:throw Error(o(435,e.tag))}}function rr(e,t){var s=JS(e);t.forEach(function(i){if(!s.has(i)){s.add(i);var c=o_.bind(null,e,i);i.then(c,c)}})}function gn(e,t){var s=t.deletions;if(s!==null)for(var i=0;i<s.length;i++){var c=s[i],f=e,v=t,_=v;e:for(;_!==null;){switch(_.tag){case 27:if(ss(_.type)){pt=_.stateNode,pn=!1;break e}break;case 5:pt=_.stateNode,pn=!1;break e;case 3:case 4:pt=_.stateNode.containerInfo,pn=!0;break e}_=_.return}if(pt===null)throw Error(o(160));Kp(f,v,c),pt=null,pn=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Qp(t,e),t=t.sibling}var Wn=null;function Qp(e,t){var s=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gn(t,e),yn(e),i&4&&(Qa(3,e,e.return),jl(3,e),Qa(5,e,e.return));break;case 1:gn(t,e),yn(e),i&512&&(Ht||s===null||ia(s,s.return)),i&64&&Aa&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?i:s.concat(i))));break;case 26:var c=Wn;if(gn(t,e),yn(e),i&512&&(Ht||s===null||ia(s,s.return)),i&4){var f=s!==null?s.memoizedState:null;if(i=e.memoizedState,s===null)if(i===null)if(e.stateNode===null){e:{i=e.type,s=e.memoizedProps,c=c.ownerDocument||c;t:switch(i){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Be]||f[Ut]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(i),c.head.insertBefore(f,c.querySelector("head > title"))),en(f,i,s),f[Ut]=e,mt(f),i=f;break e;case"link":var v=Qg("link","href",c).get(i+(s.href||""));if(v){for(var _=0;_<v.length;_++)if(f=v[_],f.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&f.getAttribute("rel")===(s.rel==null?null:s.rel)&&f.getAttribute("title")===(s.title==null?null:s.title)&&f.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){v.splice(_,1);break t}}f=c.createElement(i),en(f,i,s),c.head.appendChild(f);break;case"meta":if(v=Qg("meta","content",c).get(i+(s.content||""))){for(_=0;_<v.length;_++)if(f=v[_],f.getAttribute("content")===(s.content==null?null:""+s.content)&&f.getAttribute("name")===(s.name==null?null:s.name)&&f.getAttribute("property")===(s.property==null?null:s.property)&&f.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&f.getAttribute("charset")===(s.charSet==null?null:s.charSet)){v.splice(_,1);break t}}f=c.createElement(i),en(f,i,s),c.head.appendChild(f);break;default:throw Error(o(468,i))}f[Ut]=e,mt(f),i=f}e.stateNode=i}else Jg(c,e.type,e.stateNode);else e.stateNode=Xg(c,i,e.memoizedProps);else f!==i?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,i===null?Jg(c,e.type,e.stateNode):Xg(c,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Hu(e,e.memoizedProps,s.memoizedProps)}break;case 27:gn(t,e),yn(e),i&512&&(Ht||s===null||ia(s,s.return)),s!==null&&i&4&&Hu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(gn(t,e),yn(e),i&512&&(Ht||s===null||ia(s,s.return)),e.flags&32){c=e.stateNode;try{ni(c,"")}catch(ue){nt(e,e.return,ue)}}i&4&&e.stateNode!=null&&(c=e.memoizedProps,Hu(e,c,s!==null?s.memoizedProps:c)),i&1024&&(qu=!0);break;case 6:if(gn(t,e),yn(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,s=e.stateNode;try{s.nodeValue=i}catch(ue){nt(e,e.return,ue)}}break;case 3:if(Er=null,c=Wn,Wn=xr(t.containerInfo),gn(t,e),Wn=c,yn(e),i&4&&s!==null&&s.memoizedState.isDehydrated)try{Mi(t.containerInfo)}catch(ue){nt(e,e.return,ue)}qu&&(qu=!1,Jp(e));break;case 4:i=Wn,Wn=xr(e.stateNode.containerInfo),gn(t,e),yn(e),Wn=i;break;case 12:gn(t,e),yn(e);break;case 31:gn(t,e),yn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,rr(e,i)));break;case 13:gn(t,e),yn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(ur=de()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,rr(e,i)));break;case 22:c=e.memoizedState!==null;var E=s!==null&&s.memoizedState!==null,O=Aa,P=Ht;if(Aa=O||c,Ht=P||E,gn(t,e),Ht=P,Aa=O,yn(e),i&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||E||Aa||Ht||Us(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){E=s=t;try{if(f=E.stateNode,c)v=f.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{_=E.stateNode;var K=E.memoizedProps.style,U=K!=null&&K.hasOwnProperty("display")?K.display:null;_.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ue){nt(E,E.return,ue)}}}else if(t.tag===6){if(s===null){E=t;try{E.stateNode.nodeValue=c?"":E.memoizedProps}catch(ue){nt(E,E.return,ue)}}}else if(t.tag===18){if(s===null){E=t;try{var V=E.stateNode;c?Hg(V,!0):Hg(E.stateNode,!1)}catch(ue){nt(E,E.return,ue)}}}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;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(s=i.retryQueue,s!==null&&(i.retryQueue=null,rr(e,s))));break;case 19:gn(t,e),yn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,rr(e,i)));break;case 30:break;case 21:break;default:gn(t,e),yn(e)}}function yn(e){var t=e.flags;if(t&2){try{for(var s,i=e.return;i!==null;){if(Pp(i)){s=i;break}i=i.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var c=s.stateNode,f=Gu(e);or(e,f,c);break;case 5:var v=s.stateNode;s.flags&32&&(ni(v,""),s.flags&=-33);var _=Gu(e);or(e,_,v);break;case 3:case 4:var E=s.stateNode.containerInfo,O=Gu(e);Pu(e,O,E);break;default:throw Error(o(161))}}catch(P){nt(e,e.return,P)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Jp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Jp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Na(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$p(e,t.alternate,t),t=t.sibling}function Us(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),Us(t);break;case 1:ia(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&Hp(t,t.return,s),Us(t);break;case 27:Ul(t.stateNode);case 26:case 5:ia(t,t.return),Us(t);break;case 22:t.memoizedState===null&&Us(t);break;case 30:Us(t);break;default:Us(t)}e=e.sibling}}function wa(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,c=e,f=t,v=f.flags;switch(f.tag){case 0:case 11:case 15:wa(c,f,s),jl(4,f);break;case 1:if(wa(c,f,s),i=f,c=i.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(O){nt(i,i.return,O)}if(i=f,c=i.updateQueue,c!==null){var _=i.stateNode;try{var E=c.shared.hiddenCallbacks;if(E!==null)for(c.shared.hiddenCallbacks=null,c=0;c<E.length;c++)wm(E[c],_)}catch(O){nt(i,i.return,O)}}s&&v&64&&Ip(f),Nl(f,f.return);break;case 27:qp(f);case 26:case 5:wa(c,f,s),s&&i===null&&v&4&&Gp(f),Nl(f,f.return);break;case 12:wa(c,f,s);break;case 31:wa(c,f,s),s&&v&4&&Zp(c,f);break;case 13:wa(c,f,s),s&&v&4&&Xp(c,f);break;case 22:f.memoizedState===null&&wa(c,f,s),Nl(f,f.return);break;case 30:break;default:wa(c,f,s)}t=t.sibling}}function Fu(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&ml(s))}function $u(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ml(e))}function ea(e,t,s,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Wp(e,t,s,i),t=t.sibling}function Wp(e,t,s,i){var c=t.flags;switch(t.tag){case 0:case 11:case 15:ea(e,t,s,i),c&2048&&jl(9,t);break;case 1:ea(e,t,s,i);break;case 3:ea(e,t,s,i),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ml(e)));break;case 12:if(c&2048){ea(e,t,s,i),e=t.stateNode;try{var f=t.memoizedProps,v=f.id,_=f.onPostCommit;typeof _=="function"&&_(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){nt(t,t.return,E)}}else ea(e,t,s,i);break;case 31:ea(e,t,s,i);break;case 13:ea(e,t,s,i);break;case 23:break;case 22:f=t.stateNode,v=t.alternate,t.memoizedState!==null?f._visibility&2?ea(e,t,s,i):wl(e,t):f._visibility&2?ea(e,t,s,i):(f._visibility|=2,xi(e,t,s,i,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Fu(v,t);break;case 24:ea(e,t,s,i),c&2048&&$u(t.alternate,t);break;default:ea(e,t,s,i)}}function xi(e,t,s,i,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,v=t,_=s,E=i,O=v.flags;switch(v.tag){case 0:case 11:case 15:xi(f,v,_,E,c),jl(8,v);break;case 23:break;case 22:var P=v.stateNode;v.memoizedState!==null?P._visibility&2?xi(f,v,_,E,c):wl(f,v):(P._visibility|=2,xi(f,v,_,E,c)),c&&O&2048&&Fu(v.alternate,v);break;case 24:xi(f,v,_,E,c),c&&O&2048&&$u(v.alternate,v);break;default:xi(f,v,_,E,c)}t=t.sibling}}function wl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,i=t,c=i.flags;switch(i.tag){case 22:wl(s,i),c&2048&&Fu(i.alternate,i);break;case 24:wl(s,i),c&2048&&$u(i.alternate,i);break;default:wl(s,i)}t=t.sibling}}var Dl=8192;function Ti(e,t,s){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)eg(e,t,s),e=e.sibling}function eg(e,t,s){switch(e.tag){case 26:Ti(e,t,s),e.flags&Dl&&e.memoizedState!==null&&z_(s,Wn,e.memoizedState,e.memoizedProps);break;case 5:Ti(e,t,s);break;case 3:case 4:var i=Wn;Wn=xr(e.stateNode.containerInfo),Ti(e,t,s),Wn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Dl,Dl=16777216,Ti(e,t,s),Dl=i):Ti(e,t,s));break;default:Ti(e,t,s)}}function tg(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 kl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var i=t[s];Kt=i,ag(i,e)}tg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ng(e),e=e.sibling}function ng(e){switch(e.tag){case 0:case 11:case 15:kl(e),e.flags&2048&&Qa(9,e,e.return);break;case 3:kl(e);break;case 12:kl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cr(e)):kl(e);break;default:kl(e)}}function cr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var i=t[s];Kt=i,ag(i,e)}tg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qa(8,t,t.return),cr(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,cr(t));break;default:cr(t)}e=e.sibling}}function ag(e,t){for(;Kt!==null;){var s=Kt;switch(s.tag){case 0:case 11:case 15:Qa(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var i=s.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:ml(s.memoizedState.cache)}if(i=s.child,i!==null)i.return=s,Kt=i;else e:for(s=e;Kt!==null;){i=Kt;var c=i.sibling,f=i.return;if(Yp(i),i===s){Kt=null;break e}if(c!==null){c.return=f,Kt=c;break e}Kt=f}}}var WS={getCacheForType:function(e){var t=Jt(zt),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return Jt(zt).controller.signal}},e_=typeof WeakMap=="function"?WeakMap:Map,Xe=0,lt=null,ze=null,He=0,tt=0,An=null,Ja=!1,Ei=!1,Yu=!1,Da=0,jt=0,Wa=0,zs=0,Ku=0,jn=0,Ci=0,Rl=null,vn=null,Zu=!1,ur=0,sg=0,dr=1/0,fr=null,es=null,qt=0,ts=null,Ai=null,ka=0,Xu=0,Qu=null,ig=null,Ml=0,Ju=null;function Nn(){return(Xe&2)!==0&&He!==0?He&-He:z.T!==null?sd():tl()}function lg(){if(jn===0)if((He&536870912)===0||Pe){var e=Me;Me<<=1,(Me&3932160)===0&&(Me=262144),jn=e}else jn=536870912;return e=En.current,e!==null&&(e.flags|=32),jn}function bn(e,t,s){(e===lt&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(ji(e,0),ns(e,He,jn,!1)),Ia(e,s),((Xe&2)===0||e!==lt)&&(e===lt&&((Xe&2)===0&&(zs|=s),jt===4&&ns(e,He,jn,!1)),la(e))}function og(e,t,s){if((Xe&6)!==0)throw Error(o(327));var i=!s&&(t&127)===0&&(t&e.expiredLanes)===0||se(e,t),c=i?a_(e,t):ed(e,t,!0),f=i;do{if(c===0){Ei&&!i&&ns(e,t,0,!1);break}else{if(s=e.current.alternate,f&&!t_(s)){c=ed(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var _=e;c=Rl;var E=_.current.memoizedState.isDehydrated;if(E&&(ji(_,v).flags|=256),v=ed(_,v,!1),v!==2){if(Yu&&!E){_.errorRecoveryDisabledLanes|=f,zs|=f,c=4;break e}f=vn,vn=c,f!==null&&(vn===null?vn=f:vn.push.apply(vn,f))}c=v}if(f=!1,c!==2)continue}}if(c===1){ji(e,0),ns(e,t,0,!0);break}e:{switch(i=e,f=c,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:ns(i,t,jn,!Ja);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=ur+300-de(),10<c)){if(ns(i,t,jn,!Ja),le(i,0,!0)!==0)break e;ka=t,i.timeoutHandle=zg(rg.bind(null,i,s,vn,fr,Zu,t,jn,zs,Ci,Ja,f,"Throttled",-0,0),c);break e}rg(i,s,vn,fr,Zu,t,jn,zs,Ci,Ja,f,null,-0,0)}}break}while(!0);la(e)}function rg(e,t,s,i,c,f,v,_,E,O,P,K,U,V){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ga},eg(t,f,K);var ue=(f&62914560)===f?ur-de():(f&4194048)===f?sg-de():0;if(ue=V_(K,ue),ue!==null){ka=f,e.cancelPendingCommit=ue(gg.bind(null,e,t,f,s,i,c,v,_,E,P,K,null,U,V)),ns(e,f,v,!O);return}}gg(e,t,f,s,i,c,v,_,E)}function t_(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var i=0;i<s.length;i++){var c=s[i],f=c.getSnapshot;c=c.value;try{if(!xn(f(),c))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;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 ns(e,t,s,i){t&=~Ku,t&=~zs,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var c=t;0<c;){var f=31-vt(c),v=1<<f;i[f]=-1,c&=~v}s!==0&&Ji(e,s,t)}function hr(){return(Xe&6)===0?(Ol(0),!1):!0}function Wu(){if(ze!==null){if(tt===0)var e=ze.return;else e=ze,Sa=ws=null,pu(e),yi=null,gl=0,e=ze;for(;e!==null;)Vp(e.alternate,e),e=e.return;ze=null}}function ji(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,__(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),ka=0,Wu(),lt=e,ze=s=va(e.current,null),He=t,tt=0,An=null,Ja=!1,Ei=se(e,t),Yu=!1,Ci=jn=Ku=zs=Wa=jt=0,vn=Rl=null,Zu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var c=31-vt(i),f=1<<c;t|=e[c],i&=~f}return Da=t,Oo(),s}function cg(e,t){Re=null,z.H=El,t===gi||t===Go?(t=Cm(),tt=3):t===au?(t=Cm(),tt=4):tt=t===ku?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,An=t,ze===null&&(jt=1,nr(e,Un(t,e.current)))}function ug(){var e=En.current;return e===null?!0:(He&4194048)===He?Hn===null:(He&62914560)===He||(He&536870912)!==0?e===Hn:!1}function dg(){var e=z.H;return z.H=El,e===null?El:e}function fg(){var e=z.A;return z.A=WS,e}function mr(){jt=4,Ja||(He&4194048)!==He&&En.current!==null||(Ei=!0),(Wa&134217727)===0&&(zs&134217727)===0||lt===null||ns(lt,He,jn,!1)}function ed(e,t,s){var i=Xe;Xe|=2;var c=dg(),f=fg();(lt!==e||He!==t)&&(fr=null,ji(e,t)),t=!1;var v=jt;e:do try{if(tt!==0&&ze!==null){var _=ze,E=An;switch(tt){case 8:Wu(),v=6;break e;case 3:case 2:case 9:case 6:En.current===null&&(t=!0);var O=tt;if(tt=0,An=null,Ni(e,_,E,O),s&&Ei){v=0;break e}break;default:O=tt,tt=0,An=null,Ni(e,_,E,O)}}n_(),v=jt;break}catch(P){cg(e,P)}while(!0);return t&&e.shellSuspendCounter++,Sa=ws=null,Xe=i,z.H=c,z.A=f,ze===null&&(lt=null,He=0,Oo()),v}function n_(){for(;ze!==null;)hg(ze)}function a_(e,t){var s=Xe;Xe|=2;var i=dg(),c=fg();lt!==e||He!==t?(fr=null,dr=de()+500,ji(e,t)):Ei=se(e,t);e:do try{if(tt!==0&&ze!==null){t=ze;var f=An;t:switch(tt){case 1:tt=0,An=null,Ni(e,t,f,1);break;case 2:case 9:if(Tm(f)){tt=0,An=null,mg(t);break}t=function(){tt!==2&&tt!==9||lt!==e||(tt=7),la(e)},f.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:Tm(f)?(tt=0,An=null,mg(t)):(tt=0,An=null,Ni(e,t,f,7));break;case 5:var v=null;switch(ze.tag){case 26:v=ze.memoizedState;case 5:case 27:var _=ze;if(v?Wg(v):_.stateNode.complete){tt=0,An=null;var E=_.sibling;if(E!==null)ze=E;else{var O=_.return;O!==null?(ze=O,pr(O)):ze=null}break t}}tt=0,An=null,Ni(e,t,f,5);break;case 6:tt=0,An=null,Ni(e,t,f,6);break;case 8:Wu(),jt=6;break e;default:throw Error(o(462))}}s_();break}catch(P){cg(e,P)}while(!0);return Sa=ws=null,z.H=i,z.A=c,Xe=s,ze!==null?0:(lt=null,He=0,Oo(),jt)}function s_(){for(;ze!==null&&!ie();)hg(ze)}function hg(e){var t=Up(e.alternate,e,Da);e.memoizedProps=e.pendingProps,t===null?pr(e):ze=t}function mg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=kp(s,t,t.pendingProps,t.type,void 0,He);break;case 11:t=kp(s,t,t.pendingProps,t.type.render,t.ref,He);break;case 5:pu(t);default:Vp(s,t),t=ze=fm(t,Da),t=Up(s,t,Da)}e.memoizedProps=e.pendingProps,t===null?pr(e):ze=t}function Ni(e,t,s,i){Sa=ws=null,pu(t),yi=null,gl=0;var c=t.return;try{if($S(e,c,t,s,He)){jt=1,nr(e,Un(s,e.current)),ze=null;return}}catch(f){if(c!==null)throw ze=c,f;jt=1,nr(e,Un(s,e.current)),ze=null;return}t.flags&32768?(Pe||i===1?e=!0:Ei||(He&536870912)!==0?e=!1:(Ja=e=!0,(i===2||i===9||i===3||i===6)&&(i=En.current,i!==null&&i.tag===13&&(i.flags|=16384))),pg(t,e)):pr(t)}function pr(e){var t=e;do{if((t.flags&32768)!==0){pg(t,Ja);return}e=t.return;var s=ZS(t.alternate,t,Da);if(s!==null){ze=s;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);jt===0&&(jt=5)}function pg(e,t){do{var s=XS(e.alternate,e);if(s!==null){s.flags&=32767,ze=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){ze=e;return}ze=e=s}while(e!==null);jt=6,ze=null}function gg(e,t,s,i,c,f,v,_,E){e.cancelPendingCommit=null;do gr();while(qt!==0);if((Xe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(f=t.lanes|t.childLanes,f|=Gc,_o(e,s,f,v,_,E),e===lt&&(ze=lt=null,He=0),Ai=t,ts=e,ka=s,Xu=f,Qu=c,ig=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,r_(Le,function(){return _g(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=z.T,z.T=null,c=Y.p,Y.p=2,v=Xe,Xe|=4;try{QS(e,t,s)}finally{Xe=v,Y.p=c,z.T=i}}qt=1,yg(),vg(),bg()}}function yg(){if(qt===1){qt=0;var e=ts,t=Ai,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=z.T,z.T=null;var i=Y.p;Y.p=2;var c=Xe;Xe|=4;try{Qp(t,e);var f=fd,v=am(e.containerInfo),_=f.focusedElem,E=f.selectionRange;if(v!==_&&_&&_.ownerDocument&&nm(_.ownerDocument.documentElement,_)){if(E!==null&&Uc(_)){var O=E.start,P=E.end;if(P===void 0&&(P=O),"selectionStart"in _)_.selectionStart=O,_.selectionEnd=Math.min(P,_.value.length);else{var K=_.ownerDocument||document,U=K&&K.defaultView||window;if(U.getSelection){var V=U.getSelection(),ue=_.textContent.length,Se=Math.min(E.start,ue),it=E.end===void 0?Se:Math.min(E.end,ue);!V.extend&&Se>it&&(v=it,it=Se,Se=v);var k=tm(_,Se),w=tm(_,it);if(k&&w&&(V.rangeCount!==1||V.anchorNode!==k.node||V.anchorOffset!==k.offset||V.focusNode!==w.node||V.focusOffset!==w.offset)){var M=K.createRange();M.setStart(k.node,k.offset),V.removeAllRanges(),Se>it?(V.addRange(M),V.extend(w.node,w.offset)):(M.setEnd(w.node,w.offset),V.addRange(M))}}}}for(K=[],V=_;V=V.parentNode;)V.nodeType===1&&K.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<K.length;_++){var $=K[_];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}Nr=!!dd,fd=dd=null}finally{Xe=c,Y.p=i,z.T=s}}e.current=t,qt=2}}function vg(){if(qt===2){qt=0;var e=ts,t=Ai,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=z.T,z.T=null;var i=Y.p;Y.p=2;var c=Xe;Xe|=4;try{$p(e,t.alternate,t)}finally{Xe=c,Y.p=i,z.T=s}}qt=3}}function bg(){if(qt===4||qt===3){qt=0,ce();var e=ts,t=Ai,s=ka,i=ig;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?qt=5:(qt=0,Ai=ts=null,Sg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(es=null),Js(s),t=t.stateNode,Et&&typeof Et.onCommitFiberRoot=="function")try{Et.onCommitFiberRoot(rt,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=z.T,c=Y.p,Y.p=2,z.T=null;try{for(var f=e.onRecoverableError,v=0;v<i.length;v++){var _=i[v];f(_.value,{componentStack:_.stack})}}finally{z.T=t,Y.p=c}}(ka&3)!==0&&gr(),la(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===Ju?Ml++:(Ml=0,Ju=e):Ml=0,Ol(0)}}function Sg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ml(t)))}function gr(){return yg(),vg(),bg(),_g()}function _g(){if(qt!==5)return!1;var e=ts,t=Xu;Xu=0;var s=Js(ka),i=z.T,c=Y.p;try{Y.p=32>s?32:s,z.T=null,s=Qu,Qu=null;var f=ts,v=ka;if(qt=0,Ai=ts=null,ka=0,(Xe&6)!==0)throw Error(o(331));var _=Xe;if(Xe|=4,ng(f.current),Wp(f,f.current,v,s),Xe=_,Ol(0,!1),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(rt,f)}catch{}return!0}finally{Y.p=c,z.T=i,Sg(e,t)}}function xg(e,t,s){t=Un(s,t),t=Du(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(Ia(e,2),la(e))}function nt(e,t,s){if(e.tag===3)xg(e,e,s);else for(;t!==null;){if(t.tag===3){xg(t,e,s);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(es===null||!es.has(i))){e=Un(s,e),s=Tp(2),i=Ka(t,s,2),i!==null&&(Ep(s,i,t,e),Ia(i,2),la(i));break}}t=t.return}}function td(e,t,s){var i=e.pingCache;if(i===null){i=e.pingCache=new e_;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(s)||(Yu=!0,c.add(s),e=i_.bind(null,e,t,s),t.then(e,e))}function i_(e,t,s){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,lt===e&&(He&s)===s&&(jt===4||jt===3&&(He&62914560)===He&&300>de()-ur?(Xe&2)===0&&ji(e,0):Ku|=s,Ci===He&&(Ci=0)),la(e)}function Tg(e,t){t===0&&(t=Mn()),e=As(e,t),e!==null&&(Ia(e,t),la(e))}function l_(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Tg(e,s)}function o_(e,t){var s=0;switch(e.tag){case 31:case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(s=c.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),Tg(e,s)}function r_(e,t){return Xn(e,t)}var yr=null,wi=null,nd=!1,vr=!1,ad=!1,as=0;function la(e){e!==wi&&e.next===null&&(wi===null?yr=wi=e:wi=wi.next=e),vr=!0,nd||(nd=!0,u_())}function Ol(e,t){if(!ad&&vr){ad=!0;do for(var s=!1,i=yr;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var f=0;else{var v=i.suspendedLanes,_=i.pingedLanes;f=(1<<31-vt(42|e)+1)-1,f&=c&~(v&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,jg(i,f))}else f=He,f=le(i,i===lt?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(f&3)===0||se(i,f)||(s=!0,jg(i,f));i=i.next}while(s);ad=!1}}function c_(){Eg()}function Eg(){vr=nd=!1;var e=0;as!==0&&S_()&&(e=as);for(var t=de(),s=null,i=yr;i!==null;){var c=i.next,f=Cg(i,t);f===0?(i.next=null,s===null?yr=c:s.next=c,c===null&&(wi=s)):(s=i,(e!==0||(f&3)!==0)&&(vr=!0)),i=c}qt!==0&&qt!==5||Ol(e),as!==0&&(as=0)}function Cg(e,t){for(var s=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-vt(f),_=1<<v,E=c[v];E===-1?((_&s)===0||(_&i)!==0)&&(c[v]=Ct(_,t)):E<=t&&(e.expiredLanes|=_),f&=~_}if(t=lt,s=He,s=le(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,s===0||e===t&&(tt===2||tt===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Z(i),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||se(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(i!==null&&Z(i),Js(s)){case 2:case 8:s=et;break;case 32:s=Le;break;case 268435456:s=Dt;break;default:s=Le}return i=Ag.bind(null,e),s=Xn(s,i),e.callbackPriority=t,e.callbackNode=s,t}return i!==null&&i!==null&&Z(i),e.callbackPriority=2,e.callbackNode=null,2}function Ag(e,t){if(qt!==0&&qt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(gr()&&e.callbackNode!==s)return null;var i=He;return i=le(e,e===lt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(og(e,i,t),Cg(e,de()),e.callbackNode!=null&&e.callbackNode===s?Ag.bind(null,e):null)}function jg(e,t){if(gr())return null;og(e,t,!0)}function u_(){x_(function(){(Xe&6)!==0?Xn(Ee,c_):Eg()})}function sd(){if(as===0){var e=mi;e===0&&(e=ae,ae<<=1,(ae&261888)===0&&(ae=256)),as=e}return as}function Ng(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ao(""+e)}function wg(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function d_(e,t,s,i,c){if(t==="submit"&&s&&s.stateNode===c){var f=Ng((c[Zt]||null).action),v=i.submitter;v&&(t=(t=v[Zt]||null)?Ng(t.formAction):v.getAttribute("formAction"),t!==null&&(f=t,v=null));var _=new Do("action","action",null,i,c);e.push({event:_,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(as!==0){var E=v?wg(c,v):new FormData(c);Eu(s,{pending:!0,data:E,method:c.method,action:f},null,E)}}else typeof f=="function"&&(_.preventDefault(),E=v?wg(c,v):new FormData(c),Eu(s,{pending:!0,data:E,method:c.method,action:f},f,E))},currentTarget:c}]})}}for(var id=0;id<Hc.length;id++){var ld=Hc[id],f_=ld.toLowerCase(),h_=ld[0].toUpperCase()+ld.slice(1);Jn(f_,"on"+h_)}Jn(lm,"onAnimationEnd"),Jn(om,"onAnimationIteration"),Jn(rm,"onAnimationStart"),Jn("dblclick","onDoubleClick"),Jn("focusin","onFocus"),Jn("focusout","onBlur"),Jn(wS,"onTransitionRun"),Jn(DS,"onTransitionStart"),Jn(kS,"onTransitionCancel"),Jn(cm,"onTransitionEnd"),ei("onMouseEnter",["mouseout","mouseover"]),ei("onMouseLeave",["mouseout","mouseover"]),ei("onPointerEnter",["pointerout","pointerover"]),ei("onPointerLeave",["pointerout","pointerover"]),xs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xs("onBeforeInput",["compositionend","keypress","textInput","paste"]),xs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bl="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(" "),m_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bl));function Dg(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var i=e[s],c=i.event;i=i.listeners;e:{var f=void 0;if(t)for(var v=i.length-1;0<=v;v--){var _=i[v],E=_.instance,O=_.currentTarget;if(_=_.listener,E!==f&&c.isPropagationStopped())break e;f=_,c.currentTarget=O;try{f(c)}catch(P){Mo(P)}c.currentTarget=null,f=E}else for(v=0;v<i.length;v++){if(_=i[v],E=_.instance,O=_.currentTarget,_=_.listener,E!==f&&c.isPropagationStopped())break e;f=_,c.currentTarget=O;try{f(c)}catch(P){Mo(P)}c.currentTarget=null,f=E}}}}function Ve(e,t){var s=t[Ws];s===void 0&&(s=t[Ws]=new Set);var i=e+"__bubble";s.has(i)||(kg(t,e,2,!1),s.add(i))}function od(e,t,s){var i=0;t&&(i|=4),kg(s,e,i,t)}var br="_reactListening"+Math.random().toString(36).slice(2);function rd(e){if(!e[br]){e[br]=!0,Eh.forEach(function(s){s!=="selectionchange"&&(m_.has(s)||od(s,!1,e),od(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[br]||(t[br]=!0,od("selectionchange",!1,t))}}function kg(e,t,s,i){switch(ly(t)){case 2:var c=G_;break;case 8:c=P_;break;default:c=Td}s=c.bind(null,t,s,e),c=void 0,!Nc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function cd(e,t,s,i,c){var f=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var v=i.tag;if(v===3||v===4){var _=i.stateNode.containerInfo;if(_===c)break;if(v===4)for(v=i.return;v!==null;){var E=v.tag;if((E===3||E===4)&&v.stateNode.containerInfo===c)return;v=v.return}for(;_!==null;){if(v=sn(_),v===null)return;if(E=v.tag,E===5||E===6||E===26||E===27){i=f=v;continue e}_=_.parentNode}}i=i.return}Lh(function(){var O=f,P=Ac(s),K=[];e:{var U=um.get(e);if(U!==void 0){var V=Do,ue=e;switch(e){case"keypress":if(No(s)===0)break e;case"keydown":case"keyup":V=oS;break;case"focusin":ue="focus",V=Rc;break;case"focusout":ue="blur",V=Rc;break;case"beforeblur":case"afterblur":V=Rc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Vh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Z1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=uS;break;case lm:case om:case rm:V=J1;break;case cm:V=fS;break;case"scroll":case"scrollend":V=Y1;break;case"wheel":V=mS;break;case"copy":case"cut":case"paste":V=eS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Hh;break;case"toggle":case"beforetoggle":V=gS}var Se=(t&4)!==0,it=!Se&&(e==="scroll"||e==="scrollend"),k=Se?U!==null?U+"Capture":null:U;Se=[];for(var w=O,M;w!==null;){var $=w;if(M=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||M===null||k===null||($=al(w,k),$!=null&&Se.push(Ll(w,$,M))),it)break;w=w.return}0<Se.length&&(U=new V(U,ue,null,s,P),K.push({event:U,listeners:Se}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",U&&s!==Cc&&(ue=s.relatedTarget||s.fromElement)&&(sn(ue)||ue[ma]))break e;if((V||U)&&(U=P.window===P?P:(U=P.ownerDocument)?U.defaultView||U.parentWindow:window,V?(ue=s.relatedTarget||s.toElement,V=O,ue=ue?sn(ue):null,ue!==null&&(it=u(ue),Se=ue.tag,ue!==it||Se!==5&&Se!==27&&Se!==6)&&(ue=null)):(V=null,ue=O),V!==ue)){if(Se=Vh,$="onMouseLeave",k="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(Se=Hh,$="onPointerLeave",k="onPointerEnter",w="pointer"),it=V==null?U:bt(V),M=ue==null?U:bt(ue),U=new Se($,w+"leave",V,s,P),U.target=it,U.relatedTarget=M,$=null,sn(P)===O&&(Se=new Se(k,w+"enter",ue,s,P),Se.target=M,Se.relatedTarget=it,$=Se),it=$,V&&ue)t:{for(Se=p_,k=V,w=ue,M=0,$=k;$;$=Se($))M++;$=0;for(var ye=w;ye;ye=Se(ye))$++;for(;0<M-$;)k=Se(k),M--;for(;0<$-M;)w=Se(w),$--;for(;M--;){if(k===w||w!==null&&k===w.alternate){Se=k;break t}k=Se(k),w=Se(w)}Se=null}else Se=null;V!==null&&Rg(K,U,V,Se,!1),ue!==null&&it!==null&&Rg(K,it,ue,Se,!0)}}e:{if(U=O?bt(O):window,V=U.nodeName&&U.nodeName.toLowerCase(),V==="select"||V==="input"&&U.type==="file")var Ye=Zh;else if(Yh(U))if(Xh)Ye=AS;else{Ye=ES;var me=TS}else V=U.nodeName,!V||V.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?O&&Ec(O.elementType)&&(Ye=Zh):Ye=CS;if(Ye&&(Ye=Ye(e,O))){Kh(K,Ye,s,P);break e}me&&me(e,U,O),e==="focusout"&&O&&U.type==="number"&&O.memoizedProps.value!=null&&Tc(U,"number",U.value)}switch(me=O?bt(O):window,e){case"focusin":(Yh(me)||me.contentEditable==="true")&&(li=me,zc=O,dl=null);break;case"focusout":dl=zc=li=null;break;case"mousedown":Vc=!0;break;case"contextmenu":case"mouseup":case"dragend":Vc=!1,sm(K,s,P);break;case"selectionchange":if(NS)break;case"keydown":case"keyup":sm(K,s,P)}var Oe;if(Oc)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else ii?Fh(e,s)&&(Ge="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Ge="onCompositionStart");Ge&&(Gh&&s.locale!=="ko"&&(ii||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&ii&&(Oe=Uh()):(Ha=P,wc="value"in Ha?Ha.value:Ha.textContent,ii=!0)),me=Sr(O,Ge),0<me.length&&(Ge=new Ih(Ge,e,null,s,P),K.push({event:Ge,listeners:me}),Oe?Ge.data=Oe:(Oe=$h(s),Oe!==null&&(Ge.data=Oe)))),(Oe=vS?bS(e,s):SS(e,s))&&(Ge=Sr(O,"onBeforeInput"),0<Ge.length&&(me=new Ih("onBeforeInput","beforeinput",null,s,P),K.push({event:me,listeners:Ge}),me.data=Oe)),d_(K,e,O,s,P)}Dg(K,t)})}function Ll(e,t,s){return{instance:e,listener:t,currentTarget:s}}function Sr(e,t){for(var s=t+"Capture",i=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=al(e,s),c!=null&&i.unshift(Ll(e,c,f)),c=al(e,t),c!=null&&i.push(Ll(e,c,f))),e.tag===3)return i;e=e.return}return[]}function p_(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,s,i,c){for(var f=t._reactName,v=[];s!==null&&s!==i;){var _=s,E=_.alternate,O=_.stateNode;if(_=_.tag,E!==null&&E===i)break;_!==5&&_!==26&&_!==27||O===null||(E=O,c?(O=al(s,f),O!=null&&v.unshift(Ll(s,O,E))):c||(O=al(s,f),O!=null&&v.push(Ll(s,O,E)))),s=s.return}v.length!==0&&e.push({event:t,listeners:v})}var g_=/\r\n?/g,y_=/\u0000|\uFFFD/g;function Mg(e){return(typeof e=="string"?e:""+e).replace(g_,`
|
|
25
|
-
`).replace(y_,"")}function Og(e,t){return t=Mg(t),Mg(e)===t}function st(e,t,s,i,c,f){switch(s){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||ni(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&ni(e,""+i);break;case"className":Eo(e,"class",i);break;case"tabIndex":Eo(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Eo(e,s,i);break;case"style":Oh(e,i,f);break;case"data":if(t!=="object"){Eo(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(s);break}i=Ao(""+i),e.setAttribute(s,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(s,"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 f=="function"&&(s==="formAction"?(t!=="input"&&st(e,t,"name",c.name,c,null),st(e,t,"formEncType",c.formEncType,c,null),st(e,t,"formMethod",c.formMethod,c,null),st(e,t,"formTarget",c.formTarget,c,null)):(st(e,t,"encType",c.encType,c,null),st(e,t,"method",c.method,c,null),st(e,t,"target",c.target,c,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(s);break}i=Ao(""+i),e.setAttribute(s,i);break;case"onClick":i!=null&&(e.onclick=ga);break;case"onScroll":i!=null&&Ve("scroll",e);break;case"onScrollEnd":i!=null&&Ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(s=i.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}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}s=Ao(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);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(s,""+i):e.removeAttribute(s);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(s,""):e.removeAttribute(s);break;case"capture":case"download":i===!0?e.setAttribute(s,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(s,i):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(s,i):e.removeAttribute(s);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(s):e.setAttribute(s,i);break;case"popover":Ve("beforetoggle",e),Ve("toggle",e),To(e,"popover",i);break;case"xlinkActuate":pa(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":pa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":pa(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":pa(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":pa(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":pa(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":pa(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":pa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":pa(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":To(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=F1.get(s)||s,To(e,s,i))}}function ud(e,t,s,i,c,f){switch(s){case"style":Oh(e,i,f);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(s=i.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"children":typeof i=="string"?ni(e,i):(typeof i=="number"||typeof i=="bigint")&&ni(e,""+i);break;case"onScroll":i!=null&&Ve("scroll",e);break;case"onScrollEnd":i!=null&&Ve("scrollend",e);break;case"onClick":i!=null&&(e.onclick=ga);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ch.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),t=s.slice(2,c?s.length-7:void 0),f=e[Zt]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof i=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,i,c);break e}s in e?e[s]=i:i===!0?e.setAttribute(s,""):To(e,s,i)}}}function en(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",e),Ve("load",e);var i=!1,c=!1,f;for(f in s)if(s.hasOwnProperty(f)){var v=s[f];if(v!=null)switch(f){case"src":i=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,f,v,s,null)}}c&&st(e,t,"srcSet",s.srcSet,s,null),i&&st(e,t,"src",s.src,s,null);return;case"input":Ve("invalid",e);var _=f=v=c=null,E=null,O=null;for(i in s)if(s.hasOwnProperty(i)){var P=s[i];if(P!=null)switch(i){case"name":c=P;break;case"type":v=P;break;case"checked":E=P;break;case"defaultChecked":O=P;break;case"value":f=P;break;case"defaultValue":_=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:st(e,t,i,P,s,null)}}Dh(e,f,_,E,O,v,c,!1);return;case"select":Ve("invalid",e),i=v=f=null;for(c in s)if(s.hasOwnProperty(c)&&(_=s[c],_!=null))switch(c){case"value":f=_;break;case"defaultValue":v=_;break;case"multiple":i=_;default:st(e,t,c,_,s,null)}t=f,s=v,e.multiple=!!i,t!=null?ti(e,!!i,t,!1):s!=null&&ti(e,!!i,s,!0);return;case"textarea":Ve("invalid",e),f=c=i=null;for(v in s)if(s.hasOwnProperty(v)&&(_=s[v],_!=null))switch(v){case"value":i=_;break;case"defaultValue":c=_;break;case"children":f=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(91));break;default:st(e,t,v,_,s,null)}Rh(e,i,c,f);return;case"option":for(E in s)if(s.hasOwnProperty(E)&&(i=s[E],i!=null))switch(E){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:st(e,t,E,i,s,null)}return;case"dialog":Ve("beforetoggle",e),Ve("toggle",e),Ve("cancel",e),Ve("close",e);break;case"iframe":case"object":Ve("load",e);break;case"video":case"audio":for(i=0;i<Bl.length;i++)Ve(Bl[i],e);break;case"image":Ve("error",e),Ve("load",e);break;case"details":Ve("toggle",e);break;case"embed":case"source":case"link":Ve("error",e),Ve("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(O in s)if(s.hasOwnProperty(O)&&(i=s[O],i!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,O,i,s,null)}return;default:if(Ec(t)){for(P in s)s.hasOwnProperty(P)&&(i=s[P],i!==void 0&&ud(e,t,P,i,s,void 0));return}}for(_ in s)s.hasOwnProperty(_)&&(i=s[_],i!=null&&st(e,t,_,i,s,null))}function v_(e,t,s,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,v=null,_=null,E=null,O=null,P=null;for(V in s){var K=s[V];if(s.hasOwnProperty(V)&&K!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":E=K;default:i.hasOwnProperty(V)||st(e,t,V,null,i,K)}}for(var U in i){var V=i[U];if(K=s[U],i.hasOwnProperty(U)&&(V!=null||K!=null))switch(U){case"type":f=V;break;case"name":c=V;break;case"checked":O=V;break;case"defaultChecked":P=V;break;case"value":v=V;break;case"defaultValue":_=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:V!==K&&st(e,t,U,V,i,K)}}xc(e,v,_,E,O,P,f,c);return;case"select":V=v=_=U=null;for(f in s)if(E=s[f],s.hasOwnProperty(f)&&E!=null)switch(f){case"value":break;case"multiple":V=E;default:i.hasOwnProperty(f)||st(e,t,f,null,i,E)}for(c in i)if(f=i[c],E=s[c],i.hasOwnProperty(c)&&(f!=null||E!=null))switch(c){case"value":U=f;break;case"defaultValue":_=f;break;case"multiple":v=f;default:f!==E&&st(e,t,c,f,i,E)}t=_,s=v,i=V,U!=null?ti(e,!!s,U,!1):!!i!=!!s&&(t!=null?ti(e,!!s,t,!0):ti(e,!!s,s?[]:"",!1));return;case"textarea":V=U=null;for(_ in s)if(c=s[_],s.hasOwnProperty(_)&&c!=null&&!i.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:st(e,t,_,null,i,c)}for(v in i)if(c=i[v],f=s[v],i.hasOwnProperty(v)&&(c!=null||f!=null))switch(v){case"value":U=c;break;case"defaultValue":V=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==f&&st(e,t,v,c,i,f)}kh(e,U,V);return;case"option":for(var ue in s)if(U=s[ue],s.hasOwnProperty(ue)&&U!=null&&!i.hasOwnProperty(ue))switch(ue){case"selected":e.selected=!1;break;default:st(e,t,ue,null,i,U)}for(E in i)if(U=i[E],V=s[E],i.hasOwnProperty(E)&&U!==V&&(U!=null||V!=null))switch(E){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:st(e,t,E,U,i,V)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Se in s)U=s[Se],s.hasOwnProperty(Se)&&U!=null&&!i.hasOwnProperty(Se)&&st(e,t,Se,null,i,U);for(O in i)if(U=i[O],V=s[O],i.hasOwnProperty(O)&&U!==V&&(U!=null||V!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(137,t));break;default:st(e,t,O,U,i,V)}return;default:if(Ec(t)){for(var it in s)U=s[it],s.hasOwnProperty(it)&&U!==void 0&&!i.hasOwnProperty(it)&&ud(e,t,it,void 0,i,U);for(P in i)U=i[P],V=s[P],!i.hasOwnProperty(P)||U===V||U===void 0&&V===void 0||ud(e,t,P,U,i,V);return}}for(var k in s)U=s[k],s.hasOwnProperty(k)&&U!=null&&!i.hasOwnProperty(k)&&st(e,t,k,null,i,U);for(K in i)U=i[K],V=s[K],!i.hasOwnProperty(K)||U===V||U==null&&V==null||st(e,t,K,U,i,V)}function Bg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function b_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),i=0;i<s.length;i++){var c=s[i],f=c.transferSize,v=c.initiatorType,_=c.duration;if(f&&_&&Bg(v)){for(v=0,_=c.responseEnd,i+=1;i<s.length;i++){var E=s[i],O=E.startTime;if(O>_)break;var P=E.transferSize,K=E.initiatorType;P&&Bg(K)&&(E=E.responseEnd,v+=P*(E<_?1:(_-O)/(E-O)))}if(--i,t+=8*(f+v)/(c.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 dd=null,fd=null;function _r(e){return e.nodeType===9?e:e.ownerDocument}function Lg(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 Ug(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 hd(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 md=null;function S_(){var e=window.event;return e&&e.type==="popstate"?e===md?!1:(md=e,!0):(md=null,!1)}var zg=typeof setTimeout=="function"?setTimeout:void 0,__=typeof clearTimeout=="function"?clearTimeout:void 0,Vg=typeof Promise=="function"?Promise:void 0,x_=typeof queueMicrotask=="function"?queueMicrotask:typeof Vg<"u"?function(e){return Vg.resolve(null).then(e).catch(T_)}:zg;function T_(e){setTimeout(function(){throw e})}function ss(e){return e==="head"}function Ig(e,t){var s=t,i=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"||s==="/&"){if(i===0){e.removeChild(c),Mi(t);return}i--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")i++;else if(s==="html")Ul(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Ul(s);for(var f=s.firstChild;f;){var v=f.nextSibling,_=f.nodeName;f[Be]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=v}}else s==="body"&&Ul(e.ownerDocument.body);s=c}while(s);Mi(t)}function Hg(e,t){var s=e;e=0;do{var i=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),i&&i.nodeType===8)if(s=i.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=i}while(s)}function pd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":pd(s),Ie(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function E_(e,t,s,i){for(;e.nodeType===1;){var c=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Be])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Gn(e.nextSibling),e===null)break}return null}function C_(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Gn(e.nextSibling),e===null))return null;return e}function Gg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Gn(e.nextSibling),e===null))return null;return e}function gd(e){return e.data==="$?"||e.data==="$~"}function yd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function A_(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var i=function(){t(),s.removeEventListener("DOMContentLoaded",i)};s.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Gn(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 vd=null;function Pg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return Gn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function qg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function Fg(e,t,s){switch(t=_r(s),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 Ul(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ie(e)}var Pn=new Map,$g=new Set;function xr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ra=Y.d;Y.d={f:j_,r:N_,D:w_,C:D_,L:k_,m:R_,X:O_,S:M_,M:B_};function j_(){var e=Ra.f(),t=hr();return e||t}function N_(e){var t=Xt(e);t!==null&&t.tag===5&&t.type==="form"?cp(t):Ra.r(e)}var Di=typeof document>"u"?null:document;function Yg(e,t,s){var i=Di;if(i&&typeof t=="string"&&t){var c=Bn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),$g.has(c)||($g.add(c),e={rel:e,crossOrigin:s,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),en(t,"link",e),mt(t),i.head.appendChild(t)))}}function w_(e){Ra.D(e),Yg("dns-prefetch",e,null)}function D_(e,t){Ra.C(e,t),Yg("preconnect",e,t)}function k_(e,t,s){Ra.L(e,t,s);var i=Di;if(i&&e&&t){var c='link[rel="preload"][as="'+Bn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+Bn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+Bn(s.imageSizes)+'"]')):c+='[href="'+Bn(e)+'"]';var f=c;switch(t){case"style":f=ki(e);break;case"script":f=Ri(e)}Pn.has(f)||(e=b({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),Pn.set(f,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(zl(f))||t==="script"&&i.querySelector(Vl(f))||(t=i.createElement("link"),en(t,"link",e),mt(t),i.head.appendChild(t)))}}function R_(e,t){Ra.m(e,t);var s=Di;if(s&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Bn(i)+'"][href="'+Bn(e)+'"]',f=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ri(e)}if(!Pn.has(f)&&(e=b({rel:"modulepreload",href:e},t),Pn.set(f,e),s.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Vl(f)))return}i=s.createElement("link"),en(i,"link",e),mt(i),s.head.appendChild(i)}}}function M_(e,t,s){Ra.S(e,t,s);var i=Di;if(i&&e){var c=ht(i).hoistableStyles,f=ki(e);t=t||"default";var v=c.get(f);if(!v){var _={loading:0,preload:null};if(v=i.querySelector(zl(f)))_.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},s),(s=Pn.get(f))&&bd(e,s);var E=v=i.createElement("link");mt(E),en(E,"link",e),E._p=new Promise(function(O,P){E.onload=O,E.onerror=P}),E.addEventListener("load",function(){_.loading|=1}),E.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Tr(v,t,i)}v={type:"stylesheet",instance:v,count:1,state:_},c.set(f,v)}}}function O_(e,t){Ra.X(e,t);var s=Di;if(s&&e){var i=ht(s).hoistableScripts,c=Ri(e),f=i.get(c);f||(f=s.querySelector(Vl(c)),f||(e=b({src:e,async:!0},t),(t=Pn.get(c))&&Sd(e,t),f=s.createElement("script"),mt(f),en(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function B_(e,t){Ra.M(e,t);var s=Di;if(s&&e){var i=ht(s).hoistableScripts,c=Ri(e),f=i.get(c);f||(f=s.querySelector(Vl(c)),f||(e=b({src:e,async:!0,type:"module"},t),(t=Pn.get(c))&&Sd(e,t),f=s.createElement("script"),mt(f),en(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function Kg(e,t,s,i){var c=(c=q.current)?xr(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=ki(s.href),s=ht(c).hoistableStyles,i=s.get(t),i||(i={type:"style",instance:null,count:0,state:null},s.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=ki(s.href);var f=ht(c).hoistableStyles,v=f.get(e);if(v||(c=c.ownerDocument||c,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,v),(f=c.querySelector(zl(e)))&&!f._p&&(v.instance=f,v.state.loading=5),Pn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Pn.set(e,s),f||L_(c,e,s,v.state))),t&&i===null)throw Error(o(528,""));return v}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ri(s),s=ht(c).hoistableScripts,i=s.get(t),i||(i={type:"script",instance:null,count:0,state:null},s.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ki(e){return'href="'+Bn(e)+'"'}function zl(e){return'link[rel="stylesheet"]['+e+"]"}function Zg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function L_(e,t,s,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}),en(t,"link",s),mt(t),e.head.appendChild(t))}function Ri(e){return'[src="'+Bn(e)+'"]'}function Vl(e){return"script[async]"+e}function Xg(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Bn(s.href)+'"]');if(i)return t.instance=i,mt(i),i;var c=b({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),mt(i),en(i,"style",c),Tr(i,s.precedence,e),t.instance=i;case"stylesheet":c=ki(s.href);var f=e.querySelector(zl(c));if(f)return t.state.loading|=4,t.instance=f,mt(f),f;i=Zg(s),(c=Pn.get(c))&&bd(i,c),f=(e.ownerDocument||e).createElement("link"),mt(f);var v=f;return v._p=new Promise(function(_,E){v.onload=_,v.onerror=E}),en(f,"link",i),t.state.loading|=4,Tr(f,s.precedence,e),t.instance=f;case"script":return f=Ri(s.src),(c=e.querySelector(Vl(f)))?(t.instance=c,mt(c),c):(i=s,(c=Pn.get(f))&&(i=b({},s),Sd(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),mt(c),en(c,"link",i),e.head.appendChild(c),t.instance=c);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,Tr(i,s.precedence,e));return t.instance}function Tr(e,t,s){for(var i=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,f=c,v=0;v<i.length;v++){var _=i[v];if(_.dataset.precedence===t)f=_;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function bd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Sd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Er=null;function Qg(e,t,s){if(Er===null){var i=new Map,c=Er=new Map;c.set(s,i)}else c=Er,i=c.get(s),i||(i=new Map,c.set(s,i));if(i.has(e))return i;for(i.set(e,null),s=s.getElementsByTagName(e),c=0;c<s.length;c++){var f=s[c];if(!(f[Be]||f[Ut]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(t)||"";v=e+v;var _=i.get(v);_?_.push(f):i.set(v,[f])}}return i}function Jg(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function U_(e,t,s){if(s===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 z_(e,t,s,i){if(s.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var c=ki(i.href),f=t.querySelector(zl(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Cr.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=f,mt(f);return}f=t.ownerDocument||t,i=Zg(i),(c=Pn.get(c))&&bd(i,c),f=f.createElement("link"),mt(f);var v=f;v._p=new Promise(function(_,E){v.onload=_,v.onerror=E}),en(f,"link",i),s.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=Cr.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var _d=0;function V_(e,t){return e.stylesheets&&e.count===0&&jr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var i=setTimeout(function(){if(e.stylesheets&&jr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&_d===0&&(_d=62500*b_());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&jr(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>_d?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(c)}}:null}function Cr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ar=null;function jr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ar=new Map,t.forEach(I_,e),Ar=null,Cr.call(e))}function I_(e,t){if(!(t.state.loading&4)){var s=Ar.get(e);if(s)var i=s.get(null);else{s=new Map,Ar.set(e,s);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var v=c[f];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(s.set(v.dataset.precedence,v),i=v)}i&&s.set(null,i)}c=t.instance,v=c.getAttribute("data-precedence"),f=s.get(v)||i,f===i&&s.set(null,c),s.set(v,c),this.count++,i=Cr.bind(this),c.addEventListener("load",i),c.addEventListener("error",i),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Il={$$typeof:R,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function H_(e,t,s,i,c,f,v,_,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=Xs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xs(0),this.hiddenUpdates=Xs(null),this.identifierPrefix=i,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function ey(e,t,s,i,c,f,v,_,E,O,P,K){return e=new H_(e,t,s,v,E,O,P,K,_),t=1,f===!0&&(t|=24),f=Tn(3,null,null,t),e.current=f,f.stateNode=e,t=eu(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:i,isDehydrated:s,cache:t},su(f),e}function ty(e){return e?(e=ci,e):ci}function ny(e,t,s,i,c,f){c=ty(c),i.context===null?i.context=c:i.pendingContext=c,i=Ya(t),i.payload={element:s},f=f===void 0?null:f,f!==null&&(i.callback=f),s=Ka(e,i,t),s!==null&&(bn(s,e,t),vl(s,e,t))}function ay(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function xd(e,t){ay(e,t),(e=e.alternate)&&ay(e,t)}function sy(e){if(e.tag===13||e.tag===31){var t=As(e,67108864);t!==null&&bn(t,e,67108864),xd(e,67108864)}}function iy(e){if(e.tag===13||e.tag===31){var t=Nn();t=Qs(t);var s=As(e,t);s!==null&&bn(s,e,t),xd(e,t)}}var Nr=!0;function G_(e,t,s,i){var c=z.T;z.T=null;var f=Y.p;try{Y.p=2,Td(e,t,s,i)}finally{Y.p=f,z.T=c}}function P_(e,t,s,i){var c=z.T;z.T=null;var f=Y.p;try{Y.p=8,Td(e,t,s,i)}finally{Y.p=f,z.T=c}}function Td(e,t,s,i){if(Nr){var c=Ed(i);if(c===null)cd(e,t,i,wr,s),oy(e,i);else if(F_(c,e,t,s,i))i.stopPropagation();else if(oy(e,i),t&4&&-1<q_.indexOf(e)){for(;c!==null;){var f=Xt(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=re(f.pendingLanes);if(v!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;v;){var E=1<<31-vt(v);_.entanglements[1]|=E,v&=~E}la(f),(Xe&6)===0&&(dr=de()+500,Ol(0))}}break;case 31:case 13:_=As(f,2),_!==null&&bn(_,f,2),hr(),xd(f,2)}if(f=Ed(i),f===null&&cd(e,t,i,wr,s),f===c)break;c=f}c!==null&&i.stopPropagation()}else cd(e,t,i,null,s)}}function Ed(e){return e=Ac(e),Cd(e)}var wr=null;function Cd(e){if(wr=null,e=sn(e),e!==null){var t=u(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=d(t),e!==null)return e;e=null}else if(s===31){if(e=m(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wr=e,null}function ly(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(Te()){case Ee:return 2;case et:return 8;case Le:case ot:return 32;case Dt:return 268435456;default:return 32}default:return 32}}var Ad=!1,is=null,ls=null,os=null,Hl=new Map,Gl=new Map,rs=[],q_="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 oy(e,t){switch(e){case"focusin":case"focusout":is=null;break;case"dragenter":case"dragleave":ls=null;break;case"mouseover":case"mouseout":os=null;break;case"pointerover":case"pointerout":Hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gl.delete(t.pointerId)}}function Pl(e,t,s,i,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:i,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Xt(t),t!==null&&sy(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function F_(e,t,s,i,c){switch(t){case"focusin":return is=Pl(is,e,t,s,i,c),!0;case"dragenter":return ls=Pl(ls,e,t,s,i,c),!0;case"mouseover":return os=Pl(os,e,t,s,i,c),!0;case"pointerover":var f=c.pointerId;return Hl.set(f,Pl(Hl.get(f)||null,e,t,s,i,c)),!0;case"gotpointercapture":return f=c.pointerId,Gl.set(f,Pl(Gl.get(f)||null,e,t,s,i,c)),!0}return!1}function ry(e){var t=sn(e.target);if(t!==null){var s=u(t);if(s!==null){if(t=s.tag,t===13){if(t=d(s),t!==null){e.blockedOn=t,nl(e.priority,function(){iy(s)});return}}else if(t===31){if(t=m(s),t!==null){e.blockedOn=t,nl(e.priority,function(){iy(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=Ed(e.nativeEvent);if(s===null){s=e.nativeEvent;var i=new s.constructor(s.type,s);Cc=i,s.target.dispatchEvent(i),Cc=null}else return t=Xt(s),t!==null&&sy(t),e.blockedOn=s,!1;t.shift()}return!0}function cy(e,t,s){Dr(e)&&s.delete(t)}function $_(){Ad=!1,is!==null&&Dr(is)&&(is=null),ls!==null&&Dr(ls)&&(ls=null),os!==null&&Dr(os)&&(os=null),Hl.forEach(cy),Gl.forEach(cy)}function kr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ad||(Ad=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,$_)))}var Rr=null;function uy(e){Rr!==e&&(Rr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Rr===e&&(Rr=null);for(var t=0;t<e.length;t+=3){var s=e[t],i=e[t+1],c=e[t+2];if(typeof i!="function"){if(Cd(i||s)===null)continue;break}var f=Xt(s);f!==null&&(e.splice(t,3),t-=3,Eu(f,{pending:!0,data:c,method:s.method,action:i},i,c))}}))}function Mi(e){function t(E){return kr(E,e)}is!==null&&kr(is,e),ls!==null&&kr(ls,e),os!==null&&kr(os,e),Hl.forEach(t),Gl.forEach(t);for(var s=0;s<rs.length;s++){var i=rs[s];i.blockedOn===e&&(i.blockedOn=null)}for(;0<rs.length&&(s=rs[0],s.blockedOn===null);)ry(s),s.blockedOn===null&&rs.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(i=0;i<s.length;i+=3){var c=s[i],f=s[i+1],v=c[Zt]||null;if(typeof f=="function")v||uy(s);else if(v){var _=null;if(f&&f.hasAttribute("formAction")){if(c=f,v=f[Zt]||null)_=v.formAction;else if(Cd(c)!==null)continue}else _=v.action;typeof _=="function"?s[i+1]=_:(s.splice(i,3),i-=3),uy(s)}}}function dy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(v){return c=v})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),i||setTimeout(s,20)}function s(){if(!i&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function jd(e){this._internalRoot=e}Mr.prototype.render=jd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,i=Nn();ny(s,i,e,t,null,null)},Mr.prototype.unmount=jd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ny(e.current,2,null,e,null,null),hr(),t[ma]=null}};function Mr(e){this._internalRoot=e}Mr.prototype.unstable_scheduleHydration=function(e){if(e){var t=tl();e={blockedOn:null,target:e,priority:t};for(var s=0;s<rs.length&&t!==0&&t<rs[s].priority;s++);rs.splice(s,0,e),s===0&&ry(e)}};var fy=a.version;if(fy!=="19.2.4")throw Error(o(527,fy,"19.2.4"));Y.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=g(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var Y_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Or=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Or.isDisabled&&Or.supportsFiber)try{rt=Or.inject(Y_),Et=Or}catch{}}return ql.createRoot=function(e,t){if(!r(e))throw Error(o(299));var s=!1,i="",c=bp,f=Sp,v=_p;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=ey(e,1,!1,null,null,s,i,null,c,f,v,dy),e[ma]=t.current,rd(e),new jd(t)},ql.hydrateRoot=function(e,t,s){if(!r(e))throw Error(o(299));var i=!1,c="",f=bp,v=Sp,_=_p,E=null;return s!=null&&(s.unstable_strictMode===!0&&(i=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(v=s.onCaughtError),s.onRecoverableError!==void 0&&(_=s.onRecoverableError),s.formState!==void 0&&(E=s.formState)),t=ey(e,1,!0,t,s??null,i,c,E,f,v,_,dy),t.context=ty(null),s=t.current,i=Nn(),i=Qs(i),c=Ya(i),c.callback=null,Ka(s,c,i),s=i,t.current.lanes=s,Ia(t,s),la(t),e[ma]=t.current,rd(e),new Mr(t)},ql.version="19.2.4",ql}var by;function cx(){if(by)return Nd.exports;by=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(a){console.error(a)}}return n(),Nd.exports=rx(),Nd.exports}var ux=cx();/**
|
|
26
|
-
* react-router v7.13.1
|
|
27
|
-
*
|
|
28
|
-
* Copyright (c) Remix Software Inc.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the MIT license found in the
|
|
31
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
32
|
-
*
|
|
33
|
-
* @license MIT
|
|
34
|
-
*/var Sy="popstate";function _y(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function dx(n={}){function a(o,r){var g;let u=(g=r.state)==null?void 0:g.masked,{pathname:d,search:m,hash:p}=u||o.location;return Wd("",{pathname:d,search:m,hash:p},r.state&&r.state.usr||null,r.state&&r.state.key||"default",u?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function l(o,r){return typeof r=="string"?r:io(r)}return hx(a,l,null,n)}function dt(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Yn(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function fx(){return Math.random().toString(36).substring(2,10)}function xy(n,a){return{usr:n.state,key:n.key,idx:a,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Wd(n,a,l=null,o,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?$i(a):a,state:l,key:a&&a.key||o||fx(),unstable_mask:r}}function io({pathname:n="/",search:a="",hash:l=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function $i(n){let a={};if(n){let l=n.indexOf("#");l>=0&&(a.hash=n.substring(l),n=n.substring(0,l));let o=n.indexOf("?");o>=0&&(a.search=n.substring(o),n=n.substring(0,o)),n&&(a.pathname=n)}return a}function hx(n,a,l,o={}){let{window:r=document.defaultView,v5Compat:u=!1}=o,d=r.history,m="POP",p=null,g=y();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function y(){return(d.state||{idx:null}).idx}function b(){m="POP";let N=y(),C=N==null?null:N-g;g=N,p&&p({action:m,location:j.location,delta:C})}function x(N,C){m="PUSH";let B=_y(N)?N:Wd(j.location,N,C);g=y()+1;let R=xy(B,g),X=j.createHref(B.unstable_mask||B);try{d.pushState(R,"",X)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;r.location.assign(X)}u&&p&&p({action:m,location:j.location,delta:1})}function T(N,C){m="REPLACE";let B=_y(N)?N:Wd(j.location,N,C);g=y();let R=xy(B,g),X=j.createHref(B.unstable_mask||B);d.replaceState(R,"",X),u&&p&&p({action:m,location:j.location,delta:0})}function A(N){return mx(N)}let j={get action(){return m},get location(){return n(r,d)},listen(N){if(p)throw new Error("A history only accepts one active listener");return r.addEventListener(Sy,b),p=N,()=>{r.removeEventListener(Sy,b),p=null}},createHref(N){return a(r,N)},createURL:A,encodeLocation(N){let C=A(N);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:x,replace:T,go(N){return d.go(N)}};return j}function mx(n,a=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),dt(l,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:io(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=l+o),new URL(o,l)}function y0(n,a,l="/"){return px(n,a,l,!1)}function px(n,a,l,o){let r=typeof a=="string"?$i(a):a,u=Ua(r.pathname||"/",l);if(u==null)return null;let d=v0(n);gx(d);let m=null;for(let p=0;m==null&&p<d.length;++p){let g=S0(u);m=Cx(d[p],g,o)}return m}function v0(n,a=[],l=[],o="",r=!1){let u=(d,m,p=r,g)=>{let y={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&p)return;dt(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=da([o,y.relativePath]),x=l.concat(y);d.children&&d.children.length>0&&(dt(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),v0(d.children,a,x,b,p)),!(d.path==null&&!d.index)&&a.push({path:b,score:Tx(b,d.index),routesMeta:x})};return n.forEach((d,m)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))u(d,m);else for(let g of b0(d.path))u(d,m,!0,g)}),a}function b0(n){let a=n.split("/");if(a.length===0)return[];let[l,...o]=a,r=l.endsWith("?"),u=l.replace(/\?$/,"");if(o.length===0)return r?[u,""]:[u];let d=b0(o.join("/")),m=[];return m.push(...d.map(p=>p===""?u:[u,p].join("/"))),r&&m.push(...d),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function gx(n){n.sort((a,l)=>a.score!==l.score?l.score-a.score:Ex(a.routesMeta.map(o=>o.childrenIndex),l.routesMeta.map(o=>o.childrenIndex)))}var yx=/^:[\w-]+$/,vx=3,bx=2,Sx=1,_x=10,xx=-2,Ty=n=>n==="*";function Tx(n,a){let l=n.split("/"),o=l.length;return l.some(Ty)&&(o+=xx),a&&(o+=bx),l.filter(r=>!Ty(r)).reduce((r,u)=>r+(yx.test(u)?vx:u===""?Sx:_x),o)}function Ex(n,a){return n.length===a.length&&n.slice(0,-1).every((o,r)=>o===a[r])?n[n.length-1]-a[a.length-1]:0}function Cx(n,a,l=!1){let{routesMeta:o}=n,r={},u="/",d=[];for(let m=0;m<o.length;++m){let p=o[m],g=m===o.length-1,y=u==="/"?a:a.slice(u.length)||"/",b=lo({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},y),x=p.route;if(!b&&g&&l&&!o[o.length-1].route.index&&(b=lo({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!b)return null;Object.assign(r,b.params),d.push({params:r,pathname:da([u,b.pathname]),pathnameBase:Dx(da([u,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(u=da([u,b.pathnameBase]))}return d}function lo(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,o]=Ax(n.path,n.caseSensitive,n.end),r=a.match(l);if(!r)return null;let u=r[0],d=u.replace(/(.)\/+$/,"$1"),m=r.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:b},x)=>{if(y==="*"){let A=m[x]||"";d=u.slice(0,u.length-A.length).replace(/(.)\/+$/,"$1")}const T=m[x];return b&&!T?g[y]=void 0:g[y]=(T||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:d,pattern:n}}function Ax(n,a=!1,l=!0){Yn(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=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,p,g,y)=>{if(o.push({paramName:m,isOptional:p!=null}),p){let b=y.charAt(g+d.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,a?void 0:"i"),o]}function S0(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Yn(!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 (${a}).`),n}}function Ua(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,o=n.charAt(l);return o&&o!=="/"?null:n.slice(l)||"/"}var jx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Nx(n,a="/"){let{pathname:l,search:o="",hash:r=""}=typeof n=="string"?$i(n):n,u;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?u=Ey(l.substring(1),"/"):u=Ey(l,a)):u=a,{pathname:u,search:kx(o),hash:Rx(r)}}function Ey(n,a){let l=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?l.length>1&&l.pop():r!=="."&&l.push(r)}),l.length>1?l.join("/"):"/"}function kd(n,a,l,o){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` 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 wx(n){return n.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function Mf(n){let a=wx(n);return a.map((l,o)=>o===a.length-1?l.pathname:l.pathnameBase)}function rc(n,a,l,o=!1){let r;typeof n=="string"?r=$i(n):(r={...n},dt(!r.pathname||!r.pathname.includes("?"),kd("?","pathname","search",r)),dt(!r.pathname||!r.pathname.includes("#"),kd("#","pathname","hash",r)),dt(!r.search||!r.search.includes("#"),kd("#","search","hash",r)));let u=n===""||r.pathname==="",d=u?"/":r.pathname,m;if(d==null)m=l;else{let b=a.length-1;if(!o&&d.startsWith("..")){let x=d.split("/");for(;x[0]==="..";)x.shift(),b-=1;r.pathname=x.join("/")}m=b>=0?a[b]:"/"}let p=Nx(r,m),g=d&&d!=="/"&&d.endsWith("/"),y=(u||d===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(g||y)&&(p.pathname+="/"),p}var da=n=>n.join("/").replace(/\/\/+/g,"/"),Dx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),kx=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Rx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Mx=class{constructor(n,a,l,o=!1){this.status=n,this.statusText=a||"",this.internal=o,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function Ox(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Bx(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var _0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function x0(n,a){let l=n;if(typeof l!="string"||!jx.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let o=l,r=!1;if(_0)try{let u=new URL(window.location.href),d=l.startsWith("//")?new URL(u.protocol+l):new URL(l),m=Ua(d.pathname,a);d.origin===u.origin&&m!=null?l=m+d.search+d.hash:r=!0}catch{Yn(!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:r,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var T0=["POST","PUT","PATCH","DELETE"];new Set(T0);var Lx=["GET",...T0];new Set(Lx);var Yi=S.createContext(null);Yi.displayName="DataRouter";var cc=S.createContext(null);cc.displayName="DataRouterState";var Ux=S.createContext(!1),E0=S.createContext({isTransitioning:!1});E0.displayName="ViewTransition";var zx=S.createContext(new Map);zx.displayName="Fetchers";var Vx=S.createContext(null);Vx.displayName="Await";var Rn=S.createContext(null);Rn.displayName="Navigation";var mo=S.createContext(null);mo.displayName="Location";var Kn=S.createContext({outlet:null,matches:[],isDataRoute:!1});Kn.displayName="Route";var Of=S.createContext(null);Of.displayName="RouteError";var C0="REACT_ROUTER_ERROR",Ix="REDIRECT",Hx="ROUTE_ERROR_RESPONSE";function Gx(n){if(n.startsWith(`${C0}:${Ix}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function Px(n){if(n.startsWith(`${C0}:${Hx}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new Mx(a.status,a.statusText,a.data)}catch{}}function qx(n,{relative:a}={}){dt(Ks(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:o}=S.useContext(Rn),{hash:r,pathname:u,search:d}=po(n,{relative:a}),m=u;return l!=="/"&&(m=u==="/"?l:da([l,u])),o.createHref({pathname:m,search:d,hash:r})}function Ks(){return S.useContext(mo)!=null}function hn(){return dt(Ks(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(mo).location}function dn(n){dt(Ks(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:a}=hn();return S.useMemo(()=>lo(n,S0(a)),[a,n])}var A0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function j0(n){S.useContext(Rn).static||S.useLayoutEffect(n)}function uc(){let{isDataRoute:n}=S.useContext(Kn);return n?iT():Fx()}function Fx(){dt(Ks(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Yi),{basename:a,navigator:l}=S.useContext(Rn),{matches:o}=S.useContext(Kn),{pathname:r}=hn(),u=JSON.stringify(Mf(o)),d=S.useRef(!1);return j0(()=>{d.current=!0}),S.useCallback((p,g={})=>{if(Yn(d.current,A0),!d.current)return;if(typeof p=="number"){l.go(p);return}let y=rc(p,JSON.parse(u),r,g.relative==="path");n==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:da([a,y.pathname])),(g.replace?l.replace:l.push)(y,g.state,g)},[a,l,u,r,n])}var $x=S.createContext(null);function Yx(n){let a=S.useContext(Kn).outlet;return S.useMemo(()=>a&&S.createElement($x.Provider,{value:n},a),[a,n])}function dc(){let{matches:n}=S.useContext(Kn),a=n[n.length-1];return a?a.params:{}}function po(n,{relative:a}={}){let{matches:l}=S.useContext(Kn),{pathname:o}=hn(),r=JSON.stringify(Mf(l));return S.useMemo(()=>rc(n,JSON.parse(r),o,a==="path"),[n,r,o,a])}function Kx(n,a){return N0(n,a)}function N0(n,a,l){var N;dt(Ks(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(Rn),{matches:r}=S.useContext(Kn),u=r[r.length-1],d=u?u.params:{},m=u?u.pathname:"/",p=u?u.pathnameBase:"/",g=u&&u.route;{let C=g&&g.path||"";D0(m,!g||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${C}">) 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.
|
|
35
|
-
|
|
36
|
-
Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let y=hn(),b;if(a){let C=typeof a=="string"?$i(a):a;dt(p==="/"||((N=C.pathname)==null?void 0:N.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 "${C.pathname}" was given in the \`location\` prop.`),b=C}else b=y;let x=b.pathname||"/",T=x;if(p!=="/"){let C=p.replace(/^\//,"").split("/");T="/"+x.replace(/^\//,"").split("/").slice(C.length).join("/")}let A=y0(n,{pathname:T});Yn(g||A!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Yn(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.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 j=Wx(A&&A.map(C=>Object.assign({},C,{params:Object.assign({},d,C.params),pathname:da([p,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?p:da([p,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),r,l);return a&&j?S.createElement(mo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},j):j}function Zx(){let n=sT(),a=Ox(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)",r={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=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:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),l?S.createElement("pre",{style:r},l):null,d)}var Xx=S.createElement(Zx,null),w0=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,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):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=Px(n.digest);l&&(n=l)}let a=n!==void 0?S.createElement(Kn.Provider,{value:this.props.routeContext},S.createElement(Of.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(Qx,{error:n},a):a}};w0.contextType=Ux;var Rd=new WeakMap;function Qx({children:n,error:a}){let{basename:l}=S.useContext(Rn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=Gx(a.digest);if(o){let r=Rd.get(a);if(r)throw r;let u=x0(o.location,l);if(_0&&!Rd.get(a))if(u.isExternal||o.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw Rd.set(a,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return n}function Jx({routeContext:n,match:a,children:l}){let o=S.useContext(Yi);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(Kn.Provider,{value:n},l)}function Wx(n,a=[],l){let o=l==null?void 0:l.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(a.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let r=n,u=o==null?void 0:o.errors;if(u!=null){let y=r.findIndex(b=>b.route.id&&(u==null?void 0:u[b.route.id])!==void 0);dt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),r=r.slice(0,Math.min(r.length,y+1))}let d=!1,m=-1;if(l&&o){d=o.renderFallback;for(let y=0;y<r.length;y++){let b=r[y];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=y),b.route.id){let{loaderData:x,errors:T}=o,A=b.route.loader&&!x.hasOwnProperty(b.route.id)&&(!T||T[b.route.id]===void 0);if(b.route.lazy||A){l.isStatic&&(d=!0),m>=0?r=r.slice(0,m+1):r=[r[0]];break}}}}let p=l==null?void 0:l.onError,g=o&&p?(y,b)=>{var x,T;p(y,{location:o.location,params:((T=(x=o.matches)==null?void 0:x[0])==null?void 0:T.params)??{},unstable_pattern:Bx(o.matches),errorInfo:b})}:void 0;return r.reduceRight((y,b,x)=>{let T,A=!1,j=null,N=null;o&&(T=u&&b.route.id?u[b.route.id]:void 0,j=b.route.errorElement||Xx,d&&(m<0&&x===0?(D0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,N=null):m===x&&(A=!0,N=b.route.hydrateFallbackElement||null)));let C=a.concat(r.slice(0,x+1)),B=()=>{let R;return T?R=j:A?R=N:b.route.Component?R=S.createElement(b.route.Component,null):b.route.element?R=b.route.element:R=y,S.createElement(Jx,{match:b,routeContext:{outlet:y,matches:C,isDataRoute:o!=null},children:R})};return o&&(b.route.ErrorBoundary||b.route.errorElement||x===0)?S.createElement(w0,{location:o.location,revalidation:o.revalidation,component:j,error:T,children:B(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:g}):B()},null)}function Bf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function eT(n){let a=S.useContext(Yi);return dt(a,Bf(n)),a}function tT(n){let a=S.useContext(cc);return dt(a,Bf(n)),a}function nT(n){let a=S.useContext(Kn);return dt(a,Bf(n)),a}function Lf(n){let a=nT(n),l=a.matches[a.matches.length-1];return dt(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function aT(){return Lf("useRouteId")}function sT(){var o;let n=S.useContext(Of),a=tT("useRouteError"),l=Lf("useRouteError");return n!==void 0?n:(o=a.errors)==null?void 0:o[l]}function iT(){let{router:n}=eT("useNavigate"),a=Lf("useNavigate"),l=S.useRef(!1);return j0(()=>{l.current=!0}),S.useCallback(async(r,u={})=>{Yn(l.current,A0),l.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...u}))},[n,a])}var Cy={};function D0(n,a,l){!a&&!Cy[n]&&(Cy[n]=!0,Yn(!1,l))}S.memo(lT);function lT({routes:n,future:a,state:l,isStatic:o,onError:r}){return N0(n,void 0,{state:l,isStatic:o,onError:r})}function qr({to:n,replace:a,state:l,relative:o}){dt(Ks(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(Rn);Yn(!r,"<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:u}=S.useContext(Kn),{pathname:d}=hn(),m=uc(),p=rc(n,Mf(u),d,o==="path"),g=JSON.stringify(p);return S.useEffect(()=>{m(JSON.parse(g),{replace:a,state:l,relative:o})},[m,g,o,a,l]),null}function k0(n){return Yx(n.context)}function Ot(n){dt(!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 oT({basename:n="/",children:a=null,location:l,navigationType:o="POP",navigator:r,static:u=!1,unstable_useTransitions:d}){dt(!Ks(),"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:r,static:u,unstable_useTransitions:d,future:{}}),[m,r,u,d]);typeof l=="string"&&(l=$i(l));let{pathname:g="/",search:y="",hash:b="",state:x=null,key:T="default",unstable_mask:A}=l,j=S.useMemo(()=>{let N=Ua(g,m);return N==null?null:{location:{pathname:N,search:y,hash:b,state:x,key:T,unstable_mask:A},navigationType:o}},[m,g,y,b,x,T,o,A]);return Yn(j!=null,`<Router basename="${m}"> is not able to match the URL "${g}${y}${b}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:S.createElement(Rn.Provider,{value:p},S.createElement(mo.Provider,{children:a,value:j}))}function rT({children:n,location:a}){return Kx(ef(n),a)}function ef(n,a=[]){let l=[];return S.Children.forEach(n,(o,r)=>{if(!S.isValidElement(o))return;let u=[...a,r];if(o.type===S.Fragment){l.push.apply(l,ef(o.props.children,u));return}dt(o.type===Ot,`[${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>`),dt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let d={id:o.props.id||u.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&&(d.children=ef(o.props.children,u)),l.push(d)}),l}var Fr="get",$r="application/x-www-form-urlencoded";function fc(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function cT(n){return fc(n)&&n.tagName.toLowerCase()==="button"}function uT(n){return fc(n)&&n.tagName.toLowerCase()==="form"}function dT(n){return fc(n)&&n.tagName.toLowerCase()==="input"}function fT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function hT(n,a){return n.button===0&&(!a||a==="_self")&&!fT(n)}function tf(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((a,l)=>{let o=n[l];return a.concat(Array.isArray(o)?o.map(r=>[l,r]):[[l,o]])},[]))}function mT(n,a){let l=tf(n);return a&&a.forEach((o,r)=>{l.has(r)||a.getAll(r).forEach(u=>{l.append(r,u)})}),l}var Lr=null;function pT(){if(Lr===null)try{new FormData(document.createElement("form"),0),Lr=!1}catch{Lr=!0}return Lr}var gT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Md(n){return n!=null&&!gT.has(n)?(Yn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${$r}"`),null):n}function yT(n,a){let l,o,r,u,d;if(uT(n)){let m=n.getAttribute("action");o=m?Ua(m,a):null,l=n.getAttribute("method")||Fr,r=Md(n.getAttribute("enctype"))||$r,u=new FormData(n)}else if(cT(n)||dT(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?Ua(p,a):null,l=n.getAttribute("formmethod")||m.getAttribute("method")||Fr,r=Md(n.getAttribute("formenctype"))||Md(m.getAttribute("enctype"))||$r,u=new FormData(m,n),!pT()){let{name:g,type:y,value:b}=n;if(y==="image"){let x=g?`${g}.`:"";u.append(`${x}x`,"0"),u.append(`${x}y`,"0")}else g&&u.append(g,b)}}else{if(fc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Fr,o=null,r=$r,d=n}return u&&r==="text/plain"&&(d=u,u=void 0),{action:o,method:l.toLowerCase(),encType:r,formData:u,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Uf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function vT(n,a,l,o){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return l?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${o}`:r.pathname=`${r.pathname}.${o}`:r.pathname==="/"?r.pathname=`_root.${o}`:a&&Ua(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${o}`,r}async function bT(n,a){if(n.id in a)return a[n.id];try{let l=await import(n.module);return a[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 ST(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 _T(n,a,l){let o=await Promise.all(n.map(async r=>{let u=a.routes[r.route.id];if(u){let d=await bT(u,l);return d.links?d.links():[]}return[]}));return CT(o.flat(1).filter(ST).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function Ay(n,a,l,o,r,u){let d=(p,g)=>l[g]?p.route.id!==l[g].route.id:!0,m=(p,g)=>{var y;return l[g].pathname!==p.pathname||((y=l[g].route.path)==null?void 0:y.endsWith("*"))&&l[g].params["*"]!==p.params["*"]};return u==="assets"?a.filter((p,g)=>d(p,g)||m(p,g)):u==="data"?a.filter((p,g)=>{var b;let y=o.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(d(p,g)||m(p,g))return!0;if(p.route.shouldRevalidate){let x=p.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.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 x=="boolean")return x}return!0}):[]}function xT(n,a,{includeHydrateFallback:l}={}){return TT(n.map(o=>{let r=a.routes[o.route.id];if(!r)return[];let u=[r.module];return r.clientActionModule&&(u=u.concat(r.clientActionModule)),r.clientLoaderModule&&(u=u.concat(r.clientLoaderModule)),l&&r.hydrateFallbackModule&&(u=u.concat(r.hydrateFallbackModule)),r.imports&&(u=u.concat(r.imports)),u}).flat(1))}function TT(n){return[...new Set(n)]}function ET(n){let a={},l=Object.keys(n).sort();for(let o of l)a[o]=n[o];return a}function CT(n,a){let l=new Set;return new Set(a),n.reduce((o,r)=>{let u=JSON.stringify(ET(r));return l.has(u)||(l.add(u),o.push({key:u,link:r})),o},[])}function R0(){let n=S.useContext(Yi);return Uf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function AT(){let n=S.useContext(cc);return Uf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var zf=S.createContext(void 0);zf.displayName="FrameworkContext";function M0(){let n=S.useContext(zf);return Uf(n,"You must render this element inside a <HydratedRouter> element"),n}function jT(n,a){let l=S.useContext(zf),[o,r]=S.useState(!1),[u,d]=S.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:g,onMouseLeave:y,onTouchStart:b}=a,x=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let j=C=>{C.forEach(B=>{d(B.isIntersecting)})},N=new IntersectionObserver(j,{threshold:.5});return x.current&&N.observe(x.current),()=>{N.disconnect()}}},[n]),S.useEffect(()=>{if(o){let j=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(j)}}},[o]);let T=()=>{r(!0)},A=()=>{r(!1),d(!1)};return l?n!=="intent"?[u,x,{}]:[u,x,{onFocus:Fl(m,T),onBlur:Fl(p,A),onMouseEnter:Fl(g,T),onMouseLeave:Fl(y,A),onTouchStart:Fl(b,T)}]:[!1,x,{}]}function Fl(n,a){return l=>{n&&n(l),l.defaultPrevented||a(l)}}function NT({page:n,...a}){let{router:l}=R0(),o=S.useMemo(()=>y0(l.routes,n,l.basename),[l.routes,n,l.basename]);return o?S.createElement(DT,{page:n,matches:o,...a}):null}function wT(n){let{manifest:a,routeModules:l}=M0(),[o,r]=S.useState([]);return S.useEffect(()=>{let u=!1;return _T(n,a,l).then(d=>{u||r(d)}),()=>{u=!0}},[n,a,l]),o}function DT({page:n,matches:a,...l}){let o=hn(),{future:r,manifest:u,routeModules:d}=M0(),{basename:m}=R0(),{loaderData:p,matches:g}=AT(),y=S.useMemo(()=>Ay(n,a,g,u,o,"data"),[n,a,g,u,o]),b=S.useMemo(()=>Ay(n,a,g,u,o,"assets"),[n,a,g,u,o]),x=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let j=new Set,N=!1;if(a.forEach(B=>{var X;let R=u.routes[B.route.id];!R||!R.hasLoader||(!y.some(H=>H.route.id===B.route.id)&&B.route.id in p&&((X=d[B.route.id])!=null&&X.shouldRevalidate)||R.hasClientLoader?N=!0:j.add(B.route.id))}),j.size===0)return[];let C=vT(n,m,r.unstable_trailingSlashAwareDataRequests,"data");return N&&j.size>0&&C.searchParams.set("_routes",a.filter(B=>j.has(B.route.id)).map(B=>B.route.id).join(",")),[C.pathname+C.search]},[m,r.unstable_trailingSlashAwareDataRequests,p,o,u,y,a,n,d]),T=S.useMemo(()=>xT(b,u),[b,u]),A=wT(b);return S.createElement(S.Fragment,null,x.map(j=>S.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...l})),T.map(j=>S.createElement("link",{key:j,rel:"modulepreload",href:j,...l})),A.map(({key:j,link:N})=>S.createElement("link",{key:j,nonce:l.nonce,...N,crossOrigin:N.crossOrigin??l.crossOrigin})))}function kT(...n){return a=>{n.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var RT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{RT&&(window.__reactRouterVersion="7.13.1")}catch{}function MT({basename:n,children:a,unstable_useTransitions:l,window:o}){let r=S.useRef();r.current==null&&(r.current=dx({window:o,v5Compat:!0}));let u=r.current,[d,m]=S.useState({action:u.action,location:u.location}),p=S.useCallback(g=>{l===!1?m(g):S.startTransition(()=>m(g))},[l]);return S.useLayoutEffect(()=>u.listen(p),[u,p]),S.createElement(oT,{basename:n,children:a,location:d.location,navigationType:d.action,navigator:u,unstable_useTransitions:l})}var O0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vf=S.forwardRef(function({onClick:a,discover:l="render",prefetch:o="none",relative:r,reloadDocument:u,replace:d,unstable_mask:m,state:p,target:g,to:y,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:T,...A},j){let{basename:N,navigator:C,unstable_useTransitions:B}=S.useContext(Rn),R=typeof y=="string"&&O0.test(y),X=x0(y,N);y=X.to;let H=qx(y,{relative:r}),J=hn(),W=null;if(m){let G=rc(m,[],J.unstable_mask?J.unstable_mask.pathname:"/",!0);N!=="/"&&(G.pathname=G.pathname==="/"?N:da([N,G.pathname])),W=C.createHref(G)}let[F,ne,ge]=jT(o,A),L=UT(y,{replace:d,unstable_mask:m,state:p,target:g,preventScrollReset:b,relative:r,viewTransition:x,unstable_defaultShouldRevalidate:T,unstable_useTransitions:B});function pe(G){a&&a(G),G.defaultPrevented||L(G)}let te=!(X.isExternal||u),ve=S.createElement("a",{...A,...ge,href:(te?W:void 0)||X.absoluteURL||H,onClick:te?pe:a,ref:kT(j,ne),target:g,"data-discover":!R&&l==="render"?"true":void 0});return F&&!R?S.createElement(S.Fragment,null,ve,S.createElement(NT,{page:H})):ve});Vf.displayName="Link";var OT=S.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:o="",end:r=!1,style:u,to:d,viewTransition:m,children:p,...g},y){let b=po(d,{relative:g.relative}),x=hn(),T=S.useContext(cc),{navigator:A,basename:j}=S.useContext(Rn),N=T!=null&>(b)&&m===!0,C=A.encodeLocation?A.encodeLocation(b).pathname:b.pathname,B=x.pathname,R=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;l||(B=B.toLowerCase(),R=R?R.toLowerCase():null,C=C.toLowerCase()),R&&j&&(R=Ua(R,j)||R);const X=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let H=B===C||!r&&B.startsWith(C)&&B.charAt(X)==="/",J=R!=null&&(R===C||!r&&R.startsWith(C)&&R.charAt(C.length)==="/"),W={isActive:H,isPending:J,isTransitioning:N},F=H?a:void 0,ne;typeof o=="function"?ne=o(W):ne=[o,H?"active":null,J?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let ge=typeof u=="function"?u(W):u;return S.createElement(Vf,{...g,"aria-current":F,className:ne,ref:y,style:ge,to:d,viewTransition:m},typeof p=="function"?p(W):p)});OT.displayName="NavLink";var BT=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:l,reloadDocument:o,replace:r,state:u,method:d=Fr,action:m,onSubmit:p,relative:g,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:x,...T},A)=>{let{unstable_useTransitions:j}=S.useContext(Rn),N=IT(),C=HT(m,{relative:g}),B=d.toLowerCase()==="get"?"get":"post",R=typeof m=="string"&&O0.test(m),X=H=>{if(p&&p(H),H.defaultPrevented)return;H.preventDefault();let J=H.nativeEvent.submitter,W=(J==null?void 0:J.getAttribute("formmethod"))||d,F=()=>N(J||H.currentTarget,{fetcherKey:a,method:W,navigate:l,replace:r,state:u,relative:g,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:x});j&&l!==!1?S.startTransition(()=>F()):F()};return S.createElement("form",{ref:A,method:B,action:C,onSubmit:o?p:X,...T,"data-discover":!R&&n==="render"?"true":void 0})});BT.displayName="Form";function LT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function B0(n){let a=S.useContext(Yi);return dt(a,LT(n)),a}function UT(n,{target:a,replace:l,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p,unstable_useTransitions:g}={}){let y=uc(),b=hn(),x=po(n,{relative:d});return S.useCallback(T=>{if(hT(T,a)){T.preventDefault();let A=l!==void 0?l:io(b)===io(x),j=()=>y(n,{replace:A,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p});g?S.startTransition(()=>j()):j()}},[b,y,x,l,o,r,a,n,u,d,m,p,g])}function If(n){Yn(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 a=S.useRef(tf(n)),l=S.useRef(!1),o=hn(),r=S.useMemo(()=>mT(o.search,l.current?null:a.current),[o.search]),u=uc(),d=S.useCallback((m,p)=>{const g=tf(typeof m=="function"?m(new URLSearchParams(r)):m);l.current=!0,u("?"+g,p)},[u,r]);return[r,d]}var zT=0,VT=()=>`__${String(++zT)}__`;function IT(){let{router:n}=B0("useSubmit"),{basename:a}=S.useContext(Rn),l=aT(),o=n.fetch,r=n.navigate;return S.useCallback(async(u,d={})=>{let{action:m,method:p,encType:g,formData:y,body:b}=yT(u,a);if(d.navigate===!1){let x=d.fetcherKey||VT();await o(x,l,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:y,body:b,formMethod:d.method||p,formEncType:d.encType||g,flushSync:d.flushSync})}else await r(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:y,body:b,formMethod:d.method||p,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:l,flushSync:d.flushSync,viewTransition:d.viewTransition})},[o,r,a,l])}function HT(n,{relative:a}={}){let{basename:l}=S.useContext(Rn),o=S.useContext(Kn);dt(o,"useFormAction must be used inside a RouteContext");let[r]=o.matches.slice(-1),u={...po(n||".",{relative:a})},d=hn();if(n==null){u.search=d.search;let m=new URLSearchParams(u.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();u.search=y?`?${y}`:""}}return(!n||n===".")&&r.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(u.pathname=u.pathname==="/"?l:da([l,u.pathname])),io(u)}function GT(n,{relative:a}={}){let l=S.useContext(E0);dt(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=B0("useViewTransitionState"),r=po(n,{relative:a});if(!l.isTransitioning)return!1;let u=Ua(l.currentLocation.pathname,o)||l.currentLocation.pathname,d=Ua(l.nextLocation.pathname,o)||l.nextLocation.pathname;return lo(r.pathname,d)!=null||lo(r.pathname,u)!=null}function na(){const n=uc();return S.useCallback((a,l)=>{typeof a=="number"?n(a):n(a,l)},[n])}function L0(n){return`/sessions/${encodeURIComponent(n)}`}function oo(n){return`/projects/${encodeURIComponent(n)}`}function ms(n,a){const l=`/tasks/${encodeURIComponent(n)}`;return a?`${l}/${a}`:l}function PT(n){return`/tasks/${encodeURIComponent(n)}/edit`}function $s(n,a){const l=new URLSearchParams({project:n});return a&&l.set("parent",a),`/tasks/new?${l.toString()}`}function U0(n,a){return`/sessions/new?${new URLSearchParams({env:n,runtime:a}).toString()}`}const jy="/environments/new",Gi="/settings",qT="/pair";function rn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Wl(n,a){return console.warn(`[ws] Malformed "${n}" message: ${a}`),!1}function FT(n){return rn(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 Ny(n){return rn(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 wy(n){return rn(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 $T(n){return rn(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.worktreeBasePath=="string"&&typeof n.useWorktrees=="boolean"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function YT(n){return rn(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 KT(n){return rn(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 ZT(n){return rn(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const XT=new Set(["off","subscription","api_key"]),Od=new Set(["off","on"]);function QT(n){return rn(n)&&XT.has(n.claude)&&Od.has(n.github)&&Od.has(n.copilot)&&Od.has(n.codex)}function JT(n){return rn(n)&&typeof n.environmentId=="string"&&typeof n.stage=="string"&&typeof n.message=="string"&&typeof n.progress=="number"}function WT(n){return rn(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function eE(n){return rn(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 oa(n,a,l,o){return Array.isArray(n)?n.filter((r,u)=>a(r)?!0:(Wl(l,`item at index ${u} in "${o}" has unexpected shape`),!1)):(Wl(l,`expected "${o}" to be an array, got ${typeof n}`),[])}function tE(n){let a;try{a=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!rn(a)||typeof a.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",a);return}return{type:a.type,payload:rn(a.payload)?a.payload:void 0}}function nE(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const aE=3e3,Oi=5e3,sE=4001;function iE(n){const a=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`:"ws://localhost:3000",l=S.useRef(void 0),[o,r]=S.useState(!1),[u,d]=S.useState([]),[m,p]=S.useState([]),[g,y]=S.useState([]),[b,x]=S.useState(0),[T,A]=S.useState(void 0),[j,N]=S.useState([]),[C,B]=S.useState([]),[R,X]=S.useState([]),[H,J]=S.useState([]),[W,F]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[ne,ge]=S.useState({}),[L,pe]=S.useState([]),[te,ve]=S.useState(""),[G,z]=S.useState(""),[Y,ee]=S.useState(!1),[ke,je]=S.useState([]),[qe,we]=S.useState({}),[_e,Ce]=S.useState(!1),[Q,q]=S.useState(void 0),I=S.useCallback(ae=>{var Me;((Me=l.current)==null?void 0:Me.readyState)===WebSocket.OPEN&&l.current.send(JSON.stringify(ae))},[]);S.useEffect(()=>{let ae,Me;function be(){ae=new WebSocket(a),l.current=ae,ae.onopen=()=>{r(!0),I({type:"list_environments"}),I({type:"list_sessions"}),I({type:"list_projects"}),I({type:"list_tokens"}),I({type:"get_credential_providers"}),I({type:"list_personas"}),I({type:"subscribe_all"})},ae.onmessage=re=>{var se,Ct,Mn,Xs,Ia,_o,Ji,Wi,el,Qs,Js,tl,nl,Qn,Ut,Zt,ma,Ws,xo;if(typeof re.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const le=tE(re.data);if(le)switch(le.type){case"environments":d(oa((se=le.payload)==null?void 0:se.environments,FT,"environments","environments"));break;case"sessions":p(oe=>{var Xt;const Fe=oa((Xt=le.payload)==null?void 0:Xt.sessions,Ny,"sessions","sessions"),Be=new Map(oe.map(bt=>[bt.id,bt.status])),Ie=new Set(["pending","running","idle"]),sn=new Set(["completed","failed","interrupted"]);return Fe.map(bt=>{const ht=Be.get(bt.id);if(!ht||ht===bt.status)return bt;if(sn.has(ht)&&Ie.has(bt.status))return{...bt,status:ht};if(Ie.has(ht)&&Ie.has(bt.status)){const mt=["pending","running","idle"];if(mt.indexOf(ht)>mt.indexOf(bt.status))return{...bt,status:ht}}return bt})});break;case"session_event":{if(!wy(le.payload)){Wl("session_event","payload is not a valid SessionEvent");break}const oe=le.payload;let Fe=0;if(y(Be=>{const Ie=[...Be,oe];return Ie.length>Oi?(Fe=Ie.length-Oi,Ie.slice(-Oi)):Ie}),Fe>0&&x(Be=>Be+Fe),oe.eventType==="status"){const Be=nE(oe.content);p(Ie=>Ie.some(Xt=>Xt.id===oe.sessionId)?Ie.map(Xt=>Xt.id===oe.sessionId?{...Xt,status:Be}:Xt):[...Ie,{id:oe.sessionId,environmentId:"",runtime:"",status:Be,prompt:"",startedAt:oe.timestamp}])}break}case"session_events":{const oe=oa((Ct=le.payload)==null?void 0:Ct.events,wy,"session_events","events"),Fe=(Mn=le.payload)==null?void 0:Mn.sessionId;if(typeof Fe!="string"){Wl("session_events","missing or non-string sessionId");break}if(oe.length>0){let Be=0;y(Ie=>{const sn=new Set;for(const ht of Ie)ht.sessionId===Fe&&sn.add(`${ht.timestamp}|${ht.eventType}`);const Xt=oe.filter(ht=>!sn.has(`${ht.timestamp}|${ht.eventType}`)),bt=[...Ie,...Xt].sort((ht,mt)=>ht.sessionId!==mt.sessionId?0:ht.timestamp.localeCompare(mt.timestamp));return bt.length>Oi?(Be=bt.length-Oi,bt.slice(-Oi)):bt}),Be>0&&x(Ie=>Ie+Be)}break}case"spawned":{const oe=(Xs=le.payload)==null?void 0:Xs.sessionId;typeof oe=="string"&&oe&&A(oe),I({type:"list_sessions"});break}case"projects":N(oa((Ia=le.payload)==null?void 0:Ia.projects,$T,"projects","projects"));break;case"project_created":Ce(!1),I({type:"list_projects"});break;case"project_archived":I({type:"list_projects"});break;case"project_updated":I({type:"list_projects"});break;case"tasks":{const oe=oa((_o=le.payload)==null?void 0:_o.tasks,YT,"tasks","tasks"),Fe=(typeof((Ji=le.payload)==null?void 0:Ji.projectId)=="string"?le.payload.projectId:"")||(oe.length>0?oe[0].projectId:"");if(!Fe){B(oe);break}B(Be=>[...Be.filter(Ie=>Ie.projectId!==Fe),...oe]);break}case"task_created":{const oe=(Wi=le.payload)==null?void 0:Wi.task;if(rn(oe)){const Fe=typeof oe.project_id=="string"?oe.project_id:typeof oe.projectId=="string"?oe.projectId:"";Fe&&I({type:"list_tasks",payload:{projectId:Fe}})}break}case"task_started":{const oe=le.payload;if(!rn(oe))break;q(Be=>oe.taskId&&Be===oe.taskId?void 0:Be),oe.sessionId&&(I({type:"list_sessions"}),typeof oe.taskId=="string"&&typeof oe.sessionId=="string"&&B(Be=>Be.map(Ie=>Ie.id===oe.taskId?{...Ie,latestSessionId:oe.sessionId}:Ie)));const Fe=typeof oe.projectId=="string"?oe.projectId:void 0;Fe?I({type:"list_tasks",payload:{projectId:Fe}}):oe.taskId&&B(Be=>{const Ie=Be.find(sn=>sn.id===oe.taskId);return Ie&&I({type:"list_tasks",payload:{projectId:Ie.projectId}}),Be});break}case"task_completed":case"task_deleted":case"task_updated":{const oe=le.payload;if(!rn(oe))break;const Fe=typeof oe.projectId=="string"?oe.projectId:void 0;Fe?I({type:"list_tasks",payload:{projectId:Fe}}):oe.taskId&&B(Be=>{const Ie=Be.find(sn=>sn.id===oe.taskId);return Ie&&I({type:"list_tasks",payload:{projectId:Ie.projectId}}),Be});break}case"findings":X(oa((el=le.payload)==null?void 0:el.findings,KT,"findings","findings"));break;case"finding_posted":typeof((Qs=le.payload)==null?void 0:Qs.projectId)=="string"&&I({type:"list_findings",payload:{projectId:le.payload.projectId}});break;case"tokens":J(oa((Js=le.payload)==null?void 0:Js.tokens,ZT,"tokens","tokens"));break;case"token_changed":I({type:"list_tokens"});break;case"credential_providers":QT(le.payload)&&F(le.payload);break;case"provision_progress":{if(!JT(le.payload)){Wl("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const oe=le.payload;ge(Fe=>({...Fe,[oe.environmentId]:{stage:oe.stage,message:oe.message,progress:oe.progress}})),oe.stage==="ready"&&setTimeout(()=>{ge(Be=>{const Ie={...Be};return delete Ie[oe.environmentId],Ie})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((tl=le.payload)==null?void 0:tl.environmentId)=="string"){const oe=le.payload.environmentId;d(Fe=>Fe.filter(Be=>Be.id!==oe)),ge(Fe=>{const Be={...Fe};return delete Be[oe],Be})}I({type:"list_sessions"});break;case"codespaces_list":{const oe=oa((nl=le.payload)==null?void 0:nl.codespaces,WT,"codespaces_list","codespaces"),Fe=typeof((Qn=le.payload)==null?void 0:Qn.error)=="string"?le.payload.error:"";pe(oe),z(Fe);break}case"codespace_created":{ee(!1),I({type:"list_codespaces"});break}case"codespace_create_error":{ee(!1);const oe=typeof((Ut=le.payload)==null?void 0:Ut.message)=="string"?le.payload.message:"Failed to create codespace";ve(oe);break}case"personas":{const oe=oa((Zt=le.payload)==null?void 0:Zt.personas,eE,"personas","personas");je(oe);break}case"persona_created":case"persona_updated":case"persona_deleted":I({type:"list_personas"});break;case"task_sessions":{const oe=(ma=le.payload)==null?void 0:ma.taskId;if(typeof oe!="string"||!oe)break;const Fe=oa((Ws=le.payload)==null?void 0:Ws.sessions,Ny,"task_sessions","sessions");we(Be=>({...Be,[oe]:Fe}));break}case"error":console.error("[ws]",(xo=le.payload)==null?void 0:xo.message);break}},ae.onclose=re=>{if(r(!1),l.current=void 0,Ce(!1),q(void 0),clearTimeout(Me),re.code===sE){window.location.href=qT;return}Me=setTimeout(be,aE)},ae.onerror=()=>{ae.close()}}return be(),()=>{clearTimeout(Me),ae==null||ae.close()}},[a,I]);const De=S.useCallback((ae,Me,be,re,le,se)=>{I({type:"spawn",payload:{environmentId:ae,prompt:Me,model:be||"",runtime:re||"",personaId:le||"",worktreeBasePath:se||""}})},[I]),$e=S.useCallback((ae,Me)=>{I({type:"send_input",payload:{sessionId:ae,text:Me}})},[I]),yt=S.useCallback(ae=>{I({type:"kill",payload:{sessionId:ae}})},[I]),xt=S.useCallback(()=>{I({type:"list_environments"}),I({type:"list_sessions"}),I({type:"list_projects"}),I({type:"list_tokens"})},[I]),Pt=S.useCallback(ae=>{I({type:"get_session_events",payload:{sessionId:ae}})},[I]),We=S.useCallback(()=>{y([]),x(0)},[]),Ze=S.useCallback((ae,Me,be,re)=>{Ce(!0),I({type:"create_project",payload:{name:ae,description:Me||"",repoUrl:be||"",defaultEnvironmentId:re||""}})},[I]),Ue=S.useCallback(ae=>{I({type:"archive_project",payload:{projectId:ae}})},[I]),Sn=S.useCallback((ae,Me)=>{I({type:"update_project",payload:{projectId:ae,...Me}})},[I]),_n=S.useCallback(ae=>{I({type:"list_tasks",payload:{projectId:ae}})},[I]),Zn=S.useCallback((ae,Me,be,re,le)=>{I({type:"create_task",payload:{projectId:ae,title:Me,description:be||"",dependsOn:re||[],parentTaskId:le||""}})},[I]),an=S.useCallback((ae,Me,be,re,le,se)=>{q(ae),I({type:"start_task",payload:{taskId:ae,runtime:Me||"",model:be||"",personaId:re||"",environmentId:le||"",notes:se||""}})},[I]),Xn=S.useCallback(ae=>{I({type:"complete_task",payload:{taskId:ae}})},[I]),Z=S.useCallback(ae=>{I({type:"resume_task",payload:{taskId:ae}})},[I]),ie=S.useCallback((ae,Me,be,re)=>{I({type:"update_task",payload:{taskId:ae,title:Me,description:be,dependsOn:re}})},[I]),ce=S.useCallback(ae=>{I({type:"delete_task",payload:{taskId:ae}})},[I]),de=S.useCallback(ae=>{I({type:"list_findings",payload:{projectId:ae}})},[I]),Te=S.useCallback((ae,Me,be,re,le)=>{I({type:"post_finding",payload:{projectId:ae,title:Me,content:be,category:re||"general",tags:le||[]}})},[I]),Ee=S.useCallback(()=>{I({type:"list_tokens"})},[I]),et=S.useCallback((ae,Me,be,re,le)=>{I({type:"set_token",payload:{name:ae,value:Me,tokenType:be,envVar:re,filePath:le}})},[I]),Le=S.useCallback(ae=>{I({type:"delete_token",payload:{name:ae}})},[I]),ot=S.useCallback(ae=>{I({type:"set_credential_providers",payload:ae})},[I]),Dt=S.useCallback((ae,Me,be,re)=>{const le={displayName:ae,adapterType:Me,adapterConfig:be||{}};re&&(le.defaultRuntime=re),I({type:"add_environment",payload:le})},[I]),Tt=S.useCallback(ae=>{I({type:"provision_environment",payload:{environmentId:ae}})},[I]),Lt=S.useCallback(ae=>{I({type:"stop_environment",payload:{environmentId:ae}})},[I]),rt=S.useCallback(ae=>{I({type:"remove_environment",payload:{environmentId:ae}})},[I]),Et=S.useCallback(()=>{I({type:"list_codespaces"})},[I]),cn=S.useCallback((ae,Me)=>{if(!o){ve("Not connected to server. Please try again once the connection is restored.");return}ee(!0),ve("");const be={repo:ae};Me&&(be.machine=Me),I({type:"create_codespace",payload:be})},[I,o]),vt=S.useCallback((ae,Me,be,re,le,se)=>{I({type:"create_persona",payload:{name:ae,description:Me,systemPrompt:be,runtime:re||"",model:le||"",maxTurns:se||0}})},[I]),$t=S.useCallback((ae,Me,be,re,le,se,Ct)=>{I({type:"update_persona",payload:{personaId:ae,name:Me||"",description:be||"",systemPrompt:re||"",runtime:le||"",model:se||"",maxTurns:Ct||0}})},[I]),Yt=S.useCallback(ae=>{I({type:"delete_persona",payload:{personaId:ae}})},[I]),_s=S.useCallback(ae=>{I({type:"get_task_sessions",payload:{taskId:ae}})},[I]);return{connected:o,environments:u,sessions:m,events:g,eventsDropped:b,lastSpawnedId:T,projects:j,tasks:C,findings:R,tokens:H,spawn:De,sendInput:$e,kill:yt,refresh:xt,loadSessionEvents:Pt,clearEvents:We,createProject:Ze,archiveProject:Ue,updateProject:Sn,loadTasks:_n,createTask:Zn,startTask:an,completeTask:Xn,resumeTask:Z,updateTask:ie,deleteTask:ce,loadFindings:de,postFinding:Te,addEnvironment:Dt,loadTokens:Ee,setToken:et,deleteToken:Le,credentialProviders:W,updateCredentialProviders:ot,provisionStatus:ne,provisionEnvironment:Tt,stopEnvironment:Lt,removeEnvironment:rt,codespaces:L,codespaceError:te,codespaceListError:G,codespaceCreating:Y,listCodespaces:Et,createCodespace:cn,projectCreating:_e,taskStartingId:Q,personas:ke,createPersona:vt,updatePersona:$t,deletePersona:Yt,taskSessions:qe,loadTaskSessions:_s}}const Hf=S.createContext(void 0);function lE({children:n}){const a=iE();return h.jsx(Hf.Provider,{value:a,children:n})}function nn(){const n=S.useContext(Hf);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const oE=[{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}],rE=[{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"}],cE=[{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:
|
|
37
|
-
- src/middleware/auth.ts
|
|
38
|
-
- src/routes/login.ts
|
|
39
|
-
- 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:
|
|
40
|
-
\`\`\`typescript
|
|
41
|
-
import jwt from "jsonwebtoken";
|
|
42
|
-
import type { Request, Response, NextFunction } from "express";
|
|
43
|
-
|
|
44
|
-
const JWT_SECRET = process.env.JWT_SECRET || "change-me";
|
|
45
|
-
|
|
46
|
-
export function verifyToken(req: Request, res: Response, next: NextFunction): void {
|
|
47
|
-
const header = req.headers.authorization;
|
|
48
|
-
if (!header?.startsWith("Bearer ")) {
|
|
49
|
-
res.status(401).json({ error: "Missing token" });
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
try {
|
|
53
|
-
const decoded = jwt.verify(header.slice(7), JWT_SECRET);
|
|
54
|
-
req.user = decoded;
|
|
55
|
-
next();
|
|
56
|
-
} catch {
|
|
57
|
-
res.status(403).json({ error: "Invalid token" });
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
\`\`\``},{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"}],uE=[{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:"",useWorktrees:!0,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:"",useWorktrees:!0,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:"",useWorktrees:!0,createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],dE=[{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}],Dy=[{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"}],fE=[{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:""}],hE=[{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"}],mE={"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 Ft(n){return new Date(Date.now()+n).toISOString()}const ky=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ft(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Ft(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Ft(1600),content:`Found 5 endpoints that need refactoring:
|
|
61
|
-
- GET /api/users
|
|
62
|
-
- POST /api/users
|
|
63
|
-
- GET /api/users/:id
|
|
64
|
-
- PUT /api/users/:id
|
|
65
|
-
- DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:Ft(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:Ft(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Ft(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ft(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Ft(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Ft(1400),content:`Found tables to modify:
|
|
66
|
-
- users (add column: last_login_at)
|
|
67
|
-
- sessions (add index on expires_at)
|
|
68
|
-
- audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:Ft(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
|
|
69
|
-
The table has 50,000+ rows — this may lock the table briefly.
|
|
70
|
-
|
|
71
|
-
Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:Ft(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Ft(1e3),content:`Migration 001_add_last_login.sql applied successfully.
|
|
72
|
-
Migration 002_sessions_index.sql applied successfully.
|
|
73
|
-
Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:Ft(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Ft(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ft(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Ft(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Ft(1800),content:`Writing test cases:
|
|
74
|
-
- should calculate monthly total
|
|
75
|
-
- should apply discount codes
|
|
76
|
-
- should handle currency conversion
|
|
77
|
-
- should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:Ft(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
|
|
78
|
-
The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:Ft(3500),content:"failed"}}]}],Ry=400;function pE({children:n}){const[a,l]=S.useState(rE),[o,r]=S.useState(cE),[u,d]=S.useState(void 0),[m,p]=S.useState(uE),[g,y]=S.useState(dE),[b,x]=S.useState(Dy),[T,A]=S.useState(fE),[j,N]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[C,B]=S.useState(hE),[R]=S.useState(mE),X=S.useRef(0),H=S.useRef(0),J=S.useRef(new Set),W=S.useRef(new Map),F=S.useRef(g);F.current=g;const ne=S.useRef(new Map),ge=S.useRef(new Map),L=S.useCallback(Z=>(X.current+=1,`mock-${Z}-${String(X.current).padStart(3,"0")}`),[]),pe=S.useCallback(()=>{const Z=ky[H.current%ky.length];return H.current+=1,Z},[]),te=S.useCallback((Z,ie,ce)=>{const de=setTimeout(()=>{var Te;J.current.delete(de),ce&&((Te=W.current.get(ce))==null||Te.delete(de)),Z()},ie);J.current.add(de),ce&&(W.current.has(ce)||W.current.set(ce,new Set),W.current.get(ce).add(de))},[]),ve=S.useCallback(Z=>{const ie=W.current.get(Z);ie&&(ie.forEach(ce=>{clearTimeout(ce),J.current.delete(ce)}),W.current.delete(Z))},[]),G=S.useCallback((Z,ie)=>{l(ce=>ce.map(de=>de.id===Z?{...de,status:ie}:de))},[]),z=S.useCallback(Z=>{r(ie=>[...ie,Z])},[]),Y=S.useCallback((Z,ie,ce)=>{ie.forEach((de,Te)=>{te(()=>{const Ee={sessionId:Z,...de.event,timestamp:new Date().toISOString()};z(Ee),de.event.eventType==="status"&&G(Z,de.event.content),Te===ie.length-1&&ce&&ce()},de.delayMs,Z)})},[te,z,G]),ee=S.useCallback((Z,ie,ce,de)=>{console.log("[MockGrackle] spawn",{environmentId:Z,prompt:ie,runtime:de});const Te=L("sess"),Ee={id:Te,environmentId:Z,runtime:de||"claude-code",status:"running",prompt:ie,startedAt:new Date().toISOString()};l(Le=>[...Le,Ee]),d(Te);const et=pe();if(console.log(`[MockGrackle] Playing scenario: ${et.label}`),et.pauseForInput){const Le=et.pauseAfterStep??et.steps.length-1,ot=et.steps.slice(0,Le+1),Dt=ot.length>0?ot[ot.length-1].delayMs:0;Y(Te,ot),te(()=>{G(Te,"idle"),z({sessionId:Te,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Dt+Ry,Te),et.resumeSteps&&ne.current.set(Te,et.resumeSteps)}else Y(Te,et.steps)},[L,pe,Y,te,G,z]),ke=S.useCallback(Z=>{console.log("[MockGrackle] kill",Z),ve(Z),ne.current.delete(Z),G(Z,"interrupted"),z({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),y(ie=>ie.map(ce=>ce.latestSessionId===Z&&ce.status==="working"?{...ce,status:"not_started"}:ce))},[ve,G,z]),je=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),qe=S.useCallback(Z=>{console.log("[MockGrackle] loadSessionEvents",Z)},[]),we=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),r([])},[]),_e=S.useCallback((Z,ie,ce,de)=>{console.log("[MockGrackle] createProject",{name:Z,description:ie});const Te={id:L("proj"),name:Z,description:ie||"",repoUrl:ce||"",defaultEnvironmentId:de||"",status:"active",worktreeBasePath:"",useWorktrees:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(Ee=>[...Ee,Te])},[L]),Ce=S.useCallback(Z=>{console.log("[MockGrackle] archiveProject",Z),p(ie=>ie.map(ce=>ce.id===Z?{...ce,status:"archived"}:ce))},[]),Q=S.useCallback(Z=>{console.log("[MockGrackle] loadTasks",Z)},[]),q=S.useCallback((Z,ie,ce,de,Te)=>{console.log("[MockGrackle] createTask",{projectId:Z,title:ie,parentTaskId:Te}),y(Ee=>{const Le=Ee.filter(Lt=>Lt.projectId===Z).reduce((Lt,rt)=>Math.max(Lt,rt.sortOrder),0),ot=Te?Ee.find(Lt=>Lt.id===Te):void 0;if(Te&&!ot)return console.warn("[MockGrackle] Parent task not found:",Te),Ee;if(ot&&!ot.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",Te),Ee;const Dt=ot?ot.depth+1:0,Tt={id:L("task"),projectId:Z,title:ie,description:ce||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:de||[],reviewNotes:void 0,sortOrder:Le+1,createdAt:new Date().toISOString(),parentTaskId:Te||"",depth:Dt,childTaskIds:[],canDecompose:!Te};return[...Ee,Tt]})},[L]),I=S.useCallback((Z,ie,ce)=>{var ot;console.log("[MockGrackle] startTask",{taskId:Z,runtime:ie});const de=F.current.find(Dt=>Dt.id===Z),Te=(de==null?void 0:de.title)??"",Ee=L("sess"),et={id:Ee,environmentId:"env-local-01",runtime:ie||"claude-code",status:"running",prompt:Te||Z,startedAt:new Date().toISOString()};l(Dt=>[...Dt,et]),y(Dt=>Dt.map(Tt=>Tt.id===Z?{...Tt,status:"working",latestSessionId:Ee,branch:`mock/${Z.slice(0,8)}`}:Tt));const Le=pe();if(console.log(`[MockGrackle] Playing task scenario: ${Le.label}`),Le.pauseForInput){const Dt=Le.pauseAfterStep??Le.steps.length-1,Tt=Le.steps.slice(0,Dt+1),Lt=Tt.length>0?Tt[Tt.length-1].delayMs:0;if(Y(Ee,Tt),te(()=>{G(Ee,"idle"),z({sessionId:Ee,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Lt+Ry,Ee),Le.resumeSteps){const rt=[...Le.resumeSteps];ne.current.set(Ee,rt);const Et=rt.reduce((cn,vt)=>Math.max(cn,vt.delayMs),0);ge.current.set(Ee,{taskId:Z,delayAfterResume:Et+200})}}else{const Dt=Le.steps.length>0?Le.steps[Le.steps.length-1].delayMs:0;Y(Ee,Le.steps);const Tt=(ot=Le.steps[Le.steps.length-1])==null?void 0:ot.event.content;te(()=>{Tt==="completed"?y(Lt=>Lt.map(rt=>rt.id===Z&&rt.status==="working"?{...rt,status:"paused"}:rt)):Tt==="failed"&&y(Lt=>Lt.map(rt=>rt.id===Z&&rt.status==="working"?{...rt,status:"failed"}:rt))},Dt+100,Ee)}},[L,pe,Y,te,G,z]),De=S.useCallback((Z,ie)=>{console.log("[MockGrackle] sendInput",{sessionId:Z,text:ie}),z({sessionId:Z,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${ie}`}),G(Z,"running"),z({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const ce=ne.current.get(Z);if(ce)ne.current.delete(Z),Y(Z,ce);else{const Te=[{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"}}];Y(Z,Te)}const de=ge.current.get(Z);de&&(ge.current.delete(Z),te(()=>{y(Te=>Te.map(Ee=>Ee.id===de.taskId&&Ee.status==="working"?{...Ee,status:"paused"}:Ee))},de.delayAfterResume,Z))},[z,G,Y,te]),$e=S.useCallback(Z=>{console.log("[MockGrackle] completeTask",Z),y(ie=>ie.map(ce=>ce.id===Z?{...ce,status:"complete"}:ce))},[]),yt=S.useCallback(Z=>{console.log("[MockGrackle] resumeTask",Z)},[]),xt=S.useCallback((Z,ie,ce,de)=>{console.log("[MockGrackle] updateTask",{taskId:Z,title:ie}),y(Te=>Te.map(Ee=>Ee.id===Z?{...Ee,title:ie.trim()||Ee.title,description:ce,dependsOn:de}:Ee))},[]),Pt=S.useCallback(Z=>{console.log("[MockGrackle] deleteTask",Z),y(ie=>ie.filter(ce=>ce.id!==Z))},[]),We=S.useCallback(Z=>{console.log("[MockGrackle] loadFindings",Z),x(Dy.filter(ie=>ie.projectId===Z))},[]),Ze=S.useCallback((Z,ie,ce,de,Te)=>{console.log("[MockGrackle] postFinding",{projectId:Z,title:ie});const Ee={id:L("find"),projectId:Z,taskId:"",sessionId:"",category:de||"general",title:ie,content:ce,tags:Te||[],createdAt:new Date().toISOString()};x(et=>[...et,Ee])},[L]),Ue=S.useCallback((Z,ie,ce,de)=>{console.log("[MockGrackle] addEnvironment",{displayName:Z,adapterType:ie,adapterConfig:ce,defaultRuntime:de})},[]),Sn=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),_n=S.useCallback((Z,ie,ce,de,Te)=>{console.log("[MockGrackle] setToken",{name:Z,tokenType:ce}),A(Ee=>[...Ee.filter(Le=>Le.name!==Z),{name:Z,tokenType:ce,envVar:de,filePath:Te,expiresAt:""}])},[]),Zn=S.useCallback(Z=>{console.log("[MockGrackle] deleteToken",Z),A(ie=>ie.filter(ce=>ce.name!==Z))},[]),an=S.useCallback(Z=>{console.log("[MockGrackle] updateCredentialProviders",Z),N(Z)},[]);S.useEffect(()=>()=>{J.current.forEach(clearTimeout),J.current.clear()},[]);const Xn=S.useMemo(()=>({connected:!0,environments:oE,sessions:a,events:o,eventsDropped:0,lastSpawnedId:u,projects:m,tasks:g,findings:b,tokens:T,credentialProviders:j,spawn:ee,sendInput:De,kill:ke,refresh:je,loadSessionEvents:qe,clearEvents:we,createProject:_e,archiveProject:Ce,updateProject:(Z,ie)=>{console.log("[MockGrackle] updateProject",{projectId:Z,...ie}),p(ce=>ce.map(de=>de.id!==Z?de:{...de,...ie.name!==void 0?{name:ie.name}:{},...ie.description!==void 0?{description:ie.description}:{},...ie.repoUrl!==void 0?{repoUrl:ie.repoUrl}:{},...ie.defaultEnvironmentId!==void 0?{defaultEnvironmentId:ie.defaultEnvironmentId}:{},...ie.worktreeBasePath!==void 0?{worktreeBasePath:ie.worktreeBasePath}:{},...ie.useWorktrees!==void 0?{useWorktrees:ie.useWorktrees}:{},updatedAt:new Date().toISOString()}))},loadTasks:Q,createTask:q,startTask:I,completeTask:$e,resumeTask:yt,updateTask:xt,deleteTask:Pt,loadFindings:We,postFinding:Ze,addEnvironment:Ue,loadTokens:Sn,setToken:_n,deleteToken:Zn,updateCredentialProviders:an,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:C,createPersona:(Z,ie,ce,de,Te,Ee)=>{console.log("[MockGrackle] createPersona",{name:Z});const et={id:`mock-persona-${Date.now()}`,name:Z,description:ie,systemPrompt:ce,toolConfig:"{}",runtime:de??"claude-code",model:Te||"",maxTurns:Ee||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};B(Le=>[...Le,et])},updatePersona:(Z,ie,ce,de,Te,Ee,et)=>{console.log("[MockGrackle] updatePersona",{personaId:Z,name:ie}),B(Le=>Le.map(ot=>ot.id!==Z?ot:{...ot,...ie!==void 0?{name:ie}:{},...ce!==void 0?{description:ce}:{},...de!==void 0?{systemPrompt:de}:{},...Te!==void 0?{runtime:Te}:{},...Ee!==void 0?{model:Ee}:{},...et!==void 0?{maxTurns:et}:{},updatedAt:new Date().toISOString()}))},deletePersona:Z=>{console.log("[MockGrackle] deletePersona",Z),B(ie=>ie.filter(ce=>ce.id!==Z))},taskSessions:R,loadTaskSessions:Z=>{console.log("[MockGrackle] loadTaskSessions",Z)}}),[a,o,u,m,g,b,T,j,C,R,ee,De,ke,je,qe,we,_e,Ce,Q,q,I,$e,yt,xt,Pt,We,Ze,Ue,Sn,_n,Zn,an]);return h.jsx(Hf.Provider,{value:Xn,children:n})}const z0=S.createContext(void 0),gE=4e3;function yE({children:n}){const[a,l]=S.useState([]),o=S.useRef(0),r=S.useCallback(d=>{l(m=>m.filter(p=>p.id!==d))},[]),u=S.useCallback((d,m="info",p=gE)=>{const g=`toast-${++o.current}`;l(y=>[...y,{id:g,message:d,variant:m,duration:p}])},[]);return h.jsx(z0.Provider,{value:{toasts:a,showToast:u,dismissToast:r},children:n})}function go(){const n=S.useContext(z0);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const hc=[{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"]}],V0=new Set(hc.map(n=>n.id)),My="grackle";function nf(n){return hc.find(a=>a.id===n)}const af="grackle-theme",I0="grackle-prefer-system",H0="(prefers-color-scheme: dark)";let Zl=[],Yr;function Bd(){Yr=void 0;for(const n of Zl)n()}function sf(){return typeof window>"u"?!1:window.matchMedia(H0).matches}function eo(){if(typeof localStorage>"u")return My;try{const n=localStorage.getItem(af);if(n!==null&&V0.has(n))return n}catch{}return My}function Qr(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(I0)==="true"}catch{return!1}}function lf(n){return hc.find(a=>a.variantLightId===n||a.variantDarkId===n)}function G0(n,a){const l=nf(n);if(l!=null&&l.variantDarkId)return a&&l.variantLightId?sf()?l.variantDarkId:l.variantLightId:l.variantDarkId;if(l!=null&&l.hidden&&a){const o=lf(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return sf()?o.variantDarkId:o.variantLightId}return n}function Li(n,a,l=!1){l&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=G0(n,a),l&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Li(eo(),Qr());function vE(){return Yr===void 0&&(Yr={themeId:eo(),systemDark:sf(),preferSystem:Qr()}),Yr}function bE(n){return Zl=[...Zl,n],()=>{Zl=Zl.filter(a=>a!==n)}}function SE(){const n=S.useSyncExternalStore(bE,vE),{themeId:a,preferSystem:l}=n,o=G0(a,l),r=S.useCallback(d=>{if(V0.has(d)){try{localStorage.setItem(af,d)}catch{}Li(d,Qr(),!0),Bd()}},[]),u=S.useCallback(d=>{try{localStorage.setItem(I0,d?"true":"false")}catch{}if(d){const m=eo(),p=nf(m);if(p!=null&&p.hidden){const g=lf(m);if(g)try{localStorage.setItem(af,g.id)}catch{}}}Li(eo(),d,!0),Bd()},[]);return S.useEffect(()=>{Li(a,l)},[a,l]),S.useEffect(()=>{if(typeof window>"u")return;const d=window.matchMedia(H0),m=()=>{const p=eo(),g=Qr();if(g){const y=nf(p);if(y!=null&&y.variantDarkId&&y.variantLightId&&Li(p,g),y!=null&&y.hidden){const b=lf(p);b!=null&&b.variantDarkId&&b.variantLightId&&Li(p,g)}}Bd()};return d.addEventListener("change",m),()=>{d.removeEventListener("change",m)}},[]),{themeId:a,setTheme:r,resolvedThemeId:o,preferSystem:l,setPreferSystem:u}}const P0=S.createContext(void 0);function _E({children:n}){const a=SE();return h.jsx(P0.Provider,{value:a,children:n})}function q0(){const n=S.useContext(P0);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}const xE="_container_eix8p_1",TE="_hamburger_eix8p_33",EE="_brand_eix8p_49",CE="_info_eix8p_65",AE="_connectionLabel_eix8p_80",jE="_connectionDot_eix8p_93",NE="_connected_eix8p_96",wE="_disconnected_eix8p_100",DE="_settingsButton_eix8p_104",Ma={container:xE,hamburger:TE,brand:EE,info:CE,connectionLabel:AE,connectionDot:jE,connected:NE,disconnected:wE,settingsButton:DE};function kE({onToggleSidebar:n,sidebarOpen:a}){const{connected:l,environments:o,sessions:r}=nn(),u=na(),d=o.length,m=o.filter(g=>g.status==="connected").length,p=r.filter(g=>["running","idle"].includes(g.status)).length;return h.jsxs("div",{className:Ma.container,children:[n&&h.jsx("button",{type:"button",className:Ma.hamburger,onClick:n,"aria-label":"Toggle sidebar","aria-expanded":a,children:"☰"}),h.jsx("button",{type:"button",className:Ma.brand,onClick:()=>u("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:Ma.info,children:[h.jsxs("span",{"aria-label":l?"Connected":"Disconnected",children:[h.jsx("span",{className:`${Ma.connectionDot} ${l?Ma.connected:Ma.disconnected}`,"aria-hidden":"true",children:"●"})," ",h.jsx("span",{className:Ma.connectionLabel,"aria-hidden":"true",children:l?"Connected":"Disconnected"})]}),h.jsxs("span",{children:[m,"/",d," env",d!==1?"s":""]}),h.jsxs("span",{children:[p," active"]}),h.jsx("button",{className:Ma.settingsButton,onClick:()=>u(Gi),title:"Settings",children:"⚙"})]})]})}const Gf=S.createContext({});function Pf(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const mc=S.createContext(null),qf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class RE extends S.Component{getSnapshotBeforeUpdate(a){const l=this.props.childRef.current;if(l&&a.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 ME({children:n,isPresent:a}){const l=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0}),{nonce:u}=S.useContext(qf);return S.useInsertionEffect(()=>{const{width:d,height:m,top:p,left:g}=r.current;if(a||!o.current||!d||!m)return;o.current.dataset.motionPopId=l;const y=document.createElement("style");return u&&(y.nonce=u),document.head.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
79
|
-
[data-motion-pop-id="${l}"] {
|
|
80
|
-
position: absolute !important;
|
|
81
|
-
width: ${d}px !important;
|
|
82
|
-
height: ${m}px !important;
|
|
83
|
-
top: ${p}px !important;
|
|
84
|
-
left: ${g}px !important;
|
|
85
|
-
}
|
|
86
|
-
`),()=>{document.head.removeChild(y)}},[a]),h.jsx(RE,{isPresent:a,childRef:o,sizeRef:r,children:S.cloneElement(n,{ref:o})})}const OE=({children:n,initial:a,isPresent:l,onExitComplete:o,custom:r,presenceAffectsLayout:u,mode:d})=>{const m=Pf(BE),p=S.useId(),g=S.useCallback(b=>{m.set(b,!0);for(const x of m.values())if(!x)return;o&&o()},[m,o]),y=S.useMemo(()=>({id:p,initial:a,isPresent:l,custom:r,onExitComplete:g,register:b=>(m.set(b,!1),()=>m.delete(b))}),u?[Math.random(),g]:[l,g]);return S.useMemo(()=>{m.forEach((b,x)=>m.set(x,!1))},[l]),S.useEffect(()=>{!l&&!m.size&&o&&o()},[l]),d==="popLayout"&&(n=h.jsx(ME,{isPresent:l,children:n})),h.jsx(mc.Provider,{value:y,children:n})};function BE(){return new Map}function F0(n=!0){const a=S.useContext(mc);if(a===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:r}=a,u=S.useId();S.useEffect(()=>{n&&r(u)},[n]);const d=S.useCallback(()=>n&&o&&o(u),[u,o,n]);return!l&&o?[!1,d]:[!0]}const Ur=n=>n.key||"";function Oy(n){const a=[];return S.Children.forEach(n,l=>{S.isValidElement(l)&&a.push(l)}),a}const Ff=typeof window<"u",$0=Ff?S.useLayoutEffect:S.useEffect,vs=({children:n,custom:a,initial:l=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:u="sync",propagate:d=!1})=>{const[m,p]=F0(d),g=S.useMemo(()=>Oy(n),[n]),y=d&&!m?[]:g.map(Ur),b=S.useRef(!0),x=S.useRef(g),T=Pf(()=>new Map),[A,j]=S.useState(g),[N,C]=S.useState(g);$0(()=>{b.current=!1,x.current=g;for(let X=0;X<N.length;X++){const H=Ur(N[X]);y.includes(H)?T.delete(H):T.get(H)!==!0&&T.set(H,!1)}},[N,y.length,y.join("-")]);const B=[];if(g!==A){let X=[...g];for(let H=0;H<N.length;H++){const J=N[H],W=Ur(J);y.includes(W)||(X.splice(H,0,J),B.push(J))}u==="wait"&&B.length&&(X=B),C(Oy(X)),j(g);return}const{forceRender:R}=S.useContext(Gf);return h.jsx(h.Fragment,{children:N.map(X=>{const H=Ur(X),J=d&&!m?!1:g===N||y.includes(H),W=()=>{if(T.has(H))T.set(H,!0);else return;let F=!0;T.forEach(ne=>{ne||(F=!1)}),F&&(R==null||R(),C(x.current),d&&(p==null||p()),o&&o())};return h.jsx(OE,{isPresent:J,initial:!b.current||l?void 0:!1,custom:J?void 0:a,presenceAffectsLayout:r,mode:u,onExitComplete:J?void 0:W,children:X},H)})})},Dn=n=>n;let Y0=Dn;const LE={useManualTiming:!1};function UE(n){let a=new Set,l=new Set,o=!1,r=!1;const u=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function m(g){u.has(g)&&(p.schedule(g),n()),g(d)}const p={schedule:(g,y=!1,b=!1)=>{const T=b&&o?a:l;return y&&u.add(g),T.has(g)||T.add(g),g},cancel:g=>{l.delete(g),u.delete(g)},process:g=>{if(d=g,o){r=!0;return}o=!0,[a,l]=[l,a],a.forEach(m),a.clear(),o=!1,r&&(r=!1,p.process(g))}};return p}const zr=["read","resolveKeyframes","update","preRender","render","postRender"],zE=40;function K0(n,a){let l=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},u=()=>l=!0,d=zr.reduce((C,B)=>(C[B]=UE(u),C),{}),{read:m,resolveKeyframes:p,update:g,preRender:y,render:b,postRender:x}=d,T=()=>{const C=performance.now();l=!1,r.delta=o?1e3/60:Math.max(Math.min(C-r.timestamp,zE),1),r.timestamp=C,r.isProcessing=!0,m.process(r),p.process(r),g.process(r),y.process(r),b.process(r),x.process(r),r.isProcessing=!1,l&&a&&(o=!1,n(T))},A=()=>{l=!0,o=!0,r.isProcessing||n(T)};return{schedule:zr.reduce((C,B)=>{const R=d[B];return C[B]=(X,H=!1,J=!1)=>(l||A(),R.schedule(X,H,J)),C},{}),cancel:C=>{for(let B=0;B<zr.length;B++)d[zr[B]].cancel(C)},state:r,steps:d}}const{schedule:ft,cancel:ps,state:tn,steps:Ld}=K0(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dn,!0),Z0=S.createContext({strict:!1}),By={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"]},Pi={};for(const n in By)Pi[n]={isEnabled:a=>By[n].some(l=>!!a[l])};function VE(n){for(const a in n)Pi[a]={...Pi[a],...n[a]}}const IE=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 Jr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||IE.has(n)}let X0=n=>!Jr(n);function HE(n){n&&(X0=a=>a.startsWith("on")?!Jr(a):n(a))}try{HE(require("@emotion/is-prop-valid").default)}catch{}function GE(n,a,l){const o={};for(const r in n)r==="values"&&typeof n.values=="object"||(X0(r)||l===!0&&Jr(r)||!a&&!Jr(r)||n.draggable&&r.startsWith("onDrag"))&&(o[r]=n[r]);return o}function PE(n){if(typeof Proxy>"u")return n;const a=new Map,l=(...o)=>n(...o);return new Proxy(l,{get:(o,r)=>r==="create"?n:(a.has(r)||a.set(r,n(r)),a.get(r))})}const pc=S.createContext({});function ro(n){return typeof n=="string"||Array.isArray(n)}function gc(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const $f=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yf=["initial",...$f];function yc(n){return gc(n.animate)||Yf.some(a=>ro(n[a]))}function Q0(n){return!!(yc(n)||n.variants)}function qE(n,a){if(yc(n)){const{initial:l,animate:o}=n;return{initial:l===!1||ro(l)?l:void 0,animate:ro(o)?o:void 0}}return n.inherit!==!1?a:{}}function FE(n){const{initial:a,animate:l}=qE(n,S.useContext(pc));return S.useMemo(()=>({initial:a,animate:l}),[Ly(a),Ly(l)])}function Ly(n){return Array.isArray(n)?n.join(" "):n}const $E=Symbol.for("motionComponentSymbol");function Ui(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function YE(n,a,l){return S.useCallback(o=>{o&&n.onMount&&n.onMount(o),a&&(o?a.mount(o):a.unmount()),l&&(typeof l=="function"?l(o):Ui(l)&&(l.current=o))},[a])}const Kf=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),KE="framerAppearId",J0="data-"+Kf(KE),{schedule:Zf}=K0(queueMicrotask,!1),W0=S.createContext({});function ZE(n,a,l,o,r){var u,d;const{visualElement:m}=S.useContext(pc),p=S.useContext(Z0),g=S.useContext(mc),y=S.useContext(qf).reducedMotion,b=S.useRef(null);o=o||p.renderer,!b.current&&o&&(b.current=o(n,{visualState:a,parent:m,props:l,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:y}));const x=b.current,T=S.useContext(W0);x&&!x.projection&&r&&(x.type==="html"||x.type==="svg")&&XE(b.current,l,r,T);const A=S.useRef(!1);S.useInsertionEffect(()=>{x&&A.current&&x.update(l,g)});const j=l[J0],N=S.useRef(!!j&&!(!((u=window.MotionHandoffIsComplete)===null||u===void 0)&&u.call(window,j))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,j)));return $0(()=>{x&&(A.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),Zf.render(x.render),N.current&&x.animationState&&x.animationState.animateChanges())}),S.useEffect(()=>{x&&(!N.current&&x.animationState&&x.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)===null||C===void 0||C.call(window,j)}),N.current=!1))}),x}function XE(n,a,l,o){const{layoutId:r,layout:u,drag:d,dragConstraints:m,layoutScroll:p,layoutRoot:g}=a;n.projection=new l(n.latestValues,a["data-framer-portal-id"]?void 0:eb(n.parent)),n.projection.setOptions({layoutId:r,layout:u,alwaysMeasureLayout:!!d||m&&Ui(m),visualElement:n,animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:p,layoutRoot:g})}function eb(n){if(n)return n.options.allowProjection!==!1?n.projection:eb(n.parent)}function QE({preloadedFeatures:n,createVisualElement:a,useRender:l,useVisualState:o,Component:r}){var u,d;n&&VE(n);function m(g,y){let b;const x={...S.useContext(qf),...g,layoutId:JE(g)},{isStatic:T}=x,A=FE(g),j=o(g,T);if(!T&&Ff){WE();const N=eC(x);b=N.MeasureLayout,A.visualElement=ZE(r,j,x,a,N.ProjectionNode)}return h.jsxs(pc.Provider,{value:A,children:[b&&A.visualElement?h.jsx(b,{visualElement:A.visualElement,...x}):null,l(r,g,YE(j,A.visualElement,y),j,T,A.visualElement)]})}m.displayName=`motion.${typeof r=="string"?r:`create(${(d=(u=r.displayName)!==null&&u!==void 0?u:r.name)!==null&&d!==void 0?d:""})`}`;const p=S.forwardRef(m);return p[$E]=r,p}function JE({layoutId:n}){const a=S.useContext(Gf).id;return a&&n!==void 0?a+"-"+n:n}function WE(n,a){S.useContext(Z0).strict}function eC(n){const{drag:a,layout:l}=Pi;if(!a&&!l)return{};const o={...a,...l};return{MeasureLayout:a!=null&&a.isEnabled(n)||l!=null&&l.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const tC=["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 Xf(n){return typeof n!="string"||n.includes("-")?!1:!!(tC.indexOf(n)>-1||/[A-Z]/u.test(n))}function Uy(n){const a=[{},{}];return n==null||n.values.forEach((l,o)=>{a[0][o]=l.get(),a[1][o]=l.getVelocity()}),a}function Qf(n,a,l,o){if(typeof a=="function"){const[r,u]=Uy(o);a=a(l!==void 0?l:n.custom,r,u)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[r,u]=Uy(o);a=a(l!==void 0?l:n.custom,r,u)}return a}const of=n=>Array.isArray(n),nC=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),aC=n=>of(n)?n[n.length-1]||0:n,on=n=>!!(n&&n.getVelocity);function Kr(n){const a=on(n)?n.get():n;return nC(a)?a.toValue():a}function sC({scrapeMotionValuesFromProps:n,createRenderState:a,onUpdate:l},o,r,u){const d={latestValues:iC(o,r,u,n),renderState:a()};return l&&(d.onMount=m=>l({props:o,current:m,...d}),d.onUpdate=m=>l(m)),d}const tb=n=>(a,l)=>{const o=S.useContext(pc),r=S.useContext(mc),u=()=>sC(n,a,o,r);return l?u():Pf(u)};function iC(n,a,l,o){const r={},u=o(n,{});for(const x in u)r[x]=Kr(u[x]);let{initial:d,animate:m}=n;const p=yc(n),g=Q0(n);a&&g&&!p&&n.inherit!==!1&&(d===void 0&&(d=a.initial),m===void 0&&(m=a.animate));let y=l?l.initial===!1:!1;y=y||d===!1;const b=y?m:d;if(b&&typeof b!="boolean"&&!gc(b)){const x=Array.isArray(b)?b:[b];for(let T=0;T<x.length;T++){const A=Qf(n,x[T]);if(A){const{transitionEnd:j,transition:N,...C}=A;for(const B in C){let R=C[B];if(Array.isArray(R)){const X=y?R.length-1:0;R=R[X]}R!==null&&(r[B]=R)}for(const B in j)r[B]=j[B]}}}return r}const Ki=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Zs=new Set(Ki),nb=n=>a=>typeof a=="string"&&a.startsWith(n),ab=nb("--"),lC=nb("var(--"),Jf=n=>lC(n)?oC.test(n.split("/*")[0].trim()):!1,oC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,sb=(n,a)=>a&&typeof n=="number"?a.transform(n):n,za=(n,a,l)=>l>a?a:l<n?n:l,Zi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},co={...Zi,transform:n=>za(0,1,n)},Vr={...Zi,default:1},yo=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),us=yo("deg"),fa=yo("%"),xe=yo("px"),rC=yo("vh"),cC=yo("vw"),zy={...fa,parse:n=>fa.parse(n)/100,transform:n=>fa.transform(n*100)},uC={borderWidth:xe,borderTopWidth:xe,borderRightWidth:xe,borderBottomWidth:xe,borderLeftWidth:xe,borderRadius:xe,radius:xe,borderTopLeftRadius:xe,borderTopRightRadius:xe,borderBottomRightRadius:xe,borderBottomLeftRadius:xe,width:xe,maxWidth:xe,height:xe,maxHeight:xe,top:xe,right:xe,bottom:xe,left:xe,padding:xe,paddingTop:xe,paddingRight:xe,paddingBottom:xe,paddingLeft:xe,margin:xe,marginTop:xe,marginRight:xe,marginBottom:xe,marginLeft:xe,backgroundPositionX:xe,backgroundPositionY:xe},dC={rotate:us,rotateX:us,rotateY:us,rotateZ:us,scale:Vr,scaleX:Vr,scaleY:Vr,scaleZ:Vr,skew:us,skewX:us,skewY:us,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:co,originX:zy,originY:zy,originZ:xe},Vy={...Zi,transform:Math.round},Wf={...uC,...dC,zIndex:Vy,size:xe,fillOpacity:co,strokeOpacity:co,numOctaves:Vy},fC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hC=Ki.length;function mC(n,a,l){let o="",r=!0;for(let u=0;u<hC;u++){const d=Ki[u],m=n[d];if(m===void 0)continue;let p=!0;if(typeof m=="number"?p=m===(d.startsWith("scale")?1:0):p=parseFloat(m)===0,!p||l){const g=sb(m,Wf[d]);if(!p){r=!1;const y=fC[d]||d;o+=`${y}(${g}) `}l&&(a[d]=g)}}return o=o.trim(),l?o=l(a,r?"":o):r&&(o="none"),o}function eh(n,a,l){const{style:o,vars:r,transformOrigin:u}=n;let d=!1,m=!1;for(const p in a){const g=a[p];if(Zs.has(p)){d=!0;continue}else if(ab(p)){r[p]=g;continue}else{const y=sb(g,Wf[p]);p.startsWith("origin")?(m=!0,u[p]=y):o[p]=y}}if(a.transform||(d||l?o.transform=mC(a,n.transform,l):o.transform&&(o.transform="none")),m){const{originX:p="50%",originY:g="50%",originZ:y=0}=u;o.transformOrigin=`${p} ${g} ${y}`}}const pC={offset:"stroke-dashoffset",array:"stroke-dasharray"},gC={offset:"strokeDashoffset",array:"strokeDasharray"};function yC(n,a,l=1,o=0,r=!0){n.pathLength=1;const u=r?pC:gC;n[u.offset]=xe.transform(-o);const d=xe.transform(a),m=xe.transform(l);n[u.array]=`${d} ${m}`}function Iy(n,a,l){return typeof n=="string"?n:xe.transform(a+l*n)}function vC(n,a,l){const o=Iy(a,n.x,n.width),r=Iy(l,n.y,n.height);return`${o} ${r}`}function th(n,{attrX:a,attrY:l,attrScale:o,originX:r,originY:u,pathLength:d,pathSpacing:m=1,pathOffset:p=0,...g},y,b){if(eh(n,g,b),y){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:x,style:T,dimensions:A}=n;x.transform&&(A&&(T.transform=x.transform),delete x.transform),A&&(r!==void 0||u!==void 0||T.transform)&&(T.transformOrigin=vC(A,r!==void 0?r:.5,u!==void 0?u:.5)),a!==void 0&&(x.x=a),l!==void 0&&(x.y=l),o!==void 0&&(x.scale=o),d!==void 0&&yC(x,d,m,p,!1)}const nh=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),ib=()=>({...nh(),attrs:{}}),ah=n=>typeof n=="string"&&n.toLowerCase()==="svg";function lb(n,{style:a,vars:l},o,r){Object.assign(n.style,a,r&&r.getProjectionStyles(o));for(const u in l)n.style.setProperty(u,l[u])}const ob=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 rb(n,a,l,o){lb(n,a,void 0,o);for(const r in a.attrs)n.setAttribute(ob.has(r)?r:Kf(r),a.attrs[r])}const Wr={};function bC(n){Object.assign(Wr,n)}function cb(n,{layout:a,layoutId:l}){return Zs.has(n)||n.startsWith("origin")||(a||l!==void 0)&&(!!Wr[n]||n==="opacity")}function sh(n,a,l){var o;const{style:r}=n,u={};for(const d in r)(on(r[d])||a.style&&on(a.style[d])||cb(d,n)||((o=l==null?void 0:l.getValue(d))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(u[d]=r[d]);return u}function ub(n,a,l){const o=sh(n,a,l);for(const r in n)if(on(n[r])||on(a[r])){const u=Ki.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[u]=n[r]}return o}function SC(n,a){try{a.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{a.dimensions={x:0,y:0,width:0,height:0}}}const Hy=["x","y","width","height","cx","cy","r"],_C={useVisualState:tb({scrapeMotionValuesFromProps:ub,createRenderState:ib,onUpdate:({props:n,prevProps:a,current:l,renderState:o,latestValues:r})=>{if(!l)return;let u=!!n.drag;if(!u){for(const m in r)if(Zs.has(m)){u=!0;break}}if(!u)return;let d=!a;if(a)for(let m=0;m<Hy.length;m++){const p=Hy[m];n[p]!==a[p]&&(d=!0)}d&&ft.read(()=>{SC(l,o),ft.render(()=>{th(o,r,ah(l.tagName),n.transformTemplate),rb(l,o)})})}})},xC={useVisualState:tb({scrapeMotionValuesFromProps:sh,createRenderState:nh})};function db(n,a,l){for(const o in a)!on(a[o])&&!cb(o,l)&&(n[o]=a[o])}function TC({transformTemplate:n},a){return S.useMemo(()=>{const l=nh();return eh(l,a,n),Object.assign({},l.vars,l.style)},[a])}function EC(n,a){const l=n.style||{},o={};return db(o,l,n),Object.assign(o,TC(n,a)),o}function CC(n,a){const l={},o=EC(n,a);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 AC(n,a,l,o){const r=S.useMemo(()=>{const u=ib();return th(u,a,ah(o),n.transformTemplate),{...u.attrs,style:{...u.style}}},[a]);if(n.style){const u={};db(u,n.style,n),r.style={...u,...r.style}}return r}function jC(n=!1){return(l,o,r,{latestValues:u},d)=>{const p=(Xf(l)?AC:CC)(o,u,d,l),g=GE(o,typeof l=="string",n),y=l!==S.Fragment?{...g,...p,ref:r}:{},{children:b}=o,x=S.useMemo(()=>on(b)?b.get():b,[b]);return S.createElement(l,{...y,children:x})}}function NC(n,a){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const d={...Xf(o)?_C:xC,preloadedFeatures:n,useRender:jC(r),createVisualElement:a,Component:o};return QE(d)}}function fb(n,a){if(!Array.isArray(a))return!1;const l=a.length;if(l!==n.length)return!1;for(let o=0;o<l;o++)if(a[o]!==n[o])return!1;return!0}function vc(n,a,l){const o=n.getProps();return Qf(o,a,l!==void 0?l:o.custom,n)}function ih(n,a){return n?n[a]||n.default||n:void 0}const hb=new Set(["width","height","top","left","right","bottom",...Ki]);let Zr;function wC(){Zr=void 0}const ha={now:()=>(Zr===void 0&&ha.set(tn.isProcessing||LE.useManualTiming?tn.timestamp:performance.now()),Zr),set:n=>{Zr=n,queueMicrotask(wC)}};function lh(n,a){n.indexOf(a)===-1&&n.push(a)}function oh(n,a){const l=n.indexOf(a);l>-1&&n.splice(l,1)}class rh{constructor(){this.subscriptions=[]}add(a){return lh(this.subscriptions,a),()=>oh(this.subscriptions,a)}notify(a,l,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](a,l,o);else for(let u=0;u<r;u++){const d=this.subscriptions[u];d&&d(a,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function mb(n,a){return a?n*(1e3/a):0}const Gy=30,DC=n=>!isNaN(parseFloat(n));class kC{constructor(a,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const u=ha.now();this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(a),this.owner=l.owner}setCurrent(a){this.current=a,this.updatedAt=ha.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=DC(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,l){this.events[a]||(this.events[a]=new rh);const o=this.events[a].add(l);return a==="change"?()=>{o(),ft.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,l){this.passiveEffect=a,this.stopPassiveEffect=l}set(a,l=!0){!l||!this.passiveEffect?this.updateAndNotify(a,l):this.passiveEffect(a,this.updateAndNotify)}setWithVelocity(a,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,l=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=ha.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Gy)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,Gy);return mb(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(a){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=a(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 uo(n,a){return new kC(n,a)}function RC(n,a,l){n.hasValue(a)?n.getValue(a).set(l):n.addValue(a,uo(l))}function MC(n,a){const l=vc(n,a);let{transitionEnd:o={},transition:r={},...u}=l||{};u={...u,...o};for(const d in u){const m=aC(u[d]);RC(n,d,m)}}function OC(n){return!!(on(n)&&n.add)}function rf(n,a){const l=n.getValue("willChange");if(OC(l))return l.add(a)}function pb(n){return n.props[J0]}function ch(n){let a;return()=>(a===void 0&&(a=n()),a)}const BC=ch(()=>window.ScrollTimeline!==void 0);class LC{constructor(a){this.stop=()=>this.runAll("stop"),this.animations=a.filter(Boolean)}get finished(){return Promise.all(this.animations.map(a=>"finished"in a?a.finished:a))}getAll(a){return this.animations[0][a]}setAll(a,l){for(let o=0;o<this.animations.length;o++)this.animations[o][a]=l}attachTimeline(a,l){const o=this.animations.map(r=>{if(BC()&&r.attachTimeline)return r.attachTimeline(a);if(typeof l=="function")return l(r)});return()=>{o.forEach((r,u)=>{r&&r(),this.animations[u].stop()})}}get time(){return this.getAll("time")}set time(a){this.setAll("time",a)}get speed(){return this.getAll("speed")}set speed(a){this.setAll("speed",a)}get startTime(){return this.getAll("startTime")}get duration(){let a=0;for(let l=0;l<this.animations.length;l++)a=Math.max(a,this.animations[l].duration);return a}runAll(a){this.animations.forEach(l=>l[a]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class UC extends LC{then(a,l){return Promise.all(this.animations).then(a).catch(l)}}const Ba=n=>n*1e3,La=n=>n/1e3;function uh(n){return typeof n=="function"}function Py(n,a){n.timeline=a,n.onfinish=null}const dh=n=>Array.isArray(n)&&typeof n[0]=="number",zC={linearEasing:void 0};function VC(n,a){const l=ch(n);return()=>{var o;return(o=zC[a])!==null&&o!==void 0?o:l()}}const ec=VC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),qi=(n,a,l)=>{const o=a-n;return o===0?1:(l-n)/o},gb=(n,a,l=10)=>{let o="";const r=Math.max(Math.round(a/l),2);for(let u=0;u<r;u++)o+=n(qi(0,r-1,u))+", ";return`linear(${o.substring(0,o.length-2)})`};function yb(n){return!!(typeof n=="function"&&ec()||!n||typeof n=="string"&&(n in cf||ec())||dh(n)||Array.isArray(n)&&n.every(yb))}const Xl=([n,a,l,o])=>`cubic-bezier(${n}, ${a}, ${l}, ${o})`,cf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xl([0,.65,.55,1]),circOut:Xl([.55,0,1,.45]),backIn:Xl([.31,.01,.66,-.59]),backOut:Xl([.33,1.53,.69,.99])};function vb(n,a){if(n)return typeof n=="function"&&ec()?gb(n,a):dh(n)?Xl(n):Array.isArray(n)?n.map(l=>vb(l,a)||cf.easeOut):cf[n]}const bb=(n,a,l)=>(((1-3*l+3*a)*n+(3*l-6*a))*n+3*a)*n,IC=1e-7,HC=12;function GC(n,a,l,o,r){let u,d,m=0;do d=a+(l-a)/2,u=bb(d,o,r)-n,u>0?l=d:a=d;while(Math.abs(u)>IC&&++m<HC);return d}function vo(n,a,l,o){if(n===a&&l===o)return Dn;const r=u=>GC(u,0,1,n,l);return u=>u===0||u===1?u:bb(r(u),a,o)}const Sb=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,_b=n=>a=>1-n(1-a),xb=vo(.33,1.53,.69,.99),fh=_b(xb),Tb=Sb(fh),Eb=n=>(n*=2)<1?.5*fh(n):.5*(2-Math.pow(2,-10*(n-1))),hh=n=>1-Math.sin(Math.acos(n)),Cb=_b(hh),Ab=Sb(hh),jb=n=>/^0[^.\s]+$/u.test(n);function PC(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||jb(n):!0}const to=n=>Math.round(n*1e5)/1e5,mh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qC(n){return n==null}const FC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ph=(n,a)=>l=>!!(typeof l=="string"&&FC.test(l)&&l.startsWith(n)||a&&!qC(l)&&Object.prototype.hasOwnProperty.call(l,a)),Nb=(n,a,l)=>o=>{if(typeof o!="string")return o;const[r,u,d,m]=o.match(mh);return{[n]:parseFloat(r),[a]:parseFloat(u),[l]:parseFloat(d),alpha:m!==void 0?parseFloat(m):1}},$C=n=>za(0,255,n),Ud={...Zi,transform:n=>Math.round($C(n))},qs={test:ph("rgb","red"),parse:Nb("red","green","blue"),transform:({red:n,green:a,blue:l,alpha:o=1})=>"rgba("+Ud.transform(n)+", "+Ud.transform(a)+", "+Ud.transform(l)+", "+to(co.transform(o))+")"};function YC(n){let a="",l="",o="",r="";return n.length>5?(a=n.substring(1,3),l=n.substring(3,5),o=n.substring(5,7),r=n.substring(7,9)):(a=n.substring(1,2),l=n.substring(2,3),o=n.substring(3,4),r=n.substring(4,5),a+=a,l+=l,o+=o,r+=r),{red:parseInt(a,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const uf={test:ph("#"),parse:YC,transform:qs.transform},zi={test:ph("hsl","hue"),parse:Nb("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:l,alpha:o=1})=>"hsla("+Math.round(n)+", "+fa.transform(to(a))+", "+fa.transform(to(l))+", "+to(co.transform(o))+")"},ln={test:n=>qs.test(n)||uf.test(n)||zi.test(n),parse:n=>qs.test(n)?qs.parse(n):zi.test(n)?zi.parse(n):uf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?qs.transform(n):zi.transform(n)},KC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ZC(n){var a,l;return isNaN(n)&&typeof n=="string"&&(((a=n.match(mh))===null||a===void 0?void 0:a.length)||0)+(((l=n.match(KC))===null||l===void 0?void 0:l.length)||0)>0}const wb="number",Db="color",XC="var",QC="var(",qy="${}",JC=/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 fo(n){const a=n.toString(),l=[],o={color:[],number:[],var:[]},r=[];let u=0;const m=a.replace(JC,p=>(ln.test(p)?(o.color.push(u),r.push(Db),l.push(ln.parse(p))):p.startsWith(QC)?(o.var.push(u),r.push(XC),l.push(p)):(o.number.push(u),r.push(wb),l.push(parseFloat(p))),++u,qy)).split(qy);return{values:l,split:m,indexes:o,types:r}}function kb(n){return fo(n).values}function Rb(n){const{split:a,types:l}=fo(n),o=a.length;return r=>{let u="";for(let d=0;d<o;d++)if(u+=a[d],r[d]!==void 0){const m=l[d];m===wb?u+=to(r[d]):m===Db?u+=ln.transform(r[d]):u+=r[d]}return u}}const WC=n=>typeof n=="number"?0:n;function eA(n){const a=kb(n);return Rb(n)(a.map(WC))}const gs={test:ZC,parse:kb,createTransformer:Rb,getAnimatableNone:eA},tA=new Set(["brightness","contrast","saturate","opacity"]);function nA(n){const[a,l]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=l.match(mh)||[];if(!o)return n;const r=l.replace(o,"");let u=tA.has(a)?1:0;return o!==l&&(u*=100),a+"("+u+r+")"}const aA=/\b([a-z-]*)\(.*?\)/gu,df={...gs,getAnimatableNone:n=>{const a=n.match(aA);return a?a.map(nA).join(" "):n}},sA={...Wf,color:ln,backgroundColor:ln,outlineColor:ln,fill:ln,stroke:ln,borderColor:ln,borderTopColor:ln,borderRightColor:ln,borderBottomColor:ln,borderLeftColor:ln,filter:df,WebkitFilter:df},gh=n=>sA[n];function Mb(n,a){let l=gh(n);return l!==df&&(l=gs),l.getAnimatableNone?l.getAnimatableNone(a):void 0}const iA=new Set(["auto","none","0"]);function lA(n,a,l){let o=0,r;for(;o<n.length&&!r;){const u=n[o];typeof u=="string"&&!iA.has(u)&&fo(u).values.length&&(r=n[o]),o++}if(r&&l)for(const u of a)n[u]=Mb(l,r)}const Fy=n=>n===Zi||n===xe,$y=(n,a)=>parseFloat(n.split(", ")[a]),Yy=(n,a)=>(l,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return $y(r[1],a);{const u=o.match(/^matrix\((.+)\)$/u);return u?$y(u[1],n):0}},oA=new Set(["x","y","z"]),rA=Ki.filter(n=>!oA.has(n));function cA(n){const a=[];return rA.forEach(l=>{const o=n.getValue(l);o!==void 0&&(a.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),a}const Fi={width:({x:n},{paddingLeft:a="0",paddingRight:l="0"})=>n.max-n.min-parseFloat(a)-parseFloat(l),height:({y:n},{paddingTop:a="0",paddingBottom:l="0"})=>n.max-n.min-parseFloat(a)-parseFloat(l),top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:Yy(4,13),y:Yy(5,14)};Fi.translateX=Fi.x;Fi.translateY=Fi.y;const Fs=new Set;let ff=!1,hf=!1;function Ob(){if(hf){const n=Array.from(Fs).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),l=new Map;a.forEach(o=>{const r=cA(o);r.length&&(l.set(o,r),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const r=l.get(o);r&&r.forEach(([u,d])=>{var m;(m=o.getValue(u))===null||m===void 0||m.set(d)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}hf=!1,ff=!1,Fs.forEach(n=>n.complete()),Fs.clear()}function Bb(){Fs.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(hf=!0)})}function uA(){Bb(),Ob()}class yh{constructor(a,l,o,r,u,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...a],this.onComplete=l,this.name=o,this.motionValue=r,this.element=u,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Fs.add(this),ff||(ff=!0,ft.read(Bb),ft.resolveKeyframes(Ob))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:l,element:o,motionValue:r}=this;for(let u=0;u<a.length;u++)if(a[u]===null)if(u===0){const d=r==null?void 0:r.get(),m=a[a.length-1];if(d!==void 0)a[0]=d;else if(o&&l){const p=o.readValue(l,m);p!=null&&(a[0]=p)}a[0]===void 0&&(a[0]=m),r&&d===void 0&&r.set(a[0])}else a[u]=a[u-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Fs.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Fs.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Lb=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),dA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function fA(n){const a=dA.exec(n);if(!a)return[,];const[,l,o,r]=a;return[`--${l??o}`,r]}function Ub(n,a,l=1){const[o,r]=fA(n);if(!o)return;const u=window.getComputedStyle(a).getPropertyValue(o);if(u){const d=u.trim();return Lb(d)?parseFloat(d):d}return Jf(r)?Ub(r,a,l+1):r}const zb=n=>a=>a.test(n),hA={test:n=>n==="auto",parse:n=>n},Vb=[Zi,xe,fa,us,cC,rC,hA],Ky=n=>Vb.find(zb(n));class Ib extends yh{constructor(a,l,o,r,u){super(a,l,o,r,u,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let p=0;p<a.length;p++){let g=a[p];if(typeof g=="string"&&(g=g.trim(),Jf(g))){const y=Ub(g,l.current);y!==void 0&&(a[p]=y),p===a.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!hb.has(o)||a.length!==2)return;const[r,u]=a,d=Ky(r),m=Ky(u);if(d!==m)if(Fy(d)&&Fy(m))for(let p=0;p<a.length;p++){const g=a[p];typeof g=="string"&&(a[p]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:l}=this,o=[];for(let r=0;r<a.length;r++)PC(a[r])&&o.push(r);o.length&&lA(a,o,l)}measureInitialState(){const{element:a,unresolvedKeyframes:l,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Fi[o](a.measureViewportBox(),window.getComputedStyle(a.current)),l[0]=this.measuredOrigin;const r=l[l.length-1];r!==void 0&&a.getValue(o,r).jump(r,!1)}measureEndState(){var a;const{element:l,name:o,unresolvedKeyframes:r}=this;if(!l||!l.current)return;const u=l.getValue(o);u&&u.jump(this.measuredOrigin,!1);const d=r.length-1,m=r[d];r[d]=Fi[o](l.measureViewportBox(),window.getComputedStyle(l.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),!((a=this.removedTransforms)===null||a===void 0)&&a.length&&this.removedTransforms.forEach(([p,g])=>{l.getValue(p).set(g)}),this.resolveNoneKeyframes()}}const Zy=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(gs.test(n)||n==="0")&&!n.startsWith("url("));function mA(n){const a=n[0];if(n.length===1)return!0;for(let l=0;l<n.length;l++)if(n[l]!==a)return!0}function pA(n,a,l,o){const r=n[0];if(r===null)return!1;if(a==="display"||a==="visibility")return!0;const u=n[n.length-1],d=Zy(r,a),m=Zy(u,a);return!d||!m?!1:mA(n)||(l==="spring"||uh(l))&&o}const gA=n=>n!==null;function bc(n,{repeat:a,repeatType:l="loop"},o){const r=n.filter(gA),u=a&&l!=="loop"&&a%2===1?0:r.length-1;return!u||o===void 0?r[u]:o}const yA=40;class Hb{constructor({autoplay:a=!0,delay:l=0,type:o="keyframes",repeat:r=0,repeatDelay:u=0,repeatType:d="loop",...m}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ha.now(),this.options={autoplay:a,delay:l,type:o,repeat:r,repeatDelay:u,repeatType:d,...m},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>yA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&uA(),this._resolved}onKeyframesResolved(a,l){this.resolvedAt=ha.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:u,delay:d,onComplete:m,onUpdate:p,isGenerator:g}=this.options;if(!g&&!pA(a,o,r,u))if(d)this.options.duration=0;else{p&&p(bc(a,this.options,l)),m&&m(),this.resolveFinishedPromise();return}const y=this.initPlayback(a,l);y!==!1&&(this._resolved={keyframes:a,finalKeyframe:l,...y},this.onPostResolved())}onPostResolved(){}then(a,l){return this.currentFinishedPromise.then(a,l)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(a=>{this.resolveFinishedPromise=a})}}const mf=2e4;function Gb(n){let a=0;const l=50;let o=n.next(a);for(;!o.done&&a<mf;)a+=l,o=n.next(a);return a>=mf?1/0:a}const _t=(n,a,l)=>n+(a-n)*l;function zd(n,a,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?n+(a-n)*6*l:l<1/2?a:l<2/3?n+(a-n)*(2/3-l)*6:n}function vA({hue:n,saturation:a,lightness:l,alpha:o}){n/=360,a/=100,l/=100;let r=0,u=0,d=0;if(!a)r=u=d=l;else{const m=l<.5?l*(1+a):l+a-l*a,p=2*l-m;r=zd(p,m,n+1/3),u=zd(p,m,n),d=zd(p,m,n-1/3)}return{red:Math.round(r*255),green:Math.round(u*255),blue:Math.round(d*255),alpha:o}}function tc(n,a){return l=>l>0?a:n}const Vd=(n,a,l)=>{const o=n*n,r=l*(a*a-o)+o;return r<0?0:Math.sqrt(r)},bA=[uf,qs,zi],SA=n=>bA.find(a=>a.test(n));function Xy(n){const a=SA(n);if(!a)return!1;let l=a.parse(n);return a===zi&&(l=vA(l)),l}const Qy=(n,a)=>{const l=Xy(n),o=Xy(a);if(!l||!o)return tc(n,a);const r={...l};return u=>(r.red=Vd(l.red,o.red,u),r.green=Vd(l.green,o.green,u),r.blue=Vd(l.blue,o.blue,u),r.alpha=_t(l.alpha,o.alpha,u),qs.transform(r))},_A=(n,a)=>l=>a(n(l)),bo=(...n)=>n.reduce(_A),pf=new Set(["none","hidden"]);function xA(n,a){return pf.has(n)?l=>l<=0?n:a:l=>l>=1?a:n}function TA(n,a){return l=>_t(n,a,l)}function vh(n){return typeof n=="number"?TA:typeof n=="string"?Jf(n)?tc:ln.test(n)?Qy:AA:Array.isArray(n)?Pb:typeof n=="object"?ln.test(n)?Qy:EA:tc}function Pb(n,a){const l=[...n],o=l.length,r=n.map((u,d)=>vh(u)(u,a[d]));return u=>{for(let d=0;d<o;d++)l[d]=r[d](u);return l}}function EA(n,a){const l={...n,...a},o={};for(const r in l)n[r]!==void 0&&a[r]!==void 0&&(o[r]=vh(n[r])(n[r],a[r]));return r=>{for(const u in o)l[u]=o[u](r);return l}}function CA(n,a){var l;const o=[],r={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],m=n.indexes[d][r[d]],p=(l=n.values[m])!==null&&l!==void 0?l:0;o[u]=p,r[d]++}return o}const AA=(n,a)=>{const l=gs.createTransformer(a),o=fo(n),r=fo(a);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?pf.has(n)&&!r.values.length||pf.has(a)&&!o.values.length?xA(n,a):bo(Pb(CA(o,r),r.values),l):tc(n,a)};function qb(n,a,l){return typeof n=="number"&&typeof a=="number"&&typeof l=="number"?_t(n,a,l):vh(n)(n,a)}const jA=5;function Fb(n,a,l){const o=Math.max(a-jA,0);return mb(l-n(o),a-o)}const Nt={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},Id=.001;function NA({duration:n=Nt.duration,bounce:a=Nt.bounce,velocity:l=Nt.velocity,mass:o=Nt.mass}){let r,u,d=1-a;d=za(Nt.minDamping,Nt.maxDamping,d),n=za(Nt.minDuration,Nt.maxDuration,La(n)),d<1?(r=g=>{const y=g*d,b=y*n,x=y-l,T=gf(g,d),A=Math.exp(-b);return Id-x/T*A},u=g=>{const b=g*d*n,x=b*l+l,T=Math.pow(d,2)*Math.pow(g,2)*n,A=Math.exp(-b),j=gf(Math.pow(g,2),d);return(-r(g)+Id>0?-1:1)*((x-T)*A)/j}):(r=g=>{const y=Math.exp(-g*n),b=(g-l)*n+1;return-Id+y*b},u=g=>{const y=Math.exp(-g*n),b=(l-g)*(n*n);return y*b});const m=5/n,p=DA(r,u,m);if(n=Ba(n),isNaN(p))return{stiffness:Nt.stiffness,damping:Nt.damping,duration:n};{const g=Math.pow(p,2)*o;return{stiffness:g,damping:d*2*Math.sqrt(o*g),duration:n}}}const wA=12;function DA(n,a,l){let o=l;for(let r=1;r<wA;r++)o=o-n(o)/a(o);return o}function gf(n,a){return n*Math.sqrt(1-a*a)}const kA=["duration","bounce"],RA=["stiffness","damping","mass"];function Jy(n,a){return a.some(l=>n[l]!==void 0)}function MA(n){let a={velocity:Nt.velocity,stiffness:Nt.stiffness,damping:Nt.damping,mass:Nt.mass,isResolvedFromDuration:!1,...n};if(!Jy(n,RA)&&Jy(n,kA))if(n.visualDuration){const l=n.visualDuration,o=2*Math.PI/(l*1.2),r=o*o,u=2*za(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:Nt.mass,stiffness:r,damping:u}}else{const l=NA(n);a={...a,...l,mass:Nt.mass},a.isResolvedFromDuration=!0}return a}function $b(n=Nt.visualDuration,a=Nt.bounce){const l=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:r}=l;const u=l.keyframes[0],d=l.keyframes[l.keyframes.length-1],m={done:!1,value:u},{stiffness:p,damping:g,mass:y,duration:b,velocity:x,isResolvedFromDuration:T}=MA({...l,velocity:-La(l.velocity||0)}),A=x||0,j=g/(2*Math.sqrt(p*y)),N=d-u,C=La(Math.sqrt(p/y)),B=Math.abs(N)<5;o||(o=B?Nt.restSpeed.granular:Nt.restSpeed.default),r||(r=B?Nt.restDelta.granular:Nt.restDelta.default);let R;if(j<1){const H=gf(C,j);R=J=>{const W=Math.exp(-j*C*J);return d-W*((A+j*C*N)/H*Math.sin(H*J)+N*Math.cos(H*J))}}else if(j===1)R=H=>d-Math.exp(-C*H)*(N+(A+C*N)*H);else{const H=C*Math.sqrt(j*j-1);R=J=>{const W=Math.exp(-j*C*J),F=Math.min(H*J,300);return d-W*((A+j*C*N)*Math.sinh(F)+H*N*Math.cosh(F))/H}}const X={calculatedDuration:T&&b||null,next:H=>{const J=R(H);if(T)m.done=H>=b;else{let W=0;j<1&&(W=H===0?Ba(A):Fb(R,H,J));const F=Math.abs(W)<=o,ne=Math.abs(d-J)<=r;m.done=F&&ne}return m.value=m.done?d:J,m},toString:()=>{const H=Math.min(Gb(X),mf),J=gb(W=>X.next(H*W).value,H,30);return H+"ms "+J}};return X}function Wy({keyframes:n,velocity:a=0,power:l=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:u=500,modifyTarget:d,min:m,max:p,restDelta:g=.5,restSpeed:y}){const b=n[0],x={done:!1,value:b},T=F=>m!==void 0&&F<m||p!==void 0&&F>p,A=F=>m===void 0?p:p===void 0||Math.abs(m-F)<Math.abs(p-F)?m:p;let j=l*a;const N=b+j,C=d===void 0?N:d(N);C!==N&&(j=C-b);const B=F=>-j*Math.exp(-F/o),R=F=>C+B(F),X=F=>{const ne=B(F),ge=R(F);x.done=Math.abs(ne)<=g,x.value=x.done?C:ge};let H,J;const W=F=>{T(x.value)&&(H=F,J=$b({keyframes:[x.value,A(x.value)],velocity:Fb(R,F,x.value),damping:r,stiffness:u,restDelta:g,restSpeed:y}))};return W(0),{calculatedDuration:null,next:F=>{let ne=!1;return!J&&H===void 0&&(ne=!0,X(F),W(F)),H!==void 0&&F>=H?J.next(F-H):(!ne&&X(F),x)}}}const OA=vo(.42,0,1,1),BA=vo(0,0,.58,1),Yb=vo(.42,0,.58,1),LA=n=>Array.isArray(n)&&typeof n[0]!="number",UA={linear:Dn,easeIn:OA,easeInOut:Yb,easeOut:BA,circIn:hh,circInOut:Ab,circOut:Cb,backIn:fh,backInOut:Tb,backOut:xb,anticipate:Eb},ev=n=>{if(dh(n)){Y0(n.length===4);const[a,l,o,r]=n;return vo(a,l,o,r)}else if(typeof n=="string")return UA[n];return n};function zA(n,a,l){const o=[],r=l||qb,u=n.length-1;for(let d=0;d<u;d++){let m=r(n[d],n[d+1]);if(a){const p=Array.isArray(a)?a[d]||Dn:a;m=bo(p,m)}o.push(m)}return o}function VA(n,a,{clamp:l=!0,ease:o,mixer:r}={}){const u=n.length;if(Y0(u===a.length),u===1)return()=>a[0];if(u===2&&a[0]===a[1])return()=>a[1];const d=n[0]===n[1];n[0]>n[u-1]&&(n=[...n].reverse(),a=[...a].reverse());const m=zA(a,o,r),p=m.length,g=y=>{if(d&&y<n[0])return a[0];let b=0;if(p>1)for(;b<n.length-2&&!(y<n[b+1]);b++);const x=qi(n[b],n[b+1],y);return m[b](x)};return l?y=>g(za(n[0],n[u-1],y)):g}function IA(n,a){const l=n[n.length-1];for(let o=1;o<=a;o++){const r=qi(0,a,o);n.push(_t(l,1,r))}}function HA(n){const a=[0];return IA(a,n.length-1),a}function GA(n,a){return n.map(l=>l*a)}function PA(n,a){return n.map(()=>a||Yb).splice(0,n.length-1)}function nc({duration:n=300,keyframes:a,times:l,ease:o="easeInOut"}){const r=LA(o)?o.map(ev):ev(o),u={done:!1,value:a[0]},d=GA(l&&l.length===a.length?l:HA(a),n),m=VA(d,a,{ease:Array.isArray(r)?r:PA(a,r)});return{calculatedDuration:n,next:p=>(u.value=m(p),u.done=p>=n,u)}}const qA=n=>{const a=({timestamp:l})=>n(l);return{start:()=>ft.update(a,!0),stop:()=>ps(a),now:()=>tn.isProcessing?tn.timestamp:ha.now()}},FA={decay:Wy,inertia:Wy,tween:nc,keyframes:nc,spring:$b},$A=n=>n/100;class bh extends Hb{constructor(a){super(a),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:r,keyframes:u}=this.options,d=(r==null?void 0:r.KeyframeResolver)||yh,m=(p,g)=>this.onKeyframesResolved(p,g);this.resolver=new d(u,m,l,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(a){const{type:l="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:u,velocity:d=0}=this.options,m=uh(l)?l:FA[l]||nc;let p,g;m!==nc&&typeof a[0]!="number"&&(p=bo($A,qb(a[0],a[1])),a=[0,100]);const y=m({...this.options,keyframes:a});u==="mirror"&&(g=m({...this.options,keyframes:[...a].reverse(),velocity:-d})),y.calculatedDuration===null&&(y.calculatedDuration=Gb(y));const{calculatedDuration:b}=y,x=b+r,T=x*(o+1)-r;return{generator:y,mirroredGenerator:g,mapPercentToKeyframes:p,calculatedDuration:b,resolvedDuration:x,totalDuration:T}}onPostResolved(){const{autoplay:a=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!a?this.pause():this.state=this.pendingPlayState}tick(a,l=!1){const{resolved:o}=this;if(!o){const{keyframes:F}=this.options;return{done:!0,value:F[F.length-1]}}const{finalKeyframe:r,generator:u,mirroredGenerator:d,mapPercentToKeyframes:m,keyframes:p,calculatedDuration:g,totalDuration:y,resolvedDuration:b}=o;if(this.startTime===null)return u.next(0);const{delay:x,repeat:T,repeatType:A,repeatDelay:j,onUpdate:N}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-y/this.speed,this.startTime)),l?this.currentTime=a:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(a-this.startTime)*this.speed;const C=this.currentTime-x*(this.speed>=0?1:-1),B=this.speed>=0?C<0:C>y;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=y);let R=this.currentTime,X=u;if(T){const F=Math.min(this.currentTime,y)/b;let ne=Math.floor(F),ge=F%1;!ge&&F>=1&&(ge=1),ge===1&&ne--,ne=Math.min(ne,T+1),!!(ne%2)&&(A==="reverse"?(ge=1-ge,j&&(ge-=j/b)):A==="mirror"&&(X=d)),R=za(0,1,ge)*b}const H=B?{done:!1,value:p[0]}:X.next(R);m&&(H.value=m(H.value));let{done:J}=H;!B&&g!==null&&(J=this.speed>=0?this.currentTime>=y:this.currentTime<=0);const W=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&J);return W&&r!==void 0&&(H.value=bc(p,this.options,r)),N&&N(H.value),W&&this.finish(),H}get duration(){const{resolved:a}=this;return a?La(a.calculatedDuration):0}get time(){return La(this.currentTime)}set time(a){a=Ba(a),this.currentTime=a,this.holdTime!==null||this.speed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.speed)}get speed(){return this.playbackSpeed}set speed(a){const l=this.playbackSpeed!==a;this.playbackSpeed=a,l&&(this.time=La(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:a=qA,onPlay:l,startTime:o}=this.options;this.driver||(this.driver=a(u=>this.tick(u))),l&&l();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):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 a;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(a=this.currentTime)!==null&&a!==void 0?a:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:a}=this.options;a&&a()}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(a){return this.startTime=0,this.tick(a,!0)}}const YA=new Set(["opacity","clipPath","filter","transform"]);function KA(n,a,l,{delay:o=0,duration:r=300,repeat:u=0,repeatType:d="loop",ease:m="easeInOut",times:p}={}){const g={[a]:l};p&&(g.offset=p);const y=vb(m,r);return Array.isArray(y)&&(g.easing=y),n.animate(g,{delay:o,duration:r,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:u+1,direction:d==="reverse"?"alternate":"normal"})}const ZA=ch(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ac=10,XA=2e4;function QA(n){return uh(n.type)||n.type==="spring"||!yb(n.ease)}function JA(n,a){const l=new bh({...a,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const r=[];let u=0;for(;!o.done&&u<XA;)o=l.sample(u),r.push(o.value),u+=ac;return{times:void 0,keyframes:r,duration:u-ac,ease:"linear"}}const Kb={anticipate:Eb,backInOut:Tb,circInOut:Ab};function WA(n){return n in Kb}class tv extends Hb{constructor(a){super(a);const{name:l,motionValue:o,element:r,keyframes:u}=this.options;this.resolver=new Ib(u,(d,m)=>this.onKeyframesResolved(d,m),l,o,r),this.resolver.scheduleResolve()}initPlayback(a,l){let{duration:o=300,times:r,ease:u,type:d,motionValue:m,name:p,startTime:g}=this.options;if(!m.owner||!m.owner.current)return!1;if(typeof u=="string"&&ec()&&WA(u)&&(u=Kb[u]),QA(this.options)){const{onComplete:b,onUpdate:x,motionValue:T,element:A,...j}=this.options,N=JA(a,j);a=N.keyframes,a.length===1&&(a[1]=a[0]),o=N.duration,r=N.times,u=N.ease,d="keyframes"}const y=KA(m.owner.current,p,a,{...this.options,duration:o,times:r,ease:u});return y.startTime=g??this.calcStartTime(),this.pendingTimeline?(Py(y,this.pendingTimeline),this.pendingTimeline=void 0):y.onfinish=()=>{const{onComplete:b}=this.options;m.set(bc(a,this.options,l)),b&&b(),this.cancel(),this.resolveFinishedPromise()},{animation:y,duration:o,times:r,type:d,ease:u,keyframes:a}}get duration(){const{resolved:a}=this;if(!a)return 0;const{duration:l}=a;return La(l)}get time(){const{resolved:a}=this;if(!a)return 0;const{animation:l}=a;return La(l.currentTime||0)}set time(a){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.currentTime=Ba(a)}get speed(){const{resolved:a}=this;if(!a)return 1;const{animation:l}=a;return l.playbackRate}set speed(a){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.playbackRate=a}get state(){const{resolved:a}=this;if(!a)return"idle";const{animation:l}=a;return l.playState}get startTime(){const{resolved:a}=this;if(!a)return null;const{animation:l}=a;return l.startTime}attachTimeline(a){if(!this._resolved)this.pendingTimeline=a;else{const{resolved:l}=this;if(!l)return Dn;const{animation:o}=l;Py(o,a)}return Dn}play(){if(this.isStopped)return;const{resolved:a}=this;if(!a)return;const{animation:l}=a;l.playState==="finished"&&this.updateFinishedPromise(),l.play()}pause(){const{resolved:a}=this;if(!a)return;const{animation:l}=a;l.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:a}=this;if(!a)return;const{animation:l,keyframes:o,duration:r,type:u,ease:d,times:m}=a;if(l.playState==="idle"||l.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:y,onComplete:b,element:x,...T}=this.options,A=new bh({...T,keyframes:o,duration:r,type:u,ease:d,times:m,isGenerator:!0}),j=Ba(this.time);g.setWithVelocity(A.sample(j-ac).value,A.sample(j).value,ac)}const{onStop:p}=this.options;p&&p(),this.cancel()}complete(){const{resolved:a}=this;a&&a.animation.finish()}cancel(){const{resolved:a}=this;a&&a.animation.cancel()}static supports(a){const{motionValue:l,name:o,repeatDelay:r,repeatType:u,damping:d,type:m}=a;if(!l||!l.owner||!(l.owner.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:g}=l.owner.getProps();return ZA()&&o&&YA.has(o)&&!p&&!g&&!r&&u!=="mirror"&&d!==0&&m!=="inertia"}}const ej={type:"spring",stiffness:500,damping:25,restSpeed:10},tj=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),nj={type:"keyframes",duration:.8},aj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sj=(n,{keyframes:a})=>a.length>2?nj:Zs.has(n)?n.startsWith("scale")?tj(a[1]):ej:aj;function ij({when:n,delay:a,delayChildren:l,staggerChildren:o,staggerDirection:r,repeat:u,repeatType:d,repeatDelay:m,from:p,elapsed:g,...y}){return!!Object.keys(y).length}const Sh=(n,a,l,o={},r,u)=>d=>{const m=ih(o,n)||{},p=m.delay||o.delay||0;let{elapsed:g=0}=o;g=g-Ba(p);let y={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:a.getVelocity(),...m,delay:-g,onUpdate:x=>{a.set(x),m.onUpdate&&m.onUpdate(x)},onComplete:()=>{d(),m.onComplete&&m.onComplete()},name:n,motionValue:a,element:u?void 0:r};ij(m)||(y={...y,...sj(n,y)}),y.duration&&(y.duration=Ba(y.duration)),y.repeatDelay&&(y.repeatDelay=Ba(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&&!u&&a.get()!==void 0){const x=bc(y.keyframes,m);if(x!==void 0)return ft.update(()=>{y.onUpdate(x),y.onComplete()}),new UC([])}return!u&&tv.supports(y)?new tv(y):new bh(y)};function lj({protectedKeys:n,needsAnimating:a},l){const o=n.hasOwnProperty(l)&&a[l]!==!0;return a[l]=!1,o}function Zb(n,a,{delay:l=0,transitionOverride:o,type:r}={}){var u;let{transition:d=n.getDefaultTransition(),transitionEnd:m,...p}=a;o&&(d=o);const g=[],y=r&&n.animationState&&n.animationState.getState()[r];for(const b in p){const x=n.getValue(b,(u=n.latestValues[b])!==null&&u!==void 0?u:null),T=p[b];if(T===void 0||y&&lj(y,b))continue;const A={delay:l,...ih(d||{},b)};let j=!1;if(window.MotionHandoffAnimation){const C=pb(n);if(C){const B=window.MotionHandoffAnimation(C,b,ft);B!==null&&(A.startTime=B,j=!0)}}rf(n,b),x.start(Sh(b,x,T,n.shouldReduceMotion&&hb.has(b)?{type:!1}:A,n,j));const N=x.animation;N&&g.push(N)}return m&&Promise.all(g).then(()=>{ft.update(()=>{m&&MC(n,m)})}),g}function yf(n,a,l={}){var o;const r=vc(n,a,l.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=r||{};l.transitionOverride&&(u=l.transitionOverride);const d=r?()=>Promise.all(Zb(n,r,l)):()=>Promise.resolve(),m=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:y=0,staggerChildren:b,staggerDirection:x}=u;return oj(n,a,y+g,b,x,l)}:()=>Promise.resolve(),{when:p}=u;if(p){const[g,y]=p==="beforeChildren"?[d,m]:[m,d];return g().then(()=>y())}else return Promise.all([d(),m(l.delay)])}function oj(n,a,l=0,o=0,r=1,u){const d=[],m=(n.variantChildren.size-1)*o,p=r===1?(g=0)=>g*o:(g=0)=>m-g*o;return Array.from(n.variantChildren).sort(rj).forEach((g,y)=>{g.notify("AnimationStart",a),d.push(yf(g,a,{...u,delay:l+p(y)}).then(()=>g.notify("AnimationComplete",a)))}),Promise.all(d)}function rj(n,a){return n.sortNodePosition(a)}function cj(n,a,l={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const r=a.map(u=>yf(n,u,l));o=Promise.all(r)}else if(typeof a=="string")o=yf(n,a,l);else{const r=typeof a=="function"?vc(n,a,l.custom):a;o=Promise.all(Zb(n,r,l))}return o.then(()=>{n.notify("AnimationComplete",a)})}const uj=Yf.length;function Xb(n){if(!n)return;if(!n.isControllingVariants){const l=n.parent?Xb(n.parent)||{}:{};return n.props.initial!==void 0&&(l.initial=n.props.initial),l}const a={};for(let l=0;l<uj;l++){const o=Yf[l],r=n.props[o];(ro(r)||r===!1)&&(a[o]=r)}return a}const dj=[...$f].reverse(),fj=$f.length;function hj(n){return a=>Promise.all(a.map(({animation:l,options:o})=>cj(n,l,o)))}function mj(n){let a=hj(n),l=nv(),o=!0;const r=p=>(g,y)=>{var b;const x=vc(n,y,p==="exit"?(b=n.presenceContext)===null||b===void 0?void 0:b.custom:void 0);if(x){const{transition:T,transitionEnd:A,...j}=x;g={...g,...j,...A}}return g};function u(p){a=p(n)}function d(p){const{props:g}=n,y=Xb(n.parent)||{},b=[],x=new Set;let T={},A=1/0;for(let N=0;N<fj;N++){const C=dj[N],B=l[C],R=g[C]!==void 0?g[C]:y[C],X=ro(R),H=C===p?B.isActive:null;H===!1&&(A=N);let J=R===y[C]&&R!==g[C]&&X;if(J&&o&&n.manuallyAnimateOnMount&&(J=!1),B.protectedKeys={...T},!B.isActive&&H===null||!R&&!B.prevProp||gc(R)||typeof R=="boolean")continue;const W=pj(B.prevProp,R);let F=W||C===p&&B.isActive&&!J&&X||N>A&&X,ne=!1;const ge=Array.isArray(R)?R:[R];let L=ge.reduce(r(C),{});H===!1&&(L={});const{prevResolvedValues:pe={}}=B,te={...pe,...L},ve=Y=>{F=!0,x.has(Y)&&(ne=!0,x.delete(Y)),B.needsAnimating[Y]=!0;const ee=n.getValue(Y);ee&&(ee.liveStyle=!1)};for(const Y in te){const ee=L[Y],ke=pe[Y];if(T.hasOwnProperty(Y))continue;let je=!1;of(ee)&&of(ke)?je=!fb(ee,ke):je=ee!==ke,je?ee!=null?ve(Y):x.add(Y):ee!==void 0&&x.has(Y)?ve(Y):B.protectedKeys[Y]=!0}B.prevProp=R,B.prevResolvedValues=L,B.isActive&&(T={...T,...L}),o&&n.blockInitialAnimation&&(F=!1),F&&(!(J&&W)||ne)&&b.push(...ge.map(Y=>({animation:Y,options:{type:C}})))}if(x.size){const N={};x.forEach(C=>{const B=n.getBaseTarget(C),R=n.getValue(C);R&&(R.liveStyle=!0),N[C]=B??null}),b.push({animation:N})}let j=!!b.length;return o&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(j=!1),o=!1,j?a(b):Promise.resolve()}function m(p,g){var y;if(l[p].isActive===g)return Promise.resolve();(y=n.variantChildren)===null||y===void 0||y.forEach(x=>{var T;return(T=x.animationState)===null||T===void 0?void 0:T.setActive(p,g)}),l[p].isActive=g;const b=d(p);for(const x in l)l[x].protectedKeys={};return b}return{animateChanges:d,setActive:m,setAnimateFunction:u,getState:()=>l,reset:()=>{l=nv(),o=!0}}}function pj(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!fb(a,n):!1}function Vs(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nv(){return{animate:Vs(!0),whileInView:Vs(),whileHover:Vs(),whileTap:Vs(),whileDrag:Vs(),whileFocus:Vs(),exit:Vs()}}class bs{constructor(a){this.isMounted=!1,this.node=a}update(){}}class gj extends bs{constructor(a){super(a),a.animationState||(a.animationState=mj(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();gc(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:l}=this.node.prevProps||{};a!==l&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)===null||a===void 0||a.call(this)}}let yj=0;class vj extends bs{constructor(){super(...arguments),this.id=yj++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;const r=this.node.animationState.setActive("exit",!a);l&&!a&&r.then(()=>l(this.id))}mount(){const{register:a}=this.node.presenceContext||{};a&&(this.unmount=a(this.id))}unmount(){}}const bj={animation:{Feature:gj},exit:{Feature:vj}},ta={x:!1,y:!1};function Qb(){return ta.x||ta.y}function Sj(n){return n==="x"||n==="y"?ta[n]?null:(ta[n]=!0,()=>{ta[n]=!1}):ta.x||ta.y?null:(ta.x=ta.y=!0,()=>{ta.x=ta.y=!1})}const _h=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function ho(n,a,l,o={passive:!0}){return n.addEventListener(a,l,o),()=>n.removeEventListener(a,l)}function So(n){return{point:{x:n.pageX,y:n.pageY}}}const _j=n=>a=>_h(a)&&n(a,So(a));function no(n,a,l,o){return ho(n,a,_j(l),o)}const av=(n,a)=>Math.abs(n-a);function xj(n,a){const l=av(n.x,a.x),o=av(n.y,a.y);return Math.sqrt(l**2+o**2)}class Jb{constructor(a,l,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:u=!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=Gd(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,T=xj(b.offset,{x:0,y:0})>=3;if(!x&&!T)return;const{point:A}=b,{timestamp:j}=tn;this.history.push({...A,timestamp:j});const{onStart:N,onMove:C}=this.handlers;x||(N&&N(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,b)},this.handlePointerMove=(b,x)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Hd(x,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(b,x)=>{this.end();const{onEnd:T,onSessionEnd:A,resumeAnimation:j}=this.handlers;if(this.dragSnapToOrigin&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const N=Gd(b.type==="pointercancel"?this.lastMoveEventInfo:Hd(x,this.transformPagePoint),this.history);this.startEvent&&T&&T(b,N),A&&A(b,N)},!_h(a))return;this.dragSnapToOrigin=u,this.handlers=l,this.transformPagePoint=o,this.contextWindow=r||window;const d=So(a),m=Hd(d,this.transformPagePoint),{point:p}=m,{timestamp:g}=tn;this.history=[{...p,timestamp:g}];const{onSessionStart:y}=l;y&&y(a,Gd(m,this.history)),this.removeListeners=bo(no(this.contextWindow,"pointermove",this.handlePointerMove),no(this.contextWindow,"pointerup",this.handlePointerUp),no(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),ps(this.updatePoint)}}function Hd(n,a){return a?{point:a(n.point)}:n}function sv(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Gd({point:n},a){return{point:n,delta:sv(n,Wb(a)),offset:sv(n,Tj(a)),velocity:Ej(a,.1)}}function Tj(n){return n[0]}function Wb(n){return n[n.length-1]}function Ej(n,a){if(n.length<2)return{x:0,y:0};let l=n.length-1,o=null;const r=Wb(n);for(;l>=0&&(o=n[l],!(r.timestamp-o.timestamp>Ba(a)));)l--;if(!o)return{x:0,y:0};const u=La(r.timestamp-o.timestamp);if(u===0)return{x:0,y:0};const d={x:(r.x-o.x)/u,y:(r.y-o.y)/u};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const e1=1e-4,Cj=1-e1,Aj=1+e1,t1=.01,jj=0-t1,Nj=0+t1;function kn(n){return n.max-n.min}function wj(n,a,l){return Math.abs(n-a)<=l}function iv(n,a,l,o=.5){n.origin=o,n.originPoint=_t(a.min,a.max,n.origin),n.scale=kn(l)/kn(a),n.translate=_t(l.min,l.max,n.origin)-n.originPoint,(n.scale>=Cj&&n.scale<=Aj||isNaN(n.scale))&&(n.scale=1),(n.translate>=jj&&n.translate<=Nj||isNaN(n.translate))&&(n.translate=0)}function ao(n,a,l,o){iv(n.x,a.x,l.x,o?o.originX:void 0),iv(n.y,a.y,l.y,o?o.originY:void 0)}function lv(n,a,l){n.min=l.min+a.min,n.max=n.min+kn(a)}function Dj(n,a,l){lv(n.x,a.x,l.x),lv(n.y,a.y,l.y)}function ov(n,a,l){n.min=a.min-l.min,n.max=n.min+kn(a)}function so(n,a,l){ov(n.x,a.x,l.x),ov(n.y,a.y,l.y)}function kj(n,{min:a,max:l},o){return a!==void 0&&n<a?n=o?_t(a,n,o.min):Math.max(n,a):l!==void 0&&n>l&&(n=o?_t(l,n,o.max):Math.min(n,l)),n}function rv(n,a,l){return{min:a!==void 0?n.min+a:void 0,max:l!==void 0?n.max+l-(n.max-n.min):void 0}}function Rj(n,{top:a,left:l,bottom:o,right:r}){return{x:rv(n.x,l,r),y:rv(n.y,a,o)}}function cv(n,a){let l=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([l,o]=[o,l]),{min:l,max:o}}function Mj(n,a){return{x:cv(n.x,a.x),y:cv(n.y,a.y)}}function Oj(n,a){let l=.5;const o=kn(n),r=kn(a);return r>o?l=qi(a.min,a.max-o,n.min):o>r&&(l=qi(n.min,n.max-r,a.min)),za(0,1,l)}function Bj(n,a){const l={};return a.min!==void 0&&(l.min=a.min-n.min),a.max!==void 0&&(l.max=a.max-n.min),l}const vf=.35;function Lj(n=vf){return n===!1?n=0:n===!0&&(n=vf),{x:uv(n,"left","right"),y:uv(n,"top","bottom")}}function uv(n,a,l){return{min:dv(n,a),max:dv(n,l)}}function dv(n,a){return typeof n=="number"?n:n[a]||0}const fv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vi=()=>({x:fv(),y:fv()}),hv=()=>({min:0,max:0}),Bt=()=>({x:hv(),y:hv()});function Fn(n){return[n("x"),n("y")]}function n1({top:n,left:a,right:l,bottom:o}){return{x:{min:a,max:l},y:{min:n,max:o}}}function Uj({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function zj(n,a){if(!a)return n;const l=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function Pd(n){return n===void 0||n===1}function bf({scale:n,scaleX:a,scaleY:l}){return!Pd(n)||!Pd(a)||!Pd(l)}function Hs(n){return bf(n)||a1(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function a1(n){return mv(n.x)||mv(n.y)}function mv(n){return n&&n!=="0%"}function sc(n,a,l){const o=n-l,r=a*o;return l+r}function pv(n,a,l,o,r){return r!==void 0&&(n=sc(n,r,o)),sc(n,l,o)+a}function Sf(n,a=0,l=1,o,r){n.min=pv(n.min,a,l,o,r),n.max=pv(n.max,a,l,o,r)}function s1(n,{x:a,y:l}){Sf(n.x,a.translate,a.scale,a.originPoint),Sf(n.y,l.translate,l.scale,l.originPoint)}const gv=.999999999999,yv=1.0000000000001;function Vj(n,a,l,o=!1){const r=l.length;if(!r)return;a.x=a.y=1;let u,d;for(let m=0;m<r;m++){u=l[m],d=u.projectionDelta;const{visualElement:p}=u.options;p&&p.props.style&&p.props.style.display==="contents"||(o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Hi(n,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),d&&(a.x*=d.x.scale,a.y*=d.y.scale,s1(n,d)),o&&Hs(u.latestValues)&&Hi(n,u.latestValues))}a.x<yv&&a.x>gv&&(a.x=1),a.y<yv&&a.y>gv&&(a.y=1)}function Ii(n,a){n.min=n.min+a,n.max=n.max+a}function vv(n,a,l,o,r=.5){const u=_t(n.min,n.max,r);Sf(n,a,l,u,o)}function Hi(n,a){vv(n.x,a.x,a.scaleX,a.scale,a.originX),vv(n.y,a.y,a.scaleY,a.scale,a.originY)}function i1(n,a){return n1(zj(n.getBoundingClientRect(),a))}function Ij(n,a,l){const o=i1(n,l),{scroll:r}=a;return r&&(Ii(o.x,r.offset.x),Ii(o.y,r.offset.y)),o}const l1=({current:n})=>n?n.ownerDocument.defaultView:null,Hj=new WeakMap;class Gj{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Bt(),this.visualElement=a}start(a,{snapToCursor:l=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=y=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),l&&this.snapToCursor(So(y).point)},u=(y,b)=>{const{drag:x,dragPropagation:T,onDragStart:A}=this.getProps();if(x&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Sj(x),!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),Fn(N=>{let C=this.getAxisMotionValue(N).get()||0;if(fa.test(C)){const{projection:B}=this.visualElement;if(B&&B.layout){const R=B.layout.layoutBox[N];R&&(C=kn(R)*(parseFloat(C)/100))}}this.originPoint[N]=C}),A&&ft.postRender(()=>A(y,b)),rf(this.visualElement,"transform");const{animationState:j}=this.visualElement;j&&j.setActive("whileDrag",!0)},d=(y,b)=>{const{dragPropagation:x,dragDirectionLock:T,onDirectionLock:A,onDrag:j}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:N}=b;if(T&&this.currentDirection===null){this.currentDirection=Pj(N),this.currentDirection!==null&&A&&A(this.currentDirection);return}this.updateAxis("x",b.point,N),this.updateAxis("y",b.point,N),this.visualElement.render(),j&&j(y,b)},m=(y,b)=>this.stop(y,b),p=()=>Fn(y=>{var b;return this.getAnimationState(y)==="paused"&&((b=this.getAxisMotionValue(y).animation)===null||b===void 0?void 0:b.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new Jb(a,{onSessionStart:r,onStart:u,onMove:d,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:l1(this.visualElement)})}stop(a,l){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=l;this.startAnimation(r);const{onDragEnd:u}=this.getProps();u&&ft.postRender(()=>u(a,l))}cancel(){this.isDragging=!1;const{projection:a,animationState:l}=this.visualElement;a&&(a.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(a,l,o){const{drag:r}=this.getProps();if(!o||!Ir(a,r,this.currentDirection))return;const u=this.getAxisMotionValue(a);let d=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(d=kj(d,this.constraints[a],this.elastic[a])),u.set(d)}resolveConstraints(){var a;const{dragConstraints:l,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)===null||a===void 0?void 0:a.layout,u=this.constraints;l&&Ui(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&r?this.constraints=Rj(r.layoutBox,l):this.constraints=!1,this.elastic=Lj(o),u!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Fn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=Bj(r.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:l}=this.getProps();if(!a||!Ui(a))return!1;const o=a.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const u=Ij(o,r.root,this.visualElement.getTransformPagePoint());let d=Mj(r.layout.layoutBox,u);if(l){const m=l(Uj(d));this.hasMutatedConstraints=!!m,m&&(d=n1(m))}return d}startAnimation(a){const{drag:l,dragMomentum:o,dragElastic:r,dragTransition:u,dragSnapToOrigin:d,onDragTransitionEnd:m}=this.getProps(),p=this.constraints||{},g=Fn(y=>{if(!Ir(y,l,this.currentDirection))return;let b=p&&p[y]||{};d&&(b={min:0,max:0});const x=r?200:1e6,T=r?40:1e7,A={type:"inertia",velocity:o?a[y]:0,bounceStiffness:x,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...u,...b};return this.startAxisValueAnimation(y,A)});return Promise.all(g).then(m)}startAxisValueAnimation(a,l){const o=this.getAxisMotionValue(a);return rf(this.visualElement,a),o.start(Sh(a,o,0,l,this.visualElement,!1))}stopAnimation(){Fn(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){Fn(a=>{var l;return(l=this.getAxisMotionValue(a).animation)===null||l===void 0?void 0:l.pause()})}getAnimationState(a){var l;return(l=this.getAxisMotionValue(a).animation)===null||l===void 0?void 0:l.state}getAxisMotionValue(a){const l=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),r=o[l];return r||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){Fn(l=>{const{drag:o}=this.getProps();if(!Ir(l,o,this.currentDirection))return;const{projection:r}=this.visualElement,u=this.getAxisMotionValue(l);if(r&&r.layout){const{min:d,max:m}=r.layout.layoutBox[l];u.set(a[l]-_t(d,m,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!Ui(l)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Fn(d=>{const m=this.getAxisMotionValue(d);if(m&&this.constraints!==!1){const p=m.get();r[d]=Oj({min:p,max:p},this.constraints[d])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Fn(d=>{if(!Ir(d,a,null))return;const m=this.getAxisMotionValue(d),{min:p,max:g}=this.constraints[d];m.set(_t(p,g,r[d]))})}addListeners(){if(!this.visualElement.current)return;Hj.set(this.visualElement,this);const a=this.visualElement.current,l=no(a,"pointerdown",p=>{const{drag:g,dragListener:y=!0}=this.getProps();g&&y&&this.start(p)}),o=()=>{const{dragConstraints:p}=this.getProps();Ui(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,u=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),ft.read(o);const d=ho(window,"resize",()=>this.scalePositionWithinConstraints()),m=r.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:g})=>{this.isDragging&&g&&(Fn(y=>{const b=this.getAxisMotionValue(y);b&&(this.originPoint[y]+=p[y].translate,b.set(b.get()+p[y].translate))}),this.visualElement.render())}));return()=>{d(),l(),u(),m&&m()}}getProps(){const a=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:u=!1,dragElastic:d=vf,dragMomentum:m=!0}=a;return{...a,drag:l,dragDirectionLock:o,dragPropagation:r,dragConstraints:u,dragElastic:d,dragMomentum:m}}}function Ir(n,a,l){return(a===!0||a===n)&&(l===null||l===n)}function Pj(n,a=10){let l=null;return Math.abs(n.y)>a?l="y":Math.abs(n.x)>a&&(l="x"),l}class qj extends bs{constructor(a){super(a),this.removeGroupControls=Dn,this.removeListeners=Dn,this.controls=new Gj(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Dn}unmount(){this.removeGroupControls(),this.removeListeners()}}const bv=n=>(a,l)=>{n&&ft.postRender(()=>n(a,l))};class Fj extends bs{constructor(){super(...arguments),this.removePointerDownListener=Dn}onPointerDown(a){this.session=new Jb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:l1(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:l,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:bv(a),onStart:bv(l),onMove:o,onEnd:(u,d)=>{delete this.session,r&&ft.postRender(()=>r(u,d))}}}mount(){this.removePointerDownListener=no(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Xr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Sv(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const $l={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(xe.test(n))n=parseFloat(n);else return n;const l=Sv(n,a.target.x),o=Sv(n,a.target.y);return`${l}% ${o}%`}},$j={correct:(n,{treeScale:a,projectionDelta:l})=>{const o=n,r=gs.parse(n);if(r.length>5)return o;const u=gs.createTransformer(n),d=typeof r[0]!="number"?1:0,m=l.x.scale*a.x,p=l.y.scale*a.y;r[0+d]/=m,r[1+d]/=p;const g=_t(m,p,.5);return typeof r[2+d]=="number"&&(r[2+d]/=g),typeof r[3+d]=="number"&&(r[3+d]/=g),u(r)}};class Yj extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o,layoutId:r}=this.props,{projection:u}=a;bC(Kj),u&&(l.group&&l.group.add(u),o&&o.register&&r&&o.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,onExitComplete:()=>this.safeToRemove()})),Xr.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:l,visualElement:o,drag:r,isPresent:u}=this.props,d=o.projection;return d&&(d.isPresent=u,r||a.layoutDependency!==l||l===void 0?d.willUpdate():this.safeToRemove(),a.isPresent!==u&&(u?d.promote():d.relegate()||ft.postRender(()=>{const m=d.getStack();(!m||!m.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),Zf.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:r}=a;r&&(r.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function o1(n){const[a,l]=F0(),o=S.useContext(Gf);return h.jsx(Yj,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(W0),isPresent:a,safeToRemove:l})}const Kj={borderRadius:{...$l,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$l,borderTopRightRadius:$l,borderBottomLeftRadius:$l,borderBottomRightRadius:$l,boxShadow:$j};function Zj(n,a,l){const o=on(n)?n:uo(n);return o.start(Sh("",o,a,l)),o.animation}function Xj(n){return n instanceof SVGElement&&n.tagName!=="svg"}const Qj=(n,a)=>n.depth-a.depth;class Jj{constructor(){this.children=[],this.isDirty=!1}add(a){lh(this.children,a),this.isDirty=!0}remove(a){oh(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(Qj),this.isDirty=!1,this.children.forEach(a)}}function Wj(n,a){const l=ha.now(),o=({timestamp:r})=>{const u=r-l;u>=a&&(ps(o),n(u-a))};return ft.read(o,!0),()=>ps(o)}const r1=["TopLeft","TopRight","BottomLeft","BottomRight"],e2=r1.length,_v=n=>typeof n=="string"?parseFloat(n):n,xv=n=>typeof n=="number"||xe.test(n);function t2(n,a,l,o,r,u){r?(n.opacity=_t(0,l.opacity!==void 0?l.opacity:1,n2(o)),n.opacityExit=_t(a.opacity!==void 0?a.opacity:1,0,a2(o))):u&&(n.opacity=_t(a.opacity!==void 0?a.opacity:1,l.opacity!==void 0?l.opacity:1,o));for(let d=0;d<e2;d++){const m=`border${r1[d]}Radius`;let p=Tv(a,m),g=Tv(l,m);if(p===void 0&&g===void 0)continue;p||(p=0),g||(g=0),p===0||g===0||xv(p)===xv(g)?(n[m]=Math.max(_t(_v(p),_v(g),o),0),(fa.test(g)||fa.test(p))&&(n[m]+="%")):n[m]=g}(a.rotate||l.rotate)&&(n.rotate=_t(a.rotate||0,l.rotate||0,o))}function Tv(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const n2=c1(0,.5,Cb),a2=c1(.5,.95,Dn);function c1(n,a,l){return o=>o<n?0:o>a?1:l(qi(n,a,o))}function Ev(n,a){n.min=a.min,n.max=a.max}function qn(n,a){Ev(n.x,a.x),Ev(n.y,a.y)}function Cv(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function Av(n,a,l,o,r){return n-=a,n=sc(n,1/l,o),r!==void 0&&(n=sc(n,1/r,o)),n}function s2(n,a=0,l=1,o=.5,r,u=n,d=n){if(fa.test(a)&&(a=parseFloat(a),a=_t(d.min,d.max,a/100)-d.min),typeof a!="number")return;let m=_t(u.min,u.max,o);n===u&&(m-=a),n.min=Av(n.min,a,l,m,r),n.max=Av(n.max,a,l,m,r)}function jv(n,a,[l,o,r],u,d){s2(n,a[l],a[o],a[r],a.scale,u,d)}const i2=["x","scaleX","originX"],l2=["y","scaleY","originY"];function Nv(n,a,l,o){jv(n.x,a,i2,l?l.x:void 0,o?o.x:void 0),jv(n.y,a,l2,l?l.y:void 0,o?o.y:void 0)}function wv(n){return n.translate===0&&n.scale===1}function u1(n){return wv(n.x)&&wv(n.y)}function Dv(n,a){return n.min===a.min&&n.max===a.max}function o2(n,a){return Dv(n.x,a.x)&&Dv(n.y,a.y)}function kv(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function d1(n,a){return kv(n.x,a.x)&&kv(n.y,a.y)}function Rv(n){return kn(n.x)/kn(n.y)}function Mv(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class r2{constructor(){this.members=[]}add(a){lh(this.members,a),a.scheduleRender()}remove(a){if(oh(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(a){const l=this.members.findIndex(r=>a===r);if(l===0)return!1;let o;for(let r=l;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1){o=u;break}}return o?(this.promote(o),!0):!1}promote(a,l){const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.instance&&o.scheduleRender(),a.scheduleRender(),a.resumeFrom=o,l&&(a.resumeFrom.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:r}=a.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:l,resumingFrom:o}=a;l.onExitComplete&&l.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function c2(n,a,l){let o="";const r=n.x.translate/a.x,u=n.y.translate/a.y,d=(l==null?void 0:l.z)||0;if((r||u||d)&&(o=`translate3d(${r}px, ${u}px, ${d}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),l){const{transformPerspective:g,rotate:y,rotateX:b,rotateY:x,skewX:T,skewY:A}=l;g&&(o=`perspective(${g}px) ${o}`),y&&(o+=`rotate(${y}deg) `),b&&(o+=`rotateX(${b}deg) `),x&&(o+=`rotateY(${x}deg) `),T&&(o+=`skewX(${T}deg) `),A&&(o+=`skewY(${A}deg) `)}const m=n.x.scale*a.x,p=n.y.scale*a.y;return(m!==1||p!==1)&&(o+=`scale(${m}, ${p})`),o||"none"}const Gs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ql=typeof window<"u"&&window.MotionDebug!==void 0,qd=["","X","Y","Z"],u2={visibility:"hidden"},Ov=1e3;let d2=0;function Fd(n,a,l,o){const{latestValues:r}=a;r[n]&&(l[n]=r[n],a.setStaticValue(n,0),o&&(o[n]=0))}function f1(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const l=pb(a);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:r,layoutId:u}=n.options;window.MotionCancelOptimisedAnimation(l,"transform",ft,!(r||u))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&f1(o)}function h1({attachResizeListener:n,defaultParent:a,measureScroll:l,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(d={},m=a==null?void 0:a()){this.id=d2++,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,Ql&&(Gs.totalNodes=Gs.resolvedTargetDeltas=Gs.recalculatedProjection=0),this.nodes.forEach(m2),this.nodes.forEach(b2),this.nodes.forEach(S2),this.nodes.forEach(p2),Ql&&window.MotionDebug.record(Gs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,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 Jj)}addEventListener(d,m){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new rh),this.eventHandlers.get(d).add(m)}notifyListeners(d,...m){const p=this.eventHandlers.get(d);p&&p.notify(...m)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,m=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Xj(d),this.instance=d;const{layoutId:p,layout:g,visualElement:y}=this.options;if(y&&!y.current&&y.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),m&&(g||p)&&(this.isLayoutDirty=!0),n){let b;const x=()=>this.root.updateBlockedByResize=!1;n(d,()=>{this.root.updateBlockedByResize=!0,b&&b(),b=Wj(x,250),Xr.hasAnimatedSinceResize&&(Xr.hasAnimatedSinceResize=!1,this.nodes.forEach(Lv))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&y&&(p||g)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:x,hasRelativeTargetChanged:T,layout:A})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||y.getDefaultTransition()||C2,{onLayoutAnimationStart:N,onLayoutAnimationComplete:C}=y.getProps(),B=!this.targetLayout||!d1(this.targetLayout,A)||T,R=!x&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||R||x&&(B||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(b,R);const X={...ih(j,"layout"),onPlay:N,onComplete:C};(y.shouldReduceMotion||this.options.layoutRoot)&&(X.delay=0,X.type=!1),this.startAnimation(X)}else x||Lv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=A})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ps(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(_2),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&f1(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 g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Bv);return}this.isUpdating||this.nodes.forEach(y2),this.isUpdating=!1,this.nodes.forEach(v2),this.nodes.forEach(f2),this.nodes.forEach(h2),this.clearAllSnapshots();const m=ha.now();tn.delta=za(0,1e3/60,m-tn.timestamp),tn.timestamp=m,tn.isProcessing=!0,Ld.update.process(tn),Ld.preRender.process(tn),Ld.render.process(tn),tn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(g2),this.sharedNodes.forEach(x2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ft.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 d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Bt(),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,d?d.layoutBox:void 0)}updateScroll(d="measure"){let m=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(m=!1),m){const p=o(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:p,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!r)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,m=this.projectionDelta&&!u1(this.projectionDelta),p=this.getTransformTemplate(),g=p?p(this.latestValues,""):void 0,y=g!==this.prevTransformTemplateValue;d&&(m||Hs(this.latestValues)||y)&&(r(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const m=this.measurePageBox();let p=this.removeElementScroll(m);return d&&(p=this.removeTransform(p)),A2(p),{animationId:this.root.animationId,measuredBox:m,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:m}=this.options;if(!m)return Bt();const p=m.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(j2))){const{scroll:y}=this.root;y&&(Ii(p.x,y.offset.x),Ii(p.y,y.offset.y))}return p}removeElementScroll(d){var m;const p=Bt();if(qn(p,d),!((m=this.scroll)===null||m===void 0)&&m.wasRoot)return p;for(let g=0;g<this.path.length;g++){const y=this.path[g],{scroll:b,options:x}=y;y!==this.root&&b&&x.layoutScroll&&(b.wasRoot&&qn(p,d),Ii(p.x,b.offset.x),Ii(p.y,b.offset.y))}return p}applyTransform(d,m=!1){const p=Bt();qn(p,d);for(let g=0;g<this.path.length;g++){const y=this.path[g];!m&&y.options.layoutScroll&&y.scroll&&y!==y.root&&Hi(p,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),Hs(y.latestValues)&&Hi(p,y.latestValues)}return Hs(this.latestValues)&&Hi(p,this.latestValues),p}removeTransform(d){const m=Bt();qn(m,d);for(let p=0;p<this.path.length;p++){const g=this.path[p];if(!g.instance||!Hs(g.latestValues))continue;bf(g.latestValues)&&g.updateSnapshot();const y=Bt(),b=g.measurePageBox();qn(y,b),Nv(m,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,y)}return Hs(this.latestValues)&&Nv(m,this.latestValues),m}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.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!==tn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!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 g=!!this.resumingFrom||this!==p;if(!(d||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((m=this.parent)===null||m===void 0)&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:x}=this.options;if(!(!this.layout||!(b||x))){if(this.resolvedRelativeTargetAt=tn.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Bt(),this.relativeTargetOrigin=Bt(),so(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),qn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Bt(),this.targetWithTransforms=Bt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Dj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qn(this.target,this.layout.layoutBox),s1(this.target,this.targetDelta)):qn(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=Bt(),this.relativeTargetOrigin=Bt(),so(this.relativeTargetOrigin,this.target,T.target),qn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ql&&Gs.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||bf(this.parent.latestValues)||a1(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 d;const m=this.getLead(),p=!!this.resumingFrom||this!==m;let g=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(g=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===tn.timestamp&&(g=!1),g)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;qn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,T=this.treeScale.y;Vj(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=Bt());const{target:A}=m;if(!A){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Cv(this.prevProjectionDelta.x,this.projectionDelta.x),Cv(this.prevProjectionDelta.y,this.projectionDelta.y)),ao(this.projectionDelta,this.layoutCorrected,A,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==T||!Mv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Mv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",A)),Ql&&Gs.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var m;if((m=this.options.visualElement)===null||m===void 0||m.scheduleRender(),d){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Vi(),this.projectionDelta=Vi(),this.projectionDeltaWithTransform=Vi()}setAnimationOrigin(d,m=!1){const p=this.snapshot,g=p?p.latestValues:{},y={...this.latestValues},b=Vi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!m;const x=Bt(),T=p?p.source:void 0,A=this.layout?this.layout.source:void 0,j=T!==A,N=this.getStack(),C=!N||N.members.length<=1,B=!!(j&&!C&&this.options.crossfade===!0&&!this.path.some(E2));this.animationProgress=0;let R;this.mixTargetDelta=X=>{const H=X/1e3;Uv(b.x,d.x,H),Uv(b.y,d.y,H),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(so(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),T2(this.relativeTarget,this.relativeTargetOrigin,x,H),R&&o2(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Bt()),qn(R,this.relativeTarget)),j&&(this.animationValues=y,t2(y,g,this.latestValues,H,B,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=H},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ps(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{Xr.hasAnimatedSinceResize=!0,this.currentAnimation=Zj(0,Ov,{...d,onUpdate:m=>{this.mixTargetDelta(m),d.onUpdate&&d.onUpdate(m)},onComplete:()=>{d.onComplete&&d.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 d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ov),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:m,target:p,layout:g,latestValues:y}=d;if(!(!m||!p||!g)){if(this!==d&&this.layout&&g&&m1(this.options.animationType,this.layout.layoutBox,g.layoutBox)){p=this.target||Bt();const b=kn(this.layout.layoutBox.x);p.x.min=d.target.x.min,p.x.max=p.x.min+b;const x=kn(this.layout.layoutBox.y);p.y.min=d.target.y.min,p.y.max=p.y.min+x}qn(m,p),Hi(m,y),ao(this.projectionDeltaWithTransform,this.layoutCorrected,m,y)}}registerSharedNode(d,m){this.sharedNodes.has(d)||this.sharedNodes.set(d,new r2),this.sharedNodes.get(d).add(m);const g=m.options.initialPromotionConfig;m.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(m):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var d;const{layoutId:m}=this.options;return m?((d=this.getStack())===null||d===void 0?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:m}=this.options;return m?(d=this.getStack())===null||d===void 0?void 0:d.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:m,preserveFollowOpacity:p}={}){const g=this.getStack();g&&g.promote(this,p),d&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let m=!1;const{latestValues:p}=d;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(m=!0),!m)return;const g={};p.z&&Fd("z",d,g,this.animationValues);for(let y=0;y<qd.length;y++)Fd(`rotate${qd[y]}`,d,g,this.animationValues),Fd(`skew${qd[y]}`,d,g,this.animationValues);d.render();for(const y in g)d.setStaticValue(y,g[y]),this.animationValues&&(this.animationValues[y]=g[y]);d.scheduleRender()}getProjectionStyles(d){var m,p;if(!this.instance||this.isSVG)return;if(!this.isVisible)return u2;const g={visibility:""},y=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Kr(d==null?void 0:d.pointerEvents)||"",g.transform=y?y(this.latestValues,""):"none",g;const b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){const j={};return this.options.layoutId&&(j.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,j.pointerEvents=Kr(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!Hs(this.latestValues)&&(j.transform=y?y({},""):"none",this.hasProjected=!1),j}const x=b.animationValues||b.latestValues;this.applyTransformsToTarget(),g.transform=c2(this.projectionDeltaWithTransform,this.treeScale,x),y&&(g.transform=y(x,g.transform));const{x:T,y:A}=this.projectionDelta;g.transformOrigin=`${T.origin*100}% ${A.origin*100}% 0`,b.animationValues?g.opacity=b===this?(p=(m=x.opacity)!==null&&m!==void 0?m:this.latestValues.opacity)!==null&&p!==void 0?p:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:g.opacity=b===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const j in Wr){if(x[j]===void 0)continue;const{correct:N,applyTo:C}=Wr[j],B=g.transform==="none"?x[j]:N(x[j],b);if(C){const R=C.length;for(let X=0;X<R;X++)g[C[X]]=B}else g[j]=B}return this.options.layoutId&&(g.pointerEvents=b===this?Kr(d==null?void 0:d.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var m;return(m=d.currentAnimation)===null||m===void 0?void 0:m.stop()}),this.root.nodes.forEach(Bv),this.root.sharedNodes.clear()}}}function f2(n){n.updateLayout()}function h2(n){var a;const l=((a=n.resumeFrom)===null||a===void 0?void 0:a.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&l&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=n.layout,{animationType:u}=n.options,d=l.source!==n.layout.source;u==="size"?Fn(b=>{const x=d?l.measuredBox[b]:l.layoutBox[b],T=kn(x);x.min=o[b].min,x.max=x.min+T}):m1(u,l.layoutBox,o)&&Fn(b=>{const x=d?l.measuredBox[b]:l.layoutBox[b],T=kn(o[b]);x.max=x.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+T)});const m=Vi();ao(m,o,l.layoutBox);const p=Vi();d?ao(p,n.applyTransform(r,!0),l.measuredBox):ao(p,o,l.layoutBox);const g=!u1(m);let y=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:x,layout:T}=b;if(x&&T){const A=Bt();so(A,l.layoutBox,x.layoutBox);const j=Bt();so(j,o,T.layoutBox),d1(A,j)||(y=!0),b.options.layoutRoot&&(n.relativeTarget=j,n.relativeTargetOrigin=A,n.relativeParent=b)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:l,delta:p,layoutDelta:m,hasLayoutChanged:g,hasRelativeTargetChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function m2(n){Ql&&Gs.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 p2(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function g2(n){n.clearSnapshot()}function Bv(n){n.clearMeasurements()}function y2(n){n.isLayoutDirty=!1}function v2(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function Lv(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function b2(n){n.resolveTargetDelta()}function S2(n){n.calcProjection()}function _2(n){n.resetSkewAndRotation()}function x2(n){n.removeLeadSnapshot()}function Uv(n,a,l){n.translate=_t(a.translate,0,l),n.scale=_t(a.scale,1,l),n.origin=a.origin,n.originPoint=a.originPoint}function zv(n,a,l,o){n.min=_t(a.min,l.min,o),n.max=_t(a.max,l.max,o)}function T2(n,a,l,o){zv(n.x,a.x,l.x,o),zv(n.y,a.y,l.y,o)}function E2(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const C2={duration:.45,ease:[.4,0,.1,1]},Vv=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Iv=Vv("applewebkit/")&&!Vv("chrome/")?Math.round:Dn;function Hv(n){n.min=Iv(n.min),n.max=Iv(n.max)}function A2(n){Hv(n.x),Hv(n.y)}function m1(n,a,l){return n==="position"||n==="preserve-aspect"&&!wj(Rv(a),Rv(l),.2)}function j2(n){var a;return n!==n.root&&((a=n.scroll)===null||a===void 0?void 0:a.wasRoot)}const N2=h1({attachResizeListener:(n,a)=>ho(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$d={current:void 0},p1=h1({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!$d.current){const n=new N2({});n.mount(window),n.setOptions({layoutScroll:!0}),$d.current=n}return $d.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),w2={pan:{Feature:Fj},drag:{Feature:qj,ProjectionNode:p1,MeasureLayout:o1}};function D2(n,a,l){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let r=document;const u=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n)}function g1(n,a){const l=D2(n),o=new AbortController,r={passive:!0,...a,signal:o.signal};return[l,r,()=>o.abort()]}function Gv(n){return a=>{a.pointerType==="touch"||Qb()||n(a)}}function k2(n,a,l={}){const[o,r,u]=g1(n,l),d=Gv(m=>{const{target:p}=m,g=a(m);if(typeof g!="function"||!p)return;const y=Gv(b=>{g(b),p.removeEventListener("pointerleave",y)});p.addEventListener("pointerleave",y,r)});return o.forEach(m=>{m.addEventListener("pointerenter",d,r)}),u}function Pv(n,a,l){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",l==="Start");const r="onHover"+l,u=o[r];u&&ft.postRender(()=>u(a,So(a)))}class R2 extends bs{mount(){const{current:a}=this.node;a&&(this.unmount=k2(a,l=>(Pv(this.node,l,"Start"),o=>Pv(this.node,o,"End"))))}unmount(){}}class M2 extends bs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!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=bo(ho(this.node.current,"focus",()=>this.onFocus()),ho(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const y1=(n,a)=>a?n===a?!0:y1(n,a.parentElement):!1,O2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function B2(n){return O2.has(n.tagName)||n.tabIndex!==-1}const Jl=new WeakSet;function qv(n){return a=>{a.key==="Enter"&&n(a)}}function Yd(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const L2=(n,a)=>{const l=n.currentTarget;if(!l)return;const o=qv(()=>{if(Jl.has(l))return;Yd(l,"down");const r=qv(()=>{Yd(l,"up")}),u=()=>Yd(l,"cancel");l.addEventListener("keyup",r,a),l.addEventListener("blur",u,a)});l.addEventListener("keydown",o,a),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),a)};function Fv(n){return _h(n)&&!Qb()}function U2(n,a,l={}){const[o,r,u]=g1(n,l),d=m=>{const p=m.currentTarget;if(!Fv(m)||Jl.has(p))return;Jl.add(p);const g=a(m),y=(T,A)=>{window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",x),!(!Fv(T)||!Jl.has(p))&&(Jl.delete(p),typeof g=="function"&&g(T,{success:A}))},b=T=>{y(T,l.useGlobalTarget||y1(p,T.target))},x=T=>{y(T,!1)};window.addEventListener("pointerup",b,r),window.addEventListener("pointercancel",x,r)};return o.forEach(m=>{!B2(m)&&m.getAttribute("tabindex")===null&&(m.tabIndex=0),(l.useGlobalTarget?window:m).addEventListener("pointerdown",d,r),m.addEventListener("focus",g=>L2(g,r),r)}),u}function $v(n,a,l){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",l==="Start");const r="onTap"+(l==="End"?"":l),u=o[r];u&&ft.postRender(()=>u(a,So(a)))}class z2 extends bs{mount(){const{current:a}=this.node;a&&(this.unmount=U2(a,l=>($v(this.node,l,"Start"),(o,{success:r})=>$v(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const _f=new WeakMap,Kd=new WeakMap,V2=n=>{const a=_f.get(n.target);a&&a(n)},I2=n=>{n.forEach(V2)};function H2({root:n,...a}){const l=n||document;Kd.has(l)||Kd.set(l,{});const o=Kd.get(l),r=JSON.stringify(a);return o[r]||(o[r]=new IntersectionObserver(I2,{root:n,...a})),o[r]}function G2(n,a,l){const o=H2(a);return _f.set(n,l),o.observe(n),()=>{_f.delete(n),o.unobserve(n)}}const P2={some:0,all:1};class q2 extends bs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:l,margin:o,amount:r="some",once:u}=a,d={root:l?l.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:P2[r]},m=p=>{const{isIntersecting:g}=p;if(this.isInView===g||(this.isInView=g,u&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:y,onViewportLeave:b}=this.node.getProps(),x=g?y:b;x&&x(p)};return G2(this.node.current,d,m)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:l}=this.node;["amount","margin","root"].some(F2(a,l))&&this.startObserver()}unmount(){}}function F2({viewport:n={}},{viewport:a={}}={}){return l=>n[l]!==a[l]}const $2={inView:{Feature:q2},tap:{Feature:z2},focus:{Feature:M2},hover:{Feature:R2}},Y2={layout:{ProjectionNode:p1,MeasureLayout:o1}},xf={current:null},v1={current:!1};function K2(){if(v1.current=!0,!!Ff)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>xf.current=n.matches;n.addListener(a),a()}else xf.current=!1}const Z2=[...Vb,ln,gs],X2=n=>Z2.find(zb(n)),Yv=new WeakMap;function Q2(n,a,l){for(const o in a){const r=a[o],u=l[o];if(on(r))n.addValue(o,r);else if(on(u))n.addValue(o,uo(r,{owner:n}));else if(u!==r)if(n.hasValue(o)){const d=n.getValue(o);d.liveStyle===!0?d.jump(r):d.hasAnimated||d.set(r)}else{const d=n.getStaticValue(o);n.addValue(o,uo(d!==void 0?d:r,{owner:n}))}}for(const o in l)a[o]===void 0&&n.removeValue(o);return a}const Kv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class J2{scrapeMotionValuesFromProps(a,l,o){return{}}constructor({parent:a,props:l,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:u,visualState:d},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=yh,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=ha.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,ft.render(this.render,!1,!0))};const{latestValues:p,renderState:g,onUpdate:y}=d;this.onUpdate=y,this.latestValues=p,this.baseTarget={...p},this.initialValues=l.initial?{...p}:{},this.renderState=g,this.parent=a,this.props=l,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=r,this.options=m,this.blockInitialAnimation=!!u,this.isControllingVariants=yc(l),this.isVariantNode=Q0(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:b,...x}=this.scrapeMotionValuesFromProps(l,{},this);for(const T in x){const A=x[T];p[T]!==void 0&&on(A)&&A.set(p[T],!1)}}mount(a){this.current=a,Yv.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,o)=>this.bindToMotionValue(o,l)),v1.current||K2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:xf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Yv.delete(this.current),this.projection&&this.projection.unmount(),ps(this.notifyUpdate),ps(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const l=this.features[a];l&&(l.unmount(),l.isMounted=!1)}this.current=null}bindToMotionValue(a,l){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const o=Zs.has(a),r=l.on("change",m=>{this.latestValues[a]=m,this.props.onUpdate&&ft.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),u=l.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,l)),this.valueSubscriptions.set(a,()=>{r(),u(),d&&d(),l.owner&&l.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Pi){const l=Pi[a];if(!l)continue;const{isEnabled:o,Feature:r}=l;if(!this.features[a]&&r&&o(this.props)&&(this.features[a]=new r(this)),this.features[a]){const u=this.features[a];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Bt()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,l){this.latestValues[a]=l}update(a,l){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<Kv.length;o++){const r=Kv[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const u="on"+r,d=a[u];d&&(this.propEventSubscriptions[r]=this.on(r,d))}this.prevMotionValues=Q2(this,this.scrapeMotionValuesFromProps(a,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]: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(a){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(a),()=>l.variantChildren.delete(a)}addValue(a,l){const o=this.values.get(a);l!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,l),this.values.set(a,l),this.latestValues[a]=l.get())}removeValue(a){this.values.delete(a);const l=this.valueSubscriptions.get(a);l&&(l(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,l){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&l!==void 0&&(o=uo(l===null?void 0:l,{owner:this}),this.addValue(a,o)),o}readValue(a,l){var o;let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(o=this.getBaseTargetFromProps(this.props,a))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(Lb(r)||jb(r))?r=parseFloat(r):!X2(r)&&gs.test(l)&&(r=Mb(a,l)),this.setBaseTarget(a,on(r)?r.get():r)),on(r)?r.get():r}setBaseTarget(a,l){this.baseTarget[a]=l}getBaseTarget(a){var l;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const d=Qf(this.props,o,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);d&&(r=d[a])}if(o&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!on(u)?u:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,l){return this.events[a]||(this.events[a]=new rh),this.events[a].add(l)}notify(a,...l){this.events[a]&&this.events[a].notify(...l)}}class b1 extends J2{constructor(){super(...arguments),this.KeyframeResolver=Ib}sortInstanceNodePosition(a,l){return a.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(a,l){return a.style?a.style[l]:void 0}removeValueFromRenderState(a,{vars:l,style:o}){delete l[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;on(a)&&(this.childSubscription=a.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function W2(n){return window.getComputedStyle(n)}class eN extends b1{constructor(){super(...arguments),this.type="html",this.renderInstance=lb}readValueFromInstance(a,l){if(Zs.has(l)){const o=gh(l);return o&&o.default||0}else{const o=W2(a),r=(ab(l)?o.getPropertyValue(l):o[l])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:l}){return i1(a,l)}build(a,l,o){eh(a,l,o.transformTemplate)}scrapeMotionValuesFromProps(a,l,o){return sh(a,l,o)}}class tN extends b1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Bt}getBaseTargetFromProps(a,l){return a[l]}readValueFromInstance(a,l){if(Zs.has(l)){const o=gh(l);return o&&o.default||0}return l=ob.has(l)?l:Kf(l),a.getAttribute(l)}scrapeMotionValuesFromProps(a,l,o){return ub(a,l,o)}build(a,l,o){th(a,l,this.isSVGTag,o.transformTemplate)}renderInstance(a,l,o,r){rb(a,l,o,r)}mount(a){this.isSVGTag=ah(a.tagName),super.mount(a)}}const nN=(n,a)=>Xf(n)?new tN(a):new eN(a,{allowProjection:n!==S.Fragment}),aN=NC({...bj,...$2,...w2,...Y2},nN),$n=PE(aN);var wt;(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"})(wt||(wt={}));var Gt;(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"})(Gt||(Gt={}));var ds;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(ds||(ds={}));var fs;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(fs||(fs={}));var ca;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.SUBSCRIPTION=2]="SUBSCRIPTION",n[n.API_KEY=3]="API_KEY"})(ca||(ca={}));var hs;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.ON=2]="ON"})(hs||(hs={}));const sN=8;Object.assign(Object.create(null),{"":wt.UNSPECIFIED,text:wt.TEXT,tool_use:wt.TOOL_USE,tool_result:wt.TOOL_RESULT,error:wt.ERROR,status:wt.STATUS,system:wt.SYSTEM,finding:wt.FINDING,subtask_create:wt.SUBTASK_CREATE,user_input:wt.USER_INPUT});wt.UNSPECIFIED+"",wt.TEXT+"",wt.TOOL_USE+"",wt.TOOL_RESULT+"",wt.ERROR+"",wt.STATUS+"",wt.SYSTEM+"",wt.FINDING+"",wt.SUBTASK_CREATE+"",wt.USER_INPUT+"";Object.assign(Object.create(null),{"":Gt.UNSPECIFIED,not_started:Gt.NOT_STARTED,working:Gt.WORKING,paused:Gt.PAUSED,complete:Gt.COMPLETE,failed:Gt.FAILED,pending:Gt.NOT_STARTED,assigned:Gt.NOT_STARTED,in_progress:Gt.WORKING,waiting_input:Gt.PAUSED,review:Gt.PAUSED,done:Gt.COMPLETE});Gt.UNSPECIFIED+"",Gt.NOT_STARTED+"",Gt.WORKING+"",Gt.PAUSED+"",Gt.COMPLETE+"",Gt.FAILED+"";Object.assign(Object.create(null),{"":ds.UNSPECIFIED,active:ds.ACTIVE,archived:ds.ARCHIVED});ds.UNSPECIFIED+"",ds.ACTIVE+"",ds.ARCHIVED+"";Object.assign(Object.create(null),{"":fs.UNSPECIFIED,open:fs.OPEN,closed:fs.CLOSED});fs.UNSPECIFIED+"",fs.OPEN+"",fs.CLOSED+"";Object.assign(Object.create(null),{"":ca.UNSPECIFIED,off:ca.OFF,subscription:ca.SUBSCRIPTION,api_key:ca.API_KEY});ca.UNSPECIFIED+"",ca.OFF+"",ca.SUBSCRIPTION+"",ca.API_KEY+"";Object.assign(Object.create(null),{"":hs.UNSPECIFIED,off:hs.OFF,on:hs.ON});hs.UNSPECIFIED+"",hs.OFF+"",hs.ON+"";function Va(n){return Array.isArray?Array.isArray(n):x1(n)==="[object Array]"}function iN(n){if(typeof n=="string")return n;let a=n+"";return a=="0"&&1/n==-1/0?"-0":a}function lN(n){return n==null?"":iN(n)}function ua(n){return typeof n=="string"}function S1(n){return typeof n=="number"}function oN(n){return n===!0||n===!1||rN(n)&&x1(n)=="[object Boolean]"}function _1(n){return typeof n=="object"}function rN(n){return _1(n)&&n!==null}function wn(n){return n!=null}function Zd(n){return!n.trim().length}function x1(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const cN="Incorrect 'index' type",uN=n=>`Invalid value for key ${n}`,dN=n=>`Pattern length exceeds max of ${n}.`,fN=n=>`Missing ${n} property in key`,hN=n=>`Property 'weight' in key '${n}' must be a positive integer`,Zv=Object.prototype.hasOwnProperty;class mN{constructor(a){this._keys=[],this._keyMap={};let l=0;a.forEach(o=>{let r=T1(o);this._keys.push(r),this._keyMap[r.id]=r,l+=r.weight}),this._keys.forEach(o=>{o.weight/=l})}get(a){return this._keyMap[a]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function T1(n){let a=null,l=null,o=null,r=1,u=null;if(ua(n)||Va(n))o=n,a=Xv(n),l=Tf(n);else{if(!Zv.call(n,"name"))throw new Error(fN("name"));const d=n.name;if(o=d,Zv.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(hN(d));a=Xv(d),l=Tf(d),u=n.getFn}return{path:a,id:l,weight:r,src:o,getFn:u}}function Xv(n){return Va(n)?n:n.split(".")}function Tf(n){return Va(n)?n.join("."):n}function pN(n,a){let l=[],o=!1;const r=(u,d,m)=>{if(wn(u))if(!d[m])l.push(u);else{let p=d[m];const g=u[p];if(!wn(g))return;if(m===d.length-1&&(ua(g)||S1(g)||oN(g)))l.push(lN(g));else if(Va(g)){o=!0;for(let y=0,b=g.length;y<b;y+=1)r(g[y],d,m+1)}else d.length&&r(g,d,m+1)}};return r(n,ua(a)?a.split("."):a,0),o?l:l[0]}const gN={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},yN={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,a)=>n.score===a.score?n.idx<a.idx?-1:1:n.score<a.score?-1:1},vN={location:0,threshold:.6,distance:100},bN={useExtendedSearch:!1,getFn:pN,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Ae={...yN,...gN,...vN,...bN};const SN=/[^ ]+/g;function _N(n=1,a=3){const l=new Map,o=Math.pow(10,a);return{get(r){const u=r.match(SN).length;if(l.has(u))return l.get(u);const d=1/Math.pow(u,.5*n),m=parseFloat(Math.round(d*o)/o);return l.set(u,m),m},clear(){l.clear()}}}class xh{constructor({getFn:a=Ae.getFn,fieldNormWeight:l=Ae.fieldNormWeight}={}){this.norm=_N(l,3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}setSources(a=[]){this.docs=a}setIndexRecords(a=[]){this.records=a}setKeys(a=[]){this.keys=a,this._keysMap={},a.forEach((l,o)=>{this._keysMap[l.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ua(this.docs[0])?this.docs.forEach((a,l)=>{this._addString(a,l)}):this.docs.forEach((a,l)=>{this._addObject(a,l)}),this.norm.clear())}add(a){const l=this.size();ua(a)?this._addString(a,l):this._addObject(a,l)}removeAt(a){this.records.splice(a,1);for(let l=a,o=this.size();l<o;l+=1)this.records[l].i-=1}getValueForItemAtKeyId(a,l){return a[this._keysMap[l]]}size(){return this.records.length}_addString(a,l){if(!wn(a)||Zd(a))return;let o={v:a,i:l,n:this.norm.get(a)};this.records.push(o)}_addObject(a,l){let o={i:l,$:{}};this.keys.forEach((r,u)=>{let d=r.getFn?r.getFn(a):this.getFn(a,r.path);if(wn(d)){if(Va(d)){let m=[];const p=[{nestedArrIndex:-1,value:d}];for(;p.length;){const{nestedArrIndex:g,value:y}=p.pop();if(wn(y))if(ua(y)&&!Zd(y)){let b={v:y,i:g,n:this.norm.get(y)};m.push(b)}else Va(y)&&y.forEach((b,x)=>{p.push({nestedArrIndex:x,value:b})})}o.$[u]=m}else if(ua(d)&&!Zd(d)){let m={v:d,n:this.norm.get(d)};o.$[u]=m}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function E1(n,a,{getFn:l=Ae.getFn,fieldNormWeight:o=Ae.fieldNormWeight}={}){const r=new xh({getFn:l,fieldNormWeight:o});return r.setKeys(n.map(T1)),r.setSources(a),r.create(),r}function xN(n,{getFn:a=Ae.getFn,fieldNormWeight:l=Ae.fieldNormWeight}={}){const{keys:o,records:r}=n,u=new xh({getFn:a,fieldNormWeight:l});return u.setKeys(o),u.setIndexRecords(r),u}function Hr(n,{errors:a=0,currentLocation:l=0,expectedLocation:o=0,distance:r=Ae.distance,ignoreLocation:u=Ae.ignoreLocation}={}){const d=a/n.length;if(u)return d;const m=Math.abs(o-l);return r?d+m/r:m?1:d}function TN(n=[],a=Ae.minMatchCharLength){let l=[],o=-1,r=-1,u=0;for(let d=n.length;u<d;u+=1){let m=n[u];m&&o===-1?o=u:!m&&o!==-1&&(r=u-1,r-o+1>=a&&l.push([o,r]),o=-1)}return n[u-1]&&u-o>=a&&l.push([o,u-1]),l}const Ps=32;function EN(n,a,l,{location:o=Ae.location,distance:r=Ae.distance,threshold:u=Ae.threshold,findAllMatches:d=Ae.findAllMatches,minMatchCharLength:m=Ae.minMatchCharLength,includeMatches:p=Ae.includeMatches,ignoreLocation:g=Ae.ignoreLocation}={}){if(a.length>Ps)throw new Error(dN(Ps));const y=a.length,b=n.length,x=Math.max(0,Math.min(o,b));let T=u,A=x;const j=m>1||p,N=j?Array(b):[];let C;for(;(C=n.indexOf(a,A))>-1;){let W=Hr(a,{currentLocation:C,expectedLocation:x,distance:r,ignoreLocation:g});if(T=Math.min(W,T),A=C+y,j){let F=0;for(;F<y;)N[C+F]=1,F+=1}}A=-1;let B=[],R=1,X=y+b;const H=1<<y-1;for(let W=0;W<y;W+=1){let F=0,ne=X;for(;F<ne;)Hr(a,{errors:W,currentLocation:x+ne,expectedLocation:x,distance:r,ignoreLocation:g})<=T?F=ne:X=ne,ne=Math.floor((X-F)/2+F);X=ne;let ge=Math.max(1,x-ne+1),L=d?b:Math.min(x+ne,b)+y,pe=Array(L+2);pe[L+1]=(1<<W)-1;for(let ve=L;ve>=ge;ve-=1){let G=ve-1,z=l[n.charAt(G)];if(j&&(N[G]=+!!z),pe[ve]=(pe[ve+1]<<1|1)&z,W&&(pe[ve]|=(B[ve+1]|B[ve])<<1|1|B[ve+1]),pe[ve]&H&&(R=Hr(a,{errors:W,currentLocation:G,expectedLocation:x,distance:r,ignoreLocation:g}),R<=T)){if(T=R,A=G,A<=x)break;ge=Math.max(1,2*x-A)}}if(Hr(a,{errors:W+1,currentLocation:x,expectedLocation:x,distance:r,ignoreLocation:g})>T)break;B=pe}const J={isMatch:A>=0,score:Math.max(.001,R)};if(j){const W=TN(N,m);W.length?p&&(J.indices=W):J.isMatch=!1}return J}function CN(n){let a={};for(let l=0,o=n.length;l<o;l+=1){const r=n.charAt(l);a[r]=(a[r]||0)|1<<o-l-1}return a}const ic=String.prototype.normalize?(n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(n=>n);class C1{constructor(a,{location:l=Ae.location,threshold:o=Ae.threshold,distance:r=Ae.distance,includeMatches:u=Ae.includeMatches,findAllMatches:d=Ae.findAllMatches,minMatchCharLength:m=Ae.minMatchCharLength,isCaseSensitive:p=Ae.isCaseSensitive,ignoreDiacritics:g=Ae.ignoreDiacritics,ignoreLocation:y=Ae.ignoreLocation}={}){if(this.options={location:l,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:m,isCaseSensitive:p,ignoreDiacritics:g,ignoreLocation:y},a=p?a:a.toLowerCase(),a=g?ic(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const b=(T,A)=>{this.chunks.push({pattern:T,alphabet:CN(T),startIndex:A})},x=this.pattern.length;if(x>Ps){let T=0;const A=x%Ps,j=x-A;for(;T<j;)b(this.pattern.substr(T,Ps),T),T+=Ps;if(A){const N=x-Ps;b(this.pattern.substr(N),N)}}else b(this.pattern,0)}searchIn(a){const{isCaseSensitive:l,ignoreDiacritics:o,includeMatches:r}=this.options;if(a=l?a:a.toLowerCase(),a=o?ic(a):a,this.pattern===a){let j={isMatch:!0,score:0};return r&&(j.indices=[[0,a.length-1]]),j}const{location:u,distance:d,threshold:m,findAllMatches:p,minMatchCharLength:g,ignoreLocation:y}=this.options;let b=[],x=0,T=!1;this.chunks.forEach(({pattern:j,alphabet:N,startIndex:C})=>{const{isMatch:B,score:R,indices:X}=EN(a,j,N,{location:u+C,distance:d,threshold:m,findAllMatches:p,minMatchCharLength:g,includeMatches:r,ignoreLocation:y});B&&(T=!0),x+=R,B&&X&&(b=[...b,...X])});let A={isMatch:T,score:T?x/this.chunks.length:1};return T&&r&&(A.indices=b),A}}class Ss{constructor(a){this.pattern=a}static isMultiMatch(a){return Qv(a,this.multiRegex)}static isSingleMatch(a){return Qv(a,this.singleRegex)}search(){}}function Qv(n,a){const l=n.match(a);return l?l[1]:null}class AN extends Ss{constructor(a){super(a)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(a){const l=a===this.pattern;return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class jN extends Ss{constructor(a){super(a)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(a){const o=a.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,a.length-1]}}}class NN extends Ss{constructor(a){super(a)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(a){const l=a.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class wN extends Ss{constructor(a){super(a)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(a){const l=!a.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,a.length-1]}}}class DN extends Ss{constructor(a){super(a)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(a){const l=a.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[a.length-this.pattern.length,a.length-1]}}}class kN extends Ss{constructor(a){super(a)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(a){const l=!a.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,a.length-1]}}}class A1 extends Ss{constructor(a,{location:l=Ae.location,threshold:o=Ae.threshold,distance:r=Ae.distance,includeMatches:u=Ae.includeMatches,findAllMatches:d=Ae.findAllMatches,minMatchCharLength:m=Ae.minMatchCharLength,isCaseSensitive:p=Ae.isCaseSensitive,ignoreDiacritics:g=Ae.ignoreDiacritics,ignoreLocation:y=Ae.ignoreLocation}={}){super(a),this._bitapSearch=new C1(a,{location:l,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:m,isCaseSensitive:p,ignoreDiacritics:g,ignoreLocation:y})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(a){return this._bitapSearch.searchIn(a)}}class j1 extends Ss{constructor(a){super(a)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(a){let l=0,o;const r=[],u=this.pattern.length;for(;(o=a.indexOf(this.pattern,l))>-1;)l=o+u,r.push([o,l-1]);const d=!!r.length;return{isMatch:d,score:d?0:1,indices:r}}}const Ef=[AN,j1,NN,wN,kN,DN,jN,A1],Jv=Ef.length,RN=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,MN="|";function ON(n,a={}){return n.split(MN).map(l=>{let o=l.trim().split(RN).filter(u=>u&&!!u.trim()),r=[];for(let u=0,d=o.length;u<d;u+=1){const m=o[u];let p=!1,g=-1;for(;!p&&++g<Jv;){const y=Ef[g];let b=y.isMultiMatch(m);b&&(r.push(new y(b,a)),p=!0)}if(!p)for(g=-1;++g<Jv;){const y=Ef[g];let b=y.isSingleMatch(m);if(b){r.push(new y(b,a));break}}}return r})}const BN=new Set([A1.type,j1.type]);class LN{constructor(a,{isCaseSensitive:l=Ae.isCaseSensitive,ignoreDiacritics:o=Ae.ignoreDiacritics,includeMatches:r=Ae.includeMatches,minMatchCharLength:u=Ae.minMatchCharLength,ignoreLocation:d=Ae.ignoreLocation,findAllMatches:m=Ae.findAllMatches,location:p=Ae.location,threshold:g=Ae.threshold,distance:y=Ae.distance}={}){this.query=null,this.options={isCaseSensitive:l,ignoreDiacritics:o,includeMatches:r,minMatchCharLength:u,findAllMatches:m,ignoreLocation:d,location:p,threshold:g,distance:y},a=l?a:a.toLowerCase(),a=o?ic(a):a,this.pattern=a,this.query=ON(this.pattern,this.options)}static condition(a,l){return l.useExtendedSearch}searchIn(a){const l=this.query;if(!l)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:r,ignoreDiacritics:u}=this.options;a=r?a:a.toLowerCase(),a=u?ic(a):a;let d=0,m=[],p=0;for(let g=0,y=l.length;g<y;g+=1){const b=l[g];m.length=0,d=0;for(let x=0,T=b.length;x<T;x+=1){const A=b[x],{isMatch:j,indices:N,score:C}=A.search(a);if(j){if(d+=1,p+=C,o){const B=A.constructor.type;BN.has(B)?m=[...m,...N]:m.push(N)}}else{p=0,d=0,m.length=0;break}}if(d){let x={isMatch:!0,score:p/d};return o&&(x.indices=m),x}}return{isMatch:!1,score:1}}}const Cf=[];function UN(...n){Cf.push(...n)}function Af(n,a){for(let l=0,o=Cf.length;l<o;l+=1){let r=Cf[l];if(r.condition(n,a))return new r(n,a)}return new C1(n,a)}const lc={AND:"$and",OR:"$or"},jf={PATH:"$path",PATTERN:"$val"},Nf=n=>!!(n[lc.AND]||n[lc.OR]),zN=n=>!!n[jf.PATH],VN=n=>!Va(n)&&_1(n)&&!Nf(n),Wv=n=>({[lc.AND]:Object.keys(n).map(a=>({[a]:n[a]}))});function N1(n,a,{auto:l=!0}={}){const o=r=>{let u=Object.keys(r);const d=zN(r);if(!d&&u.length>1&&!Nf(r))return o(Wv(r));if(VN(r)){const p=d?r[jf.PATH]:u[0],g=d?r[jf.PATTERN]:r[p];if(!ua(g))throw new Error(uN(p));const y={keyId:Tf(p),pattern:g};return l&&(y.searcher=Af(g,a)),y}let m={children:[],operator:u[0]};return u.forEach(p=>{const g=r[p];Va(g)&&g.forEach(y=>{m.children.push(o(y))})}),m};return Nf(n)||(n=Wv(n)),o(n)}function IN(n,{ignoreFieldNorm:a=Ae.ignoreFieldNorm}){n.forEach(l=>{let o=1;l.matches.forEach(({key:r,norm:u,score:d})=>{const m=r?r.weight:null;o*=Math.pow(d===0&&m?Number.EPSILON:d,(m||1)*(a?1:u))}),l.score=o})}function HN(n,a){const l=n.matches;a.matches=[],wn(l)&&l.forEach(o=>{if(!wn(o.indices)||!o.indices.length)return;const{indices:r,value:u}=o;let d={indices:r,value:u};o.key&&(d.key=o.key.src),o.idx>-1&&(d.refIndex=o.idx),a.matches.push(d)})}function GN(n,a){a.score=n.score}function PN(n,a,{includeMatches:l=Ae.includeMatches,includeScore:o=Ae.includeScore}={}){const r=[];return l&&r.push(HN),o&&r.push(GN),n.map(u=>{const{idx:d}=u,m={item:a[d],refIndex:d};return r.length&&r.forEach(p=>{p(u,m)}),m})}class Xi{constructor(a,l={},o){this.options={...Ae,...l},this.options.useExtendedSearch,this._keyStore=new mN(this.options.keys),this.setCollection(a,o)}setCollection(a,l){if(this._docs=a,l&&!(l instanceof xh))throw new Error(cN);this._myIndex=l||E1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){wn(a)&&(this._docs.push(a),this._myIndex.add(a))}remove(a=()=>!1){const l=[];for(let o=0,r=this._docs.length;o<r;o+=1){const u=this._docs[o];a(u,o)&&(this.removeAt(o),o-=1,r-=1,l.push(u))}return l}removeAt(a){this._docs.splice(a,1),this._myIndex.removeAt(a)}getIndex(){return this._myIndex}search(a,{limit:l=-1}={}){const{includeMatches:o,includeScore:r,shouldSort:u,sortFn:d,ignoreFieldNorm:m}=this.options;let p=ua(a)?ua(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return IN(p,{ignoreFieldNorm:m}),u&&p.sort(d),S1(l)&&l>-1&&(p=p.slice(0,l)),PN(p,this._docs,{includeMatches:o,includeScore:r})}_searchStringList(a){const l=Af(a,this.options),{records:o}=this._myIndex,r=[];return o.forEach(({v:u,i:d,n:m})=>{if(!wn(u))return;const{isMatch:p,score:g,indices:y}=l.searchIn(u);p&&r.push({item:u,idx:d,matches:[{score:g,value:u,norm:m,indices:y}]})}),r}_searchLogical(a){const l=N1(a,this.options),o=(m,p,g)=>{if(!m.children){const{keyId:b,searcher:x}=m,T=this._findMatches({key:this._keyStore.get(b),value:this._myIndex.getValueForItemAtKeyId(p,b),searcher:x});return T&&T.length?[{idx:g,item:p,matches:T}]:[]}const y=[];for(let b=0,x=m.children.length;b<x;b+=1){const T=m.children[b],A=o(T,p,g);if(A.length)y.push(...A);else if(m.operator===lc.AND)return[]}return y},r=this._myIndex.records,u={},d=[];return r.forEach(({$:m,i:p})=>{if(wn(m)){let g=o(l,m,p);g.length&&(u[p]||(u[p]={idx:p,item:m,matches:[]},d.push(u[p])),g.forEach(({matches:y})=>{u[p].matches.push(...y)}))}}),d}_searchObjectList(a){const l=Af(a,this.options),{keys:o,records:r}=this._myIndex,u=[];return r.forEach(({$:d,i:m})=>{if(!wn(d))return;let p=[];o.forEach((g,y)=>{p.push(...this._findMatches({key:g,value:d[y],searcher:l}))}),p.length&&u.push({idx:m,item:d,matches:p})}),u}_findMatches({key:a,value:l,searcher:o}){if(!wn(l))return[];let r=[];if(Va(l))l.forEach(({v:u,i:d,n:m})=>{if(!wn(u))return;const{isMatch:p,score:g,indices:y}=o.searchIn(u);p&&r.push({score:g,key:a,value:u,idx:d,norm:m,indices:y})});else{const{v:u,n:d}=l,{isMatch:m,score:p,indices:g}=o.searchIn(u);m&&r.push({score:p,key:a,value:u,norm:d,indices:g})}return r}}Xi.version="7.1.0";Xi.createIndex=E1;Xi.parseIndex=xN;Xi.config=Ae;Xi.parseQuery=N1;UN(LN);function e0(n,a,l,o){if(!a.trim())return[];const r=.3;return new Xi(n,{keys:l,threshold:r,ignoreLocation:!0,includeScore:!0,includeMatches:!0,minMatchCharLength:2}).search(a).map(p=>({item:p.item,score:p.score??1,matches:(p.matches??[]).map(g=>({key:g.key??"",indices:g.indices}))}))}const qN="_breadcrumbs_17or2_1",FN="_list_17or2_11",$N="_item_17or2_21",YN="_separator_17or2_28",KN="_link_17or2_34",ZN="_current_17or2_57",Bi={breadcrumbs:qN,list:FN,item:$N,separator:YN,link:KN,current:ZN},XN="›";function Qi({segments:n}){return h.jsx("nav",{className:Bi.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:Bi.list,children:n.map((a,l)=>{const o=l===n.length-1;return h.jsxs("li",{className:Bi.item,children:[l>0&&h.jsx("span",{className:Bi.separator,"aria-hidden":"true",children:XN}),a.url&&!o?h.jsx(Vf,{className:Bi.link,to:a.url,title:a.label,children:a.label}):h.jsx("span",{className:Bi.current,"aria-current":"page",title:a.label,children:a.label})]},l)})})})}function wf(){wf=function(r,u){return new l(r,void 0,u)};var n=RegExp.prototype,a=new WeakMap;function l(r,u,d){var m=new RegExp(r,u);return a.set(m,d||a.get(r)),oc(m,l.prototype)}function o(r,u){var d=a.get(u);return Object.keys(d).reduce(function(m,p){var g=d[p];if(typeof g=="number")m[p]=r[g];else{for(var y=0;r[g[y]]===void 0&&y+1<g.length;)y++;m[p]=r[g[y]]}return m},Object.create(null))}return(function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(u&&u.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),u&&oc(r,u)})(l,RegExp),l.prototype.exec=function(r){var u=n.exec.call(this,r);if(u){u.groups=o(u,this);var d=u.indices;d&&(d.groups=o(d,this))}return u},l.prototype[Symbol.replace]=function(r,u){if(typeof u=="string"){var d=a.get(this);return n[Symbol.replace].call(this,r,u.replace(/\$<([^>]+)>/g,function(p,g){var y=d[g];return"$"+(Array.isArray(y)?y.join("$"):y)}))}if(typeof u=="function"){var m=this;return n[Symbol.replace].call(this,r,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(o(p,m)),u.apply(this,p)})}return n[Symbol.replace].call(this,r,u)},wf.apply(this,arguments)}function oc(n,a){return oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,o){return l.__proto__=o,l},oc(n,a)}function t0(n,a){(a==null||a>n.length)&&(a=n.length);for(var l=0,o=new Array(a);l<a;l++)o[l]=n[l];return o}function Xd(n,a){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(r,u){if(r){if(typeof r=="string")return t0(r,u);var d=Object.prototype.toString.call(r).slice(8,-1);return d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set"?Array.from(r):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?t0(r,u):void 0}})(n))||a){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 QN=(function(n){return function(a){return a===void 0&&(a={}),(function(o,r){if(r&&!o.registered(r))throw new Error('The default language "'+r+'" is not registered with refractor.')})(n,a.defaultLanguage),function(o){X_(o,"element",l)};function l(o,r,u){var d,m;if(u&&u.tagName==="pre"&&o.tagName==="code"){var p=(o==null||(d=o.data)==null?void 0:d.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 g,y,b=(function(H){for(var J,W=Xd(H.properties.className);!(J=W()).done;){var F=J.value;if(F.slice(0,9)==="language-")return F.slice(9).toLowerCase()}return null})(o);if(!b&&a.defaultLanguage&&o.properties.className.push("language-"+(b=a.defaultLanguage)),o.properties.className.push("code-highlight"),b)try{var x,T;T=(x=b)!=null&&x.includes("diff-")?b.split("-")[1]:b,g=n.highlight(Br(o),T),u.properties.className=(u.properties.className||[]).concat("language-"+T)}catch(H){if(!a.ignoreMissing||!/Unknown language/.test(H.message))throw H;g=o}else g=o;g.children=(y=1,function H(J){return J.reduce(function(W,F){if(F.type==="text"){var ne=F.value,ge=(ne.match(/\n/g)||"").length;if(ge===0)F.position={start:{line:y,column:1},end:{line:y,column:1}},W.push(F);else for(var L,pe=ne.split(`
|
|
88
|
-
`),te=Xd(pe.entries());!(L=te()).done;){var ve=L.value,G=ve[0],z=ve[1];W.push({type:"text",value:G===pe.length-1?z:z+`
|
|
89
|
-
`,position:{start:{line:y+G,column:1},end:{line:y+G,column:1}}})}return y+=ge,W}if(Object.prototype.hasOwnProperty.call(F,"children")){var Y=y;return F.children=H(F.children),W.push(F),F.position={start:{line:Y,column:1},end:{line:y,column:1}},W}return W.push(F),W},[])})(g.children),g.position=g.children.length>0?{start:{line:g.children[0].position.start.line,column:0},end:{line:g.children[g.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var A,j=(function(H){var J=/{([\d,-]+)}/,W=H.split(",").map(function(ge){return ge.trim()}).join();if(J.test(W)){var F=J.exec(W)[1],ne=J_(F);return function(ge){return ne.includes(ge+1)}}return function(){return!1}})(p),N=(function(H){var J=wf(/showLineNumbers=(\d+)/i,{lines:1});if(J.test(H)){var W=J.exec(H);return Number(W.groups.lines)}return 1})(p),C=(function(H){for(var J=new Array(H),W=0;W<H;W++)J[W]={type:"element",tagName:"span",properties:{className:[]},children:[]};return J})(g.position.end.line),B=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],R=function(){var H,J,W=A.value,F=W[0],ne=W[1];ne.properties.className=["code-line"];var ge=W_(g,function(L){return L.position.start.line<=F+1&&L.position.end.line>=F+1});ne.children=ge.children,(p.toLowerCase().includes("showLineNumbers".toLowerCase())||a.showLineNumbers===!0||typeof a.showLineNumbers=="object"&&a.showLineNumbers.includes(b))&&!B.some(function(L){return p.toLowerCase().includes(L)})&&(ne.properties.line=[(F+N).toString()],ne.properties.className.push("line-number")),j(F)&&ne.properties.className.push("highlight-line"),(b==="diff"||(H=b)!=null&&H.includes("diff-"))&&Br(ne).substring(0,1)==="-"?ne.properties.className.push("deleted"):(b==="diff"||(J=b)!=null&&J.includes("diff-"))&&Br(ne).substring(0,1)==="+"&&ne.properties.className.push("inserted")},X=Xd(C.entries());!(A=X()).done;)R();C.length>0&&Br(C[C.length-1]).trim()===""&&C.pop(),o.children=C}}}})(Q_);const JN="_systemEvent_qvd33_1",WN="_systemTimestamp_qvd33_9",ew="_textEvent_qvd33_13",tw="_toolUseEvent_qvd33_100",nw="_toolUseHeader_qvd33_121",aw="_toolUsePrefix_qvd33_128",sw="_toolUseName_qvd33_133",iw="_toolUseArgs_qvd33_138",lw="_toolResultEvent_qvd33_149",ow="_toolResultHeader_qvd33_155",rw="_toolResultIndicatorOk_qvd33_179",cw="_toolResultIndicatorError_qvd33_186",uw="_toolResultLabel_qvd33_193",dw="_toolResultToggle_qvd33_197",fw="_toolResultCommand_qvd33_203",hw="_toolResultEllipsis_qvd33_213",mw="_toolResultPre_qvd33_217",pw="_errorEvent_qvd33_238",gw="_statusEvent_qvd33_247",yw="_userInputEvent_qvd33_257",vw="_userInputContent_qvd33_264",bw="_defaultEvent_qvd33_281",St={systemEvent:JN,systemTimestamp:WN,textEvent:ew,toolUseEvent:tw,toolUseHeader:nw,toolUsePrefix:aw,toolUseName:sw,toolUseArgs:iw,toolResultEvent:lw,toolResultHeader:ow,toolResultIndicatorOk:rw,toolResultIndicatorError:cw,toolResultLabel:uw,toolResultToggle:dw,toolResultCommand:fw,toolResultEllipsis:hw,toolResultPre:mw,errorEvent:pw,statusEvent:gw,userInputEvent:yw,userInputContent:vw,defaultEvent:bw};function Sw({time:n,content:a}){return h.jsxs("div",{className:St.systemEvent,children:[h.jsxs("span",{className:St.systemTimestamp,children:["[",n,"]"]})," ",a]})}function _w({content:n}){return h.jsx("div",{className:St.textEvent,children:h.jsx(kf,{remarkPlugins:[Rf],rehypePlugins:[QN],children:n})})}function xw({content:n}){let a="",l=n;try{const o=JSON.parse(n);a=o.tool||"",l=JSON.stringify(o.args,null,2)}catch{}return h.jsxs("div",{className:St.toolUseEvent,children:[h.jsxs("div",{className:St.toolUseHeader,children:[h.jsx("span",{className:St.toolUsePrefix,children:">"}),a?h.jsx("span",{className:St.toolUseName,children:a}):null]}),h.jsx("pre",{className:St.toolUseArgs,children:l})]})}const n0=5;function Tw(n,a){if(a==null)return"";if(typeof a!="object")return String(a);const l=a;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(a);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function Ew({content:n,raw:a,toolUseCtx:l}){const[o,r]=S.useState(!1);let u=!1;if(a)try{u=JSON.parse(a).is_error===!0}catch{}const d=n.split(`
|
|
90
|
-
`),m=d.length>n0,p=o?n:d.slice(0,n0).join(`
|
|
91
|
-
`),y=((l==null?void 0:l.tool)??"")||(u?"Tool error":"Tool output"),b=l?Tw(l.tool,l.args):"",x=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:u?St.toolResultIndicatorError:St.toolResultIndicatorOk,"aria-label":u?"error":"success",children:u?"✗":"✓"}),h.jsx("span",{className:St.toolResultLabel,children:y}),m&&h.jsx("span",{className:St.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:St.toolResultEvent,children:[m?h.jsx("button",{className:St.toolResultHeader,onClick:()=>{r(T=>!T)},"aria-expanded":o,children:x}):h.jsx("div",{className:St.toolResultHeader,children:x}),b&&h.jsx("div",{className:St.toolResultCommand,children:b}),h.jsxs("pre",{className:St.toolResultPre,children:[p,!o&&m&&h.jsx("span",{className:St.toolResultEllipsis,children:"…"})]})]})}function Cw({content:n}){return h.jsxs("div",{className:St.errorEvent,children:["Error: ",n]})}function Aw({content:n}){return h.jsxs("div",{className:St.statusEvent,children:["--- ",n," ---"]})}function jw({content:n}){return h.jsx("div",{className:St.userInputEvent,children:h.jsx("span",{className:St.userInputContent,children:n})})}function Nw({content:n}){return h.jsx("div",{className:St.defaultEvent,children:n})}function w1({event:n,toolUseCtx:a}){const l=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(Sw,{time:l,content:n.content});case"text":case"output":return h.jsx(_w,{content:n.content});case"tool_use":return h.jsx(xw,{content:n.content});case"tool_result":return h.jsx(Ew,{content:n.content,raw:n.raw,toolUseCtx:a});case"error":return h.jsx(Cw,{content:n.content});case"status":return h.jsx(Aw,{content:n.content});case"user_input":return h.jsx(jw,{content:n.content});default:return h.jsx(Nw,{content:n.content})}}const ww="_overlay_cmicx_1",Dw="_dialog_cmicx_11",kw="_title_cmicx_30",Rw="_description_cmicx_38",Mw="_actions_cmicx_45",Ow="_cancelButton_cmicx_52",Bw="_confirmButton_cmicx_79",Is={overlay:ww,dialog:Dw,title:kw,description:Rw,actions:Mw,cancelButton:Ow,confirmButton:Bw};function Sc({isOpen:n,title:a,description:l,confirmLabel:o="Delete",onConfirm:r,onCancel:u}){const d=S.useId(),m=S.useId();return h.jsx(vs,{children:n&&h.jsx($n.div,{className:Is.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:u,onKeyDown:p=>{p.key==="Escape"&&u()},role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":l?m:void 0,children:h.jsxs($n.div,{className:Is.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:d,className:Is.title,children:a}),l&&h.jsx("p",{id:m,className:Is.description,children:l}),h.jsxs("div",{className:Is.actions,children:[h.jsx("button",{type:"button",className:Is.cancelButton,onClick:u,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:Is.confirmButton,onClick:r,children:o})]})]})})})}const Lw="_spinner_13c8l_1",Uw="_spin_13c8l_1",zw="_sm_13c8l_14",Vw="_md_13c8l_20",Iw="_lg_13c8l_26",a0={spinner:Lw,spin:Uw,sm:zw,md:Vw,lg:Iw};function s0({size:n="md",className:a,label:l="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${a0.spinner} ${a0[n]} ${a??""}`,role:o?"status":void 0,"aria-label":l,"aria-hidden":o?void 0:!0})}const Df={not_started:{color:"var(--text-tertiary)",icon:"○",label:"Not Started"},working:{color:"var(--accent-green)",icon:"●",label:"Working"},paused:{color:"var(--accent-yellow)",icon:"◉",label:"Paused"},complete:{color:"var(--accent-green)",icon:"✓",label:"Complete"},failed:{color:"var(--accent-red)",icon:"✗",label:"Failed"},blocked:{color:"var(--accent-yellow)",icon:"⦸",label:"Blocked"}};function ys(n){return n==="blocked"?Df.blocked:Df[Th(n)]}const Hw={not_started:"statusPending",working:"statusInProgress",paused:"statusWaitingInput",complete:"statusDone",failed:"statusFailed"};function Gw(n){return Hw[Th(n)]??"statusPending"}const Pw=["working","paused","failed","not_started","blocked","complete"],i0=["not_started","working","paused","complete","failed"],qw={pending:"not_started",assigned:"not_started",in_progress:"working",waiting_input:"paused",review:"paused",done:"complete"};function Th(n){return n in Df&&n!=="blocked"?n:qw[n]??"not_started"}const Fw={not_started:"--text-tertiary",working:"--accent-green",paused:"--accent-yellow",complete:"--accent-green",failed:"--accent-red",pending:"--text-tertiary",assigned:"--text-tertiary",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",waiting_input:"--accent-yellow"},$w="_container_15oob_1",Yw="_header_15oob_5",Kw="_searchInput_15oob_17",Zw="_searchHighlight_15oob_50",Xw="_addButton_15oob_56",Qw="_createForm_15oob_83",Jw="_createInput_15oob_89",Ww="_createButton_15oob_120",eD="_creatingHint_15oob_161",tD="_projectRow_15oob_170",nD="_selected_15oob_188",aD="_expandArrow_15oob_193",sD="_expanded_15oob_200",iD="_projectName_15oob_204",lD="_taskCount_15oob_208",oD="_newTaskButton_15oob_214",rD="_taskRow_15oob_241",cD="_taskStatusIcon_15oob_271",uD="_taskTitle_15oob_275",dD="_dependencyBadge_15oob_282",fD="_blockedBadge_15oob_294",hD="_leafSpacer_15oob_299",mD="_childCountBadge_15oob_304",pD="_addChildButton_15oob_317",gD="_emptyCta_15oob_366",yD="_ctaDescription_15oob_379",vD="_ctaButton_15oob_385",bD="_emptyTaskCta_15oob_420",SD="_headerActions_15oob_425",_D="_groupToggle_15oob_431",xD="_groupToggleActive_15oob_458",TD="_statusGroupHeader_15oob_462",ED="_statusGroupIcon_15oob_481",CD="_statusGroupLabel_15oob_485",AD="_statusGroupCount_15oob_490",jD="_createTaskLink_15oob_503",Ne={container:$w,header:Yw,searchInput:Kw,searchHighlight:Zw,addButton:Xw,createForm:Qw,createInput:Jw,createButton:Ww,creatingHint:eD,projectRow:tD,selected:nD,expandArrow:aD,expanded:sD,projectName:iD,taskCount:lD,newTaskButton:oD,taskRow:rD,taskStatusIcon:cD,taskTitle:uD,dependencyBadge:dD,blockedBadge:fD,leafSpacer:hD,childCountBadge:mD,addChildButton:pD,emptyCta:gD,ctaDescription:yD,ctaButton:vD,emptyTaskCta:bD,headerActions:SD,groupToggle:_D,groupToggleActive:xD,statusGroupHeader:TD,statusGroupIcon:ED,statusGroupLabel:CD,statusGroupCount:AD,createTaskLink:jD};function ND(n){if(n.length===0)return[];const a=[...n].sort((o,r)=>o[0]-r[0]),l=[[a[0][0],a[0][1]]];for(let o=1;o<a.length;o++){const r=l[l.length-1],[u,d]=a[o];u<=r[1]+1?r[1]=Math.max(r[1],d):l.push([u,d])}return l}function D1({text:n,indices:a}){if(!a||a.length===0)return h.jsx(h.Fragment,{children:n});const l=ND(a),o=[];let r=0;for(const[u,d]of l)u>r&&o.push(h.jsx("span",{children:n.slice(r,u)},`p${r}`)),o.push(h.jsx("mark",{className:Ne.searchHighlight,children:n.slice(u,d+1)},`m${u}`)),r=d+1;return r<n.length&&o.push(h.jsx("span",{children:n.slice(r)},`p${r}`)),h.jsx(h.Fragment,{children:o})}const wD=[{name:"name",weight:2},{name:"description",weight:1}],DD=[{name:"title",weight:2},{name:"description",weight:1}],k1=34,kD=16,R1="grackle-group-by-status";function l0(){try{return localStorage.getItem(R1)==="true"}catch{return!1}}function RD(n){try{localStorage.setItem(R1,String(n))}catch{}}function MD(n,a){const l=new Map;for(const u of n){const m=u.dependsOn.length>0&&u.dependsOn.some(g=>a.get(g)!=="complete")?"blocked":u.status,p=l.get(m);p?p.push(u):l.set(m,[u])}const o=[],r=new Set;for(const u of Pw){r.add(u);const d=l.get(u);if(d&&d.length>0){d.sort((p,g)=>p.sortOrder-g.sortOrder);const m=ys(u);o.push({status:u,label:m.label,style:m,tasks:d})}}for(const[u,d]of l)if(!r.has(u)&&d.length>0){d.sort((p,g)=>p.sortOrder-g.sortOrder);const m=ys(u);o.push({status:u,label:m.label,style:m,tasks:d})}return o}function OD({group:n,isExpanded:a,onToggle:l,selectedTaskId:o,navigate:r,titleHighlights:u}){return h.jsxs("div",{"data-testid":`status-group-${n.status}`,children:[h.jsxs("div",{className:Ne.statusGroupHeader,role:"button",tabIndex:0,"aria-expanded":a,onClick:l,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),l())},children:[h.jsx("span",{className:`${Ne.expandArrow} ${a?Ne.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ne.statusGroupIcon,style:{color:n.style.color},children:n.style.icon}),h.jsx("span",{className:Ne.statusGroupLabel,children:n.label}),h.jsx("span",{className:Ne.statusGroupCount,children:n.tasks.length})]}),h.jsx(vs,{children:a&&h.jsx($n.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"},children:n.tasks.map(d=>{const m=ys(d.status),p=o===d.id;return h.jsxs("div",{onClick:()=>r(ms(d.id)),className:`${Ne.taskRow} ${p?Ne.selected:""}`,style:{"--task-indent":`${k1}px`},"data-task-id":d.id,children:[h.jsx("span",{className:Ne.leafSpacer}),h.jsx("span",{className:Ne.taskStatusIcon,style:{color:m.color},children:m.icon}),h.jsx("span",{className:Ne.taskTitle,title:d.title,children:h.jsx(D1,{text:d.title,indices:u.get(d.id)})})]},d.id)})})})]})}function BD(n){const a=new Map(n.map(o=>[o.id,{...o,children:[]}])),l=[];for(const o of a.values())o.parentTaskId&&a.has(o.parentTaskId)?a.get(o.parentTaskId).children.push(o):l.push(o);for(const o of a.values())o.children.sort((r,u)=>r.sortOrder-u.sortOrder);return l.sort((o,r)=>o.sortOrder-r.sortOrder)}function M1({node:n,depth:a,expandedTasks:l,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:m,titleHighlights:p}){const g=ys(n.status),y=n.dependsOn.length>0&&n.dependsOn.some(j=>m.get(j)!=="complete"),b=l.has(n.id),x=n.children.length>0,T=r===n.id,A=k1+a*kD;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>u(ms(n.id)),className:`${Ne.taskRow} ${T?Ne.selected:""}`,style:{"--task-indent":`${A}px`},"data-task-id":n.id,children:[x&&h.jsx("span",{className:`${Ne.expandArrow} ${b?Ne.expanded:""}`,role:"button",tabIndex:0,"aria-label":b?"Collapse task":"Expand task",onClick:j=>{j.stopPropagation(),o(n.id)},onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),j.stopPropagation(),o(n.id))},children:"▸"}),!x&&h.jsx("span",{className:Ne.leafSpacer}),h.jsx("span",{className:Ne.taskStatusIcon,style:{color:g.color},children:g.icon}),h.jsx("span",{className:Ne.taskTitle,title:n.title,children:h.jsx(D1,{text:n.title,indices:p.get(n.id)})}),x&&h.jsxs("span",{className:Ne.childCountBadge,children:[n.children.filter(j=>j.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${Ne.dependencyBadge} ${y?Ne.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:y?"blocked":"dep"}),a<sN&&h.jsx("button",{onClick:j=>{j.stopPropagation(),u($s(d,n.id))},title:"Add child task","aria-label":"Add child task",className:Ne.addChildButton,children:"+"})]}),h.jsx(vs,{children:x&&b&&h.jsx($n.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(j=>h.jsx(M1,{node:j,depth:a+1,expandedTasks:l,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:m,titleHighlights:p},j.id))})})]})}function LD(){const{projects:n,tasks:a,loadTasks:l,createProject:o,projectCreating:r}=nn(),u=na(),[d,m]=S.useState(new Set),[p,g]=S.useState(new Set),[y,b]=S.useState(new Set),[x,T]=S.useState(!1),[A,j]=S.useState(""),[N,C]=S.useState(l0),[B,R]=S.useState(l0),[X,H]=S.useState(new Map),J=()=>{const q=!N;RD(q),C(q),q&&(R(!0),H(new Map))},W=(q,I)=>{const De=`${q}:${I}`;H($e=>{const yt=new Map($e),xt=yt.has(De)?yt.get(De):B;return yt.set(De,!xt),yt})},F=(q,I)=>{const De=`${q}:${I}`;return X.has(De)?X.get(De):B},ne=dn("/tasks/:taskId/*"),ge=dn("/projects/:projectId"),L=(ne==null?void 0:ne.params.taskId)!=="new"?ne==null?void 0:ne.params.taskId:void 0,pe=ge==null?void 0:ge.params.projectId,te=S.useRef(d);te.current=d;const ve=S.useMemo(()=>new Map(a.map(q=>[q.id,q.status])),[a]),G=q=>{m(I=>{const De=new Set(I);return De.has(q)?De.delete(q):(De.add(q),l(q)),De})},z=q=>{g(I=>{const De=new Set(I);return De.has(q)?(De.delete(q),b($e=>new Set($e).add(q))):(De.add(q),b($e=>{const yt=new Set($e);return yt.delete(q),yt})),De})};S.useEffect(()=>{const q=new Set(a.filter(I=>I.parentTaskId).map(I=>I.parentTaskId));q.size>0&&g(I=>{const De=new Set(I);for(const $e of q)y.has($e)||De.add($e);return De})},[a,y]),S.useEffect(()=>{pe&&!te.current.has(pe)&&(m(q=>new Set(q).add(pe)),l(pe))},[pe,l]);const Y=()=>{!A.trim()||r||(o(A.trim()),j(""),T(!1))},[ee,ke]=S.useState(""),{directMatchTaskIds:je,treeMatchTaskIds:qe,visibleProjectIds:we,matchedProjectIds:_e,titleHighlights:Ce}=S.useMemo(()=>{if(!ee.trim())return{directMatchTaskIds:null,treeMatchTaskIds:null,visibleProjectIds:null,matchedProjectIds:null,titleHighlights:new Map};const q=e0(n,ee,wD),I=e0(a,ee,DD),De=new Set(q.map(Ze=>Ze.item.id)),$e=new Set(I.map(Ze=>Ze.item.id)),yt=new Map;for(const Ze of I){const Ue=Ze.matches.find(Sn=>Sn.key==="title");Ue&&yt.set(Ze.item.id,Ue.indices)}const xt=new Set(De);for(const Ze of I)xt.add(Ze.item.projectId);const Pt=new Set($e),We=new Map(a.map(Ze=>[Ze.id,Ze]));for(const Ze of[...$e]){let Ue=We.get(Ze);for(;Ue!=null&&Ue.parentTaskId;)Pt.add(Ue.parentTaskId),Ue=We.get(Ue.parentTaskId)}return{directMatchTaskIds:$e,treeMatchTaskIds:Pt,visibleProjectIds:xt,matchedProjectIds:De,titleHighlights:yt}},[ee,n,a]),Q=S.useRef(new Set);return S.useEffect(()=>{if(ee.trim())for(const q of n)!d.has(q.id)&&!Q.current.has(q.id)&&(Q.current.add(q.id),l(q.id))},[ee,n,d,l]),h.jsxs("div",{className:Ne.container,children:[h.jsxs("div",{className:Ne.header,children:[h.jsx("span",{children:"Projects"}),h.jsxs("div",{className:Ne.headerActions,children:[h.jsx("button",{className:`${Ne.groupToggle} ${N?Ne.groupToggleActive:""}`,onClick:J,"aria-label":N?"Switch to tree view":"Group tasks by status","aria-pressed":N,title:N?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:Ne.addButton,onClick:()=>T(!x),"aria-label":"Create project",title:"Create project",children:"+"})]})]}),n.length>0&&h.jsx("input",{type:"text",value:ee,onChange:q=>ke(q.target.value),placeholder:"Filter...","aria-label":"Filter projects and tasks",className:Ne.searchInput,"data-testid":"sidebar-search"}),x&&h.jsxs("div",{className:Ne.createForm,children:[h.jsx("input",{type:"text",value:A,onChange:q=>j(q.target.value),onKeyDown:q=>q.key==="Enter"&&Y(),placeholder:"Project name...",autoFocus:!0,disabled:r,className:Ne.createInput}),h.jsx("button",{onClick:Y,className:Ne.createButton,disabled:r,children:r?h.jsx(s0,{size:"sm",label:"Creating project"}):"OK"})]}),r&&h.jsxs("div",{className:Ne.creatingHint,children:[h.jsx(s0,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!x&&h.jsxs("div",{className:Ne.emptyCta,children:[h.jsx("button",{className:Ne.ctaButton,onClick:()=>T(!0),children:"Create Project"}),h.jsx("div",{className:Ne.ctaDescription,children:"Organize your work into projects"})]}),n.map(q=>{if(we&&!we.has(q.id))return null;const I=je!==null,De=d.has(q.id)||I,$e=a.filter(Ue=>Ue.projectId===q.id),yt=(_e==null?void 0:_e.has(q.id))??!1,xt=I&&!yt?N?je:qe:null,Pt=xt?$e.filter(Ue=>xt.has(Ue.id)):$e,We=pe===q.id,Ze=De&&!N?BD(Pt):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{We?G(q.id):(De||G(q.id),u(oo(q.id)))},className:`${Ne.projectRow} ${We?Ne.selected:""}`,children:[h.jsx("span",{className:`${Ne.expandArrow} ${De?Ne.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ne.projectName,title:q.name,children:q.name}),h.jsx("span",{className:Ne.taskCount,children:$e.length>0&&`${$e.filter(Ue=>Ue.status==="complete").length}/${$e.length}`}),h.jsx("button",{onClick:Ue=>{Ue.stopPropagation(),u($s(q.id))},title:"New task",className:Ne.newTaskButton,children:"+"})]}),h.jsx(vs,{children:De&&h.jsxs($n.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:[N?MD(Pt,ve).map(Ue=>h.jsx(OD,{group:Ue,isExpanded:F(q.id,Ue.status),onToggle:()=>W(q.id,Ue.status),selectedTaskId:L,navigate:u,titleHighlights:Ce},Ue.status)):Ze.map(Ue=>h.jsx(M1,{node:Ue,depth:0,expandedTasks:p,toggleTask:z,selectedTaskId:L,navigate:u,projectId:q.id,taskStatusById:ve,titleHighlights:Ce},Ue.id)),Pt.length===0&&h.jsx("div",{className:Ne.emptyTaskCta,children:h.jsx("button",{className:Ne.createTaskLink,onClick:()=>u($s(q.id)),children:"+ Create Task"})})]})})]},q.id)})]})}const UD="_container_lovia_1",zD="_content_lovia_40",o0={container:UD,content:zD},VD=320,O1=220,B1=600,L1="grackle-sidebar-width";function ID(){try{const n=localStorage.getItem(L1);if(n!==null){const a=Number(n);if(Number.isFinite(a)&&a>=O1&&a<=B1)return a}}catch{}return VD}function HD(n){try{localStorage.setItem(L1,String(n))}catch{}}function GD(){const[n]=S.useState(ID),a=S.useRef(null);return S.useEffect(()=>{const l=a.current;if(!l)return;const o=new ResizeObserver(r=>{for(const u of r){const d=u.borderBoxSize[0];if(d){const m=Math.round(d.inlineSize);m>=O1&&m<=B1&&HD(m)}}});return o.observe(l),()=>{o.disconnect()}},[]),h.jsx("div",{className:o0.container,ref:a,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:o0.content,children:h.jsx(LD,{})})})}const PD="_bar_8ghh5_1",qD="_barColumn_8ghh5_32",FD="_barRow_8ghh5_63",$D="_input_8ghh5_74",YD="_inputSmall_8ghh5_109",KD="_select_8ghh5_178",ZD="_btnPrimary_8ghh5_214",XD="_btnDanger_8ghh5_245",QD="_btnGhost_8ghh5_284",JD="_badge_8ghh5_312",WD="_statusText_8ghh5_322",ek="_statusCompleted_8ghh5_327",tk="_statusFailed_8ghh5_331",nk="_statusBlocked_8ghh5_335",ak="_hintText_8ghh5_340",sk="_creatingHint_8ghh5_345",ik="_errorHint_8ghh5_353",lk="_disconnectHint_8ghh5_359",fe={bar:PD,barColumn:qD,barRow:FD,input:$D,inputSmall:YD,select:KD,btnPrimary:ZD,btnDanger:XD,btnGhost:QD,badge:JD,statusText:WD,statusCompleted:ek,statusFailed:tk,statusBlocked:nk,hintText:ak,creatingHint:sk,errorHint:ik,disconnectHint:lk};function r0({value:n,onChange:a,testId:l}){return h.jsxs("select",{"data-testid":l,value:n,onChange:o=>a(o.target.value),className:fe.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 c0(n,a){if(!n)return!1;const l=a.find(o=>o.id===n);return l!==void 0&&(l.status==="disconnected"||l.status==="error")}function u0({environmentId:n,onReconnect:a}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:fe.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>a(n),className:fe.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function ok(){const{spawn:n,sendInput:a,kill:l,sessions:o,tasks:r,environments:u,personas:d,addEnvironment:m,provisionEnvironment:p,codespaces:g,codespaceError:y,codespaceListError:b,codespaceCreating:x,listCodespaces:T,createCodespace:A}=nn(),{showToast:j}=go(),N=na(),[C]=If(),B=dn("/sessions/:sessionId"),R=dn("/tasks/:taskId"),X=dn("/tasks/:taskId/stream"),H=dn("/tasks/:taskId/findings"),J=dn("/tasks/:taskId/edit"),W=dn("/sessions/new"),F=dn("/environments/new"),ne=dn("/projects/:projectId"),ge=dn("/tasks/new"),L=dn("/"),pe=dn("/settings/*"),te=B==null?void 0:B.params.sessionId,ve=(R==null?void 0:R.params.taskId)??(X==null?void 0:X.params.taskId)??(H==null?void 0:H.params.taskId),G=!!W,z=!!F,Y=!!ne,ee=!!ge,ke=!!J,je=!!L&&!G&&!z&&!Y&&!ee,qe=!!pe,we=G?C.get("env")??"":"",_e=G?C.get("runtime")??"claude-code":"claude-code",[Ce,Q]=S.useState(""),[q,I]=S.useState(G?_e:"claude-code"),[De,$e]=S.useState(""),yt=be=>{if($e(be),be){const re=d.find(le=>le.id===be);re!=null&&re.runtime&&I(re.runtime)}},[xt,Pt]=S.useState(""),[We,Ze]=S.useState("local"),[Ue,Sn]=S.useState("claude-code"),[_n,Zn]=S.useState(""),[an,Xn]=S.useState(""),[Z,ie]=S.useState(""),[ce,de]=S.useState(""),[Te,Ee]=S.useState(""),[et,Le]=S.useState(""),[ot,Dt]=S.useState(""),[Tt,Lt]=S.useState(""),[rt,Et]=S.useState(""),[cn,vt]=S.useState("pick");S.useEffect(()=>{G&&I(_e)},[G,_e]);const $t=te?o.find(be=>be.id===te):void 0,Yt=ve?r.find(be=>be.id===ve):void 0,_s=(Yt==null?void 0:Yt.latestSessionId)||void 0,ae=_s?o.find(be=>be.id===_s):void 0,Me=Yt?Yt.dependsOn.some(be=>{const re=r.find(le=>le.id===be);return re&&re.status!=="complete"}):!1;if(je||qe)return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Select a session or click + to start"})});if(ke||ee)return h.jsx(h.Fragment,{});if(z){const be=se=>{if(!se.trim())return!0;const Ct=Number(se);return Number.isInteger(Ct)&&Ct>=1&&Ct<=65535},re=()=>!(!xt.trim()||We==="ssh"&&!_n.trim()||We==="codespace"&&!et.trim()||(We==="local"||We==="ssh")&&!be(an)),le=()=>{if(!re())return;const se={};if(We==="local"){if(_n.trim()&&(se.host=_n.trim()),an.trim()){const Ct=Number(an);Number.isInteger(Ct)&&(se.port=Ct)}}else if(We==="ssh"){if(se.host=_n.trim(),Z.trim()&&(se.user=Z.trim()),an.trim()){const Ct=Number(an);Number.isInteger(Ct)&&(se.sshPort=Ct)}ot.trim()&&(se.identityFile=ot.trim())}else We==="docker"?(ce.trim()&&(se.image=ce.trim()),Te.trim()&&(se.repo=Te.trim())):We==="codespace"&&(se.codespaceName=et.trim());m(xt.trim(),We,se,Ue),j("Environment added successfully","success"),Pt(""),Ze("local"),Sn("claude-code"),Zn(""),Xn(""),ie(""),de(""),Ee(""),Le(""),Dt(""),Lt(""),Et(""),vt("pick"),N(Gi,{replace:!0})};return h.jsxs("div",{className:fe.barColumn,children:[h.jsxs("div",{className:fe.barRow,children:[h.jsx("span",{className:fe.badge,children:"new env"}),h.jsx("input",{type:"text",value:xt,onChange:se=>Pt(se.target.value),placeholder:"Environment name...",autoFocus:!0,className:fe.input}),h.jsxs("select",{value:We,onChange:se=>{Ze(se.target.value),se.target.value==="codespace"&&(T(),vt("pick"),Le(""))},className:fe.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(r0,{value:Ue,onChange:Sn,testId:"new-environment-runtime-select"}),h.jsx("button",{onClick:le,disabled:!re(),className:fe.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:fe.barRow,children:[We==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:_n,onChange:se=>Zn(se.target.value),placeholder:"Host (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:an,onChange:se=>Xn(se.target.value),placeholder:"Port (optional)...",className:fe.inputSmall})]}),We==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:_n,onChange:se=>Zn(se.target.value),placeholder:"Host (required)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:Z,onChange:se=>ie(se.target.value),placeholder:"User (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:an,onChange:se=>Xn(se.target.value),placeholder:"SSH port (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:ot,onChange:se=>Dt(se.target.value),placeholder:"Identity file (optional)...",className:fe.inputSmall})]}),We==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:ce,onChange:se=>de(se.target.value),placeholder:"Image (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:Te,onChange:se=>Ee(se.target.value),placeholder:"Repo (optional)...",className:fe.inputSmall})]}),We==="codespace"&&cn==="pick"&&h.jsxs(h.Fragment,{children:[!b&&h.jsxs("select",{value:et,onChange:se=>{se.target.value==="__create__"?(vt("create"),Le("")):(Le(se.target.value),se.target.value&&!xt.trim()&&Pt(se.target.value))},disabled:x,className:fe.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),g.map(se=>h.jsxs("option",{value:se.name,children:[se.name," (",se.repository,") — ",se.state]},se.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),x&&h.jsx("span",{className:fe.creatingHint,children:"Creating codespace..."}),b&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:fe.errorHint,children:b}),h.jsx("input",{type:"text",value:et,onChange:se=>Le(se.target.value),placeholder:"Or enter codespace name manually...",className:fe.inputSmall})]}),y&&!b&&h.jsx("span",{className:fe.errorHint,children:y})]}),We==="codespace"&&cn==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Tt,onChange:se=>Lt(se.target.value),placeholder:"owner/repo",className:fe.inputSmall}),h.jsx("input",{type:"text",value:rt,onChange:se=>Et(se.target.value),placeholder:"Machine type (optional)...",className:fe.inputSmall}),h.jsx("button",{onClick:()=>{Tt.trim()&&(A(Tt.trim(),rt.trim()||void 0),vt("pick"),Lt(""),Et(""))},disabled:!Tt.trim(),className:fe.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{vt("pick"),Lt(""),Et("")},className:fe.btnGhost,children:"Cancel"})]})]})]})}if(Y)return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Select a task or click + to create one"})});if(ve&&Yt){if(Yt.status==="not_started"){const be=Me?Yt.dependsOn.map(re=>r.find(le=>le.id===re)).filter(re=>re&&re.status!=="complete").map(re=>re.title):[];return h.jsx("div",{className:fe.bar,children:Me?h.jsxs("span",{className:fe.statusBlocked,children:["Blocked by: ",be.join(", ")]}):h.jsx("span",{className:fe.hintText,children:"Use the buttons above to start or manage this task"})})}if(Yt.status==="working"||Yt.status==="paused"){if((ae==null?void 0:ae.status)==="idle"){const re=ae.environmentId,le=c0(re,u),se=Ct=>{Ct.preventDefault();const Mn=Yt.latestSessionId||_s;!Ce.trim()||!Mn||le||(a(Mn,Ce),Q(""))};return h.jsxs("form",{onSubmit:se,className:fe.bar,children:[le&&re&&h.jsx(u0,{environmentId:re,onReconnect:p}),h.jsx("input",{type:"text",value:Ce,onChange:Ct=>Q(Ct.target.value),placeholder:"Type a message...",autoFocus:!le,disabled:le,className:fe.input}),h.jsx("span",{title:le?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Ce.trim()||le,className:fe.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:fe.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:fe.input})})}if(Yt.status==="complete")return h.jsxs("div",{className:fe.bar,children:[h.jsx("span",{className:`${fe.statusText} ${fe.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>N($s(Yt.projectId)),className:fe.btnPrimary,children:"+ New Task"})]});if(Yt.status==="failed")return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:`${fe.statusText} ${fe.statusFailed}`,children:"Task failed"})})}if(G){const be=re=>{re.preventDefault(),!(!Ce.trim()||!we)&&(n(we,Ce,void 0,q,De),j("Session started","success"),Q(""),$e(""))};return h.jsxs("form",{onSubmit:be,className:fe.bar,children:[h.jsx("span",{className:fe.badge,children:"new chat"}),h.jsx("input",{type:"text",value:Ce,onChange:re=>Q(re.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:fe.input}),h.jsx(r0,{value:q,onChange:I,testId:"new-chat-runtime-select"}),h.jsxs("select",{value:De,onChange:re=>yt(re.target.value),className:fe.select,children:[h.jsx("option",{value:"",children:"No persona"}),d.map(re=>h.jsx("option",{value:re.id,children:re.name},re.id))]}),h.jsx("button",{type:"submit",disabled:!Ce.trim()||!we,className:fe.btnPrimary,children:"Go"})]})}if(te){const be=($t==null?void 0:$t.status)==="running",re=($t==null?void 0:$t.status)==="idle",le=$t!==void 0&&["completed","failed","interrupted"].includes($t.status);if(be)return h.jsxs("div",{className:fe.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:fe.input}),h.jsx("button",{onClick:()=>l(te),className:fe.btnDanger,title:"Stop session",children:"Stop"})]});if(re){const se=c0($t.environmentId,u),Ct=Mn=>{Mn.preventDefault(),!(!Ce.trim()||se)&&(a(te,Ce),Q(""))};return h.jsxs("form",{onSubmit:Ct,className:fe.bar,children:[se&&$t.environmentId&&h.jsx(u0,{environmentId:$t.environmentId,onReconnect:p}),h.jsx("input",{type:"text",value:Ce,onChange:Mn=>Q(Mn.target.value),placeholder:"Type a message...",autoFocus:!se,disabled:se,className:fe.input}),h.jsx("span",{title:se?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Ce.trim()||se,className:fe.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>l(te),className:fe.btnDanger,title:"Stop session",children:"Stop"})]})}if(le)return h.jsxs("div",{className:fe.bar,children:[h.jsxs("span",{className:`${fe.statusText} ${fe.hintText}`,children:["Session ",$t.status]}),h.jsx("button",{onClick:()=>N(U0($t.environmentId,$t.runtime)),className:fe.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Loading..."})})}const rk="_toast_da8ll_1",ck="_success_da8ll_18",uk="_icon_da8ll_22",dk="_error_da8ll_25",fk="_warning_da8ll_32",hk="_info_da8ll_38",mk="_message_da8ll_53",pk="_close_da8ll_60",Yl={toast:rk,success:ck,icon:uk,error:dk,warning:fk,info:hk,message:mk,close:pk},gk={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function yk({toast:n,onDismiss:a}){return S.useEffect(()=>{const l=setTimeout(()=>a(n.id),n.duration);return()=>clearTimeout(l)},[n.id,n.duration,a]),h.jsxs($n.div,{className:`${Yl.toast} ${Yl[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:Yl.icon,"aria-hidden":"true",children:gk[n.variant]}),h.jsx("span",{className:Yl.message,children:n.message}),h.jsx("button",{type:"button",className:Yl.close,onClick:()=>a(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const vk="_container_qqse2_1",bk={container:vk};function Sk(){const{toasts:n,dismissToast:a}=go();return h.jsx("div",{className:bk.container,"data-testid":"toast-container",children:h.jsx(vs,{children:n.map(l=>h.jsx(yk,{toast:l,onDismiss:a},l.id))})})}function _k(n,a){const l=S.useRef(null);S.useEffect(()=>{const o=l.current;if(l.current=n,o===null)return;const r=new Map;for(const d of o)r.set(d.id,d);const u=new Set;for(const d of n){u.add(d.id);const m=r.get(d.id);m&&m.status!==d.status&&(d.status==="connecting"||d.status==="sleeping"||(d.status==="connected"?a("Environment connected","success"):d.status==="error"?a("Environment provision failed","error"):d.status==="disconnected"&&(m.status==="connected"?a("Environment disconnected","warning"):a("Environment stopped","info"))))}for(const d of o)u.has(d.id)||a("Environment removed","info")},[n,a])}const xk="_panelContainer_yidfr_1",Tk="_emptyState_yidfr_8",Ek="_fadeIn_yidfr_1",Ck="_projectSummary_yidfr_17",Ak="_projectSummaryTitle_yidfr_28",jk="_projectSummarySubtitle_yidfr_32",Nk="_header_yidfr_36",wk="_headerInfo_yidfr_69",Dk="_killButton_yidfr_75",kk="_headerTitle_yidfr_104",Rk="_headerActions_yidfr_119",Mk="_taskStatusBadge_yidfr_126",Ok="_taskBranch_yidfr_135",Bk="_taskBlockedBadge_yidfr_141",Lk="_btnPrimary_yidfr_149",Uk="_btnDanger_yidfr_180",zk="_btnGhost_yidfr_219",Vk="_rejectInput_yidfr_245",Ik="_tabBar_yidfr_275",Hk="_tab_yidfr_275",Gk="_active_yidfr_301",Pk="_eventScroll_yidfr_306",qk="_tabContent_yidfr_312",Fk="_noContext_yidfr_317",$k="_overviewContent_yidfr_323",Yk="_overviewDashboard_yidfr_332",Kk="_overviewHero_yidfr_338",Zk="_statusBadge_yidfr_345",Xk="_statusPending_yidfr_357",Qk="_statusAssigned_yidfr_362",Jk="_statusInProgress_yidfr_367",Wk="_statusReview_yidfr_372",eR="_statusDone_yidfr_377",tR="_statusFailed_yidfr_382",nR="_statusWaitingInput_yidfr_387",aR="_overviewBranchPill_yidfr_392",sR="_branchLink_yidfr_407",iR="_overviewSection_yidfr_418",lR="_overviewLabel_yidfr_424",oR="_overviewValue_yidfr_431",rR="_overviewMuted_yidfr_436",cR="_overviewMarkdown_yidfr_442",uR="_envRow_yidfr_511",dR="_envDot_yidfr_517",fR="_envDotGreen_yidfr_524",hR="_envDotYellow_yidfr_528",mR="_envDotRed_yidfr_532",pR="_envDotGray_yidfr_536",gR="_depList_yidfr_540",yR="_depItem_yidfr_546",vR="_depBlocked_yidfr_553",bR="_depDone_yidfr_557",SR="_timeline_yidfr_561",_R="_timelineRow_yidfr_567",xR="_timelineKey_yidfr_574",TR="_timelineValue_yidfr_580",ER="_timelineDelta_yidfr_584",CR="_reviewNotes_yidfr_595",AR="_overviewDescription_yidfr_606",jR="_waitingMessage_yidfr_612",NR="_errorMessage_yidfr_616",wR="_eventOverflowWarning_yidfr_620",DR="_attemptSelector_yidfr_634",kR="_attemptLabel_yidfr_650",RR="_attemptButton_yidfr_654",MR="_attemptActive_yidfr_671",OR="_attemptStatus_yidfr_677",BR="_emptyCta_yidfr_683",LR="_ctaTitle_yidfr_695",UR="_ctaDescription_yidfr_701",zR="_ctaButton_yidfr_708",VR="_ctaLink_yidfr_743",IR="_projectHeader_yidfr_757",HR="_projectName_yidfr_782",GR="_projectMeta_yidfr_795",PR="_metaRow_yidfr_803",qR="_metaLabel_yidfr_816",FR="_metaValue_yidfr_831",$R="_metaPlaceholder_yidfr_841",YR="_editButton_yidfr_846",KR="_editInput_yidfr_862",ZR="_editTextarea_yidfr_894",XR="_editSelect_yidfr_930",QR="_archiveButton_yidfr_963",JR="_repoLink_yidfr_993",WR="_metaValueClickable_yidfr_1003",eM="_editHint_yidfr_1022",tM="_editError_yidfr_1031",nM="_editInputInvalid_yidfr_1038",aM="_unsavedDot_yidfr_1043",sM="_metaToggle_yidfr_1051",iM="_metaToggleArrow_yidfr_1072",lM="_metaToggleArrowOpen_yidfr_1077",oM="_progressBarContainer_yidfr_1081",rM="_progressBar_yidfr_1081",cM="_progressFill_yidfr_1097",uM="_progressLabel_yidfr_1104",dM="_metaTimestamps_yidfr_1111",fM="_metaTimestamp_yidfr_1111",hM="_worktreeToggle_yidfr_1133",mM="_editFieldWrapper_yidfr_1148",D={panelContainer:xk,emptyState:Tk,fadeIn:Ek,projectSummary:Ck,projectSummaryTitle:Ak,projectSummarySubtitle:jk,header:Nk,headerInfo:wk,killButton:Dk,headerTitle:kk,headerActions:Rk,taskStatusBadge:Mk,taskBranch:Ok,taskBlockedBadge:Bk,btnPrimary:Lk,btnDanger:Uk,btnGhost:zk,rejectInput:Vk,tabBar:Ik,tab:Hk,active:Gk,eventScroll:Pk,tabContent:qk,noContext:Fk,overviewContent:$k,overviewDashboard:Yk,overviewHero:Kk,statusBadge:Zk,statusPending:Xk,statusAssigned:Qk,statusInProgress:Jk,statusReview:Wk,statusDone:eR,statusFailed:tR,statusWaitingInput:nR,overviewBranchPill:aR,branchLink:sR,overviewSection:iR,overviewLabel:lR,overviewValue:oR,overviewMuted:rR,overviewMarkdown:cR,envRow:uR,envDot:dR,envDotGreen:fR,envDotYellow:hR,envDotRed:mR,envDotGray:pR,depList:gR,depItem:yR,depBlocked:vR,depDone:bR,timeline:SR,timelineRow:_R,timelineKey:xR,timelineValue:TR,timelineDelta:ER,reviewNotes:CR,overviewDescription:AR,waitingMessage:jR,errorMessage:NR,eventOverflowWarning:wR,attemptSelector:DR,attemptLabel:kR,attemptButton:RR,attemptActive:MR,attemptStatus:OR,emptyCta:BR,ctaTitle:LR,ctaDescription:UR,ctaButton:zR,ctaLink:VR,projectHeader:IR,projectName:HR,projectMeta:GR,metaRow:PR,metaLabel:qR,metaValue:FR,metaPlaceholder:$R,editButton:YR,editInput:KR,editTextarea:ZR,editSelect:XR,archiveButton:QR,repoLink:JR,metaValueClickable:WR,editHint:eM,editError:tM,editInputInvalid:nM,unsavedDot:aM,metaToggle:sM,metaToggleArrow:iM,metaToggleArrowOpen:lM,progressBarContainer:oM,progressBar:rM,progressFill:cM,progressLabel:uM,metaTimestamps:dM,metaTimestamp:fM,worktreeToggle:hM,editFieldWrapper:mM};function pM(){const{projects:n,createProject:a}=nn();return n.length===0?h.jsxs("div",{className:D.emptyCta,children:[h.jsx("div",{className:D.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:D.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),h.jsx("button",{className:D.ctaButton,onClick:()=>{const l=window.prompt("Project name:");l!=null&&l.trim()&&a(l.trim())},children:"Create Your First Project"})]}):h.jsx("div",{className:D.emptyState,children:"Select a project or task to get started"})}function gM(n,a){const l=[];let o=n;const r=new Set;for(;o&&a.has(o)&&!r.has(o);){r.add(o);const u=a.get(o);l.unshift(u),o=u.parentTaskId||void 0}return l}const Ys={label:"Home",url:"/"};function yM(n){return n?[Ys,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Ys,{label:"Settings",url:void 0}]}function vM(){return[Ys,{label:"New Environment",url:void 0}]}function bM(){return[Ys,{label:"New Chat",url:void 0}]}function SM(n){return[Ys,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function _M(n,a){const l=a.find(o=>o.id===n);return[Ys,{label:(l==null?void 0:l.name)??"Project",url:void 0}]}function xM(n,a,l){const o=gM(n,l),r=l.get(n),u=r==null?void 0:r.projectId,d=u?a.find(g=>g.id===u):void 0,m=[Ys];d&&m.push({label:d.name,url:oo(d.id)});for(let g=0;g<o.length-1;g++)m.push({label:o[g].title,url:ms(o[g].id)});const p=o[o.length-1];return m.push({label:(p==null?void 0:p.title)??n,url:void 0}),m}function TM(){const n=bM();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Qi,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Enter a prompt below to start a new session"})]})}function U1(n){const a=[];for(const l of n){const o=a[a.length-1];l.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?a[a.length-1]={...o,content:o.content+l.content}:a.push(l)}return a}function z1(n){const a=new Map;for(const u of n)if(u.raw)try{a.set(u,JSON.parse(u.raw))}catch{}const l=new Map;for(const u of n){if(u.eventType!=="tool_use")continue;const d=a.get(u);if(!(!d||typeof d.id!="string"))try{const m=JSON.parse(u.content);l.set(d.id,{tool:m.tool,args:m.args})}catch{}}const o=new Set;return n.map(u=>{if(u.eventType!=="tool_result")return u;const d=a.get(u);if(!d||typeof d.tool_use_id!="string")return u;const m=l.get(d.tool_use_id);return m?(o.add(d.tool_use_id),{...u,toolUseCtx:m}):u}).filter(u=>{if(u.eventType!=="tool_use")return!0;const d=a.get(u);return d&&typeof d.id=="string"?!o.has(d.id):!0})}function EM({sessionId:n,session:a,isActive:l,onKill:o}){return h.jsxs("div",{className:D.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),a&&` | ${a.runtime} | ${a.status}`]}),h.jsxs("span",{className:D.headerInfo,children:[a&&h.jsx("span",{children:a.prompt.length>60?a.prompt.slice(0,60)+"...":a.prompt}),l&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:D.killButton,children:"×"})]})]})}function CM({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:D.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 AM({sessionEvents:n,session:a,eventsDropped:l,scrollRef:o}){const r=a&&["completed","failed","interrupted"].includes(a.status),u=r?`Session ${a.status} with no events recorded.`:"Waiting for events...";return h.jsxs("div",{ref:o,className:D.eventScroll,children:[n.length===0&&h.jsx("div",{className:r?D.errorMessage:D.waitingMessage,children:u}),h.jsx(CM,{eventsDropped:l}),n.map((d,m)=>h.jsx(w1,{event:d,toolUseCtx:d.toolUseCtx},`${d.sessionId}-${d.timestamp}-${m}`))]})}function jM(){const{sessionId:n}=dc(),{events:a,eventsDropped:l,sessions:o,kill:r,loadSessionEvents:u}=nn(),d=S.useRef(null),m=S.useRef(void 0),p=SM(n),g=o.find(x=>x.id===n)??void 0,y=S.useMemo(()=>{const x=n?a.filter(T=>T.sessionId===n):[];return z1(U1(x))},[a,n]);if(S.useEffect(()=>{n&&n!==m.current&&(m.current=n,u(n))},[n,u]),S.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[y.length]),!n)return h.jsx("div",{className:D.emptyState,children:"No session selected"});const b=(g==null?void 0:g.status)==="running"||(g==null?void 0:g.status)==="idle";return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Qi,{segments:p}),h.jsx(EM,{sessionId:n,session:g,isActive:b,onKill:r}),h.jsx(AM,{sessionEvents:y,session:g,eventsDropped:l,scrollRef:d})]})}const d0=220,f0=70,NM=40,wM=60,DM="hierarchy",kM="dependency";function RM(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const a=new hy.graphlib.Graph({multigraph:!0});a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:NM,ranksep:wM});const l=new Map(n.map(d=>[d.id,d])),o=new Map;for(const d of n)if(d.parentTaskId&&l.has(d.parentTaskId)){const m=o.get(d.parentTaskId)||[];m.push(d),o.set(d.parentTaskId,m)}for(const d of n)a.setNode(d.id,{width:d0,height:f0});const r=[];for(const d of n){if(d.parentTaskId&&l.has(d.parentTaskId)){const m=`hierarchy-${d.parentTaskId}-${d.id}`;a.setEdge(d.parentTaskId,d.id,{},m),r.push({id:m,source:d.parentTaskId,target:d.id,type:"smoothstep",data:{edgeType:DM},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const m of d.dependsOn)if(l.has(m)){const p=`dependency-${m}-${d.id}`;a.setEdge(m,d.id,{},p),r.push({id:p,source:m,target:d.id,type:"smoothstep",data:{edgeType:kM},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return hy.layout(a),{nodes:n.map(d=>{const m=a.node(d.id),p=o.get(d.id)||[];return{id:d.id,type:"task",position:{x:m.x-d0/2,y:m.y-f0/2},data:{task:d,childCount:p.length,doneChildCount:p.filter(g=>g.status==="complete").length,hasDependencies:d.dependsOn.length>0}}}),edges:r}},[n])}const MM="_dagContainer_js4w6_1",OM="_taskNode_js4w6_26",BM="_taskNodeBorder_js4w6_54",LM="_taskNodeContent_js4w6_60",UM="_taskNodeHeader_js4w6_70",zM="_taskNodeIcon_js4w6_77",VM="_taskNodeTitle_js4w6_82",IM="_taskNodeBadges_js4w6_90",HM="_childBadge_js4w6_95",GM="_depBadge_js4w6_107",PM="_handle_js4w6_119",qM="_emptyCta_js4w6_126",FM="_ctaDescription_js4w6_137",$M="_ctaButton_js4w6_144",fn={dagContainer:MM,taskNode:OM,taskNodeBorder:BM,taskNodeContent:LM,taskNodeHeader:UM,taskNodeIcon:zM,taskNodeTitle:VM,taskNodeBadges:IM,childBadge:HM,depBadge:GM,handle:PM,emptyCta:qM,ctaDescription:FM,ctaButton:$M};function YM({data:n}){const{task:a,childCount:l,doneChildCount:o,hasDependencies:r}=n,u=ys(a.status);return h.jsxs("div",{className:fn.taskNode,"data-task-id":a.id,"data-task-title":a.title,children:[h.jsx(my,{type:"target",position:py.Top,className:fn.handle}),h.jsx("div",{className:fn.taskNodeBorder,style:{backgroundColor:u.color}}),h.jsxs("div",{className:fn.taskNodeContent,children:[h.jsxs("div",{className:fn.taskNodeHeader,children:[h.jsx("span",{className:fn.taskNodeIcon,style:{color:u.color},children:u.icon}),h.jsx("span",{className:fn.taskNodeTitle,children:a.title})]}),h.jsxs("div",{className:fn.taskNodeBadges,children:[l>0&&h.jsxs("span",{className:fn.childBadge,children:[o,"/",l]}),r&&h.jsx("span",{className:fn.depBadge,children:"dep"})]})]}),h.jsx(my,{type:"source",position:py.Bottom,className:fn.handle})]})}const KM=Fw,ZM={task:YM};function XM({projectId:n}){const{tasks:a}=nn(),l=na(),{resolvedThemeId:o}=q0(),r=S.useMemo(()=>a.filter(y=>y.projectId===n),[a,n]),{nodes:u,edges:d}=RM(r),m=S.useMemo(()=>{const y=getComputedStyle(document.documentElement),b={};for(const[x,T]of Object.entries(KM))b[x]=y.getPropertyValue(T).trim()||"#6b7a8d";return b},[o]),p=S.useCallback((y,b)=>{l(ms(b.id))},[l]),g=S.useCallback(y=>{const b=y.data;return m[b.task.status]||m.pending},[m]);return r.length===0?h.jsxs("div",{className:fn.emptyCta,children:[h.jsx("button",{className:fn.ctaButton,onClick:()=>l($s(n)),children:"Create Task"}),h.jsx("div",{className:fn.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:fn.dagContainer,children:h.jsxs(tx,{nodes:u,edges:d,nodeTypes:ZM,onNodeClick:p,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(nx,{variant:ax.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(sx,{showInteractive:!1}),h.jsx(ix,{nodeColor:g,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function QM({tasks:n,taskStatusById:a,sessionStatusByTaskId:l}){const o=new Map;for(const u of n)if(u.parentTaskId){const d=o.get(u.parentTaskId);d?d.push(u):o.set(u.parentTaskId,[u])}const r=new Map(i0.map(u=>[u,[]]));for(const u of n){const d=Th(u.status),m=u.dependsOn.length>0&&u.dependsOn.some(A=>a.get(A)!=="complete"),p=o.get(u.id)??[],g=p.length,y=p.filter(A=>A.status==="complete").length;let b;if(d==="paused"&&l){const A=l.get(u.id);A==="idle"?b="Needs input":A==="completed"&&(b="Ready to complete")}const x={task:u,isBlocked:m,childCount:g,doneChildCount:y,pausedSubBadge:b},T=r.get(d);T?T.push(x):r.get("not_started").push(x)}for(const u of r.values())u.sort((d,m)=>d.task.sortOrder-m.task.sortOrder);return i0.map(u=>{const d=ys(u);return{status:u,label:d.label,style:d,tasks:r.get(u)??[]}})}const JM="_boardContainer_1c4y1_1",WM="_column_1c4y1_17",e3="_columnHeader_1c4y1_34",t3="_columnIcon_1c4y1_47",n3="_columnLabel_1c4y1_52",a3="_columnCount_1c4y1_57",s3="_cardList_1c4y1_67",i3="_emptyPlaceholder_1c4y1_76",l3="_card_1c4y1_67",o3="_cardHeader_1c4y1_107",r3="_cardStatusIcon_1c4y1_113",c3="_cardTitle_1c4y1_119",u3="_cardBadges_1c4y1_127",d3="_badge_1c4y1_134",f3="_blockedBadge_1c4y1_146",h3="_childBadge_1c4y1_151",m3="_depBadge_1c4y1_155",p3="_parentBadge_1c4y1_159",g3="_pausedSubBadge_1c4y1_166",y3="_personaBadge_1c4y1_170",v3="_envBadge_1c4y1_174",b3="_emptyCta_1c4y1_178",S3="_ctaButton_1c4y1_188",_3="_ctaDescription_1c4y1_204",Je={boardContainer:JM,column:WM,columnHeader:e3,columnIcon:t3,columnLabel:n3,columnCount:a3,cardList:s3,emptyPlaceholder:i3,card:l3,cardHeader:o3,cardStatusIcon:r3,cardTitle:c3,cardBadges:u3,badge:d3,blockedBadge:f3,childBadge:h3,depBadge:m3,parentBadge:p3,pausedSubBadge:g3,personaBadge:y3,envBadge:v3,emptyCta:b3,ctaButton:S3,ctaDescription:_3};function x3({projectId:n}){const{tasks:a,sessions:l,personas:o,environments:r}=nn(),u=na(),d=S.useMemo(()=>a.filter(b=>b.projectId===n),[a,n]),m=S.useMemo(()=>new Map(a.map(b=>[b.id,b.status])),[a]),p=S.useMemo(()=>new Map(d.map(b=>[b.id,b])),[d]),g=S.useMemo(()=>{const b=new Map(l.map(C=>[C.id,C])),x=new Map(o.map(C=>[C.id,C])),T=new Map(r.map(C=>[C.id,C])),A=new Map,j=new Map,N=new Map;for(const C of d)if(C.latestSessionId){const B=b.get(C.latestSessionId);if(B){if(A.set(C.id,B.status),B.personaId){const R=x.get(B.personaId);R&&j.set(C.id,R.name)}if(B.environmentId){const R=T.get(B.environmentId);R&&N.set(C.id,R.displayName)}}}return{sessionStatusByTaskId:A,personaNameByTaskId:j,environmentNameByTaskId:N}},[d,l,o,r]),y=S.useMemo(()=>QM({tasks:d,taskStatusById:m,sessionStatusByTaskId:g.sessionStatusByTaskId}),[d,m,g]);return d.length===0?h.jsxs("div",{className:Je.emptyCta,"data-testid":"board-empty-cta",children:[h.jsx("button",{className:Je.ctaButton,onClick:()=>u($s(n)),children:"Create Task"}),h.jsx("div",{className:Je.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}):h.jsx("div",{className:Je.boardContainer,"data-testid":"board-container",children:y.map(b=>h.jsxs("section",{className:Je.column,"data-testid":`board-column-${b.status}`,"aria-label":`${b.label}, ${b.tasks.length} ${b.tasks.length===1?"task":"tasks"}`,children:[h.jsxs("div",{className:Je.columnHeader,children:[h.jsx("span",{className:Je.columnIcon,style:{color:b.style.color},children:b.style.icon}),h.jsx("span",{className:Je.columnLabel,children:b.label}),h.jsx("span",{className:Je.columnCount,"data-testid":`board-count-${b.status}`,children:b.tasks.length})]}),h.jsx("div",{className:Je.cardList,children:b.tasks.length===0?h.jsx("div",{className:Je.emptyPlaceholder,children:"No tasks"}):h.jsx(vs,{mode:"popLayout",children:b.tasks.map(x=>h.jsx($n.div,{layout:!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},children:h.jsx(T3,{boardTask:x,tasksById:p,personaName:g.personaNameByTaskId.get(x.task.id),envName:g.environmentNameByTaskId.get(x.task.id),onClick:()=>u(ms(x.task.id))})},x.task.id))})})]},b.status))})}function T3({boardTask:n,tasksById:a,personaName:l,envName:o,onClick:r}){const{task:u,isBlocked:d,childCount:m,doneChildCount:p,pausedSubBadge:g}=n,y=ys(u.status),b=u.parentTaskId?a.get(u.parentTaskId):void 0;return h.jsxs("div",{className:Je.card,tabIndex:0,role:"button","data-testid":`board-card-${u.id}`,onClick:r,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),r())},children:[h.jsxs("div",{className:Je.cardHeader,children:[h.jsx("span",{className:Je.cardStatusIcon,style:{color:y.color},children:y.icon}),h.jsx("span",{className:Je.cardTitle,children:u.title})]}),h.jsxs("div",{className:Je.cardBadges,children:[b&&h.jsx("span",{className:`${Je.badge} ${Je.parentBadge}`,title:b.title,children:b.title}),m>0&&h.jsxs("span",{className:`${Je.badge} ${Je.childBadge}`,children:[p,"/",m]}),d&&h.jsx("span",{className:`${Je.badge} ${Je.blockedBadge}`,children:"blocked"}),u.dependsOn.length>0&&!d&&h.jsx("span",{className:`${Je.badge} ${Je.depBadge}`,children:"dep"}),g&&h.jsx("span",{className:`${Je.badge} ${Je.pausedSubBadge}`,children:g}),l&&h.jsx("span",{className:`${Je.badge} ${Je.personaBadge}`,children:l}),o&&h.jsx("span",{className:`${Je.badge} ${Je.envBadge}`,children:o})]})]})}function E3(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?D.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?D.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?D.envDotRed:D.envDotGray}function h0(n){if(!n)return"";const a=new Date(n);if(isNaN(a.getTime()))return"";const o=Date.now()-a.getTime();if(o<0)return"just now";const r=Math.floor(o/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const u=Math.floor(r/60);if(u<24)return`${u}h ago`;const d=Math.floor(u/24);return d<30?`${d}d ago`:a.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function C3(){const{projectId:n}=dc(),a=na(),{tasks:l,environments:o,projects:r,archiveProject:u,updateProject:d}=nn(),[m,p]=S.useState("tasks"),[g,y]=S.useState(!1),[b,x]=S.useState(null),[T,A]=S.useState(""),[j,N]=S.useState(""),[C,B]=S.useState(!1),R=S.useRef(void 0),X=S.useRef(null),H=S.useRef(null),J=S.useRef(null),W=S.useRef(null),F=S.useRef(null),ne=S.useRef(null),ge=_M(n,r);S.useEffect(()=>{const Q=R.current;R.current=n,!(Q===void 0||Q===n)&&(b!==null||T!=="")&&(x(null),A(""))},[n,b,T]),S.useEffect(()=>{if(b===null)return;const Q=b==="name"?H.current:b==="description"?J.current:b==="repoUrl"?W.current:b==="worktreeBasePath"?ne.current:F.current;if(!Q)return;const q=window.setTimeout(()=>{Q.focus()},0);return()=>{window.clearTimeout(q)}},[b]);const L=r.find(Q=>Q.id===n),pe=l.filter(Q=>Q.projectId===n),te=pe.filter(Q=>Q.status==="complete").length,ve=pe.length,G=ve>0?Math.round(te/ve*100):0,z=100,Y=(Q,q)=>{X.current=Q,x(Q),A(q),N("")},ee=()=>{X.current=null,x(null),A(""),N("")},ke=(Q,q)=>{if(Q==="name"){const I=q.trim();if(!I)return"Name is required";if(I.length>z)return`Max ${z} characters`}if(Q==="repoUrl"){const I=q.trim();if(I&&!/^https?:\/\/.+/.test(I))return"Must be a valid http(s) URL"}return""},je=Q=>{if(!L)return;const q=T.trim(),I=ke(Q,T);if(I){N(I);return}if(Q==="name"){if(q===L.name){ee();return}d(L.id,{name:q})}else if(Q==="description"){const De=T;if(De===L.description){ee();return}d(L.id,{description:De})}else if(Q==="repoUrl"){if(q===L.repoUrl){ee();return}d(L.id,{repoUrl:q})}else if(Q==="defaultEnvironmentId"){if(T===L.defaultEnvironmentId){ee();return}d(L.id,{defaultEnvironmentId:T})}else{if(q===L.worktreeBasePath){ee();return}d(L.id,{worktreeBasePath:q})}ee()},qe=(Q,q)=>{Q.key==="Escape"?ee():Q.key==="Enter"&&q!=="description"&&je(q)},we=Q=>L?Q==="name"?T.trim()!==L.name:Q==="description"?T!==L.description:Q==="repoUrl"?T.trim()!==L.repoUrl:Q==="defaultEnvironmentId"?T!==L.defaultEnvironmentId:T.trim()!==L.worktreeBasePath:!1,_e=o.find(Q=>Q.id===(L==null?void 0:L.defaultEnvironmentId)),Ce=b==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Qi,{segments:ge}),h.jsxs("div",{className:D.projectHeader,children:[h.jsx("span",{className:D.projectName,"data-testid":"project-name",children:b==="name"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:H,className:`${D.editInput} ${j?D.editInputInvalid:""}`,value:T,onChange:Q=>{A(Q.target.value),N("")},onBlur:Q=>{if(X.current==="name"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="name"||je("name")},onKeyDown:Q=>qe(Q,"name"),maxLength:z,"aria-label":"Project name","data-testid":"edit-name-input"}),we("name")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),j&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:j}),h.jsx("span",{className:D.editHint,children:Ce})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>Y("name",(L==null?void 0:L.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(L==null?void 0:L.name)||n}`,"data-testid":"edit-name-button",children:[(L==null?void 0:L.name)||n,h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})}),h.jsx("button",{className:D.archiveButton,onClick:()=>y(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),h.jsxs("button",{className:D.metaToggle,onClick:()=>B(!C),"aria-expanded":!C,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${D.metaToggleArrow} ${C?"":D.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!C&&h.jsxs("div",{className:D.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Description"}),h.jsx("div",{className:D.metaValue,children:b==="description"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("textarea",{ref:J,className:D.editTextarea,value:T,onChange:Q=>{A(Q.target.value),N("")},onBlur:Q=>{if(X.current==="description"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="description"||je("description")},onKeyDown:Q=>qe(Q,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),we("description")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),h.jsx("span",{className:D.editHint,children:Ce})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>Y("description",(L==null?void 0:L.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[L!=null&&L.description?h.jsx("span",{className:D.overviewMarkdown,children:h.jsx(kf,{remarkPlugins:[Rf],children:L.description})}):h.jsx("span",{className:D.metaPlaceholder,children:"No description"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Repository"}),h.jsx("div",{className:D.metaValue,children:b==="repoUrl"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:W,className:`${D.editInput} ${j?D.editInputInvalid:""}`,value:T,onChange:Q=>{A(Q.target.value),N("")},onBlur:Q=>{if(X.current==="repoUrl"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="repoUrl"||je("repoUrl")},onKeyDown:Q=>qe(Q,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),we("repoUrl")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),j&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:j}),h.jsx("span",{className:D.editHint,children:Ce})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:Q=>{Q.preventDefault(),Y("repoUrl",(L==null?void 0:L.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[L!=null&&L.repoUrl&&/^https?:\/\//i.test(L.repoUrl)?h.jsx("a",{className:D.repoLink,href:L.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:Q=>Q.stopPropagation(),children:L.repoUrl}):L!=null&&L.repoUrl?h.jsx("span",{children:L.repoUrl}):h.jsx("span",{className:D.metaPlaceholder,children:"No repository"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Environment"}),h.jsx("div",{className:D.metaValue,children:b==="defaultEnvironmentId"?h.jsxs("select",{ref:F,className:D.editSelect,value:T,onChange:Q=>{X.current=null,A(Q.target.value);const q=Q.target.value;L&&q!==L.defaultEnvironmentId&&d(L.id,{defaultEnvironmentId:q}),ee()},onBlur:Q=>{if(X.current==="defaultEnvironmentId"){X.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:D.metaValueClickable,onClick:()=>Y("defaultEnvironmentId",(L==null?void 0:L.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[_e?h.jsxs("span",{className:D.envRow,children:[h.jsx("span",{className:`${D.envDot} ${E3(_e.status)}`}),_e.displayName]}):h.jsx("span",{className:D.metaPlaceholder,children:(L==null?void 0:L.defaultEnvironmentId)||"No default environment"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Worktrees"}),h.jsx("div",{className:D.metaValue,children:h.jsxs("label",{className:D.worktreeToggle,"data-testid":"worktree-toggle",children:[h.jsx("input",{type:"checkbox",checked:(L==null?void 0:L.useWorktrees)??!0,onChange:Q=>{L&&d(L.id,{useWorktrees:Q.target.checked})}}),h.jsx("span",{children:"Enable worktree isolation"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Working Dir"}),h.jsx("div",{className:D.metaValue,children:b==="worktreeBasePath"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:ne,className:`${D.editInput} ${j?D.editInputInvalid:""}`,value:T,onChange:Q=>{A(Q.target.value),N("")},onBlur:Q=>{if(X.current==="worktreeBasePath"){X.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="worktreeBasePath"||je("worktreeBasePath")},onKeyDown:Q=>qe(Q,"worktreeBasePath"),placeholder:"/workspaces/my-repo","aria-label":"Working directory","data-testid":"edit-worktree-base-path-input"}),we("worktreeBasePath")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),j&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:j}),h.jsx("span",{className:D.editHint,children:Ce})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>Y("worktreeBasePath",(L==null?void 0:L.worktreeBasePath)||""),title:"Click to edit working directory","aria-label":"Edit working directory","data-testid":"edit-worktree-base-path-button",children:[L!=null&&L.worktreeBasePath?h.jsx("span",{children:L.worktreeBasePath}):h.jsx("span",{className:D.metaPlaceholder,children:"Default (server default)"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),L&&h.jsxs("div",{className:D.metaTimestamps,children:[h.jsxs("span",{className:D.metaTimestamp,children:["Created ",h0(L.createdAt)]}),L.updatedAt&&L.updatedAt!==L.createdAt&&h.jsxs("span",{className:D.metaTimestamp,children:["· Updated ",h0(L.updatedAt)]})]})]}),ve>0&&h.jsxs("div",{className:D.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:D.progressBar,children:h.jsx("div",{className:D.progressFill,style:{width:`${G}%`}})}),h.jsxs("span",{className:D.progressLabel,children:[te,"/",ve]})]}),h.jsxs("div",{className:D.tabBar,role:"tablist","aria-label":"Project view",children:[h.jsx("button",{role:"tab","aria-selected":m==="graph",className:`${D.tab} ${m==="graph"?D.active:""}`,onClick:()=>p("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":m==="board",className:`${D.tab} ${m==="board"?D.active:""}`,onClick:()=>p("board"),"data-testid":"board-tab",children:"Board"}),h.jsx("button",{role:"tab","aria-selected":m==="tasks",className:`${D.tab} ${m==="tasks"?D.active:""}`,onClick:()=>p("tasks"),children:"Tasks"})]}),m==="tasks"&&ve>0&&h.jsxs("div",{className:D.projectSummary,children:[h.jsx("span",{className:D.projectSummaryTitle,children:`${te}/${ve} tasks complete`}),h.jsx("span",{className:D.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&ve===0&&h.jsxs("div",{className:D.emptyCta,children:[h.jsx("button",{className:D.ctaButton,onClick:()=>a($s(n)),children:"Create Task"}),h.jsx("div",{className:D.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),m==="board"&&h.jsx(x3,{projectId:n}),m==="graph"&&h.jsx(XM,{projectId:n}),h.jsx(Sc,{isOpen:g,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{L&&(u(L.id),a("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const A3="_container_cddyd_1",j3="_header_cddyd_8",N3="_headerTitle_cddyd_35",w3="_badge_cddyd_44",D3="_headerActions_cddyd_54",k3="_body_cddyd_61",R3="_formContent_cddyd_73",M3="_section_cddyd_85",O3="_label_cddyd_91",B3="_titleInput_cddyd_98",L3="_descriptionTextarea_cddyd_131",U3="_parentContext_cddyd_167",z3="_parentLabel_cddyd_175",V3="_parentName_cddyd_182",I3="_depList_cddyd_220",H3="_depItem_cddyd_226",G3="_depItemSelected_cddyd_248",P3="_noDeps_cddyd_252",q3="_btnPrimary_cddyd_258",F3="_btnGhost_cddyd_289",gt={container:A3,header:j3,headerTitle:N3,badge:w3,headerActions:D3,body:k3,formContent:R3,section:M3,label:O3,titleInput:B3,descriptionTextarea:L3,parentContext:U3,parentLabel:z3,parentName:V3,depList:I3,depItem:H3,depItemSelected:G3,noDeps:P3,btnPrimary:q3,btnGhost:F3};function V1({mode:n,taskId:a,projectId:l,parentTaskId:o}){const{tasks:r,createTask:u,updateTask:d}=nn(),{showToast:m}=go(),p=na(),g=n==="edit",y=g&&a?r.find(L=>L.id===a):void 0,b=g?(y==null?void 0:y.projectId)??"":l??"",x=g?(y==null?void 0:y.parentTaskId)??"":o??"",T=x?r.find(L=>L.id===x):void 0,[A,j]=S.useState((y==null?void 0:y.title)??""),[N,C]=S.useState((y==null?void 0:y.description)??""),[B,R]=S.useState((y==null?void 0:y.dependsOn)??[]),X=S.useRef(!1);S.useEffect(()=>{g&&y&&!X.current&&(X.current=!0,j(y.title),C(y.description),R(y.dependsOn))},[g,y]);const H=r.filter(L=>L.projectId===b&&(!g||L.id!==a)&&L.id!==x),J=A.trim().length>0&&(!g||y!==void 0)&&(g||b.length>0),W=L=>{R(pe=>pe.includes(L)?pe.filter(te=>te!==L):[...pe,L])},F=()=>{J&&(g&&y===void 0||(g&&a?(d(a,A.trim(),N,B),m("Task updated","success"),p(ms(a),{replace:!0})):(u(b,A.trim(),N,B.length>0?B:void 0,x||void 0),m("Task created","success"),p(oo(b),{replace:!0}))))},ne=()=>{p(g&&a?ms(a):oo(b))},ge=g?"edit task":x?"child task":"new task";return h.jsxs("div",{className:gt.container,children:[h.jsxs("div",{className:gt.header,children:[h.jsxs("div",{className:gt.headerTitle,children:[h.jsx("span",{className:gt.badge,children:ge}),T&&h.jsxs("span",{className:gt.parentContext,children:[h.jsx("span",{className:gt.parentLabel,children:"Child of"}),h.jsx("span",{className:gt.parentName,children:T.title})]})]}),h.jsxs("div",{className:gt.headerActions,children:[h.jsx("button",{onClick:F,disabled:!J,className:gt.btnPrimary,"data-testid":"task-edit-save",children:g?"Save Changes":"Create"}),h.jsx("button",{onClick:ne,className:gt.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:gt.body,children:h.jsxs("div",{className:gt.formContent,children:[h.jsxs("div",{className:gt.section,children:[h.jsx("label",{className:gt.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:A,onChange:L=>j(L.target.value),placeholder:"Task title...",autoFocus:!0,className:gt.titleInput,"data-testid":"task-edit-title",onKeyDown:L=>{L.key==="Enter"&&J&&F()}})]}),h.jsxs("div",{className:gt.section,children:[h.jsx("label",{className:gt.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:N,onChange:L=>C(L.target.value),placeholder:"Describe the task... (markdown supported)",className:gt.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:gt.section,children:[h.jsx("div",{className:gt.label,children:"Dependencies"}),H.length===0?h.jsx("div",{className:gt.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:gt.depList,children:H.map(L=>{const pe=B.includes(L.id);return h.jsxs("label",{className:`${gt.depItem} ${pe?gt.depItemSelected:""}`,"data-testid":`dep-option-${L.id}`,children:[h.jsx("input",{type:"checkbox",checked:pe,onChange:()=>W(L.id)}),L.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",L.status,")"]})]},L.id)})})]})]})})]})}function $3(){const[n]=If(),a=n.get("project")??"",l=n.get("parent")??void 0;return a?h.jsx(V1,{mode:"new",projectId:a,parentTaskId:l}):h.jsx(qr,{to:"/",replace:!0})}function Y3(){const{taskId:n}=dc();return h.jsx(V1,{mode:"edit",taskId:n})}const K3="_container_1pqxm_1",Z3="_emptyState_1pqxm_8",X3="_card_1pqxm_14",Q3="_cardHeader_1pqxm_34",J3="_categoryBadge_1pqxm_46",W3="_findingTitle_1pqxm_54",eO="_findingDate_1pqxm_60",tO="_findingContent_1pqxm_72",nO="_tags_1pqxm_78",aO="_tag_1pqxm_78",ra={container:K3,emptyState:Z3,card:X3,cardHeader:Q3,categoryBadge:J3,findingTitle:W3,findingDate:eO,findingContent:tO,tags:nO,tag:aO};function sO(n){const a=new Date(n),l=new Date,o=l.getTime()-a.getTime(),r=Math.floor(o/1e3),u=Math.floor(r/60),d=Math.floor(u/60),m=Math.floor(d/24);if(r<60)return"just now";if(u<60)return`${u}m ago`;if(d<24)return`${d}h ago`;if(m===1)return"yesterday";if(m<7)return`${m} days ago`;const p=a.getFullYear()===l.getFullYear(),g=a.toLocaleString("en-US",{month:"short"}),y=a.getDate();return p?`${g} ${y}`:`${g} ${y} ${a.getFullYear()}`}const m0={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 iO({projectId:n}){const{findings:a}=nn(),l=a.filter(o=>o.projectId===n);return l.length===0?h.jsx("div",{className:ra.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:ra.container,children:l.map((o,r)=>{const u=m0[o.category]||m0.general;return h.jsxs($n.div,{className:ra.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:r*.05,duration:.2},children:[h.jsxs("div",{className:ra.cardHeader,children:[h.jsx("span",{className:ra.categoryBadge,style:{background:u.bg,color:u.text},children:o.category}),h.jsx("span",{className:ra.findingTitle,children:o.title}),h.jsx("span",{className:ra.findingDate,title:o.createdAt,children:sO(o.createdAt)})]}),h.jsx("div",{className:ra.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:ra.tags,children:o.tags.map(d=>h.jsx("span",{className:ra.tag,style:{color:u.text,textShadow:`0 0 8px ${u.text}`},children:d},d))})]},o.id)})})}function Gr(n){if(!n)return"—";const a=new Date(n);return isNaN(a.getTime())?"—":a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Qd(n,a){if(!n||!a)return;const l=new Date(a).getTime()-new Date(n).getTime();if(isNaN(l)||l<0)return;const o=Math.floor(l/6e4),r=Math.floor(l%6e4/1e3);if(o===0)return`${r}s`;const u=Math.floor(o/60),d=o%60;return u===0?`${o}m ${r}s`:`${u}h ${d}m`}function lO(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?D.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?D.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?D.envDotRed:D.envDotGray}function oO({status:n}){const a=ys(n),l=Gw(n);return h.jsx("span",{className:`${D.statusBadge} ${D[l]??D.statusPending}`,children:a.label})}function rO({task:n,tasksById:a,environments:l,projects:o,taskSessions:r}){const u=r.length>0?r[r.length-1]:void 0,d=(u==null?void 0:u.environmentId)??"",m=d?l.find(y=>y.id===d):void 0,p=o.find(y=>y.id===n.projectId),g=n.branch&&(p!=null&&p.repoUrl)?`${p.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:D.overviewDashboard,children:[h.jsxs("div",{className:D.overviewHero,children:[h.jsx(oO,{status:n.status}),n.branch&&h.jsx("span",{className:D.overviewBranchPill,children:g?h.jsxs("a",{href:g,target:"_blank",rel:"noreferrer noopener",className:D.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Description"}),h.jsx("div",{className:D.overviewMarkdown,children:h.jsx(kf,{remarkPlugins:[Rf],children:n.description})})]}),d&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Environment"}),h.jsxs("div",{className:D.envRow,children:[m&&h.jsx("span",{className:`${D.envDot} ${lO(m.status)}`,title:m.status,"aria-label":`Status: ${m.status}`,role:"img"}),h.jsx("span",{className:D.overviewValue,children:(m==null?void 0:m.displayName)??d})]})]}),h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:D.overviewMuted,children:"None"}):h.jsx("div",{className:D.depList,children:n.dependsOn.map(y=>{const b=a.get(y),x=(b==null?void 0:b.status)==="complete";return h.jsxs("div",{className:`${D.depItem} ${x?D.depDone:D.depBlocked}`,children:[h.jsx("span",{children:x?"✓":"○"}),h.jsx("span",{children:(b==null?void 0:b.title)??y})]},y)})})]}),h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:D.timeline,children:[n.createdAt&&h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Created"}),h.jsx("span",{className:D.timelineValue,children:Gr(n.createdAt)})]}),n.assignedAt&&(()=>{const y=Qd(n.createdAt,n.assignedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Assigned"}),h.jsx("span",{className:D.timelineValue,children:Gr(n.assignedAt)}),y!==void 0&&h.jsx("span",{className:D.timelineDelta,children:y})]})})(),n.startedAt&&(()=>{const y=Qd(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Started"}),h.jsx("span",{className:D.timelineValue,children:Gr(n.startedAt)}),y!==void 0&&h.jsx("span",{className:D.timelineDelta,children:y})]})})(),n.completedAt&&(()=>{const y=Qd(n.startedAt,n.completedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Completed"}),h.jsx("span",{className:D.timelineValue,children:Gr(n.completedAt)}),y!==void 0&&h.jsx("span",{className:D.timelineDelta,children:y})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:D.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:D.reviewNotes,children:n.reviewNotes})]})]})}function cO({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:D.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown."]})}function uO({task:n,sessionId:a,isBlocked:l,onStart:o,onResume:r,onStop:u,onComplete:d,onDelete:m,onEdit:p}){if(n.status==="not_started")return l?h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:p,className:D.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:o,className:D.btnPrimary,children:"Start"}),h.jsx("button",{onClick:p,className:D.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsx("div",{className:D.headerActions,children:h.jsx("button",{onClick:u,disabled:!a,className:D.btnDanger,children:"Stop"})});if(n.status==="paused")return h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:d,className:D.btnPrimary,children:"Complete"}),h.jsx("button",{onClick:r,className:D.btnGhost,children:"Resume"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:D.headerActions,children:h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:o,className:D.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:m,className:D.btnDanger,children:"Delete"})]})}function dO({taskSessions:n,selectedSessionId:a,onSelect:l}){if(!(n.length<2))return h.jsxs("div",{className:D.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:D.attemptLabel,children:"Attempts:"}),n.map((o,r)=>{const u=o.id===a,d=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${D.attemptButton} ${u?D.attemptActive:""}`,onClick:()=>l(o.id),title:`Attempt #${r+1} — ${o.status}`,"aria-label":`Attempt #${r+1}, ${o.status}`,"aria-pressed":u,"data-testid":`attempt-${r+1}`,children:["#",r+1,d&&h.jsx("span",{className:D.attemptStatus,children:d})]},o.id)})]})}function Jd(){const{taskId:n}=dc(),a=hn(),l=na(),{events:o,eventsDropped:r,tasks:u,environments:d,loadSessionEvents:m,loadFindings:p,kill:g,startTask:y,resumeTask:b,completeTask:x,deleteTask:T,projects:A,taskSessions:j,loadTaskSessions:N}=nn(),C=S.useRef(null),B=S.useRef(void 0),R=S.useRef(void 0),X=S.useRef(void 0),H=S.useRef(void 0),J=S.useRef(void 0),W=a.pathname.endsWith("/stream")?"stream":a.pathname.endsWith("/findings")?"findings":"overview",[F,ne]=S.useState(W),[ge,L]=S.useState(!1),[pe,te]=S.useState(void 0),ve=S.useRef(W);W!==ve.current&&(ve.current=W,W!==F&&ne(W));const G=u.find(q=>q.id===n),z=(G==null?void 0:G.projectId)||void 0,Y=G?j[G.id]??[]:[];let ee;pe&&Y.some(q=>q.id===pe)?ee=pe:ee=(G==null?void 0:G.latestSessionId)||void 0;const ke=()=>{L(!0)},je=()=>{G&&(T(G.id),L(!1),l(oo(G.projectId),{replace:!0}))};if((G==null?void 0:G.id)!==R.current&&(R.current=G==null?void 0:G.id,pe!==void 0&&te(void 0)),S.useEffect(()=>{if(!(G!=null&&G.id))return;const q=G.id!==H.current,I=G.latestSessionId!==J.current;(q||I)&&(H.current=G.id,J.current=G.latestSessionId,N(G.id))},[G==null?void 0:G.id,G==null?void 0:G.latestSessionId,N]),(G==null?void 0:G.status)!==X.current){X.current=G==null?void 0:G.status;const q=(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;q&&q!==F&&ne(q)}const qe=S.useMemo(()=>new Map(u.map(q=>[q.id,q])),[u]),we=S.useMemo(()=>{const q=ee?o.filter(I=>I.sessionId===ee):[];return z1(U1(q))},[o,ee]),_e=G?G.dependsOn.some(q=>{const I=qe.get(q);return I!==void 0&&I.status!=="complete"}):!1,Ce=S.useMemo(()=>xM(n,A,qe),[n,A,qe]);S.useEffect(()=>{ee&&ee!==B.current&&(B.current=ee,m(ee))},[ee,m]),S.useEffect(()=>{F==="findings"&&z&&p(z)},[F,z,p]),S.useEffect(()=>{C.current&&F==="stream"&&(C.current.scrollTop=C.current.scrollHeight)},[we.length,F]);const Q=q=>{ne(q),l(ms(n,q==="overview"?void 0:q))};return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Qi,{segments:Ce}),h.jsxs("div",{className:D.header,children:[h.jsxs("span",{className:D.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(G==null?void 0:G.title)||n}),G&&h.jsx("span",{className:D.taskStatusBadge,"data-testid":"task-status",children:G.status}),(G==null?void 0:G.branch)&&h.jsx("span",{className:D.taskBranch,children:G.branch}),_e&&h.jsx("span",{className:D.taskBlockedBadge,children:"blocked"})]}),G&&h.jsx(uO,{task:G,sessionId:ee,isBlocked:_e,onStart:()=>y(G.id),onResume:()=>b(G.id),onStop:()=>ee&&g(ee),onComplete:()=>x(G.id),onDelete:ke,onEdit:()=>l(PT(G.id))})]}),h.jsxs("div",{className:D.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":F==="overview",className:`${D.tab} ${F==="overview"?D.active:""}`,onClick:()=>Q("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":F==="stream",className:`${D.tab} ${F==="stream"?D.active:""}`,onClick:()=>Q("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":F==="findings",className:`${D.tab} ${F==="findings"?D.active:""}`,onClick:()=>Q("findings"),children:"Findings"})]}),h.jsxs(vs,{mode:"wait",children:[F==="overview"&&h.jsx($n.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:D.overviewContent,children:G?h.jsx(rO,{task:G,tasksById:qe,environments:d,projects:A,taskSessions:Y}):h.jsx("div",{className:D.waitingMessage,children:"No additional details"})},"overview"),F==="stream"&&h.jsxs($n.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(dO,{taskSessions:Y,selectedSessionId:ee,onSelect:q=>te(q)}),h.jsxs("div",{ref:C,className:D.eventScroll,children:[!ee&&G&&h.jsxs("div",{className:D.emptyCta,children:[h.jsx("button",{className:D.ctaButton,onClick:()=>y(G.id),children:"Start Task"}),h.jsx("div",{className:D.ctaDescription,children:"Click to begin agent execution"})]}),ee&&we.length===0&&h.jsx("div",{className:D.waitingMessage,children:"Waiting for events..."}),h.jsx(cO,{eventsDropped:r}),we.map((q,I)=>h.jsx(w1,{event:q,toolUseCtx:q.toolUseCtx},`${q.sessionId}-${q.timestamp}-${I}`))]})]},"stream"),F==="findings"&&h.jsx($n.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:D.tabContent,children:z?h.jsx(iO,{projectId:z}):h.jsx("div",{className:D.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),G&&h.jsx(Sc,{isOpen:ge,title:"Delete Task?",description:`"${G.title}" will be permanently removed.`,onConfirm:je,onCancel:()=>L(!1)})]})}function fO(){const n=vM();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Qi,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Configure the new environment below"})]})}const hO="_layout_1sbe4_1",mO="_content_1sbe4_8",p0={layout:hO,content:mO},pO={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function gO(){const a=hn().pathname.replace(/^\/settings\/?/,"").split("/")[0],l=pO[a],o=yM(l);return h.jsxs("div",{className:p0.layout,children:[h.jsx(Qi,{segments:o}),h.jsx("div",{className:p0.content,children:h.jsx(k0,{})})]})}const yO="_nav_13n0b_1",vO="_tab_13n0b_44",bO="_tabIcon_13n0b_82",SO="_tabActive_13n0b_88",Pr={nav:yO,tab:vO,tabIcon:bO,tabActive:SO},Oa=[{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 _O(){var d;const n=hn(),a=na(),l=S.useRef(null),o=((d=Oa.find(m=>n.pathname===`${Gi}/${m.path}`))==null?void 0:d.path)??Oa[0].path,r=S.useCallback(m=>{a(`${Gi}/${m}`)},[a]),u=S.useCallback(m=>{var T,A;const p=(T=l.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!p)return;const g=Array.from(p).findIndex(j=>j===document.activeElement),y=g>=0?g:Oa.findIndex(j=>j.path===o);let b=y;if(m.key==="ArrowDown")m.preventDefault(),b=(y+1)%Oa.length;else if(m.key==="ArrowUp")m.preventDefault(),b=(y-1+Oa.length)%Oa.length;else if(m.key==="Home")m.preventDefault(),b=0;else if(m.key==="End")m.preventDefault(),b=Oa.length-1;else return;const x=Oa[b].path;a(`${Gi}/${x}`),(A=p[b])==null||A.focus()},[o,a]);return h.jsx("nav",{className:Pr.nav,ref:l,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:u,children:Oa.map(m=>{const p=m.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":p,tabIndex:p?0:-1,className:`${Pr.tab} ${p?Pr.tabActive:""}`,onClick:()=>r(m.path),children:[h.jsx("span",{className:Pr.tabIcon,"aria-hidden":"true",children:m.icon}),m.label]},m.path)})})}const xO="_container_1nk8c_1",TO="_header_1nk8c_5",EO="_headerLabel_1nk8c_12",CO="_addButton_1nk8c_20",AO="_envRow_1nk8c_55",jO="_targeted_1nk8c_69",NO="_expanded_1nk8c_72",wO="_statusDot_1nk8c_76",DO="_pulse_1nk8c_79",kO="_envName_1nk8c_83",RO="_envActions_1nk8c_87",MO="_idleLabel_1nk8c_94",OO="_newChatButton_1nk8c_99",BO="_envActionsRow_1nk8c_126",LO="_connectButton_1nk8c_134",UO="_stopButton_1nk8c_160",zO="_deleteButton_1nk8c_186",VO="_provisionMessage_1nk8c_213",IO="_errorMessage_1nk8c_220",HO="_sessionRow_1nk8c_227",GO="_selected_1nk8c_243",PO="_sessionDot_1nk8c_248",qO="_sessionSummaryRow_1nk8c_252",FO="_sessionExpandArrow_1nk8c_272",$O="_sessionSummaryText_1nk8c_283",YO="_sessionCountBadge_1nk8c_290",KO="_emptyCta_1nk8c_313",ZO="_ctaDescription_1nk8c_326",XO="_ctaButton_1nk8c_332",Qe={container:xO,header:TO,headerLabel:EO,addButton:CO,envRow:AO,targeted:jO,expanded:NO,statusDot:wO,pulse:DO,envName:kO,envActions:RO,idleLabel:MO,newChatButton:OO,envActionsRow:BO,connectButton:LO,stopButton:UO,deleteButton:zO,provisionMessage:VO,errorMessage:IO,sessionRow:HO,selected:GO,sessionDot:PO,sessionSummaryRow:qO,sessionExpandArrow:FO,sessionSummaryText:$O,sessionCountBadge:YO,emptyCta:KO,ctaDescription:ZO,ctaButton:XO},QO={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},JO={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},g0=["running","idle","failed","interrupted","completed"],WO=.2;function eB(n){const a={};for(const u of n)a[u.status]=(a[u.status]||0)+1;const l=g0.filter(u=>a[u]>0).map(u=>`${a[u]} ${JO[u]||u}`),o=new Set(g0),r=Object.keys(a).filter(u=>!o.has(u)).sort().map(u=>`${a[u]} ${u}`);return[...l,...r].join(", ")}function tB({status:n}){const a=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:Qe.sessionDot,style:{color:a},children:"●"})}function nB({env:n,envSessions:a,selectedSessionId:l,isNewChatTarget:o,expanded:r,onToggleExpand:u,sessionsExpanded:d,onToggleSessionsExpand:m,provisionProgress:p,onProvision:g,onStop:y,onRemove:b,navigate:x}){const[T,A]=S.useState(!1),j=QO[n.status]||"var(--text-tertiary)",N=n.status==="connected",C=n.status==="connecting",B=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(Sc,{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),A(!1)},onCancel:()=>A(!1)}),h.jsxs("div",{className:`${Qe.envRow} ${o?Qe.targeted:""} ${r?Qe.expanded:""}`,"data-testid":"env-row",onClick:u,children:[h.jsx("span",{className:`${Qe.statusDot} ${N?Qe.pulse:""}`,style:{color:j},children:"●"}),h.jsx("span",{className:Qe.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:Qe.envActions,children:[a.length===0&&!o&&!r&&h.jsx("span",{className:Qe.idleLabel,children:"(idle)"}),N&&h.jsx("button",{onClick:R=>{R.stopPropagation(),x(U0(n.id,n.defaultRuntime||"claude-code"))},title:"New chat",className:Qe.newChatButton,children:"+"})]})]}),r&&h.jsxs("div",{className:Qe.envActionsRow,children:[C&&p&&h.jsx("span",{className:Qe.provisionMessage,children:p.message}),n.status==="error"&&(p==null?void 0:p.stage)==="error"&&h.jsx("span",{className:Qe.errorMessage,children:p.message}),B&&h.jsx("button",{onClick:R=>{R.stopPropagation(),g(n.id)},className:Qe.connectButton,children:n.status==="error"?"Retry":"Connect"}),N&&h.jsx("button",{onClick:R=>{R.stopPropagation(),y(n.id)},className:Qe.stopButton,children:"Stop"}),!C&&h.jsx("button",{onClick:R=>{R.stopPropagation(),A(!0)},className:Qe.deleteButton,children:"Delete"})]}),a.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Qe.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":d,"aria-label":d?"Collapse sessions":"Expand sessions",onClick:m,onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),m())},children:[h.jsx("span",{className:`${Qe.sessionExpandArrow} ${d?Qe.expanded:""}`,children:"▸"}),h.jsx("span",{className:Qe.sessionSummaryText,children:eB(a)}),h.jsx("span",{className:Qe.sessionCountBadge,children:a.length})]}),h.jsx(vs,{children:d&&h.jsx($n.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:WO,ease:"easeInOut"},style:{overflow:"hidden"},children:a.map(R=>h.jsxs("div",{onClick:X=>{X.stopPropagation(),x(L0(R.id))},className:`${Qe.sessionRow} ${l===R.id?Qe.selected:""}`,title:R.prompt,"data-testid":"session-row",children:[h.jsx(tB,{status:R.status})," ",R.prompt.length>24?R.prompt.slice(0,24)+"...":R.prompt]},R.id))})})]})]})}function aB(){const{environments:n,sessions:a,provisionStatus:l,provisionEnvironment:o,stopEnvironment:r,removeEnvironment:u}=nn(),d=na(),[m,p]=S.useState(null),[g,y]=S.useState(new Set),b=dn("/sessions/:sessionId"),x=dn("/sessions/new"),T=(b==null?void 0:b.params.sessionId)!=="new"?b==null?void 0:b.params.sessionId:void 0,[A]=If(),j=x?A.get("env")??void 0:void 0;return h.jsxs("div",{className:Qe.container,children:[h.jsxs("div",{className:Qe.header,children:[h.jsx("span",{className:Qe.headerLabel,children:"Environments"}),h.jsx("button",{className:Qe.addButton,onClick:()=>d(jy),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:Qe.emptyCta,children:[h.jsx("button",{className:Qe.ctaButton,onClick:()=>d(jy),children:"Add Environment"}),h.jsx("div",{className:Qe.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(N=>{const C=a.filter(B=>B.environmentId===N.id);return h.jsx(nB,{env:N,envSessions:C,selectedSessionId:T,isNewChatTarget:j===N.id,expanded:m===N.id,onToggleExpand:()=>p(m===N.id?null:N.id),sessionsExpanded:g.has(N.id),onToggleSessionsExpand:()=>{y(B=>{const R=new Set(B);return R.has(N.id)?R.delete(N.id):R.add(N.id),R})},provisionProgress:l[N.id],onProvision:o,onStop:r,onRemove:u,navigate:d},N.id)})]})}function sB(){return h.jsx(aB,{})}const iB="_section_1ingb_14",lB="_sectionTitle_1ingb_26",oB="_sectionDescription_1ingb_35",rB="_tokenList_1ingb_48",cB="_tokenRow_1ingb_55",uB="_tokenBadge_1ingb_68",dB="_tokenName_1ingb_83",fB="_tokenTarget_1ingb_90",hB="_deleteButton_1ingb_99",mB="_addForm_1ingb_113",pB="_formRow_1ingb_119",gB="_input_1ingb_125",yB="_select_1ingb_155",vB="_addButton_1ingb_187",bB="_emptyStateInfo_1ingb_221",SB="_themeOptions_1ingb_229",_B="_themeOption_1ingb_229",xB="_themeOptionSelected_1ingb_254",TB="_themeOptionHeader_1ingb_259",EB="_themeOptionLabel_1ingb_266",CB="_themeOptionDesc_1ingb_273",AB="_variantToggle_1ingb_279",jB="_variantButton_1ingb_286",NB="_variantActive_1ingb_305",wB="_themeSwatches_1ingb_311",DB="_themeSwatch_1ingb_311",kB="_systemToggle_1ingb_325",RB="_systemToggleHint_1ingb_341",MB="_themeActive_1ingb_348",OB="_aboutGrid_1ingb_354",BB="_aboutItem_1ingb_360",LB="_aboutLabel_1ingb_373",UB="_aboutValue_1ingb_379",zB="_aboutDot_1ingb_387",VB="_aboutDotConnected_1ingb_394",IB="_aboutDotDisconnected_1ingb_398",he={section:iB,sectionTitle:lB,sectionDescription:oB,tokenList:rB,tokenRow:cB,tokenBadge:uB,tokenName:dB,tokenTarget:fB,deleteButton:hB,addForm:mB,formRow:pB,input:gB,select:yB,addButton:vB,emptyStateInfo:bB,themeOptions:SB,themeOption:_B,themeOptionSelected:xB,themeOptionHeader:TB,themeOptionLabel:EB,themeOptionDesc:CB,variantToggle:AB,variantButton:jB,variantActive:NB,themeSwatches:wB,themeSwatch:DB,systemToggle:kB,systemToggleHint:RB,themeActive:MB,aboutGrid:OB,aboutItem:BB,aboutLabel:LB,aboutValue:UB,aboutDot:zB,aboutDotConnected:VB,aboutDotDisconnected:IB},HB=[{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 GB(){const{credentialProviders:n,updateCredentialProviders:a}=nn(),l=(o,r)=>{const u={...n};o==="claude"?u.claude=r:u[o]=r,a(u)};return h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:he.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:he.tokenList,children:HB.map(o=>h.jsxs("div",{className:he.tokenRow,children:[h.jsx("span",{className:he.tokenName,children:o.label}),h.jsx("span",{className:he.tokenTarget,children:o.description}),h.jsx("select",{className:he.select,value:n[o.key],onChange:r=>l(o.key,r.target.value),children:o.options.map(r=>h.jsx("option",{value:r.value,children:r.label},r.value))})]},o.key))})]})}const PB=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function qB(){const{tokens:n,setToken:a,deleteToken:l}=nn(),{showToast:o}=go(),[r,u]=S.useState(""),[d,m]=S.useState(""),[p,g]=S.useState("env_var"),[y,b]=S.useState(""),[x,T]=S.useState(null),A=C=>{if(C.preventDefault(),!r||!d)return;const B=p==="env_var"?y||r.toUpperCase()+"_TOKEN":"";a(r,d,p,B,p==="file"?y:""),o("Token saved successfully","success"),u(""),m(""),b("")},j=C=>{T(C)},N=()=>{x&&(l(x),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(Sc,{isOpen:x!==null,title:"Delete Token?",description:x?`"${x}" will be permanently removed.`:void 0,onConfirm:N,onCancel:()=>T(null)}),h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Tokens"}),h.jsx("p",{className:he.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:he.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:he.tokenList,children:n.map(C=>h.jsxs("div",{className:he.tokenRow,children:[h.jsx("span",{className:he.tokenBadge,children:C.tokenType}),h.jsx("span",{className:he.tokenName,children:C.name}),h.jsx("span",{className:he.tokenTarget,children:C.tokenType==="env_var"?C.envVar:C.filePath}),h.jsx("button",{className:he.deleteButton,onClick:()=>j(C.name),title:`Delete ${C.name}`,children:"×"})]},C.name))}),h.jsxs("form",{className:he.addForm,onSubmit:A,children:[h.jsxs("div",{className:he.formRow,children:[h.jsx("input",{className:he.input,type:"text",placeholder:"Token name",value:r,onChange:C=>u(C.target.value)}),h.jsx("input",{className:he.input,type:"password",placeholder:"Value",value:d,onChange:C=>m(C.target.value)})]}),h.jsxs("div",{className:he.formRow,children:[h.jsx("select",{className:he.select,value:p,onChange:C=>g(C.target.value),children:PB.map(C=>h.jsx("option",{value:C.value,children:C.label},C.value))}),h.jsx("input",{className:he.input,type:"text",placeholder:p==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:y,onChange:C=>b(C.target.value)}),h.jsx("button",{className:he.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function FB(){return h.jsxs(h.Fragment,{children:[h.jsx(GB,{}),h.jsx(qB,{})]})}const $B="_container_1xcp7_1",YB="_header_1xcp7_7",KB="_form_1xcp7_19",ZB="_formActions_1xcp7_87",XB="_list_1xcp7_93",QB="_card_1xcp7_99",JB="_active_1xcp7_109",WB="_cardHeader_1xcp7_113",e5="_cardActions_1xcp7_123",t5="_description_1xcp7_128",n5="_meta_1xcp7_134",a5="_promptDetails_1xcp7_151",s5="_promptText_1xcp7_163",i5="_empty_1xcp7_180",l5="_btnPrimary_1xcp7_186",o5="_btnSecondary_1xcp7_220",r5="_btnSmall_1xcp7_247",c5="_btnDanger_1xcp7_273",Mt={container:$B,header:YB,form:KB,formActions:ZB,list:XB,card:QB,active:JB,cardHeader:WB,cardActions:e5,description:t5,meta:n5,promptDetails:a5,promptText:s5,empty:i5,btnPrimary:l5,btnSecondary:o5,btnSmall:r5,btnDanger:c5};function u5(){const{personas:n,createPersona:a,updatePersona:l,deletePersona:o}=nn(),[r,u]=S.useState(null),[d,m]=S.useState(!1),[p,g]=S.useState(null),[y,b]=S.useState(""),[x,T]=S.useState(""),[A,j]=S.useState(""),[N,C]=S.useState(""),[B,R]=S.useState(""),[X,H]=S.useState(0),J=()=>{b(""),T(""),j(""),C(""),R(""),H(0)},W=()=>{J(),u(null),m(!0)},F=te=>{b(te.name),T(te.description),j(te.systemPrompt),C(te.runtime),R(te.model),H(te.maxTurns),u(te),m(!1)},ne=te=>{te.preventDefault(),!(!y.trim()||!A.trim())&&(r?(l(r.id,y,x,A,N,B,X),u(null)):(a(y,x,A,N,B,X),m(!1)),J())},ge=te=>{o(te),g(null),(r==null?void 0:r.id)===te&&(u(null),J())},L=()=>{u(null),m(!1),J()},pe=()=>h.jsxs("form",{onSubmit:ne,className:Mt.form,children:[h.jsx("h3",{children:r?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:y,onChange:te=>b(te.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:x,onChange:te=>T(te.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:N,onChange:te=>C(te.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:B,onChange:te=>R(te.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:X,onChange:te=>H(parseInt(te.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:A,onChange:te=>j(te.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:Mt.formActions,children:[h.jsx("button",{type:"submit",className:Mt.btnPrimary,children:r?"Save":"Create"}),h.jsx("button",{type:"button",onClick:L,className:Mt.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:Mt.container,children:[h.jsxs("div",{className:Mt.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:W,className:Mt.btnPrimary,children:"+ New Persona"})]}),(d||r)&&pe(),n.length===0&&!d?h.jsx("p",{className:Mt.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:Mt.list,children:n.map(te=>h.jsxs("div",{className:`${Mt.card} ${(r==null?void 0:r.id)===te.id?Mt.active:""}`,children:[h.jsxs("div",{className:Mt.cardHeader,children:[h.jsx("strong",{children:te.name}),h.jsxs("div",{className:Mt.cardActions,children:[h.jsx("button",{onClick:()=>F(te),className:Mt.btnSmall,children:"Edit"}),p===te.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>ge(te.id),className:Mt.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>g(null),className:Mt.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>g(te.id),className:Mt.btnSmall,children:"Delete"})]})]}),te.description&&h.jsx("p",{className:Mt.description,children:te.description}),h.jsxs("div",{className:Mt.meta,children:[te.runtime&&h.jsxs("span",{children:["Runtime: ",te.runtime]}),te.model&&h.jsxs("span",{children:["Model: ",te.model]}),te.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",te.maxTurns]})]}),h.jsxs("details",{className:Mt.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:Mt.promptText,children:te.systemPrompt})]})]},te.id))})]})}function d5(){return h.jsx(u5,{})}function f5(){const{themeId:n,resolvedThemeId:a,setTheme:l,preferSystem:o,setPreferSystem:r}=q0();return h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Appearance"}),h.jsx("p",{className:he.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:he.themeOptions,children:hc.filter(u=>!u.hidden).map(u=>{const d=!!(u.variantLightId&&u.variantDarkId),m=d?n===u.id||n===u.variantLightId||n===u.variantDarkId:n===u.id,p=d&&a===u.variantLightId;return h.jsxs("button",{type:"button",className:`${he.themeOption} ${m?he.themeOptionSelected:""}`,"aria-pressed":m,onClick:()=>l(u.id),children:[h.jsxs("span",{className:he.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:he.themeOptionLabel,children:u.label}),h.jsx("span",{className:he.themeOptionDesc,children:u.description})]}),d&&h.jsxs("span",{className:he.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${he.variantButton} ${m&&p?he.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),l(u.variantLightId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),l(u.variantLightId))},"aria-label":"Light variant","aria-pressed":m&&p,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${he.variantButton} ${m&&!p?he.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),l(u.variantDarkId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),l(u.variantDarkId))},"aria-label":"Dark variant","aria-pressed":m&&!p,children:"☾"})]})]}),u.swatches&&h.jsx("span",{className:he.themeSwatches,children:u.swatches.map((g,y)=>h.jsx("span",{className:he.themeSwatch,style:{background:g}},y))})]},u.id)})}),h.jsxs("label",{className:he.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:u=>r(u.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:he.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:he.themeActive,children:["Active theme: ",h.jsx("strong",{children:a})]})]})}function h5(){return h.jsx(f5,{})}function m5(){const{connected:n,environments:a,sessions:l}=nn(),o=a.filter(d=>d.status==="connected").length,r=a.length,u=l.filter(d=>["running","idle"].includes(d.status)).length;return h.jsxs("section",{className:he.section,"data-testid":"about-panel",children:[h.jsx("h3",{className:he.sectionTitle,children:"About"}),h.jsx("p",{className:he.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:he.aboutGrid,children:[h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Connection"}),h.jsxs("span",{className:he.aboutValue,children:[h.jsx("span",{className:`${he.aboutDot} ${n?he.aboutDotConnected:he.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Environments"}),h.jsxs("span",{className:he.aboutValue,children:[o,"/",r," connected"]})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:he.aboutValue,children:u})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Version"}),h.jsx("span",{className:he.aboutValue,children:"0.35.0"})]})]})]})}function p5(){return h.jsx(m5,{})}const g5="_root_h353j_1",y5="_body_h353j_7",v5="_main_h353j_19",b5="_sidebarWrapper_h353j_26",S5="_overlay_h353j_56",Kl={root:g5,body:y5,main:v5,sidebarWrapper:b5,overlay:S5},_5=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function x5(){const{lastSpawnedId:n,environments:a}=nn(),{showToast:l}=go();_k(a,l);const o=na(),r=hn(),u=r.pathname.startsWith(Gi),[d,m]=S.useState(!1),p=S.useCallback(()=>m(g=>!g),[]);return S.useEffect(()=>{m(!1)},[r.pathname]),S.useEffect(()=>{if(!d)return;const g=y=>{y.key==="Escape"&&m(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[d]),S.useEffect(()=>{n&&!r.pathname.startsWith("/tasks/")&&o(L0(n),{replace:!0})},[n,o,r.pathname]),h.jsxs("div",{className:Kl.root,children:[h.jsx(kE,{onToggleSidebar:u?void 0:p,sidebarOpen:d}),h.jsxs("div",{className:Kl.body,children:[h.jsx("div",{className:Kl.sidebarWrapper,"data-sidebar-open":d,"data-settings":u,children:u?h.jsx(_O,{}):h.jsx(GD,{})}),d&&!u&&h.jsx("div",{className:Kl.overlay,"data-testid":"drawer-overlay",onClick:()=>m(!1)}),h.jsxs("div",{className:Kl.main,children:[h.jsx(k0,{}),h.jsx(ok,{})]})]}),h.jsx(Sk,{})]})}function T5(){return h.jsx(rT,{children:h.jsxs(Ot,{element:h.jsx(x5,{}),children:[h.jsx(Ot,{index:!0,element:h.jsx(pM,{})}),h.jsx(Ot,{path:"sessions/new",element:h.jsx(TM,{})}),h.jsx(Ot,{path:"sessions/:sessionId",element:h.jsx(jM,{})}),h.jsx(Ot,{path:"projects/:projectId",element:h.jsx(C3,{})}),h.jsx(Ot,{path:"tasks/new",element:h.jsx($3,{})}),h.jsx(Ot,{path:"tasks/:taskId",element:h.jsx(Jd,{})}),h.jsx(Ot,{path:"tasks/:taskId/stream",element:h.jsx(Jd,{})}),h.jsx(Ot,{path:"tasks/:taskId/findings",element:h.jsx(Jd,{})}),h.jsx(Ot,{path:"tasks/:taskId/edit",element:h.jsx(Y3,{})}),h.jsx(Ot,{path:"environments/new",element:h.jsx(fO,{})}),h.jsxs(Ot,{path:"settings",element:h.jsx(gO,{}),children:[h.jsx(Ot,{index:!0,element:h.jsx(qr,{to:"environments",replace:!0})}),h.jsx(Ot,{path:"environments",element:h.jsx(sB,{})}),h.jsx(Ot,{path:"credentials",element:h.jsx(FB,{})}),h.jsx(Ot,{path:"tokens",element:h.jsx(qr,{to:"../credentials",replace:!0})}),h.jsx(Ot,{path:"personas",element:h.jsx(d5,{})}),h.jsx(Ot,{path:"appearance",element:h.jsx(h5,{})}),h.jsx(Ot,{path:"about",element:h.jsx(p5,{})})]}),h.jsx(Ot,{path:"*",element:h.jsx(qr,{to:"/",replace:!0})})]})})}function E5(){const n=_5?pE:lE;return h.jsx(_E,{children:h.jsx(yE,{children:h.jsx(n,{children:h.jsx(MT,{children:h.jsx(T5,{})})})})})}ux.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(E5,{})}));
|