@grackle-ai/web 0.29.1 → 0.30.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.
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import{r as qx,a as S,j as h,v as Yx,b as Fx,t as Rr,i as Kx,f as $x,M as Nf,c as wf}from"./markdown-gcy1Jmzi.js";import{r as Zx,d as r0,H as c0,P as u0,i as Xx,B as Qx,a as Jx,C as Wx,M as e_}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 Ad={exports:{}},Hl={},Cd={exports:{}},jd={};/**
|
|
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 d0;function t_(){return d0||(d0=1,(function(n){function a(U,$){var te=U.length;U.push($);e:for(;0<te;){var De=te-1>>>1,Ce=U[De];if(0<r(Ce,$))U[De]=$,U[te]=Ce,te=De;else break e}}function l(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var $=U[0],te=U.pop();if(te!==$){U[0]=te;e:for(var De=0,Ce=U.length,Ye=Ce>>>1;De<Ye;){var ke=2*(De+1)-1,Se=U[ke],je=ke+1,J=U[je];if(0>r(Se,te))je<Ce&&0>r(J,Se)?(U[De]=J,U[je]=te,De=je):(U[De]=Se,U[ke]=te,De=ke);else if(je<Ce&&0>r(J,te))U[De]=J,U[je]=te,De=je;else break e}}return $}function r(U,$){var te=U.sortIndex-$.sortIndex;return te!==0?te:U.id-$.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,_=3,T=!1,j=!1,A=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function Q(U){for(var $=l(g);$!==null;){if($.callback===null)o(g);else if($.startTime<=U)o(g),$.sortIndex=$.expirationTime,a(p,$);else break;$=l(g)}}function I(U){if(A=!1,Q(U),!j)if(l(p)!==null)j=!0,W||(W=!0,me());else{var $=l(g);$!==null&&G(I,$.startTime-U)}}var W=!1,ee=-1,q=5,ae=-1;function ye(){return w?!0:!(n.unstable_now()-ae<q)}function B(){if(w=!1,W){var U=n.unstable_now();ae=U;var $=!0;try{e:{j=!1,A&&(A=!1,z(ee),ee=-1),T=!0;var te=_;try{t:{for(Q(U),b=l(p);b!==null&&!(b.expirationTime>U&&ye());){var De=b.callback;if(typeof De=="function"){b.callback=null,_=b.priorityLevel;var Ce=De(b.expirationTime<=U);if(U=n.unstable_now(),typeof Ce=="function"){b.callback=Ce,Q(U),$=!0;break t}b===l(p)&&o(p),Q(U)}else o(p);b=l(p)}if(b!==null)$=!0;else{var Ye=l(g);Ye!==null&&G(I,Ye.startTime-U),$=!1}}break e}finally{b=null,_=te,T=!1}$=void 0}}finally{$?me():W=!1}}}var me;if(typeof R=="function")me=function(){R(B)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,_e=ne.port2;ne.port1.onmessage=B,me=function(){_e.postMessage(null)}}else me=function(){C(B,0)};function G(U,$){ee=C(function(){U(n.unstable_now())},$)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(U){switch(_){case 1:case 2:case 3:var $=3;break;default:$=_}var te=_;_=$;try{return U()}finally{_=te}},n.unstable_requestPaint=function(){w=!0},n.unstable_runWithPriority=function(U,$){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var te=_;_=U;try{return $()}finally{_=te}},n.unstable_scheduleCallback=function(U,$,te){var De=n.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?De+te:De):te=De,U){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=te+Ce,U={id:y++,callback:$,priorityLevel:U,startTime:te,expirationTime:Ce,sortIndex:-1},te>De?(U.sortIndex=te,a(g,U),l(p)===null&&U===l(g)&&(A?(z(ee),ee=-1):A=!0,G(I,te-De))):(U.sortIndex=Ce,a(p,U),j||T||(j=!0,W||(W=!0,me()))),U},n.unstable_shouldYield=ye,n.unstable_wrapCallback=function(U){var $=_;return function(){var te=_;_=$;try{return U.apply(this,arguments)}finally{_=te}}}})(jd)),jd}var f0;function n_(){return f0||(f0=1,Cd.exports=t_()),Cd.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 h0;function a_(){if(h0)return Hl;h0=1;var n=n_(),a=qx(),l=Zx();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,x=c.child;x;){if(x===s){v=!0,s=c,i=f;break}if(x===i){v=!0,i=c,s=f;break}x=x.sibling}if(!v){for(x=f.child;x;){if(x===s){v=!0,s=f,i=c;break}if(x===i){v=!0,i=f,s=c;break}x=x.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,_=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),R=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),ye=Symbol.for("react.memo_cache_sentinel"),B=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var ne=Symbol.for("react.client.reference");function _e(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case C:return"Profiler";case w:return"StrictMode";case I:return"Suspense";case W:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case j:return"Portal";case R:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case Q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return t=e.displayName||null,t!==null?t:_e(e.type)||"Memo";case q:t=e._payload,e=e._init;try{return _e(e(t))}catch{}}return null}var G=Array.isArray,U=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},De=[],Ce=-1;function Ye(e){return{current:e}}function ke(e){0>Ce||(e.current=De[Ce],De[Ce]=null,Ce--)}function Se(e,t){Ce++,De[Ce]=e.current,e.current=t}var je=Ye(null),J=Ye(null),Y=Ye(null),ve=Ye(null);function H(e,t){switch(Se(Y,t),Se(J,e),Se(je,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=kg(t),e=Rg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ke(je),Se(je,e)}function Fe(){ke(je),ke(J),ke(Y)}function gt(e){e.memoizedState!==null&&Se(ve,e);var t=je.current,s=Rg(t,e.type);t!==s&&(Se(J,e),Se(je,s))}function St(e){J.current===e&&(ke(je),ke(J)),ve.current===e&&(ke(ve),Ul._currentValue=te)}var It,Je;function Ze(e){if(It===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);It=t&&t[1]||"",Je=-1<s.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+It+e+Je}var Ue=!1;function yn(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 Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(V){var L=V}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(V){L=V}e.call(Z.prototype)}}else{try{throw Error()}catch(V){L=V}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(V){if(V&&L&&typeof V.stack=="string")return[V.stack,L.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],x=f[1];if(v&&x){var E=v.split(`
|
|
20
|
+
`),O=x.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 bn(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 yn(e.type,!1);case 11:return yn(e.type.render,!1);case 1:return yn(e.type,!0);case 31:return Ze("Activity");default:return""}}function Yn(e){try{var t="",s=null;do t+=bn(e,s),s=e,e=e.return;while(e);return t}catch(i){return`
|
|
23
|
+
Error generating stack: `+i.message+`
|
|
24
|
+
`+i.stack}}var Jt=Object.prototype.hasOwnProperty,Fn=n.unstable_scheduleCallback,X=n.unstable_cancelCallback,ie=n.unstable_shouldYield,re=n.unstable_requestPaint,ue=n.unstable_now,Te=n.unstable_getCurrentPriorityLevel,Ee=n.unstable_ImmediatePriority,We=n.unstable_UserBlockingPriority,Be=n.unstable_NormalPriority,ot=n.unstable_LowPriority,jt=n.unstable_IdlePriority,xt=n.log,Mt=n.unstable_setDisableYieldValue,rt=null,_t=null;function ln(e){if(typeof xt=="function"&&Mt(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(rt,e)}catch{}}var vt=Math.clz32?Math.clz32:ps,Pt=Math.log,qt=Math.LN2;function ps(e){return e>>>=0,e===0?32:31-(Pt(e)/qt|0)|0}var Kn=256,se=262144,pe=4194304;function oe(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 we(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 x=i&134217727;return x!==0?(i=x&~f,i!==0?c=oe(i):(v&=x,v!==0?c=oe(v):s||(s=x&~e,s!==0&&(c=oe(s))))):(x=i&~f,x!==0?c=oe(x):v!==0?c=oe(v):s||(s=i&~e,s!==0&&(c=oe(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 F(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function nt(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 dn(){var e=pe;return pe<<=1,(pe&62914560)===0&&(pe=4194304),e}function Fs(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function La(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vo(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 x=e.entanglements,E=e.expirationTimes,O=e.hiddenUpdates;for(s=v&~s;0<s;){var P=31-vt(s),Z=1<<P;x[P]=0,E[P]=-1;var L=O[P];if(L!==null)for(O[P]=null,P=0;P<L.length;P++){var V=L[P];V!==null&&(V.lane&=-536870913)}s&=~Z}i!==0&&Zi(e,i,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(v&~t))}function Zi(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 Xi(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 Qi(e,t){var s=t&-t;return s=(s&42)!==0?1:Ks(s),(s&(e.suspendedLanes|t))!==0?0:s}function Ks(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 $s(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ji(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:t0(e.type))}function Wi(e,t){var s=$.p;try{return $.p=e,t()}finally{$.p=s}}var $n=Math.random().toString(36).slice(2),Ot="__reactFiber$"+$n,Ft="__reactProps$"+$n,da="__reactContainer$"+$n,Zs="__reactEvents$"+$n,yo="__reactListeners$"+$n,bo="__reactHandles$"+$n,le="__reactResources$"+$n,ze="__reactMarker$"+$n;function Le(e){delete e[Ot],delete e[Ft],delete e[Zs],delete e[yo],delete e[bo]}function Oe(e){var t=e[Ot];if(t)return t;for(var s=e.parentNode;s;){if(t=s[da]||s[Ot]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Vg(e);e!==null;){if(s=e[Ot])return s;e=Vg(e)}return t}e=s,s=e.parentNode}return null}function Wt(e){if(e=e[Ot]||e[da]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function en(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[le];return t||(t=e[le]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function He(e){e[ze]=!0}var Ua=new Set,Sh={};function gs(e,t){Xs(e,t),Xs(e+"Capture",t)}function Xs(e,t){for(Sh[e]=t,e=0;e<t.length;e++)Ua.add(t[e])}var B1=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]*$"),xh={},_h={};function L1(e){return Jt.call(_h,e)?!0:Jt.call(xh,e)?!1:B1.test(e)?_h[e]=!0:(xh[e]=!0,!1)}function So(e,t,s){if(L1(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 xo(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 fa(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 kn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Th(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function U1(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 yc(e){if(!e._valueTracker){var t=Th(e)?"checked":"value";e._valueTracker=U1(e,t,""+e[t])}}function Eh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),i="";return e&&(i=Th(e)?e.checked?"true":"false":e.value),e=i,e!==s?(t.setValue(e),!0):!1}function _o(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 z1=/[\n"\\]/g;function Rn(e){return e.replace(z1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function bc(e,t,s,i,c,f,v,x){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=""+kn(t)):e.value!==""+kn(t)&&(e.value=""+kn(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?Sc(e,v,kn(t)):s!=null?Sc(e,v,kn(s)):i!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+kn(x):e.removeAttribute("name")}function Ah(e,t,s,i,c,f,v,x){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)){yc(e);return}s=s!=null?""+kn(s):"",t=t!=null?""+kn(t):s,x||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=x?e.checked:!!i,e.defaultChecked=!!i,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),yc(e)}function Sc(e,t,s){t==="number"&&_o(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Qs(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=""+kn(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 Ch(e,t,s){if(t!=null&&(t=""+kn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+kn(s):""}function jh(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=kn(t),e.defaultValue=s,i=e.textContent,i===s&&i!==""&&i!==null&&(e.value=i),yc(e)}function Js(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var V1=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 Nh(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||V1.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function wh(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&&Nh(e,c,i)}else for(var f in t)t.hasOwnProperty(f)&&Nh(e,f,t[f])}function xc(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 I1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),H1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function To(e){return H1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ha(){}var _c=null;function Tc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ws=null,ei=null;function Dh(e){var t=Wt(e);if(t&&(e=t.stateNode)){var s=e[Ft]||null;e:switch(e=t.stateNode,t.type){case"input":if(bc(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="'+Rn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var i=s[t];if(i!==e&&i.form===e.form){var c=i[Ft]||null;if(!c)throw Error(o(90));bc(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&&Eh(i)}break e;case"textarea":Ch(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&Qs(e,!!s.multiple,t,!1)}}}var Ec=!1;function kh(e,t,s){if(Ec)return e(t,s);Ec=!0;try{var i=e(t);return i}finally{if(Ec=!1,(Ws!==null||ei!==null)&&(ur(),Ws&&(t=Ws,e=ei,ei=Ws=null,Dh(t),e)))for(t=0;t<e.length;t++)Dh(e[t])}}function el(e,t){var s=e.stateNode;if(s===null)return null;var i=s[Ft]||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 ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ac=!1;if(ma)try{var tl={};Object.defineProperty(tl,"passive",{get:function(){Ac=!0}}),window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{Ac=!1}var za=null,Cc=null,Eo=null;function Rh(){if(Eo)return Eo;var e,t=Cc,s=t.length,i,c="value"in za?za.value:za.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 Eo=c.slice(e,1<i?1-i:void 0)}function Ao(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 Co(){return!0}function Mh(){return!1}function fn(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 x in e)e.hasOwnProperty(x)&&(s=e[x],this[x]=s?s(f):f[x]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Co:Mh,this.isPropagationStopped=Mh,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=Co)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Co)},persist:function(){},isPersistent:Co}),t}var vs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jo=fn(vs),nl=b({},vs,{view:0,detail:0}),G1=fn(nl),jc,Nc,al,No=b({},nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dc,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!==al&&(al&&e.type==="mousemove"?(jc=e.screenX-al.screenX,Nc=e.screenY-al.screenY):Nc=jc=0,al=e),jc)},movementY:function(e){return"movementY"in e?e.movementY:Nc}}),Oh=fn(No),P1=b({},No,{dataTransfer:0}),q1=fn(P1),Y1=b({},nl,{relatedTarget:0}),wc=fn(Y1),F1=b({},vs,{animationName:0,elapsedTime:0,pseudoElement:0}),K1=fn(F1),$1=b({},vs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Z1=fn($1),X1=b({},vs,{data:0}),Bh=fn(X1),Q1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},J1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},W1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=W1[e])?!!t[e]:!1}function Dc(){return eS}var tS=b({},nl,{key:function(e){if(e.key){var t=Q1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?J1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dc,charCode:function(e){return e.type==="keypress"?Ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nS=fn(tS),aS=b({},No,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lh=fn(aS),sS=b({},nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dc}),iS=fn(sS),lS=b({},vs,{propertyName:0,elapsedTime:0,pseudoElement:0}),oS=fn(lS),rS=b({},No,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),cS=fn(rS),uS=b({},vs,{newState:0,oldState:0}),dS=fn(uS),fS=[9,13,27,32],kc=ma&&"CompositionEvent"in window,sl=null;ma&&"documentMode"in document&&(sl=document.documentMode);var hS=ma&&"TextEvent"in window&&!sl,Uh=ma&&(!kc||sl&&8<sl&&11>=sl),zh=" ",Vh=!1;function Ih(e,t){switch(e){case"keyup":return fS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ti=!1;function mS(e,t){switch(e){case"compositionend":return Hh(t);case"keypress":return t.which!==32?null:(Vh=!0,zh);case"textInput":return e=t.data,e===zh&&Vh?null:e;default:return null}}function pS(e,t){if(ti)return e==="compositionend"||!kc&&Ih(e,t)?(e=Rh(),Eo=Cc=za=null,ti=!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 Uh&&t.locale!=="ko"?null:t.data;default:return null}}var gS={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 Gh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gS[e.type]:t==="textarea"}function Ph(e,t,s,i){Ws?ei?ei.push(i):ei=[i]:Ws=i,t=vr(t,"onChange"),0<t.length&&(s=new jo("onChange","change",null,s,i),e.push({event:s,listeners:t}))}var il=null,ll=null;function vS(e){Ag(e,0)}function wo(e){var t=en(e);if(Eh(t))return e}function qh(e,t){if(e==="change")return t}var Yh=!1;if(ma){var Rc;if(ma){var Mc="oninput"in document;if(!Mc){var Fh=document.createElement("div");Fh.setAttribute("oninput","return;"),Mc=typeof Fh.oninput=="function"}Rc=Mc}else Rc=!1;Yh=Rc&&(!document.documentMode||9<document.documentMode)}function Kh(){il&&(il.detachEvent("onpropertychange",$h),ll=il=null)}function $h(e){if(e.propertyName==="value"&&wo(ll)){var t=[];Ph(t,ll,e,Tc(e)),kh(vS,t)}}function yS(e,t,s){e==="focusin"?(Kh(),il=t,ll=s,il.attachEvent("onpropertychange",$h)):e==="focusout"&&Kh()}function bS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wo(ll)}function SS(e,t){if(e==="click")return wo(t)}function xS(e,t){if(e==="input"||e==="change")return wo(t)}function _S(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sn=typeof Object.is=="function"?Object.is:_S;function ol(e,t){if(Sn(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(!Jt.call(t,c)||!Sn(e[c],t[c]))return!1}return!0}function Zh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xh(e,t){var s=Zh(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=Zh(s)}}function Qh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=_o(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=_o(e.document)}return t}function Oc(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 TS=ma&&"documentMode"in document&&11>=document.documentMode,ni=null,Bc=null,rl=null,Lc=!1;function Wh(e,t,s){var i=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Lc||ni==null||ni!==_o(i)||(i=ni,"selectionStart"in i&&Oc(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}),rl&&ol(rl,i)||(rl=i,i=vr(Bc,"onSelect"),0<i.length&&(t=new jo("onSelect","select",null,t,s),e.push({event:t,listeners:i}),t.target=ni)))}function ys(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var ai={animationend:ys("Animation","AnimationEnd"),animationiteration:ys("Animation","AnimationIteration"),animationstart:ys("Animation","AnimationStart"),transitionrun:ys("Transition","TransitionRun"),transitionstart:ys("Transition","TransitionStart"),transitioncancel:ys("Transition","TransitionCancel"),transitionend:ys("Transition","TransitionEnd")},Uc={},em={};ma&&(em=document.createElement("div").style,"AnimationEvent"in window||(delete ai.animationend.animation,delete ai.animationiteration.animation,delete ai.animationstart.animation),"TransitionEvent"in window||delete ai.transitionend.transition);function bs(e){if(Uc[e])return Uc[e];if(!ai[e])return e;var t=ai[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in em)return Uc[e]=t[s];return e}var tm=bs("animationend"),nm=bs("animationiteration"),am=bs("animationstart"),ES=bs("transitionrun"),AS=bs("transitionstart"),CS=bs("transitioncancel"),sm=bs("transitionend"),im=new Map,zc="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(" ");zc.push("scrollEnd");function Zn(e,t){im.set(e,t),gs(t,[e])}var Do=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)},Mn=[],si=0,Vc=0;function ko(){for(var e=si,t=Vc=si=0;t<e;){var s=Mn[t];Mn[t++]=null;var i=Mn[t];Mn[t++]=null;var c=Mn[t];Mn[t++]=null;var f=Mn[t];if(Mn[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&&lm(s,c,f)}}function Ro(e,t,s,i){Mn[si++]=e,Mn[si++]=t,Mn[si++]=s,Mn[si++]=i,Vc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Ic(e,t,s,i){return Ro(e,t,s,i),Mo(e)}function Ss(e,t){return Ro(e,null,null,t),Mo(e)}function lm(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 Mo(e){if(50<Dl)throw Dl=0,Zu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function jS(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 xn(e,t,s,i){return new jS(e,t,s,i)}function Hc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pa(e,t){var s=e.alternate;return s===null?(s=xn(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 om(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 Oo(e,t,s,i,c,f){var v=0;if(i=e,typeof e=="function")Hc(e)&&(v=1);else if(typeof e=="string")v=Rx(e,s,je.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=xn(31,s,t,c),e.elementType=ae,e.lanes=f,e;case A:return xs(s.children,c,f,t);case w:v=8,c|=24;break;case C:return e=xn(12,s,t,c|2),e.elementType=C,e.lanes=f,e;case I:return e=xn(13,s,t,c),e.elementType=I,e.lanes=f,e;case W:return e=xn(19,s,t,c),e.elementType=W,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:v=10;break e;case z:v=9;break e;case Q:v=11;break e;case ee:v=14;break e;case q:v=16,i=null;break e}v=29,s=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=xn(v,s,t,c),t.elementType=e,t.type=i,t.lanes=f,t}function xs(e,t,s,i){return e=xn(7,e,i,t),e.lanes=s,e}function Gc(e,t,s){return e=xn(6,e,null,t),e.lanes=s,e}function rm(e){var t=xn(18,null,null,0);return t.stateNode=e,t}function Pc(e,t,s){return t=xn(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var cm=new WeakMap;function On(e,t){if(typeof e=="object"&&e!==null){var s=cm.get(e);return s!==void 0?s:(t={value:e,source:t,stack:Yn(t)},cm.set(e,t),t)}return{value:e,source:t,stack:Yn(t)}}var li=[],oi=0,Bo=null,cl=0,Bn=[],Ln=0,Va=null,ea=1,ta="";function ga(e,t){li[oi++]=cl,li[oi++]=Bo,Bo=e,cl=t}function um(e,t,s){Bn[Ln++]=ea,Bn[Ln++]=ta,Bn[Ln++]=Va,Va=e;var i=ea;e=ta;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,ea=1<<32-vt(t)+c|s<<c|i,ta=f+e}else ea=1<<f|s<<c|i,ta=e}function qc(e){e.return!==null&&(ga(e,1),um(e,1,0))}function Yc(e){for(;e===Bo;)Bo=li[--oi],li[oi]=null,cl=li[--oi],li[oi]=null;for(;e===Va;)Va=Bn[--Ln],Bn[Ln]=null,ta=Bn[--Ln],Bn[Ln]=null,ea=Bn[--Ln],Bn[Ln]=null}function dm(e,t){Bn[Ln++]=ea,Bn[Ln++]=ta,Bn[Ln++]=Va,ea=t.id,ta=t.overflow,Va=e}var Kt=null,ct=null,qe=!1,Ia=null,Un=!1,Fc=Error(o(519));function Ha(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ul(On(t,e)),Fc}function fm(e){var t=e.stateNode,s=e.type,i=e.memoizedProps;switch(t[Ot]=e,t[Ft]=i,s){case"dialog":Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":case"embed":Ie("load",t);break;case"video":case"audio":for(s=0;s<Rl.length;s++)Ie(Rl[s],t);break;case"source":Ie("error",t);break;case"img":case"image":case"link":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"input":Ie("invalid",t),Ah(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ie("invalid",t);break;case"textarea":Ie("invalid",t),jh(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||wg(t.textContent,s)?(i.popover!=null&&(Ie("beforetoggle",t),Ie("toggle",t)),i.onScroll!=null&&Ie("scroll",t),i.onScrollEnd!=null&&Ie("scrollend",t),i.onClick!=null&&(t.onclick=ha),t=!0):t=!1,t||Ha(e,!0)}function hm(e){for(Kt=e.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:Un=!1;return;case 27:case 3:Un=!0;return;default:Kt=Kt.return}}function ri(e){if(e!==Kt)return!1;if(!qe)return hm(e),qe=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||ud(e.type,e.memoizedProps)),s=!s),s&&ct&&Ha(e),hm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ct=zg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ct=zg(e)}else t===27?(t=ct,ts(e.type)?(e=pd,pd=null,ct=e):ct=t):ct=Kt?Vn(e.stateNode.nextSibling):null;return!0}function _s(){ct=Kt=null,qe=!1}function Kc(){var e=Ia;return e!==null&&(gn===null?gn=e:gn.push.apply(gn,e),Ia=null),e}function ul(e){Ia===null?Ia=[e]:Ia.push(e)}var $c=Ye(null),Ts=null,va=null;function Ga(e,t,s){Se($c,t._currentValue),t._currentValue=s}function ya(e){e._currentValue=$c.current,ke($c)}function Zc(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 Xc(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 x=f;f=c;for(var E=0;E<t.length;E++)if(x.context===t[E]){f.lanes|=s,x=f.alternate,x!==null&&(x.lanes|=s),Zc(f.return,s,e),i||(v=null);break e}f=x.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),Zc(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 ci(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 x=c.type;Sn(c.pendingProps.value,v.value)||(e!==null?e.push(x):e=[x])}}else if(c===ve.current){if(v=c.alternate,v===null)throw Error(o(387));v.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Ul):e=[Ul])}c=c.return}e!==null&&Xc(t,e,s,i),t.flags|=262144}function Lo(e){for(e=e.firstContext;e!==null;){if(!Sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Es(e){Ts=e,va=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $t(e){return mm(Ts,e)}function Uo(e,t){return Ts===null&&Es(e),mm(e,t)}function mm(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},va===null){if(e===null)throw Error(o(308));va=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else va=va.next=t;return s}var NS=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()})}},wS=n.unstable_scheduleCallback,DS=n.unstable_NormalPriority,Bt={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qc(){return{controller:new NS,data:new Map,refCount:0}}function dl(e){e.refCount--,e.refCount===0&&wS(DS,function(){e.controller.abort()})}var fl=null,Jc=0,ui=0,di=null;function kS(e,t){if(fl===null){var s=fl=[];Jc=0,ui=td(),di={status:"pending",value:void 0,then:function(i){s.push(i)}}}return Jc++,t.then(pm,pm),t}function pm(){if(--Jc===0&&fl!==null){di!==null&&(di.status="fulfilled");var e=fl;fl=null,ui=0,di=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function RS(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 gm=U.S;U.S=function(e,t){Wp=ue(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&kS(e,t),gm!==null&&gm(e,t)};var As=Ye(null);function Wc(){var e=As.current;return e!==null?e:lt.pooledCache}function zo(e,t){t===null?Se(As,As.current):Se(As,t.pool)}function vm(){var e=Wc();return e===null?null:{parent:Bt._currentValue,pool:e}}var fi=Error(o(460)),eu=Error(o(474)),Vo=Error(o(542)),Io={then:function(){}};function ym(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bm(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(ha,ha),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xm(e),e;default:if(typeof t.status=="string")t.then(ha,ha);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,xm(e),e}throw js=t,fi}}function Cs(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(js=s,fi):s}}var js=null;function Sm(){if(js===null)throw Error(o(459));var e=js;return js=null,e}function xm(e){if(e===fi||e===Vo)throw Error(o(483))}var hi=null,hl=0;function Ho(e){var t=hl;return hl+=1,hi===null&&(hi=[]),bm(hi,e,t)}function ml(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Go(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function _m(e){function t(k,N){if(e){var M=k.deletions;M===null?(k.deletions=[N],k.flags|=16):M.push(N)}}function s(k,N){if(!e)return null;for(;N!==null;)t(k,N),N=N.sibling;return null}function i(k){for(var N=new Map;k!==null;)k.key!==null?N.set(k.key,k):N.set(k.index,k),k=k.sibling;return N}function c(k,N){return k=pa(k,N),k.index=0,k.sibling=null,k}function f(k,N,M){return k.index=M,e?(M=k.alternate,M!==null?(M=M.index,M<N?(k.flags|=67108866,N):M):(k.flags|=67108866,N)):(k.flags|=1048576,N)}function v(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function x(k,N,M,K){return N===null||N.tag!==6?(N=Gc(M,k.mode,K),N.return=k,N):(N=c(N,M),N.return=k,N)}function E(k,N,M,K){var ge=M.type;return ge===A?P(k,N,M.props.children,K,M.key):N!==null&&(N.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===q&&Cs(ge)===N.type)?(N=c(N,M.props),ml(N,M),N.return=k,N):(N=Oo(M.type,M.key,M.props,null,k.mode,K),ml(N,M),N.return=k,N)}function O(k,N,M,K){return N===null||N.tag!==4||N.stateNode.containerInfo!==M.containerInfo||N.stateNode.implementation!==M.implementation?(N=Pc(M,k.mode,K),N.return=k,N):(N=c(N,M.children||[]),N.return=k,N)}function P(k,N,M,K,ge){return N===null||N.tag!==7?(N=xs(M,k.mode,K,ge),N.return=k,N):(N=c(N,M),N.return=k,N)}function Z(k,N,M){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=Gc(""+N,k.mode,M),N.return=k,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case T:return M=Oo(N.type,N.key,N.props,null,k.mode,M),ml(M,N),M.return=k,M;case j:return N=Pc(N,k.mode,M),N.return=k,N;case q:return N=Cs(N),Z(k,N,M)}if(G(N)||me(N))return N=xs(N,k.mode,M,null),N.return=k,N;if(typeof N.then=="function")return Z(k,Ho(N),M);if(N.$$typeof===R)return Z(k,Uo(k,N),M);Go(k,N)}return null}function L(k,N,M,K){var ge=N!==null?N.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ge!==null?null:x(k,N,""+M,K);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case T:return M.key===ge?E(k,N,M,K):null;case j:return M.key===ge?O(k,N,M,K):null;case q:return M=Cs(M),L(k,N,M,K)}if(G(M)||me(M))return ge!==null?null:P(k,N,M,K,null);if(typeof M.then=="function")return L(k,N,Ho(M),K);if(M.$$typeof===R)return L(k,N,Uo(k,M),K);Go(k,M)}return null}function V(k,N,M,K,ge){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return k=k.get(M)||null,x(N,k,""+K,ge);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case T:return k=k.get(K.key===null?M:K.key)||null,E(N,k,K,ge);case j:return k=k.get(K.key===null?M:K.key)||null,O(N,k,K,ge);case q:return K=Cs(K),V(k,N,M,K,ge)}if(G(K)||me(K))return k=k.get(M)||null,P(N,k,K,ge,null);if(typeof K.then=="function")return V(k,N,M,Ho(K),ge);if(K.$$typeof===R)return V(k,N,M,Uo(N,K),ge);Go(N,K)}return null}function ce(k,N,M,K){for(var ge=null,Ke=null,he=N,Me=N=0,Pe=null;he!==null&&Me<M.length;Me++){he.index>Me?(Pe=he,he=null):Pe=he.sibling;var $e=L(k,he,M[Me],K);if($e===null){he===null&&(he=Pe);break}e&&he&&$e.alternate===null&&t(k,he),N=f($e,N,Me),Ke===null?ge=$e:Ke.sibling=$e,Ke=$e,he=Pe}if(Me===M.length)return s(k,he),qe&&ga(k,Me),ge;if(he===null){for(;Me<M.length;Me++)he=Z(k,M[Me],K),he!==null&&(N=f(he,N,Me),Ke===null?ge=he:Ke.sibling=he,Ke=he);return qe&&ga(k,Me),ge}for(he=i(he);Me<M.length;Me++)Pe=V(he,k,Me,M[Me],K),Pe!==null&&(e&&Pe.alternate!==null&&he.delete(Pe.key===null?Me:Pe.key),N=f(Pe,N,Me),Ke===null?ge=Pe:Ke.sibling=Pe,Ke=Pe);return e&&he.forEach(function(ls){return t(k,ls)}),qe&&ga(k,Me),ge}function be(k,N,M,K){if(M==null)throw Error(o(151));for(var ge=null,Ke=null,he=N,Me=N=0,Pe=null,$e=M.next();he!==null&&!$e.done;Me++,$e=M.next()){he.index>Me?(Pe=he,he=null):Pe=he.sibling;var ls=L(k,he,$e.value,K);if(ls===null){he===null&&(he=Pe);break}e&&he&&ls.alternate===null&&t(k,he),N=f(ls,N,Me),Ke===null?ge=ls:Ke.sibling=ls,Ke=ls,he=Pe}if($e.done)return s(k,he),qe&&ga(k,Me),ge;if(he===null){for(;!$e.done;Me++,$e=M.next())$e=Z(k,$e.value,K),$e!==null&&(N=f($e,N,Me),Ke===null?ge=$e:Ke.sibling=$e,Ke=$e);return qe&&ga(k,Me),ge}for(he=i(he);!$e.done;Me++,$e=M.next())$e=V(he,k,Me,$e.value,K),$e!==null&&(e&&$e.alternate!==null&&he.delete($e.key===null?Me:$e.key),N=f($e,N,Me),Ke===null?ge=$e:Ke.sibling=$e,Ke=$e);return e&&he.forEach(function(Px){return t(k,Px)}),qe&&ga(k,Me),ge}function it(k,N,M,K){if(typeof M=="object"&&M!==null&&M.type===A&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case T:e:{for(var ge=M.key;N!==null;){if(N.key===ge){if(ge=M.type,ge===A){if(N.tag===7){s(k,N.sibling),K=c(N,M.props.children),K.return=k,k=K;break e}}else if(N.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===q&&Cs(ge)===N.type){s(k,N.sibling),K=c(N,M.props),ml(K,M),K.return=k,k=K;break e}s(k,N);break}else t(k,N);N=N.sibling}M.type===A?(K=xs(M.props.children,k.mode,K,M.key),K.return=k,k=K):(K=Oo(M.type,M.key,M.props,null,k.mode,K),ml(K,M),K.return=k,k=K)}return v(k);case j:e:{for(ge=M.key;N!==null;){if(N.key===ge)if(N.tag===4&&N.stateNode.containerInfo===M.containerInfo&&N.stateNode.implementation===M.implementation){s(k,N.sibling),K=c(N,M.children||[]),K.return=k,k=K;break e}else{s(k,N);break}else t(k,N);N=N.sibling}K=Pc(M,k.mode,K),K.return=k,k=K}return v(k);case q:return M=Cs(M),it(k,N,M,K)}if(G(M))return ce(k,N,M,K);if(me(M)){if(ge=me(M),typeof ge!="function")throw Error(o(150));return M=ge.call(M),be(k,N,M,K)}if(typeof M.then=="function")return it(k,N,Ho(M),K);if(M.$$typeof===R)return it(k,N,Uo(k,M),K);Go(k,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,N!==null&&N.tag===6?(s(k,N.sibling),K=c(N,M),K.return=k,k=K):(s(k,N),K=Gc(M,k.mode,K),K.return=k,k=K),v(k)):s(k,N)}return function(k,N,M,K){try{hl=0;var ge=it(k,N,M,K);return hi=null,ge}catch(he){if(he===fi||he===Vo)throw he;var Ke=xn(29,he,null,k.mode);return Ke.lanes=K,Ke.return=k,Ke}finally{}}}var Ns=_m(!0),Tm=_m(!1),Pa=!1;function tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nu(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 qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(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=Mo(e),lm(e,null,s),t}return Ro(e,i,t,s),Mo(e)}function pl(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,Xi(e,s)}}function au(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 su=!1;function gl(){if(su){var e=di;if(e!==null)throw e}}function vl(e,t,s,i){su=!1;var c=e.updateQueue;Pa=!1;var f=c.firstBaseUpdate,v=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var E=x,O=E.next;E.next=null,v===null?f=O:v.next=O,v=E;var P=e.alternate;P!==null&&(P=P.updateQueue,x=P.lastBaseUpdate,x!==v&&(x===null?P.firstBaseUpdate=O:x.next=O,P.lastBaseUpdate=E))}if(f!==null){var Z=c.baseState;v=0,P=O=E=null,x=f;do{var L=x.lane&-536870913,V=L!==x.lane;if(V?(Ge&L)===L:(i&L)===L){L!==0&&L===ui&&(su=!0),P!==null&&(P=P.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ce=e,be=x;L=t;var it=s;switch(be.tag){case 1:if(ce=be.payload,typeof ce=="function"){Z=ce.call(it,Z,L);break e}Z=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=be.payload,L=typeof ce=="function"?ce.call(it,Z,L):ce,L==null)break e;Z=b({},Z,L);break e;case 2:Pa=!0}}L=x.callback,L!==null&&(e.flags|=64,V&&(e.flags|=8192),V=c.callbacks,V===null?c.callbacks=[L]:V.push(L))}else V={lane:L,tag:x.tag,payload:x.payload,callback:x.callback,next:null},P===null?(O=P=V,E=Z):P=P.next=V,v|=L;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;V=x,x=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);P===null&&(E=Z),c.baseState=E,c.firstBaseUpdate=O,c.lastBaseUpdate=P,f===null&&(c.shared.lanes=0),Xa|=v,e.lanes=v,e.memoizedState=Z}}function Em(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Am(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Em(s[e],t)}var mi=Ye(null),Po=Ye(0);function Cm(e,t){e=ja,Se(Po,e),Se(mi,t),ja=e|t.baseLanes}function iu(){Se(Po,ja),Se(mi,mi.current)}function lu(){ja=Po.current,ke(mi),ke(Po)}var _n=Ye(null),zn=null;function Fa(e){var t=e.alternate;Se(Nt,Nt.current&1),Se(_n,e),zn===null&&(t===null||mi.current!==null||t.memoizedState!==null)&&(zn=e)}function ou(e){Se(Nt,Nt.current),Se(_n,e),zn===null&&(zn=e)}function jm(e){e.tag===22?(Se(Nt,Nt.current),Se(_n,e),zn===null&&(zn=e)):Ka()}function Ka(){Se(Nt,Nt.current),Se(_n,_n.current)}function Tn(e){ke(_n),zn===e&&(zn=null),ke(Nt)}var Nt=Ye(0);function qo(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||hd(s)||md(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 ba=0,Re=null,at=null,Lt=null,Yo=!1,pi=!1,ws=!1,Fo=0,yl=0,gi=null,MS=0;function Tt(){throw Error(o(321))}function ru(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!Sn(e[s],t[s]))return!1;return!0}function cu(e,t,s,i,c,f){return ba=f,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?up:Eu,ws=!1,f=s(i,c),ws=!1,pi&&(f=wm(t,s,i,c)),Nm(e),f}function Nm(e){U.H=xl;var t=at!==null&&at.next!==null;if(ba=0,Lt=at=Re=null,Yo=!1,yl=0,gi=null,t)throw Error(o(300));e===null||Ut||(e=e.dependencies,e!==null&&Lo(e)&&(Ut=!0))}function wm(e,t,s,i){Re=e;var c=0;do{if(pi&&(gi=null),yl=0,pi=!1,25<=c)throw Error(o(301));if(c+=1,Lt=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)}U.H=dp,f=t(s,i)}while(pi);return f}function OS(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?bl(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Re.flags|=1024),t}function uu(){var e=Fo!==0;return Fo=0,e}function du(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function fu(e){if(Yo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Yo=!1}ba=0,Lt=at=Re=null,pi=!1,yl=Fo=0,gi=null}function on(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Re.memoizedState=Lt=e:Lt=Lt.next=e,Lt}function wt(){if(at===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=Lt===null?Re.memoizedState:Lt.next;if(t!==null)Lt=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},Lt===null?Re.memoizedState=Lt=e:Lt=Lt.next=e}return Lt}function Ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bl(e){var t=yl;return yl+=1,gi===null&&(gi=[]),e=bm(gi,e,t),t=Re,(Lt===null?t.memoizedState:Lt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?up:Eu),e}function $o(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bl(e);if(e.$$typeof===R)return $t(e)}throw Error(o(438,String(e)))}function hu(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=Ko(),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]=ye;return t.index++,s}function Sa(e,t){return typeof t=="function"?t(e):t}function Zo(e){var t=wt();return mu(t,at,e)}function mu(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 x=v=null,E=null,O=t,P=!1;do{var Z=O.lane&-536870913;if(Z!==O.lane?(Ge&Z)===Z:(ba&Z)===Z){var L=O.revertLane;if(L===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),Z===ui&&(P=!0);else if((ba&L)===L){O=O.next,L===ui&&(P=!0);continue}else Z={lane:0,revertLane:O.revertLane,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},E===null?(x=E=Z,v=f):E=E.next=Z,Re.lanes|=L,Xa|=L;Z=O.action,ws&&s(f,Z),f=O.hasEagerState?O.eagerState:s(f,Z)}else L={lane:Z,revertLane:O.revertLane,gesture:O.gesture,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},E===null?(x=E=L,v=f):E=E.next=L,Re.lanes|=Z,Xa|=Z;O=O.next}while(O!==null&&O!==t);if(E===null?v=f:E.next=x,!Sn(f,e.memoizedState)&&(Ut=!0,P&&(s=di,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 pu(e){var t=wt(),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);Sn(f,t.memoizedState)||(Ut=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,i]}function Dm(e,t,s){var i=Re,c=wt(),f=qe;if(f){if(s===void 0)throw Error(o(407));s=s()}else s=t();var v=!Sn((at||c).memoizedState,s);if(v&&(c.memoizedState=s,Ut=!0),c=c.queue,yu(Mm.bind(null,i,c,e),[e]),c.getSnapshot!==t||v||Lt!==null&&Lt.memoizedState.tag&1){if(i.flags|=2048,vi(9,{destroy:void 0},Rm.bind(null,i,c,s,t),null),lt===null)throw Error(o(349));f||(ba&127)!==0||km(i,t,s)}return s}function km(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Re.updateQueue,t===null?(t=Ko(),Re.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Rm(e,t,s,i){t.value=s,t.getSnapshot=i,Om(t)&&Bm(e)}function Mm(e,t,s){return s(function(){Om(t)&&Bm(e)})}function Om(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!Sn(e,s)}catch{return!0}}function Bm(e){var t=Ss(e,2);t!==null&&vn(t,e,2)}function gu(e){var t=on();if(typeof e=="function"){var s=e;if(e=s(),ws){ln(!0);try{s()}finally{ln(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:e},t}function Lm(e,t,s,i){return e.baseState=s,mu(e,at,typeof i=="function"?i:Sa)}function BS(e,t,s,i,c){if(Jo(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)}};U.T!==null?s(!0):f.isTransition=!1,i(f),s=t.pending,s===null?(f.next=t.pending=f,Um(t,f)):(f.next=s.next,t.pending=s.next=f)}}function Um(e,t){var s=t.action,i=t.payload,c=e.state;if(t.isTransition){var f=U.T,v={};U.T=v;try{var x=s(c,i),E=U.S;E!==null&&E(v,x),zm(e,t,x)}catch(O){vu(e,t,O)}finally{f!==null&&v.types!==null&&(f.types=v.types),U.T=f}}else try{f=s(c,i),zm(e,t,f)}catch(O){vu(e,t,O)}}function zm(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(i){Vm(e,t,i)},function(i){return vu(e,t,i)}):Vm(e,t,s)}function Vm(e,t,s){t.status="fulfilled",t.value=s,Im(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Um(e,s)))}function vu(e,t,s){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=s,Im(t),t=t.next;while(t!==i)}e.action=null}function Im(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Hm(e,t){return t}function Gm(e,t){if(qe){var s=lt.formState;if(s!==null){e:{var i=Re;if(qe){if(ct){t:{for(var c=ct,f=Un;c.nodeType!==8;){if(!f){c=null;break t}if(c=Vn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){ct=Vn(c.nextSibling),i=c.data==="F!";break e}}Ha(i)}i=!1}i&&(t=s[0])}}return s=on(),s.memoizedState=s.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hm,lastRenderedState:t},s.queue=i,s=op.bind(null,Re,i),i.dispatch=s,i=gu(!1),f=Tu.bind(null,Re,!1,i.queue),i=on(),c={state:t,dispatch:null,action:e,pending:null},i.queue=c,s=BS.bind(null,Re,c,f,s),c.dispatch=s,i.memoizedState=e,[t,s,!1]}function Pm(e){var t=wt();return qm(t,at,e)}function qm(e,t,s){if(t=mu(e,t,Hm)[0],e=Zo(Sa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=bl(t)}catch(v){throw v===fi?Vo:v}else i=t;t=wt();var c=t.queue,f=c.dispatch;return s!==t.memoizedState&&(Re.flags|=2048,vi(9,{destroy:void 0},LS.bind(null,c,s),null)),[i,f,e]}function LS(e,t){e.action=t}function Ym(e){var t=wt(),s=at;if(s!==null)return qm(t,s,e);wt(),t=t.memoizedState,s=wt();var i=s.queue.dispatch;return s.memoizedState=e,[t,i,!1]}function vi(e,t,s,i){return e={tag:e,create:s,deps:i,inst:t,next:null},t=Re.updateQueue,t===null&&(t=Ko(),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 Fm(){return wt().memoizedState}function Xo(e,t,s,i){var c=on();Re.flags|=e,c.memoizedState=vi(1|t,{destroy:void 0},s,i===void 0?null:i)}function Qo(e,t,s,i){var c=wt();i=i===void 0?null:i;var f=c.memoizedState.inst;at!==null&&i!==null&&ru(i,at.memoizedState.deps)?c.memoizedState=vi(t,f,s,i):(Re.flags|=e,c.memoizedState=vi(1|t,f,s,i))}function Km(e,t){Xo(8390656,8,e,t)}function yu(e,t){Qo(2048,8,e,t)}function US(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=Ko(),Re.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function $m(e){var t=wt().memoizedState;return US({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Zm(e,t){return Qo(4,2,e,t)}function Xm(e,t){return Qo(4,4,e,t)}function Qm(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 Jm(e,t,s){s=s!=null?s.concat([e]):null,Qo(4,4,Qm.bind(null,t,e),s)}function bu(){}function Wm(e,t){var s=wt();t=t===void 0?null:t;var i=s.memoizedState;return t!==null&&ru(t,i[1])?i[0]:(s.memoizedState=[e,t],e)}function ep(e,t){var s=wt();t=t===void 0?null:t;var i=s.memoizedState;if(t!==null&&ru(t,i[1]))return i[0];if(i=e(),ws){ln(!0);try{e()}finally{ln(!1)}}return s.memoizedState=[i,t],i}function Su(e,t,s){return s===void 0||(ba&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=tg(),Re.lanes|=e,Xa|=e,s)}function tp(e,t,s,i){return Sn(s,t)?s:mi.current!==null?(e=Su(e,s,i),Sn(e,t)||(Ut=!0),e):(ba&42)===0||(ba&1073741824)!==0&&(Ge&261930)===0?(Ut=!0,e.memoizedState=s):(e=tg(),Re.lanes|=e,Xa|=e,t)}function np(e,t,s,i,c){var f=$.p;$.p=f!==0&&8>f?f:8;var v=U.T,x={};U.T=x,Tu(e,!1,t,s);try{var E=c(),O=U.S;if(O!==null&&O(x,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var P=RS(E,i);Sl(e,t,P,Cn(e))}else Sl(e,t,i,Cn(e))}catch(Z){Sl(e,t,{then:function(){},status:"rejected",reason:Z},Cn())}finally{$.p=f,v!==null&&x.types!==null&&(v.types=x.types),U.T=v}}function zS(){}function xu(e,t,s,i){if(e.tag!==5)throw Error(o(476));var c=ap(e).queue;np(e,c,t,te,s===null?zS:function(){return sp(e),s(i)})}function ap(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:te},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function sp(e){var t=ap(e);t.next===null&&(t=e.alternate.memoizedState),Sl(e,t.next.queue,{},Cn())}function _u(){return $t(Ul)}function ip(){return wt().memoizedState}function lp(){return wt().memoizedState}function VS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=Cn();e=qa(s);var i=Ya(t,e,s);i!==null&&(vn(i,t,s),pl(i,t,s)),t={cache:Qc()},e.payload=t;return}t=t.return}}function IS(e,t,s){var i=Cn();s={lane:i,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Jo(e)?rp(t,s):(s=Ic(e,t,s,i),s!==null&&(vn(s,e,i),cp(s,t,i)))}function op(e,t,s){var i=Cn();Sl(e,t,s,i)}function Sl(e,t,s,i){var c={lane:i,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Jo(e))rp(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,x=f(v,s);if(c.hasEagerState=!0,c.eagerState=x,Sn(x,v))return Ro(e,t,c,0),lt===null&&ko(),!1}catch{}finally{}if(s=Ic(e,t,c,i),s!==null)return vn(s,e,i),cp(s,t,i),!0}return!1}function Tu(e,t,s,i){if(i={lane:2,revertLane:td(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Jo(e)){if(t)throw Error(o(479))}else t=Ic(e,s,i,2),t!==null&&vn(t,e,2)}function Jo(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function rp(e,t){pi=Yo=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function cp(e,t,s){if((s&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,s|=i,t.lanes=s,Xi(e,s)}}var xl={readContext:$t,use:$o,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useLayoutEffect:Tt,useInsertionEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useSyncExternalStore:Tt,useId:Tt,useHostTransitionStatus:Tt,useFormState:Tt,useActionState:Tt,useOptimistic:Tt,useMemoCache:Tt,useCacheRefresh:Tt};xl.useEffectEvent=Tt;var up={readContext:$t,use:$o,useCallback:function(e,t){return on().memoizedState=[e,t===void 0?null:t],e},useContext:$t,useEffect:Km,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Xo(4194308,4,Qm.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Xo(4194308,4,e,t)},useInsertionEffect:function(e,t){Xo(4,2,e,t)},useMemo:function(e,t){var s=on();t=t===void 0?null:t;var i=e();if(ws){ln(!0);try{e()}finally{ln(!1)}}return s.memoizedState=[i,t],i},useReducer:function(e,t,s){var i=on();if(s!==void 0){var c=s(t);if(ws){ln(!0);try{s(t)}finally{ln(!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=IS.bind(null,Re,e),[i.memoizedState,e]},useRef:function(e){var t=on();return e={current:e},t.memoizedState=e},useState:function(e){e=gu(e);var t=e.queue,s=op.bind(null,Re,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:bu,useDeferredValue:function(e,t){var s=on();return Su(s,e,t)},useTransition:function(){var e=gu(!1);return e=np.bind(null,Re,e.queue,!0,!1),on().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var i=Re,c=on();if(qe){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),lt===null)throw Error(o(349));(Ge&127)!==0||km(i,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,Km(Mm.bind(null,i,f,e),[e]),i.flags|=2048,vi(9,{destroy:void 0},Rm.bind(null,i,f,s,t),null),s},useId:function(){var e=on(),t=lt.identifierPrefix;if(qe){var s=ta,i=ea;s=(i&~(1<<32-vt(i)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Fo++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=MS++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:_u,useFormState:Gm,useActionState:Gm,useOptimistic:function(e){var t=on();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=Tu.bind(null,Re,!0,s),s.dispatch=t,[e,t]},useMemoCache:hu,useCacheRefresh:function(){return on().memoizedState=VS.bind(null,Re)},useEffectEvent:function(e){var t=on(),s={impl:e};return t.memoizedState=s,function(){if((Xe&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},Eu={readContext:$t,use:$o,useCallback:Wm,useContext:$t,useEffect:yu,useImperativeHandle:Jm,useInsertionEffect:Zm,useLayoutEffect:Xm,useMemo:ep,useReducer:Zo,useRef:Fm,useState:function(){return Zo(Sa)},useDebugValue:bu,useDeferredValue:function(e,t){var s=wt();return tp(s,at.memoizedState,e,t)},useTransition:function(){var e=Zo(Sa)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:bl(e),t]},useSyncExternalStore:Dm,useId:ip,useHostTransitionStatus:_u,useFormState:Pm,useActionState:Pm,useOptimistic:function(e,t){var s=wt();return Lm(s,at,e,t)},useMemoCache:hu,useCacheRefresh:lp};Eu.useEffectEvent=$m;var dp={readContext:$t,use:$o,useCallback:Wm,useContext:$t,useEffect:yu,useImperativeHandle:Jm,useInsertionEffect:Zm,useLayoutEffect:Xm,useMemo:ep,useReducer:pu,useRef:Fm,useState:function(){return pu(Sa)},useDebugValue:bu,useDeferredValue:function(e,t){var s=wt();return at===null?Su(s,e,t):tp(s,at.memoizedState,e,t)},useTransition:function(){var e=pu(Sa)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:bl(e),t]},useSyncExternalStore:Dm,useId:ip,useHostTransitionStatus:_u,useFormState:Ym,useActionState:Ym,useOptimistic:function(e,t){var s=wt();return at!==null?Lm(s,at,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:hu,useCacheRefresh:lp};dp.useEffectEvent=$m;function Au(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 Cu={enqueueSetState:function(e,t,s){e=e._reactInternals;var i=Cn(),c=qa(i);c.payload=t,s!=null&&(c.callback=s),t=Ya(e,c,i),t!==null&&(vn(t,e,i),pl(t,e,i))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var i=Cn(),c=qa(i);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=Ya(e,c,i),t!==null&&(vn(t,e,i),pl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=Cn(),i=qa(s);i.tag=2,t!=null&&(i.callback=t),t=Ya(e,i,s),t!==null&&(vn(t,e,s),pl(t,e,s))}};function fp(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?!ol(s,i)||!ol(c,f):!0}function hp(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&&Cu.enqueueReplaceState(t,t.state,null)}function Ds(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 mp(e){Do(e)}function pp(e){console.error(e)}function gp(e){Do(e)}function Wo(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function vp(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 ju(e,t,s){return s=qa(s),s.tag=3,s.payload={element:null},s.callback=function(){Wo(e,t)},s}function yp(e){return e=qa(e),e.tag=3,e}function bp(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(){vp(t,s,i)}}var v=s.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){vp(t,s,i),typeof c!="function"&&(Qa===null?Qa=new Set([this]):Qa.add(this));var x=i.stack;this.componentDidCatch(i.value,{componentStack:x!==null?x:""})})}function HS(e,t,s,i,c){if(s.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=s.alternate,t!==null&&ci(t,s,c,!0),s=_n.current,s!==null){switch(s.tag){case 31:case 13:return zn===null?dr():s.alternate===null&&Et===0&&(Et=3),s.flags&=-257,s.flags|=65536,s.lanes=c,i===Io?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([i]):t.add(i),Ju(e,i,c)),!1;case 22:return s.flags|=65536,i===Io?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)),Ju(e,i,c)),!1}throw Error(o(435,s.tag))}return Ju(e,i,c),dr(),!1}if(qe)return t=_n.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,i!==Fc&&(e=Error(o(422),{cause:i}),ul(On(e,s)))):(i!==Fc&&(t=Error(o(423),{cause:i}),ul(On(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,i=On(i,s),c=ju(e.stateNode,i,c),au(e,c),Et!==4&&(Et=2)),!1;var f=Error(o(520),{cause:i});if(f=On(f,s),wl===null?wl=[f]:wl.push(f),Et!==4&&(Et=2),t===null)return!0;i=On(i,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=ju(s.stateNode,i,e),au(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"&&(Qa===null||!Qa.has(f))))return s.flags|=65536,c&=-c,s.lanes|=c,c=yp(c),bp(c,e,s,i),au(s,c),!1}s=s.return}while(s!==null);return!1}var Nu=Error(o(461)),Ut=!1;function Zt(e,t,s,i){t.child=e===null?Tm(t,null,s,i):Ns(t,e.child,s,i)}function Sp(e,t,s,i,c){s=s.render;var f=t.ref;if("ref"in i){var v={};for(var x in i)x!=="ref"&&(v[x]=i[x])}else v=i;return Es(t),i=cu(e,t,s,v,f,c),x=uu(),e!==null&&!Ut?(du(e,t,c),xa(e,t,c)):(qe&&x&&qc(t),t.flags|=1,Zt(e,t,i,c),t.child)}function xp(e,t,s,i,c){if(e===null){var f=s.type;return typeof f=="function"&&!Hc(f)&&f.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=f,_p(e,t,f,i,c)):(e=Oo(s.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Lu(e,c)){var v=f.memoizedProps;if(s=s.compare,s=s!==null?s:ol,s(v,i)&&e.ref===t.ref)return xa(e,t,c)}return t.flags|=1,e=pa(f,i),e.ref=t.ref,e.return=t,t.child=e}function _p(e,t,s,i,c){if(e!==null){var f=e.memoizedProps;if(ol(f,i)&&e.ref===t.ref)if(Ut=!1,t.pendingProps=i=f,Lu(e,c))(e.flags&131072)!==0&&(Ut=!0);else return t.lanes=e.lanes,xa(e,t,c)}return wu(e,t,s,i,c)}function Tp(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 Ep(e,t,f,s,i)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&zo(t,f!==null?f.cachePool:null),f!==null?Cm(t,f):iu(),jm(t);else return i=t.lanes=536870912,Ep(e,t,f!==null?f.baseLanes|s:s,s,i)}else f!==null?(zo(t,f.cachePool),Cm(t,f),Ka(),t.memoizedState=null):(e!==null&&zo(t,null),iu(),Ka());return Zt(e,t,c,s),t.child}function _l(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ep(e,t,s,i,c){var f=Wc();return f=f===null?null:{parent:Bt._currentValue,pool:f},t.memoizedState={baseLanes:s,cachePool:f},e!==null&&zo(t,null),iu(),jm(t),e!==null&&ci(e,t,i,!0),t.childLanes=c,null}function er(e,t){return t=nr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ap(e,t,s){return Ns(t,e.child,null,s),e=er(t,t.pendingProps),e.flags|=2,Tn(t),t.memoizedState=null,e}function GS(e,t,s){var i=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(qe){if(i.mode==="hidden")return e=er(t,i),t.lanes=536870912,_l(null,e);if(ou(t),(e=ct)?(e=Ug(e,Un),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Va!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},s=rm(e),s.return=t,t.child=s,Kt=t,ct=null)):e=null,e===null)throw Ha(t);return t.lanes=536870912,null}return er(t,i)}var f=e.memoizedState;if(f!==null){var v=f.dehydrated;if(ou(t),c)if(t.flags&256)t.flags&=-257,t=Ap(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ut||ci(e,t,s,!1),c=(s&e.childLanes)!==0,Ut||c){if(i=lt,i!==null&&(v=Qi(i,s),v!==0&&v!==f.retryLane))throw f.retryLane=v,Ss(e,v),vn(i,e,v),Nu;dr(),t=Ap(e,t,s)}else e=f.treeContext,ct=Vn(v.nextSibling),Kt=t,qe=!0,Ia=null,Un=!1,e!==null&&dm(t,e),t=er(t,i),t.flags|=4096;return t}return e=pa(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function tr(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 wu(e,t,s,i,c){return Es(t),s=cu(e,t,s,i,void 0,c),i=uu(),e!==null&&!Ut?(du(e,t,c),xa(e,t,c)):(qe&&i&&qc(t),t.flags|=1,Zt(e,t,s,c),t.child)}function Cp(e,t,s,i,c,f){return Es(t),t.updateQueue=null,s=wm(t,i,s,c),Nm(e),i=uu(),e!==null&&!Ut?(du(e,t,f),xa(e,t,f)):(qe&&i&&qc(t),t.flags|=1,Zt(e,t,s,f),t.child)}function jp(e,t,s,i,c){if(Es(t),t.stateNode===null){var f=ii,v=s.contextType;typeof v=="object"&&v!==null&&(f=$t(v)),f=new s(i,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Cu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=i,f.state=t.memoizedState,f.refs={},tu(t),v=s.contextType,f.context=typeof v=="object"&&v!==null?$t(v):ii,f.state=t.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(Au(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&&Cu.enqueueReplaceState(f,f.state,null),vl(t,i,f,c),gl(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){f=t.stateNode;var x=t.memoizedProps,E=Ds(s,x);f.props=E;var O=f.context,P=s.contextType;v=ii,typeof P=="object"&&P!==null&&(v=$t(P));var Z=s.getDerivedStateFromProps;P=typeof Z=="function"||typeof f.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,P||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x||O!==v)&&hp(t,f,i,v),Pa=!1;var L=t.memoizedState;f.state=L,vl(t,i,f,c),gl(),O=t.memoizedState,x||L!==O||Pa?(typeof Z=="function"&&(Au(t,s,Z,i),O=t.memoizedState),(E=Pa||fp(t,s,E,i,L,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,nu(e,t),v=t.memoizedProps,P=Ds(s,v),f.props=P,Z=t.pendingProps,L=f.context,O=s.contextType,E=ii,typeof O=="object"&&O!==null&&(E=$t(O)),x=s.getDerivedStateFromProps,(O=typeof x=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v!==Z||L!==E)&&hp(t,f,i,E),Pa=!1,L=t.memoizedState,f.state=L,vl(t,i,f,c),gl();var V=t.memoizedState;v!==Z||L!==V||Pa||e!==null&&e.dependencies!==null&&Lo(e.dependencies)?(typeof x=="function"&&(Au(t,s,x,i),V=t.memoizedState),(P=Pa||fp(t,s,P,i,L,V,E)||e!==null&&e.dependencies!==null&&Lo(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&&L===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&L===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&&L===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),i=!1)}return f=i,tr(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=Ns(t,e.child,null,c),t.child=Ns(t,null,s,c)):Zt(e,t,s,c),t.memoizedState=f.state,e=t.child):e=xa(e,t,c),e}function Np(e,t,s,i){return _s(),t.flags|=256,Zt(e,t,s,i),t.child}var Du={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ku(e){return{baseLanes:e,cachePool:vm()}}function Ru(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=An),e}function wp(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:(Nt.current&2)!==0),v&&(c=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(qe){if(c?Fa(t):Ka(),(e=ct)?(e=Ug(e,Un),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Va!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},s=rm(e),s.return=t,t.child=s,Kt=t,ct=null)):e=null,e===null)throw Ha(t);return md(e)?t.lanes=32:t.lanes=536870912,null}var x=i.children;return i=i.fallback,c?(Ka(),c=t.mode,x=nr({mode:"hidden",children:x},c),i=xs(i,c,s,null),x.return=t,i.return=t,x.sibling=i,t.child=x,i=t.child,i.memoizedState=ku(s),i.childLanes=Ru(e,v,s),t.memoizedState=Du,_l(null,i)):(Fa(t),Mu(t,x))}var E=e.memoizedState;if(E!==null&&(x=E.dehydrated,x!==null)){if(f)t.flags&256?(Fa(t),t.flags&=-257,t=Ou(e,t,s)):t.memoizedState!==null?(Ka(),t.child=e.child,t.flags|=128,t=null):(Ka(),x=i.fallback,c=t.mode,i=nr({mode:"visible",children:i.children},c),x=xs(x,c,s,null),x.flags|=2,i.return=t,x.return=t,i.sibling=x,t.child=i,Ns(t,e.child,null,s),i=t.child,i.memoizedState=ku(s),i.childLanes=Ru(e,v,s),t.memoizedState=Du,t=_l(null,i));else if(Fa(t),md(x)){if(v=x.nextSibling&&x.nextSibling.dataset,v)var O=v.dgst;v=O,i=Error(o(419)),i.stack="",i.digest=v,ul({value:i,source:null,stack:null}),t=Ou(e,t,s)}else if(Ut||ci(e,t,s,!1),v=(s&e.childLanes)!==0,Ut||v){if(v=lt,v!==null&&(i=Qi(v,s),i!==0&&i!==E.retryLane))throw E.retryLane=i,Ss(e,i),vn(v,e,i),Nu;hd(x)||dr(),t=Ou(e,t,s)}else hd(x)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,ct=Vn(x.nextSibling),Kt=t,qe=!0,Ia=null,Un=!1,e!==null&&dm(t,e),t=Mu(t,i.children),t.flags|=4096);return t}return c?(Ka(),x=i.fallback,c=t.mode,E=e.child,O=E.sibling,i=pa(E,{mode:"hidden",children:i.children}),i.subtreeFlags=E.subtreeFlags&65011712,O!==null?x=pa(O,x):(x=xs(x,c,s,null),x.flags|=2),x.return=t,i.return=t,i.sibling=x,t.child=i,_l(null,i),i=t.child,x=e.child.memoizedState,x===null?x=ku(s):(c=x.cachePool,c!==null?(E=Bt._currentValue,c=c.parent!==E?{parent:E,pool:E}:c):c=vm(),x={baseLanes:x.baseLanes|s,cachePool:c}),i.memoizedState=x,i.childLanes=Ru(e,v,s),t.memoizedState=Du,_l(e.child,i)):(Fa(t),s=e.child,e=s.sibling,s=pa(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 Mu(e,t){return t=nr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function nr(e,t){return e=xn(22,e,null,t),e.lanes=0,e}function Ou(e,t,s){return Ns(t,e.child,null,s),e=Mu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dp(e,t,s){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Zc(e.return,t,s)}function Bu(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 kp(e,t,s){var i=t.pendingProps,c=i.revealOrder,f=i.tail;i=i.children;var v=Nt.current,x=(v&2)!==0;if(x?(v=v&1|2,t.flags|=128):v&=1,Se(Nt,v),Zt(e,t,i,s),i=qe?cl:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dp(e,s,t);else if(e.tag===19)Dp(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&&qo(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),Bu(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&&qo(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}Bu(t,!0,s,null,f,i);break;case"together":Bu(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function xa(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Xa|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(ci(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=pa(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=pa(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Lu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Lo(e)))}function PS(e,t,s){switch(t.tag){case 3:H(t,t.stateNode.containerInfo),Ga(t,Bt,e.memoizedState.cache),_s();break;case 27:case 5:gt(t);break;case 4:H(t,t.stateNode.containerInfo);break;case 10:Ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ou(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Fa(t),t.flags|=128,null):(s&t.child.childLanes)!==0?wp(e,t,s):(Fa(t),e=xa(e,t,s),e!==null?e.sibling:null);Fa(t);break;case 19:var c=(e.flags&128)!==0;if(i=(s&t.childLanes)!==0,i||(ci(e,t,s,!1),i=(s&t.childLanes)!==0),c){if(i)return kp(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Se(Nt,Nt.current),i)break;return null;case 22:return t.lanes=0,Tp(e,t,s,t.pendingProps);case 24:Ga(t,Bt,e.memoizedState.cache)}return xa(e,t,s)}function Rp(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ut=!0;else{if(!Lu(e,s)&&(t.flags&128)===0)return Ut=!1,PS(e,t,s);Ut=(e.flags&131072)!==0}else Ut=!1,qe&&(t.flags&1048576)!==0&&um(t,cl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Cs(t.elementType),t.type=e,typeof e=="function")Hc(e)?(i=Ds(e,i),t.tag=1,t=jp(null,t,e,i,s)):(t.tag=0,t=wu(null,t,e,i,s));else{if(e!=null){var c=e.$$typeof;if(c===Q){t.tag=11,t=Sp(null,t,e,i,s);break e}else if(c===ee){t.tag=14,t=xp(null,t,e,i,s);break e}}throw t=_e(e)||e,Error(o(306,t,""))}}return t;case 0:return wu(e,t,t.type,t.pendingProps,s);case 1:return i=t.type,c=Ds(i,t.pendingProps),jp(e,t,i,c,s);case 3:e:{if(H(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var f=t.memoizedState;c=f.element,nu(e,t),vl(t,i,null,s);var v=t.memoizedState;if(i=v.cache,Ga(t,Bt,i),i!==f.cache&&Xc(t,[Bt],s,!0),gl(),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=Np(e,t,i,s);break e}else if(i!==c){c=On(Error(o(424)),t),ul(c),t=Np(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=Vn(e.firstChild),Kt=t,qe=!0,Ia=null,Un=!0,s=Tm(t,null,i,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(_s(),i===c){t=xa(e,t,s);break e}Zt(e,t,i,s)}t=t.child}return t;case 26:return tr(e,t),e===null?(s=Pg(t.type,null,t.pendingProps,null))?t.memoizedState=s:qe||(s=t.type,e=t.pendingProps,i=yr(Y.current).createElement(s),i[Ot]=t,i[Ft]=e,Xt(i,s,e),He(i),t.stateNode=i):t.memoizedState=Pg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return gt(t),e===null&&qe&&(i=t.stateNode=Ig(t.type,t.pendingProps,Y.current),Kt=t,Un=!0,c=ct,ts(t.type)?(pd=c,ct=Vn(i.firstChild)):ct=c),Zt(e,t,t.pendingProps.children,s),tr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&qe&&((c=i=ct)&&(i=bx(i,t.type,t.pendingProps,Un),i!==null?(t.stateNode=i,Kt=t,ct=Vn(i.firstChild),Un=!1,c=!0):c=!1),c||Ha(t)),gt(t),c=t.type,f=t.pendingProps,v=e!==null?e.memoizedProps:null,i=f.children,ud(c,f)?i=null:v!==null&&ud(c,v)&&(t.flags|=32),t.memoizedState!==null&&(c=cu(e,t,OS,null,null,s),Ul._currentValue=c),tr(e,t),Zt(e,t,i,s),t.child;case 6:return e===null&&qe&&((e=s=ct)&&(s=Sx(s,t.pendingProps,Un),s!==null?(t.stateNode=s,Kt=t,ct=null,e=!0):e=!1),e||Ha(t)),null;case 13:return wp(e,t,s);case 4:return H(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ns(t,null,i,s):Zt(e,t,i,s),t.child;case 11:return Sp(e,t,t.type,t.pendingProps,s);case 7:return Zt(e,t,t.pendingProps,s),t.child;case 8:return Zt(e,t,t.pendingProps.children,s),t.child;case 12:return Zt(e,t,t.pendingProps.children,s),t.child;case 10:return i=t.pendingProps,Ga(t,t.type,i.value),Zt(e,t,i.children,s),t.child;case 9:return c=t.type._context,i=t.pendingProps.children,Es(t),c=$t(c),i=i(c),t.flags|=1,Zt(e,t,i,s),t.child;case 14:return xp(e,t,t.type,t.pendingProps,s);case 15:return _p(e,t,t.type,t.pendingProps,s);case 19:return kp(e,t,s);case 31:return GS(e,t,s);case 22:return Tp(e,t,s,t.pendingProps);case 24:return Es(t),i=$t(Bt),e===null?(c=Wc(),c===null&&(c=lt,f=Qc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=s),c=f),t.memoizedState={parent:i,cache:c},tu(t),Ga(t,Bt,c)):((e.lanes&s)!==0&&(nu(e,t),vl(t,null,null,s),gl()),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),Ga(t,Bt,i)):(i=f.cache,Ga(t,Bt,i),i!==c.cache&&Xc(t,[Bt],s,!0))),Zt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function _a(e){e.flags|=4}function Uu(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(ig())e.flags|=8192;else throw js=Io,eu}else e.flags&=-16777217}function Mp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!$g(t))if(ig())e.flags|=8192;else throw js=Io,eu}function ar(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?dn():536870912,e.lanes|=t,xi|=t)}function Tl(e,t){if(!qe)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 qS(e,t,s){var i=t.pendingProps;switch(Yc(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),ya(Bt),Fe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ri(t)?_a(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Kc())),ut(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(_a(t),f!==null?(ut(t),Mp(t,f)):(ut(t),Uu(t,c,null,i,s))):f?f!==e.memoizedState?(_a(t),ut(t),Mp(t,f)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&_a(t),ut(t),Uu(t,c,e,i,s)),null;case 27:if(St(t),s=Y.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&_a(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return ut(t),null}e=je.current,ri(t)?fm(t):(e=Ig(c,i,s),t.stateNode=e,_a(t))}return ut(t),null;case 5:if(St(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&_a(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return ut(t),null}if(f=je.current,ri(t))fm(t);else{var v=yr(Y.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[Ot]=t,f[Ft]=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(Xt(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&&_a(t)}}return ut(t),Uu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&_a(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=Y.current,ri(t)){if(e=t.stateNode,s=t.memoizedProps,i=null,c=Kt,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===s||i!==null&&i.suppressHydrationWarning===!0||wg(e.nodeValue,s)),e||Ha(t,!0)}else e=yr(e).createTextNode(i),e[Ot]=t,t.stateNode=e}return ut(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(i=ri(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[Ot]=t}else _s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else s=Kc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(Tn(t),t):(Tn(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=ri(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[Ot]=t}else _s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),c=!1}else c=Kc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Tn(t),t):(Tn(t),null)}return Tn(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),ar(t,t.updateQueue),ut(t),null);case 4:return Fe(),e===null&&id(t.stateNode.containerInfo),ut(t),null;case 10:return ya(t.type),ut(t),null;case 19:if(ke(Nt),i=t.memoizedState,i===null)return ut(t),null;if(c=(t.flags&128)!==0,f=i.rendering,f===null)if(c)Tl(i,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=qo(e),f!==null){for(t.flags|=128,Tl(i,!1),e=f.updateQueue,t.updateQueue=e,ar(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)om(s,e),s=s.sibling;return Se(Nt,Nt.current&1|2),qe&&ga(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&ue()>rr&&(t.flags|=128,c=!0,Tl(i,!1),t.lanes=4194304)}else{if(!c)if(e=qo(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,ar(t,e),Tl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!f.alternate&&!qe)return ut(t),null}else 2*ue()-i.renderingStartTime>rr&&s!==536870912&&(t.flags|=128,c=!0,Tl(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=ue(),e.sibling=null,s=Nt.current,Se(Nt,c?s&1|2:s&1),qe&&ga(t,i.treeForkCount),e):(ut(t),null);case 22:case 23:return Tn(t),lu(),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&&ar(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&&ke(As),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ya(Bt),ut(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function YS(e,t){switch(Yc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ya(Bt),Fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return St(t),null;case 31:if(t.memoizedState!==null){if(Tn(t),t.alternate===null)throw Error(o(340));_s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Tn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));_s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ke(Nt),null;case 4:return Fe(),null;case 10:return ya(t.type),null;case 22:case 23:return Tn(t),lu(),e!==null&&ke(As),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(Bt),null;case 25:return null;default:return null}}function Op(e,t){switch(Yc(t),t.tag){case 3:ya(Bt),Fe();break;case 26:case 27:case 5:St(t);break;case 4:Fe();break;case 31:t.memoizedState!==null&&Tn(t);break;case 13:Tn(t);break;case 19:ke(Nt);break;case 10:ya(t.type);break;case 22:case 23:Tn(t),lu(),e!==null&&ke(As);break;case 24:ya(Bt)}}function El(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(x){tt(t,t.return,x)}}function $a(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,x=v.destroy;if(x!==void 0){v.destroy=void 0,c=t;var E=s,O=x;try{O()}catch(P){tt(c,E,P)}}}i=i.next}while(i!==f)}}catch(P){tt(t,t.return,P)}}function Bp(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{Am(t,s)}catch(i){tt(e,e.return,i)}}}function Lp(e,t,s){s.props=Ds(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(i){tt(e,t,i)}}function Al(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){tt(e,t,c)}}function na(e,t){var s=e.ref,i=e.refCleanup;if(s!==null)if(typeof i=="function")try{i()}catch(c){tt(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){tt(e,t,c)}else s.current=null}function Up(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){tt(e,e.return,c)}}function zu(e,t,s){try{var i=e.stateNode;hx(i,e.type,s,t),i[Ft]=t}catch(c){tt(e,e.return,c)}}function zp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ts(e.type)||e.tag===4}function Vu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zp(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&&ts(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 Iu(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=ha));else if(i!==4&&(i===27&&ts(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Iu(e,t,s),e=e.sibling;e!==null;)Iu(e,t,s),e=e.sibling}function sr(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&&ts(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(sr(e,t,s),e=e.sibling;e!==null;)sr(e,t,s),e=e.sibling}function Vp(e){var t=e.stateNode,s=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Xt(t,i,s),t[Ot]=e,t[Ft]=s}catch(f){tt(e,e.return,f)}}var Ta=!1,zt=!1,Hu=!1,Ip=typeof WeakSet=="function"?WeakSet:Set,Yt=null;function FS(e,t){if(e=e.containerInfo,rd=Ar,e=Jh(e),Oc(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,x=-1,E=-1,O=0,P=0,Z=e,L=null;t:for(;;){for(var V;Z!==s||c!==0&&Z.nodeType!==3||(x=v+c),Z!==f||i!==0&&Z.nodeType!==3||(E=v+i),Z.nodeType===3&&(v+=Z.nodeValue.length),(V=Z.firstChild)!==null;)L=Z,Z=V;for(;;){if(Z===e)break t;if(L===s&&++O===c&&(x=v),L===f&&++P===i&&(E=v),(V=Z.nextSibling)!==null)break;Z=L,L=Z.parentNode}Z=V}s=x===-1||E===-1?null:{start:x,end:E}}else s=null}s=s||{start:0,end:0}}else s=null;for(cd={focusedElem:e,selectionRange:s},Ar=!1,Yt=t;Yt!==null;)if(t=Yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Yt=e;else for(;Yt!==null;){switch(t=Yt,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 ce=Ds(s.type,c);e=i.getSnapshotBeforeUpdate(ce,f),i.__reactInternalSnapshotBeforeUpdate=e}catch(be){tt(s,s.return,be)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)fd(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":fd(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,Yt=e;break}Yt=t.return}}function Hp(e,t,s){var i=s.flags;switch(s.tag){case 0:case 11:case 15:Aa(e,s),i&4&&El(5,s);break;case 1:if(Aa(e,s),i&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(v){tt(s,s.return,v)}else{var c=Ds(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){tt(s,s.return,v)}}i&64&&Bp(s),i&512&&Al(s,s.return);break;case 3:if(Aa(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{Am(e,t)}catch(v){tt(s,s.return,v)}}break;case 27:t===null&&i&4&&Vp(s);case 26:case 5:Aa(e,s),t===null&&i&4&&Up(s),i&512&&Al(s,s.return);break;case 12:Aa(e,s);break;case 31:Aa(e,s),i&4&&qp(e,s);break;case 13:Aa(e,s),i&4&&Yp(e,s),i&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=tx.bind(null,s),xx(e,s))));break;case 22:if(i=s.memoizedState!==null||Ta,!i){t=t!==null&&t.memoizedState!==null||zt,c=Ta;var f=zt;Ta=i,(zt=t)&&!f?Ca(e,s,(s.subtreeFlags&8772)!==0):Aa(e,s),Ta=c,zt=f}break;case 30:break;default:Aa(e,s)}}function Gp(e){var t=e.alternate;t!==null&&(e.alternate=null,Gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Le(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 mt=null,hn=!1;function Ea(e,t,s){for(s=s.child;s!==null;)Pp(e,t,s),s=s.sibling}function Pp(e,t,s){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(rt,s)}catch{}switch(s.tag){case 26:zt||na(s,t),Ea(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:zt||na(s,t);var i=mt,c=hn;ts(s.type)&&(mt=s.stateNode,hn=!1),Ea(e,t,s),Ol(s.stateNode),mt=i,hn=c;break;case 5:zt||na(s,t);case 6:if(i=mt,c=hn,mt=null,Ea(e,t,s),mt=i,hn=c,mt!==null)if(hn)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(s.stateNode)}catch(f){tt(s,t,f)}else try{mt.removeChild(s.stateNode)}catch(f){tt(s,t,f)}break;case 18:mt!==null&&(hn?(e=mt,Bg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),wi(e)):Bg(mt,s.stateNode));break;case 4:i=mt,c=hn,mt=s.stateNode.containerInfo,hn=!0,Ea(e,t,s),mt=i,hn=c;break;case 0:case 11:case 14:case 15:$a(2,s,t),zt||$a(4,s,t),Ea(e,t,s);break;case 1:zt||(na(s,t),i=s.stateNode,typeof i.componentWillUnmount=="function"&&Lp(s,t,i)),Ea(e,t,s);break;case 21:Ea(e,t,s);break;case 22:zt=(i=zt)||s.memoizedState!==null,Ea(e,t,s),zt=i;break;default:Ea(e,t,s)}}function qp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wi(e)}catch(s){tt(t,t.return,s)}}}function Yp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wi(e)}catch(s){tt(t,t.return,s)}}function KS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ip),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ip),t;default:throw Error(o(435,e.tag))}}function ir(e,t){var s=KS(e);t.forEach(function(i){if(!s.has(i)){s.add(i);var c=nx.bind(null,e,i);i.then(c,c)}})}function mn(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,x=v;e:for(;x!==null;){switch(x.tag){case 27:if(ts(x.type)){mt=x.stateNode,hn=!1;break e}break;case 5:mt=x.stateNode,hn=!1;break e;case 3:case 4:mt=x.stateNode.containerInfo,hn=!0;break e}x=x.return}if(mt===null)throw Error(o(160));Pp(f,v,c),mt=null,hn=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Fp(t,e),t=t.sibling}var Xn=null;function Fp(e,t){var s=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:mn(t,e),pn(e),i&4&&($a(3,e,e.return),El(3,e),$a(5,e,e.return));break;case 1:mn(t,e),pn(e),i&512&&(zt||s===null||na(s,s.return)),i&64&&Ta&&(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=Xn;if(mn(t,e),pn(e),i&512&&(zt||s===null||na(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[ze]||f[Ot]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(i),c.head.insertBefore(f,c.querySelector("head > title"))),Xt(f,i,s),f[Ot]=e,He(f),i=f;break e;case"link":var v=Fg("link","href",c).get(i+(s.href||""));if(v){for(var x=0;x<v.length;x++)if(f=v[x],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(x,1);break t}}f=c.createElement(i),Xt(f,i,s),c.head.appendChild(f);break;case"meta":if(v=Fg("meta","content",c).get(i+(s.content||""))){for(x=0;x<v.length;x++)if(f=v[x],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(x,1);break t}}f=c.createElement(i),Xt(f,i,s),c.head.appendChild(f);break;default:throw Error(o(468,i))}f[Ot]=e,He(f),i=f}e.stateNode=i}else Kg(c,e.type,e.stateNode);else e.stateNode=Yg(c,i,e.memoizedProps);else f!==i?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,i===null?Kg(c,e.type,e.stateNode):Yg(c,i,e.memoizedProps)):i===null&&e.stateNode!==null&&zu(e,e.memoizedProps,s.memoizedProps)}break;case 27:mn(t,e),pn(e),i&512&&(zt||s===null||na(s,s.return)),s!==null&&i&4&&zu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(mn(t,e),pn(e),i&512&&(zt||s===null||na(s,s.return)),e.flags&32){c=e.stateNode;try{Js(c,"")}catch(ce){tt(e,e.return,ce)}}i&4&&e.stateNode!=null&&(c=e.memoizedProps,zu(e,c,s!==null?s.memoizedProps:c)),i&1024&&(Hu=!0);break;case 6:if(mn(t,e),pn(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,s=e.stateNode;try{s.nodeValue=i}catch(ce){tt(e,e.return,ce)}}break;case 3:if(xr=null,c=Xn,Xn=br(t.containerInfo),mn(t,e),Xn=c,pn(e),i&4&&s!==null&&s.memoizedState.isDehydrated)try{wi(t.containerInfo)}catch(ce){tt(e,e.return,ce)}Hu&&(Hu=!1,Kp(e));break;case 4:i=Xn,Xn=br(e.stateNode.containerInfo),mn(t,e),pn(e),Xn=i;break;case 12:mn(t,e),pn(e);break;case 31:mn(t,e),pn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ir(e,i)));break;case 13:mn(t,e),pn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(or=ue()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ir(e,i)));break;case 22:c=e.memoizedState!==null;var E=s!==null&&s.memoizedState!==null,O=Ta,P=zt;if(Ta=O||c,zt=P||E,mn(t,e),zt=P,Ta=O,pn(e),i&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||E||Ta||zt||ks(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{x=E.stateNode;var Z=E.memoizedProps.style,L=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;x.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(ce){tt(E,E.return,ce)}}}else if(t.tag===6){if(s===null){E=t;try{E.stateNode.nodeValue=c?"":E.memoizedProps}catch(ce){tt(E,E.return,ce)}}}else if(t.tag===18){if(s===null){E=t;try{var V=E.stateNode;c?Lg(V,!0):Lg(E.stateNode,!1)}catch(ce){tt(E,E.return,ce)}}}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,ir(e,s))));break;case 19:mn(t,e),pn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ir(e,i)));break;case 30:break;case 21:break;default:mn(t,e),pn(e)}}function pn(e){var t=e.flags;if(t&2){try{for(var s,i=e.return;i!==null;){if(zp(i)){s=i;break}i=i.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var c=s.stateNode,f=Vu(e);sr(e,f,c);break;case 5:var v=s.stateNode;s.flags&32&&(Js(v,""),s.flags&=-33);var x=Vu(e);sr(e,x,v);break;case 3:case 4:var E=s.stateNode.containerInfo,O=Vu(e);Iu(e,O,E);break;default:throw Error(o(161))}}catch(P){tt(e,e.return,P)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Kp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Aa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Hp(e,t.alternate,t),t=t.sibling}function ks(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:$a(4,t,t.return),ks(t);break;case 1:na(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&Lp(t,t.return,s),ks(t);break;case 27:Ol(t.stateNode);case 26:case 5:na(t,t.return),ks(t);break;case 22:t.memoizedState===null&&ks(t);break;case 30:ks(t);break;default:ks(t)}e=e.sibling}}function Ca(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:Ca(c,f,s),El(4,f);break;case 1:if(Ca(c,f,s),i=f,c=i.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(O){tt(i,i.return,O)}if(i=f,c=i.updateQueue,c!==null){var x=i.stateNode;try{var E=c.shared.hiddenCallbacks;if(E!==null)for(c.shared.hiddenCallbacks=null,c=0;c<E.length;c++)Em(E[c],x)}catch(O){tt(i,i.return,O)}}s&&v&64&&Bp(f),Al(f,f.return);break;case 27:Vp(f);case 26:case 5:Ca(c,f,s),s&&i===null&&v&4&&Up(f),Al(f,f.return);break;case 12:Ca(c,f,s);break;case 31:Ca(c,f,s),s&&v&4&&qp(c,f);break;case 13:Ca(c,f,s),s&&v&4&&Yp(c,f);break;case 22:f.memoizedState===null&&Ca(c,f,s),Al(f,f.return);break;case 30:break;default:Ca(c,f,s)}t=t.sibling}}function Gu(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&&dl(s))}function Pu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dl(e))}function Qn(e,t,s,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)$p(e,t,s,i),t=t.sibling}function $p(e,t,s,i){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Qn(e,t,s,i),c&2048&&El(9,t);break;case 1:Qn(e,t,s,i);break;case 3:Qn(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&&dl(e)));break;case 12:if(c&2048){Qn(e,t,s,i),e=t.stateNode;try{var f=t.memoizedProps,v=f.id,x=f.onPostCommit;typeof x=="function"&&x(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){tt(t,t.return,E)}}else Qn(e,t,s,i);break;case 31:Qn(e,t,s,i);break;case 13:Qn(e,t,s,i);break;case 23:break;case 22:f=t.stateNode,v=t.alternate,t.memoizedState!==null?f._visibility&2?Qn(e,t,s,i):Cl(e,t):f._visibility&2?Qn(e,t,s,i):(f._visibility|=2,yi(e,t,s,i,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Gu(v,t);break;case 24:Qn(e,t,s,i),c&2048&&Pu(t.alternate,t);break;default:Qn(e,t,s,i)}}function yi(e,t,s,i,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,v=t,x=s,E=i,O=v.flags;switch(v.tag){case 0:case 11:case 15:yi(f,v,x,E,c),El(8,v);break;case 23:break;case 22:var P=v.stateNode;v.memoizedState!==null?P._visibility&2?yi(f,v,x,E,c):Cl(f,v):(P._visibility|=2,yi(f,v,x,E,c)),c&&O&2048&&Gu(v.alternate,v);break;case 24:yi(f,v,x,E,c),c&&O&2048&&Pu(v.alternate,v);break;default:yi(f,v,x,E,c)}t=t.sibling}}function Cl(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:Cl(s,i),c&2048&&Gu(i.alternate,i);break;case 24:Cl(s,i),c&2048&&Pu(i.alternate,i);break;default:Cl(s,i)}t=t.sibling}}var jl=8192;function bi(e,t,s){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Zp(e,t,s),e=e.sibling}function Zp(e,t,s){switch(e.tag){case 26:bi(e,t,s),e.flags&jl&&e.memoizedState!==null&&Mx(s,Xn,e.memoizedState,e.memoizedProps);break;case 5:bi(e,t,s);break;case 3:case 4:var i=Xn;Xn=br(e.stateNode.containerInfo),bi(e,t,s),Xn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=jl,jl=16777216,bi(e,t,s),jl=i):bi(e,t,s));break;default:bi(e,t,s)}}function Xp(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 Nl(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];Yt=i,Jp(i,e)}Xp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qp(e),e=e.sibling}function Qp(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&$a(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,lr(e)):Nl(e);break;default:Nl(e)}}function lr(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];Yt=i,Jp(i,e)}Xp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:$a(8,t,t.return),lr(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,lr(t));break;default:lr(t)}e=e.sibling}}function Jp(e,t){for(;Yt!==null;){var s=Yt;switch(s.tag){case 0:case 11:case 15:$a(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:dl(s.memoizedState.cache)}if(i=s.child,i!==null)i.return=s,Yt=i;else e:for(s=e;Yt!==null;){i=Yt;var c=i.sibling,f=i.return;if(Gp(i),i===s){Yt=null;break e}if(c!==null){c.return=f,Yt=c;break e}Yt=f}}}var $S={getCacheForType:function(e){var t=$t(Bt),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return $t(Bt).controller.signal}},ZS=typeof WeakMap=="function"?WeakMap:Map,Xe=0,lt=null,Ve=null,Ge=0,et=0,En=null,Za=!1,Si=!1,qu=!1,ja=0,Et=0,Xa=0,Rs=0,Yu=0,An=0,xi=0,wl=null,gn=null,Fu=!1,or=0,Wp=0,rr=1/0,cr=null,Qa=null,Ht=0,Ja=null,_i=null,Na=0,Ku=0,$u=null,eg=null,Dl=0,Zu=null;function Cn(){return(Xe&2)!==0&&Ge!==0?Ge&-Ge:U.T!==null?td():Ji()}function tg(){if(An===0)if((Ge&536870912)===0||qe){var e=se;se<<=1,(se&3932160)===0&&(se=262144),An=e}else An=536870912;return e=_n.current,e!==null&&(e.flags|=32),An}function vn(e,t,s){(e===lt&&(et===2||et===9)||e.cancelPendingCommit!==null)&&(Ti(e,0),Wa(e,Ge,An,!1)),La(e,s),((Xe&2)===0||e!==lt)&&(e===lt&&((Xe&2)===0&&(Rs|=s),Et===4&&Wa(e,Ge,An,!1)),aa(e))}function ng(e,t,s){if((Xe&6)!==0)throw Error(o(327));var i=!s&&(t&127)===0&&(t&e.expiredLanes)===0||F(e,t),c=i?JS(e,t):Qu(e,t,!0),f=i;do{if(c===0){Si&&!i&&Wa(e,t,0,!1);break}else{if(s=e.current.alternate,f&&!XS(s)){c=Qu(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 x=e;c=wl;var E=x.current.memoizedState.isDehydrated;if(E&&(Ti(x,v).flags|=256),v=Qu(x,v,!1),v!==2){if(qu&&!E){x.errorRecoveryDisabledLanes|=f,Rs|=f,c=4;break e}f=gn,gn=c,f!==null&&(gn===null?gn=f:gn.push.apply(gn,f))}c=v}if(f=!1,c!==2)continue}}if(c===1){Ti(e,0),Wa(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:Wa(i,t,An,!Za);break e;case 2:gn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=or+300-ue(),10<c)){if(Wa(i,t,An,!Za),we(i,0,!0)!==0)break e;Na=t,i.timeoutHandle=Mg(ag.bind(null,i,s,gn,cr,Fu,t,An,Rs,xi,Za,f,"Throttled",-0,0),c);break e}ag(i,s,gn,cr,Fu,t,An,Rs,xi,Za,f,null,-0,0)}}break}while(!0);aa(e)}function ag(e,t,s,i,c,f,v,x,E,O,P,Z,L,V){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ha},Zp(t,f,Z);var ce=(f&62914560)===f?or-ue():(f&4194048)===f?Wp-ue():0;if(ce=Ox(Z,ce),ce!==null){Na=f,e.cancelPendingCommit=ce(dg.bind(null,e,t,f,s,i,c,v,x,E,P,Z,null,L,V)),Wa(e,f,v,!O);return}}dg(e,t,f,s,i,c,v,x,E)}function XS(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(!Sn(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 Wa(e,t,s,i){t&=~Yu,t&=~Rs,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&&Zi(e,s,t)}function ur(){return(Xe&6)===0?(kl(0),!1):!0}function Xu(){if(Ve!==null){if(et===0)var e=Ve.return;else e=Ve,va=Ts=null,fu(e),hi=null,hl=0,e=Ve;for(;e!==null;)Op(e.alternate,e),e=e.return;Ve=null}}function Ti(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,gx(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Na=0,Xu(),lt=e,Ve=s=pa(e.current,null),Ge=t,et=0,En=null,Za=!1,Si=F(e,t),qu=!1,xi=An=Yu=Rs=Xa=Et=0,gn=wl=null,Fu=!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 ja=t,ko(),s}function sg(e,t){Re=null,U.H=xl,t===fi||t===Vo?(t=Sm(),et=3):t===eu?(t=Sm(),et=4):et=t===Nu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,En=t,Ve===null&&(Et=1,Wo(e,On(t,e.current)))}function ig(){var e=_n.current;return e===null?!0:(Ge&4194048)===Ge?zn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===zn:!1}function lg(){var e=U.H;return U.H=xl,e===null?xl:e}function og(){var e=U.A;return U.A=$S,e}function dr(){Et=4,Za||(Ge&4194048)!==Ge&&_n.current!==null||(Si=!0),(Xa&134217727)===0&&(Rs&134217727)===0||lt===null||Wa(lt,Ge,An,!1)}function Qu(e,t,s){var i=Xe;Xe|=2;var c=lg(),f=og();(lt!==e||Ge!==t)&&(cr=null,Ti(e,t)),t=!1;var v=Et;e:do try{if(et!==0&&Ve!==null){var x=Ve,E=En;switch(et){case 8:Xu(),v=6;break e;case 3:case 2:case 9:case 6:_n.current===null&&(t=!0);var O=et;if(et=0,En=null,Ei(e,x,E,O),s&&Si){v=0;break e}break;default:O=et,et=0,En=null,Ei(e,x,E,O)}}QS(),v=Et;break}catch(P){sg(e,P)}while(!0);return t&&e.shellSuspendCounter++,va=Ts=null,Xe=i,U.H=c,U.A=f,Ve===null&&(lt=null,Ge=0,ko()),v}function QS(){for(;Ve!==null;)rg(Ve)}function JS(e,t){var s=Xe;Xe|=2;var i=lg(),c=og();lt!==e||Ge!==t?(cr=null,rr=ue()+500,Ti(e,t)):Si=F(e,t);e:do try{if(et!==0&&Ve!==null){t=Ve;var f=En;t:switch(et){case 1:et=0,En=null,Ei(e,t,f,1);break;case 2:case 9:if(ym(f)){et=0,En=null,cg(t);break}t=function(){et!==2&&et!==9||lt!==e||(et=7),aa(e)},f.then(t,t);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:ym(f)?(et=0,En=null,cg(t)):(et=0,En=null,Ei(e,t,f,7));break;case 5:var v=null;switch(Ve.tag){case 26:v=Ve.memoizedState;case 5:case 27:var x=Ve;if(v?$g(v):x.stateNode.complete){et=0,En=null;var E=x.sibling;if(E!==null)Ve=E;else{var O=x.return;O!==null?(Ve=O,fr(O)):Ve=null}break t}}et=0,En=null,Ei(e,t,f,5);break;case 6:et=0,En=null,Ei(e,t,f,6);break;case 8:Xu(),Et=6;break e;default:throw Error(o(462))}}WS();break}catch(P){sg(e,P)}while(!0);return va=Ts=null,U.H=i,U.A=c,Xe=s,Ve!==null?0:(lt=null,Ge=0,ko(),Et)}function WS(){for(;Ve!==null&&!ie();)rg(Ve)}function rg(e){var t=Rp(e.alternate,e,ja);e.memoizedProps=e.pendingProps,t===null?fr(e):Ve=t}function cg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=Cp(s,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=Cp(s,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:fu(t);default:Op(s,t),t=Ve=om(t,ja),t=Rp(s,t,ja)}e.memoizedProps=e.pendingProps,t===null?fr(e):Ve=t}function Ei(e,t,s,i){va=Ts=null,fu(t),hi=null,hl=0;var c=t.return;try{if(HS(e,c,t,s,Ge)){Et=1,Wo(e,On(s,e.current)),Ve=null;return}}catch(f){if(c!==null)throw Ve=c,f;Et=1,Wo(e,On(s,e.current)),Ve=null;return}t.flags&32768?(qe||i===1?e=!0:Si||(Ge&536870912)!==0?e=!1:(Za=e=!0,(i===2||i===9||i===3||i===6)&&(i=_n.current,i!==null&&i.tag===13&&(i.flags|=16384))),ug(t,e)):fr(t)}function fr(e){var t=e;do{if((t.flags&32768)!==0){ug(t,Za);return}e=t.return;var s=qS(t.alternate,t,ja);if(s!==null){Ve=s;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);Et===0&&(Et=5)}function ug(e,t){do{var s=YS(e.alternate,e);if(s!==null){s.flags&=32767,Ve=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=s}while(e!==null);Et=6,Ve=null}function dg(e,t,s,i,c,f,v,x,E){e.cancelPendingCommit=null;do hr();while(Ht!==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|=Vc,vo(e,s,f,v,x,E),e===lt&&(Ve=lt=null,Ge=0),_i=t,Ja=e,Na=s,Ku=f,$u=c,eg=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ax(Be,function(){return gg(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=U.T,U.T=null,c=$.p,$.p=2,v=Xe,Xe|=4;try{FS(e,t,s)}finally{Xe=v,$.p=c,U.T=i}}Ht=1,fg(),hg(),mg()}}function fg(){if(Ht===1){Ht=0;var e=Ja,t=_i,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=U.T,U.T=null;var i=$.p;$.p=2;var c=Xe;Xe|=4;try{Fp(t,e);var f=cd,v=Jh(e.containerInfo),x=f.focusedElem,E=f.selectionRange;if(v!==x&&x&&x.ownerDocument&&Qh(x.ownerDocument.documentElement,x)){if(E!==null&&Oc(x)){var O=E.start,P=E.end;if(P===void 0&&(P=O),"selectionStart"in x)x.selectionStart=O,x.selectionEnd=Math.min(P,x.value.length);else{var Z=x.ownerDocument||document,L=Z&&Z.defaultView||window;if(L.getSelection){var V=L.getSelection(),ce=x.textContent.length,be=Math.min(E.start,ce),it=E.end===void 0?be:Math.min(E.end,ce);!V.extend&&be>it&&(v=it,it=be,be=v);var k=Xh(x,be),N=Xh(x,it);if(k&&N&&(V.rangeCount!==1||V.anchorNode!==k.node||V.anchorOffset!==k.offset||V.focusNode!==N.node||V.focusOffset!==N.offset)){var M=Z.createRange();M.setStart(k.node,k.offset),V.removeAllRanges(),be>it?(V.addRange(M),V.extend(N.node,N.offset)):(M.setEnd(N.node,N.offset),V.addRange(M))}}}}for(Z=[],V=x;V=V.parentNode;)V.nodeType===1&&Z.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<Z.length;x++){var K=Z[x];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Ar=!!rd,cd=rd=null}finally{Xe=c,$.p=i,U.T=s}}e.current=t,Ht=2}}function hg(){if(Ht===2){Ht=0;var e=Ja,t=_i,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=U.T,U.T=null;var i=$.p;$.p=2;var c=Xe;Xe|=4;try{Hp(e,t.alternate,t)}finally{Xe=c,$.p=i,U.T=s}}Ht=3}}function mg(){if(Ht===4||Ht===3){Ht=0,re();var e=Ja,t=_i,s=Na,i=eg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ht=5:(Ht=0,_i=Ja=null,pg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Qa=null),$s(s),t=t.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(rt,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=U.T,c=$.p,$.p=2,U.T=null;try{for(var f=e.onRecoverableError,v=0;v<i.length;v++){var x=i[v];f(x.value,{componentStack:x.stack})}}finally{U.T=t,$.p=c}}(Na&3)!==0&&hr(),aa(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===Zu?Dl++:(Dl=0,Zu=e):Dl=0,kl(0)}}function pg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,dl(t)))}function hr(){return fg(),hg(),mg(),gg()}function gg(){if(Ht!==5)return!1;var e=Ja,t=Ku;Ku=0;var s=$s(Na),i=U.T,c=$.p;try{$.p=32>s?32:s,U.T=null,s=$u,$u=null;var f=Ja,v=Na;if(Ht=0,_i=Ja=null,Na=0,(Xe&6)!==0)throw Error(o(331));var x=Xe;if(Xe|=4,Qp(f.current),$p(f,f.current,v,s),Xe=x,kl(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(rt,f)}catch{}return!0}finally{$.p=c,U.T=i,pg(e,t)}}function vg(e,t,s){t=On(s,t),t=ju(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(La(e,2),aa(e))}function tt(e,t,s){if(e.tag===3)vg(e,e,s);else for(;t!==null;){if(t.tag===3){vg(t,e,s);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Qa===null||!Qa.has(i))){e=On(s,e),s=yp(2),i=Ya(t,s,2),i!==null&&(bp(s,i,t,e),La(i,2),aa(i));break}}t=t.return}}function Ju(e,t,s){var i=e.pingCache;if(i===null){i=e.pingCache=new ZS;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)||(qu=!0,c.add(s),e=ex.bind(null,e,t,s),t.then(e,e))}function ex(e,t,s){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,lt===e&&(Ge&s)===s&&(Et===4||Et===3&&(Ge&62914560)===Ge&&300>ue()-or?(Xe&2)===0&&Ti(e,0):Yu|=s,xi===Ge&&(xi=0)),aa(e)}function yg(e,t){t===0&&(t=dn()),e=Ss(e,t),e!==null&&(La(e,t),aa(e))}function tx(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),yg(e,s)}function nx(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),yg(e,s)}function ax(e,t){return Fn(e,t)}var mr=null,Ai=null,Wu=!1,pr=!1,ed=!1,es=0;function aa(e){e!==Ai&&e.next===null&&(Ai===null?mr=Ai=e:Ai=Ai.next=e),pr=!0,Wu||(Wu=!0,ix())}function kl(e,t){if(!ed&&pr){ed=!0;do for(var s=!1,i=mr;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var f=0;else{var v=i.suspendedLanes,x=i.pingedLanes;f=(1<<31-vt(42|e)+1)-1,f&=c&~(v&~x),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,_g(i,f))}else f=Ge,f=we(i,i===lt?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(f&3)===0||F(i,f)||(s=!0,_g(i,f));i=i.next}while(s);ed=!1}}function sx(){bg()}function bg(){pr=Wu=!1;var e=0;es!==0&&px()&&(e=es);for(var t=ue(),s=null,i=mr;i!==null;){var c=i.next,f=Sg(i,t);f===0?(i.next=null,s===null?mr=c:s.next=c,c===null&&(Ai=s)):(s=i,(e!==0||(f&3)!==0)&&(pr=!0)),i=c}Ht!==0&&Ht!==5||kl(e),es!==0&&(es=0)}function Sg(e,t){for(var s=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var v=31-vt(f),x=1<<v,E=c[v];E===-1?((x&s)===0||(x&i)!==0)&&(c[v]=nt(x,t)):E<=t&&(e.expiredLanes|=x),f&=~x}if(t=lt,s=Ge,s=we(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,s===0||e===t&&(et===2||et===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&X(i),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||F(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(i!==null&&X(i),$s(s)){case 2:case 8:s=We;break;case 32:s=Be;break;case 268435456:s=jt;break;default:s=Be}return i=xg.bind(null,e),s=Fn(s,i),e.callbackPriority=t,e.callbackNode=s,t}return i!==null&&i!==null&&X(i),e.callbackPriority=2,e.callbackNode=null,2}function xg(e,t){if(Ht!==0&&Ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(hr()&&e.callbackNode!==s)return null;var i=Ge;return i=we(e,e===lt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(ng(e,i,t),Sg(e,ue()),e.callbackNode!=null&&e.callbackNode===s?xg.bind(null,e):null)}function _g(e,t){if(hr())return null;ng(e,t,!0)}function ix(){vx(function(){(Xe&6)!==0?Fn(Ee,sx):bg()})}function td(){if(es===0){var e=ui;e===0&&(e=Kn,Kn<<=1,(Kn&261888)===0&&(Kn=256)),es=e}return es}function Tg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:To(""+e)}function Eg(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 lx(e,t,s,i,c){if(t==="submit"&&s&&s.stateNode===c){var f=Tg((c[Ft]||null).action),v=i.submitter;v&&(t=(t=v[Ft]||null)?Tg(t.formAction):v.getAttribute("formAction"),t!==null&&(f=t,v=null));var x=new jo("action","action",null,i,c);e.push({event:x,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(es!==0){var E=v?Eg(c,v):new FormData(c);xu(s,{pending:!0,data:E,method:c.method,action:f},null,E)}}else typeof f=="function"&&(x.preventDefault(),E=v?Eg(c,v):new FormData(c),xu(s,{pending:!0,data:E,method:c.method,action:f},f,E))},currentTarget:c}]})}}for(var nd=0;nd<zc.length;nd++){var ad=zc[nd],ox=ad.toLowerCase(),rx=ad[0].toUpperCase()+ad.slice(1);Zn(ox,"on"+rx)}Zn(tm,"onAnimationEnd"),Zn(nm,"onAnimationIteration"),Zn(am,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(ES,"onTransitionRun"),Zn(AS,"onTransitionStart"),Zn(CS,"onTransitionCancel"),Zn(sm,"onTransitionEnd"),Xs("onMouseEnter",["mouseout","mouseover"]),Xs("onMouseLeave",["mouseout","mouseover"]),Xs("onPointerEnter",["pointerout","pointerover"]),Xs("onPointerLeave",["pointerout","pointerover"]),gs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),gs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),gs("onBeforeInput",["compositionend","keypress","textInput","paste"]),gs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),gs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),gs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),cx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rl));function Ag(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 x=i[v],E=x.instance,O=x.currentTarget;if(x=x.listener,E!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=O;try{f(c)}catch(P){Do(P)}c.currentTarget=null,f=E}else for(v=0;v<i.length;v++){if(x=i[v],E=x.instance,O=x.currentTarget,x=x.listener,E!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=O;try{f(c)}catch(P){Do(P)}c.currentTarget=null,f=E}}}}function Ie(e,t){var s=t[Zs];s===void 0&&(s=t[Zs]=new Set);var i=e+"__bubble";s.has(i)||(Cg(t,e,2,!1),s.add(i))}function sd(e,t,s){var i=0;t&&(i|=4),Cg(s,e,i,t)}var gr="_reactListening"+Math.random().toString(36).slice(2);function id(e){if(!e[gr]){e[gr]=!0,Ua.forEach(function(s){s!=="selectionchange"&&(cx.has(s)||sd(s,!1,e),sd(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gr]||(t[gr]=!0,sd("selectionchange",!1,t))}}function Cg(e,t,s,i){switch(t0(t)){case 2:var c=Ux;break;case 8:c=zx;break;default:c=Sd}s=c.bind(null,t,s,e),c=void 0,!Ac||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 ld(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 x=i.stateNode.containerInfo;if(x===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(;x!==null;){if(v=Oe(x),v===null)return;if(E=v.tag,E===5||E===6||E===26||E===27){i=f=v;continue e}x=x.parentNode}}i=i.return}kh(function(){var O=f,P=Tc(s),Z=[];e:{var L=im.get(e);if(L!==void 0){var V=jo,ce=e;switch(e){case"keypress":if(Ao(s)===0)break e;case"keydown":case"keyup":V=nS;break;case"focusin":ce="focus",V=wc;break;case"focusout":ce="blur",V=wc;break;case"beforeblur":case"afterblur":V=wc;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=Oh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=q1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=iS;break;case tm:case nm:case am:V=K1;break;case sm:V=oS;break;case"scroll":case"scrollend":V=G1;break;case"wheel":V=cS;break;case"copy":case"cut":case"paste":V=Z1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Lh;break;case"toggle":case"beforetoggle":V=dS}var be=(t&4)!==0,it=!be&&(e==="scroll"||e==="scrollend"),k=be?L!==null?L+"Capture":null:L;be=[];for(var N=O,M;N!==null;){var K=N;if(M=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||M===null||k===null||(K=el(N,k),K!=null&&be.push(Ml(N,K,M))),it)break;N=N.return}0<be.length&&(L=new V(L,ce,null,s,P),Z.push({event:L,listeners:be}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",L&&s!==_c&&(ce=s.relatedTarget||s.fromElement)&&(Oe(ce)||ce[da]))break e;if((V||L)&&(L=P.window===P?P:(L=P.ownerDocument)?L.defaultView||L.parentWindow:window,V?(ce=s.relatedTarget||s.toElement,V=O,ce=ce?Oe(ce):null,ce!==null&&(it=u(ce),be=ce.tag,ce!==it||be!==5&&be!==27&&be!==6)&&(ce=null)):(V=null,ce=O),V!==ce)){if(be=Oh,K="onMouseLeave",k="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(be=Lh,K="onPointerLeave",k="onPointerEnter",N="pointer"),it=V==null?L:en(V),M=ce==null?L:en(ce),L=new be(K,N+"leave",V,s,P),L.target=it,L.relatedTarget=M,K=null,Oe(P)===O&&(be=new be(k,N+"enter",ce,s,P),be.target=M,be.relatedTarget=it,K=be),it=K,V&&ce)t:{for(be=ux,k=V,N=ce,M=0,K=k;K;K=be(K))M++;K=0;for(var ge=N;ge;ge=be(ge))K++;for(;0<M-K;)k=be(k),M--;for(;0<K-M;)N=be(N),K--;for(;M--;){if(k===N||N!==null&&k===N.alternate){be=k;break t}k=be(k),N=be(N)}be=null}else be=null;V!==null&&jg(Z,L,V,be,!1),ce!==null&&it!==null&&jg(Z,it,ce,be,!0)}}e:{if(L=O?en(O):window,V=L.nodeName&&L.nodeName.toLowerCase(),V==="select"||V==="input"&&L.type==="file")var Ke=qh;else if(Gh(L))if(Yh)Ke=xS;else{Ke=bS;var he=yS}else V=L.nodeName,!V||V.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?O&&xc(O.elementType)&&(Ke=qh):Ke=SS;if(Ke&&(Ke=Ke(e,O))){Ph(Z,Ke,s,P);break e}he&&he(e,L,O),e==="focusout"&&O&&L.type==="number"&&O.memoizedProps.value!=null&&Sc(L,"number",L.value)}switch(he=O?en(O):window,e){case"focusin":(Gh(he)||he.contentEditable==="true")&&(ni=he,Bc=O,rl=null);break;case"focusout":rl=Bc=ni=null;break;case"mousedown":Lc=!0;break;case"contextmenu":case"mouseup":case"dragend":Lc=!1,Wh(Z,s,P);break;case"selectionchange":if(TS)break;case"keydown":case"keyup":Wh(Z,s,P)}var Me;if(kc)e:{switch(e){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else ti?Ih(e,s)&&(Pe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Pe="onCompositionStart");Pe&&(Uh&&s.locale!=="ko"&&(ti||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&ti&&(Me=Rh()):(za=P,Cc="value"in za?za.value:za.textContent,ti=!0)),he=vr(O,Pe),0<he.length&&(Pe=new Bh(Pe,e,null,s,P),Z.push({event:Pe,listeners:he}),Me?Pe.data=Me:(Me=Hh(s),Me!==null&&(Pe.data=Me)))),(Me=hS?mS(e,s):pS(e,s))&&(Pe=vr(O,"onBeforeInput"),0<Pe.length&&(he=new Bh("onBeforeInput","beforeinput",null,s,P),Z.push({event:he,listeners:Pe}),he.data=Me)),lx(Z,e,O,s,P)}Ag(Z,t)})}function Ml(e,t,s){return{instance:e,listener:t,currentTarget:s}}function vr(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=el(e,s),c!=null&&i.unshift(Ml(e,c,f)),c=el(e,t),c!=null&&i.push(Ml(e,c,f))),e.tag===3)return i;e=e.return}return[]}function ux(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jg(e,t,s,i,c){for(var f=t._reactName,v=[];s!==null&&s!==i;){var x=s,E=x.alternate,O=x.stateNode;if(x=x.tag,E!==null&&E===i)break;x!==5&&x!==26&&x!==27||O===null||(E=O,c?(O=el(s,f),O!=null&&v.unshift(Ml(s,O,E))):c||(O=el(s,f),O!=null&&v.push(Ml(s,O,E)))),s=s.return}v.length!==0&&e.push({event:t,listeners:v})}var dx=/\r\n?/g,fx=/\u0000|\uFFFD/g;function Ng(e){return(typeof e=="string"?e:""+e).replace(dx,`
|
|
25
|
+
`).replace(fx,"")}function wg(e,t){return t=Ng(t),Ng(e)===t}function st(e,t,s,i,c,f){switch(s){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Js(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Js(e,""+i);break;case"className":xo(e,"class",i);break;case"tabIndex":xo(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":xo(e,s,i);break;case"style":wh(e,i,f);break;case"data":if(t!=="object"){xo(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=To(""+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=To(""+i),e.setAttribute(s,i);break;case"onClick":i!=null&&(e.onclick=ha);break;case"onScroll":i!=null&&Ie("scroll",e);break;case"onScrollEnd":i!=null&&Ie("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=To(""+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":Ie("beforetoggle",e),Ie("toggle",e),So(e,"popover",i);break;case"xlinkActuate":fa(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":fa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":fa(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":fa(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":fa(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":fa(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":fa(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":fa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":fa(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":So(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=I1.get(s)||s,So(e,s,i))}}function od(e,t,s,i,c,f){switch(s){case"style":wh(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"?Js(e,i):(typeof i=="number"||typeof i=="bigint")&&Js(e,""+i);break;case"onScroll":i!=null&&Ie("scroll",e);break;case"onScrollEnd":i!=null&&Ie("scrollend",e);break;case"onClick":i!=null&&(e.onclick=ha);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sh.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[Ft]||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,""):So(e,s,i)}}}function Xt(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("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":Ie("invalid",e);var x=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":x=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:st(e,t,i,P,s,null)}}Ah(e,f,x,E,O,v,c,!1);return;case"select":Ie("invalid",e),i=v=f=null;for(c in s)if(s.hasOwnProperty(c)&&(x=s[c],x!=null))switch(c){case"value":f=x;break;case"defaultValue":v=x;break;case"multiple":i=x;default:st(e,t,c,x,s,null)}t=f,s=v,e.multiple=!!i,t!=null?Qs(e,!!i,t,!1):s!=null&&Qs(e,!!i,s,!0);return;case"textarea":Ie("invalid",e),f=c=i=null;for(v in s)if(s.hasOwnProperty(v)&&(x=s[v],x!=null))switch(v){case"value":i=x;break;case"defaultValue":c=x;break;case"children":f=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:st(e,t,v,x,s,null)}jh(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":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(i=0;i<Rl.length;i++)Ie(Rl[i],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("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(xc(t)){for(P in s)s.hasOwnProperty(P)&&(i=s[P],i!==void 0&&od(e,t,P,i,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(i=s[x],i!=null&&st(e,t,x,i,s,null))}function hx(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,x=null,E=null,O=null,P=null;for(V in s){var Z=s[V];if(s.hasOwnProperty(V)&&Z!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":E=Z;default:i.hasOwnProperty(V)||st(e,t,V,null,i,Z)}}for(var L in i){var V=i[L];if(Z=s[L],i.hasOwnProperty(L)&&(V!=null||Z!=null))switch(L){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":x=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:V!==Z&&st(e,t,L,V,i,Z)}}bc(e,v,x,E,O,P,f,c);return;case"select":V=v=x=L=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":L=f;break;case"defaultValue":x=f;break;case"multiple":v=f;default:f!==E&&st(e,t,c,f,i,E)}t=x,s=v,i=V,L!=null?Qs(e,!!s,L,!1):!!i!=!!s&&(t!=null?Qs(e,!!s,t,!0):Qs(e,!!s,s?[]:"",!1));return;case"textarea":V=L=null;for(x in s)if(c=s[x],s.hasOwnProperty(x)&&c!=null&&!i.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:st(e,t,x,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":L=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)}Ch(e,L,V);return;case"option":for(var ce in s)if(L=s[ce],s.hasOwnProperty(ce)&&L!=null&&!i.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:st(e,t,ce,null,i,L)}for(E in i)if(L=i[E],V=s[E],i.hasOwnProperty(E)&&L!==V&&(L!=null||V!=null))switch(E){case"selected":e.selected=L&&typeof L!="function"&&typeof L!="symbol";break;default:st(e,t,E,L,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 be in s)L=s[be],s.hasOwnProperty(be)&&L!=null&&!i.hasOwnProperty(be)&&st(e,t,be,null,i,L);for(O in i)if(L=i[O],V=s[O],i.hasOwnProperty(O)&&L!==V&&(L!=null||V!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,t));break;default:st(e,t,O,L,i,V)}return;default:if(xc(t)){for(var it in s)L=s[it],s.hasOwnProperty(it)&&L!==void 0&&!i.hasOwnProperty(it)&&od(e,t,it,void 0,i,L);for(P in i)L=i[P],V=s[P],!i.hasOwnProperty(P)||L===V||L===void 0&&V===void 0||od(e,t,P,L,i,V);return}}for(var k in s)L=s[k],s.hasOwnProperty(k)&&L!=null&&!i.hasOwnProperty(k)&&st(e,t,k,null,i,L);for(Z in i)L=i[Z],V=s[Z],!i.hasOwnProperty(Z)||L===V||L==null&&V==null||st(e,t,Z,L,i,V)}function Dg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mx(){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,x=c.duration;if(f&&x&&Dg(v)){for(v=0,x=c.responseEnd,i+=1;i<s.length;i++){var E=s[i],O=E.startTime;if(O>x)break;var P=E.transferSize,Z=E.initiatorType;P&&Dg(Z)&&(E=E.responseEnd,v+=P*(E<x?1:(x-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 rd=null,cd=null;function yr(e){return e.nodeType===9?e:e.ownerDocument}function kg(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 Rg(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 ud(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 dd=null;function px(){var e=window.event;return e&&e.type==="popstate"?e===dd?!1:(dd=e,!0):(dd=null,!1)}var Mg=typeof setTimeout=="function"?setTimeout:void 0,gx=typeof clearTimeout=="function"?clearTimeout:void 0,Og=typeof Promise=="function"?Promise:void 0,vx=typeof queueMicrotask=="function"?queueMicrotask:typeof Og<"u"?function(e){return Og.resolve(null).then(e).catch(yx)}:Mg;function yx(e){setTimeout(function(){throw e})}function ts(e){return e==="head"}function Bg(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),wi(t);return}i--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")i++;else if(s==="html")Ol(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Ol(s);for(var f=s.firstChild;f;){var v=f.nextSibling,x=f.nodeName;f[ze]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=v}}else s==="body"&&Ol(e.ownerDocument.body);s=c}while(s);wi(t)}function Lg(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 fd(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":fd(s),Le(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function bx(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[ze])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=Vn(e.nextSibling),e===null)break}return null}function Sx(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Vn(e.nextSibling),e===null))return null;return e}function Ug(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Vn(e.nextSibling),e===null))return null;return e}function hd(e){return e.data==="$?"||e.data==="$~"}function md(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function xx(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 Vn(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 pd=null;function zg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return Vn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function Vg(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 Ig(e,t,s){switch(t=yr(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 Ol(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Le(e)}var In=new Map,Hg=new Set;function br(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wa=$.d;$.d={f:_x,r:Tx,D:Ex,C:Ax,L:Cx,m:jx,X:wx,S:Nx,M:Dx};function _x(){var e=wa.f(),t=ur();return e||t}function Tx(e){var t=Wt(e);t!==null&&t.tag===5&&t.type==="form"?sp(t):wa.r(e)}var Ci=typeof document>"u"?null:document;function Gg(e,t,s){var i=Ci;if(i&&typeof t=="string"&&t){var c=Rn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),Hg.has(c)||(Hg.add(c),e={rel:e,crossOrigin:s,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),Xt(t,"link",e),He(t),i.head.appendChild(t)))}}function Ex(e){wa.D(e),Gg("dns-prefetch",e,null)}function Ax(e,t){wa.C(e,t),Gg("preconnect",e,t)}function Cx(e,t,s){wa.L(e,t,s);var i=Ci;if(i&&e&&t){var c='link[rel="preload"][as="'+Rn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+Rn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+Rn(s.imageSizes)+'"]')):c+='[href="'+Rn(e)+'"]';var f=c;switch(t){case"style":f=ji(e);break;case"script":f=Ni(e)}In.has(f)||(e=b({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),In.set(f,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(Bl(f))||t==="script"&&i.querySelector(Ll(f))||(t=i.createElement("link"),Xt(t,"link",e),He(t),i.head.appendChild(t)))}}function jx(e,t){wa.m(e,t);var s=Ci;if(s&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Rn(i)+'"][href="'+Rn(e)+'"]',f=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ni(e)}if(!In.has(f)&&(e=b({rel:"modulepreload",href:e},t),In.set(f,e),s.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ll(f)))return}i=s.createElement("link"),Xt(i,"link",e),He(i),s.head.appendChild(i)}}}function Nx(e,t,s){wa.S(e,t,s);var i=Ci;if(i&&e){var c=ht(i).hoistableStyles,f=ji(e);t=t||"default";var v=c.get(f);if(!v){var x={loading:0,preload:null};if(v=i.querySelector(Bl(f)))x.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},s),(s=In.get(f))&&gd(e,s);var E=v=i.createElement("link");He(E),Xt(E,"link",e),E._p=new Promise(function(O,P){E.onload=O,E.onerror=P}),E.addEventListener("load",function(){x.loading|=1}),E.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Sr(v,t,i)}v={type:"stylesheet",instance:v,count:1,state:x},c.set(f,v)}}}function wx(e,t){wa.X(e,t);var s=Ci;if(s&&e){var i=ht(s).hoistableScripts,c=Ni(e),f=i.get(c);f||(f=s.querySelector(Ll(c)),f||(e=b({src:e,async:!0},t),(t=In.get(c))&&vd(e,t),f=s.createElement("script"),He(f),Xt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function Dx(e,t){wa.M(e,t);var s=Ci;if(s&&e){var i=ht(s).hoistableScripts,c=Ni(e),f=i.get(c);f||(f=s.querySelector(Ll(c)),f||(e=b({src:e,async:!0,type:"module"},t),(t=In.get(c))&&vd(e,t),f=s.createElement("script"),He(f),Xt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(c,f))}}function Pg(e,t,s,i){var c=(c=Y.current)?br(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=ji(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=ji(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(Bl(e)))&&!f._p&&(v.instance=f,v.state.loading=5),In.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},In.set(e,s),f||kx(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=Ni(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 ji(e){return'href="'+Rn(e)+'"'}function Bl(e){return'link[rel="stylesheet"]['+e+"]"}function qg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function kx(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}),Xt(t,"link",s),He(t),e.head.appendChild(t))}function Ni(e){return'[src="'+Rn(e)+'"]'}function Ll(e){return"script[async]"+e}function Yg(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Rn(s.href)+'"]');if(i)return t.instance=i,He(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"),He(i),Xt(i,"style",c),Sr(i,s.precedence,e),t.instance=i;case"stylesheet":c=ji(s.href);var f=e.querySelector(Bl(c));if(f)return t.state.loading|=4,t.instance=f,He(f),f;i=qg(s),(c=In.get(c))&&gd(i,c),f=(e.ownerDocument||e).createElement("link"),He(f);var v=f;return v._p=new Promise(function(x,E){v.onload=x,v.onerror=E}),Xt(f,"link",i),t.state.loading|=4,Sr(f,s.precedence,e),t.instance=f;case"script":return f=Ni(s.src),(c=e.querySelector(Ll(f)))?(t.instance=c,He(c),c):(i=s,(c=In.get(f))&&(i=b({},s),vd(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),He(c),Xt(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,Sr(i,s.precedence,e));return t.instance}function Sr(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 x=i[v];if(x.dataset.precedence===t)f=x;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 gd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function vd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xr=null;function Fg(e,t,s){if(xr===null){var i=new Map,c=xr=new Map;c.set(s,i)}else c=xr,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[ze]||f[Ot]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var v=f.getAttribute(t)||"";v=e+v;var x=i.get(v);x?x.push(f):i.set(v,[f])}}return i}function Kg(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function Rx(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 $g(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Mx(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=ji(i.href),f=t.querySelector(Bl(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_r.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=f,He(f);return}f=t.ownerDocument||t,i=qg(i),(c=In.get(c))&&gd(i,c),f=f.createElement("link"),He(f);var v=f;v._p=new Promise(function(x,E){v.onload=x,v.onerror=E}),Xt(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=_r.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var yd=0;function Ox(e,t){return e.stylesheets&&e.count===0&&Er(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var i=setTimeout(function(){if(e.stylesheets&&Er(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&yd===0&&(yd=62500*mx());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Er(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>yd?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(c)}}:null}function _r(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Er(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Tr=null;function Er(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Tr=new Map,t.forEach(Bx,e),Tr=null,_r.call(e))}function Bx(e,t){if(!(t.state.loading&4)){var s=Tr.get(e);if(s)var i=s.get(null);else{s=new Map,Tr.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=_r.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 Ul={$$typeof:R,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Lx(e,t,s,i,c,f,v,x,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Fs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fs(0),this.hiddenUpdates=Fs(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 Zg(e,t,s,i,c,f,v,x,E,O,P,Z){return e=new Lx(e,t,s,v,E,O,P,Z,x),t=1,f===!0&&(t|=24),f=xn(3,null,null,t),e.current=f,f.stateNode=e,t=Qc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:i,isDehydrated:s,cache:t},tu(f),e}function Xg(e){return e?(e=ii,e):ii}function Qg(e,t,s,i,c,f){c=Xg(c),i.context===null?i.context=c:i.pendingContext=c,i=qa(t),i.payload={element:s},f=f===void 0?null:f,f!==null&&(i.callback=f),s=Ya(e,i,t),s!==null&&(vn(s,e,t),pl(s,e,t))}function Jg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function bd(e,t){Jg(e,t),(e=e.alternate)&&Jg(e,t)}function Wg(e){if(e.tag===13||e.tag===31){var t=Ss(e,67108864);t!==null&&vn(t,e,67108864),bd(e,67108864)}}function e0(e){if(e.tag===13||e.tag===31){var t=Cn();t=Ks(t);var s=Ss(e,t);s!==null&&vn(s,e,t),bd(e,t)}}var Ar=!0;function Ux(e,t,s,i){var c=U.T;U.T=null;var f=$.p;try{$.p=2,Sd(e,t,s,i)}finally{$.p=f,U.T=c}}function zx(e,t,s,i){var c=U.T;U.T=null;var f=$.p;try{$.p=8,Sd(e,t,s,i)}finally{$.p=f,U.T=c}}function Sd(e,t,s,i){if(Ar){var c=xd(i);if(c===null)ld(e,t,i,Cr,s),n0(e,i);else if(Ix(c,e,t,s,i))i.stopPropagation();else if(n0(e,i),t&4&&-1<Vx.indexOf(e)){for(;c!==null;){var f=Wt(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var v=oe(f.pendingLanes);if(v!==0){var x=f;for(x.pendingLanes|=2,x.entangledLanes|=2;v;){var E=1<<31-vt(v);x.entanglements[1]|=E,v&=~E}aa(f),(Xe&6)===0&&(rr=ue()+500,kl(0))}}break;case 31:case 13:x=Ss(f,2),x!==null&&vn(x,f,2),ur(),bd(f,2)}if(f=xd(i),f===null&&ld(e,t,i,Cr,s),f===c)break;c=f}c!==null&&i.stopPropagation()}else ld(e,t,i,null,s)}}function xd(e){return e=Tc(e),_d(e)}var Cr=null;function _d(e){if(Cr=null,e=Oe(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 Cr=e,null}function t0(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 We:return 8;case Be:case ot:return 32;case jt:return 268435456;default:return 32}default:return 32}}var Td=!1,ns=null,as=null,ss=null,zl=new Map,Vl=new Map,is=[],Vx="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 n0(e,t){switch(e){case"focusin":case"focusout":ns=null;break;case"dragenter":case"dragleave":as=null;break;case"mouseover":case"mouseout":ss=null;break;case"pointerover":case"pointerout":zl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vl.delete(t.pointerId)}}function Il(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=Wt(t),t!==null&&Wg(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Ix(e,t,s,i,c){switch(t){case"focusin":return ns=Il(ns,e,t,s,i,c),!0;case"dragenter":return as=Il(as,e,t,s,i,c),!0;case"mouseover":return ss=Il(ss,e,t,s,i,c),!0;case"pointerover":var f=c.pointerId;return zl.set(f,Il(zl.get(f)||null,e,t,s,i,c)),!0;case"gotpointercapture":return f=c.pointerId,Vl.set(f,Il(Vl.get(f)||null,e,t,s,i,c)),!0}return!1}function a0(e){var t=Oe(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,Wi(e.priority,function(){e0(s)});return}}else if(t===31){if(t=m(s),t!==null){e.blockedOn=t,Wi(e.priority,function(){e0(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 jr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=xd(e.nativeEvent);if(s===null){s=e.nativeEvent;var i=new s.constructor(s.type,s);_c=i,s.target.dispatchEvent(i),_c=null}else return t=Wt(s),t!==null&&Wg(t),e.blockedOn=s,!1;t.shift()}return!0}function s0(e,t,s){jr(e)&&s.delete(t)}function Hx(){Td=!1,ns!==null&&jr(ns)&&(ns=null),as!==null&&jr(as)&&(as=null),ss!==null&&jr(ss)&&(ss=null),zl.forEach(s0),Vl.forEach(s0)}function Nr(e,t){e.blockedOn===t&&(e.blockedOn=null,Td||(Td=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Hx)))}var wr=null;function i0(e){wr!==e&&(wr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){wr===e&&(wr=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(_d(i||s)===null)continue;break}var f=Wt(s);f!==null&&(e.splice(t,3),t-=3,xu(f,{pending:!0,data:c,method:s.method,action:i},i,c))}}))}function wi(e){function t(E){return Nr(E,e)}ns!==null&&Nr(ns,e),as!==null&&Nr(as,e),ss!==null&&Nr(ss,e),zl.forEach(t),Vl.forEach(t);for(var s=0;s<is.length;s++){var i=is[s];i.blockedOn===e&&(i.blockedOn=null)}for(;0<is.length&&(s=is[0],s.blockedOn===null);)a0(s),s.blockedOn===null&&is.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[Ft]||null;if(typeof f=="function")v||i0(s);else if(v){var x=null;if(f&&f.hasAttribute("formAction")){if(c=f,v=f[Ft]||null)x=v.formAction;else if(_d(c)!==null)continue}else x=v.action;typeof x=="function"?s[i+1]=x:(s.splice(i,3),i-=3),i0(s)}}}function l0(){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 Ed(e){this._internalRoot=e}Dr.prototype.render=Ed.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,i=Cn();Qg(s,i,e,t,null,null)},Dr.prototype.unmount=Ed.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qg(e.current,2,null,e,null,null),ur(),t[da]=null}};function Dr(e){this._internalRoot=e}Dr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ji();e={blockedOn:null,target:e,priority:t};for(var s=0;s<is.length&&t!==0&&t<is[s].priority;s++);is.splice(s,0,e),s===0&&a0(e)}};var o0=a.version;if(o0!=="19.2.4")throw Error(o(527,o0,"19.2.4"));$.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 Gx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var kr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kr.isDisabled&&kr.supportsFiber)try{rt=kr.inject(Gx),_t=kr}catch{}}return Hl.createRoot=function(e,t){if(!r(e))throw Error(o(299));var s=!1,i="",c=mp,f=pp,v=gp;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=Zg(e,1,!1,null,null,s,i,null,c,f,v,l0),e[da]=t.current,id(e),new Ed(t)},Hl.hydrateRoot=function(e,t,s){if(!r(e))throw Error(o(299));var i=!1,c="",f=mp,v=pp,x=gp,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&&(x=s.onRecoverableError),s.formState!==void 0&&(E=s.formState)),t=Zg(e,1,!0,t,s??null,i,c,E,f,v,x,l0),t.context=Xg(null),s=t.current,i=Cn(),i=Ks(i),c=qa(i),c.callback=null,Ya(s,c,i),s=i,t.current.lanes=s,La(t,s),aa(t),e[da]=t.current,id(e),new Dr(t)},Hl.version="19.2.4",Hl}var m0;function s_(){if(m0)return Ad.exports;m0=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(),Ad.exports=a_(),Ad.exports}var i_=s_();function an(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Zl(n,a){return console.warn(`[ws] Malformed "${n}" message: ${a}`),!1}function l_(n){return an(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 p0(n){return an(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 g0(n){return an(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 o_(n){return an(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.repoUrl=="string"&&typeof n.defaultEnvironmentId=="string"&&typeof n.status=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function r_(n){return an(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 c_(n){return an(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 u_(n){return an(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const d_=new Set(["off","subscription","api_key"]),Nd=new Set(["off","on"]);function f_(n){return an(n)&&d_.has(n.claude)&&Nd.has(n.github)&&Nd.has(n.copilot)&&Nd.has(n.codex)}function h_(n){return an(n)&&typeof n.environmentId=="string"&&typeof n.stage=="string"&&typeof n.message=="string"&&typeof n.progress=="number"}function m_(n){return an(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function p_(n){return an(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 sa(n,a,l,o){return Array.isArray(n)?n.filter((r,u)=>a(r)?!0:(Zl(l,`item at index ${u} in "${o}" has unexpected shape`),!1)):(Zl(l,`expected "${o}" to be an array, got ${typeof n}`),[])}function g_(n){let a;try{a=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!an(a)||typeof a.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",a);return}return{type:a.type,payload:an(a.payload)?a.payload:void 0}}function v_(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const y_=3e3,Di=5e3;function b_(n){const a=typeof window<"u"&&window.__GRACKLE_API_KEY__||"",l=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}?token=${encodeURIComponent(a)}`:"ws://localhost:3000",o=S.useRef(void 0),[r,u]=S.useState(!1),[d,m]=S.useState([]),[p,g]=S.useState([]),[y,b]=S.useState([]),[_,T]=S.useState(0),[j,A]=S.useState(void 0),[w,C]=S.useState([]),[z,R]=S.useState([]),[Q,I]=S.useState([]),[W,ee]=S.useState([]),[q,ae]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[ye,B]=S.useState({}),[me,ne]=S.useState([]),[_e,G]=S.useState(""),[U,$]=S.useState(""),[te,De]=S.useState(!1),[Ce,Ye]=S.useState([]),[ke,Se]=S.useState({}),[je,J]=S.useState(!1),[Y,ve]=S.useState(void 0),H=S.useCallback(se=>{var pe;((pe=o.current)==null?void 0:pe.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(se))},[]);S.useEffect(()=>{let se,pe;function oe(){se=new WebSocket(l),o.current=se,se.onopen=()=>{u(!0),H({type:"list_environments"}),H({type:"list_sessions"}),H({type:"list_projects"}),H({type:"list_tokens"}),H({type:"get_credential_providers"}),H({type:"list_personas"}),H({type:"subscribe_all"})},se.onmessage=we=>{var nt,dn,Fs,La,vo,Zi,Xi,Qi,Ks,$s,Ji,Wi,$n,Ot,Ft,da,Zs,yo,bo;if(typeof we.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const F=g_(we.data);if(F)switch(F.type){case"environments":m(sa((nt=F.payload)==null?void 0:nt.environments,l_,"environments","environments"));break;case"sessions":g(le=>{var en;const ze=sa((en=F.payload)==null?void 0:en.sessions,p0,"sessions","sessions"),Le=new Map(le.map(ht=>[ht.id,ht.status])),Oe=new Set(["pending","running","idle"]),Wt=new Set(["completed","failed","interrupted"]);return ze.map(ht=>{const He=Le.get(ht.id);if(!He||He===ht.status)return ht;if(Wt.has(He)&&Oe.has(ht.status))return{...ht,status:He};if(Oe.has(He)&&Oe.has(ht.status)){const Ua=["pending","running","idle"];if(Ua.indexOf(He)>Ua.indexOf(ht.status))return{...ht,status:He}}return ht})});break;case"session_event":{if(!g0(F.payload)){Zl("session_event","payload is not a valid SessionEvent");break}const le=F.payload;let ze=0;if(b(Le=>{const Oe=[...Le,le];return Oe.length>Di?(ze=Oe.length-Di,Oe.slice(-Di)):Oe}),ze>0&&T(Le=>Le+ze),le.eventType==="status"){const Le=v_(le.content);g(Oe=>Oe.some(en=>en.id===le.sessionId)?Oe.map(en=>en.id===le.sessionId?{...en,status:Le}:en):[...Oe,{id:le.sessionId,environmentId:"",runtime:"",status:Le,prompt:"",startedAt:le.timestamp}])}break}case"session_events":{const le=sa((dn=F.payload)==null?void 0:dn.events,g0,"session_events","events"),ze=(Fs=F.payload)==null?void 0:Fs.sessionId;if(typeof ze!="string"){Zl("session_events","missing or non-string sessionId");break}if(le.length>0){let Le=0;b(Oe=>{const Wt=new Set;for(const He of Oe)He.sessionId===ze&&Wt.add(`${He.timestamp}|${He.eventType}`);const en=le.filter(He=>!Wt.has(`${He.timestamp}|${He.eventType}`)),ht=[...Oe,...en].sort((He,Ua)=>He.sessionId!==Ua.sessionId?0:He.timestamp.localeCompare(Ua.timestamp));return ht.length>Di?(Le=ht.length-Di,ht.slice(-Di)):ht}),Le>0&&T(Oe=>Oe+Le)}break}case"spawned":{const le=(La=F.payload)==null?void 0:La.sessionId;typeof le=="string"&&le&&A(le),H({type:"list_sessions"});break}case"projects":C(sa((vo=F.payload)==null?void 0:vo.projects,o_,"projects","projects"));break;case"project_created":J(!1),H({type:"list_projects"});break;case"project_archived":H({type:"list_projects"});break;case"project_updated":H({type:"list_projects"});break;case"tasks":{const le=sa((Zi=F.payload)==null?void 0:Zi.tasks,r_,"tasks","tasks"),ze=(typeof((Xi=F.payload)==null?void 0:Xi.projectId)=="string"?F.payload.projectId:"")||(le.length>0?le[0].projectId:"");if(!ze){R(le);break}R(Le=>[...Le.filter(Oe=>Oe.projectId!==ze),...le]);break}case"task_created":{const le=(Qi=F.payload)==null?void 0:Qi.task;if(an(le)){const ze=typeof le.project_id=="string"?le.project_id:typeof le.projectId=="string"?le.projectId:"";ze&&H({type:"list_tasks",payload:{projectId:ze}})}break}case"task_started":{const le=F.payload;if(!an(le))break;ve(Le=>le.taskId&&Le===le.taskId?void 0:Le),le.sessionId&&(H({type:"list_sessions"}),typeof le.taskId=="string"&&typeof le.sessionId=="string"&&R(Le=>Le.map(Oe=>Oe.id===le.taskId?{...Oe,latestSessionId:le.sessionId}:Oe)));const ze=typeof le.projectId=="string"?le.projectId:void 0;ze?H({type:"list_tasks",payload:{projectId:ze}}):le.taskId&&R(Le=>{const Oe=Le.find(Wt=>Wt.id===le.taskId);return Oe&&H({type:"list_tasks",payload:{projectId:Oe.projectId}}),Le});break}case"task_completed":case"task_deleted":case"task_updated":{const le=F.payload;if(!an(le))break;const ze=typeof le.projectId=="string"?le.projectId:void 0;ze?H({type:"list_tasks",payload:{projectId:ze}}):le.taskId&&R(Le=>{const Oe=Le.find(Wt=>Wt.id===le.taskId);return Oe&&H({type:"list_tasks",payload:{projectId:Oe.projectId}}),Le});break}case"findings":I(sa((Ks=F.payload)==null?void 0:Ks.findings,c_,"findings","findings"));break;case"finding_posted":typeof(($s=F.payload)==null?void 0:$s.projectId)=="string"&&H({type:"list_findings",payload:{projectId:F.payload.projectId}});break;case"tokens":ee(sa((Ji=F.payload)==null?void 0:Ji.tokens,u_,"tokens","tokens"));break;case"token_changed":H({type:"list_tokens"});break;case"credential_providers":f_(F.payload)&&ae(F.payload);break;case"provision_progress":{if(!h_(F.payload)){Zl("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const le=F.payload;B(ze=>({...ze,[le.environmentId]:{stage:le.stage,message:le.message,progress:le.progress}})),le.stage==="ready"&&setTimeout(()=>{B(Le=>{const Oe={...Le};return delete Oe[le.environmentId],Oe})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((Wi=F.payload)==null?void 0:Wi.environmentId)=="string"){const le=F.payload.environmentId;m(ze=>ze.filter(Le=>Le.id!==le)),B(ze=>{const Le={...ze};return delete Le[le],Le})}H({type:"list_sessions"});break;case"codespaces_list":{const le=sa(($n=F.payload)==null?void 0:$n.codespaces,m_,"codespaces_list","codespaces"),ze=typeof((Ot=F.payload)==null?void 0:Ot.error)=="string"?F.payload.error:"";ne(le),$(ze);break}case"codespace_created":{De(!1),H({type:"list_codespaces"});break}case"codespace_create_error":{De(!1);const le=typeof((Ft=F.payload)==null?void 0:Ft.message)=="string"?F.payload.message:"Failed to create codespace";G(le);break}case"personas":{const le=sa((da=F.payload)==null?void 0:da.personas,p_,"personas","personas");Ye(le);break}case"persona_created":case"persona_updated":case"persona_deleted":H({type:"list_personas"});break;case"task_sessions":{const le=(Zs=F.payload)==null?void 0:Zs.taskId;if(typeof le!="string"||!le)break;const ze=sa((yo=F.payload)==null?void 0:yo.sessions,p0,"task_sessions","sessions");Se(Le=>({...Le,[le]:ze}));break}case"error":console.error("[ws]",(bo=F.payload)==null?void 0:bo.message);break}},se.onclose=()=>{u(!1),o.current=void 0,J(!1),ve(void 0),clearTimeout(pe),pe=setTimeout(oe,y_)},se.onerror=()=>{se.close()}}return oe(),()=>{clearTimeout(pe),se==null||se.close()}},[l,H]);const Fe=S.useCallback((se,pe,oe,we,F,nt)=>{H({type:"spawn",payload:{environmentId:se,prompt:pe,model:oe||"",runtime:we||"",personaId:F||"",worktreeBasePath:nt||""}})},[H]),gt=S.useCallback((se,pe)=>{H({type:"send_input",payload:{sessionId:se,text:pe}})},[H]),St=S.useCallback(se=>{H({type:"kill",payload:{sessionId:se}})},[H]),It=S.useCallback(()=>{H({type:"list_environments"}),H({type:"list_sessions"}),H({type:"list_projects"}),H({type:"list_tokens"})},[H]),Je=S.useCallback(se=>{H({type:"get_session_events",payload:{sessionId:se}})},[H]),Ze=S.useCallback(()=>{b([]),T(0)},[]),Ue=S.useCallback((se,pe,oe,we)=>{J(!0),H({type:"create_project",payload:{name:se,description:pe||"",repoUrl:oe||"",defaultEnvironmentId:we||""}})},[H]),yn=S.useCallback(se=>{H({type:"archive_project",payload:{projectId:se}})},[H]),bn=S.useCallback((se,pe)=>{H({type:"update_project",payload:{projectId:se,...pe}})},[H]),Yn=S.useCallback(se=>{H({type:"list_tasks",payload:{projectId:se}})},[H]),Jt=S.useCallback((se,pe,oe,we,F)=>{H({type:"create_task",payload:{projectId:se,title:pe,description:oe||"",dependsOn:we||[],parentTaskId:F||""}})},[H]),Fn=S.useCallback((se,pe,oe,we,F,nt)=>{ve(se),H({type:"start_task",payload:{taskId:se,runtime:pe||"",model:oe||"",personaId:we||"",environmentId:F||"",notes:nt||""}})},[H]),X=S.useCallback(se=>{H({type:"complete_task",payload:{taskId:se}})},[H]),ie=S.useCallback(se=>{H({type:"resume_task",payload:{taskId:se}})},[H]),re=S.useCallback((se,pe,oe,we)=>{H({type:"update_task",payload:{taskId:se,title:pe,description:oe,dependsOn:we}})},[H]),ue=S.useCallback(se=>{H({type:"delete_task",payload:{taskId:se}})},[H]),Te=S.useCallback(se=>{H({type:"list_findings",payload:{projectId:se}})},[H]),Ee=S.useCallback((se,pe,oe,we,F)=>{H({type:"post_finding",payload:{projectId:se,title:pe,content:oe,category:we||"general",tags:F||[]}})},[H]),We=S.useCallback(()=>{H({type:"list_tokens"})},[H]),Be=S.useCallback((se,pe,oe,we,F)=>{H({type:"set_token",payload:{name:se,value:pe,tokenType:oe,envVar:we,filePath:F}})},[H]),ot=S.useCallback(se=>{H({type:"delete_token",payload:{name:se}})},[H]),jt=S.useCallback(se=>{H({type:"set_credential_providers",payload:se})},[H]),xt=S.useCallback((se,pe,oe,we)=>{const F={displayName:se,adapterType:pe,adapterConfig:oe||{}};we&&(F.defaultRuntime=we),H({type:"add_environment",payload:F})},[H]),Mt=S.useCallback(se=>{H({type:"provision_environment",payload:{environmentId:se}})},[H]),rt=S.useCallback(se=>{H({type:"stop_environment",payload:{environmentId:se}})},[H]),_t=S.useCallback(se=>{H({type:"remove_environment",payload:{environmentId:se}})},[H]),ln=S.useCallback(()=>{H({type:"list_codespaces"})},[H]),vt=S.useCallback((se,pe)=>{if(!r){G("Not connected to server. Please try again once the connection is restored.");return}De(!0),G("");const oe={repo:se};pe&&(oe.machine=pe),H({type:"create_codespace",payload:oe})},[H,r]),Pt=S.useCallback((se,pe,oe,we,F,nt)=>{H({type:"create_persona",payload:{name:se,description:pe,systemPrompt:oe,runtime:we||"",model:F||"",maxTurns:nt||0}})},[H]),qt=S.useCallback((se,pe,oe,we,F,nt,dn)=>{H({type:"update_persona",payload:{personaId:se,name:pe||"",description:oe||"",systemPrompt:we||"",runtime:F||"",model:nt||"",maxTurns:dn||0}})},[H]),ps=S.useCallback(se=>{H({type:"delete_persona",payload:{personaId:se}})},[H]),Kn=S.useCallback(se=>{H({type:"get_task_sessions",payload:{taskId:se}})},[H]);return{connected:r,environments:d,sessions:p,events:y,eventsDropped:_,lastSpawnedId:j,projects:w,tasks:z,findings:Q,tokens:W,spawn:Fe,sendInput:gt,kill:St,refresh:It,loadSessionEvents:Je,clearEvents:Ze,createProject:Ue,archiveProject:yn,updateProject:bn,loadTasks:Yn,createTask:Jt,startTask:Fn,completeTask:X,resumeTask:ie,updateTask:re,deleteTask:ue,loadFindings:Te,postFinding:Ee,addEnvironment:xt,loadTokens:We,setToken:Be,deleteToken:ot,credentialProviders:q,updateCredentialProviders:jt,provisionStatus:ye,provisionEnvironment:Mt,stopEnvironment:rt,removeEnvironment:_t,codespaces:me,codespaceError:_e,codespaceListError:U,codespaceCreating:te,listCodespaces:ln,createCodespace:vt,projectCreating:je,taskStartingId:Y,personas:Ce,createPersona:Pt,updatePersona:qt,deletePersona:ps,taskSessions:ke,loadTaskSessions:Kn}}const Df=S.createContext(void 0);function S_({children:n}){const a=b_();return h.jsx(Df.Provider,{value:a,children:n})}function sn(){const n=S.useContext(Df);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const x_=[{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}],__=[{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"}],T_=[{sessionId:"sess-001-prev",eventType:"status",timestamp:"2026-02-26T14:00:01Z",content:"running"},{sessionId:"sess-001-prev",eventType:"output",timestamp:"2026-02-26T14:00:05Z",content:"Reading src/middleware/auth.ts to understand the current authentication flow..."},{sessionId:"sess-001-prev",eventType:"error",timestamp:"2026-02-26T15:12:00Z",content:"Context window exceeded before completing implementation"},{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
|
|
26
|
+
- src/middleware/auth.ts
|
|
27
|
+
- src/routes/login.ts
|
|
28
|
+
- src/routes/protected.ts`},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:07Z",content:"Installing jsonwebtoken and @types/jsonwebtoken..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:12Z",content:`Rewriting auth middleware:
|
|
29
|
+
\`\`\`typescript
|
|
30
|
+
import jwt from "jsonwebtoken";
|
|
31
|
+
import type { Request, Response, NextFunction } from "express";
|
|
32
|
+
|
|
33
|
+
const JWT_SECRET = process.env.JWT_SECRET || "change-me";
|
|
34
|
+
|
|
35
|
+
export function verifyToken(req: Request, res: Response, next: NextFunction): void {
|
|
36
|
+
const header = req.headers.authorization;
|
|
37
|
+
if (!header?.startsWith("Bearer ")) {
|
|
38
|
+
res.status(401).json({ error: "Missing token" });
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
const decoded = jwt.verify(header.slice(7), JWT_SECRET);
|
|
43
|
+
req.user = decoded;
|
|
44
|
+
next();
|
|
45
|
+
} catch {
|
|
46
|
+
res.status(403).json({ error: "Invalid token" });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
\`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],E_=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",worktreeBasePath:"",createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",worktreeBasePath:"",createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",worktreeBasePath:"",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],A_=[{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}],v0=[{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"}],C_=[{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:""}],j_=[{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"}],N_={"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 Gt(n){return new Date(Date.now()+n).toISOString()}const y0=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Gt(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Gt(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Gt(1600),content:`Found 5 endpoints that need refactoring:
|
|
50
|
+
- GET /api/users
|
|
51
|
+
- POST /api/users
|
|
52
|
+
- GET /api/users/:id
|
|
53
|
+
- PUT /api/users/:id
|
|
54
|
+
- DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:Gt(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:Gt(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Gt(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Gt(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Gt(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Gt(1400),content:`Found tables to modify:
|
|
55
|
+
- users (add column: last_login_at)
|
|
56
|
+
- sessions (add index on expires_at)
|
|
57
|
+
- audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:Gt(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
|
|
58
|
+
The table has 50,000+ rows — this may lock the table briefly.
|
|
59
|
+
|
|
60
|
+
Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:Gt(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Gt(1e3),content:`Migration 001_add_last_login.sql applied successfully.
|
|
61
|
+
Migration 002_sessions_index.sql applied successfully.
|
|
62
|
+
Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:Gt(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Gt(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Gt(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Gt(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Gt(1800),content:`Writing test cases:
|
|
63
|
+
- should calculate monthly total
|
|
64
|
+
- should apply discount codes
|
|
65
|
+
- should handle currency conversion
|
|
66
|
+
- should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:Gt(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
|
|
67
|
+
The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:Gt(3500),content:"failed"}}]}],b0=400;function w_({children:n}){const[a,l]=S.useState(__),[o,r]=S.useState(T_),[u,d]=S.useState(void 0),[m,p]=S.useState(E_),[g,y]=S.useState(A_),[b,_]=S.useState(v0),[T,j]=S.useState(C_),[A,w]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[C,z]=S.useState(j_),[R]=S.useState(N_),Q=S.useRef(0),I=S.useRef(0),W=S.useRef(new Set),ee=S.useRef(new Map),q=S.useRef(g);q.current=g;const ae=S.useRef(new Map),ye=S.useRef(new Map),B=S.useCallback(X=>(Q.current+=1,`mock-${X}-${String(Q.current).padStart(3,"0")}`),[]),me=S.useCallback(()=>{const X=y0[I.current%y0.length];return I.current+=1,X},[]),ne=S.useCallback((X,ie,re)=>{const ue=setTimeout(()=>{var Te;W.current.delete(ue),re&&((Te=ee.current.get(re))==null||Te.delete(ue)),X()},ie);W.current.add(ue),re&&(ee.current.has(re)||ee.current.set(re,new Set),ee.current.get(re).add(ue))},[]),_e=S.useCallback(X=>{const ie=ee.current.get(X);ie&&(ie.forEach(re=>{clearTimeout(re),W.current.delete(re)}),ee.current.delete(X))},[]),G=S.useCallback((X,ie)=>{l(re=>re.map(ue=>ue.id===X?{...ue,status:ie}:ue))},[]),U=S.useCallback(X=>{r(ie=>[...ie,X])},[]),$=S.useCallback((X,ie,re)=>{ie.forEach((ue,Te)=>{ne(()=>{const Ee={sessionId:X,...ue.event,timestamp:new Date().toISOString()};U(Ee),ue.event.eventType==="status"&&G(X,ue.event.content),Te===ie.length-1&&re&&re()},ue.delayMs,X)})},[ne,U,G]),te=S.useCallback((X,ie,re,ue)=>{console.log("[MockGrackle] spawn",{environmentId:X,prompt:ie,runtime:ue});const Te=B("sess"),Ee={id:Te,environmentId:X,runtime:ue||"claude-code",status:"running",prompt:ie,startedAt:new Date().toISOString()};l(Be=>[...Be,Ee]),d(Te);const We=me();if(console.log(`[MockGrackle] Playing scenario: ${We.label}`),We.pauseForInput){const Be=We.pauseAfterStep??We.steps.length-1,ot=We.steps.slice(0,Be+1),jt=ot.length>0?ot[ot.length-1].delayMs:0;$(Te,ot),ne(()=>{G(Te,"idle"),U({sessionId:Te,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},jt+b0,Te),We.resumeSteps&&ae.current.set(Te,We.resumeSteps)}else $(Te,We.steps)},[B,me,$,ne,G,U]),De=S.useCallback(X=>{console.log("[MockGrackle] kill",X),_e(X),ae.current.delete(X),G(X,"interrupted"),U({sessionId:X,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),y(ie=>ie.map(re=>re.latestSessionId===X&&re.status==="working"?{...re,status:"not_started"}:re))},[_e,G,U]),Ce=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),Ye=S.useCallback(X=>{console.log("[MockGrackle] loadSessionEvents",X)},[]),ke=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),r([])},[]),Se=S.useCallback((X,ie,re,ue)=>{console.log("[MockGrackle] createProject",{name:X,description:ie});const Te={id:B("proj"),name:X,description:ie||"",repoUrl:re||"",defaultEnvironmentId:ue||"",status:"active",worktreeBasePath:"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(Ee=>[...Ee,Te])},[B]),je=S.useCallback(X=>{console.log("[MockGrackle] archiveProject",X),p(ie=>ie.map(re=>re.id===X?{...re,status:"archived"}:re))},[]),J=S.useCallback(X=>{console.log("[MockGrackle] loadTasks",X)},[]),Y=S.useCallback((X,ie,re,ue,Te)=>{console.log("[MockGrackle] createTask",{projectId:X,title:ie,parentTaskId:Te}),y(Ee=>{const Be=Ee.filter(Mt=>Mt.projectId===X).reduce((Mt,rt)=>Math.max(Mt,rt.sortOrder),0),ot=Te?Ee.find(Mt=>Mt.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 jt=ot?ot.depth+1:0,xt={id:B("task"),projectId:X,title:ie,description:re||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:ue||[],reviewNotes:void 0,sortOrder:Be+1,createdAt:new Date().toISOString(),parentTaskId:Te||"",depth:jt,childTaskIds:[],canDecompose:!Te};return[...Ee,xt]})},[B]),ve=S.useCallback((X,ie,re)=>{var ot;console.log("[MockGrackle] startTask",{taskId:X,runtime:ie});const ue=q.current.find(jt=>jt.id===X),Te=(ue==null?void 0:ue.title)??"",Ee=B("sess"),We={id:Ee,environmentId:"env-local-01",runtime:ie||"claude-code",status:"running",prompt:Te||X,startedAt:new Date().toISOString()};l(jt=>[...jt,We]),y(jt=>jt.map(xt=>xt.id===X?{...xt,status:"working",latestSessionId:Ee,branch:`mock/${X.slice(0,8)}`}:xt));const Be=me();if(console.log(`[MockGrackle] Playing task scenario: ${Be.label}`),Be.pauseForInput){const jt=Be.pauseAfterStep??Be.steps.length-1,xt=Be.steps.slice(0,jt+1),Mt=xt.length>0?xt[xt.length-1].delayMs:0;if($(Ee,xt),ne(()=>{G(Ee,"idle"),U({sessionId:Ee,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Mt+b0,Ee),Be.resumeSteps){const rt=[...Be.resumeSteps];ae.current.set(Ee,rt);const _t=rt.reduce((ln,vt)=>Math.max(ln,vt.delayMs),0);ye.current.set(Ee,{taskId:X,delayAfterResume:_t+200})}}else{const jt=Be.steps.length>0?Be.steps[Be.steps.length-1].delayMs:0;$(Ee,Be.steps);const xt=(ot=Be.steps[Be.steps.length-1])==null?void 0:ot.event.content;ne(()=>{xt==="completed"?y(Mt=>Mt.map(rt=>rt.id===X&&rt.status==="working"?{...rt,status:"paused"}:rt)):xt==="failed"&&y(Mt=>Mt.map(rt=>rt.id===X&&rt.status==="working"?{...rt,status:"failed"}:rt))},jt+100,Ee)}},[B,me,$,ne,G,U]),H=S.useCallback((X,ie)=>{console.log("[MockGrackle] sendInput",{sessionId:X,text:ie}),U({sessionId:X,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${ie}`}),G(X,"running"),U({sessionId:X,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const re=ae.current.get(X);if(re)ae.current.delete(X),$(X,re);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"}}];$(X,Te)}const ue=ye.current.get(X);ue&&(ye.current.delete(X),ne(()=>{y(Te=>Te.map(Ee=>Ee.id===ue.taskId&&Ee.status==="working"?{...Ee,status:"paused"}:Ee))},ue.delayAfterResume,X))},[U,G,$,ne]),Fe=S.useCallback(X=>{console.log("[MockGrackle] completeTask",X),y(ie=>ie.map(re=>re.id===X?{...re,status:"complete"}:re))},[]),gt=S.useCallback(X=>{console.log("[MockGrackle] resumeTask",X)},[]),St=S.useCallback((X,ie,re,ue)=>{console.log("[MockGrackle] updateTask",{taskId:X,title:ie}),y(Te=>Te.map(Ee=>Ee.id===X?{...Ee,title:ie.trim()||Ee.title,description:re,dependsOn:ue}:Ee))},[]),It=S.useCallback(X=>{console.log("[MockGrackle] deleteTask",X),y(ie=>ie.filter(re=>re.id!==X))},[]),Je=S.useCallback(X=>{console.log("[MockGrackle] loadFindings",X),_(v0.filter(ie=>ie.projectId===X))},[]),Ze=S.useCallback((X,ie,re,ue,Te)=>{console.log("[MockGrackle] postFinding",{projectId:X,title:ie});const Ee={id:B("find"),projectId:X,taskId:"",sessionId:"",category:ue||"general",title:ie,content:re,tags:Te||[],createdAt:new Date().toISOString()};_(We=>[...We,Ee])},[B]),Ue=S.useCallback((X,ie,re,ue)=>{console.log("[MockGrackle] addEnvironment",{displayName:X,adapterType:ie,adapterConfig:re,defaultRuntime:ue})},[]),yn=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),bn=S.useCallback((X,ie,re,ue,Te)=>{console.log("[MockGrackle] setToken",{name:X,tokenType:re}),j(Ee=>[...Ee.filter(Be=>Be.name!==X),{name:X,tokenType:re,envVar:ue,filePath:Te,expiresAt:""}])},[]),Yn=S.useCallback(X=>{console.log("[MockGrackle] deleteToken",X),j(ie=>ie.filter(re=>re.name!==X))},[]),Jt=S.useCallback(X=>{console.log("[MockGrackle] updateCredentialProviders",X),w(X)},[]);S.useEffect(()=>()=>{W.current.forEach(clearTimeout),W.current.clear()},[]);const Fn=S.useMemo(()=>({connected:!0,environments:x_,sessions:a,events:o,eventsDropped:0,lastSpawnedId:u,projects:m,tasks:g,findings:b,tokens:T,credentialProviders:A,spawn:te,sendInput:H,kill:De,refresh:Ce,loadSessionEvents:Ye,clearEvents:ke,createProject:Se,archiveProject:je,updateProject:(X,ie)=>{console.log("[MockGrackle] updateProject",{projectId:X,...ie}),p(re=>re.map(ue=>ue.id!==X?ue:{...ue,...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}:{},updatedAt:new Date().toISOString()}))},loadTasks:J,createTask:Y,startTask:ve,completeTask:Fe,resumeTask:gt,updateTask:St,deleteTask:It,loadFindings:Je,postFinding:Ze,addEnvironment:Ue,loadTokens:yn,setToken:bn,deleteToken:Yn,updateCredentialProviders:Jt,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:C,createPersona:(X,ie,re,ue,Te,Ee)=>{console.log("[MockGrackle] createPersona",{name:X});const We={id:`mock-persona-${Date.now()}`,name:X,description:ie,systemPrompt:re,toolConfig:"{}",runtime:ue??"claude-code",model:Te||"",maxTurns:Ee||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};z(Be=>[...Be,We])},updatePersona:(X,ie,re,ue,Te,Ee,We)=>{console.log("[MockGrackle] updatePersona",{personaId:X,name:ie}),z(Be=>Be.map(ot=>ot.id!==X?ot:{...ot,...ie!==void 0?{name:ie}:{},...re!==void 0?{description:re}:{},...ue!==void 0?{systemPrompt:ue}:{},...Te!==void 0?{runtime:Te}:{},...Ee!==void 0?{model:Ee}:{},...We!==void 0?{maxTurns:We}:{},updatedAt:new Date().toISOString()}))},deletePersona:X=>{console.log("[MockGrackle] deletePersona",X),z(ie=>ie.filter(re=>re.id!==X))},taskSessions:R,loadTaskSessions:X=>{console.log("[MockGrackle] loadTaskSessions",X)}}),[a,o,u,m,g,b,T,A,C,R,te,H,De,Ce,Ye,ke,Se,je,J,Y,ve,Fe,gt,St,It,Je,Ze,Ue,yn,bn,Yn,Jt]);return h.jsx(Df.Provider,{value:Fn,children:n})}const fy=S.createContext(void 0),D_=4e3;function k_({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=D_)=>{const g=`toast-${++o.current}`;l(y=>[...y,{id:g,message:d,variant:m,duration:p}])},[]);return h.jsx(fy.Provider,{value:{toasts:a,showToast:u,dismissToast:r},children:n})}function co(){const n=S.useContext(fy);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const ic=[{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"]}],hy=new Set(ic.map(n=>n.id)),S0="grackle";function Qd(n){return ic.find(a=>a.id===n)}const Jd="grackle-theme",my="grackle-prefer-system",py="(prefers-color-scheme: dark)";let Yl=[],Hr;function wd(){Hr=void 0;for(const n of Yl)n()}function Wd(){return typeof window>"u"?!1:window.matchMedia(py).matches}function Xl(){if(typeof localStorage>"u")return S0;try{const n=localStorage.getItem(Jd);if(n!==null&&hy.has(n))return n}catch{}return S0}function $r(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(my)==="true"}catch{return!1}}function ef(n){return ic.find(a=>a.variantLightId===n||a.variantDarkId===n)}function gy(n,a){const l=Qd(n);if(l!=null&&l.variantDarkId)return a&&l.variantLightId?Wd()?l.variantDarkId:l.variantLightId:l.variantDarkId;if(l!=null&&l.hidden&&a){const o=ef(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return Wd()?o.variantDarkId:o.variantLightId}return n}function Ri(n,a,l=!1){l&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=gy(n,a),l&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Ri(Xl(),$r());function R_(){return Hr===void 0&&(Hr={themeId:Xl(),systemDark:Wd(),preferSystem:$r()}),Hr}function M_(n){return Yl=[...Yl,n],()=>{Yl=Yl.filter(a=>a!==n)}}function O_(){const n=S.useSyncExternalStore(M_,R_),{themeId:a,preferSystem:l}=n,o=gy(a,l),r=S.useCallback(d=>{if(hy.has(d)){try{localStorage.setItem(Jd,d)}catch{}Ri(d,$r(),!0),wd()}},[]),u=S.useCallback(d=>{try{localStorage.setItem(my,d?"true":"false")}catch{}if(d){const m=Xl(),p=Qd(m);if(p!=null&&p.hidden){const g=ef(m);if(g)try{localStorage.setItem(Jd,g.id)}catch{}}}Ri(Xl(),d,!0),wd()},[]);return S.useEffect(()=>{Ri(a,l)},[a,l]),S.useEffect(()=>{if(typeof window>"u")return;const d=window.matchMedia(py),m=()=>{const p=Xl(),g=$r();if(g){const y=Qd(p);if(y!=null&&y.variantDarkId&&y.variantLightId&&Ri(p,g),y!=null&&y.hidden){const b=ef(p);b!=null&&b.variantDarkId&&b.variantLightId&&Ri(p,g)}}wd()};return d.addEventListener("change",m),()=>{d.removeEventListener("change",m)}},[]),{themeId:a,setTheme:r,resolvedThemeId:o,preferSystem:l,setPreferSystem:u}}const vy=S.createContext(void 0);function B_({children:n}){const a=O_();return h.jsx(vy.Provider,{value:a,children:n})}function yy(){const n=S.useContext(vy);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}/**
|
|
68
|
+
* react-router v7.13.1
|
|
69
|
+
*
|
|
70
|
+
* Copyright (c) Remix Software Inc.
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the MIT license found in the
|
|
73
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
74
|
+
*
|
|
75
|
+
* @license MIT
|
|
76
|
+
*/var x0="popstate";function _0(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function L_(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 tf("",{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:to(r)}return z_(a,l,null,n)}function dt(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Pn(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function U_(){return Math.random().toString(36).substring(2,10)}function T0(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 tf(n,a,l=null,o,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Pi(a):a,state:l,key:a&&a.key||o||U_(),unstable_mask:r}}function to({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 Pi(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 z_(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 w=y(),C=w==null?null:w-g;g=w,p&&p({action:m,location:A.location,delta:C})}function _(w,C){m="PUSH";let z=_0(w)?w:tf(A.location,w,C);g=y()+1;let R=T0(z,g),Q=A.createHref(z.unstable_mask||z);try{d.pushState(R,"",Q)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;r.location.assign(Q)}u&&p&&p({action:m,location:A.location,delta:1})}function T(w,C){m="REPLACE";let z=_0(w)?w:tf(A.location,w,C);g=y();let R=T0(z,g),Q=A.createHref(z.unstable_mask||z);d.replaceState(R,"",Q),u&&p&&p({action:m,location:A.location,delta:0})}function j(w){return V_(w)}let A={get action(){return m},get location(){return n(r,d)},listen(w){if(p)throw new Error("A history only accepts one active listener");return r.addEventListener(x0,b),p=w,()=>{r.removeEventListener(x0,b),p=null}},createHref(w){return a(r,w)},createURL:j,encodeLocation(w){let C=j(w);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:_,replace:T,go(w){return d.go(w)}};return A}function V_(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:to(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=l+o),new URL(o,l)}function by(n,a,l="/"){return I_(n,a,l,!1)}function I_(n,a,l,o){let r=typeof a=="string"?Pi(a):a,u=Ma(r.pathname||"/",l);if(u==null)return null;let d=Sy(n);H_(d);let m=null;for(let p=0;m==null&&p<d.length;++p){let g=_y(u);m=X_(d[p],g,o)}return m}function Sy(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=oa([o,y.relativePath]),_=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}".`),Sy(d.children,a,_,b,p)),!(d.path==null&&!d.index)&&a.push({path:b,score:$_(b,d.index),routesMeta:_})};return n.forEach((d,m)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))u(d,m);else for(let g of xy(d.path))u(d,m,!0,g)}),a}function xy(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=xy(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 H_(n){n.sort((a,l)=>a.score!==l.score?l.score-a.score:Z_(a.routesMeta.map(o=>o.childrenIndex),l.routesMeta.map(o=>o.childrenIndex)))}var G_=/^:[\w-]+$/,P_=3,q_=2,Y_=1,F_=10,K_=-2,E0=n=>n==="*";function $_(n,a){let l=n.split("/"),o=l.length;return l.some(E0)&&(o+=K_),a&&(o+=q_),l.filter(r=>!E0(r)).reduce((r,u)=>r+(G_.test(u)?P_:u===""?Y_:F_),o)}function Z_(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 X_(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=no({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},y),_=p.route;if(!b&&g&&l&&!o[o.length-1].route.index&&(b=no({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!b)return null;Object.assign(r,b.params),d.push({params:r,pathname:oa([u,b.pathname]),pathnameBase:tT(oa([u,b.pathnameBase])),route:_}),b.pathnameBase!=="/"&&(u=oa([u,b.pathnameBase]))}return d}function no(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,o]=Q_(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},_)=>{if(y==="*"){let j=m[_]||"";d=u.slice(0,u.length-j.length).replace(/(.)\/+$/,"$1")}const T=m[_];return b&&!T?g[y]=void 0:g[y]=(T||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:d,pattern:n}}function Q_(n,a=!1,l=!0){Pn(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 _y(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Pn(!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 Ma(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 J_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function W_(n,a="/"){let{pathname:l,search:o="",hash:r=""}=typeof n=="string"?Pi(n):n,u;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?u=A0(l.substring(1),"/"):u=A0(l,a)):u=a,{pathname:u,search:nT(o),hash:aT(r)}}function A0(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 Dd(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 eT(n){return n.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function kf(n){let a=eT(n);return a.map((l,o)=>o===a.length-1?l.pathname:l.pathnameBase)}function lc(n,a,l,o=!1){let r;typeof n=="string"?r=Pi(n):(r={...n},dt(!r.pathname||!r.pathname.includes("?"),Dd("?","pathname","search",r)),dt(!r.pathname||!r.pathname.includes("#"),Dd("#","pathname","hash",r)),dt(!r.search||!r.search.includes("#"),Dd("#","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 _=d.split("/");for(;_[0]==="..";)_.shift(),b-=1;r.pathname=_.join("/")}m=b>=0?a[b]:"/"}let p=W_(r,m),g=d&&d!=="/"&&d.endsWith("/"),y=(u||d===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(g||y)&&(p.pathname+="/"),p}var oa=n=>n.join("/").replace(/\/\/+/g,"/"),tT=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),nT=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,aT=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,sT=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 iT(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function lT(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ty=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ey(n,a){let l=n;if(typeof l!="string"||!J_.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let o=l,r=!1;if(Ty)try{let u=new URL(window.location.href),d=l.startsWith("//")?new URL(u.protocol+l):new URL(l),m=Ma(d.pathname,a);d.origin===u.origin&&m!=null?l=m+d.search+d.hash:r=!0}catch{Pn(!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 Ay=["POST","PUT","PATCH","DELETE"];new Set(Ay);var oT=["GET",...Ay];new Set(oT);var qi=S.createContext(null);qi.displayName="DataRouter";var oc=S.createContext(null);oc.displayName="DataRouterState";var rT=S.createContext(!1),Cy=S.createContext({isTransitioning:!1});Cy.displayName="ViewTransition";var cT=S.createContext(new Map);cT.displayName="Fetchers";var uT=S.createContext(null);uT.displayName="Await";var Dn=S.createContext(null);Dn.displayName="Navigation";var uo=S.createContext(null);uo.displayName="Location";var qn=S.createContext({outlet:null,matches:[],isDataRoute:!1});qn.displayName="Route";var Rf=S.createContext(null);Rf.displayName="RouteError";var jy="REACT_ROUTER_ERROR",dT="REDIRECT",fT="ROUTE_ERROR_RESPONSE";function hT(n){if(n.startsWith(`${jy}:${dT}:{`))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 mT(n){if(n.startsWith(`${jy}:${fT}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new sT(a.status,a.statusText,a.data)}catch{}}function pT(n,{relative:a}={}){dt(Ps(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:o}=S.useContext(Dn),{hash:r,pathname:u,search:d}=fo(n,{relative:a}),m=u;return l!=="/"&&(m=u==="/"?l:oa([l,u])),o.createHref({pathname:m,search:d,hash:r})}function Ps(){return S.useContext(uo)!=null}function un(){return dt(Ps(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(uo).location}function rn(n){dt(Ps(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:a}=un();return S.useMemo(()=>no(n,_y(a)),[a,n])}var Ny="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function wy(n){S.useContext(Dn).static||S.useLayoutEffect(n)}function rc(){let{isDataRoute:n}=S.useContext(qn);return n?DT():gT()}function gT(){dt(Ps(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(qi),{basename:a,navigator:l}=S.useContext(Dn),{matches:o}=S.useContext(qn),{pathname:r}=un(),u=JSON.stringify(kf(o)),d=S.useRef(!1);return wy(()=>{d.current=!0}),S.useCallback((p,g={})=>{if(Pn(d.current,Ny),!d.current)return;if(typeof p=="number"){l.go(p);return}let y=lc(p,JSON.parse(u),r,g.relative==="path");n==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:oa([a,y.pathname])),(g.replace?l.replace:l.push)(y,g.state,g)},[a,l,u,r,n])}var vT=S.createContext(null);function yT(n){let a=S.useContext(qn).outlet;return S.useMemo(()=>a&&S.createElement(vT.Provider,{value:n},a),[a,n])}function cc(){let{matches:n}=S.useContext(qn),a=n[n.length-1];return a?a.params:{}}function fo(n,{relative:a}={}){let{matches:l}=S.useContext(qn),{pathname:o}=un(),r=JSON.stringify(kf(l));return S.useMemo(()=>lc(n,JSON.parse(r),o,a==="path"),[n,r,o,a])}function bT(n,a){return Dy(n,a)}function Dy(n,a,l){var w;dt(Ps(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(Dn),{matches:r}=S.useContext(qn),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||"";Ry(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.
|
|
77
|
+
|
|
78
|
+
Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let y=un(),b;if(a){let C=typeof a=="string"?Pi(a):a;dt(p==="/"||((w=C.pathname)==null?void 0:w.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${C.pathname}" was given in the \`location\` prop.`),b=C}else b=y;let _=b.pathname||"/",T=_;if(p!=="/"){let C=p.replace(/^\//,"").split("/");T="/"+_.replace(/^\//,"").split("/").slice(C.length).join("/")}let j=by(n,{pathname:T});Pn(g||j!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Pn(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.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 A=ET(j&&j.map(C=>Object.assign({},C,{params:Object.assign({},d,C.params),pathname:oa([p,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?p:oa([p,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),r,l);return a&&A?S.createElement(uo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},A):A}function ST(){let n=wT(),a=iT(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 xT=S.createElement(ST,null),ky=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=mT(n.digest);l&&(n=l)}let a=n!==void 0?S.createElement(qn.Provider,{value:this.props.routeContext},S.createElement(Rf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(_T,{error:n},a):a}};ky.contextType=rT;var kd=new WeakMap;function _T({children:n,error:a}){let{basename:l}=S.useContext(Dn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=hT(a.digest);if(o){let r=kd.get(a);if(r)throw r;let u=Ey(o.location,l);if(Ty&&!kd.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 kd.set(a,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return n}function TT({routeContext:n,match:a,children:l}){let o=S.useContext(qi);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(qn.Provider,{value:n},l)}function ET(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:_,errors:T}=o,j=b.route.loader&&!_.hasOwnProperty(b.route.id)&&(!T||T[b.route.id]===void 0);if(b.route.lazy||j){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 _,T;p(y,{location:o.location,params:((T=(_=o.matches)==null?void 0:_[0])==null?void 0:T.params)??{},unstable_pattern:lT(o.matches),errorInfo:b})}:void 0;return r.reduceRight((y,b,_)=>{let T,j=!1,A=null,w=null;o&&(T=u&&b.route.id?u[b.route.id]:void 0,A=b.route.errorElement||xT,d&&(m<0&&_===0?(Ry("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,w=null):m===_&&(j=!0,w=b.route.hydrateFallbackElement||null)));let C=a.concat(r.slice(0,_+1)),z=()=>{let R;return T?R=A:j?R=w:b.route.Component?R=S.createElement(b.route.Component,null):b.route.element?R=b.route.element:R=y,S.createElement(TT,{match:b,routeContext:{outlet:y,matches:C,isDataRoute:o!=null},children:R})};return o&&(b.route.ErrorBoundary||b.route.errorElement||_===0)?S.createElement(ky,{location:o.location,revalidation:o.revalidation,component:A,error:T,children:z(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:g}):z()},null)}function Mf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function AT(n){let a=S.useContext(qi);return dt(a,Mf(n)),a}function CT(n){let a=S.useContext(oc);return dt(a,Mf(n)),a}function jT(n){let a=S.useContext(qn);return dt(a,Mf(n)),a}function Of(n){let a=jT(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 NT(){return Of("useRouteId")}function wT(){var o;let n=S.useContext(Rf),a=CT("useRouteError"),l=Of("useRouteError");return n!==void 0?n:(o=a.errors)==null?void 0:o[l]}function DT(){let{router:n}=AT("useNavigate"),a=Of("useNavigate"),l=S.useRef(!1);return wy(()=>{l.current=!0}),S.useCallback(async(r,u={})=>{Pn(l.current,Ny),l.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...u}))},[n,a])}var C0={};function Ry(n,a,l){!a&&!C0[n]&&(C0[n]=!0,Pn(!1,l))}S.memo(kT);function kT({routes:n,future:a,state:l,isStatic:o,onError:r}){return Dy(n,void 0,{state:l,isStatic:o,onError:r})}function Gr({to:n,replace:a,state:l,relative:o}){dt(Ps(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(Dn);Pn(!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(qn),{pathname:d}=un(),m=rc(),p=lc(n,kf(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 My(n){return yT(n.context)}function kt(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 RT({basename:n="/",children:a=null,location:l,navigationType:o="POP",navigator:r,static:u=!1,unstable_useTransitions:d}){dt(!Ps(),"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=Pi(l));let{pathname:g="/",search:y="",hash:b="",state:_=null,key:T="default",unstable_mask:j}=l,A=S.useMemo(()=>{let w=Ma(g,m);return w==null?null:{location:{pathname:w,search:y,hash:b,state:_,key:T,unstable_mask:j},navigationType:o}},[m,g,y,b,_,T,o,j]);return Pn(A!=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.`),A==null?null:S.createElement(Dn.Provider,{value:p},S.createElement(uo.Provider,{children:a,value:A}))}function MT({children:n,location:a}){return bT(nf(n),a)}function nf(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,nf(o.props.children,u));return}dt(o.type===kt,`[${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=nf(o.props.children,u)),l.push(d)}),l}var Pr="get",qr="application/x-www-form-urlencoded";function uc(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function OT(n){return uc(n)&&n.tagName.toLowerCase()==="button"}function BT(n){return uc(n)&&n.tagName.toLowerCase()==="form"}function LT(n){return uc(n)&&n.tagName.toLowerCase()==="input"}function UT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function zT(n,a){return n.button===0&&(!a||a==="_self")&&!UT(n)}function af(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 VT(n,a){let l=af(n);return a&&a.forEach((o,r)=>{l.has(r)||a.getAll(r).forEach(u=>{l.append(r,u)})}),l}var Mr=null;function IT(){if(Mr===null)try{new FormData(document.createElement("form"),0),Mr=!1}catch{Mr=!0}return Mr}var HT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Rd(n){return n!=null&&!HT.has(n)?(Pn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qr}"`),null):n}function GT(n,a){let l,o,r,u,d;if(BT(n)){let m=n.getAttribute("action");o=m?Ma(m,a):null,l=n.getAttribute("method")||Pr,r=Rd(n.getAttribute("enctype"))||qr,u=new FormData(n)}else if(OT(n)||LT(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?Ma(p,a):null,l=n.getAttribute("formmethod")||m.getAttribute("method")||Pr,r=Rd(n.getAttribute("formenctype"))||Rd(m.getAttribute("enctype"))||qr,u=new FormData(m,n),!IT()){let{name:g,type:y,value:b}=n;if(y==="image"){let _=g?`${g}.`:"";u.append(`${_}x`,"0"),u.append(`${_}y`,"0")}else g&&u.append(g,b)}}else{if(uc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Pr,o=null,r=qr,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 Bf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function PT(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&&Ma(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${o}`,r}async function qT(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 YT(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 FT(n,a,l){let o=await Promise.all(n.map(async r=>{let u=a.routes[r.route.id];if(u){let d=await qT(u,l);return d.links?d.links():[]}return[]}));return XT(o.flat(1).filter(YT).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function j0(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 _=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 _=="boolean")return _}return!0}):[]}function KT(n,a,{includeHydrateFallback:l}={}){return $T(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 $T(n){return[...new Set(n)]}function ZT(n){let a={},l=Object.keys(n).sort();for(let o of l)a[o]=n[o];return a}function XT(n,a){let l=new Set;return new Set(a),n.reduce((o,r)=>{let u=JSON.stringify(ZT(r));return l.has(u)||(l.add(u),o.push({key:u,link:r})),o},[])}function Oy(){let n=S.useContext(qi);return Bf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function QT(){let n=S.useContext(oc);return Bf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Lf=S.createContext(void 0);Lf.displayName="FrameworkContext";function By(){let n=S.useContext(Lf);return Bf(n,"You must render this element inside a <HydratedRouter> element"),n}function JT(n,a){let l=S.useContext(Lf),[o,r]=S.useState(!1),[u,d]=S.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:g,onMouseLeave:y,onTouchStart:b}=a,_=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let A=C=>{C.forEach(z=>{d(z.isIntersecting)})},w=new IntersectionObserver(A,{threshold:.5});return _.current&&w.observe(_.current),()=>{w.disconnect()}}},[n]),S.useEffect(()=>{if(o){let A=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(A)}}},[o]);let T=()=>{r(!0)},j=()=>{r(!1),d(!1)};return l?n!=="intent"?[u,_,{}]:[u,_,{onFocus:Gl(m,T),onBlur:Gl(p,j),onMouseEnter:Gl(g,T),onMouseLeave:Gl(y,j),onTouchStart:Gl(b,T)}]:[!1,_,{}]}function Gl(n,a){return l=>{n&&n(l),l.defaultPrevented||a(l)}}function WT({page:n,...a}){let{router:l}=Oy(),o=S.useMemo(()=>by(l.routes,n,l.basename),[l.routes,n,l.basename]);return o?S.createElement(tE,{page:n,matches:o,...a}):null}function eE(n){let{manifest:a,routeModules:l}=By(),[o,r]=S.useState([]);return S.useEffect(()=>{let u=!1;return FT(n,a,l).then(d=>{u||r(d)}),()=>{u=!0}},[n,a,l]),o}function tE({page:n,matches:a,...l}){let o=un(),{future:r,manifest:u,routeModules:d}=By(),{basename:m}=Oy(),{loaderData:p,matches:g}=QT(),y=S.useMemo(()=>j0(n,a,g,u,o,"data"),[n,a,g,u,o]),b=S.useMemo(()=>j0(n,a,g,u,o,"assets"),[n,a,g,u,o]),_=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let A=new Set,w=!1;if(a.forEach(z=>{var Q;let R=u.routes[z.route.id];!R||!R.hasLoader||(!y.some(I=>I.route.id===z.route.id)&&z.route.id in p&&((Q=d[z.route.id])!=null&&Q.shouldRevalidate)||R.hasClientLoader?w=!0:A.add(z.route.id))}),A.size===0)return[];let C=PT(n,m,r.unstable_trailingSlashAwareDataRequests,"data");return w&&A.size>0&&C.searchParams.set("_routes",a.filter(z=>A.has(z.route.id)).map(z=>z.route.id).join(",")),[C.pathname+C.search]},[m,r.unstable_trailingSlashAwareDataRequests,p,o,u,y,a,n,d]),T=S.useMemo(()=>KT(b,u),[b,u]),j=eE(b);return S.createElement(S.Fragment,null,_.map(A=>S.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...l})),T.map(A=>S.createElement("link",{key:A,rel:"modulepreload",href:A,...l})),j.map(({key:A,link:w})=>S.createElement("link",{key:A,nonce:l.nonce,...w,crossOrigin:w.crossOrigin??l.crossOrigin})))}function nE(...n){return a=>{n.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var aE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{aE&&(window.__reactRouterVersion="7.13.1")}catch{}function sE({basename:n,children:a,unstable_useTransitions:l,window:o}){let r=S.useRef();r.current==null&&(r.current=L_({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(RT,{basename:n,children:a,location:d.location,navigationType:d.action,navigator:u,unstable_useTransitions:l})}var Ly=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Uf=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:_,unstable_defaultShouldRevalidate:T,...j},A){let{basename:w,navigator:C,unstable_useTransitions:z}=S.useContext(Dn),R=typeof y=="string"&&Ly.test(y),Q=Ey(y,w);y=Q.to;let I=pT(y,{relative:r}),W=un(),ee=null;if(m){let G=lc(m,[],W.unstable_mask?W.unstable_mask.pathname:"/",!0);w!=="/"&&(G.pathname=G.pathname==="/"?w:oa([w,G.pathname])),ee=C.createHref(G)}let[q,ae,ye]=JT(o,j),B=rE(y,{replace:d,unstable_mask:m,state:p,target:g,preventScrollReset:b,relative:r,viewTransition:_,unstable_defaultShouldRevalidate:T,unstable_useTransitions:z});function me(G){a&&a(G),G.defaultPrevented||B(G)}let ne=!(Q.isExternal||u),_e=S.createElement("a",{...j,...ye,href:(ne?ee:void 0)||Q.absoluteURL||I,onClick:ne?me:a,ref:nE(A,ae),target:g,"data-discover":!R&&l==="render"?"true":void 0});return q&&!R?S.createElement(S.Fragment,null,_e,S.createElement(WT,{page:I})):_e});Uf.displayName="Link";var iE=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=fo(d,{relative:g.relative}),_=un(),T=S.useContext(oc),{navigator:j,basename:A}=S.useContext(Dn),w=T!=null&&hE(b)&&m===!0,C=j.encodeLocation?j.encodeLocation(b).pathname:b.pathname,z=_.pathname,R=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;l||(z=z.toLowerCase(),R=R?R.toLowerCase():null,C=C.toLowerCase()),R&&A&&(R=Ma(R,A)||R);const Q=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let I=z===C||!r&&z.startsWith(C)&&z.charAt(Q)==="/",W=R!=null&&(R===C||!r&&R.startsWith(C)&&R.charAt(C.length)==="/"),ee={isActive:I,isPending:W,isTransitioning:w},q=I?a:void 0,ae;typeof o=="function"?ae=o(ee):ae=[o,I?"active":null,W?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let ye=typeof u=="function"?u(ee):u;return S.createElement(Uf,{...g,"aria-current":q,className:ae,ref:y,style:ye,to:d,viewTransition:m},typeof p=="function"?p(ee):p)});iE.displayName="NavLink";var lE=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:l,reloadDocument:o,replace:r,state:u,method:d=Pr,action:m,onSubmit:p,relative:g,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:_,...T},j)=>{let{unstable_useTransitions:A}=S.useContext(Dn),w=dE(),C=fE(m,{relative:g}),z=d.toLowerCase()==="get"?"get":"post",R=typeof m=="string"&&Ly.test(m),Q=I=>{if(p&&p(I),I.defaultPrevented)return;I.preventDefault();let W=I.nativeEvent.submitter,ee=(W==null?void 0:W.getAttribute("formmethod"))||d,q=()=>w(W||I.currentTarget,{fetcherKey:a,method:ee,navigate:l,replace:r,state:u,relative:g,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:_});A&&l!==!1?S.startTransition(()=>q()):q()};return S.createElement("form",{ref:j,method:z,action:C,onSubmit:o?p:Q,...T,"data-discover":!R&&n==="render"?"true":void 0})});lE.displayName="Form";function oE(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Uy(n){let a=S.useContext(qi);return dt(a,oE(n)),a}function rE(n,{target:a,replace:l,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p,unstable_useTransitions:g}={}){let y=rc(),b=un(),_=fo(n,{relative:d});return S.useCallback(T=>{if(zT(T,a)){T.preventDefault();let j=l!==void 0?l:to(b)===to(_),A=()=>y(n,{replace:j,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:p});g?S.startTransition(()=>A()):A()}},[b,y,_,l,o,r,a,n,u,d,m,p,g])}function zf(n){Pn(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(af(n)),l=S.useRef(!1),o=un(),r=S.useMemo(()=>VT(o.search,l.current?null:a.current),[o.search]),u=rc(),d=S.useCallback((m,p)=>{const g=af(typeof m=="function"?m(new URLSearchParams(r)):m);l.current=!0,u("?"+g,p)},[u,r]);return[r,d]}var cE=0,uE=()=>`__${String(++cE)}__`;function dE(){let{router:n}=Uy("useSubmit"),{basename:a}=S.useContext(Dn),l=NT(),o=n.fetch,r=n.navigate;return S.useCallback(async(u,d={})=>{let{action:m,method:p,encType:g,formData:y,body:b}=GT(u,a);if(d.navigate===!1){let _=d.fetcherKey||uE();await o(_,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 fE(n,{relative:a}={}){let{basename:l}=S.useContext(Dn),o=S.useContext(qn);dt(o,"useFormAction must be used inside a RouteContext");let[r]=o.matches.slice(-1),u={...fo(n||".",{relative:a})},d=un();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:oa([l,u.pathname])),to(u)}function hE(n,{relative:a}={}){let l=S.useContext(Cy);dt(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Uy("useViewTransitionState"),r=fo(n,{relative:a});if(!l.isTransitioning)return!1;let u=Ma(l.currentLocation.pathname,o)||l.currentLocation.pathname,d=Ma(l.nextLocation.pathname,o)||l.nextLocation.pathname;return no(r.pathname,d)!=null||no(r.pathname,u)!=null}function ua(){const n=rc();return S.useCallback((a,l)=>{typeof a=="number"?n(a):n(a,l)},[n])}function zy(n){return`/sessions/${encodeURIComponent(n)}`}function ao(n){return`/projects/${encodeURIComponent(n)}`}function Hs(n,a){const l=`/tasks/${encodeURIComponent(n)}`;return a?`${l}/${a}`:l}function mE(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Vi(n,a){const l=new URLSearchParams({project:n});return a&&l.set("parent",a),`/tasks/new?${l.toString()}`}function Vy(n,a){return`/sessions/new?${new URLSearchParams({env:n,runtime:a}).toString()}`}const N0="/environments/new",zi="/settings",pE="_container_1he30_1",gE="_brand_1he30_27",vE="_info_1he30_43",yE="_connectionDot_1he30_51",bE="_connected_1he30_54",SE="_disconnected_1he30_58",xE="_settingsButton_1he30_62",Ms={container:pE,brand:gE,info:vE,connectionDot:yE,connected:bE,disconnected:SE,settingsButton:xE};function _E(){const{connected:n,environments:a,sessions:l}=sn(),o=ua(),r=a.length,u=a.filter(m=>m.status==="connected").length,d=l.filter(m=>["running","idle"].includes(m.status)).length;return h.jsxs("div",{className:Ms.container,children:[h.jsx("button",{type:"button",className:Ms.brand,onClick:()=>o("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:Ms.info,children:[h.jsxs("span",{children:[h.jsx("span",{className:`${Ms.connectionDot} ${n?Ms.connected:Ms.disconnected}`,children:"●"})," ",n?"Connected":"Disconnected"]}),h.jsxs("span",{children:[u,"/",r," env",r!==1?"s":""]}),h.jsxs("span",{children:[d," active"]}),h.jsx("button",{className:Ms.settingsButton,onClick:()=>o(zi),title:"Settings",children:"⚙"})]})]})}const Vf=S.createContext({});function If(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const dc=S.createContext(null),Hf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class TE 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 EE({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(Hf);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(TE,{isPresent:a,childRef:o,sizeRef:r,children:S.cloneElement(n,{ref:o})})}const AE=({children:n,initial:a,isPresent:l,onExitComplete:o,custom:r,presenceAffectsLayout:u,mode:d})=>{const m=If(CE),p=S.useId(),g=S.useCallback(b=>{m.set(b,!0);for(const _ of m.values())if(!_)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,_)=>m.set(_,!1))},[l]),S.useEffect(()=>{!l&&!m.size&&o&&o()},[l]),d==="popLayout"&&(n=h.jsx(EE,{isPresent:l,children:n})),h.jsx(dc.Provider,{value:y,children:n})};function CE(){return new Map}function Iy(n=!0){const a=S.useContext(dc);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 Or=n=>n.key||"";function w0(n){const a=[];return S.Children.forEach(n,l=>{S.isValidElement(l)&&a.push(l)}),a}const Gf=typeof window<"u",Hy=Gf?S.useLayoutEffect:S.useEffect,qs=({children:n,custom:a,initial:l=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:u="sync",propagate:d=!1})=>{const[m,p]=Iy(d),g=S.useMemo(()=>w0(n),[n]),y=d&&!m?[]:g.map(Or),b=S.useRef(!0),_=S.useRef(g),T=If(()=>new Map),[j,A]=S.useState(g),[w,C]=S.useState(g);Hy(()=>{b.current=!1,_.current=g;for(let Q=0;Q<w.length;Q++){const I=Or(w[Q]);y.includes(I)?T.delete(I):T.get(I)!==!0&&T.set(I,!1)}},[w,y.length,y.join("-")]);const z=[];if(g!==j){let Q=[...g];for(let I=0;I<w.length;I++){const W=w[I],ee=Or(W);y.includes(ee)||(Q.splice(I,0,W),z.push(W))}u==="wait"&&z.length&&(Q=z),C(w0(Q)),A(g);return}const{forceRender:R}=S.useContext(Vf);return h.jsx(h.Fragment,{children:w.map(Q=>{const I=Or(Q),W=d&&!m?!1:g===w||y.includes(I),ee=()=>{if(T.has(I))T.set(I,!0);else return;let q=!0;T.forEach(ae=>{ae||(q=!1)}),q&&(R==null||R(),C(_.current),d&&(p==null||p()),o&&o())};return h.jsx(AE,{isPresent:W,initial:!b.current||l?void 0:!1,custom:W?void 0:a,presenceAffectsLayout:r,mode:u,onExitComplete:W?void 0:ee,children:Q},I)})})},Nn=n=>n;let Gy=Nn;const jE={useManualTiming:!1};function NE(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 Br=["read","resolveKeyframes","update","preRender","render","postRender"],wE=40;function Py(n,a){let l=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},u=()=>l=!0,d=Br.reduce((C,z)=>(C[z]=NE(u),C),{}),{read:m,resolveKeyframes:p,update:g,preRender:y,render:b,postRender:_}=d,T=()=>{const C=performance.now();l=!1,r.delta=o?1e3/60:Math.max(Math.min(C-r.timestamp,wE),1),r.timestamp=C,r.isProcessing=!0,m.process(r),p.process(r),g.process(r),y.process(r),b.process(r),_.process(r),r.isProcessing=!1,l&&a&&(o=!1,n(T))},j=()=>{l=!0,o=!0,r.isProcessing||n(T)};return{schedule:Br.reduce((C,z)=>{const R=d[z];return C[z]=(Q,I=!1,W=!1)=>(l||j(),R.schedule(Q,I,W)),C},{}),cancel:C=>{for(let z=0;z<Br.length;z++)d[Br[z]].cancel(C)},state:r,steps:d}}const{schedule:ft,cancel:ds,state:Qt,steps:Md}=Py(typeof requestAnimationFrame<"u"?requestAnimationFrame:Nn,!0),qy=S.createContext({strict:!1}),D0={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"]},Ii={};for(const n in D0)Ii[n]={isEnabled:a=>D0[n].some(l=>!!a[l])};function DE(n){for(const a in n)Ii[a]={...Ii[a],...n[a]}}const kE=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 Zr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||kE.has(n)}let Yy=n=>!Zr(n);function RE(n){n&&(Yy=a=>a.startsWith("on")?!Zr(a):n(a))}try{RE(require("@emotion/is-prop-valid").default)}catch{}function ME(n,a,l){const o={};for(const r in n)r==="values"&&typeof n.values=="object"||(Yy(r)||l===!0&&Zr(r)||!a&&!Zr(r)||n.draggable&&r.startsWith("onDrag"))&&(o[r]=n[r]);return o}function OE(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 fc=S.createContext({});function so(n){return typeof n=="string"||Array.isArray(n)}function hc(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const Pf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qf=["initial",...Pf];function mc(n){return hc(n.animate)||qf.some(a=>so(n[a]))}function Fy(n){return!!(mc(n)||n.variants)}function BE(n,a){if(mc(n)){const{initial:l,animate:o}=n;return{initial:l===!1||so(l)?l:void 0,animate:so(o)?o:void 0}}return n.inherit!==!1?a:{}}function LE(n){const{initial:a,animate:l}=BE(n,S.useContext(fc));return S.useMemo(()=>({initial:a,animate:l}),[k0(a),k0(l)])}function k0(n){return Array.isArray(n)?n.join(" "):n}const UE=Symbol.for("motionComponentSymbol");function Mi(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function zE(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):Mi(l)&&(l.current=o))},[a])}const Yf=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),VE="framerAppearId",Ky="data-"+Yf(VE),{schedule:Ff}=Py(queueMicrotask,!1),$y=S.createContext({});function IE(n,a,l,o,r){var u,d;const{visualElement:m}=S.useContext(fc),p=S.useContext(qy),g=S.useContext(dc),y=S.useContext(Hf).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 _=b.current,T=S.useContext($y);_&&!_.projection&&r&&(_.type==="html"||_.type==="svg")&&HE(b.current,l,r,T);const j=S.useRef(!1);S.useInsertionEffect(()=>{_&&j.current&&_.update(l,g)});const A=l[Ky],w=S.useRef(!!A&&!(!((u=window.MotionHandoffIsComplete)===null||u===void 0)&&u.call(window,A))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,A)));return Hy(()=>{_&&(j.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),Ff.render(_.render),w.current&&_.animationState&&_.animationState.animateChanges())}),S.useEffect(()=>{_&&(!w.current&&_.animationState&&_.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)===null||C===void 0||C.call(window,A)}),w.current=!1))}),_}function HE(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:Zy(n.parent)),n.projection.setOptions({layoutId:r,layout:u,alwaysMeasureLayout:!!d||m&&Mi(m),visualElement:n,animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:p,layoutRoot:g})}function Zy(n){if(n)return n.options.allowProjection!==!1?n.projection:Zy(n.parent)}function GE({preloadedFeatures:n,createVisualElement:a,useRender:l,useVisualState:o,Component:r}){var u,d;n&&DE(n);function m(g,y){let b;const _={...S.useContext(Hf),...g,layoutId:PE(g)},{isStatic:T}=_,j=LE(g),A=o(g,T);if(!T&&Gf){qE();const w=YE(_);b=w.MeasureLayout,j.visualElement=IE(r,A,_,a,w.ProjectionNode)}return h.jsxs(fc.Provider,{value:j,children:[b&&j.visualElement?h.jsx(b,{visualElement:j.visualElement,..._}):null,l(r,g,zE(A,j.visualElement,y),A,T,j.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[UE]=r,p}function PE({layoutId:n}){const a=S.useContext(Vf).id;return a&&n!==void 0?a+"-"+n:n}function qE(n,a){S.useContext(qy).strict}function YE(n){const{drag:a,layout:l}=Ii;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 FE=["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 Kf(n){return typeof n!="string"||n.includes("-")?!1:!!(FE.indexOf(n)>-1||/[A-Z]/u.test(n))}function R0(n){const a=[{},{}];return n==null||n.values.forEach((l,o)=>{a[0][o]=l.get(),a[1][o]=l.getVelocity()}),a}function $f(n,a,l,o){if(typeof a=="function"){const[r,u]=R0(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]=R0(o);a=a(l!==void 0?l:n.custom,r,u)}return a}const sf=n=>Array.isArray(n),KE=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),$E=n=>sf(n)?n[n.length-1]||0:n,nn=n=>!!(n&&n.getVelocity);function Yr(n){const a=nn(n)?n.get():n;return KE(a)?a.toValue():a}function ZE({scrapeMotionValuesFromProps:n,createRenderState:a,onUpdate:l},o,r,u){const d={latestValues:XE(o,r,u,n),renderState:a()};return l&&(d.onMount=m=>l({props:o,current:m,...d}),d.onUpdate=m=>l(m)),d}const Xy=n=>(a,l)=>{const o=S.useContext(fc),r=S.useContext(dc),u=()=>ZE(n,a,o,r);return l?u():If(u)};function XE(n,a,l,o){const r={},u=o(n,{});for(const _ in u)r[_]=Yr(u[_]);let{initial:d,animate:m}=n;const p=mc(n),g=Fy(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"&&!hc(b)){const _=Array.isArray(b)?b:[b];for(let T=0;T<_.length;T++){const j=$f(n,_[T]);if(j){const{transitionEnd:A,transition:w,...C}=j;for(const z in C){let R=C[z];if(Array.isArray(R)){const Q=y?R.length-1:0;R=R[Q]}R!==null&&(r[z]=R)}for(const z in A)r[z]=A[z]}}}return r}const Yi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ys=new Set(Yi),Qy=n=>a=>typeof a=="string"&&a.startsWith(n),Jy=Qy("--"),QE=Qy("var(--"),Zf=n=>QE(n)?JE.test(n.split("/*")[0].trim()):!1,JE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wy=(n,a)=>a&&typeof n=="number"?a.transform(n):n,Oa=(n,a,l)=>l>a?a:l<n?n:l,Fi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},io={...Fi,transform:n=>Oa(0,1,n)},Lr={...Fi,default:1},ho=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),os=ho("deg"),ra=ho("%"),xe=ho("px"),WE=ho("vh"),eA=ho("vw"),M0={...ra,parse:n=>ra.parse(n)/100,transform:n=>ra.transform(n*100)},tA={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},nA={rotate:os,rotateX:os,rotateY:os,rotateZ:os,scale:Lr,scaleX:Lr,scaleY:Lr,scaleZ:Lr,skew:os,skewX:os,skewY:os,distance:xe,translateX:xe,translateY:xe,translateZ:xe,x:xe,y:xe,z:xe,perspective:xe,transformPerspective:xe,opacity:io,originX:M0,originY:M0,originZ:xe},O0={...Fi,transform:Math.round},Xf={...tA,...nA,zIndex:O0,size:xe,fillOpacity:io,strokeOpacity:io,numOctaves:O0},aA={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sA=Yi.length;function iA(n,a,l){let o="",r=!0;for(let u=0;u<sA;u++){const d=Yi[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=Wy(m,Xf[d]);if(!p){r=!1;const y=aA[d]||d;o+=`${y}(${g}) `}l&&(a[d]=g)}}return o=o.trim(),l?o=l(a,r?"":o):r&&(o="none"),o}function Qf(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(Ys.has(p)){d=!0;continue}else if(Jy(p)){r[p]=g;continue}else{const y=Wy(g,Xf[p]);p.startsWith("origin")?(m=!0,u[p]=y):o[p]=y}}if(a.transform||(d||l?o.transform=iA(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 lA={offset:"stroke-dashoffset",array:"stroke-dasharray"},oA={offset:"strokeDashoffset",array:"strokeDasharray"};function rA(n,a,l=1,o=0,r=!0){n.pathLength=1;const u=r?lA:oA;n[u.offset]=xe.transform(-o);const d=xe.transform(a),m=xe.transform(l);n[u.array]=`${d} ${m}`}function B0(n,a,l){return typeof n=="string"?n:xe.transform(a+l*n)}function cA(n,a,l){const o=B0(a,n.x,n.width),r=B0(l,n.y,n.height);return`${o} ${r}`}function Jf(n,{attrX:a,attrY:l,attrScale:o,originX:r,originY:u,pathLength:d,pathSpacing:m=1,pathOffset:p=0,...g},y,b){if(Qf(n,g,b),y){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:T,dimensions:j}=n;_.transform&&(j&&(T.transform=_.transform),delete _.transform),j&&(r!==void 0||u!==void 0||T.transform)&&(T.transformOrigin=cA(j,r!==void 0?r:.5,u!==void 0?u:.5)),a!==void 0&&(_.x=a),l!==void 0&&(_.y=l),o!==void 0&&(_.scale=o),d!==void 0&&rA(_,d,m,p,!1)}const Wf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),eb=()=>({...Wf(),attrs:{}}),eh=n=>typeof n=="string"&&n.toLowerCase()==="svg";function tb(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 nb=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 ab(n,a,l,o){tb(n,a,void 0,o);for(const r in a.attrs)n.setAttribute(nb.has(r)?r:Yf(r),a.attrs[r])}const Xr={};function uA(n){Object.assign(Xr,n)}function sb(n,{layout:a,layoutId:l}){return Ys.has(n)||n.startsWith("origin")||(a||l!==void 0)&&(!!Xr[n]||n==="opacity")}function th(n,a,l){var o;const{style:r}=n,u={};for(const d in r)(nn(r[d])||a.style&&nn(a.style[d])||sb(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 ib(n,a,l){const o=th(n,a,l);for(const r in n)if(nn(n[r])||nn(a[r])){const u=Yi.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[u]=n[r]}return o}function dA(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 L0=["x","y","width","height","cx","cy","r"],fA={useVisualState:Xy({scrapeMotionValuesFromProps:ib,createRenderState:eb,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(Ys.has(m)){u=!0;break}}if(!u)return;let d=!a;if(a)for(let m=0;m<L0.length;m++){const p=L0[m];n[p]!==a[p]&&(d=!0)}d&&ft.read(()=>{dA(l,o),ft.render(()=>{Jf(o,r,eh(l.tagName),n.transformTemplate),ab(l,o)})})}})},hA={useVisualState:Xy({scrapeMotionValuesFromProps:th,createRenderState:Wf})};function lb(n,a,l){for(const o in a)!nn(a[o])&&!sb(o,l)&&(n[o]=a[o])}function mA({transformTemplate:n},a){return S.useMemo(()=>{const l=Wf();return Qf(l,a,n),Object.assign({},l.vars,l.style)},[a])}function pA(n,a){const l=n.style||{},o={};return lb(o,l,n),Object.assign(o,mA(n,a)),o}function gA(n,a){const l={},o=pA(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 vA(n,a,l,o){const r=S.useMemo(()=>{const u=eb();return Jf(u,a,eh(o),n.transformTemplate),{...u.attrs,style:{...u.style}}},[a]);if(n.style){const u={};lb(u,n.style,n),r.style={...u,...r.style}}return r}function yA(n=!1){return(l,o,r,{latestValues:u},d)=>{const p=(Kf(l)?vA:gA)(o,u,d,l),g=ME(o,typeof l=="string",n),y=l!==S.Fragment?{...g,...p,ref:r}:{},{children:b}=o,_=S.useMemo(()=>nn(b)?b.get():b,[b]);return S.createElement(l,{...y,children:_})}}function bA(n,a){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const d={...Kf(o)?fA:hA,preloadedFeatures:n,useRender:yA(r),createVisualElement:a,Component:o};return GE(d)}}function ob(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 pc(n,a,l){const o=n.getProps();return $f(o,a,l!==void 0?l:o.custom,n)}function nh(n,a){return n?n[a]||n.default||n:void 0}const rb=new Set(["width","height","top","left","right","bottom",...Yi]);let Fr;function SA(){Fr=void 0}const ca={now:()=>(Fr===void 0&&ca.set(Qt.isProcessing||jE.useManualTiming?Qt.timestamp:performance.now()),Fr),set:n=>{Fr=n,queueMicrotask(SA)}};function ah(n,a){n.indexOf(a)===-1&&n.push(a)}function sh(n,a){const l=n.indexOf(a);l>-1&&n.splice(l,1)}class ih{constructor(){this.subscriptions=[]}add(a){return ah(this.subscriptions,a),()=>sh(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 cb(n,a){return a?n*(1e3/a):0}const U0=30,xA=n=>!isNaN(parseFloat(n));class _A{constructor(a,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const u=ca.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=ca.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=xA(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 ih);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=ca.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>U0)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,U0);return cb(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 lo(n,a){return new _A(n,a)}function TA(n,a,l){n.hasValue(a)?n.getValue(a).set(l):n.addValue(a,lo(l))}function EA(n,a){const l=pc(n,a);let{transitionEnd:o={},transition:r={},...u}=l||{};u={...u,...o};for(const d in u){const m=$E(u[d]);TA(n,d,m)}}function AA(n){return!!(nn(n)&&n.add)}function lf(n,a){const l=n.getValue("willChange");if(AA(l))return l.add(a)}function ub(n){return n.props[Ky]}function lh(n){let a;return()=>(a===void 0&&(a=n()),a)}const CA=lh(()=>window.ScrollTimeline!==void 0);class jA{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(CA()&&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 NA extends jA{then(a,l){return Promise.all(this.animations).then(a).catch(l)}}const ka=n=>n*1e3,Ra=n=>n/1e3;function oh(n){return typeof n=="function"}function z0(n,a){n.timeline=a,n.onfinish=null}const rh=n=>Array.isArray(n)&&typeof n[0]=="number",wA={linearEasing:void 0};function DA(n,a){const l=lh(n);return()=>{var o;return(o=wA[a])!==null&&o!==void 0?o:l()}}const Qr=DA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Hi=(n,a,l)=>{const o=a-n;return o===0?1:(l-n)/o},db=(n,a,l=10)=>{let o="";const r=Math.max(Math.round(a/l),2);for(let u=0;u<r;u++)o+=n(Hi(0,r-1,u))+", ";return`linear(${o.substring(0,o.length-2)})`};function fb(n){return!!(typeof n=="function"&&Qr()||!n||typeof n=="string"&&(n in of||Qr())||rh(n)||Array.isArray(n)&&n.every(fb))}const Fl=([n,a,l,o])=>`cubic-bezier(${n}, ${a}, ${l}, ${o})`,of={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Fl([0,.65,.55,1]),circOut:Fl([.55,0,1,.45]),backIn:Fl([.31,.01,.66,-.59]),backOut:Fl([.33,1.53,.69,.99])};function hb(n,a){if(n)return typeof n=="function"&&Qr()?db(n,a):rh(n)?Fl(n):Array.isArray(n)?n.map(l=>hb(l,a)||of.easeOut):of[n]}const mb=(n,a,l)=>(((1-3*l+3*a)*n+(3*l-6*a))*n+3*a)*n,kA=1e-7,RA=12;function MA(n,a,l,o,r){let u,d,m=0;do d=a+(l-a)/2,u=mb(d,o,r)-n,u>0?l=d:a=d;while(Math.abs(u)>kA&&++m<RA);return d}function mo(n,a,l,o){if(n===a&&l===o)return Nn;const r=u=>MA(u,0,1,n,l);return u=>u===0||u===1?u:mb(r(u),a,o)}const pb=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,gb=n=>a=>1-n(1-a),vb=mo(.33,1.53,.69,.99),ch=gb(vb),yb=pb(ch),bb=n=>(n*=2)<1?.5*ch(n):.5*(2-Math.pow(2,-10*(n-1))),uh=n=>1-Math.sin(Math.acos(n)),Sb=gb(uh),xb=pb(uh),_b=n=>/^0[^.\s]+$/u.test(n);function OA(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||_b(n):!0}const Ql=n=>Math.round(n*1e5)/1e5,dh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function BA(n){return n==null}const LA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fh=(n,a)=>l=>!!(typeof l=="string"&&LA.test(l)&&l.startsWith(n)||a&&!BA(l)&&Object.prototype.hasOwnProperty.call(l,a)),Tb=(n,a,l)=>o=>{if(typeof o!="string")return o;const[r,u,d,m]=o.match(dh);return{[n]:parseFloat(r),[a]:parseFloat(u),[l]:parseFloat(d),alpha:m!==void 0?parseFloat(m):1}},UA=n=>Oa(0,255,n),Od={...Fi,transform:n=>Math.round(UA(n))},Vs={test:fh("rgb","red"),parse:Tb("red","green","blue"),transform:({red:n,green:a,blue:l,alpha:o=1})=>"rgba("+Od.transform(n)+", "+Od.transform(a)+", "+Od.transform(l)+", "+Ql(io.transform(o))+")"};function zA(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 rf={test:fh("#"),parse:zA,transform:Vs.transform},Oi={test:fh("hsl","hue"),parse:Tb("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:l,alpha:o=1})=>"hsla("+Math.round(n)+", "+ra.transform(Ql(a))+", "+ra.transform(Ql(l))+", "+Ql(io.transform(o))+")"},tn={test:n=>Vs.test(n)||rf.test(n)||Oi.test(n),parse:n=>Vs.test(n)?Vs.parse(n):Oi.test(n)?Oi.parse(n):rf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Vs.transform(n):Oi.transform(n)},VA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function IA(n){var a,l;return isNaN(n)&&typeof n=="string"&&(((a=n.match(dh))===null||a===void 0?void 0:a.length)||0)+(((l=n.match(VA))===null||l===void 0?void 0:l.length)||0)>0}const Eb="number",Ab="color",HA="var",GA="var(",V0="${}",PA=/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 oo(n){const a=n.toString(),l=[],o={color:[],number:[],var:[]},r=[];let u=0;const m=a.replace(PA,p=>(tn.test(p)?(o.color.push(u),r.push(Ab),l.push(tn.parse(p))):p.startsWith(GA)?(o.var.push(u),r.push(HA),l.push(p)):(o.number.push(u),r.push(Eb),l.push(parseFloat(p))),++u,V0)).split(V0);return{values:l,split:m,indexes:o,types:r}}function Cb(n){return oo(n).values}function jb(n){const{split:a,types:l}=oo(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===Eb?u+=Ql(r[d]):m===Ab?u+=tn.transform(r[d]):u+=r[d]}return u}}const qA=n=>typeof n=="number"?0:n;function YA(n){const a=Cb(n);return jb(n)(a.map(qA))}const fs={test:IA,parse:Cb,createTransformer:jb,getAnimatableNone:YA},FA=new Set(["brightness","contrast","saturate","opacity"]);function KA(n){const[a,l]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=l.match(dh)||[];if(!o)return n;const r=l.replace(o,"");let u=FA.has(a)?1:0;return o!==l&&(u*=100),a+"("+u+r+")"}const $A=/\b([a-z-]*)\(.*?\)/gu,cf={...fs,getAnimatableNone:n=>{const a=n.match($A);return a?a.map(KA).join(" "):n}},ZA={...Xf,color:tn,backgroundColor:tn,outlineColor:tn,fill:tn,stroke:tn,borderColor:tn,borderTopColor:tn,borderRightColor:tn,borderBottomColor:tn,borderLeftColor:tn,filter:cf,WebkitFilter:cf},hh=n=>ZA[n];function Nb(n,a){let l=hh(n);return l!==cf&&(l=fs),l.getAnimatableNone?l.getAnimatableNone(a):void 0}const XA=new Set(["auto","none","0"]);function QA(n,a,l){let o=0,r;for(;o<n.length&&!r;){const u=n[o];typeof u=="string"&&!XA.has(u)&&oo(u).values.length&&(r=n[o]),o++}if(r&&l)for(const u of a)n[u]=Nb(l,r)}const I0=n=>n===Fi||n===xe,H0=(n,a)=>parseFloat(n.split(", ")[a]),G0=(n,a)=>(l,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return H0(r[1],a);{const u=o.match(/^matrix\((.+)\)$/u);return u?H0(u[1],n):0}},JA=new Set(["x","y","z"]),WA=Yi.filter(n=>!JA.has(n));function e2(n){const a=[];return WA.forEach(l=>{const o=n.getValue(l);o!==void 0&&(a.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),a}const Gi={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:G0(4,13),y:G0(5,14)};Gi.translateX=Gi.x;Gi.translateY=Gi.y;const Is=new Set;let uf=!1,df=!1;function wb(){if(df){const n=Array.from(Is).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),l=new Map;a.forEach(o=>{const r=e2(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)})}df=!1,uf=!1,Is.forEach(n=>n.complete()),Is.clear()}function Db(){Is.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(df=!0)})}function t2(){Db(),wb()}class mh{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?(Is.add(this),uf||(uf=!0,ft.read(Db),ft.resolveKeyframes(wb))):(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),Is.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Is.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const kb=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),n2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function a2(n){const a=n2.exec(n);if(!a)return[,];const[,l,o,r]=a;return[`--${l??o}`,r]}function Rb(n,a,l=1){const[o,r]=a2(n);if(!o)return;const u=window.getComputedStyle(a).getPropertyValue(o);if(u){const d=u.trim();return kb(d)?parseFloat(d):d}return Zf(r)?Rb(r,a,l+1):r}const Mb=n=>a=>a.test(n),s2={test:n=>n==="auto",parse:n=>n},Ob=[Fi,xe,ra,os,eA,WE,s2],P0=n=>Ob.find(Mb(n));class Bb extends mh{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(),Zf(g))){const y=Rb(g,l.current);y!==void 0&&(a[p]=y),p===a.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!rb.has(o)||a.length!==2)return;const[r,u]=a,d=P0(r),m=P0(u);if(d!==m)if(I0(d)&&I0(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++)OA(a[r])&&o.push(r);o.length&&QA(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=Gi[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]=Gi[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 q0=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(fs.test(n)||n==="0")&&!n.startsWith("url("));function i2(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 l2(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=q0(r,a),m=q0(u,a);return!d||!m?!1:i2(n)||(l==="spring"||oh(l))&&o}const o2=n=>n!==null;function gc(n,{repeat:a,repeatType:l="loop"},o){const r=n.filter(o2),u=a&&l!=="loop"&&a%2===1?0:r.length-1;return!u||o===void 0?r[u]:o}const r2=40;class Lb{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=ca.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>r2?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&t2(),this._resolved}onKeyframesResolved(a,l){this.resolvedAt=ca.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:u,delay:d,onComplete:m,onUpdate:p,isGenerator:g}=this.options;if(!g&&!l2(a,o,r,u))if(d)this.options.duration=0;else{p&&p(gc(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 ff=2e4;function Ub(n){let a=0;const l=50;let o=n.next(a);for(;!o.done&&a<ff;)a+=l,o=n.next(a);return a>=ff?1/0:a}const bt=(n,a,l)=>n+(a-n)*l;function Bd(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 c2({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=Bd(p,m,n+1/3),u=Bd(p,m,n),d=Bd(p,m,n-1/3)}return{red:Math.round(r*255),green:Math.round(u*255),blue:Math.round(d*255),alpha:o}}function Jr(n,a){return l=>l>0?a:n}const Ld=(n,a,l)=>{const o=n*n,r=l*(a*a-o)+o;return r<0?0:Math.sqrt(r)},u2=[rf,Vs,Oi],d2=n=>u2.find(a=>a.test(n));function Y0(n){const a=d2(n);if(!a)return!1;let l=a.parse(n);return a===Oi&&(l=c2(l)),l}const F0=(n,a)=>{const l=Y0(n),o=Y0(a);if(!l||!o)return Jr(n,a);const r={...l};return u=>(r.red=Ld(l.red,o.red,u),r.green=Ld(l.green,o.green,u),r.blue=Ld(l.blue,o.blue,u),r.alpha=bt(l.alpha,o.alpha,u),Vs.transform(r))},f2=(n,a)=>l=>a(n(l)),po=(...n)=>n.reduce(f2),hf=new Set(["none","hidden"]);function h2(n,a){return hf.has(n)?l=>l<=0?n:a:l=>l>=1?a:n}function m2(n,a){return l=>bt(n,a,l)}function ph(n){return typeof n=="number"?m2:typeof n=="string"?Zf(n)?Jr:tn.test(n)?F0:v2:Array.isArray(n)?zb:typeof n=="object"?tn.test(n)?F0:p2:Jr}function zb(n,a){const l=[...n],o=l.length,r=n.map((u,d)=>ph(u)(u,a[d]));return u=>{for(let d=0;d<o;d++)l[d]=r[d](u);return l}}function p2(n,a){const l={...n,...a},o={};for(const r in l)n[r]!==void 0&&a[r]!==void 0&&(o[r]=ph(n[r])(n[r],a[r]));return r=>{for(const u in o)l[u]=o[u](r);return l}}function g2(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 v2=(n,a)=>{const l=fs.createTransformer(a),o=oo(n),r=oo(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?hf.has(n)&&!r.values.length||hf.has(a)&&!o.values.length?h2(n,a):po(zb(g2(o,r),r.values),l):Jr(n,a)};function Vb(n,a,l){return typeof n=="number"&&typeof a=="number"&&typeof l=="number"?bt(n,a,l):ph(n)(n,a)}const y2=5;function Ib(n,a,l){const o=Math.max(a-y2,0);return cb(l-n(o),a-o)}const At={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},Ud=.001;function b2({duration:n=At.duration,bounce:a=At.bounce,velocity:l=At.velocity,mass:o=At.mass}){let r,u,d=1-a;d=Oa(At.minDamping,At.maxDamping,d),n=Oa(At.minDuration,At.maxDuration,Ra(n)),d<1?(r=g=>{const y=g*d,b=y*n,_=y-l,T=mf(g,d),j=Math.exp(-b);return Ud-_/T*j},u=g=>{const b=g*d*n,_=b*l+l,T=Math.pow(d,2)*Math.pow(g,2)*n,j=Math.exp(-b),A=mf(Math.pow(g,2),d);return(-r(g)+Ud>0?-1:1)*((_-T)*j)/A}):(r=g=>{const y=Math.exp(-g*n),b=(g-l)*n+1;return-Ud+y*b},u=g=>{const y=Math.exp(-g*n),b=(l-g)*(n*n);return y*b});const m=5/n,p=x2(r,u,m);if(n=ka(n),isNaN(p))return{stiffness:At.stiffness,damping:At.damping,duration:n};{const g=Math.pow(p,2)*o;return{stiffness:g,damping:d*2*Math.sqrt(o*g),duration:n}}}const S2=12;function x2(n,a,l){let o=l;for(let r=1;r<S2;r++)o=o-n(o)/a(o);return o}function mf(n,a){return n*Math.sqrt(1-a*a)}const _2=["duration","bounce"],T2=["stiffness","damping","mass"];function K0(n,a){return a.some(l=>n[l]!==void 0)}function E2(n){let a={velocity:At.velocity,stiffness:At.stiffness,damping:At.damping,mass:At.mass,isResolvedFromDuration:!1,...n};if(!K0(n,T2)&&K0(n,_2))if(n.visualDuration){const l=n.visualDuration,o=2*Math.PI/(l*1.2),r=o*o,u=2*Oa(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:At.mass,stiffness:r,damping:u}}else{const l=b2(n);a={...a,...l,mass:At.mass},a.isResolvedFromDuration=!0}return a}function Hb(n=At.visualDuration,a=At.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:_,isResolvedFromDuration:T}=E2({...l,velocity:-Ra(l.velocity||0)}),j=_||0,A=g/(2*Math.sqrt(p*y)),w=d-u,C=Ra(Math.sqrt(p/y)),z=Math.abs(w)<5;o||(o=z?At.restSpeed.granular:At.restSpeed.default),r||(r=z?At.restDelta.granular:At.restDelta.default);let R;if(A<1){const I=mf(C,A);R=W=>{const ee=Math.exp(-A*C*W);return d-ee*((j+A*C*w)/I*Math.sin(I*W)+w*Math.cos(I*W))}}else if(A===1)R=I=>d-Math.exp(-C*I)*(w+(j+C*w)*I);else{const I=C*Math.sqrt(A*A-1);R=W=>{const ee=Math.exp(-A*C*W),q=Math.min(I*W,300);return d-ee*((j+A*C*w)*Math.sinh(q)+I*w*Math.cosh(q))/I}}const Q={calculatedDuration:T&&b||null,next:I=>{const W=R(I);if(T)m.done=I>=b;else{let ee=0;A<1&&(ee=I===0?ka(j):Ib(R,I,W));const q=Math.abs(ee)<=o,ae=Math.abs(d-W)<=r;m.done=q&&ae}return m.value=m.done?d:W,m},toString:()=>{const I=Math.min(Ub(Q),ff),W=db(ee=>Q.next(I*ee).value,I,30);return I+"ms "+W}};return Q}function $0({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],_={done:!1,value:b},T=q=>m!==void 0&&q<m||p!==void 0&&q>p,j=q=>m===void 0?p:p===void 0||Math.abs(m-q)<Math.abs(p-q)?m:p;let A=l*a;const w=b+A,C=d===void 0?w:d(w);C!==w&&(A=C-b);const z=q=>-A*Math.exp(-q/o),R=q=>C+z(q),Q=q=>{const ae=z(q),ye=R(q);_.done=Math.abs(ae)<=g,_.value=_.done?C:ye};let I,W;const ee=q=>{T(_.value)&&(I=q,W=Hb({keyframes:[_.value,j(_.value)],velocity:Ib(R,q,_.value),damping:r,stiffness:u,restDelta:g,restSpeed:y}))};return ee(0),{calculatedDuration:null,next:q=>{let ae=!1;return!W&&I===void 0&&(ae=!0,Q(q),ee(q)),I!==void 0&&q>=I?W.next(q-I):(!ae&&Q(q),_)}}}const A2=mo(.42,0,1,1),C2=mo(0,0,.58,1),Gb=mo(.42,0,.58,1),j2=n=>Array.isArray(n)&&typeof n[0]!="number",N2={linear:Nn,easeIn:A2,easeInOut:Gb,easeOut:C2,circIn:uh,circInOut:xb,circOut:Sb,backIn:ch,backInOut:yb,backOut:vb,anticipate:bb},Z0=n=>{if(rh(n)){Gy(n.length===4);const[a,l,o,r]=n;return mo(a,l,o,r)}else if(typeof n=="string")return N2[n];return n};function w2(n,a,l){const o=[],r=l||Vb,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]||Nn:a;m=po(p,m)}o.push(m)}return o}function D2(n,a,{clamp:l=!0,ease:o,mixer:r}={}){const u=n.length;if(Gy(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=w2(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 _=Hi(n[b],n[b+1],y);return m[b](_)};return l?y=>g(Oa(n[0],n[u-1],y)):g}function k2(n,a){const l=n[n.length-1];for(let o=1;o<=a;o++){const r=Hi(0,a,o);n.push(bt(l,1,r))}}function R2(n){const a=[0];return k2(a,n.length-1),a}function M2(n,a){return n.map(l=>l*a)}function O2(n,a){return n.map(()=>a||Gb).splice(0,n.length-1)}function Wr({duration:n=300,keyframes:a,times:l,ease:o="easeInOut"}){const r=j2(o)?o.map(Z0):Z0(o),u={done:!1,value:a[0]},d=M2(l&&l.length===a.length?l:R2(a),n),m=D2(d,a,{ease:Array.isArray(r)?r:O2(a,r)});return{calculatedDuration:n,next:p=>(u.value=m(p),u.done=p>=n,u)}}const B2=n=>{const a=({timestamp:l})=>n(l);return{start:()=>ft.update(a,!0),stop:()=>ds(a),now:()=>Qt.isProcessing?Qt.timestamp:ca.now()}},L2={decay:$0,inertia:$0,tween:Wr,keyframes:Wr,spring:Hb},U2=n=>n/100;class gh extends Lb{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)||mh,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=oh(l)?l:L2[l]||Wr;let p,g;m!==Wr&&typeof a[0]!="number"&&(p=po(U2,Vb(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=Ub(y));const{calculatedDuration:b}=y,_=b+r,T=_*(o+1)-r;return{generator:y,mirroredGenerator:g,mapPercentToKeyframes:p,calculatedDuration:b,resolvedDuration:_,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:q}=this.options;return{done:!0,value:q[q.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:_,repeat:T,repeatType:j,repeatDelay:A,onUpdate:w}=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-_*(this.speed>=0?1:-1),z=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,Q=u;if(T){const q=Math.min(this.currentTime,y)/b;let ae=Math.floor(q),ye=q%1;!ye&&q>=1&&(ye=1),ye===1&&ae--,ae=Math.min(ae,T+1),!!(ae%2)&&(j==="reverse"?(ye=1-ye,A&&(ye-=A/b)):j==="mirror"&&(Q=d)),R=Oa(0,1,ye)*b}const I=z?{done:!1,value:p[0]}:Q.next(R);m&&(I.value=m(I.value));let{done:W}=I;!z&&g!==null&&(W=this.speed>=0?this.currentTime>=y:this.currentTime<=0);const ee=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&W);return ee&&r!==void 0&&(I.value=gc(p,this.options,r)),w&&w(I.value),ee&&this.finish(),I}get duration(){const{resolved:a}=this;return a?Ra(a.calculatedDuration):0}get time(){return Ra(this.currentTime)}set time(a){a=ka(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=Ra(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:a=B2,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 z2=new Set(["opacity","clipPath","filter","transform"]);function V2(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=hb(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 I2=lh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ec=10,H2=2e4;function G2(n){return oh(n.type)||n.type==="spring"||!fb(n.ease)}function P2(n,a){const l=new gh({...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<H2;)o=l.sample(u),r.push(o.value),u+=ec;return{times:void 0,keyframes:r,duration:u-ec,ease:"linear"}}const Pb={anticipate:bb,backInOut:yb,circInOut:xb};function q2(n){return n in Pb}class X0 extends Lb{constructor(a){super(a);const{name:l,motionValue:o,element:r,keyframes:u}=this.options;this.resolver=new Bb(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"&&Qr()&&q2(u)&&(u=Pb[u]),G2(this.options)){const{onComplete:b,onUpdate:_,motionValue:T,element:j,...A}=this.options,w=P2(a,A);a=w.keyframes,a.length===1&&(a[1]=a[0]),o=w.duration,r=w.times,u=w.ease,d="keyframes"}const y=V2(m.owner.current,p,a,{...this.options,duration:o,times:r,ease:u});return y.startTime=g??this.calcStartTime(),this.pendingTimeline?(z0(y,this.pendingTimeline),this.pendingTimeline=void 0):y.onfinish=()=>{const{onComplete:b}=this.options;m.set(gc(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 Ra(l)}get time(){const{resolved:a}=this;if(!a)return 0;const{animation:l}=a;return Ra(l.currentTime||0)}set time(a){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.currentTime=ka(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 Nn;const{animation:o}=l;z0(o,a)}return Nn}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:_,...T}=this.options,j=new gh({...T,keyframes:o,duration:r,type:u,ease:d,times:m,isGenerator:!0}),A=ka(this.time);g.setWithVelocity(j.sample(A-ec).value,j.sample(A).value,ec)}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 I2()&&o&&z2.has(o)&&!p&&!g&&!r&&u!=="mirror"&&d!==0&&m!=="inertia"}}const Y2={type:"spring",stiffness:500,damping:25,restSpeed:10},F2=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),K2={type:"keyframes",duration:.8},$2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Z2=(n,{keyframes:a})=>a.length>2?K2:Ys.has(n)?n.startsWith("scale")?F2(a[1]):Y2:$2;function X2({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 vh=(n,a,l,o={},r,u)=>d=>{const m=nh(o,n)||{},p=m.delay||o.delay||0;let{elapsed:g=0}=o;g=g-ka(p);let y={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:a.getVelocity(),...m,delay:-g,onUpdate:_=>{a.set(_),m.onUpdate&&m.onUpdate(_)},onComplete:()=>{d(),m.onComplete&&m.onComplete()},name:n,motionValue:a,element:u?void 0:r};X2(m)||(y={...y,...Z2(n,y)}),y.duration&&(y.duration=ka(y.duration)),y.repeatDelay&&(y.repeatDelay=ka(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 _=gc(y.keyframes,m);if(_!==void 0)return ft.update(()=>{y.onUpdate(_),y.onComplete()}),new NA([])}return!u&&X0.supports(y)?new X0(y):new gh(y)};function Q2({protectedKeys:n,needsAnimating:a},l){const o=n.hasOwnProperty(l)&&a[l]!==!0;return a[l]=!1,o}function qb(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 _=n.getValue(b,(u=n.latestValues[b])!==null&&u!==void 0?u:null),T=p[b];if(T===void 0||y&&Q2(y,b))continue;const j={delay:l,...nh(d||{},b)};let A=!1;if(window.MotionHandoffAnimation){const C=ub(n);if(C){const z=window.MotionHandoffAnimation(C,b,ft);z!==null&&(j.startTime=z,A=!0)}}lf(n,b),_.start(vh(b,_,T,n.shouldReduceMotion&&rb.has(b)?{type:!1}:j,n,A));const w=_.animation;w&&g.push(w)}return m&&Promise.all(g).then(()=>{ft.update(()=>{m&&EA(n,m)})}),g}function pf(n,a,l={}){var o;const r=pc(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(qb(n,r,l)):()=>Promise.resolve(),m=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:y=0,staggerChildren:b,staggerDirection:_}=u;return J2(n,a,y+g,b,_,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 J2(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(W2).forEach((g,y)=>{g.notify("AnimationStart",a),d.push(pf(g,a,{...u,delay:l+p(y)}).then(()=>g.notify("AnimationComplete",a)))}),Promise.all(d)}function W2(n,a){return n.sortNodePosition(a)}function eC(n,a,l={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const r=a.map(u=>pf(n,u,l));o=Promise.all(r)}else if(typeof a=="string")o=pf(n,a,l);else{const r=typeof a=="function"?pc(n,a,l.custom):a;o=Promise.all(qb(n,r,l))}return o.then(()=>{n.notify("AnimationComplete",a)})}const tC=qf.length;function Yb(n){if(!n)return;if(!n.isControllingVariants){const l=n.parent?Yb(n.parent)||{}:{};return n.props.initial!==void 0&&(l.initial=n.props.initial),l}const a={};for(let l=0;l<tC;l++){const o=qf[l],r=n.props[o];(so(r)||r===!1)&&(a[o]=r)}return a}const nC=[...Pf].reverse(),aC=Pf.length;function sC(n){return a=>Promise.all(a.map(({animation:l,options:o})=>eC(n,l,o)))}function iC(n){let a=sC(n),l=Q0(),o=!0;const r=p=>(g,y)=>{var b;const _=pc(n,y,p==="exit"?(b=n.presenceContext)===null||b===void 0?void 0:b.custom:void 0);if(_){const{transition:T,transitionEnd:j,...A}=_;g={...g,...A,...j}}return g};function u(p){a=p(n)}function d(p){const{props:g}=n,y=Yb(n.parent)||{},b=[],_=new Set;let T={},j=1/0;for(let w=0;w<aC;w++){const C=nC[w],z=l[C],R=g[C]!==void 0?g[C]:y[C],Q=so(R),I=C===p?z.isActive:null;I===!1&&(j=w);let W=R===y[C]&&R!==g[C]&&Q;if(W&&o&&n.manuallyAnimateOnMount&&(W=!1),z.protectedKeys={...T},!z.isActive&&I===null||!R&&!z.prevProp||hc(R)||typeof R=="boolean")continue;const ee=lC(z.prevProp,R);let q=ee||C===p&&z.isActive&&!W&&Q||w>j&&Q,ae=!1;const ye=Array.isArray(R)?R:[R];let B=ye.reduce(r(C),{});I===!1&&(B={});const{prevResolvedValues:me={}}=z,ne={...me,...B},_e=$=>{q=!0,_.has($)&&(ae=!0,_.delete($)),z.needsAnimating[$]=!0;const te=n.getValue($);te&&(te.liveStyle=!1)};for(const $ in ne){const te=B[$],De=me[$];if(T.hasOwnProperty($))continue;let Ce=!1;sf(te)&&sf(De)?Ce=!ob(te,De):Ce=te!==De,Ce?te!=null?_e($):_.add($):te!==void 0&&_.has($)?_e($):z.protectedKeys[$]=!0}z.prevProp=R,z.prevResolvedValues=B,z.isActive&&(T={...T,...B}),o&&n.blockInitialAnimation&&(q=!1),q&&(!(W&&ee)||ae)&&b.push(...ye.map($=>({animation:$,options:{type:C}})))}if(_.size){const w={};_.forEach(C=>{const z=n.getBaseTarget(C),R=n.getValue(C);R&&(R.liveStyle=!0),w[C]=z??null}),b.push({animation:w})}let A=!!b.length;return o&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(A=!1),o=!1,A?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(_=>{var T;return(T=_.animationState)===null||T===void 0?void 0:T.setActive(p,g)}),l[p].isActive=g;const b=d(p);for(const _ in l)l[_].protectedKeys={};return b}return{animateChanges:d,setActive:m,setAnimateFunction:u,getState:()=>l,reset:()=>{l=Q0(),o=!0}}}function lC(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!ob(a,n):!1}function Os(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Q0(){return{animate:Os(!0),whileInView:Os(),whileHover:Os(),whileTap:Os(),whileDrag:Os(),whileFocus:Os(),exit:Os()}}class hs{constructor(a){this.isMounted=!1,this.node=a}update(){}}class oC extends hs{constructor(a){super(a),a.animationState||(a.animationState=iC(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();hc(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 rC=0;class cC extends hs{constructor(){super(...arguments),this.id=rC++}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 uC={animation:{Feature:oC},exit:{Feature:cC}},Jn={x:!1,y:!1};function Fb(){return Jn.x||Jn.y}function dC(n){return n==="x"||n==="y"?Jn[n]?null:(Jn[n]=!0,()=>{Jn[n]=!1}):Jn.x||Jn.y?null:(Jn.x=Jn.y=!0,()=>{Jn.x=Jn.y=!1})}const yh=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function ro(n,a,l,o={passive:!0}){return n.addEventListener(a,l,o),()=>n.removeEventListener(a,l)}function go(n){return{point:{x:n.pageX,y:n.pageY}}}const fC=n=>a=>yh(a)&&n(a,go(a));function Jl(n,a,l,o){return ro(n,a,fC(l),o)}const J0=(n,a)=>Math.abs(n-a);function hC(n,a){const l=J0(n.x,a.x),o=J0(n.y,a.y);return Math.sqrt(l**2+o**2)}class Kb{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=Vd(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,T=hC(b.offset,{x:0,y:0})>=3;if(!_&&!T)return;const{point:j}=b,{timestamp:A}=Qt;this.history.push({...j,timestamp:A});const{onStart:w,onMove:C}=this.handlers;_||(w&&w(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,b)},this.handlePointerMove=(b,_)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=zd(_,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(b,_)=>{this.end();const{onEnd:T,onSessionEnd:j,resumeAnimation:A}=this.handlers;if(this.dragSnapToOrigin&&A&&A(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Vd(b.type==="pointercancel"?this.lastMoveEventInfo:zd(_,this.transformPagePoint),this.history);this.startEvent&&T&&T(b,w),j&&j(b,w)},!yh(a))return;this.dragSnapToOrigin=u,this.handlers=l,this.transformPagePoint=o,this.contextWindow=r||window;const d=go(a),m=zd(d,this.transformPagePoint),{point:p}=m,{timestamp:g}=Qt;this.history=[{...p,timestamp:g}];const{onSessionStart:y}=l;y&&y(a,Vd(m,this.history)),this.removeListeners=po(Jl(this.contextWindow,"pointermove",this.handlePointerMove),Jl(this.contextWindow,"pointerup",this.handlePointerUp),Jl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),ds(this.updatePoint)}}function zd(n,a){return a?{point:a(n.point)}:n}function W0(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Vd({point:n},a){return{point:n,delta:W0(n,$b(a)),offset:W0(n,mC(a)),velocity:pC(a,.1)}}function mC(n){return n[0]}function $b(n){return n[n.length-1]}function pC(n,a){if(n.length<2)return{x:0,y:0};let l=n.length-1,o=null;const r=$b(n);for(;l>=0&&(o=n[l],!(r.timestamp-o.timestamp>ka(a)));)l--;if(!o)return{x:0,y:0};const u=Ra(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 Zb=1e-4,gC=1-Zb,vC=1+Zb,Xb=.01,yC=0-Xb,bC=0+Xb;function wn(n){return n.max-n.min}function SC(n,a,l){return Math.abs(n-a)<=l}function ev(n,a,l,o=.5){n.origin=o,n.originPoint=bt(a.min,a.max,n.origin),n.scale=wn(l)/wn(a),n.translate=bt(l.min,l.max,n.origin)-n.originPoint,(n.scale>=gC&&n.scale<=vC||isNaN(n.scale))&&(n.scale=1),(n.translate>=yC&&n.translate<=bC||isNaN(n.translate))&&(n.translate=0)}function Wl(n,a,l,o){ev(n.x,a.x,l.x,o?o.originX:void 0),ev(n.y,a.y,l.y,o?o.originY:void 0)}function tv(n,a,l){n.min=l.min+a.min,n.max=n.min+wn(a)}function xC(n,a,l){tv(n.x,a.x,l.x),tv(n.y,a.y,l.y)}function nv(n,a,l){n.min=a.min-l.min,n.max=n.min+wn(a)}function eo(n,a,l){nv(n.x,a.x,l.x),nv(n.y,a.y,l.y)}function _C(n,{min:a,max:l},o){return a!==void 0&&n<a?n=o?bt(a,n,o.min):Math.max(n,a):l!==void 0&&n>l&&(n=o?bt(l,n,o.max):Math.min(n,l)),n}function av(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 TC(n,{top:a,left:l,bottom:o,right:r}){return{x:av(n.x,l,r),y:av(n.y,a,o)}}function sv(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 EC(n,a){return{x:sv(n.x,a.x),y:sv(n.y,a.y)}}function AC(n,a){let l=.5;const o=wn(n),r=wn(a);return r>o?l=Hi(a.min,a.max-o,n.min):o>r&&(l=Hi(n.min,n.max-r,a.min)),Oa(0,1,l)}function CC(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 gf=.35;function jC(n=gf){return n===!1?n=0:n===!0&&(n=gf),{x:iv(n,"left","right"),y:iv(n,"top","bottom")}}function iv(n,a,l){return{min:lv(n,a),max:lv(n,l)}}function lv(n,a){return typeof n=="number"?n:n[a]||0}const ov=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bi=()=>({x:ov(),y:ov()}),rv=()=>({min:0,max:0}),Rt=()=>({x:rv(),y:rv()});function Gn(n){return[n("x"),n("y")]}function Qb({top:n,left:a,right:l,bottom:o}){return{x:{min:a,max:l},y:{min:n,max:o}}}function NC({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function wC(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 Id(n){return n===void 0||n===1}function vf({scale:n,scaleX:a,scaleY:l}){return!Id(n)||!Id(a)||!Id(l)}function Ls(n){return vf(n)||Jb(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function Jb(n){return cv(n.x)||cv(n.y)}function cv(n){return n&&n!=="0%"}function tc(n,a,l){const o=n-l,r=a*o;return l+r}function uv(n,a,l,o,r){return r!==void 0&&(n=tc(n,r,o)),tc(n,l,o)+a}function yf(n,a=0,l=1,o,r){n.min=uv(n.min,a,l,o,r),n.max=uv(n.max,a,l,o,r)}function Wb(n,{x:a,y:l}){yf(n.x,a.translate,a.scale,a.originPoint),yf(n.y,l.translate,l.scale,l.originPoint)}const dv=.999999999999,fv=1.0000000000001;function DC(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&&Ui(n,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),d&&(a.x*=d.x.scale,a.y*=d.y.scale,Wb(n,d)),o&&Ls(u.latestValues)&&Ui(n,u.latestValues))}a.x<fv&&a.x>dv&&(a.x=1),a.y<fv&&a.y>dv&&(a.y=1)}function Li(n,a){n.min=n.min+a,n.max=n.max+a}function hv(n,a,l,o,r=.5){const u=bt(n.min,n.max,r);yf(n,a,l,u,o)}function Ui(n,a){hv(n.x,a.x,a.scaleX,a.scale,a.originX),hv(n.y,a.y,a.scaleY,a.scale,a.originY)}function e1(n,a){return Qb(wC(n.getBoundingClientRect(),a))}function kC(n,a,l){const o=e1(n,l),{scroll:r}=a;return r&&(Li(o.x,r.offset.x),Li(o.y,r.offset.y)),o}const t1=({current:n})=>n?n.ownerDocument.defaultView:null,RC=new WeakMap;class MC{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=Rt(),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(go(y).point)},u=(y,b)=>{const{drag:_,dragPropagation:T,onDragStart:j}=this.getProps();if(_&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=dC(_),!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),Gn(w=>{let C=this.getAxisMotionValue(w).get()||0;if(ra.test(C)){const{projection:z}=this.visualElement;if(z&&z.layout){const R=z.layout.layoutBox[w];R&&(C=wn(R)*(parseFloat(C)/100))}}this.originPoint[w]=C}),j&&ft.postRender(()=>j(y,b)),lf(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},d=(y,b)=>{const{dragPropagation:_,dragDirectionLock:T,onDirectionLock:j,onDrag:A}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:w}=b;if(T&&this.currentDirection===null){this.currentDirection=OC(w),this.currentDirection!==null&&j&&j(this.currentDirection);return}this.updateAxis("x",b.point,w),this.updateAxis("y",b.point,w),this.visualElement.render(),A&&A(y,b)},m=(y,b)=>this.stop(y,b),p=()=>Gn(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 Kb(a,{onSessionStart:r,onStart:u,onMove:d,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:t1(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||!Ur(a,r,this.currentDirection))return;const u=this.getAxisMotionValue(a);let d=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(d=_C(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&&Mi(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&r?this.constraints=TC(r.layoutBox,l):this.constraints=!1,this.elastic=jC(o),u!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Gn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=CC(r.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:l}=this.getProps();if(!a||!Mi(a))return!1;const o=a.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const u=kC(o,r.root,this.visualElement.getTransformPagePoint());let d=EC(r.layout.layoutBox,u);if(l){const m=l(NC(d));this.hasMutatedConstraints=!!m,m&&(d=Qb(m))}return d}startAnimation(a){const{drag:l,dragMomentum:o,dragElastic:r,dragTransition:u,dragSnapToOrigin:d,onDragTransitionEnd:m}=this.getProps(),p=this.constraints||{},g=Gn(y=>{if(!Ur(y,l,this.currentDirection))return;let b=p&&p[y]||{};d&&(b={min:0,max:0});const _=r?200:1e6,T=r?40:1e7,j={type:"inertia",velocity:o?a[y]:0,bounceStiffness:_,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...u,...b};return this.startAxisValueAnimation(y,j)});return Promise.all(g).then(m)}startAxisValueAnimation(a,l){const o=this.getAxisMotionValue(a);return lf(this.visualElement,a),o.start(vh(a,o,0,l,this.visualElement,!1))}stopAnimation(){Gn(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){Gn(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){Gn(l=>{const{drag:o}=this.getProps();if(!Ur(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]-bt(d,m,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!Mi(l)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Gn(d=>{const m=this.getAxisMotionValue(d);if(m&&this.constraints!==!1){const p=m.get();r[d]=AC({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(),Gn(d=>{if(!Ur(d,a,null))return;const m=this.getAxisMotionValue(d),{min:p,max:g}=this.constraints[d];m.set(bt(p,g,r[d]))})}addListeners(){if(!this.visualElement.current)return;RC.set(this.visualElement,this);const a=this.visualElement.current,l=Jl(a,"pointerdown",p=>{const{drag:g,dragListener:y=!0}=this.getProps();g&&y&&this.start(p)}),o=()=>{const{dragConstraints:p}=this.getProps();Mi(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=ro(window,"resize",()=>this.scalePositionWithinConstraints()),m=r.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:g})=>{this.isDragging&&g&&(Gn(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=gf,dragMomentum:m=!0}=a;return{...a,drag:l,dragDirectionLock:o,dragPropagation:r,dragConstraints:u,dragElastic:d,dragMomentum:m}}}function Ur(n,a,l){return(a===!0||a===n)&&(l===null||l===n)}function OC(n,a=10){let l=null;return Math.abs(n.y)>a?l="y":Math.abs(n.x)>a&&(l="x"),l}class BC extends hs{constructor(a){super(a),this.removeGroupControls=Nn,this.removeListeners=Nn,this.controls=new MC(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Nn}unmount(){this.removeGroupControls(),this.removeListeners()}}const mv=n=>(a,l)=>{n&&ft.postRender(()=>n(a,l))};class LC extends hs{constructor(){super(...arguments),this.removePointerDownListener=Nn}onPointerDown(a){this.session=new Kb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:t1(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:l,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:mv(a),onStart:mv(l),onMove:o,onEnd:(u,d)=>{delete this.session,r&&ft.postRender(()=>r(u,d))}}}mount(){this.removePointerDownListener=Jl(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 Kr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pv(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Pl={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(xe.test(n))n=parseFloat(n);else return n;const l=pv(n,a.target.x),o=pv(n,a.target.y);return`${l}% ${o}%`}},UC={correct:(n,{treeScale:a,projectionDelta:l})=>{const o=n,r=fs.parse(n);if(r.length>5)return o;const u=fs.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=bt(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 zC extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:l,switchLayoutGroup:o,layoutId:r}=this.props,{projection:u}=a;uA(VC),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()})),Kr.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(),Ff.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 n1(n){const[a,l]=Iy(),o=S.useContext(Vf);return h.jsx(zC,{...n,layoutGroup:o,switchLayoutGroup:S.useContext($y),isPresent:a,safeToRemove:l})}const VC={borderRadius:{...Pl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pl,borderTopRightRadius:Pl,borderBottomLeftRadius:Pl,borderBottomRightRadius:Pl,boxShadow:UC};function IC(n,a,l){const o=nn(n)?n:lo(n);return o.start(vh("",o,a,l)),o.animation}function HC(n){return n instanceof SVGElement&&n.tagName!=="svg"}const GC=(n,a)=>n.depth-a.depth;class PC{constructor(){this.children=[],this.isDirty=!1}add(a){ah(this.children,a),this.isDirty=!0}remove(a){sh(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(GC),this.isDirty=!1,this.children.forEach(a)}}function qC(n,a){const l=ca.now(),o=({timestamp:r})=>{const u=r-l;u>=a&&(ds(o),n(u-a))};return ft.read(o,!0),()=>ds(o)}const a1=["TopLeft","TopRight","BottomLeft","BottomRight"],YC=a1.length,gv=n=>typeof n=="string"?parseFloat(n):n,vv=n=>typeof n=="number"||xe.test(n);function FC(n,a,l,o,r,u){r?(n.opacity=bt(0,l.opacity!==void 0?l.opacity:1,KC(o)),n.opacityExit=bt(a.opacity!==void 0?a.opacity:1,0,$C(o))):u&&(n.opacity=bt(a.opacity!==void 0?a.opacity:1,l.opacity!==void 0?l.opacity:1,o));for(let d=0;d<YC;d++){const m=`border${a1[d]}Radius`;let p=yv(a,m),g=yv(l,m);if(p===void 0&&g===void 0)continue;p||(p=0),g||(g=0),p===0||g===0||vv(p)===vv(g)?(n[m]=Math.max(bt(gv(p),gv(g),o),0),(ra.test(g)||ra.test(p))&&(n[m]+="%")):n[m]=g}(a.rotate||l.rotate)&&(n.rotate=bt(a.rotate||0,l.rotate||0,o))}function yv(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const KC=s1(0,.5,Sb),$C=s1(.5,.95,Nn);function s1(n,a,l){return o=>o<n?0:o>a?1:l(Hi(n,a,o))}function bv(n,a){n.min=a.min,n.max=a.max}function Hn(n,a){bv(n.x,a.x),bv(n.y,a.y)}function Sv(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function xv(n,a,l,o,r){return n-=a,n=tc(n,1/l,o),r!==void 0&&(n=tc(n,1/r,o)),n}function ZC(n,a=0,l=1,o=.5,r,u=n,d=n){if(ra.test(a)&&(a=parseFloat(a),a=bt(d.min,d.max,a/100)-d.min),typeof a!="number")return;let m=bt(u.min,u.max,o);n===u&&(m-=a),n.min=xv(n.min,a,l,m,r),n.max=xv(n.max,a,l,m,r)}function _v(n,a,[l,o,r],u,d){ZC(n,a[l],a[o],a[r],a.scale,u,d)}const XC=["x","scaleX","originX"],QC=["y","scaleY","originY"];function Tv(n,a,l,o){_v(n.x,a,XC,l?l.x:void 0,o?o.x:void 0),_v(n.y,a,QC,l?l.y:void 0,o?o.y:void 0)}function Ev(n){return n.translate===0&&n.scale===1}function i1(n){return Ev(n.x)&&Ev(n.y)}function Av(n,a){return n.min===a.min&&n.max===a.max}function JC(n,a){return Av(n.x,a.x)&&Av(n.y,a.y)}function Cv(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function l1(n,a){return Cv(n.x,a.x)&&Cv(n.y,a.y)}function jv(n){return wn(n.x)/wn(n.y)}function Nv(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class WC{constructor(){this.members=[]}add(a){ah(this.members,a),a.scheduleRender()}remove(a){if(sh(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 ej(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:_,skewX:T,skewY:j}=l;g&&(o=`perspective(${g}px) ${o}`),y&&(o+=`rotate(${y}deg) `),b&&(o+=`rotateX(${b}deg) `),_&&(o+=`rotateY(${_}deg) `),T&&(o+=`skewX(${T}deg) `),j&&(o+=`skewY(${j}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 Us={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Kl=typeof window<"u"&&window.MotionDebug!==void 0,Hd=["","X","Y","Z"],tj={visibility:"hidden"},wv=1e3;let nj=0;function Gd(n,a,l,o){const{latestValues:r}=a;r[n]&&(l[n]=r[n],a.setStaticValue(n,0),o&&(o[n]=0))}function o1(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const l=ub(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&&o1(o)}function r1({attachResizeListener:n,defaultParent:a,measureScroll:l,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(d={},m=a==null?void 0:a()){this.id=nj++,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,Kl&&(Us.totalNodes=Us.resolvedTargetDeltas=Us.recalculatedProjection=0),this.nodes.forEach(ij),this.nodes.forEach(uj),this.nodes.forEach(dj),this.nodes.forEach(lj),Kl&&window.MotionDebug.record(Us)},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 PC)}addEventListener(d,m){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new ih),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=HC(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 _=()=>this.root.updateBlockedByResize=!1;n(d,()=>{this.root.updateBlockedByResize=!0,b&&b(),b=qC(_,250),Kr.hasAnimatedSinceResize&&(Kr.hasAnimatedSinceResize=!1,this.nodes.forEach(kv))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&y&&(p||g)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:_,hasRelativeTargetChanged:T,layout:j})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||y.getDefaultTransition()||gj,{onLayoutAnimationStart:w,onLayoutAnimationComplete:C}=y.getProps(),z=!this.targetLayout||!l1(this.targetLayout,j)||T,R=!_&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||R||_&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(b,R);const Q={...nh(A,"layout"),onPlay:w,onComplete:C};(y.shouldReduceMotion||this.options.layoutRoot)&&(Q.delay=0,Q.type=!1),this.startAnimation(Q)}else _||kv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=j})}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,ds(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(fj),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&&o1(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(Dv);return}this.isUpdating||this.nodes.forEach(rj),this.isUpdating=!1,this.nodes.forEach(cj),this.nodes.forEach(aj),this.nodes.forEach(sj),this.clearAllSnapshots();const m=ca.now();Qt.delta=Oa(0,1e3/60,m-Qt.timestamp),Qt.timestamp=m,Qt.isProcessing=!0,Md.update.process(Qt),Md.preRender.process(Qt),Md.render.process(Qt),Qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ff.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(oj),this.sharedNodes.forEach(hj)}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=Rt(),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&&!i1(this.projectionDelta),p=this.getTransformTemplate(),g=p?p(this.latestValues,""):void 0,y=g!==this.prevTransformTemplateValue;d&&(m||Ls(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)),vj(p),{animationId:this.root.animationId,measuredBox:m,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:m}=this.options;if(!m)return Rt();const p=m.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(yj))){const{scroll:y}=this.root;y&&(Li(p.x,y.offset.x),Li(p.y,y.offset.y))}return p}removeElementScroll(d){var m;const p=Rt();if(Hn(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:_}=y;y!==this.root&&b&&_.layoutScroll&&(b.wasRoot&&Hn(p,d),Li(p.x,b.offset.x),Li(p.y,b.offset.y))}return p}applyTransform(d,m=!1){const p=Rt();Hn(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&&Ui(p,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),Ls(y.latestValues)&&Ui(p,y.latestValues)}return Ls(this.latestValues)&&Ui(p,this.latestValues),p}removeTransform(d){const m=Rt();Hn(m,d);for(let p=0;p<this.path.length;p++){const g=this.path[p];if(!g.instance||!Ls(g.latestValues))continue;vf(g.latestValues)&&g.updateSnapshot();const y=Rt(),b=g.measurePageBox();Hn(y,b),Tv(m,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,y)}return Ls(this.latestValues)&&Tv(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!==Qt.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:_}=this.options;if(!(!this.layout||!(b||_))){if(this.resolvedRelativeTargetAt=Qt.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Rt(),this.relativeTargetOrigin=Rt(),eo(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),Hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Rt(),this.targetWithTransforms=Rt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Hn(this.target,this.layout.layoutBox),Wb(this.target,this.targetDelta)):Hn(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=Rt(),this.relativeTargetOrigin=Rt(),eo(this.relativeTargetOrigin,this.target,T.target),Hn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Kl&&Us.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||vf(this.parent.latestValues)||Jb(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===Qt.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;Hn(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,T=this.treeScale.y;DC(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=Rt());const{target:j}=m;if(!j){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sv(this.prevProjectionDelta.x,this.projectionDelta.x),Sv(this.prevProjectionDelta.y,this.projectionDelta.y)),Wl(this.projectionDelta,this.layoutCorrected,j,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==T||!Nv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Nv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",j)),Kl&&Us.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=Bi(),this.projectionDelta=Bi(),this.projectionDeltaWithTransform=Bi()}setAnimationOrigin(d,m=!1){const p=this.snapshot,g=p?p.latestValues:{},y={...this.latestValues},b=Bi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!m;const _=Rt(),T=p?p.source:void 0,j=this.layout?this.layout.source:void 0,A=T!==j,w=this.getStack(),C=!w||w.members.length<=1,z=!!(A&&!C&&this.options.crossfade===!0&&!this.path.some(pj));this.animationProgress=0;let R;this.mixTargetDelta=Q=>{const I=Q/1e3;Rv(b.x,d.x,I),Rv(b.y,d.y,I),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(eo(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mj(this.relativeTarget,this.relativeTargetOrigin,_,I),R&&JC(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Rt()),Hn(R,this.relativeTarget)),A&&(this.animationValues=y,FC(y,g,this.latestValues,I,z,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=I},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&&(ds(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{Kr.hasAnimatedSinceResize=!0,this.currentAnimation=IC(0,wv,{...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(wv),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&&c1(this.options.animationType,this.layout.layoutBox,g.layoutBox)){p=this.target||Rt();const b=wn(this.layout.layoutBox.x);p.x.min=d.target.x.min,p.x.max=p.x.min+b;const _=wn(this.layout.layoutBox.y);p.y.min=d.target.y.min,p.y.max=p.y.min+_}Hn(m,p),Ui(m,y),Wl(this.projectionDeltaWithTransform,this.layoutCorrected,m,y)}}registerSharedNode(d,m){this.sharedNodes.has(d)||this.sharedNodes.set(d,new WC),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&&Gd("z",d,g,this.animationValues);for(let y=0;y<Hd.length;y++)Gd(`rotate${Hd[y]}`,d,g,this.animationValues),Gd(`skew${Hd[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 tj;const g={visibility:""},y=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Yr(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 A={};return this.options.layoutId&&(A.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,A.pointerEvents=Yr(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!Ls(this.latestValues)&&(A.transform=y?y({},""):"none",this.hasProjected=!1),A}const _=b.animationValues||b.latestValues;this.applyTransformsToTarget(),g.transform=ej(this.projectionDeltaWithTransform,this.treeScale,_),y&&(g.transform=y(_,g.transform));const{x:T,y:j}=this.projectionDelta;g.transformOrigin=`${T.origin*100}% ${j.origin*100}% 0`,b.animationValues?g.opacity=b===this?(p=(m=_.opacity)!==null&&m!==void 0?m:this.latestValues.opacity)!==null&&p!==void 0?p:1:this.preserveOpacity?this.latestValues.opacity:_.opacityExit:g.opacity=b===this?_.opacity!==void 0?_.opacity:"":_.opacityExit!==void 0?_.opacityExit:0;for(const A in Xr){if(_[A]===void 0)continue;const{correct:w,applyTo:C}=Xr[A],z=g.transform==="none"?_[A]:w(_[A],b);if(C){const R=C.length;for(let Q=0;Q<R;Q++)g[C[Q]]=z}else g[A]=z}return this.options.layoutId&&(g.pointerEvents=b===this?Yr(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(Dv),this.root.sharedNodes.clear()}}}function aj(n){n.updateLayout()}function sj(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"?Gn(b=>{const _=d?l.measuredBox[b]:l.layoutBox[b],T=wn(_);_.min=o[b].min,_.max=_.min+T}):c1(u,l.layoutBox,o)&&Gn(b=>{const _=d?l.measuredBox[b]:l.layoutBox[b],T=wn(o[b]);_.max=_.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+T)});const m=Bi();Wl(m,o,l.layoutBox);const p=Bi();d?Wl(p,n.applyTransform(r,!0),l.measuredBox):Wl(p,o,l.layoutBox);const g=!i1(m);let y=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:_,layout:T}=b;if(_&&T){const j=Rt();eo(j,l.layoutBox,_.layoutBox);const A=Rt();eo(A,o,T.layoutBox),l1(j,A)||(y=!0),b.options.layoutRoot&&(n.relativeTarget=A,n.relativeTargetOrigin=j,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 ij(n){Kl&&Us.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 lj(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function oj(n){n.clearSnapshot()}function Dv(n){n.clearMeasurements()}function rj(n){n.isLayoutDirty=!1}function cj(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function kv(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function uj(n){n.resolveTargetDelta()}function dj(n){n.calcProjection()}function fj(n){n.resetSkewAndRotation()}function hj(n){n.removeLeadSnapshot()}function Rv(n,a,l){n.translate=bt(a.translate,0,l),n.scale=bt(a.scale,1,l),n.origin=a.origin,n.originPoint=a.originPoint}function Mv(n,a,l,o){n.min=bt(a.min,l.min,o),n.max=bt(a.max,l.max,o)}function mj(n,a,l,o){Mv(n.x,a.x,l.x,o),Mv(n.y,a.y,l.y,o)}function pj(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const gj={duration:.45,ease:[.4,0,.1,1]},Ov=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Bv=Ov("applewebkit/")&&!Ov("chrome/")?Math.round:Nn;function Lv(n){n.min=Bv(n.min),n.max=Bv(n.max)}function vj(n){Lv(n.x),Lv(n.y)}function c1(n,a,l){return n==="position"||n==="preserve-aspect"&&!SC(jv(a),jv(l),.2)}function yj(n){var a;return n!==n.root&&((a=n.scroll)===null||a===void 0?void 0:a.wasRoot)}const bj=r1({attachResizeListener:(n,a)=>ro(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pd={current:void 0},u1=r1({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Pd.current){const n=new bj({});n.mount(window),n.setOptions({layoutScroll:!0}),Pd.current=n}return Pd.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),Sj={pan:{Feature:LC},drag:{Feature:BC,ProjectionNode:u1,MeasureLayout:n1}};function xj(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 d1(n,a){const l=xj(n),o=new AbortController,r={passive:!0,...a,signal:o.signal};return[l,r,()=>o.abort()]}function Uv(n){return a=>{a.pointerType==="touch"||Fb()||n(a)}}function _j(n,a,l={}){const[o,r,u]=d1(n,l),d=Uv(m=>{const{target:p}=m,g=a(m);if(typeof g!="function"||!p)return;const y=Uv(b=>{g(b),p.removeEventListener("pointerleave",y)});p.addEventListener("pointerleave",y,r)});return o.forEach(m=>{m.addEventListener("pointerenter",d,r)}),u}function zv(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,go(a)))}class Tj extends hs{mount(){const{current:a}=this.node;a&&(this.unmount=_j(a,l=>(zv(this.node,l,"Start"),o=>zv(this.node,o,"End"))))}unmount(){}}class Ej extends hs{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=po(ro(this.node.current,"focus",()=>this.onFocus()),ro(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const f1=(n,a)=>a?n===a?!0:f1(n,a.parentElement):!1,Aj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Cj(n){return Aj.has(n.tagName)||n.tabIndex!==-1}const $l=new WeakSet;function Vv(n){return a=>{a.key==="Enter"&&n(a)}}function qd(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const jj=(n,a)=>{const l=n.currentTarget;if(!l)return;const o=Vv(()=>{if($l.has(l))return;qd(l,"down");const r=Vv(()=>{qd(l,"up")}),u=()=>qd(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 Iv(n){return yh(n)&&!Fb()}function Nj(n,a,l={}){const[o,r,u]=d1(n,l),d=m=>{const p=m.currentTarget;if(!Iv(m)||$l.has(p))return;$l.add(p);const g=a(m),y=(T,j)=>{window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",_),!(!Iv(T)||!$l.has(p))&&($l.delete(p),typeof g=="function"&&g(T,{success:j}))},b=T=>{y(T,l.useGlobalTarget||f1(p,T.target))},_=T=>{y(T,!1)};window.addEventListener("pointerup",b,r),window.addEventListener("pointercancel",_,r)};return o.forEach(m=>{!Cj(m)&&m.getAttribute("tabindex")===null&&(m.tabIndex=0),(l.useGlobalTarget?window:m).addEventListener("pointerdown",d,r),m.addEventListener("focus",g=>jj(g,r),r)}),u}function Hv(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,go(a)))}class wj extends hs{mount(){const{current:a}=this.node;a&&(this.unmount=Nj(a,l=>(Hv(this.node,l,"Start"),(o,{success:r})=>Hv(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const bf=new WeakMap,Yd=new WeakMap,Dj=n=>{const a=bf.get(n.target);a&&a(n)},kj=n=>{n.forEach(Dj)};function Rj({root:n,...a}){const l=n||document;Yd.has(l)||Yd.set(l,{});const o=Yd.get(l),r=JSON.stringify(a);return o[r]||(o[r]=new IntersectionObserver(kj,{root:n,...a})),o[r]}function Mj(n,a,l){const o=Rj(a);return bf.set(n,l),o.observe(n),()=>{bf.delete(n),o.unobserve(n)}}const Oj={some:0,all:1};class Bj extends hs{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:Oj[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(),_=g?y:b;_&&_(p)};return Mj(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(Lj(a,l))&&this.startObserver()}unmount(){}}function Lj({viewport:n={}},{viewport:a={}}={}){return l=>n[l]!==a[l]}const Uj={inView:{Feature:Bj},tap:{Feature:wj},focus:{Feature:Ej},hover:{Feature:Tj}},zj={layout:{ProjectionNode:u1,MeasureLayout:n1}},Sf={current:null},h1={current:!1};function Vj(){if(h1.current=!0,!!Gf)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>Sf.current=n.matches;n.addListener(a),a()}else Sf.current=!1}const Ij=[...Ob,tn,fs],Hj=n=>Ij.find(Mb(n)),Gv=new WeakMap;function Gj(n,a,l){for(const o in a){const r=a[o],u=l[o];if(nn(r))n.addValue(o,r);else if(nn(u))n.addValue(o,lo(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,lo(d!==void 0?d:r,{owner:n}))}}for(const o in l)a[o]===void 0&&n.removeValue(o);return a}const Pv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Pj{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=mh,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=ca.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=mc(l),this.isVariantNode=Fy(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:b,..._}=this.scrapeMotionValuesFromProps(l,{},this);for(const T in _){const j=_[T];p[T]!==void 0&&nn(j)&&j.set(p[T],!1)}}mount(a){this.current=a,Gv.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)),h1.current||Vj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Sf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Gv.delete(this.current),this.projection&&this.projection.unmount(),ds(this.notifyUpdate),ds(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=Ys.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 Ii){const l=Ii[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):Rt()}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<Pv.length;o++){const r=Pv[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=Gj(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=lo(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"&&(kb(r)||_b(r))?r=parseFloat(r):!Hj(r)&&fs.test(l)&&(r=Nb(a,l)),this.setBaseTarget(a,nn(r)?r.get():r)),nn(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=$f(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&&!nn(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 ih),this.events[a].add(l)}notify(a,...l){this.events[a]&&this.events[a].notify(...l)}}class m1 extends Pj{constructor(){super(...arguments),this.KeyframeResolver=Bb}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;nn(a)&&(this.childSubscription=a.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function qj(n){return window.getComputedStyle(n)}class Yj extends m1{constructor(){super(...arguments),this.type="html",this.renderInstance=tb}readValueFromInstance(a,l){if(Ys.has(l)){const o=hh(l);return o&&o.default||0}else{const o=qj(a),r=(Jy(l)?o.getPropertyValue(l):o[l])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:l}){return e1(a,l)}build(a,l,o){Qf(a,l,o.transformTemplate)}scrapeMotionValuesFromProps(a,l,o){return th(a,l,o)}}class Fj extends m1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Rt}getBaseTargetFromProps(a,l){return a[l]}readValueFromInstance(a,l){if(Ys.has(l)){const o=hh(l);return o&&o.default||0}return l=nb.has(l)?l:Yf(l),a.getAttribute(l)}scrapeMotionValuesFromProps(a,l,o){return ib(a,l,o)}build(a,l,o){Jf(a,l,this.isSVGTag,o.transformTemplate)}renderInstance(a,l,o,r){ab(a,l,o,r)}mount(a){this.isSVGTag=eh(a.tagName),super.mount(a)}}const Kj=(n,a)=>Kf(n)?new Fj(a):new Yj(a,{allowProjection:n!==S.Fragment}),$j=bA({...uC,...Uj,...Sj,...zj},Kj),Wn=OE($j);var Ct;(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"})(Ct||(Ct={}));var Vt;(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"})(Vt||(Vt={}));var cs;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(cs||(cs={}));var us;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(us||(us={}));const Zj=8;Object.assign(Object.create(null),{"":Ct.UNSPECIFIED,text:Ct.TEXT,tool_use:Ct.TOOL_USE,tool_result:Ct.TOOL_RESULT,error:Ct.ERROR,status:Ct.STATUS,system:Ct.SYSTEM,finding:Ct.FINDING,subtask_create:Ct.SUBTASK_CREATE,user_input:Ct.USER_INPUT});Ct.UNSPECIFIED+"",Ct.TEXT+"",Ct.TOOL_USE+"",Ct.TOOL_RESULT+"",Ct.ERROR+"",Ct.STATUS+"",Ct.SYSTEM+"",Ct.FINDING+"",Ct.SUBTASK_CREATE+"",Ct.USER_INPUT+"";Object.assign(Object.create(null),{"":Vt.UNSPECIFIED,not_started:Vt.NOT_STARTED,working:Vt.WORKING,paused:Vt.PAUSED,complete:Vt.COMPLETE,failed:Vt.FAILED,pending:Vt.NOT_STARTED,assigned:Vt.NOT_STARTED,in_progress:Vt.WORKING,waiting_input:Vt.PAUSED,review:Vt.PAUSED,done:Vt.COMPLETE});Vt.UNSPECIFIED+"",Vt.NOT_STARTED+"",Vt.WORKING+"",Vt.PAUSED+"",Vt.COMPLETE+"",Vt.FAILED+"";Object.assign(Object.create(null),{"":cs.UNSPECIFIED,active:cs.ACTIVE,archived:cs.ARCHIVED});cs.UNSPECIFIED+"",cs.ACTIVE+"",cs.ARCHIVED+"";Object.assign(Object.create(null),{"":us.UNSPECIFIED,open:us.OPEN,closed:us.CLOSED});us.UNSPECIFIED+"",us.OPEN+"",us.CLOSED+"";function Ba(n){return Array.isArray?Array.isArray(n):v1(n)==="[object Array]"}function Xj(n){if(typeof n=="string")return n;let a=n+"";return a=="0"&&1/n==-1/0?"-0":a}function Qj(n){return n==null?"":Xj(n)}function la(n){return typeof n=="string"}function p1(n){return typeof n=="number"}function Jj(n){return n===!0||n===!1||Wj(n)&&v1(n)=="[object Boolean]"}function g1(n){return typeof n=="object"}function Wj(n){return g1(n)&&n!==null}function jn(n){return n!=null}function Fd(n){return!n.trim().length}function v1(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const eN="Incorrect 'index' type",tN=n=>`Invalid value for key ${n}`,nN=n=>`Pattern length exceeds max of ${n}.`,aN=n=>`Missing ${n} property in key`,sN=n=>`Property 'weight' in key '${n}' must be a positive integer`,qv=Object.prototype.hasOwnProperty;class iN{constructor(a){this._keys=[],this._keyMap={};let l=0;a.forEach(o=>{let r=y1(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 y1(n){let a=null,l=null,o=null,r=1,u=null;if(la(n)||Ba(n))o=n,a=Yv(n),l=xf(n);else{if(!qv.call(n,"name"))throw new Error(aN("name"));const d=n.name;if(o=d,qv.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(sN(d));a=Yv(d),l=xf(d),u=n.getFn}return{path:a,id:l,weight:r,src:o,getFn:u}}function Yv(n){return Ba(n)?n:n.split(".")}function xf(n){return Ba(n)?n.join("."):n}function lN(n,a){let l=[],o=!1;const r=(u,d,m)=>{if(jn(u))if(!d[m])l.push(u);else{let p=d[m];const g=u[p];if(!jn(g))return;if(m===d.length-1&&(la(g)||p1(g)||Jj(g)))l.push(Qj(g));else if(Ba(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,la(a)?a.split("."):a,0),o?l:l[0]}const oN={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},rN={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},cN={location:0,threshold:.6,distance:100},uN={useExtendedSearch:!1,getFn:lN,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Ae={...rN,...oN,...cN,...uN};const dN=/[^ ]+/g;function fN(n=1,a=3){const l=new Map,o=Math.pow(10,a);return{get(r){const u=r.match(dN).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 bh{constructor({getFn:a=Ae.getFn,fieldNormWeight:l=Ae.fieldNormWeight}={}){this.norm=fN(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,la(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();la(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(!jn(a)||Fd(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(jn(d)){if(Ba(d)){let m=[];const p=[{nestedArrIndex:-1,value:d}];for(;p.length;){const{nestedArrIndex:g,value:y}=p.pop();if(jn(y))if(la(y)&&!Fd(y)){let b={v:y,i:g,n:this.norm.get(y)};m.push(b)}else Ba(y)&&y.forEach((b,_)=>{p.push({nestedArrIndex:_,value:b})})}o.$[u]=m}else if(la(d)&&!Fd(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 b1(n,a,{getFn:l=Ae.getFn,fieldNormWeight:o=Ae.fieldNormWeight}={}){const r=new bh({getFn:l,fieldNormWeight:o});return r.setKeys(n.map(y1)),r.setSources(a),r.create(),r}function hN(n,{getFn:a=Ae.getFn,fieldNormWeight:l=Ae.fieldNormWeight}={}){const{keys:o,records:r}=n,u=new bh({getFn:a,fieldNormWeight:l});return u.setKeys(o),u.setIndexRecords(r),u}function zr(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 mN(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 zs=32;function pN(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>zs)throw new Error(nN(zs));const y=a.length,b=n.length,_=Math.max(0,Math.min(o,b));let T=u,j=_;const A=m>1||p,w=A?Array(b):[];let C;for(;(C=n.indexOf(a,j))>-1;){let ee=zr(a,{currentLocation:C,expectedLocation:_,distance:r,ignoreLocation:g});if(T=Math.min(ee,T),j=C+y,A){let q=0;for(;q<y;)w[C+q]=1,q+=1}}j=-1;let z=[],R=1,Q=y+b;const I=1<<y-1;for(let ee=0;ee<y;ee+=1){let q=0,ae=Q;for(;q<ae;)zr(a,{errors:ee,currentLocation:_+ae,expectedLocation:_,distance:r,ignoreLocation:g})<=T?q=ae:Q=ae,ae=Math.floor((Q-q)/2+q);Q=ae;let ye=Math.max(1,_-ae+1),B=d?b:Math.min(_+ae,b)+y,me=Array(B+2);me[B+1]=(1<<ee)-1;for(let _e=B;_e>=ye;_e-=1){let G=_e-1,U=l[n.charAt(G)];if(A&&(w[G]=+!!U),me[_e]=(me[_e+1]<<1|1)&U,ee&&(me[_e]|=(z[_e+1]|z[_e])<<1|1|z[_e+1]),me[_e]&I&&(R=zr(a,{errors:ee,currentLocation:G,expectedLocation:_,distance:r,ignoreLocation:g}),R<=T)){if(T=R,j=G,j<=_)break;ye=Math.max(1,2*_-j)}}if(zr(a,{errors:ee+1,currentLocation:_,expectedLocation:_,distance:r,ignoreLocation:g})>T)break;z=me}const W={isMatch:j>=0,score:Math.max(.001,R)};if(A){const ee=mN(w,m);ee.length?p&&(W.indices=ee):W.isMatch=!1}return W}function gN(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 nc=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 S1{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?nc(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const b=(T,j)=>{this.chunks.push({pattern:T,alphabet:gN(T),startIndex:j})},_=this.pattern.length;if(_>zs){let T=0;const j=_%zs,A=_-j;for(;T<A;)b(this.pattern.substr(T,zs),T),T+=zs;if(j){const w=_-zs;b(this.pattern.substr(w),w)}}else b(this.pattern,0)}searchIn(a){const{isCaseSensitive:l,ignoreDiacritics:o,includeMatches:r}=this.options;if(a=l?a:a.toLowerCase(),a=o?nc(a):a,this.pattern===a){let A={isMatch:!0,score:0};return r&&(A.indices=[[0,a.length-1]]),A}const{location:u,distance:d,threshold:m,findAllMatches:p,minMatchCharLength:g,ignoreLocation:y}=this.options;let b=[],_=0,T=!1;this.chunks.forEach(({pattern:A,alphabet:w,startIndex:C})=>{const{isMatch:z,score:R,indices:Q}=pN(a,A,w,{location:u+C,distance:d,threshold:m,findAllMatches:p,minMatchCharLength:g,includeMatches:r,ignoreLocation:y});z&&(T=!0),_+=R,z&&Q&&(b=[...b,...Q])});let j={isMatch:T,score:T?_/this.chunks.length:1};return T&&r&&(j.indices=b),j}}class ms{constructor(a){this.pattern=a}static isMultiMatch(a){return Fv(a,this.multiRegex)}static isSingleMatch(a){return Fv(a,this.singleRegex)}search(){}}function Fv(n,a){const l=n.match(a);return l?l[1]:null}class vN extends ms{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 yN extends ms{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 bN extends ms{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 SN extends ms{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 xN extends ms{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 _N extends ms{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 x1 extends ms{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 S1(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 _1 extends ms{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 _f=[vN,_1,bN,SN,_N,xN,yN,x1],Kv=_f.length,TN=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,EN="|";function AN(n,a={}){return n.split(EN).map(l=>{let o=l.trim().split(TN).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<Kv;){const y=_f[g];let b=y.isMultiMatch(m);b&&(r.push(new y(b,a)),p=!0)}if(!p)for(g=-1;++g<Kv;){const y=_f[g];let b=y.isSingleMatch(m);if(b){r.push(new y(b,a));break}}}return r})}const CN=new Set([x1.type,_1.type]);class jN{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?nc(a):a,this.pattern=a,this.query=AN(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?nc(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 _=0,T=b.length;_<T;_+=1){const j=b[_],{isMatch:A,indices:w,score:C}=j.search(a);if(A){if(d+=1,p+=C,o){const z=j.constructor.type;CN.has(z)?m=[...m,...w]:m.push(w)}}else{p=0,d=0,m.length=0;break}}if(d){let _={isMatch:!0,score:p/d};return o&&(_.indices=m),_}}return{isMatch:!1,score:1}}}const Tf=[];function NN(...n){Tf.push(...n)}function Ef(n,a){for(let l=0,o=Tf.length;l<o;l+=1){let r=Tf[l];if(r.condition(n,a))return new r(n,a)}return new S1(n,a)}const ac={AND:"$and",OR:"$or"},Af={PATH:"$path",PATTERN:"$val"},Cf=n=>!!(n[ac.AND]||n[ac.OR]),wN=n=>!!n[Af.PATH],DN=n=>!Ba(n)&&g1(n)&&!Cf(n),$v=n=>({[ac.AND]:Object.keys(n).map(a=>({[a]:n[a]}))});function T1(n,a,{auto:l=!0}={}){const o=r=>{let u=Object.keys(r);const d=wN(r);if(!d&&u.length>1&&!Cf(r))return o($v(r));if(DN(r)){const p=d?r[Af.PATH]:u[0],g=d?r[Af.PATTERN]:r[p];if(!la(g))throw new Error(tN(p));const y={keyId:xf(p),pattern:g};return l&&(y.searcher=Ef(g,a)),y}let m={children:[],operator:u[0]};return u.forEach(p=>{const g=r[p];Ba(g)&&g.forEach(y=>{m.children.push(o(y))})}),m};return Cf(n)||(n=$v(n)),o(n)}function kN(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 RN(n,a){const l=n.matches;a.matches=[],jn(l)&&l.forEach(o=>{if(!jn(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 MN(n,a){a.score=n.score}function ON(n,a,{includeMatches:l=Ae.includeMatches,includeScore:o=Ae.includeScore}={}){const r=[];return l&&r.push(RN),o&&r.push(MN),n.map(u=>{const{idx:d}=u,m={item:a[d],refIndex:d};return r.length&&r.forEach(p=>{p(u,m)}),m})}class Ki{constructor(a,l={},o){this.options={...Ae,...l},this.options.useExtendedSearch,this._keyStore=new iN(this.options.keys),this.setCollection(a,o)}setCollection(a,l){if(this._docs=a,l&&!(l instanceof bh))throw new Error(eN);this._myIndex=l||b1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){jn(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=la(a)?la(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return kN(p,{ignoreFieldNorm:m}),u&&p.sort(d),p1(l)&&l>-1&&(p=p.slice(0,l)),ON(p,this._docs,{includeMatches:o,includeScore:r})}_searchStringList(a){const l=Ef(a,this.options),{records:o}=this._myIndex,r=[];return o.forEach(({v:u,i:d,n:m})=>{if(!jn(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=T1(a,this.options),o=(m,p,g)=>{if(!m.children){const{keyId:b,searcher:_}=m,T=this._findMatches({key:this._keyStore.get(b),value:this._myIndex.getValueForItemAtKeyId(p,b),searcher:_});return T&&T.length?[{idx:g,item:p,matches:T}]:[]}const y=[];for(let b=0,_=m.children.length;b<_;b+=1){const T=m.children[b],j=o(T,p,g);if(j.length)y.push(...j);else if(m.operator===ac.AND)return[]}return y},r=this._myIndex.records,u={},d=[];return r.forEach(({$:m,i:p})=>{if(jn(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=Ef(a,this.options),{keys:o,records:r}=this._myIndex,u=[];return r.forEach(({$:d,i:m})=>{if(!jn(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(!jn(l))return[];let r=[];if(Ba(l))l.forEach(({v:u,i:d,n:m})=>{if(!jn(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}}Ki.version="7.1.0";Ki.createIndex=b1;Ki.parseIndex=hN;Ki.config=Ae;Ki.parseQuery=T1;NN(jN);function Zv(n,a,l,o){if(!a.trim())return[];const r=.3;return new Ki(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 BN="_breadcrumbs_17or2_1",LN="_list_17or2_11",UN="_item_17or2_21",zN="_separator_17or2_28",VN="_link_17or2_34",IN="_current_17or2_57",ki={breadcrumbs:BN,list:LN,item:UN,separator:zN,link:VN,current:IN},HN="›";function $i({segments:n}){return h.jsx("nav",{className:ki.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:ki.list,children:n.map((a,l)=>{const o=l===n.length-1;return h.jsxs("li",{className:ki.item,children:[l>0&&h.jsx("span",{className:ki.separator,"aria-hidden":"true",children:HN}),a.url&&!o?h.jsx(Uf,{className:ki.link,to:a.url,title:a.label,children:a.label}):h.jsx("span",{className:ki.current,"aria-current":"page",title:a.label,children:a.label})]},l)})})})}function jf(){jf=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)),sc(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&&sc(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)},jf.apply(this,arguments)}function sc(n,a){return sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,o){return l.__proto__=o,l},sc(n,a)}function Xv(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 Kd(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 Xv(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)?Xv(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 GN=(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){Yx(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(I){for(var W,ee=Kd(I.properties.className);!(W=ee()).done;){var q=W.value;if(q.slice(0,9)==="language-")return q.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 _,T;T=(_=b)!=null&&_.includes("diff-")?b.split("-")[1]:b,g=n.highlight(Rr(o),T),u.properties.className=(u.properties.className||[]).concat("language-"+T)}catch(I){if(!a.ignoreMissing||!/Unknown language/.test(I.message))throw I;g=o}else g=o;g.children=(y=1,function I(W){return W.reduce(function(ee,q){if(q.type==="text"){var ae=q.value,ye=(ae.match(/\n/g)||"").length;if(ye===0)q.position={start:{line:y,column:1},end:{line:y,column:1}},ee.push(q);else for(var B,me=ae.split(`
|
|
88
|
+
`),ne=Kd(me.entries());!(B=ne()).done;){var _e=B.value,G=_e[0],U=_e[1];ee.push({type:"text",value:G===me.length-1?U:U+`
|
|
89
|
+
`,position:{start:{line:y+G,column:1},end:{line:y+G,column:1}}})}return y+=ye,ee}if(Object.prototype.hasOwnProperty.call(q,"children")){var $=y;return q.children=I(q.children),ee.push(q),q.position={start:{line:$,column:1},end:{line:y,column:1}},ee}return ee.push(q),ee},[])})(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 j,A=(function(I){var W=/{([\d,-]+)}/,ee=I.split(",").map(function(ye){return ye.trim()}).join();if(W.test(ee)){var q=W.exec(ee)[1],ae=Kx(q);return function(ye){return ae.includes(ye+1)}}return function(){return!1}})(p),w=(function(I){var W=jf(/showLineNumbers=(\d+)/i,{lines:1});if(W.test(I)){var ee=W.exec(I);return Number(ee.groups.lines)}return 1})(p),C=(function(I){for(var W=new Array(I),ee=0;ee<I;ee++)W[ee]={type:"element",tagName:"span",properties:{className:[]},children:[]};return W})(g.position.end.line),z=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],R=function(){var I,W,ee=j.value,q=ee[0],ae=ee[1];ae.properties.className=["code-line"];var ye=$x(g,function(B){return B.position.start.line<=q+1&&B.position.end.line>=q+1});ae.children=ye.children,(p.toLowerCase().includes("showLineNumbers".toLowerCase())||a.showLineNumbers===!0||typeof a.showLineNumbers=="object"&&a.showLineNumbers.includes(b))&&!z.some(function(B){return p.toLowerCase().includes(B)})&&(ae.properties.line=[(q+w).toString()],ae.properties.className.push("line-number")),A(q)&&ae.properties.className.push("highlight-line"),(b==="diff"||(I=b)!=null&&I.includes("diff-"))&&Rr(ae).substring(0,1)==="-"?ae.properties.className.push("deleted"):(b==="diff"||(W=b)!=null&&W.includes("diff-"))&&Rr(ae).substring(0,1)==="+"&&ae.properties.className.push("inserted")},Q=Kd(C.entries());!(j=Q()).done;)R();C.length>0&&Rr(C[C.length-1]).trim()===""&&C.pop(),o.children=C}}}})(Fx);const PN="_systemEvent_2kh3g_1",qN="_systemTimestamp_2kh3g_9",YN="_textEvent_2kh3g_13",FN="_toolUseEvent_2kh3g_100",KN="_toolUseHeader_2kh3g_116",$N="_toolUsePrefix_2kh3g_123",ZN="_toolUseName_2kh3g_128",XN="_toolUseArgs_2kh3g_133",QN="_toolResultEvent_2kh3g_144",JN="_toolResultHeader_2kh3g_150",WN="_toolResultIndicatorOk_2kh3g_174",ew="_toolResultIndicatorError_2kh3g_181",tw="_toolResultLabel_2kh3g_188",nw="_toolResultToggle_2kh3g_192",aw="_toolResultCommand_2kh3g_198",sw="_toolResultEllipsis_2kh3g_208",iw="_toolResultPre_2kh3g_212",lw="_errorEvent_2kh3g_227",ow="_statusEvent_2kh3g_236",rw="_userInputEvent_2kh3g_246",cw="_userInputContent_2kh3g_253",uw="_defaultEvent_2kh3g_265",yt={systemEvent:PN,systemTimestamp:qN,textEvent:YN,toolUseEvent:FN,toolUseHeader:KN,toolUsePrefix:$N,toolUseName:ZN,toolUseArgs:XN,toolResultEvent:QN,toolResultHeader:JN,toolResultIndicatorOk:WN,toolResultIndicatorError:ew,toolResultLabel:tw,toolResultToggle:nw,toolResultCommand:aw,toolResultEllipsis:sw,toolResultPre:iw,errorEvent:lw,statusEvent:ow,userInputEvent:rw,userInputContent:cw,defaultEvent:uw};function dw({time:n,content:a}){return h.jsxs("div",{className:yt.systemEvent,children:[h.jsxs("span",{className:yt.systemTimestamp,children:["[",n,"]"]})," ",a]})}function fw({content:n}){return h.jsx("div",{className:yt.textEvent,children:h.jsx(Nf,{remarkPlugins:[wf],rehypePlugins:[GN],children:n})})}function hw({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:yt.toolUseEvent,children:[h.jsxs("div",{className:yt.toolUseHeader,children:[h.jsx("span",{className:yt.toolUsePrefix,children:">"}),a?h.jsx("span",{className:yt.toolUseName,children:a}):null]}),h.jsx("pre",{className:yt.toolUseArgs,children:l})]})}const Qv=5;function mw(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 pw({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>Qv,p=o?n:d.slice(0,Qv).join(`
|
|
91
|
+
`),y=((l==null?void 0:l.tool)??"")||(u?"Tool error":"Tool output"),b=l?mw(l.tool,l.args):"",_=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:u?yt.toolResultIndicatorError:yt.toolResultIndicatorOk,"aria-label":u?"error":"success",children:u?"✗":"✓"}),h.jsx("span",{className:yt.toolResultLabel,children:y}),m&&h.jsx("span",{className:yt.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:yt.toolResultEvent,children:[m?h.jsx("button",{className:yt.toolResultHeader,onClick:()=>{r(T=>!T)},"aria-expanded":o,children:_}):h.jsx("div",{className:yt.toolResultHeader,children:_}),b&&h.jsx("div",{className:yt.toolResultCommand,children:b}),h.jsxs("pre",{className:yt.toolResultPre,children:[p,!o&&m&&h.jsx("span",{className:yt.toolResultEllipsis,children:"…"})]})]})}function gw({content:n}){return h.jsxs("div",{className:yt.errorEvent,children:["Error: ",n]})}function vw({content:n}){return h.jsxs("div",{className:yt.statusEvent,children:["--- ",n," ---"]})}function yw({content:n}){return h.jsx("div",{className:yt.userInputEvent,children:h.jsx("span",{className:yt.userInputContent,children:n})})}function bw({content:n}){return h.jsx("div",{className:yt.defaultEvent,children:n})}function E1({event:n,toolUseCtx:a}){const l=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(dw,{time:l,content:n.content});case"text":case"output":return h.jsx(fw,{content:n.content});case"tool_use":return h.jsx(hw,{content:n.content});case"tool_result":return h.jsx(pw,{content:n.content,raw:n.raw,toolUseCtx:a});case"error":return h.jsx(gw,{content:n.content});case"status":return h.jsx(vw,{content:n.content});case"user_input":return h.jsx(yw,{content:n.content});default:return h.jsx(bw,{content:n.content})}}const Sw="_overlay_cmicx_1",xw="_dialog_cmicx_11",_w="_title_cmicx_30",Tw="_description_cmicx_38",Ew="_actions_cmicx_45",Aw="_cancelButton_cmicx_52",Cw="_confirmButton_cmicx_79",Bs={overlay:Sw,dialog:xw,title:_w,description:Tw,actions:Ew,cancelButton:Aw,confirmButton:Cw};function vc({isOpen:n,title:a,description:l,confirmLabel:o="Delete",onConfirm:r,onCancel:u}){const d=S.useId(),m=S.useId();return h.jsx(qs,{children:n&&h.jsx(Wn.div,{className:Bs.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(Wn.div,{className:Bs.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:Bs.title,children:a}),l&&h.jsx("p",{id:m,className:Bs.description,children:l}),h.jsxs("div",{className:Bs.actions,children:[h.jsx("button",{type:"button",className:Bs.cancelButton,onClick:u,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:Bs.confirmButton,onClick:r,children:o})]})]})})})}const jw="_spinner_13c8l_1",Nw="_spin_13c8l_1",ww="_sm_13c8l_14",Dw="_md_13c8l_20",kw="_lg_13c8l_26",Jv={spinner:jw,spin:Nw,sm:ww,md:Dw,lg:kw};function Wv({size:n="md",className:a,label:l="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${Jv.spinner} ${Jv[n]} ${a??""}`,role:o?"status":void 0,"aria-label":l,"aria-hidden":o?void 0:!0})}const Rw="_container_4b672_1",Mw="_header_4b672_5",Ow="_searchInput_4b672_17",Bw="_searchHighlight_4b672_50",Lw="_addButton_4b672_56",Uw="_createForm_4b672_83",zw="_createInput_4b672_89",Vw="_createButton_4b672_120",Iw="_creatingHint_4b672_161",Hw="_projectRow_4b672_170",Gw="_selected_4b672_188",Pw="_expandArrow_4b672_193",qw="_expanded_4b672_200",Yw="_projectName_4b672_204",Fw="_taskCount_4b672_208",Kw="_newTaskButton_4b672_214",$w="_taskRow_4b672_241",Zw="_taskStatusIcon_4b672_266",Xw="_taskTitle_4b672_270",Qw="_dependencyBadge_4b672_277",Jw="_blockedBadge_4b672_289",Ww="_leafSpacer_4b672_294",eD="_childCountBadge_4b672_299",tD="_addChildButton_4b672_312",nD="_emptyCta_4b672_356",aD="_ctaDescription_4b672_369",sD="_ctaButton_4b672_375",iD="_emptyTaskCta_4b672_410",lD="_headerActions_4b672_415",oD="_groupToggle_4b672_421",rD="_groupToggleActive_4b672_448",cD="_statusGroupHeader_4b672_452",uD="_statusGroupIcon_4b672_471",dD="_statusGroupLabel_4b672_475",fD="_statusGroupCount_4b672_480",hD="_createTaskLink_4b672_493",Ne={container:Rw,header:Mw,searchInput:Ow,searchHighlight:Bw,addButton:Lw,createForm:Uw,createInput:zw,createButton:Vw,creatingHint:Iw,projectRow:Hw,selected:Gw,expandArrow:Pw,expanded:qw,projectName:Yw,taskCount:Fw,newTaskButton:Kw,taskRow:$w,taskStatusIcon:Zw,taskTitle:Xw,dependencyBadge:Qw,blockedBadge:Jw,leafSpacer:Ww,childCountBadge:eD,addChildButton:tD,emptyCta:nD,ctaDescription:aD,ctaButton:sD,emptyTaskCta:iD,headerActions:lD,groupToggle:oD,groupToggleActive:rD,statusGroupHeader:cD,statusGroupIcon:uD,statusGroupLabel:dD,statusGroupCount:fD,createTaskLink:hD},rs={not_started:{color:"var(--text-tertiary)",icon:"○"},working:{color:"var(--accent-green)",icon:"●"},paused:{color:"var(--accent-yellow)",icon:"◉"},complete:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},blocked:{color:"var(--accent-yellow)",icon:"⦸"}};function mD(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 A1({text:n,indices:a}){if(!a||a.length===0)return h.jsx(h.Fragment,{children:n});const l=mD(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 pD=[{name:"name",weight:2},{name:"description",weight:1}],gD=[{name:"title",weight:2},{name:"description",weight:1}],C1=34,vD=16,j1="grackle-group-by-status";function ey(){try{return localStorage.getItem(j1)==="true"}catch{return!1}}function yD(n){try{localStorage.setItem(j1,String(n))}catch{}}const bD=["working","paused","failed","not_started","blocked","complete"],SD={working:"Working",paused:"Paused",failed:"Failed",not_started:"Not Started",blocked:"Blocked",complete:"Complete"};function xD(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 bD){r.add(u);const d=l.get(u);d&&d.length>0&&(d.sort((m,p)=>m.sortOrder-p.sortOrder),o.push({status:u,label:SD[u]||u,style:rs[u]||rs.not_started,tasks:d}))}for(const[u,d]of l)!r.has(u)&&d.length>0&&(d.sort((m,p)=>m.sortOrder-p.sortOrder),o.push({status:u,label:u,style:rs[u]||rs.not_started,tasks:d}));return o}function _D({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(qs,{children:a&&h.jsx(Wn.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=rs[d.status]||rs.not_started,p=o===d.id;return h.jsxs("div",{onClick:()=>r(Hs(d.id)),className:`${Ne.taskRow} ${p?Ne.selected:""}`,style:{paddingLeft:C1},"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(A1,{text:d.title,indices:u.get(d.id)})})]},d.id)})})})]})}function TD(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 N1({node:n,depth:a,expandedTasks:l,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:m,titleHighlights:p}){const g=rs[n.status]||rs.not_started,y=n.dependsOn.length>0&&n.dependsOn.some(A=>m.get(A)!=="complete"),b=l.has(n.id),_=n.children.length>0,T=r===n.id,j=C1+a*vD;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>u(Hs(n.id)),className:`${Ne.taskRow} ${T?Ne.selected:""}`,style:{paddingLeft:j},"data-task-id":n.id,children:[_&&h.jsx("span",{className:`${Ne.expandArrow} ${b?Ne.expanded:""}`,role:"button",tabIndex:0,"aria-label":b?"Collapse task":"Expand task",onClick:A=>{A.stopPropagation(),o(n.id)},onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),A.stopPropagation(),o(n.id))},children:"▸"}),!_&&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(A1,{text:n.title,indices:p.get(n.id)})}),_&&h.jsxs("span",{className:Ne.childCountBadge,children:[n.children.filter(A=>A.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<Zj&&h.jsx("button",{onClick:A=>{A.stopPropagation(),u(Vi(d,n.id))},title:"Add child task","aria-label":"Add child task",className:Ne.addChildButton,children:"+"})]}),h.jsx(qs,{children:_&&b&&h.jsx(Wn.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(A=>h.jsx(N1,{node:A,depth:a+1,expandedTasks:l,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:m,titleHighlights:p},A.id))})})]})}function ED(){const{projects:n,tasks:a,loadTasks:l,createProject:o,projectCreating:r}=sn(),u=ua(),[d,m]=S.useState(new Set),[p,g]=S.useState(new Set),[y,b]=S.useState(new Set),[_,T]=S.useState(!1),[j,A]=S.useState(""),[w,C]=S.useState(ey),[z,R]=S.useState(ey),[Q,I]=S.useState(new Map),W=()=>{const Y=!w;yD(Y),C(Y),Y&&(R(!0),I(new Map))},ee=(Y,ve)=>{const H=`${Y}:${ve}`;I(Fe=>{const gt=new Map(Fe),St=gt.has(H)?gt.get(H):z;return gt.set(H,!St),gt})},q=(Y,ve)=>{const H=`${Y}:${ve}`;return Q.has(H)?Q.get(H):z},ae=rn("/tasks/:taskId/*"),ye=rn("/projects/:projectId"),B=(ae==null?void 0:ae.params.taskId)!=="new"?ae==null?void 0:ae.params.taskId:void 0,me=ye==null?void 0:ye.params.projectId,ne=S.useRef(d);ne.current=d;const _e=S.useMemo(()=>new Map(a.map(Y=>[Y.id,Y.status])),[a]),G=Y=>{m(ve=>{const H=new Set(ve);return H.has(Y)?H.delete(Y):(H.add(Y),l(Y)),H})},U=Y=>{g(ve=>{const H=new Set(ve);return H.has(Y)?(H.delete(Y),b(Fe=>new Set(Fe).add(Y))):(H.add(Y),b(Fe=>{const gt=new Set(Fe);return gt.delete(Y),gt})),H})};S.useEffect(()=>{const Y=new Set(a.filter(ve=>ve.parentTaskId).map(ve=>ve.parentTaskId));Y.size>0&&g(ve=>{const H=new Set(ve);for(const Fe of Y)y.has(Fe)||H.add(Fe);return H})},[a,y]),S.useEffect(()=>{me&&!ne.current.has(me)&&(m(Y=>new Set(Y).add(me)),l(me))},[me,l]);const $=()=>{!j.trim()||r||(o(j.trim()),A(""),T(!1))},[te,De]=S.useState(""),{directMatchTaskIds:Ce,treeMatchTaskIds:Ye,visibleProjectIds:ke,matchedProjectIds:Se,titleHighlights:je}=S.useMemo(()=>{if(!te.trim())return{directMatchTaskIds:null,treeMatchTaskIds:null,visibleProjectIds:null,matchedProjectIds:null,titleHighlights:new Map};const Y=Zv(n,te,pD),ve=Zv(a,te,gD),H=new Set(Y.map(Ze=>Ze.item.id)),Fe=new Set(ve.map(Ze=>Ze.item.id)),gt=new Map;for(const Ze of ve){const Ue=Ze.matches.find(yn=>yn.key==="title");Ue&>.set(Ze.item.id,Ue.indices)}const St=new Set(H);for(const Ze of ve)St.add(Ze.item.projectId);const It=new Set(Fe),Je=new Map(a.map(Ze=>[Ze.id,Ze]));for(const Ze of[...Fe]){let Ue=Je.get(Ze);for(;Ue!=null&&Ue.parentTaskId;)It.add(Ue.parentTaskId),Ue=Je.get(Ue.parentTaskId)}return{directMatchTaskIds:Fe,treeMatchTaskIds:It,visibleProjectIds:St,matchedProjectIds:H,titleHighlights:gt}},[te,n,a]),J=S.useRef(new Set);return S.useEffect(()=>{if(te.trim())for(const Y of n)!d.has(Y.id)&&!J.current.has(Y.id)&&(J.current.add(Y.id),l(Y.id))},[te,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} ${w?Ne.groupToggleActive:""}`,onClick:W,"aria-label":w?"Switch to tree view":"Group tasks by status","aria-pressed":w,title:w?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:Ne.addButton,onClick:()=>T(!_),"aria-label":"Create project",title:"Create project",children:"+"})]})]}),n.length>0&&h.jsx("input",{type:"text",value:te,onChange:Y=>De(Y.target.value),placeholder:"Filter...","aria-label":"Filter projects and tasks",className:Ne.searchInput,"data-testid":"sidebar-search"}),_&&h.jsxs("div",{className:Ne.createForm,children:[h.jsx("input",{type:"text",value:j,onChange:Y=>A(Y.target.value),onKeyDown:Y=>Y.key==="Enter"&&$(),placeholder:"Project name...",autoFocus:!0,disabled:r,className:Ne.createInput}),h.jsx("button",{onClick:$,className:Ne.createButton,disabled:r,children:r?h.jsx(Wv,{size:"sm",label:"Creating project"}):"OK"})]}),r&&h.jsxs("div",{className:Ne.creatingHint,children:[h.jsx(Wv,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!_&&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(Y=>{if(ke&&!ke.has(Y.id))return null;const ve=Ce!==null,H=d.has(Y.id)||ve,Fe=a.filter(Ue=>Ue.projectId===Y.id),gt=(Se==null?void 0:Se.has(Y.id))??!1,St=ve&&!gt?w?Ce:Ye:null,It=St?Fe.filter(Ue=>St.has(Ue.id)):Fe,Je=me===Y.id,Ze=H&&!w?TD(It):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{Je?G(Y.id):(H||G(Y.id),u(ao(Y.id)))},className:`${Ne.projectRow} ${Je?Ne.selected:""}`,children:[h.jsx("span",{className:`${Ne.expandArrow} ${H?Ne.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ne.projectName,title:Y.name,children:Y.name}),h.jsx("span",{className:Ne.taskCount,children:Fe.length>0&&`${Fe.filter(Ue=>Ue.status==="complete").length}/${Fe.length}`}),h.jsx("button",{onClick:Ue=>{Ue.stopPropagation(),u(Vi(Y.id))},title:"New task",className:Ne.newTaskButton,children:"+"})]}),h.jsx(qs,{children:H&&h.jsxs(Wn.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:[w?xD(It,_e).map(Ue=>h.jsx(_D,{group:Ue,isExpanded:q(Y.id,Ue.status),onToggle:()=>ee(Y.id,Ue.status),selectedTaskId:B,navigate:u,titleHighlights:je},Ue.status)):Ze.map(Ue=>h.jsx(N1,{node:Ue,depth:0,expandedTasks:p,toggleTask:U,selectedTaskId:B,navigate:u,projectId:Y.id,taskStatusById:_e,titleHighlights:je},Ue.id)),It.length===0&&h.jsx("div",{className:Ne.emptyTaskCta,children:h.jsx("button",{className:Ne.createTaskLink,onClick:()=>u(Vi(Y.id)),children:"+ Create Task"})})]})})]},Y.id)})]})}const AD="_container_1purk_1",CD="_content_1purk_30",ty={container:AD,content:CD},jD=320,w1=220,D1=600,k1="grackle-sidebar-width";function ND(){try{const n=localStorage.getItem(k1);if(n!==null){const a=Number(n);if(Number.isFinite(a)&&a>=w1&&a<=D1)return a}}catch{}return jD}function wD(n){try{localStorage.setItem(k1,String(n))}catch{}}function DD(){const[n]=S.useState(ND),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>=w1&&m<=D1&&wD(m)}}});return o.observe(l),()=>{o.disconnect()}},[]),h.jsx("div",{className:ty.container,ref:a,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:ty.content,children:h.jsx(ED,{})})})}const kD="_bar_teqep_1",RD="_barColumn_teqep_26",MD="_barRow_teqep_52",OD="_input_teqep_58",BD="_inputSmall_teqep_87",LD="_select_teqep_150",UD="_btnPrimary_teqep_180",zD="_btnDanger_teqep_211",VD="_btnGhost_teqep_250",ID="_badge_teqep_278",HD="_statusText_teqep_288",GD="_statusCompleted_teqep_293",PD="_statusFailed_teqep_297",qD="_statusBlocked_teqep_301",YD="_hintText_teqep_306",FD="_creatingHint_teqep_311",KD="_errorHint_teqep_319",$D="_disconnectHint_teqep_325",de={bar:kD,barColumn:RD,barRow:MD,input:OD,inputSmall:BD,select:LD,btnPrimary:UD,btnDanger:zD,btnGhost:VD,badge:ID,statusText:HD,statusCompleted:GD,statusFailed:PD,statusBlocked:qD,hintText:YD,creatingHint:FD,errorHint:KD,disconnectHint:$D};function ny({value:n,onChange:a,testId:l}){return h.jsxs("select",{"data-testid":l,value:n,onChange:o=>a(o.target.value),className:de.select,children:[h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"stub",children:"stub"})]})}function ay(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 sy({environmentId:n,onReconnect:a}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:de.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>a(n),className:de.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function ZD(){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:_,listCodespaces:T,createCodespace:j}=sn(),{showToast:A}=co(),w=ua(),[C]=zf(),z=rn("/sessions/:sessionId"),R=rn("/tasks/:taskId"),Q=rn("/tasks/:taskId/stream"),I=rn("/tasks/:taskId/findings"),W=rn("/tasks/:taskId/edit"),ee=rn("/sessions/new"),q=rn("/environments/new"),ae=rn("/projects/:projectId"),ye=rn("/tasks/new"),B=rn("/"),me=rn("/settings/*"),ne=z==null?void 0:z.params.sessionId,_e=(R==null?void 0:R.params.taskId)??(Q==null?void 0:Q.params.taskId)??(I==null?void 0:I.params.taskId),G=!!ee,U=!!q,$=!!ae,te=!!ye,De=!!W,Ce=!!B&&!G&&!U&&!$&&!te,Ye=!!me,ke=G?C.get("env")??"":"",Se=G?C.get("runtime")??"claude-code":"claude-code",[je,J]=S.useState(""),[Y,ve]=S.useState(G?Se:"claude-code"),[H,Fe]=S.useState(""),gt=pe=>{if(Fe(pe),pe){const oe=d.find(we=>we.id===pe);oe!=null&&oe.runtime&&ve(oe.runtime)}},[St,It]=S.useState(""),[Je,Ze]=S.useState("local"),[Ue,yn]=S.useState("claude-code"),[bn,Yn]=S.useState(""),[Jt,Fn]=S.useState(""),[X,ie]=S.useState(""),[re,ue]=S.useState(""),[Te,Ee]=S.useState(""),[We,Be]=S.useState(""),[ot,jt]=S.useState(""),[xt,Mt]=S.useState(""),[rt,_t]=S.useState(""),[ln,vt]=S.useState("pick");S.useEffect(()=>{G&&ve(Se)},[G,Se]);const Pt=ne?o.find(pe=>pe.id===ne):void 0,qt=_e?r.find(pe=>pe.id===_e):void 0,ps=(qt==null?void 0:qt.latestSessionId)||void 0,Kn=ps?o.find(pe=>pe.id===ps):void 0,se=qt?qt.dependsOn.some(pe=>{const oe=r.find(we=>we.id===pe);return oe&&oe.status!=="complete"}):!1;if(Ce||Ye)return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:de.hintText,children:"Select a session or click + to start"})});if(De||te)return h.jsx(h.Fragment,{});if(U){const pe=F=>{if(!F.trim())return!0;const nt=Number(F);return Number.isInteger(nt)&&nt>=1&&nt<=65535},oe=()=>!(!St.trim()||Je==="ssh"&&!bn.trim()||Je==="codespace"&&!We.trim()||(Je==="local"||Je==="ssh")&&!pe(Jt)),we=()=>{if(!oe())return;const F={};if(Je==="local"){if(bn.trim()&&(F.host=bn.trim()),Jt.trim()){const nt=Number(Jt);Number.isInteger(nt)&&(F.port=nt)}}else if(Je==="ssh"){if(F.host=bn.trim(),X.trim()&&(F.user=X.trim()),Jt.trim()){const nt=Number(Jt);Number.isInteger(nt)&&(F.sshPort=nt)}ot.trim()&&(F.identityFile=ot.trim())}else Je==="docker"?(re.trim()&&(F.image=re.trim()),Te.trim()&&(F.repo=Te.trim())):Je==="codespace"&&(F.codespaceName=We.trim());m(St.trim(),Je,F,Ue),A("Environment added successfully","success"),It(""),Ze("local"),yn("claude-code"),Yn(""),Fn(""),ie(""),ue(""),Ee(""),Be(""),jt(""),Mt(""),_t(""),vt("pick"),w(zi,{replace:!0})};return h.jsxs("div",{className:de.barColumn,children:[h.jsxs("div",{className:de.barRow,children:[h.jsx("span",{className:de.badge,children:"new env"}),h.jsx("input",{type:"text",value:St,onChange:F=>It(F.target.value),placeholder:"Environment name...",autoFocus:!0,className:de.input}),h.jsxs("select",{value:Je,onChange:F=>{Ze(F.target.value),F.target.value==="codespace"&&(T(),vt("pick"),Be(""))},className:de.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx(ny,{value:Ue,onChange:yn,testId:"new-environment-runtime-select"}),h.jsx("button",{onClick:we,disabled:!oe(),className:de.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:de.barRow,children:[Je==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:bn,onChange:F=>Yn(F.target.value),placeholder:"Host (optional)...",className:de.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Jt,onChange:F=>Fn(F.target.value),placeholder:"Port (optional)...",className:de.inputSmall})]}),Je==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:bn,onChange:F=>Yn(F.target.value),placeholder:"Host (required)...",className:de.inputSmall}),h.jsx("input",{type:"text",value:X,onChange:F=>ie(F.target.value),placeholder:"User (optional)...",className:de.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Jt,onChange:F=>Fn(F.target.value),placeholder:"SSH port (optional)...",className:de.inputSmall}),h.jsx("input",{type:"text",value:ot,onChange:F=>jt(F.target.value),placeholder:"Identity file (optional)...",className:de.inputSmall})]}),Je==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:re,onChange:F=>ue(F.target.value),placeholder:"Image (optional)...",className:de.inputSmall}),h.jsx("input",{type:"text",value:Te,onChange:F=>Ee(F.target.value),placeholder:"Repo (optional)...",className:de.inputSmall})]}),Je==="codespace"&&ln==="pick"&&h.jsxs(h.Fragment,{children:[!b&&h.jsxs("select",{value:We,onChange:F=>{F.target.value==="__create__"?(vt("create"),Be("")):(Be(F.target.value),F.target.value&&!St.trim()&&It(F.target.value))},disabled:_,className:de.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),g.map(F=>h.jsxs("option",{value:F.name,children:[F.name," (",F.repository,") — ",F.state]},F.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),_&&h.jsx("span",{className:de.creatingHint,children:"Creating codespace..."}),b&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:de.errorHint,children:b}),h.jsx("input",{type:"text",value:We,onChange:F=>Be(F.target.value),placeholder:"Or enter codespace name manually...",className:de.inputSmall})]}),y&&!b&&h.jsx("span",{className:de.errorHint,children:y})]}),Je==="codespace"&&ln==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:xt,onChange:F=>Mt(F.target.value),placeholder:"owner/repo",className:de.inputSmall}),h.jsx("input",{type:"text",value:rt,onChange:F=>_t(F.target.value),placeholder:"Machine type (optional)...",className:de.inputSmall}),h.jsx("button",{onClick:()=>{xt.trim()&&(j(xt.trim(),rt.trim()||void 0),vt("pick"),Mt(""),_t(""))},disabled:!xt.trim(),className:de.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{vt("pick"),Mt(""),_t("")},className:de.btnGhost,children:"Cancel"})]})]})]})}if($)return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:de.hintText,children:"Select a task or click + to create one"})});if(_e&&qt){if(qt.status==="not_started"){const pe=se?qt.dependsOn.map(oe=>r.find(we=>we.id===oe)).filter(oe=>oe&&oe.status!=="complete").map(oe=>oe.title):[];return h.jsx("div",{className:de.bar,children:se?h.jsxs("span",{className:de.statusBlocked,children:["Blocked by: ",pe.join(", ")]}):h.jsx("span",{className:de.hintText,children:"Use the buttons above to start or manage this task"})})}if(qt.status==="working"||qt.status==="paused"){if((Kn==null?void 0:Kn.status)==="idle"){const oe=Kn.environmentId,we=ay(oe,u),F=nt=>{nt.preventDefault();const dn=qt.latestSessionId||ps;!je.trim()||!dn||we||(a(dn,je),J(""))};return h.jsxs("form",{onSubmit:F,className:de.bar,children:[we&&oe&&h.jsx(sy,{environmentId:oe,onReconnect:p}),h.jsx("input",{type:"text",value:je,onChange:nt=>J(nt.target.value),placeholder:"Type a message...",autoFocus:!we,disabled:we,className:de.input}),h.jsx("span",{title:we?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!je.trim()||we,className:de.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:de.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:de.input})})}if(qt.status==="complete")return h.jsxs("div",{className:de.bar,children:[h.jsx("span",{className:`${de.statusText} ${de.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>w(Vi(qt.projectId)),className:de.btnPrimary,children:"+ New Task"})]});if(qt.status==="failed")return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:`${de.statusText} ${de.statusFailed}`,children:"Task failed"})})}if(G){const pe=oe=>{oe.preventDefault(),!(!je.trim()||!ke)&&(n(ke,je,void 0,Y,H),A("Session started","success"),J(""),Fe(""))};return h.jsxs("form",{onSubmit:pe,className:de.bar,children:[h.jsx("span",{className:de.badge,children:"new chat"}),h.jsx("input",{type:"text",value:je,onChange:oe=>J(oe.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:de.input}),h.jsx(ny,{value:Y,onChange:ve,testId:"new-chat-runtime-select"}),h.jsxs("select",{value:H,onChange:oe=>gt(oe.target.value),className:de.select,children:[h.jsx("option",{value:"",children:"No persona"}),d.map(oe=>h.jsx("option",{value:oe.id,children:oe.name},oe.id))]}),h.jsx("button",{type:"submit",disabled:!je.trim()||!ke,className:de.btnPrimary,children:"Go"})]})}if(ne){const pe=(Pt==null?void 0:Pt.status)==="running",oe=(Pt==null?void 0:Pt.status)==="idle",we=Pt!==void 0&&["completed","failed","interrupted"].includes(Pt.status);if(pe)return h.jsxs("div",{className:de.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:de.input}),h.jsx("button",{onClick:()=>l(ne),className:de.btnDanger,title:"Stop session",children:"Stop"})]});if(oe){const F=ay(Pt.environmentId,u),nt=dn=>{dn.preventDefault(),!(!je.trim()||F)&&(a(ne,je),J(""))};return h.jsxs("form",{onSubmit:nt,className:de.bar,children:[F&&Pt.environmentId&&h.jsx(sy,{environmentId:Pt.environmentId,onReconnect:p}),h.jsx("input",{type:"text",value:je,onChange:dn=>J(dn.target.value),placeholder:"Type a message...",autoFocus:!F,disabled:F,className:de.input}),h.jsx("span",{title:F?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!je.trim()||F,className:de.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>l(ne),className:de.btnDanger,title:"Stop session",children:"Stop"})]})}if(we)return h.jsxs("div",{className:de.bar,children:[h.jsxs("span",{className:`${de.statusText} ${de.hintText}`,children:["Session ",Pt.status]}),h.jsx("button",{onClick:()=>w(Vy(Pt.environmentId,Pt.runtime)),className:de.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:de.hintText,children:"Loading..."})})}const XD="_toast_da8ll_1",QD="_success_da8ll_18",JD="_icon_da8ll_22",WD="_error_da8ll_25",ek="_warning_da8ll_32",tk="_info_da8ll_38",nk="_message_da8ll_53",ak="_close_da8ll_60",ql={toast:XD,success:QD,icon:JD,error:WD,warning:ek,info:tk,message:nk,close:ak},sk={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function ik({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(Wn.div,{className:`${ql.toast} ${ql[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:ql.icon,"aria-hidden":"true",children:sk[n.variant]}),h.jsx("span",{className:ql.message,children:n.message}),h.jsx("button",{type:"button",className:ql.close,onClick:()=>a(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const lk="_container_qqse2_1",ok={container:lk};function rk(){const{toasts:n,dismissToast:a}=co();return h.jsx("div",{className:ok.container,"data-testid":"toast-container",children:h.jsx(qs,{children:n.map(l=>h.jsx(ik,{toast:l,onDismiss:a},l.id))})})}function ck(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 uk="_panelContainer_1blx0_1",dk="_emptyState_1blx0_8",fk="_projectSummary_1blx0_17",hk="_projectSummaryTitle_1blx0_28",mk="_projectSummarySubtitle_1blx0_32",pk="_header_1blx0_36",gk="_headerInfo_1blx0_63",vk="_killButton_1blx0_69",yk="_headerTitle_1blx0_98",bk="_headerActions_1blx0_108",Sk="_taskStatusBadge_1blx0_115",xk="_taskBranch_1blx0_124",_k="_taskBlockedBadge_1blx0_130",Tk="_btnPrimary_1blx0_138",Ek="_btnDanger_1blx0_169",Ak="_btnGhost_1blx0_208",Ck="_tabBar_1blx0_264",jk="_tab_1blx0_264",Nk="_active_1blx0_285",wk="_eventScroll_1blx0_290",Dk="_tabContent_1blx0_296",kk="_noContext_1blx0_301",Rk="_overviewContent_1blx0_307",Mk="_overviewDashboard_1blx0_316",Ok="_overviewHero_1blx0_322",Bk="_statusBadge_1blx0_329",Lk="_statusPending_1blx0_341",Uk="_statusInProgress_1blx0_351",zk="_statusDone_1blx0_361",Vk="_statusFailed_1blx0_366",Ik="_statusWaitingInput_1blx0_371",Hk="_overviewBranchPill_1blx0_376",Gk="_branchLink_1blx0_391",Pk="_overviewSection_1blx0_402",qk="_overviewLabel_1blx0_408",Yk="_overviewValue_1blx0_415",Fk="_overviewMuted_1blx0_420",Kk="_overviewMarkdown_1blx0_426",$k="_envRow_1blx0_495",Zk="_envDot_1blx0_501",Xk="_envDotGreen_1blx0_508",Qk="_envDotYellow_1blx0_512",Jk="_envDotRed_1blx0_516",Wk="_envDotGray_1blx0_520",eR="_depList_1blx0_524",tR="_depItem_1blx0_530",nR="_depBlocked_1blx0_537",aR="_depDone_1blx0_541",sR="_timeline_1blx0_545",iR="_timelineRow_1blx0_551",lR="_timelineKey_1blx0_558",oR="_timelineValue_1blx0_564",rR="_timelineDelta_1blx0_568",cR="_reviewNotes_1blx0_579",uR="_waitingMessage_1blx0_596",dR="_errorMessage_1blx0_600",fR="_eventOverflowWarning_1blx0_604",hR="_attemptSelector_1blx0_618",mR="_attemptLabel_1blx0_629",pR="_attemptButton_1blx0_633",gR="_attemptActive_1blx0_650",vR="_attemptStatus_1blx0_656",yR="_emptyCta_1blx0_662",bR="_ctaTitle_1blx0_674",SR="_ctaDescription_1blx0_680",xR="_ctaButton_1blx0_687",_R="_projectHeader_1blx0_736",TR="_projectName_1blx0_761",ER="_projectMeta_1blx0_774",AR="_metaRow_1blx0_782",CR="_metaLabel_1blx0_789",jR="_metaValue_1blx0_799",NR="_metaPlaceholder_1blx0_809",wR="_editButton_1blx0_814",DR="_editInput_1blx0_830",kR="_editTextarea_1blx0_862",RR="_editSelect_1blx0_898",MR="_archiveButton_1blx0_931",OR="_repoLink_1blx0_961",BR="_metaValueClickable_1blx0_971",LR="_editHint_1blx0_990",UR="_editError_1blx0_999",zR="_editInputInvalid_1blx0_1006",VR="_unsavedDot_1blx0_1011",IR="_metaToggle_1blx0_1019",HR="_metaToggleArrow_1blx0_1040",GR="_metaToggleArrowOpen_1blx0_1045",PR="_progressBarContainer_1blx0_1049",qR="_progressBar_1blx0_1049",YR="_progressFill_1blx0_1065",FR="_progressLabel_1blx0_1072",KR="_metaTimestamps_1blx0_1079",$R="_metaTimestamp_1blx0_1079",ZR="_editFieldWrapper_1blx0_1095",D={panelContainer:uk,emptyState:dk,projectSummary:fk,projectSummaryTitle:hk,projectSummarySubtitle:mk,header:pk,headerInfo:gk,killButton:vk,headerTitle:yk,headerActions:bk,taskStatusBadge:Sk,taskBranch:xk,taskBlockedBadge:_k,btnPrimary:Tk,btnDanger:Ek,btnGhost:Ak,tabBar:Ck,tab:jk,active:Nk,eventScroll:wk,tabContent:Dk,noContext:kk,overviewContent:Rk,overviewDashboard:Mk,overviewHero:Ok,statusBadge:Bk,statusPending:Lk,statusInProgress:Uk,statusDone:zk,statusFailed:Vk,statusWaitingInput:Ik,overviewBranchPill:Hk,branchLink:Gk,overviewSection:Pk,overviewLabel:qk,overviewValue:Yk,overviewMuted:Fk,overviewMarkdown:Kk,envRow:$k,envDot:Zk,envDotGreen:Xk,envDotYellow:Qk,envDotRed:Jk,envDotGray:Wk,depList:eR,depItem:tR,depBlocked:nR,depDone:aR,timeline:sR,timelineRow:iR,timelineKey:lR,timelineValue:oR,timelineDelta:rR,reviewNotes:cR,waitingMessage:uR,errorMessage:dR,eventOverflowWarning:fR,attemptSelector:hR,attemptLabel:mR,attemptButton:pR,attemptActive:gR,attemptStatus:vR,emptyCta:yR,ctaTitle:bR,ctaDescription:SR,ctaButton:xR,projectHeader:_R,projectName:TR,projectMeta:ER,metaRow:AR,metaLabel:CR,metaValue:jR,metaPlaceholder:NR,editButton:wR,editInput:DR,editTextarea:kR,editSelect:RR,archiveButton:MR,repoLink:OR,metaValueClickable:BR,editHint:LR,editError:UR,editInputInvalid:zR,unsavedDot:VR,metaToggle:IR,metaToggleArrow:HR,metaToggleArrowOpen:GR,progressBarContainer:PR,progressBar:qR,progressFill:YR,progressLabel:FR,metaTimestamps:KR,metaTimestamp:$R,editFieldWrapper:ZR};function XR(){const{projects:n,createProject:a}=sn();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 QR(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 Gs={label:"Home",url:"/"};function JR(n){return n?[Gs,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Gs,{label:"Settings",url:void 0}]}function WR(){return[Gs,{label:"New Environment",url:void 0}]}function eM(){return[Gs,{label:"New Chat",url:void 0}]}function tM(n){return[Gs,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function nM(n,a){const l=a.find(o=>o.id===n);return[Gs,{label:(l==null?void 0:l.name)??"Project",url:void 0}]}function aM(n,a,l){const o=QR(n,l),r=l.get(n),u=r==null?void 0:r.projectId,d=u?a.find(g=>g.id===u):void 0,m=[Gs];d&&m.push({label:d.name,url:ao(d.id)});for(let g=0;g<o.length-1;g++)m.push({label:o[g].title,url:Hs(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 sM(){const n=eM();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx($i,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Enter a prompt below to start a new session"})]})}function R1(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 M1(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 iM({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 lM({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 oM({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(lM,{eventsDropped:l}),n.map((d,m)=>h.jsx(E1,{event:d,toolUseCtx:d.toolUseCtx},`${d.sessionId}-${d.timestamp}-${m}`))]})}function rM(){const{sessionId:n}=cc(),{events:a,eventsDropped:l,sessions:o,kill:r,loadSessionEvents:u}=sn(),d=S.useRef(null),m=S.useRef(void 0),p=tM(n),g=o.find(_=>_.id===n)??void 0,y=S.useMemo(()=>{const _=n?a.filter(T=>T.sessionId===n):[];return M1(R1(_))},[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($i,{segments:p}),h.jsx(iM,{sessionId:n,session:g,isActive:b,onKill:r}),h.jsx(oM,{sessionEvents:y,session:g,eventsDropped:l,scrollRef:d})]})}const iy=220,ly=70,cM=40,uM=60,dM="hierarchy",fM="dependency";function hM(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const a=new r0.graphlib.Graph({multigraph:!0});a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:cM,ranksep:uM});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:iy,height:ly});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:fM},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return r0.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-iy/2,y:m.y-ly/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_3al6d_1",pM="_taskNode_3al6d_26",gM="_taskNodeBorder_3al6d_48",vM="_taskNodeContent_3al6d_54",yM="_taskNodeHeader_3al6d_64",bM="_taskNodeIcon_3al6d_71",SM="_taskNodeTitle_3al6d_76",xM="_taskNodeBadges_3al6d_84",_M="_childBadge_3al6d_89",TM="_depBadge_3al6d_101",EM="_handle_3al6d_113",AM="_emptyCta_3al6d_120",CM="_ctaDescription_3al6d_131",jM="_ctaButton_3al6d_138",cn={dagContainer:mM,taskNode:pM,taskNodeBorder:gM,taskNodeContent:vM,taskNodeHeader:yM,taskNodeIcon:bM,taskNodeTitle:SM,taskNodeBadges:xM,childBadge:_M,depBadge:TM,handle:EM,emptyCta:AM,ctaDescription:CM,ctaButton:jM},oy={not_started:{color:"var(--text-tertiary)",icon:"○"},working:{color:"var(--accent-green)",icon:"●"},paused:{color:"var(--accent-yellow)",icon:"◉"},complete:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"}};function NM({data:n}){const{task:a,childCount:l,doneChildCount:o,hasDependencies:r}=n,u=oy[a.status]||oy.not_started;return h.jsxs("div",{className:cn.taskNode,"data-task-id":a.id,"data-task-title":a.title,children:[h.jsx(c0,{type:"target",position:u0.Top,className:cn.handle}),h.jsx("div",{className:cn.taskNodeBorder,style:{backgroundColor:u.color}}),h.jsxs("div",{className:cn.taskNodeContent,children:[h.jsxs("div",{className:cn.taskNodeHeader,children:[h.jsx("span",{className:cn.taskNodeIcon,style:{color:u.color},children:u.icon}),h.jsx("span",{className:cn.taskNodeTitle,children:a.title})]}),h.jsxs("div",{className:cn.taskNodeBadges,children:[l>0&&h.jsxs("span",{className:cn.childBadge,children:[o,"/",l]}),r&&h.jsx("span",{className:cn.depBadge,children:"dep"})]})]}),h.jsx(c0,{type:"source",position:u0.Bottom,className:cn.handle})]})}const wM={pending:"--text-tertiary",assigned:"--accent-blue",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",failed:"--accent-red",waiting_input:"--accent-yellow"},DM={task:NM};function kM({projectId:n}){const{tasks:a}=sn(),l=ua(),{resolvedThemeId:o}=yy(),r=S.useMemo(()=>a.filter(y=>y.projectId===n),[a,n]),{nodes:u,edges:d}=hM(r),m=S.useMemo(()=>{const y=getComputedStyle(document.documentElement),b={};for(const[_,T]of Object.entries(wM))b[_]=y.getPropertyValue(T).trim()||"#6b7a8d";return b},[o]),p=S.useCallback((y,b)=>{l(Hs(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:cn.emptyCta,children:[h.jsx("button",{className:cn.ctaButton,onClick:()=>l(Vi(n)),children:"Create Task"}),h.jsx("div",{className:cn.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:cn.dagContainer,children:h.jsxs(Xx,{nodes:u,edges:d,nodeTypes:DM,onNodeClick:p,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(Qx,{variant:Jx.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(Wx,{showInteractive:!1}),h.jsx(e_,{nodeColor:g,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function RM(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 ry(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 MM(){const{projectId:n}=cc(),a=ua(),{tasks:l,environments:o,projects:r,archiveProject:u,updateProject:d}=sn(),[m,p]=S.useState("tasks"),[g,y]=S.useState(!1),[b,_]=S.useState(null),[T,j]=S.useState(""),[A,w]=S.useState(""),[C,z]=S.useState(!1),R=S.useRef(void 0),Q=S.useRef(null),I=S.useRef(null),W=S.useRef(null),ee=S.useRef(null),q=S.useRef(null),ae=S.useRef(null),ye=nM(n,r);S.useEffect(()=>{const J=R.current;R.current=n,!(J===void 0||J===n)&&(b!==null||T!=="")&&(_(null),j(""))},[n,b,T]),S.useEffect(()=>{if(b===null)return;const J=b==="name"?I.current:b==="description"?W.current:b==="repoUrl"?ee.current:b==="worktreeBasePath"?ae.current:q.current;if(!J)return;const Y=window.setTimeout(()=>{J.focus()},0);return()=>{window.clearTimeout(Y)}},[b]);const B=r.find(J=>J.id===n),me=l.filter(J=>J.projectId===n),ne=me.filter(J=>J.status==="complete").length,_e=me.length,G=_e>0?Math.round(ne/_e*100):0,U=100,$=(J,Y)=>{Q.current=J,_(J),j(Y),w("")},te=()=>{Q.current=null,_(null),j(""),w("")},De=(J,Y)=>{if(J==="name"){const ve=Y.trim();if(!ve)return"Name is required";if(ve.length>U)return`Max ${U} characters`}if(J==="repoUrl"){const ve=Y.trim();if(ve&&!/^https?:\/\/.+/.test(ve))return"Must be a valid http(s) URL"}return""},Ce=J=>{if(!B)return;const Y=T.trim(),ve=De(J,T);if(ve){w(ve);return}if(J==="name"){if(Y===B.name){te();return}d(B.id,{name:Y})}else if(J==="description"){const H=T;if(H===B.description){te();return}d(B.id,{description:H})}else if(J==="repoUrl"){if(Y===B.repoUrl){te();return}d(B.id,{repoUrl:Y})}else if(J==="defaultEnvironmentId"){if(T===B.defaultEnvironmentId){te();return}d(B.id,{defaultEnvironmentId:T})}else{if(Y===B.worktreeBasePath){te();return}d(B.id,{worktreeBasePath:Y})}te()},Ye=(J,Y)=>{J.key==="Escape"?te():J.key==="Enter"&&Y!=="description"&&Ce(Y)},ke=J=>B?J==="name"?T.trim()!==B.name:J==="description"?T!==B.description:J==="repoUrl"?T.trim()!==B.repoUrl:J==="defaultEnvironmentId"?T!==B.defaultEnvironmentId:T.trim()!==B.worktreeBasePath:!1,Se=o.find(J=>J.id===(B==null?void 0:B.defaultEnvironmentId)),je=b==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return h.jsxs("div",{className:D.panelContainer,children:[h.jsx($i,{segments:ye}),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:I,className:`${D.editInput} ${A?D.editInputInvalid:""}`,value:T,onChange:J=>{j(J.target.value),w("")},onBlur:J=>{if(Q.current==="name"){Q.current=null;return}J.relatedTarget instanceof HTMLElement&&J.relatedTarget.dataset.editAction==="name"||Ce("name")},onKeyDown:J=>Ye(J,"name"),maxLength:U,"aria-label":"Project name","data-testid":"edit-name-input"}),ke("name")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:D.editHint,children:je})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>$("name",(B==null?void 0:B.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(B==null?void 0:B.name)||n}`,"data-testid":"edit-name-button",children:[(B==null?void 0:B.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:()=>z(!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:W,className:D.editTextarea,value:T,onChange:J=>{j(J.target.value),w("")},onBlur:J=>{if(Q.current==="description"){Q.current=null;return}J.relatedTarget instanceof HTMLElement&&J.relatedTarget.dataset.editAction==="description"||Ce("description")},onKeyDown:J=>Ye(J,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),ke("description")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),h.jsx("span",{className:D.editHint,children:je})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>$("description",(B==null?void 0:B.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[B!=null&&B.description?h.jsx("span",{className:D.overviewMarkdown,children:h.jsx(Nf,{remarkPlugins:[wf],children:B.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:ee,className:`${D.editInput} ${A?D.editInputInvalid:""}`,value:T,onChange:J=>{j(J.target.value),w("")},onBlur:J=>{if(Q.current==="repoUrl"){Q.current=null;return}J.relatedTarget instanceof HTMLElement&&J.relatedTarget.dataset.editAction==="repoUrl"||Ce("repoUrl")},onKeyDown:J=>Ye(J,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),ke("repoUrl")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:D.editHint,children:je})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:J=>{J.preventDefault(),$("repoUrl",(B==null?void 0:B.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[B!=null&&B.repoUrl&&/^https?:\/\//i.test(B.repoUrl)?h.jsx("a",{className:D.repoLink,href:B.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:J=>J.stopPropagation(),children:B.repoUrl}):B!=null&&B.repoUrl?h.jsx("span",{children:B.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:q,className:D.editSelect,value:T,onChange:J=>{Q.current=null,j(J.target.value);const Y=J.target.value;B&&Y!==B.defaultEnvironmentId&&d(B.id,{defaultEnvironmentId:Y}),te()},onBlur:J=>{if(Q.current==="defaultEnvironmentId"){Q.current=null;return}J.relatedTarget instanceof HTMLElement&&J.relatedTarget.dataset.editAction==="defaultEnvironmentId"||te()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[h.jsx("option",{value:"",children:"None"}),o.map(J=>h.jsx("option",{value:J.id,children:J.displayName},J.id))]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>$("defaultEnvironmentId",(B==null?void 0:B.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[Se?h.jsxs("span",{className:D.envRow,children:[h.jsx("span",{className:`${D.envDot} ${RM(Se.status)}`}),Se.displayName]}):h.jsx("span",{className:D.metaPlaceholder,children:(B==null?void 0:B.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:"Worktree Base"}),h.jsx("div",{className:D.metaValue,children:b==="worktreeBasePath"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:ae,className:`${D.editInput} ${A?D.editInputInvalid:""}`,value:T,onChange:J=>{j(J.target.value),w("")},onBlur:J=>{if(Q.current==="worktreeBasePath"){Q.current=null;return}J.relatedTarget instanceof HTMLElement&&J.relatedTarget.dataset.editAction==="worktreeBasePath"||Ce("worktreeBasePath")},onKeyDown:J=>Ye(J,"worktreeBasePath"),placeholder:"/workspaces/my-repo","aria-label":"Worktree base path","data-testid":"edit-worktree-base-path-input"}),ke("worktreeBasePath")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:D.editHint,children:je})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>$("worktreeBasePath",(B==null?void 0:B.worktreeBasePath)||""),title:"Click to edit worktree base path","aria-label":"Edit worktree base path","data-testid":"edit-worktree-base-path-button",children:[B!=null&&B.worktreeBasePath?h.jsx("span",{children:B.worktreeBasePath}):h.jsx("span",{className:D.metaPlaceholder,children:"Default (server default)"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),B&&h.jsxs("div",{className:D.metaTimestamps,children:[h.jsxs("span",{className:D.metaTimestamp,children:["Created ",ry(B.createdAt)]}),B.updatedAt&&B.updatedAt!==B.createdAt&&h.jsxs("span",{className:D.metaTimestamp,children:["· Updated ",ry(B.updatedAt)]})]})]}),_e>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:[ne,"/",_e]})]}),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==="tasks",className:`${D.tab} ${m==="tasks"?D.active:""}`,onClick:()=>p("tasks"),children:"Tasks"})]}),m==="tasks"&&_e>0&&h.jsxs("div",{className:D.projectSummary,children:[h.jsx("span",{className:D.projectSummaryTitle,children:`${ne}/${_e} tasks complete`}),h.jsx("span",{className:D.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&_e===0&&h.jsxs("div",{className:D.emptyCta,children:[h.jsx("button",{className:D.ctaButton,onClick:()=>a(Vi(n)),children:"Create Task"}),h.jsx("div",{className:D.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),m==="graph"&&h.jsx(kM,{projectId:n}),h.jsx(vc,{isOpen:g,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{B&&(u(B.id),a("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const OM="_container_yc33j_1",BM="_header_yc33j_8",LM="_headerTitle_yc33j_35",UM="_badge_yc33j_44",zM="_headerActions_yc33j_54",VM="_body_yc33j_61",IM="_formContent_yc33j_68",HM="_section_yc33j_75",GM="_label_yc33j_81",PM="_titleInput_yc33j_88",qM="_descriptionTextarea_yc33j_121",YM="_parentContext_yc33j_157",FM="_parentLabel_yc33j_165",KM="_parentName_yc33j_172",$M="_depList_yc33j_210",ZM="_depItem_yc33j_216",XM="_depItemSelected_yc33j_238",QM="_noDeps_yc33j_242",JM="_btnPrimary_yc33j_248",WM="_btnGhost_yc33j_279",pt={container:OM,header:BM,headerTitle:LM,badge:UM,headerActions:zM,body:VM,formContent:IM,section:HM,label:GM,titleInput:PM,descriptionTextarea:qM,parentContext:YM,parentLabel:FM,parentName:KM,depList:$M,depItem:ZM,depItemSelected:XM,noDeps:QM,btnPrimary:JM,btnGhost:WM};function O1({mode:n,taskId:a,projectId:l,parentTaskId:o}){const{tasks:r,createTask:u,updateTask:d}=sn(),{showToast:m}=co(),p=ua(),g=n==="edit",y=g&&a?r.find(B=>B.id===a):void 0,b=g?(y==null?void 0:y.projectId)??"":l??"",_=g?(y==null?void 0:y.parentTaskId)??"":o??"",T=_?r.find(B=>B.id===_):void 0,[j,A]=S.useState((y==null?void 0:y.title)??""),[w,C]=S.useState((y==null?void 0:y.description)??""),[z,R]=S.useState((y==null?void 0:y.dependsOn)??[]),Q=S.useRef(!1);S.useEffect(()=>{g&&y&&!Q.current&&(Q.current=!0,A(y.title),C(y.description),R(y.dependsOn))},[g,y]);const I=r.filter(B=>B.projectId===b&&(!g||B.id!==a)&&B.id!==_),W=j.trim().length>0&&(!g||y!==void 0)&&(g||b.length>0),ee=B=>{R(me=>me.includes(B)?me.filter(ne=>ne!==B):[...me,B])},q=()=>{W&&(g&&y===void 0||(g&&a?(d(a,j.trim(),w,z),m("Task updated","success"),p(Hs(a),{replace:!0})):(u(b,j.trim(),w,z.length>0?z:void 0,_||void 0),m("Task created","success"),p(ao(b),{replace:!0}))))},ae=()=>{p(g&&a?Hs(a):ao(b))},ye=g?"edit task":_?"child task":"new task";return h.jsxs("div",{className:pt.container,children:[h.jsxs("div",{className:pt.header,children:[h.jsxs("div",{className:pt.headerTitle,children:[h.jsx("span",{className:pt.badge,children:ye}),T&&h.jsxs("span",{className:pt.parentContext,children:[h.jsx("span",{className:pt.parentLabel,children:"Child of"}),h.jsx("span",{className:pt.parentName,children:T.title})]})]}),h.jsxs("div",{className:pt.headerActions,children:[h.jsx("button",{onClick:q,disabled:!W,className:pt.btnPrimary,"data-testid":"task-edit-save",children:g?"Save Changes":"Create"}),h.jsx("button",{onClick:ae,className:pt.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:pt.body,children:h.jsxs("div",{className:pt.formContent,children:[h.jsxs("div",{className:pt.section,children:[h.jsx("label",{className:pt.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:j,onChange:B=>A(B.target.value),placeholder:"Task title...",autoFocus:!0,className:pt.titleInput,"data-testid":"task-edit-title",onKeyDown:B=>{B.key==="Enter"&&W&&q()}})]}),h.jsxs("div",{className:pt.section,children:[h.jsx("label",{className:pt.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:w,onChange:B=>C(B.target.value),placeholder:"Describe the task... (markdown supported)",className:pt.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:pt.section,children:[h.jsx("div",{className:pt.label,children:"Dependencies"}),I.length===0?h.jsx("div",{className:pt.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:pt.depList,children:I.map(B=>{const me=z.includes(B.id);return h.jsxs("label",{className:`${pt.depItem} ${me?pt.depItemSelected:""}`,"data-testid":`dep-option-${B.id}`,children:[h.jsx("input",{type:"checkbox",checked:me,onChange:()=>ee(B.id)}),B.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",B.status,")"]})]},B.id)})})]})]})})]})}function e3(){const[n]=zf(),a=n.get("project")??"",l=n.get("parent")??void 0;return a?h.jsx(O1,{mode:"new",projectId:a,parentTaskId:l}):h.jsx(Gr,{to:"/",replace:!0})}function t3(){const{taskId:n}=cc();return h.jsx(O1,{mode:"edit",taskId:n})}const n3="_container_u6n1v_1",a3="_emptyState_u6n1v_8",s3="_card_u6n1v_14",i3="_cardHeader_u6n1v_34",l3="_categoryBadge_u6n1v_41",o3="_findingTitle_u6n1v_49",r3="_findingDate_u6n1v_55",c3="_findingContent_u6n1v_61",u3="_tags_u6n1v_67",d3="_tag_u6n1v_67",ia={container:n3,emptyState:a3,card:s3,cardHeader:i3,categoryBadge:l3,findingTitle:o3,findingDate:r3,findingContent:c3,tags:u3,tag:d3};function f3(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 cy={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 h3({projectId:n}){const{findings:a}=sn(),l=a.filter(o=>o.projectId===n);return l.length===0?h.jsx("div",{className:ia.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:ia.container,children:l.map((o,r)=>{const u=cy[o.category]||cy.general;return h.jsxs(Wn.div,{className:ia.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:r*.05,duration:.2},children:[h.jsxs("div",{className:ia.cardHeader,children:[h.jsx("span",{className:ia.categoryBadge,style:{background:u.bg,color:u.text},children:o.category}),h.jsx("span",{className:ia.findingTitle,children:o.title}),h.jsx("span",{className:ia.findingDate,title:o.createdAt,children:f3(o.createdAt)})]}),h.jsx("div",{className:ia.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:ia.tags,children:o.tags.map(d=>h.jsx("span",{className:ia.tag,style:{color:u.text,textShadow:`0 0 8px ${u.text}`},children:d},d))})]},o.id)})})}function Vr(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 $d(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 m3(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 p3({status:n}){const a={not_started:"Not Started",working:"Working",paused:"Paused",complete:"Complete",failed:"Failed"},l={not_started:D.statusPending,working:D.statusInProgress,paused:D.statusWaitingInput,complete:D.statusDone,failed:D.statusFailed};return h.jsx("span",{className:`${D.statusBadge} ${l[n]??D.statusPending}`,children:a[n]??n})}function g3({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(p3,{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(Nf,{remarkPlugins:[wf],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} ${m3(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),_=(b==null?void 0:b.status)==="complete";return h.jsxs("div",{className:`${D.depItem} ${_?D.depDone:D.depBlocked}`,children:[h.jsx("span",{children:_?"✓":"○"}),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:Vr(n.createdAt)})]}),n.assignedAt&&(()=>{const y=$d(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:Vr(n.assignedAt)}),y!==void 0&&h.jsx("span",{className:D.timelineDelta,children:y})]})})(),n.startedAt&&(()=>{const y=$d(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:Vr(n.startedAt)}),y!==void 0&&h.jsx("span",{className:D.timelineDelta,children:y})]})})(),n.completedAt&&(()=>{const y=$d(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:Vr(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 v3({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 y3({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 b3({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 Zd(){const{taskId:n}=cc(),a=un(),l=ua(),{events:o,eventsDropped:r,tasks:u,environments:d,loadSessionEvents:m,loadFindings:p,kill:g,startTask:y,resumeTask:b,completeTask:_,deleteTask:T,projects:j,taskSessions:A,loadTaskSessions:w}=sn(),C=S.useRef(null),z=S.useRef(void 0),R=S.useRef(void 0),Q=S.useRef(void 0),I=S.useRef(void 0),W=S.useRef(void 0),ee=a.pathname.endsWith("/stream")?"stream":a.pathname.endsWith("/findings")?"findings":"overview",[q,ae]=S.useState(ee),[ye,B]=S.useState(!1),[me,ne]=S.useState(void 0),_e=S.useRef(ee);ee!==_e.current&&(_e.current=ee,ee!==q&&ae(ee));const G=u.find(Y=>Y.id===n),U=(G==null?void 0:G.projectId)||void 0,$=G?A[G.id]??[]:[];let te;me&&$.some(Y=>Y.id===me)?te=me:te=(G==null?void 0:G.latestSessionId)||void 0;const De=()=>{B(!0)},Ce=()=>{G&&(T(G.id),B(!1),l(ao(G.projectId),{replace:!0}))};if((G==null?void 0:G.id)!==R.current&&(R.current=G==null?void 0:G.id,me!==void 0&&ne(void 0)),S.useEffect(()=>{if(!(G!=null&&G.id))return;const Y=G.id!==I.current,ve=G.latestSessionId!==W.current;(Y||ve)&&(I.current=G.id,W.current=G.latestSessionId,w(G.id))},[G==null?void 0:G.id,G==null?void 0:G.latestSessionId,w]),(G==null?void 0:G.status)!==Q.current){Q.current=G==null?void 0:G.status;const Y=(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;Y&&Y!==q&&ae(Y)}const Ye=S.useMemo(()=>new Map(u.map(Y=>[Y.id,Y])),[u]),ke=S.useMemo(()=>{const Y=te?o.filter(ve=>ve.sessionId===te):[];return M1(R1(Y))},[o,te]),Se=G?G.dependsOn.some(Y=>{const ve=Ye.get(Y);return ve!==void 0&&ve.status!=="complete"}):!1,je=S.useMemo(()=>aM(n,j,Ye),[n,j,Ye]);S.useEffect(()=>{te&&te!==z.current&&(z.current=te,m(te))},[te,m]),S.useEffect(()=>{q==="findings"&&U&&p(U)},[q,U,p]),S.useEffect(()=>{C.current&&q==="stream"&&(C.current.scrollTop=C.current.scrollHeight)},[ke.length,q]);const J=Y=>{ae(Y),l(Hs(n,Y==="overview"?void 0:Y))};return h.jsxs("div",{className:D.panelContainer,children:[h.jsx($i,{segments:je}),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}),Se&&h.jsx("span",{className:D.taskBlockedBadge,children:"blocked"})]}),G&&h.jsx(y3,{task:G,sessionId:te,isBlocked:Se,onStart:()=>y(G.id),onResume:()=>b(G.id),onStop:()=>te&&g(te),onComplete:()=>_(G.id),onDelete:De,onEdit:()=>l(mE(G.id))})]}),h.jsxs("div",{className:D.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":q==="overview",className:`${D.tab} ${q==="overview"?D.active:""}`,onClick:()=>J("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":q==="stream",className:`${D.tab} ${q==="stream"?D.active:""}`,onClick:()=>J("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":q==="findings",className:`${D.tab} ${q==="findings"?D.active:""}`,onClick:()=>J("findings"),children:"Findings"})]}),h.jsxs(qs,{mode:"wait",children:[q==="overview"&&h.jsx(Wn.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(g3,{task:G,tasksById:Ye,environments:d,projects:j,taskSessions:$}):h.jsx("div",{className:D.waitingMessage,children:"No additional details"})},"overview"),q==="stream"&&h.jsxs(Wn.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(b3,{taskSessions:$,selectedSessionId:te,onSelect:Y=>ne(Y)}),h.jsxs("div",{ref:C,className:D.eventScroll,children:[!te&&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"})]}),te&&ke.length===0&&h.jsx("div",{className:D.waitingMessage,children:"Waiting for events..."}),h.jsx(v3,{eventsDropped:r}),ke.map((Y,ve)=>h.jsx(E1,{event:Y,toolUseCtx:Y.toolUseCtx},`${Y.sessionId}-${Y.timestamp}-${ve}`))]})]},"stream"),q==="findings"&&h.jsx(Wn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:D.tabContent,children:U?h.jsx(h3,{projectId:U}):h.jsx("div",{className:D.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),G&&h.jsx(vc,{isOpen:ye,title:"Delete Task?",description:`"${G.title}" will be permanently removed.`,onConfirm:Ce,onCancel:()=>B(!1)})]})}function S3(){const n=WR();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx($i,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Configure the new environment below"})]})}const x3="_layout_1sbe4_1",_3="_content_1sbe4_8",uy={layout:x3,content:_3},T3={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function E3(){const a=un().pathname.replace(/^\/settings\/?/,"").split("/")[0],l=T3[a],o=JR(l);return h.jsxs("div",{className:uy.layout,children:[h.jsx($i,{segments:o}),h.jsx("div",{className:uy.content,children:h.jsx(My,{})})]})}const A3="_nav_29xjr_1",C3="_tab_29xjr_30",j3="_tabIcon_29xjr_56",N3="_tabActive_29xjr_62",Ir={nav:A3,tab:C3,tabIcon:j3,tabActive:N3},Da=[{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 w3(){var d;const n=un(),a=ua(),l=S.useRef(null),o=((d=Da.find(m=>n.pathname===`${zi}/${m.path}`))==null?void 0:d.path)??Da[0].path,r=S.useCallback(m=>{a(`${zi}/${m}`)},[a]),u=S.useCallback(m=>{var T,j;const p=(T=l.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!p)return;const g=Array.from(p).findIndex(A=>A===document.activeElement),y=g>=0?g:Da.findIndex(A=>A.path===o);let b=y;if(m.key==="ArrowDown")m.preventDefault(),b=(y+1)%Da.length;else if(m.key==="ArrowUp")m.preventDefault(),b=(y-1+Da.length)%Da.length;else if(m.key==="Home")m.preventDefault(),b=0;else if(m.key==="End")m.preventDefault(),b=Da.length-1;else return;const _=Da[b].path;a(`${zi}/${_}`),(j=p[b])==null||j.focus()},[o,a]);return h.jsx("nav",{className:Ir.nav,ref:l,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:u,children:Da.map(m=>{const p=m.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":p,tabIndex:p?0:-1,className:`${Ir.tab} ${p?Ir.tabActive:""}`,onClick:()=>r(m.path),children:[h.jsx("span",{className:Ir.tabIcon,"aria-hidden":"true",children:m.icon}),m.label]},m.path)})})}const D3="_container_1nk8c_1",k3="_header_1nk8c_5",R3="_headerLabel_1nk8c_12",M3="_addButton_1nk8c_20",O3="_envRow_1nk8c_55",B3="_targeted_1nk8c_69",L3="_expanded_1nk8c_72",U3="_statusDot_1nk8c_76",z3="_pulse_1nk8c_79",V3="_envName_1nk8c_83",I3="_envActions_1nk8c_87",H3="_idleLabel_1nk8c_94",G3="_newChatButton_1nk8c_99",P3="_envActionsRow_1nk8c_126",q3="_connectButton_1nk8c_134",Y3="_stopButton_1nk8c_160",F3="_deleteButton_1nk8c_186",K3="_provisionMessage_1nk8c_213",$3="_errorMessage_1nk8c_220",Z3="_sessionRow_1nk8c_227",X3="_selected_1nk8c_243",Q3="_sessionDot_1nk8c_248",J3="_sessionSummaryRow_1nk8c_252",W3="_sessionExpandArrow_1nk8c_272",eO="_sessionSummaryText_1nk8c_283",tO="_sessionCountBadge_1nk8c_290",nO="_emptyCta_1nk8c_313",aO="_ctaDescription_1nk8c_326",sO="_ctaButton_1nk8c_332",Qe={container:D3,header:k3,headerLabel:R3,addButton:M3,envRow:O3,targeted:B3,expanded:L3,statusDot:U3,pulse:z3,envName:V3,envActions:I3,idleLabel:H3,newChatButton:G3,envActionsRow:P3,connectButton:q3,stopButton:Y3,deleteButton:F3,provisionMessage:K3,errorMessage:$3,sessionRow:Z3,selected:X3,sessionDot:Q3,sessionSummaryRow:J3,sessionExpandArrow:W3,sessionSummaryText:eO,sessionCountBadge:tO,emptyCta:nO,ctaDescription:aO,ctaButton:sO},iO={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},lO={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},dy=["running","idle","failed","interrupted","completed"],oO=.2;function rO(n){const a={};for(const u of n)a[u.status]=(a[u.status]||0)+1;const l=dy.filter(u=>a[u]>0).map(u=>`${a[u]} ${lO[u]||u}`),o=new Set(dy),r=Object.keys(a).filter(u=>!o.has(u)).sort().map(u=>`${a[u]} ${u}`);return[...l,...r].join(", ")}function cO({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 uO({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:_}){const[T,j]=S.useState(!1),A=iO[n.status]||"var(--text-tertiary)",w=n.status==="connected",C=n.status==="connecting",z=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(vc,{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),j(!1)},onCancel:()=>j(!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} ${w?Qe.pulse:""}`,style:{color:A},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)"}),w&&h.jsx("button",{onClick:R=>{R.stopPropagation(),_(Vy(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}),z&&h.jsx("button",{onClick:R=>{R.stopPropagation(),g(n.id)},className:Qe.connectButton,children:n.status==="error"?"Retry":"Connect"}),w&&h.jsx("button",{onClick:R=>{R.stopPropagation(),y(n.id)},className:Qe.stopButton,children:"Stop"}),!C&&h.jsx("button",{onClick:R=>{R.stopPropagation(),j(!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:rO(a)}),h.jsx("span",{className:Qe.sessionCountBadge,children:a.length})]}),h.jsx(qs,{children:d&&h.jsx(Wn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:oO,ease:"easeInOut"},style:{overflow:"hidden"},children:a.map(R=>h.jsxs("div",{onClick:Q=>{Q.stopPropagation(),_(zy(R.id))},className:`${Qe.sessionRow} ${l===R.id?Qe.selected:""}`,title:R.prompt,"data-testid":"session-row",children:[h.jsx(cO,{status:R.status})," ",R.prompt.length>24?R.prompt.slice(0,24)+"...":R.prompt]},R.id))})})]})]})}function dO(){const{environments:n,sessions:a,provisionStatus:l,provisionEnvironment:o,stopEnvironment:r,removeEnvironment:u}=sn(),d=ua(),[m,p]=S.useState(null),[g,y]=S.useState(new Set),b=rn("/sessions/:sessionId"),_=rn("/sessions/new"),T=(b==null?void 0:b.params.sessionId)!=="new"?b==null?void 0:b.params.sessionId:void 0,[j]=zf(),A=_?j.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(N0),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:Qe.emptyCta,children:[h.jsx("button",{className:Qe.ctaButton,onClick:()=>d(N0),children:"Add Environment"}),h.jsx("div",{className:Qe.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(w=>{const C=a.filter(z=>z.environmentId===w.id);return h.jsx(uO,{env:w,envSessions:C,selectedSessionId:T,isNewChatTarget:A===w.id,expanded:m===w.id,onToggleExpand:()=>p(m===w.id?null:w.id),sessionsExpanded:g.has(w.id),onToggleSessionsExpand:()=>{y(z=>{const R=new Set(z);return R.has(w.id)?R.delete(w.id):R.add(w.id),R})},provisionProgress:l[w.id],onProvision:o,onStop:r,onRemove:u,navigate:d},w.id)})]})}function fO(){return h.jsx(dO,{})}const hO="_section_1ingb_14",mO="_sectionTitle_1ingb_26",pO="_sectionDescription_1ingb_35",gO="_tokenList_1ingb_48",vO="_tokenRow_1ingb_55",yO="_tokenBadge_1ingb_68",bO="_tokenName_1ingb_83",SO="_tokenTarget_1ingb_90",xO="_deleteButton_1ingb_99",_O="_addForm_1ingb_113",TO="_formRow_1ingb_119",EO="_input_1ingb_125",AO="_select_1ingb_155",CO="_addButton_1ingb_187",jO="_emptyStateInfo_1ingb_221",NO="_themeOptions_1ingb_229",wO="_themeOption_1ingb_229",DO="_themeOptionSelected_1ingb_254",kO="_themeOptionHeader_1ingb_259",RO="_themeOptionLabel_1ingb_266",MO="_themeOptionDesc_1ingb_273",OO="_variantToggle_1ingb_279",BO="_variantButton_1ingb_286",LO="_variantActive_1ingb_305",UO="_themeSwatches_1ingb_311",zO="_themeSwatch_1ingb_311",VO="_systemToggle_1ingb_325",IO="_systemToggleHint_1ingb_341",HO="_themeActive_1ingb_348",GO="_aboutGrid_1ingb_354",PO="_aboutItem_1ingb_360",qO="_aboutLabel_1ingb_373",YO="_aboutValue_1ingb_379",FO="_aboutDot_1ingb_387",KO="_aboutDotConnected_1ingb_394",$O="_aboutDotDisconnected_1ingb_398",fe={section:hO,sectionTitle:mO,sectionDescription:pO,tokenList:gO,tokenRow:vO,tokenBadge:yO,tokenName:bO,tokenTarget:SO,deleteButton:xO,addForm:_O,formRow:TO,input:EO,select:AO,addButton:CO,emptyStateInfo:jO,themeOptions:NO,themeOption:wO,themeOptionSelected:DO,themeOptionHeader:kO,themeOptionLabel:RO,themeOptionDesc:MO,variantToggle:OO,variantButton:BO,variantActive:LO,themeSwatches:UO,themeSwatch:zO,systemToggle:VO,systemToggleHint:IO,themeActive:HO,aboutGrid:GO,aboutItem:PO,aboutLabel:qO,aboutValue:YO,aboutDot:FO,aboutDotConnected:KO,aboutDotDisconnected:$O},ZO=[{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 XO(){const{credentialProviders:n,updateCredentialProviders:a}=sn(),l=(o,r)=>{const u={...n};o==="claude"?u.claude=r:u[o]=r,a(u)};return h.jsxs("section",{className:fe.section,children:[h.jsx("h3",{className:fe.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:fe.sectionDescription,children:"Enable providers to automatically forward credentials to environments at task start. Credentials are read fresh from the host each time."}),h.jsx("div",{className:fe.tokenList,children:ZO.map(o=>h.jsxs("div",{className:fe.tokenRow,children:[h.jsx("span",{className:fe.tokenName,children:o.label}),h.jsx("span",{className:fe.tokenTarget,children:o.description}),h.jsx("select",{className:fe.select,value:n[o.key],onChange: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 QO=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function JO(){const{tokens:n,setToken:a,deleteToken:l}=sn(),{showToast:o}=co(),[r,u]=S.useState(""),[d,m]=S.useState(""),[p,g]=S.useState("env_var"),[y,b]=S.useState(""),[_,T]=S.useState(null),j=C=>{if(C.preventDefault(),!r||!d)return;const z=p==="env_var"?y||r.toUpperCase()+"_TOKEN":"";a(r,d,p,z,p==="file"?y:""),o("Token saved successfully","success"),u(""),m(""),b("")},A=C=>{T(C)},w=()=>{_&&(l(_),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(vc,{isOpen:_!==null,title:"Delete Token?",description:_?`"${_}" will be permanently removed.`:void 0,onConfirm:w,onCancel:()=>T(null)}),h.jsxs("section",{className:fe.section,children:[h.jsx("h3",{className:fe.sectionTitle,children:"Tokens"}),h.jsx("p",{className:fe.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:fe.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:fe.tokenList,children:n.map(C=>h.jsxs("div",{className:fe.tokenRow,children:[h.jsx("span",{className:fe.tokenBadge,children:C.tokenType}),h.jsx("span",{className:fe.tokenName,children:C.name}),h.jsx("span",{className:fe.tokenTarget,children:C.tokenType==="env_var"?C.envVar:C.filePath}),h.jsx("button",{className:fe.deleteButton,onClick:()=>A(C.name),title:`Delete ${C.name}`,children:"×"})]},C.name))}),h.jsxs("form",{className:fe.addForm,onSubmit:j,children:[h.jsxs("div",{className:fe.formRow,children:[h.jsx("input",{className:fe.input,type:"text",placeholder:"Token name",value:r,onChange:C=>u(C.target.value)}),h.jsx("input",{className:fe.input,type:"password",placeholder:"Value",value:d,onChange:C=>m(C.target.value)})]}),h.jsxs("div",{className:fe.formRow,children:[h.jsx("select",{className:fe.select,value:p,onChange:C=>g(C.target.value),children:QO.map(C=>h.jsx("option",{value:C.value,children:C.label},C.value))}),h.jsx("input",{className:fe.input,type:"text",placeholder:p==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:y,onChange:C=>b(C.target.value)}),h.jsx("button",{className:fe.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function WO(){return h.jsxs(h.Fragment,{children:[h.jsx(XO,{}),h.jsx(JO,{})]})}const e6="_container_1xcp7_1",t6="_header_1xcp7_7",n6="_form_1xcp7_19",a6="_formActions_1xcp7_87",s6="_list_1xcp7_93",i6="_card_1xcp7_99",l6="_active_1xcp7_109",o6="_cardHeader_1xcp7_113",r6="_cardActions_1xcp7_123",c6="_description_1xcp7_128",u6="_meta_1xcp7_134",d6="_promptDetails_1xcp7_151",f6="_promptText_1xcp7_163",h6="_empty_1xcp7_180",m6="_btnPrimary_1xcp7_186",p6="_btnSecondary_1xcp7_220",g6="_btnSmall_1xcp7_247",v6="_btnDanger_1xcp7_273",Dt={container:e6,header:t6,form:n6,formActions:a6,list:s6,card:i6,active:l6,cardHeader:o6,cardActions:r6,description:c6,meta:u6,promptDetails:d6,promptText:f6,empty:h6,btnPrimary:m6,btnSecondary:p6,btnSmall:g6,btnDanger:v6};function y6(){const{personas:n,createPersona:a,updatePersona:l,deletePersona:o}=sn(),[r,u]=S.useState(null),[d,m]=S.useState(!1),[p,g]=S.useState(null),[y,b]=S.useState(""),[_,T]=S.useState(""),[j,A]=S.useState(""),[w,C]=S.useState(""),[z,R]=S.useState(""),[Q,I]=S.useState(0),W=()=>{b(""),T(""),A(""),C(""),R(""),I(0)},ee=()=>{W(),u(null),m(!0)},q=ne=>{b(ne.name),T(ne.description),A(ne.systemPrompt),C(ne.runtime),R(ne.model),I(ne.maxTurns),u(ne),m(!1)},ae=ne=>{ne.preventDefault(),!(!y.trim()||!j.trim())&&(r?(l(r.id,y,_,j,w,z,Q),u(null)):(a(y,_,j,w,z,Q),m(!1)),W())},ye=ne=>{o(ne),g(null),(r==null?void 0:r.id)===ne&&(u(null),W())},B=()=>{u(null),m(!1),W()},me=()=>h.jsxs("form",{onSubmit:ae,className:Dt.form,children:[h.jsx("h3",{children:r?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:y,onChange:ne=>b(ne.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:_,onChange:ne=>T(ne.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:w,onChange:ne=>C(ne.target.value),children:[h.jsx("option",{value:"",children:"Default"}),h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"})]})]}),h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:z,onChange:ne=>R(ne.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:Q,onChange:ne=>I(parseInt(ne.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:j,onChange:ne=>A(ne.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:Dt.formActions,children:[h.jsx("button",{type:"submit",className:Dt.btnPrimary,children:r?"Save":"Create"}),h.jsx("button",{type:"button",onClick:B,className:Dt.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:Dt.container,children:[h.jsxs("div",{className:Dt.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:ee,className:Dt.btnPrimary,children:"+ New Persona"})]}),(d||r)&&me(),n.length===0&&!d?h.jsx("p",{className:Dt.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:Dt.list,children:n.map(ne=>h.jsxs("div",{className:`${Dt.card} ${(r==null?void 0:r.id)===ne.id?Dt.active:""}`,children:[h.jsxs("div",{className:Dt.cardHeader,children:[h.jsx("strong",{children:ne.name}),h.jsxs("div",{className:Dt.cardActions,children:[h.jsx("button",{onClick:()=>q(ne),className:Dt.btnSmall,children:"Edit"}),p===ne.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>ye(ne.id),className:Dt.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>g(null),className:Dt.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>g(ne.id),className:Dt.btnSmall,children:"Delete"})]})]}),ne.description&&h.jsx("p",{className:Dt.description,children:ne.description}),h.jsxs("div",{className:Dt.meta,children:[ne.runtime&&h.jsxs("span",{children:["Runtime: ",ne.runtime]}),ne.model&&h.jsxs("span",{children:["Model: ",ne.model]}),ne.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",ne.maxTurns]})]}),h.jsxs("details",{className:Dt.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:Dt.promptText,children:ne.systemPrompt})]})]},ne.id))})]})}function b6(){return h.jsx(y6,{})}function S6(){const{themeId:n,resolvedThemeId:a,setTheme:l,preferSystem:o,setPreferSystem:r}=yy();return h.jsxs("section",{className:fe.section,children:[h.jsx("h3",{className:fe.sectionTitle,children:"Appearance"}),h.jsx("p",{className:fe.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:fe.themeOptions,children:ic.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:`${fe.themeOption} ${m?fe.themeOptionSelected:""}`,"aria-pressed":m,onClick:()=>l(u.id),children:[h.jsxs("span",{className:fe.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:fe.themeOptionLabel,children:u.label}),h.jsx("span",{className:fe.themeOptionDesc,children:u.description})]}),d&&h.jsxs("span",{className:fe.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${fe.variantButton} ${m&&p?fe.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:`${fe.variantButton} ${m&&!p?fe.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:fe.themeSwatches,children:u.swatches.map((g,y)=>h.jsx("span",{className:fe.themeSwatch,style:{background:g}},y))})]},u.id)})}),h.jsxs("label",{className:fe.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:fe.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:fe.themeActive,children:["Active theme: ",h.jsx("strong",{children:a})]})]})}function x6(){return h.jsx(S6,{})}function _6(){const{connected:n,environments:a,sessions:l}=sn(),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:fe.section,children:[h.jsx("h3",{className:fe.sectionTitle,children:"About"}),h.jsx("p",{className:fe.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:fe.aboutGrid,children:[h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Connection"}),h.jsxs("span",{className:fe.aboutValue,children:[h.jsx("span",{className:`${fe.aboutDot} ${n?fe.aboutDotConnected:fe.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Environments"}),h.jsxs("span",{className:fe.aboutValue,children:[o,"/",r," connected"]})]}),h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:fe.aboutValue,children:u})]}),h.jsxs("div",{className:fe.aboutItem,children:[h.jsx("span",{className:fe.aboutLabel,children:"Version"}),h.jsx("span",{className:fe.aboutValue,children:"0.29.1"})]})]})]})}function T6(){return h.jsx(_6,{})}const E6="_root_cdda9_1",A6="_body_cdda9_7",C6="_main_cdda9_13",Xd={root:E6,body:A6,main:C6},j6=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function N6(){const{lastSpawnedId:n,environments:a}=sn(),{showToast:l}=co();ck(a,l);const o=ua(),r=un(),u=r.pathname.startsWith(zi);return S.useEffect(()=>{n&&!r.pathname.startsWith("/tasks/")&&o(zy(n),{replace:!0})},[n,o,r.pathname]),h.jsxs("div",{className:Xd.root,children:[h.jsx(_E,{}),h.jsxs("div",{className:Xd.body,children:[u?h.jsx(w3,{}):h.jsx(DD,{}),h.jsxs("div",{className:Xd.main,children:[h.jsx(My,{}),h.jsx(ZD,{})]})]}),h.jsx(rk,{})]})}function w6(){return h.jsx(MT,{children:h.jsxs(kt,{element:h.jsx(N6,{}),children:[h.jsx(kt,{index:!0,element:h.jsx(XR,{})}),h.jsx(kt,{path:"sessions/new",element:h.jsx(sM,{})}),h.jsx(kt,{path:"sessions/:sessionId",element:h.jsx(rM,{})}),h.jsx(kt,{path:"projects/:projectId",element:h.jsx(MM,{})}),h.jsx(kt,{path:"tasks/new",element:h.jsx(e3,{})}),h.jsx(kt,{path:"tasks/:taskId",element:h.jsx(Zd,{})}),h.jsx(kt,{path:"tasks/:taskId/stream",element:h.jsx(Zd,{})}),h.jsx(kt,{path:"tasks/:taskId/findings",element:h.jsx(Zd,{})}),h.jsx(kt,{path:"tasks/:taskId/edit",element:h.jsx(t3,{})}),h.jsx(kt,{path:"environments/new",element:h.jsx(S3,{})}),h.jsxs(kt,{path:"settings",element:h.jsx(E3,{}),children:[h.jsx(kt,{index:!0,element:h.jsx(Gr,{to:"environments",replace:!0})}),h.jsx(kt,{path:"environments",element:h.jsx(fO,{})}),h.jsx(kt,{path:"credentials",element:h.jsx(WO,{})}),h.jsx(kt,{path:"tokens",element:h.jsx(Gr,{to:"../credentials",replace:!0})}),h.jsx(kt,{path:"personas",element:h.jsx(b6,{})}),h.jsx(kt,{path:"appearance",element:h.jsx(x6,{})}),h.jsx(kt,{path:"about",element:h.jsx(T6,{})})]}),h.jsx(kt,{path:"*",element:h.jsx(Gr,{to:"/",replace:!0})})]})})}function D6(){const n=j6?w_:S_;return h.jsx(B_,{children:h.jsx(k_,{children:h.jsx(n,{children:h.jsx(sE,{children:h.jsx(w6,{})})})})})}i_.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(D6,{})}));
|