@grackle-ai/web 0.17.1 → 0.18.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,78 @@
1
+ import{r as dS,a as _,j as m,v as fS,b as hS,t as Ko,i as mS,f as pS,M as y0,c as b0}from"./markdown-gcy1Jmzi.js";import{r as gS,d as Op,H as Rp,P as Bp,i as vS,B as yS,a as bS,C as SS,M as _S}from"./dagview-EHk2VaeR.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function l(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(u){if(u.ep)return;u.ep=!0;const f=l(u);fetch(u.href,f)}})();var Au={exports:{}},dl={},ju={exports:{}},Eu={};/**
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 zp;function TS(){return zp||(zp=1,(function(a){function i(A,Z){var at=A.length;A.push(Z);t:for(;0<at;){var tt=at-1>>>1,jt=A[tt];if(0<u(jt,Z))A[tt]=Z,A[at]=jt,at=tt;else break t}}function l(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var Z=A[0],at=A.pop();if(at!==Z){A[0]=at;t:for(var tt=0,jt=A.length,$t=jt>>>1;tt<$t;){var Rt=2*(tt+1)-1,St=A[Rt],I=Rt+1,Qt=A[I];if(0>u(St,at))I<jt&&0>u(Qt,St)?(A[tt]=Qt,A[I]=at,tt=I):(A[tt]=St,A[Rt]=at,tt=Rt);else if(I<jt&&0>u(Qt,at))A[tt]=Qt,A[I]=at,tt=I;else break t}}return Z}function u(A,Z){var at=A.sortIndex-Z.sortIndex;return at!==0?at:A.id-Z.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;a.unstable_now=function(){return f.now()}}else{var d=Date,p=d.now();a.unstable_now=function(){return d.now()-p}}var g=[],v=[],b=1,S=null,x=3,D=!1,w=!1,O=!1,q=!1,z=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function K(A){for(var Z=l(v);Z!==null;){if(Z.callback===null)r(v);else if(Z.startTime<=A)r(v),Z.sortIndex=Z.expirationTime,i(g,Z);else break;Z=l(v)}}function G(A){if(O=!1,K(A),!w)if(l(g)!==null)w=!0,Q||(Q=!0,Et());else{var Z=l(v);Z!==null&&zt(G,Z.startTime-A)}}var Q=!1,W=-1,V=5,F=-1;function rt(){return q?!0:!(a.unstable_now()-F<V)}function mt(){if(q=!1,Q){var A=a.unstable_now();F=A;var Z=!0;try{t:{w=!1,O&&(O=!1,X(W),W=-1),D=!0;var at=x;try{e:{for(K(A),S=l(g);S!==null&&!(S.expirationTime>A&&rt());){var tt=S.callback;if(typeof tt=="function"){S.callback=null,x=S.priorityLevel;var jt=tt(S.expirationTime<=A);if(A=a.unstable_now(),typeof jt=="function"){S.callback=jt,K(A),Z=!0;break e}S===l(g)&&r(g),K(A)}else r(g);S=l(g)}if(S!==null)Z=!0;else{var $t=l(v);$t!==null&&zt(G,$t.startTime-A),Z=!1}}break t}finally{S=null,x=at,D=!1}Z=void 0}}finally{Z?Et():Q=!1}}}var Et;if(typeof R=="function")Et=function(){R(mt)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,Lt=P.port2;P.port1.onmessage=mt,Et=function(){Lt.postMessage(null)}}else Et=function(){z(mt,0)};function zt(A,Z){W=z(function(){A(a.unstable_now())},Z)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(A){A.callback=null},a.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<A?Math.floor(1e3/A):5},a.unstable_getCurrentPriorityLevel=function(){return x},a.unstable_next=function(A){switch(x){case 1:case 2:case 3:var Z=3;break;default:Z=x}var at=x;x=Z;try{return A()}finally{x=at}},a.unstable_requestPaint=function(){q=!0},a.unstable_runWithPriority=function(A,Z){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var at=x;x=A;try{return Z()}finally{x=at}},a.unstable_scheduleCallback=function(A,Z,at){var tt=a.unstable_now();switch(typeof at=="object"&&at!==null?(at=at.delay,at=typeof at=="number"&&0<at?tt+at:tt):at=tt,A){case 1:var jt=-1;break;case 2:jt=250;break;case 5:jt=1073741823;break;case 4:jt=1e4;break;default:jt=5e3}return jt=at+jt,A={id:b++,callback:Z,priorityLevel:A,startTime:at,expirationTime:jt,sortIndex:-1},at>tt?(A.sortIndex=at,i(v,A),l(g)===null&&A===l(v)&&(O?(X(W),W=-1):O=!0,zt(G,at-tt))):(A.sortIndex=jt,i(g,A),w||D||(w=!0,Q||(Q=!0,Et()))),A},a.unstable_shouldYield=rt,a.unstable_wrapCallback=function(A){var Z=x;return function(){var at=x;x=Z;try{return A.apply(this,arguments)}finally{x=at}}}})(Eu)),Eu}var Up;function xS(){return Up||(Up=1,ju.exports=TS()),ju.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 Vp;function AS(){if(Vp)return dl;Vp=1;var a=xS(),i=dS(),l=gS();function r(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function f(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function d(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function g(t){if(f(t)!==t)throw Error(r(188))}function v(t){var e=t.alternate;if(!e){if(e=f(t),e===null)throw Error(r(188));return e!==t?null:t}for(var n=t,s=e;;){var o=n.return;if(o===null)break;var c=o.alternate;if(c===null){if(s=o.return,s!==null){n=s;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===n)return g(o),t;if(c===s)return g(o),e;c=c.sibling}throw Error(r(188))}if(n.return!==s.return)n=o,s=c;else{for(var h=!1,y=o.child;y;){if(y===n){h=!0,n=o,s=c;break}if(y===s){h=!0,s=o,n=c;break}y=y.sibling}if(!h){for(y=c.child;y;){if(y===n){h=!0,n=c,s=o;break}if(y===s){h=!0,s=c,n=o;break}y=y.sibling}if(!h)throw Error(r(189))}}if(n.alternate!==s)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?t:e}function b(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=b(t),e!==null)return e;t=t.sibling}return null}var S=Object.assign,x=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),R=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),rt=Symbol.for("react.memo_cache_sentinel"),mt=Symbol.iterator;function Et(t){return t===null||typeof t!="object"?null:(t=mt&&t[mt]||t["@@iterator"],typeof t=="function"?t:null)}var P=Symbol.for("react.client.reference");function Lt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===P?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case O:return"Fragment";case z:return"Profiler";case q:return"StrictMode";case G:return"Suspense";case Q:return"SuspenseList";case F:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case R:return t.displayName||"Context";case X:return(t._context.displayName||"Context")+".Consumer";case K:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case W:return e=t.displayName||null,e!==null?e:Lt(t.type)||"Memo";case V:e=t._payload,t=t._init;try{return Lt(t(e))}catch{}}return null}var zt=Array.isArray,A=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at={pending:!1,data:null,method:null,action:null},tt=[],jt=-1;function $t(t){return{current:t}}function Rt(t){0>jt||(t.current=tt[jt],tt[jt]=null,jt--)}function St(t,e){jt++,tt[jt]=t.current,t.current=e}var I=$t(null),Qt=$t(null),_e=$t(null),ce=$t(null);function pe(t,e){switch(St(_e,e),St(Qt,t),St(I,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?np(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=np(e),t=ap(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Rt(I),St(I,t)}function se(){Rt(I),Rt(Qt),Rt(_e)}function Pe(t){t.memoizedState!==null&&St(ce,t);var e=I.current,n=ap(e,t.type);e!==n&&(St(Qt,t),St(I,n))}function bt(t){Qt.current===t&&(Rt(I),Rt(Qt)),ce.current===t&&(Rt(ce),ol._currentValue=at)}var ue,Le;function ge(t){if(ue===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);ue=e&&e[1]||"",Le=-1<n.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+ue+t+Le}var on=!1;function Cn(t,e){if(!t||on)return"";on=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(e){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(M){var k=M}Reflect.construct(t,[],H)}else{try{H.call()}catch(M){k=M}t.call(H.prototype)}}else{try{throw Error()}catch(M){k=M}(H=t())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(M){if(M&&k&&typeof M.stack=="string")return[M.stack,k.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),h=c[0],y=c[1];if(h&&y){var T=h.split(`
20
+ `),N=y.split(`
21
+ `);for(o=s=0;s<T.length&&!T[s].includes("DetermineComponentFrameRoot");)s++;for(;o<N.length&&!N[o].includes("DetermineComponentFrameRoot");)o++;if(s===T.length||o===N.length)for(s=T.length-1,o=N.length-1;1<=s&&0<=o&&T[s]!==N[o];)o--;for(;1<=s&&0<=o;s--,o--)if(T[s]!==N[o]){if(s!==1||o!==1)do if(s--,o--,0>o||T[s]!==N[o]){var U=`
22
+ `+T[s].replace(" at new "," at ");return t.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",t.displayName)),U}while(1<=s&&0<=o);break}}}finally{on=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?ge(n):""}function Y(t,e){switch(t.tag){case 26:case 27:case 5:return ge(t.type);case 16:return ge("Lazy");case 13:return t.child!==e&&e!==null?ge("Suspense Fallback"):ge("Suspense");case 19:return ge("SuspenseList");case 0:case 15:return Cn(t.type,!1);case 11:return Cn(t.type.render,!1);case 1:return Cn(t.type,!0);case 31:return ge("Activity");default:return""}}function it(t){try{var e="",n=null;do e+=Y(t,n),n=t,t=t.return;while(t);return e}catch(s){return`
23
+ Error generating stack: `+s.message+`
24
+ `+s.stack}}var lt=Object.prototype.hasOwnProperty,ut=a.unstable_scheduleCallback,pt=a.unstable_cancelCallback,ht=a.unstable_shouldYield,xt=a.unstable_requestPaint,Ht=a.unstable_now,dt=a.unstable_getCurrentPriorityLevel,st=a.unstable_ImmediatePriority,It=a.unstable_UserBlockingPriority,et=a.unstable_NormalPriority,Zt=a.unstable_LowPriority,Ee=a.unstable_IdlePriority,mi=a.log,pi=a.unstable_setDisableYieldValue,Ln=null,J=null;function Ct(t){if(typeof mi=="function"&&pi(t),J&&typeof J.setStrictMode=="function")try{J.setStrictMode(Ln,t)}catch{}}var Bt=Math.clz32?Math.clz32:Nn,le=Math.log,vt=Math.LN2;function Nn(t){return t>>>=0,t===0?32:31-(le(t)/vt|0)|0}var Sn=256,Ha=262144,Ga=4194304;function Dn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function qa(t,e,n){var s=t.pendingLanes;if(s===0)return 0;var o=0,c=t.suspendedLanes,h=t.pingedLanes;t=t.warmLanes;var y=s&134217727;return y!==0?(s=y&~c,s!==0?o=Dn(s):(h&=y,h!==0?o=Dn(h):n||(n=y&~t,n!==0&&(o=Dn(n))))):(y=s&~c,y!==0?o=Dn(y):h!==0?o=Dn(h):n||(n=s&~t,n!==0&&(o=Dn(n)))),o===0?0:e!==0&&e!==o&&(e&c)===0&&(c=o&-o,n=e&-e,c>=n||c===32&&(n&4194048)!==0)?e:o}function oa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function wl(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 gi(){var t=Ga;return Ga<<=1,(Ga&62914560)===0&&(Ga=4194304),t}function hs(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ra(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ml(t,e,n,s,o,c){var h=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var y=t.entanglements,T=t.expirationTimes,N=t.hiddenUpdates;for(n=h&~n;0<n;){var U=31-Bt(n),H=1<<U;y[U]=0,T[U]=-1;var k=N[U];if(k!==null)for(N[U]=null,U=0;U<k.length;U++){var M=k[U];M!==null&&(M.lane&=-536870913)}n&=~H}s!==0&&vi(t,s,0),c!==0&&o===0&&t.tag!==0&&(t.suspendedLanes|=c&~(h&~e))}function vi(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var s=31-Bt(e);t.entangledLanes|=e,t.entanglements[s]=t.entanglements[s]|1073741824|n&261930}function yi(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var s=31-Bt(n),o=1<<s;o&e|t[s]&e&&(t[s]|=e),n&=~o}}function bi(t,e){var n=e&-e;return n=(n&42)!==0?1:ms(n),(n&(t.suspendedLanes|e))!==0?0:n}function ms(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ps(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Si(){var t=Z.p;return t!==0?t:(t=window.event,t===void 0?32:Ep(t.type))}function _i(t,e){var n=Z.p;try{return Z.p=t,e()}finally{Z.p=n}}var _n=Math.random().toString(36).slice(2),$="__reactFiber$"+_n,_t="__reactProps$"+_n,kt="__reactContainer$"+_n,Wt="__reactEvents$"+_n,gs="__reactListeners$"+_n,vs="__reactHandles$"+_n,Ol="__reactResources$"+_n,Ti="__reactMarker$"+_n;function gr(t){delete t[$],delete t[_t],delete t[Wt],delete t[gs],delete t[vs]}function ys(t){var e=t[$];if(e)return e;for(var n=t.parentNode;n;){if(e=n[kt]||n[$]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=up(t);t!==null;){if(n=t[$])return n;t=up(t)}return e}t=n,n=t.parentNode}return null}function bs(t){if(t=t[$]||t[kt]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function xi(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(r(33))}function Ss(t){var e=t[Ol];return e||(e=t[Ol]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function De(t){t[Ti]=!0}var Id=new Set,Yd={};function Ia(t,e){_s(t,e),_s(t+"Capture",e)}function _s(t,e){for(Yd[t]=e,t=0;t<e.length;t++)Id.add(e[t])}var ny=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]*$"),Zd={},Xd={};function ay(t){return lt.call(Xd,t)?!0:lt.call(Zd,t)?!1:ny.test(t)?Xd[t]=!0:(Zd[t]=!0,!1)}function Rl(t,e,n){if(ay(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var s=e.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function Bl(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function Hn(t,e,n,s){if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+s)}}function rn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Kd(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function sy(t,e,n){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var o=s.get,c=s.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(h){n=""+h,c.call(this,h)}}),Object.defineProperty(t,e,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(h){n=""+h},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function vr(t){if(!t._valueTracker){var e=Kd(t)?"checked":"value";t._valueTracker=sy(t,e,""+t[e])}}function Qd(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),s="";return t&&(s=Kd(t)?t.checked?"true":"false":t.value),t=s,t!==n?(e.setValue(t),!0):!1}function zl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var iy=/[\n"\\]/g;function cn(t){return t.replace(iy,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function yr(t,e,n,s,o,c,h,y){t.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?t.type=h:t.removeAttribute("type"),e!=null?h==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+rn(e)):t.value!==""+rn(e)&&(t.value=""+rn(e)):h!=="submit"&&h!=="reset"||t.removeAttribute("value"),e!=null?br(t,h,rn(e)):n!=null?br(t,h,rn(n)):s!=null&&t.removeAttribute("value"),o==null&&c!=null&&(t.defaultChecked=!!c),o!=null&&(t.checked=o&&typeof o!="function"&&typeof o!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.name=""+rn(y):t.removeAttribute("name")}function Pd(t,e,n,s,o,c,h,y){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.type=c),e!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||e!=null)){vr(t);return}n=n!=null?""+rn(n):"",e=e!=null?""+rn(e):n,y||e===t.value||(t.value=e),t.defaultValue=e}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=y?t.checked:!!s,t.defaultChecked=!!s,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(t.name=h),vr(t)}function br(t,e,n){e==="number"&&zl(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function Ts(t,e,n,s){if(t=t.options,e){e={};for(var o=0;o<n.length;o++)e["$"+n[o]]=!0;for(n=0;n<t.length;n++)o=e.hasOwnProperty("$"+t[n].value),t[n].selected!==o&&(t[n].selected=o),o&&s&&(t[n].defaultSelected=!0)}else{for(n=""+rn(n),e=null,o=0;o<t.length;o++){if(t[o].value===n){t[o].selected=!0,s&&(t[o].defaultSelected=!0);return}e!==null||t[o].disabled||(e=t[o])}e!==null&&(e.selected=!0)}}function Fd(t,e,n){if(e!=null&&(e=""+rn(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+rn(n):""}function Jd(t,e,n,s){if(e==null){if(s!=null){if(n!=null)throw Error(r(92));if(zt(s)){if(1<s.length)throw Error(r(93));s=s[0]}n=s}n==null&&(n=""),e=n}n=rn(e),t.defaultValue=n,s=t.textContent,s===n&&s!==""&&s!==null&&(t.value=s),vr(t)}function xs(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ly=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 $d(t,e,n){var s=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?s?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":s?t.setProperty(e,n):typeof n!="number"||n===0||ly.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function Wd(t,e,n){if(e!=null&&typeof e!="object")throw Error(r(62));if(t=t.style,n!=null){for(var s in n)!n.hasOwnProperty(s)||e!=null&&e.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var o in e)s=e[o],e.hasOwnProperty(o)&&n[o]!==s&&$d(t,o,s)}else for(var c in e)e.hasOwnProperty(c)&&$d(t,c,e[c])}function Sr(t){if(t.indexOf("-")===-1)return!1;switch(t){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 oy=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"]]),ry=/^[\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 Ul(t){return ry.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Gn(){}var _r=null;function Tr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var As=null,js=null;function tf(t){var e=bs(t);if(e&&(t=e.stateNode)){var n=t[_t]||null;t:switch(t=e.stateNode,e.type){case"input":if(yr(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+cn(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var s=n[e];if(s!==t&&s.form===t.form){var o=s[_t]||null;if(!o)throw Error(r(90));yr(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(e=0;e<n.length;e++)s=n[e],s.form===t.form&&Qd(s)}break t;case"textarea":Fd(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&Ts(t,!!n.multiple,e,!1)}}}var xr=!1;function ef(t,e,n){if(xr)return t(e,n);xr=!0;try{var s=t(e);return s}finally{if(xr=!1,(As!==null||js!==null)&&(jo(),As&&(e=As,t=js,js=As=null,tf(e),t)))for(e=0;e<t.length;e++)tf(t[e])}}function Ai(t,e){var n=t.stateNode;if(n===null)return null;var s=n[_t]||null;if(s===null)return null;n=s[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(r(231,e,typeof n));return n}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ar=!1;if(qn)try{var ji={};Object.defineProperty(ji,"passive",{get:function(){Ar=!0}}),window.addEventListener("test",ji,ji),window.removeEventListener("test",ji,ji)}catch{Ar=!1}var ca=null,jr=null,Vl=null;function nf(){if(Vl)return Vl;var t,e=jr,n=e.length,s,o="value"in ca?ca.value:ca.textContent,c=o.length;for(t=0;t<n&&e[t]===o[t];t++);var h=n-t;for(s=1;s<=h&&e[n-s]===o[c-s];s++);return Vl=o.slice(t,1<s?1-s:void 0)}function Ll(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Hl(){return!0}function af(){return!1}function Ie(t){function e(n,s,o,c,h){this._reactName=n,this._targetInst=o,this.type=s,this.nativeEvent=c,this.target=h,this.currentTarget=null;for(var y in t)t.hasOwnProperty(y)&&(n=t[y],this[y]=n?n(c):c[y]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Hl:af,this.isPropagationStopped=af,this}return S(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Hl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Hl)},persist:function(){},isPersistent:Hl}),e}var Ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gl=Ie(Ya),Ei=S({},Ya,{view:0,detail:0}),cy=Ie(Ei),Er,Cr,Ci,ql=S({},Ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dr,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ci&&(Ci&&t.type==="mousemove"?(Er=t.screenX-Ci.screenX,Cr=t.screenY-Ci.screenY):Cr=Er=0,Ci=t),Er)},movementY:function(t){return"movementY"in t?t.movementY:Cr}}),sf=Ie(ql),uy=S({},ql,{dataTransfer:0}),dy=Ie(uy),fy=S({},Ei,{relatedTarget:0}),Nr=Ie(fy),hy=S({},Ya,{animationName:0,elapsedTime:0,pseudoElement:0}),my=Ie(hy),py=S({},Ya,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),gy=Ie(py),vy=S({},Ya,{data:0}),lf=Ie(vy),yy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},by={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"},Sy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _y(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Sy[t])?!!e[t]:!1}function Dr(){return _y}var Ty=S({},Ei,{key:function(t){if(t.key){var e=yy[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Ll(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?by[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dr,charCode:function(t){return t.type==="keypress"?Ll(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ll(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),xy=Ie(Ty),Ay=S({},ql,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),of=Ie(Ay),jy=S({},Ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dr}),Ey=Ie(jy),Cy=S({},Ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ny=Ie(Cy),Dy=S({},ql,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),ky=Ie(Dy),wy=S({},Ya,{newState:0,oldState:0}),My=Ie(wy),Oy=[9,13,27,32],kr=qn&&"CompositionEvent"in window,Ni=null;qn&&"documentMode"in document&&(Ni=document.documentMode);var Ry=qn&&"TextEvent"in window&&!Ni,rf=qn&&(!kr||Ni&&8<Ni&&11>=Ni),cf=" ",uf=!1;function df(t,e){switch(t){case"keyup":return Oy.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ff(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Es=!1;function By(t,e){switch(t){case"compositionend":return ff(e);case"keypress":return e.which!==32?null:(uf=!0,cf);case"textInput":return t=e.data,t===cf&&uf?null:t;default:return null}}function zy(t,e){if(Es)return t==="compositionend"||!kr&&df(t,e)?(t=nf(),Vl=jr=ca=null,Es=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return rf&&e.locale!=="ko"?null:e.data;default:return null}}var Uy={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 hf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Uy[t.type]:e==="textarea"}function mf(t,e,n,s){As?js?js.push(s):js=[s]:As=s,e=Mo(e,"onChange"),0<e.length&&(n=new Gl("onChange","change",null,n,s),t.push({event:n,listeners:e}))}var Di=null,ki=null;function Vy(t){Fm(t,0)}function Il(t){var e=xi(t);if(Qd(e))return t}function pf(t,e){if(t==="change")return e}var gf=!1;if(qn){var wr;if(qn){var Mr="oninput"in document;if(!Mr){var vf=document.createElement("div");vf.setAttribute("oninput","return;"),Mr=typeof vf.oninput=="function"}wr=Mr}else wr=!1;gf=wr&&(!document.documentMode||9<document.documentMode)}function yf(){Di&&(Di.detachEvent("onpropertychange",bf),ki=Di=null)}function bf(t){if(t.propertyName==="value"&&Il(ki)){var e=[];mf(e,ki,t,Tr(t)),ef(Vy,e)}}function Ly(t,e,n){t==="focusin"?(yf(),Di=e,ki=n,Di.attachEvent("onpropertychange",bf)):t==="focusout"&&yf()}function Hy(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Il(ki)}function Gy(t,e){if(t==="click")return Il(e)}function qy(t,e){if(t==="input"||t==="change")return Il(e)}function Iy(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Fe=typeof Object.is=="function"?Object.is:Iy;function wi(t,e){if(Fe(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),s=Object.keys(e);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var o=n[s];if(!lt.call(e,o)||!Fe(t[o],e[o]))return!1}return!0}function Sf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function _f(t,e){var n=Sf(t);t=0;for(var s;n;){if(n.nodeType===3){if(s=t+n.textContent.length,t<=e&&s>=e)return{node:n,offset:e-t};t=s}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=Sf(n)}}function Tf(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Tf(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function xf(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=zl(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=zl(t.document)}return e}function Or(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Yy=qn&&"documentMode"in document&&11>=document.documentMode,Cs=null,Rr=null,Mi=null,Br=!1;function Af(t,e,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Br||Cs==null||Cs!==zl(s)||(s=Cs,"selectionStart"in s&&Or(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Mi&&wi(Mi,s)||(Mi=s,s=Mo(Rr,"onSelect"),0<s.length&&(e=new Gl("onSelect","select",null,e,n),t.push({event:e,listeners:s}),e.target=Cs)))}function Za(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Ns={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionrun:Za("Transition","TransitionRun"),transitionstart:Za("Transition","TransitionStart"),transitioncancel:Za("Transition","TransitionCancel"),transitionend:Za("Transition","TransitionEnd")},zr={},jf={};qn&&(jf=document.createElement("div").style,"AnimationEvent"in window||(delete Ns.animationend.animation,delete Ns.animationiteration.animation,delete Ns.animationstart.animation),"TransitionEvent"in window||delete Ns.transitionend.transition);function Xa(t){if(zr[t])return zr[t];if(!Ns[t])return t;var e=Ns[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in jf)return zr[t]=e[n];return t}var Ef=Xa("animationend"),Cf=Xa("animationiteration"),Nf=Xa("animationstart"),Zy=Xa("transitionrun"),Xy=Xa("transitionstart"),Ky=Xa("transitioncancel"),Df=Xa("transitionend"),kf=new Map,Ur="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(" ");Ur.push("scrollEnd");function Tn(t,e){kf.set(t,e),Ia(e,[t])}var Yl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},un=[],Ds=0,Vr=0;function Zl(){for(var t=Ds,e=Vr=Ds=0;e<t;){var n=un[e];un[e++]=null;var s=un[e];un[e++]=null;var o=un[e];un[e++]=null;var c=un[e];if(un[e++]=null,s!==null&&o!==null){var h=s.pending;h===null?o.next=o:(o.next=h.next,h.next=o),s.pending=o}c!==0&&wf(n,o,c)}}function Xl(t,e,n,s){un[Ds++]=t,un[Ds++]=e,un[Ds++]=n,un[Ds++]=s,Vr|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Lr(t,e,n,s){return Xl(t,e,n,s),Kl(t)}function Ka(t,e){return Xl(t,null,null,e),Kl(t)}function wf(t,e,n){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n);for(var o=!1,c=t.return;c!==null;)c.childLanes|=n,s=c.alternate,s!==null&&(s.childLanes|=n),c.tag===22&&(t=c.stateNode,t===null||t._visibility&1||(o=!0)),t=c,c=c.return;return t.tag===3?(c=t.stateNode,o&&e!==null&&(o=31-Bt(n),t=c.hiddenUpdates,s=t[o],s===null?t[o]=[e]:s.push(e),e.lane=n|536870912),c):null}function Kl(t){if(50<tl)throw tl=0,Qc=null,Error(r(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var ks={};function Qy(t,e,n,s){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Je(t,e,n,s){return new Qy(t,e,n,s)}function Hr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function In(t,e){var n=t.alternate;return n===null?(n=Je(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function Mf(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Ql(t,e,n,s,o,c){var h=0;if(s=t,typeof t=="function")Hr(t)&&(h=1);else if(typeof t=="string")h=Wb(t,n,I.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case F:return t=Je(31,n,e,o),t.elementType=F,t.lanes=c,t;case O:return Qa(n.children,o,c,e);case q:h=8,o|=24;break;case z:return t=Je(12,n,e,o|2),t.elementType=z,t.lanes=c,t;case G:return t=Je(13,n,e,o),t.elementType=G,t.lanes=c,t;case Q:return t=Je(19,n,e,o),t.elementType=Q,t.lanes=c,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case R:h=10;break t;case X:h=9;break t;case K:h=11;break t;case W:h=14;break t;case V:h=16,s=null;break t}h=29,n=Error(r(130,t===null?"null":typeof t,"")),s=null}return e=Je(h,n,e,o),e.elementType=t,e.type=s,e.lanes=c,e}function Qa(t,e,n,s){return t=Je(7,t,s,e),t.lanes=n,t}function Gr(t,e,n){return t=Je(6,t,null,e),t.lanes=n,t}function Of(t){var e=Je(18,null,null,0);return e.stateNode=t,e}function qr(t,e,n){return e=Je(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Rf=new WeakMap;function dn(t,e){if(typeof t=="object"&&t!==null){var n=Rf.get(t);return n!==void 0?n:(e={value:t,source:e,stack:it(e)},Rf.set(t,e),e)}return{value:t,source:e,stack:it(e)}}var ws=[],Ms=0,Pl=null,Oi=0,fn=[],hn=0,ua=null,kn=1,wn="";function Yn(t,e){ws[Ms++]=Oi,ws[Ms++]=Pl,Pl=t,Oi=e}function Bf(t,e,n){fn[hn++]=kn,fn[hn++]=wn,fn[hn++]=ua,ua=t;var s=kn;t=wn;var o=32-Bt(s)-1;s&=~(1<<o),n+=1;var c=32-Bt(e)+o;if(30<c){var h=o-o%5;c=(s&(1<<h)-1).toString(32),s>>=h,o-=h,kn=1<<32-Bt(e)+o|n<<o|s,wn=c+t}else kn=1<<c|n<<o|s,wn=t}function Ir(t){t.return!==null&&(Yn(t,1),Bf(t,1,0))}function Yr(t){for(;t===Pl;)Pl=ws[--Ms],ws[Ms]=null,Oi=ws[--Ms],ws[Ms]=null;for(;t===ua;)ua=fn[--hn],fn[hn]=null,wn=fn[--hn],fn[hn]=null,kn=fn[--hn],fn[hn]=null}function zf(t,e){fn[hn++]=kn,fn[hn++]=wn,fn[hn++]=ua,kn=e.id,wn=e.overflow,ua=t}var Me=null,ee=null,Ot=!1,da=null,mn=!1,Zr=Error(r(519));function fa(t){var e=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ri(dn(e,t)),Zr}function Uf(t){var e=t.stateNode,n=t.type,s=t.memoizedProps;switch(e[$]=t,e[_t]=s,n){case"dialog":Dt("cancel",e),Dt("close",e);break;case"iframe":case"object":case"embed":Dt("load",e);break;case"video":case"audio":for(n=0;n<nl.length;n++)Dt(nl[n],e);break;case"source":Dt("error",e);break;case"img":case"image":case"link":Dt("error",e),Dt("load",e);break;case"details":Dt("toggle",e);break;case"input":Dt("invalid",e),Pd(e,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Dt("invalid",e);break;case"textarea":Dt("invalid",e),Jd(e,s.value,s.defaultValue,s.children)}n=s.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||s.suppressHydrationWarning===!0||tp(e.textContent,n)?(s.popover!=null&&(Dt("beforetoggle",e),Dt("toggle",e)),s.onScroll!=null&&Dt("scroll",e),s.onScrollEnd!=null&&Dt("scrollend",e),s.onClick!=null&&(e.onclick=Gn),e=!0):e=!1,e||fa(t,!0)}function Vf(t){for(Me=t.return;Me;)switch(Me.tag){case 5:case 31:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:Me=Me.return}}function Os(t){if(t!==Me)return!1;if(!Ot)return Vf(t),Ot=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||cu(t.type,t.memoizedProps)),n=!n),n&&ee&&fa(t),Vf(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));ee=cp(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));ee=cp(t)}else e===27?(e=ee,Ea(t.type)?(t=mu,mu=null,ee=t):ee=e):ee=Me?gn(t.stateNode.nextSibling):null;return!0}function Pa(){ee=Me=null,Ot=!1}function Xr(){var t=da;return t!==null&&(Ke===null?Ke=t:Ke.push.apply(Ke,t),da=null),t}function Ri(t){da===null?da=[t]:da.push(t)}var Kr=$t(null),Fa=null,Zn=null;function ha(t,e,n){St(Kr,e._currentValue),e._currentValue=n}function Xn(t){t._currentValue=Kr.current,Rt(Kr)}function Qr(t,e,n){for(;t!==null;){var s=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,s!==null&&(s.childLanes|=e)):s!==null&&(s.childLanes&e)!==e&&(s.childLanes|=e),t===n)break;t=t.return}}function Pr(t,e,n,s){var o=t.child;for(o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){var h=o.child;c=c.firstContext;t:for(;c!==null;){var y=c;c=o;for(var T=0;T<e.length;T++)if(y.context===e[T]){c.lanes|=n,y=c.alternate,y!==null&&(y.lanes|=n),Qr(c.return,n,t),s||(h=null);break t}c=y.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(r(341));h.lanes|=n,c=h.alternate,c!==null&&(c.lanes|=n),Qr(h,n,t),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===t){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function Rs(t,e,n,s){t=null;for(var o=e,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(r(387));if(h=h.memoizedProps,h!==null){var y=o.type;Fe(o.pendingProps.value,h.value)||(t!==null?t.push(y):t=[y])}}else if(o===ce.current){if(h=o.alternate,h===null)throw Error(r(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(t!==null?t.push(ol):t=[ol])}o=o.return}t!==null&&Pr(e,t,n,s),e.flags|=262144}function Fl(t){for(t=t.firstContext;t!==null;){if(!Fe(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ja(t){Fa=t,Zn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Oe(t){return Lf(Fa,t)}function Jl(t,e){return Fa===null&&Ja(t),Lf(t,e)}function Lf(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},Zn===null){if(t===null)throw Error(r(308));Zn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Zn=Zn.next=e;return n}var Py=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,s){t.push(s)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},Fy=a.unstable_scheduleCallback,Jy=a.unstable_NormalPriority,Te={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fr(){return{controller:new Py,data:new Map,refCount:0}}function Bi(t){t.refCount--,t.refCount===0&&Fy(Jy,function(){t.controller.abort()})}var zi=null,Jr=0,Bs=0,zs=null;function $y(t,e){if(zi===null){var n=zi=[];Jr=0,Bs=tu(),zs={status:"pending",value:void 0,then:function(s){n.push(s)}}}return Jr++,e.then(Hf,Hf),e}function Hf(){if(--Jr===0&&zi!==null){zs!==null&&(zs.status="fulfilled");var t=zi;zi=null,Bs=0,zs=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Wy(t,e){var n=[],s={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return t.then(function(){s.status="fulfilled",s.value=e;for(var o=0;o<n.length;o++)(0,n[o])(e)},function(o){for(s.status="rejected",s.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),s}var Gf=A.S;A.S=function(t,e){Am=Ht(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&$y(t,e),Gf!==null&&Gf(t,e)};var $a=$t(null);function $r(){var t=$a.current;return t!==null?t:te.pooledCache}function $l(t,e){e===null?St($a,$a.current):St($a,e.pool)}function qf(){var t=$r();return t===null?null:{parent:Te._currentValue,pool:t}}var Us=Error(r(460)),Wr=Error(r(474)),Wl=Error(r(542)),to={then:function(){}};function If(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Yf(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(Gn,Gn),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Xf(t),t;default:if(typeof e.status=="string")e.then(Gn,Gn);else{if(t=te,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=e,t.status="pending",t.then(function(s){if(e.status==="pending"){var o=e;o.status="fulfilled",o.value=s}},function(s){if(e.status==="pending"){var o=e;o.status="rejected",o.reason=s}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Xf(t),t}throw ts=e,Us}}function Wa(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ts=n,Us):n}}var ts=null;function Zf(){if(ts===null)throw Error(r(459));var t=ts;return ts=null,t}function Xf(t){if(t===Us||t===Wl)throw Error(r(483))}var Vs=null,Ui=0;function eo(t){var e=Ui;return Ui+=1,Vs===null&&(Vs=[]),Yf(Vs,t,e)}function Vi(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function no(t,e){throw e.$$typeof===x?Error(r(525)):(t=Object.prototype.toString.call(e),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Kf(t){function e(E,j){if(t){var C=E.deletions;C===null?(E.deletions=[j],E.flags|=16):C.push(j)}}function n(E,j){if(!t)return null;for(;j!==null;)e(E,j),j=j.sibling;return null}function s(E){for(var j=new Map;E!==null;)E.key!==null?j.set(E.key,E):j.set(E.index,E),E=E.sibling;return j}function o(E,j){return E=In(E,j),E.index=0,E.sibling=null,E}function c(E,j,C){return E.index=C,t?(C=E.alternate,C!==null?(C=C.index,C<j?(E.flags|=67108866,j):C):(E.flags|=67108866,j)):(E.flags|=1048576,j)}function h(E){return t&&E.alternate===null&&(E.flags|=67108866),E}function y(E,j,C,L){return j===null||j.tag!==6?(j=Gr(C,E.mode,L),j.return=E,j):(j=o(j,C),j.return=E,j)}function T(E,j,C,L){var ft=C.type;return ft===O?U(E,j,C.props.children,L,C.key):j!==null&&(j.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===V&&Wa(ft)===j.type)?(j=o(j,C.props),Vi(j,C),j.return=E,j):(j=Ql(C.type,C.key,C.props,null,E.mode,L),Vi(j,C),j.return=E,j)}function N(E,j,C,L){return j===null||j.tag!==4||j.stateNode.containerInfo!==C.containerInfo||j.stateNode.implementation!==C.implementation?(j=qr(C,E.mode,L),j.return=E,j):(j=o(j,C.children||[]),j.return=E,j)}function U(E,j,C,L,ft){return j===null||j.tag!==7?(j=Qa(C,E.mode,L,ft),j.return=E,j):(j=o(j,C),j.return=E,j)}function H(E,j,C){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Gr(""+j,E.mode,C),j.return=E,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case D:return C=Ql(j.type,j.key,j.props,null,E.mode,C),Vi(C,j),C.return=E,C;case w:return j=qr(j,E.mode,C),j.return=E,j;case V:return j=Wa(j),H(E,j,C)}if(zt(j)||Et(j))return j=Qa(j,E.mode,C,null),j.return=E,j;if(typeof j.then=="function")return H(E,eo(j),C);if(j.$$typeof===R)return H(E,Jl(E,j),C);no(E,j)}return null}function k(E,j,C,L){var ft=j!==null?j.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return ft!==null?null:y(E,j,""+C,L);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case D:return C.key===ft?T(E,j,C,L):null;case w:return C.key===ft?N(E,j,C,L):null;case V:return C=Wa(C),k(E,j,C,L)}if(zt(C)||Et(C))return ft!==null?null:U(E,j,C,L,null);if(typeof C.then=="function")return k(E,j,eo(C),L);if(C.$$typeof===R)return k(E,j,Jl(E,C),L);no(E,C)}return null}function M(E,j,C,L,ft){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return E=E.get(C)||null,y(j,E,""+L,ft);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case D:return E=E.get(L.key===null?C:L.key)||null,T(j,E,L,ft);case w:return E=E.get(L.key===null?C:L.key)||null,N(j,E,L,ft);case V:return L=Wa(L),M(E,j,C,L,ft)}if(zt(L)||Et(L))return E=E.get(C)||null,U(j,E,L,ft,null);if(typeof L.then=="function")return M(E,j,C,eo(L),ft);if(L.$$typeof===R)return M(E,j,C,Jl(j,L),ft);no(j,L)}return null}function ot(E,j,C,L){for(var ft=null,Ut=null,ct=j,At=j=0,Mt=null;ct!==null&&At<C.length;At++){ct.index>At?(Mt=ct,ct=null):Mt=ct.sibling;var Vt=k(E,ct,C[At],L);if(Vt===null){ct===null&&(ct=Mt);break}t&&ct&&Vt.alternate===null&&e(E,ct),j=c(Vt,j,At),Ut===null?ft=Vt:Ut.sibling=Vt,Ut=Vt,ct=Mt}if(At===C.length)return n(E,ct),Ot&&Yn(E,At),ft;if(ct===null){for(;At<C.length;At++)ct=H(E,C[At],L),ct!==null&&(j=c(ct,j,At),Ut===null?ft=ct:Ut.sibling=ct,Ut=ct);return Ot&&Yn(E,At),ft}for(ct=s(ct);At<C.length;At++)Mt=M(ct,E,At,C[At],L),Mt!==null&&(t&&Mt.alternate!==null&&ct.delete(Mt.key===null?At:Mt.key),j=c(Mt,j,At),Ut===null?ft=Mt:Ut.sibling=Mt,Ut=Mt);return t&&ct.forEach(function(wa){return e(E,wa)}),Ot&&Yn(E,At),ft}function gt(E,j,C,L){if(C==null)throw Error(r(151));for(var ft=null,Ut=null,ct=j,At=j=0,Mt=null,Vt=C.next();ct!==null&&!Vt.done;At++,Vt=C.next()){ct.index>At?(Mt=ct,ct=null):Mt=ct.sibling;var wa=k(E,ct,Vt.value,L);if(wa===null){ct===null&&(ct=Mt);break}t&&ct&&wa.alternate===null&&e(E,ct),j=c(wa,j,At),Ut===null?ft=wa:Ut.sibling=wa,Ut=wa,ct=Mt}if(Vt.done)return n(E,ct),Ot&&Yn(E,At),ft;if(ct===null){for(;!Vt.done;At++,Vt=C.next())Vt=H(E,Vt.value,L),Vt!==null&&(j=c(Vt,j,At),Ut===null?ft=Vt:Ut.sibling=Vt,Ut=Vt);return Ot&&Yn(E,At),ft}for(ct=s(ct);!Vt.done;At++,Vt=C.next())Vt=M(ct,E,At,Vt.value,L),Vt!==null&&(t&&Vt.alternate!==null&&ct.delete(Vt.key===null?At:Vt.key),j=c(Vt,j,At),Ut===null?ft=Vt:Ut.sibling=Vt,Ut=Vt);return t&&ct.forEach(function(uS){return e(E,uS)}),Ot&&Yn(E,At),ft}function Jt(E,j,C,L){if(typeof C=="object"&&C!==null&&C.type===O&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case D:t:{for(var ft=C.key;j!==null;){if(j.key===ft){if(ft=C.type,ft===O){if(j.tag===7){n(E,j.sibling),L=o(j,C.props.children),L.return=E,E=L;break t}}else if(j.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===V&&Wa(ft)===j.type){n(E,j.sibling),L=o(j,C.props),Vi(L,C),L.return=E,E=L;break t}n(E,j);break}else e(E,j);j=j.sibling}C.type===O?(L=Qa(C.props.children,E.mode,L,C.key),L.return=E,E=L):(L=Ql(C.type,C.key,C.props,null,E.mode,L),Vi(L,C),L.return=E,E=L)}return h(E);case w:t:{for(ft=C.key;j!==null;){if(j.key===ft)if(j.tag===4&&j.stateNode.containerInfo===C.containerInfo&&j.stateNode.implementation===C.implementation){n(E,j.sibling),L=o(j,C.children||[]),L.return=E,E=L;break t}else{n(E,j);break}else e(E,j);j=j.sibling}L=qr(C,E.mode,L),L.return=E,E=L}return h(E);case V:return C=Wa(C),Jt(E,j,C,L)}if(zt(C))return ot(E,j,C,L);if(Et(C)){if(ft=Et(C),typeof ft!="function")throw Error(r(150));return C=ft.call(C),gt(E,j,C,L)}if(typeof C.then=="function")return Jt(E,j,eo(C),L);if(C.$$typeof===R)return Jt(E,j,Jl(E,C),L);no(E,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,j!==null&&j.tag===6?(n(E,j.sibling),L=o(j,C),L.return=E,E=L):(n(E,j),L=Gr(C,E.mode,L),L.return=E,E=L),h(E)):n(E,j)}return function(E,j,C,L){try{Ui=0;var ft=Jt(E,j,C,L);return Vs=null,ft}catch(ct){if(ct===Us||ct===Wl)throw ct;var Ut=Je(29,ct,null,E.mode);return Ut.lanes=L,Ut.return=E,Ut}finally{}}}var es=Kf(!0),Qf=Kf(!1),ma=!1;function tc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ec(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function pa(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ga(t,e,n){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Gt&2)!==0){var o=s.pending;return o===null?e.next=e:(e.next=o.next,o.next=e),s.pending=e,e=Kl(t),wf(t,null,n),e}return Xl(t,s,e,n),Kl(t)}function Li(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,yi(t,n)}}function nc(t,e){var n=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var o=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var h={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?o=c=h:c=c.next=h,n=n.next}while(n!==null);c===null?o=c=e:c=c.next=e}else o=c=e;n={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var ac=!1;function Hi(){if(ac){var t=zs;if(t!==null)throw t}}function Gi(t,e,n,s){ac=!1;var o=t.updateQueue;ma=!1;var c=o.firstBaseUpdate,h=o.lastBaseUpdate,y=o.shared.pending;if(y!==null){o.shared.pending=null;var T=y,N=T.next;T.next=null,h===null?c=N:h.next=N,h=T;var U=t.alternate;U!==null&&(U=U.updateQueue,y=U.lastBaseUpdate,y!==h&&(y===null?U.firstBaseUpdate=N:y.next=N,U.lastBaseUpdate=T))}if(c!==null){var H=o.baseState;h=0,U=N=T=null,y=c;do{var k=y.lane&-536870913,M=k!==y.lane;if(M?(wt&k)===k:(s&k)===k){k!==0&&k===Bs&&(ac=!0),U!==null&&(U=U.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});t:{var ot=t,gt=y;k=e;var Jt=n;switch(gt.tag){case 1:if(ot=gt.payload,typeof ot=="function"){H=ot.call(Jt,H,k);break t}H=ot;break t;case 3:ot.flags=ot.flags&-65537|128;case 0:if(ot=gt.payload,k=typeof ot=="function"?ot.call(Jt,H,k):ot,k==null)break t;H=S({},H,k);break t;case 2:ma=!0}}k=y.callback,k!==null&&(t.flags|=64,M&&(t.flags|=8192),M=o.callbacks,M===null?o.callbacks=[k]:M.push(k))}else M={lane:k,tag:y.tag,payload:y.payload,callback:y.callback,next:null},U===null?(N=U=M,T=H):U=U.next=M,h|=k;if(y=y.next,y===null){if(y=o.shared.pending,y===null)break;M=y,y=M.next,M.next=null,o.lastBaseUpdate=M,o.shared.pending=null}}while(!0);U===null&&(T=H),o.baseState=T,o.firstBaseUpdate=N,o.lastBaseUpdate=U,c===null&&(o.shared.lanes=0),_a|=h,t.lanes=h,t.memoizedState=H}}function Pf(t,e){if(typeof t!="function")throw Error(r(191,t));t.call(e)}function Ff(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)Pf(n[t],e)}var Ls=$t(null),ao=$t(0);function Jf(t,e){t=ea,St(ao,t),St(Ls,e),ea=t|e.baseLanes}function sc(){St(ao,ea),St(Ls,Ls.current)}function ic(){ea=ao.current,Rt(Ls),Rt(ao)}var $e=$t(null),pn=null;function va(t){var e=t.alternate;St(ve,ve.current&1),St($e,t),pn===null&&(e===null||Ls.current!==null||e.memoizedState!==null)&&(pn=t)}function lc(t){St(ve,ve.current),St($e,t),pn===null&&(pn=t)}function $f(t){t.tag===22?(St(ve,ve.current),St($e,t),pn===null&&(pn=t)):ya()}function ya(){St(ve,ve.current),St($e,$e.current)}function We(t){Rt($e),pn===t&&(pn=null),Rt(ve)}var ve=$t(0);function so(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||fu(n)||hu(n)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Kn=0,Tt=null,Pt=null,xe=null,io=!1,Hs=!1,ns=!1,lo=0,qi=0,Gs=null,tb=0;function de(){throw Error(r(321))}function oc(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Fe(t[n],e[n]))return!1;return!0}function rc(t,e,n,s,o,c){return Kn=c,Tt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,A.H=t===null||t.memoizedState===null?Bh:xc,ns=!1,c=n(s,o),ns=!1,Hs&&(c=th(e,n,s,o)),Wf(t),c}function Wf(t){A.H=Zi;var e=Pt!==null&&Pt.next!==null;if(Kn=0,xe=Pt=Tt=null,io=!1,qi=0,Gs=null,e)throw Error(r(300));t===null||Ae||(t=t.dependencies,t!==null&&Fl(t)&&(Ae=!0))}function th(t,e,n,s){Tt=t;var o=0;do{if(Hs&&(Gs=null),qi=0,Hs=!1,25<=o)throw Error(r(301));if(o+=1,xe=Pt=null,t.updateQueue!=null){var c=t.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}A.H=zh,c=e(n,s)}while(Hs);return c}function eb(){var t=A.H,e=t.useState()[0];return e=typeof e.then=="function"?Ii(e):e,t=t.useState()[0],(Pt!==null?Pt.memoizedState:null)!==t&&(Tt.flags|=1024),e}function cc(){var t=lo!==0;return lo=0,t}function uc(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function dc(t){if(io){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}io=!1}Kn=0,xe=Pt=Tt=null,Hs=!1,qi=lo=0,Gs=null}function He(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xe===null?Tt.memoizedState=xe=t:xe=xe.next=t,xe}function ye(){if(Pt===null){var t=Tt.alternate;t=t!==null?t.memoizedState:null}else t=Pt.next;var e=xe===null?Tt.memoizedState:xe.next;if(e!==null)xe=e,Pt=t;else{if(t===null)throw Tt.alternate===null?Error(r(467)):Error(r(310));Pt=t,t={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},xe===null?Tt.memoizedState=xe=t:xe=xe.next=t}return xe}function oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ii(t){var e=qi;return qi+=1,Gs===null&&(Gs=[]),t=Yf(Gs,t,e),e=Tt,(xe===null?e.memoizedState:xe.next)===null&&(e=e.alternate,A.H=e===null||e.memoizedState===null?Bh:xc),t}function ro(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ii(t);if(t.$$typeof===R)return Oe(t)}throw Error(r(438,String(t)))}function fc(t){var e=null,n=Tt.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var s=Tt.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(e={data:s.data.map(function(o){return o.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=oo(),Tt.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),s=0;s<t;s++)n[s]=rt;return e.index++,n}function Qn(t,e){return typeof e=="function"?e(t):e}function co(t){var e=ye();return hc(e,Pt,t)}function hc(t,e,n){var s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var o=t.baseQueue,c=s.pending;if(c!==null){if(o!==null){var h=o.next;o.next=c.next,c.next=h}e.baseQueue=o=c,s.pending=null}if(c=t.baseState,o===null)t.memoizedState=c;else{e=o.next;var y=h=null,T=null,N=e,U=!1;do{var H=N.lane&-536870913;if(H!==N.lane?(wt&H)===H:(Kn&H)===H){var k=N.revertLane;if(k===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),H===Bs&&(U=!0);else if((Kn&k)===k){N=N.next,k===Bs&&(U=!0);continue}else H={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},T===null?(y=T=H,h=c):T=T.next=H,Tt.lanes|=k,_a|=k;H=N.action,ns&&n(c,H),c=N.hasEagerState?N.eagerState:n(c,H)}else k={lane:H,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},T===null?(y=T=k,h=c):T=T.next=k,Tt.lanes|=H,_a|=H;N=N.next}while(N!==null&&N!==e);if(T===null?h=c:T.next=y,!Fe(c,t.memoizedState)&&(Ae=!0,U&&(n=zs,n!==null)))throw n;t.memoizedState=c,t.baseState=h,t.baseQueue=T,s.lastRenderedState=c}return o===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function mc(t){var e=ye(),n=e.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=t;var s=n.dispatch,o=n.pending,c=e.memoizedState;if(o!==null){n.pending=null;var h=o=o.next;do c=t(c,h.action),h=h.next;while(h!==o);Fe(c,e.memoizedState)||(Ae=!0),e.memoizedState=c,e.baseQueue===null&&(e.baseState=c),n.lastRenderedState=c}return[c,s]}function eh(t,e,n){var s=Tt,o=ye(),c=Ot;if(c){if(n===void 0)throw Error(r(407));n=n()}else n=e();var h=!Fe((Pt||o).memoizedState,n);if(h&&(o.memoizedState=n,Ae=!0),o=o.queue,vc(sh.bind(null,s,o,t),[t]),o.getSnapshot!==e||h||xe!==null&&xe.memoizedState.tag&1){if(s.flags|=2048,qs(9,{destroy:void 0},ah.bind(null,s,o,n,e),null),te===null)throw Error(r(349));c||(Kn&127)!==0||nh(s,e,n)}return n}function nh(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Tt.updateQueue,e===null?(e=oo(),Tt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function ah(t,e,n,s){e.value=n,e.getSnapshot=s,ih(e)&&lh(t)}function sh(t,e,n){return n(function(){ih(e)&&lh(t)})}function ih(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Fe(t,n)}catch{return!0}}function lh(t){var e=Ka(t,2);e!==null&&Qe(e,t,2)}function pc(t){var e=He();if(typeof t=="function"){var n=t;if(t=n(),ns){Ct(!0);try{n()}finally{Ct(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:t},e}function oh(t,e,n,s){return t.baseState=n,hc(t,Pt,typeof s=="function"?s:Qn)}function nb(t,e,n,s,o){if(ho(t))throw Error(r(485));if(t=e.action,t!==null){var c={payload:o,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){c.listeners.push(h)}};A.T!==null?n(!0):c.isTransition=!1,s(c),n=e.pending,n===null?(c.next=e.pending=c,rh(e,c)):(c.next=n.next,e.pending=n.next=c)}}function rh(t,e){var n=e.action,s=e.payload,o=t.state;if(e.isTransition){var c=A.T,h={};A.T=h;try{var y=n(o,s),T=A.S;T!==null&&T(h,y),ch(t,e,y)}catch(N){gc(t,e,N)}finally{c!==null&&h.types!==null&&(c.types=h.types),A.T=c}}else try{c=n(o,s),ch(t,e,c)}catch(N){gc(t,e,N)}}function ch(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){uh(t,e,s)},function(s){return gc(t,e,s)}):uh(t,e,n)}function uh(t,e,n){e.status="fulfilled",e.value=n,dh(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,rh(t,n)))}function gc(t,e,n){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do e.status="rejected",e.reason=n,dh(e),e=e.next;while(e!==s)}t.action=null}function dh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function fh(t,e){return e}function hh(t,e){if(Ot){var n=te.formState;if(n!==null){t:{var s=Tt;if(Ot){if(ee){e:{for(var o=ee,c=mn;o.nodeType!==8;){if(!c){o=null;break e}if(o=gn(o.nextSibling),o===null){o=null;break e}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){ee=gn(o.nextSibling),s=o.data==="F!";break t}}fa(s)}s=!1}s&&(e=n[0])}}return n=He(),n.memoizedState=n.baseState=e,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fh,lastRenderedState:e},n.queue=s,n=Mh.bind(null,Tt,s),s.dispatch=n,s=pc(!1),c=Tc.bind(null,Tt,!1,s.queue),s=He(),o={state:e,dispatch:null,action:t,pending:null},s.queue=o,n=nb.bind(null,Tt,o,c,n),o.dispatch=n,s.memoizedState=t,[e,n,!1]}function mh(t){var e=ye();return ph(e,Pt,t)}function ph(t,e,n){if(e=hc(t,e,fh)[0],t=co(Qn)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var s=Ii(e)}catch(h){throw h===Us?Wl:h}else s=e;e=ye();var o=e.queue,c=o.dispatch;return n!==e.memoizedState&&(Tt.flags|=2048,qs(9,{destroy:void 0},ab.bind(null,o,n),null)),[s,c,t]}function ab(t,e){t.action=e}function gh(t){var e=ye(),n=Pt;if(n!==null)return ph(e,n,t);ye(),e=e.memoizedState,n=ye();var s=n.queue.dispatch;return n.memoizedState=t,[e,s,!1]}function qs(t,e,n,s){return t={tag:t,create:n,deps:s,inst:e,next:null},e=Tt.updateQueue,e===null&&(e=oo(),Tt.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(s=n.next,n.next=t,t.next=s,e.lastEffect=t),t}function vh(){return ye().memoizedState}function uo(t,e,n,s){var o=He();Tt.flags|=t,o.memoizedState=qs(1|e,{destroy:void 0},n,s===void 0?null:s)}function fo(t,e,n,s){var o=ye();s=s===void 0?null:s;var c=o.memoizedState.inst;Pt!==null&&s!==null&&oc(s,Pt.memoizedState.deps)?o.memoizedState=qs(e,c,n,s):(Tt.flags|=t,o.memoizedState=qs(1|e,c,n,s))}function yh(t,e){uo(8390656,8,t,e)}function vc(t,e){fo(2048,8,t,e)}function sb(t){Tt.flags|=4;var e=Tt.updateQueue;if(e===null)e=oo(),Tt.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function bh(t){var e=ye().memoizedState;return sb({ref:e,nextImpl:t}),function(){if((Gt&2)!==0)throw Error(r(440));return e.impl.apply(void 0,arguments)}}function Sh(t,e){return fo(4,2,t,e)}function _h(t,e){return fo(4,4,t,e)}function Th(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function xh(t,e,n){n=n!=null?n.concat([t]):null,fo(4,4,Th.bind(null,e,t),n)}function yc(){}function Ah(t,e){var n=ye();e=e===void 0?null:e;var s=n.memoizedState;return e!==null&&oc(e,s[1])?s[0]:(n.memoizedState=[t,e],t)}function jh(t,e){var n=ye();e=e===void 0?null:e;var s=n.memoizedState;if(e!==null&&oc(e,s[1]))return s[0];if(s=t(),ns){Ct(!0);try{t()}finally{Ct(!1)}}return n.memoizedState=[s,e],s}function bc(t,e,n){return n===void 0||(Kn&1073741824)!==0&&(wt&261930)===0?t.memoizedState=e:(t.memoizedState=n,t=Em(),Tt.lanes|=t,_a|=t,n)}function Eh(t,e,n,s){return Fe(n,e)?n:Ls.current!==null?(t=bc(t,n,s),Fe(t,e)||(Ae=!0),t):(Kn&42)===0||(Kn&1073741824)!==0&&(wt&261930)===0?(Ae=!0,t.memoizedState=n):(t=Em(),Tt.lanes|=t,_a|=t,e)}function Ch(t,e,n,s,o){var c=Z.p;Z.p=c!==0&&8>c?c:8;var h=A.T,y={};A.T=y,Tc(t,!1,e,n);try{var T=o(),N=A.S;if(N!==null&&N(y,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var U=Wy(T,s);Yi(t,e,U,nn(t))}else Yi(t,e,s,nn(t))}catch(H){Yi(t,e,{then:function(){},status:"rejected",reason:H},nn())}finally{Z.p=c,h!==null&&y.types!==null&&(h.types=y.types),A.T=h}}function ib(){}function Sc(t,e,n,s){if(t.tag!==5)throw Error(r(476));var o=Nh(t).queue;Ch(t,o,e,at,n===null?ib:function(){return Dh(t),n(s)})}function Nh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:at,baseState:at,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:at},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Dh(t){var e=Nh(t);e.next===null&&(e=t.alternate.memoizedState),Yi(t,e.next.queue,{},nn())}function _c(){return Oe(ol)}function kh(){return ye().memoizedState}function wh(){return ye().memoizedState}function lb(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=nn();t=pa(n);var s=ga(e,t,n);s!==null&&(Qe(s,e,n),Li(s,e,n)),e={cache:Fr()},t.payload=e;return}e=e.return}}function ob(t,e,n){var s=nn();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ho(t)?Oh(e,n):(n=Lr(t,e,n,s),n!==null&&(Qe(n,t,s),Rh(n,e,s)))}function Mh(t,e,n){var s=nn();Yi(t,e,n,s)}function Yi(t,e,n,s){var o={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ho(t))Oh(e,o);else{var c=t.alternate;if(t.lanes===0&&(c===null||c.lanes===0)&&(c=e.lastRenderedReducer,c!==null))try{var h=e.lastRenderedState,y=c(h,n);if(o.hasEagerState=!0,o.eagerState=y,Fe(y,h))return Xl(t,e,o,0),te===null&&Zl(),!1}catch{}finally{}if(n=Lr(t,e,o,s),n!==null)return Qe(n,t,s),Rh(n,e,s),!0}return!1}function Tc(t,e,n,s){if(s={lane:2,revertLane:tu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},ho(t)){if(e)throw Error(r(479))}else e=Lr(t,n,s,2),e!==null&&Qe(e,t,2)}function ho(t){var e=t.alternate;return t===Tt||e!==null&&e===Tt}function Oh(t,e){Hs=io=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Rh(t,e,n){if((n&4194048)!==0){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,yi(t,n)}}var Zi={readContext:Oe,use:ro,useCallback:de,useContext:de,useEffect:de,useImperativeHandle:de,useLayoutEffect:de,useInsertionEffect:de,useMemo:de,useReducer:de,useRef:de,useState:de,useDebugValue:de,useDeferredValue:de,useTransition:de,useSyncExternalStore:de,useId:de,useHostTransitionStatus:de,useFormState:de,useActionState:de,useOptimistic:de,useMemoCache:de,useCacheRefresh:de};Zi.useEffectEvent=de;var Bh={readContext:Oe,use:ro,useCallback:function(t,e){return He().memoizedState=[t,e===void 0?null:e],t},useContext:Oe,useEffect:yh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,uo(4194308,4,Th.bind(null,e,t),n)},useLayoutEffect:function(t,e){return uo(4194308,4,t,e)},useInsertionEffect:function(t,e){uo(4,2,t,e)},useMemo:function(t,e){var n=He();e=e===void 0?null:e;var s=t();if(ns){Ct(!0);try{t()}finally{Ct(!1)}}return n.memoizedState=[s,e],s},useReducer:function(t,e,n){var s=He();if(n!==void 0){var o=n(e);if(ns){Ct(!0);try{n(e)}finally{Ct(!1)}}}else o=e;return s.memoizedState=s.baseState=o,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:o},s.queue=t,t=t.dispatch=ob.bind(null,Tt,t),[s.memoizedState,t]},useRef:function(t){var e=He();return t={current:t},e.memoizedState=t},useState:function(t){t=pc(t);var e=t.queue,n=Mh.bind(null,Tt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:yc,useDeferredValue:function(t,e){var n=He();return bc(n,t,e)},useTransition:function(){var t=pc(!1);return t=Ch.bind(null,Tt,t.queue,!0,!1),He().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var s=Tt,o=He();if(Ot){if(n===void 0)throw Error(r(407));n=n()}else{if(n=e(),te===null)throw Error(r(349));(wt&127)!==0||nh(s,e,n)}o.memoizedState=n;var c={value:n,getSnapshot:e};return o.queue=c,yh(sh.bind(null,s,c,t),[t]),s.flags|=2048,qs(9,{destroy:void 0},ah.bind(null,s,c,n,e),null),n},useId:function(){var t=He(),e=te.identifierPrefix;if(Ot){var n=wn,s=kn;n=(s&~(1<<32-Bt(s)-1)).toString(32)+n,e="_"+e+"R_"+n,n=lo++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=tb++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:_c,useFormState:hh,useActionState:hh,useOptimistic:function(t){var e=He();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=Tc.bind(null,Tt,!0,n),n.dispatch=e,[t,e]},useMemoCache:fc,useCacheRefresh:function(){return He().memoizedState=lb.bind(null,Tt)},useEffectEvent:function(t){var e=He(),n={impl:t};return e.memoizedState=n,function(){if((Gt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},xc={readContext:Oe,use:ro,useCallback:Ah,useContext:Oe,useEffect:vc,useImperativeHandle:xh,useInsertionEffect:Sh,useLayoutEffect:_h,useMemo:jh,useReducer:co,useRef:vh,useState:function(){return co(Qn)},useDebugValue:yc,useDeferredValue:function(t,e){var n=ye();return Eh(n,Pt.memoizedState,t,e)},useTransition:function(){var t=co(Qn)[0],e=ye().memoizedState;return[typeof t=="boolean"?t:Ii(t),e]},useSyncExternalStore:eh,useId:kh,useHostTransitionStatus:_c,useFormState:mh,useActionState:mh,useOptimistic:function(t,e){var n=ye();return oh(n,Pt,t,e)},useMemoCache:fc,useCacheRefresh:wh};xc.useEffectEvent=bh;var zh={readContext:Oe,use:ro,useCallback:Ah,useContext:Oe,useEffect:vc,useImperativeHandle:xh,useInsertionEffect:Sh,useLayoutEffect:_h,useMemo:jh,useReducer:mc,useRef:vh,useState:function(){return mc(Qn)},useDebugValue:yc,useDeferredValue:function(t,e){var n=ye();return Pt===null?bc(n,t,e):Eh(n,Pt.memoizedState,t,e)},useTransition:function(){var t=mc(Qn)[0],e=ye().memoizedState;return[typeof t=="boolean"?t:Ii(t),e]},useSyncExternalStore:eh,useId:kh,useHostTransitionStatus:_c,useFormState:gh,useActionState:gh,useOptimistic:function(t,e){var n=ye();return Pt!==null?oh(n,Pt,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:fc,useCacheRefresh:wh};zh.useEffectEvent=bh;function Ac(t,e,n,s){e=t.memoizedState,n=n(s,e),n=n==null?e:S({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var jc={enqueueSetState:function(t,e,n){t=t._reactInternals;var s=nn(),o=pa(s);o.payload=e,n!=null&&(o.callback=n),e=ga(t,o,s),e!==null&&(Qe(e,t,s),Li(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var s=nn(),o=pa(s);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=ga(t,o,s),e!==null&&(Qe(e,t,s),Li(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=nn(),s=pa(n);s.tag=2,e!=null&&(s.callback=e),e=ga(t,s,n),e!==null&&(Qe(e,t,n),Li(e,t,n))}};function Uh(t,e,n,s,o,c,h){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,c,h):e.prototype&&e.prototype.isPureReactComponent?!wi(n,s)||!wi(o,c):!0}function Vh(t,e,n,s){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,s),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,s),e.state!==t&&jc.enqueueReplaceState(e,e.state,null)}function as(t,e){var n=e;if("ref"in e){n={};for(var s in e)s!=="ref"&&(n[s]=e[s])}if(t=t.defaultProps){n===e&&(n=S({},n));for(var o in t)n[o]===void 0&&(n[o]=t[o])}return n}function Lh(t){Yl(t)}function Hh(t){console.error(t)}function Gh(t){Yl(t)}function mo(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(s){setTimeout(function(){throw s})}}function qh(t,e,n){try{var s=t.onCaughtError;s(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Ec(t,e,n){return n=pa(n),n.tag=3,n.payload={element:null},n.callback=function(){mo(t,e)},n}function Ih(t){return t=pa(t),t.tag=3,t}function Yh(t,e,n,s){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var c=s.value;t.payload=function(){return o(c)},t.callback=function(){qh(e,n,s)}}var h=n.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(t.callback=function(){qh(e,n,s),typeof o!="function"&&(Ta===null?Ta=new Set([this]):Ta.add(this));var y=s.stack;this.componentDidCatch(s.value,{componentStack:y!==null?y:""})})}function rb(t,e,n,s,o){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(e=n.alternate,e!==null&&Rs(e,n,o,!0),n=$e.current,n!==null){switch(n.tag){case 31:case 13:return pn===null?Eo():n.alternate===null&&fe===0&&(fe=3),n.flags&=-257,n.flags|=65536,n.lanes=o,s===to?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([s]):e.add(s),Jc(t,s,o)),!1;case 22:return n.flags|=65536,s===to?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([s])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([s]):n.add(s)),Jc(t,s,o)),!1}throw Error(r(435,n.tag))}return Jc(t,s,o),Eo(),!1}if(Ot)return e=$e.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=o,s!==Zr&&(t=Error(r(422),{cause:s}),Ri(dn(t,n)))):(s!==Zr&&(e=Error(r(423),{cause:s}),Ri(dn(e,n))),t=t.current.alternate,t.flags|=65536,o&=-o,t.lanes|=o,s=dn(s,n),o=Ec(t.stateNode,s,o),nc(t,o),fe!==4&&(fe=2)),!1;var c=Error(r(520),{cause:s});if(c=dn(c,n),Wi===null?Wi=[c]:Wi.push(c),fe!==4&&(fe=2),e===null)return!0;s=dn(s,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=o&-o,n.lanes|=t,t=Ec(n.stateNode,s,t),nc(n,t),!1;case 1:if(e=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Ta===null||!Ta.has(c))))return n.flags|=65536,o&=-o,n.lanes|=o,o=Ih(o),Yh(o,t,n,s),nc(n,o),!1}n=n.return}while(n!==null);return!1}var Cc=Error(r(461)),Ae=!1;function Re(t,e,n,s){e.child=t===null?Qf(e,null,n,s):es(e,t.child,n,s)}function Zh(t,e,n,s,o){n=n.render;var c=e.ref;if("ref"in s){var h={};for(var y in s)y!=="ref"&&(h[y]=s[y])}else h=s;return Ja(e),s=rc(t,e,n,h,c,o),y=cc(),t!==null&&!Ae?(uc(t,e,o),Pn(t,e,o)):(Ot&&y&&Ir(e),e.flags|=1,Re(t,e,s,o),e.child)}function Xh(t,e,n,s,o){if(t===null){var c=n.type;return typeof c=="function"&&!Hr(c)&&c.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=c,Kh(t,e,c,s,o)):(t=Ql(n.type,null,s,e,e.mode,o),t.ref=e.ref,t.return=e,e.child=t)}if(c=t.child,!Bc(t,o)){var h=c.memoizedProps;if(n=n.compare,n=n!==null?n:wi,n(h,s)&&t.ref===e.ref)return Pn(t,e,o)}return e.flags|=1,t=In(c,s),t.ref=e.ref,t.return=e,e.child=t}function Kh(t,e,n,s,o){if(t!==null){var c=t.memoizedProps;if(wi(c,s)&&t.ref===e.ref)if(Ae=!1,e.pendingProps=s=c,Bc(t,o))(t.flags&131072)!==0&&(Ae=!0);else return e.lanes=t.lanes,Pn(t,e,o)}return Nc(t,e,n,s,o)}function Qh(t,e,n,s){var o=s.children,c=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((e.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,t!==null){for(s=e.child=t.child,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~c}else s=0,e.child=null;return Ph(t,e,c,n,s)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&$l(e,c!==null?c.cachePool:null),c!==null?Jf(e,c):sc(),$f(e);else return s=e.lanes=536870912,Ph(t,e,c!==null?c.baseLanes|n:n,n,s)}else c!==null?($l(e,c.cachePool),Jf(e,c),ya(),e.memoizedState=null):(t!==null&&$l(e,null),sc(),ya());return Re(t,e,o,n),e.child}function Xi(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Ph(t,e,n,s,o){var c=$r();return c=c===null?null:{parent:Te._currentValue,pool:c},e.memoizedState={baseLanes:n,cachePool:c},t!==null&&$l(e,null),sc(),$f(e),t!==null&&Rs(t,e,s,!0),e.childLanes=o,null}function po(t,e){return e=vo({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Fh(t,e,n){return es(e,t.child,null,n),t=po(e,e.pendingProps),t.flags|=2,We(e),e.memoizedState=null,t}function cb(t,e,n){var s=e.pendingProps,o=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Ot){if(s.mode==="hidden")return t=po(e,s),e.lanes=536870912,Xi(null,t);if(lc(e),(t=ee)?(t=rp(t,mn),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ua!==null?{id:kn,overflow:wn}:null,retryLane:536870912,hydrationErrors:null},n=Of(t),n.return=e,e.child=n,Me=e,ee=null)):t=null,t===null)throw fa(e);return e.lanes=536870912,null}return po(e,s)}var c=t.memoizedState;if(c!==null){var h=c.dehydrated;if(lc(e),o)if(e.flags&256)e.flags&=-257,e=Fh(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(r(558));else if(Ae||Rs(t,e,n,!1),o=(n&t.childLanes)!==0,Ae||o){if(s=te,s!==null&&(h=bi(s,n),h!==0&&h!==c.retryLane))throw c.retryLane=h,Ka(t,h),Qe(s,t,h),Cc;Eo(),e=Fh(t,e,n)}else t=c.treeContext,ee=gn(h.nextSibling),Me=e,Ot=!0,da=null,mn=!1,t!==null&&zf(e,t),e=po(e,s),e.flags|=4096;return e}return t=In(t.child,{mode:s.mode,children:s.children}),t.ref=e.ref,e.child=t,t.return=e,t}function go(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function Nc(t,e,n,s,o){return Ja(e),n=rc(t,e,n,s,void 0,o),s=cc(),t!==null&&!Ae?(uc(t,e,o),Pn(t,e,o)):(Ot&&s&&Ir(e),e.flags|=1,Re(t,e,n,o),e.child)}function Jh(t,e,n,s,o,c){return Ja(e),e.updateQueue=null,n=th(e,s,n,o),Wf(t),s=cc(),t!==null&&!Ae?(uc(t,e,c),Pn(t,e,c)):(Ot&&s&&Ir(e),e.flags|=1,Re(t,e,n,c),e.child)}function $h(t,e,n,s,o){if(Ja(e),e.stateNode===null){var c=ks,h=n.contextType;typeof h=="object"&&h!==null&&(c=Oe(h)),c=new n(s,c),e.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=jc,e.stateNode=c,c._reactInternals=e,c=e.stateNode,c.props=s,c.state=e.memoizedState,c.refs={},tc(e),h=n.contextType,c.context=typeof h=="object"&&h!==null?Oe(h):ks,c.state=e.memoizedState,h=n.getDerivedStateFromProps,typeof h=="function"&&(Ac(e,n,h,s),c.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(h=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),h!==c.state&&jc.enqueueReplaceState(c,c.state,null),Gi(e,s,c,o),Hi(),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!0}else if(t===null){c=e.stateNode;var y=e.memoizedProps,T=as(n,y);c.props=T;var N=c.context,U=n.contextType;h=ks,typeof U=="object"&&U!==null&&(h=Oe(U));var H=n.getDerivedStateFromProps;U=typeof H=="function"||typeof c.getSnapshotBeforeUpdate=="function",y=e.pendingProps!==y,U||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y||N!==h)&&Vh(e,c,s,h),ma=!1;var k=e.memoizedState;c.state=k,Gi(e,s,c,o),Hi(),N=e.memoizedState,y||k!==N||ma?(typeof H=="function"&&(Ac(e,n,H,s),N=e.memoizedState),(T=ma||Uh(e,n,T,s,k,N,h))?(U||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(e.flags|=4194308)):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=s,e.memoizedState=N),c.props=s,c.state=N,c.context=h,s=T):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!1)}else{c=e.stateNode,ec(t,e),h=e.memoizedProps,U=as(n,h),c.props=U,H=e.pendingProps,k=c.context,N=n.contextType,T=ks,typeof N=="object"&&N!==null&&(T=Oe(N)),y=n.getDerivedStateFromProps,(N=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(h!==H||k!==T)&&Vh(e,c,s,T),ma=!1,k=e.memoizedState,c.state=k,Gi(e,s,c,o),Hi();var M=e.memoizedState;h!==H||k!==M||ma||t!==null&&t.dependencies!==null&&Fl(t.dependencies)?(typeof y=="function"&&(Ac(e,n,y,s),M=e.memoizedState),(U=ma||Uh(e,n,U,s,k,M,T)||t!==null&&t.dependencies!==null&&Fl(t.dependencies))?(N||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,M,T),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,M,T)),typeof c.componentDidUpdate=="function"&&(e.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof c.componentDidUpdate!="function"||h===t.memoizedProps&&k===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===t.memoizedProps&&k===t.memoizedState||(e.flags|=1024),e.memoizedProps=s,e.memoizedState=M),c.props=s,c.state=M,c.context=T,s=U):(typeof c.componentDidUpdate!="function"||h===t.memoizedProps&&k===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===t.memoizedProps&&k===t.memoizedState||(e.flags|=1024),s=!1)}return c=s,go(t,e),s=(e.flags&128)!==0,c||s?(c=e.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:c.render(),e.flags|=1,t!==null&&s?(e.child=es(e,t.child,null,o),e.child=es(e,null,n,o)):Re(t,e,n,o),e.memoizedState=c.state,t=e.child):t=Pn(t,e,o),t}function Wh(t,e,n,s){return Pa(),e.flags|=256,Re(t,e,n,s),e.child}var Dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kc(t){return{baseLanes:t,cachePool:qf()}}function wc(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=en),t}function tm(t,e,n){var s=e.pendingProps,o=!1,c=(e.flags&128)!==0,h;if((h=c)||(h=t!==null&&t.memoizedState===null?!1:(ve.current&2)!==0),h&&(o=!0,e.flags&=-129),h=(e.flags&32)!==0,e.flags&=-33,t===null){if(Ot){if(o?va(e):ya(),(t=ee)?(t=rp(t,mn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ua!==null?{id:kn,overflow:wn}:null,retryLane:536870912,hydrationErrors:null},n=Of(t),n.return=e,e.child=n,Me=e,ee=null)):t=null,t===null)throw fa(e);return hu(t)?e.lanes=32:e.lanes=536870912,null}var y=s.children;return s=s.fallback,o?(ya(),o=e.mode,y=vo({mode:"hidden",children:y},o),s=Qa(s,o,n,null),y.return=e,s.return=e,y.sibling=s,e.child=y,s=e.child,s.memoizedState=kc(n),s.childLanes=wc(t,h,n),e.memoizedState=Dc,Xi(null,s)):(va(e),Mc(e,y))}var T=t.memoizedState;if(T!==null&&(y=T.dehydrated,y!==null)){if(c)e.flags&256?(va(e),e.flags&=-257,e=Oc(t,e,n)):e.memoizedState!==null?(ya(),e.child=t.child,e.flags|=128,e=null):(ya(),y=s.fallback,o=e.mode,s=vo({mode:"visible",children:s.children},o),y=Qa(y,o,n,null),y.flags|=2,s.return=e,y.return=e,s.sibling=y,e.child=s,es(e,t.child,null,n),s=e.child,s.memoizedState=kc(n),s.childLanes=wc(t,h,n),e.memoizedState=Dc,e=Xi(null,s));else if(va(e),hu(y)){if(h=y.nextSibling&&y.nextSibling.dataset,h)var N=h.dgst;h=N,s=Error(r(419)),s.stack="",s.digest=h,Ri({value:s,source:null,stack:null}),e=Oc(t,e,n)}else if(Ae||Rs(t,e,n,!1),h=(n&t.childLanes)!==0,Ae||h){if(h=te,h!==null&&(s=bi(h,n),s!==0&&s!==T.retryLane))throw T.retryLane=s,Ka(t,s),Qe(h,t,s),Cc;fu(y)||Eo(),e=Oc(t,e,n)}else fu(y)?(e.flags|=192,e.child=t.child,e=null):(t=T.treeContext,ee=gn(y.nextSibling),Me=e,Ot=!0,da=null,mn=!1,t!==null&&zf(e,t),e=Mc(e,s.children),e.flags|=4096);return e}return o?(ya(),y=s.fallback,o=e.mode,T=t.child,N=T.sibling,s=In(T,{mode:"hidden",children:s.children}),s.subtreeFlags=T.subtreeFlags&65011712,N!==null?y=In(N,y):(y=Qa(y,o,n,null),y.flags|=2),y.return=e,s.return=e,s.sibling=y,e.child=s,Xi(null,s),s=e.child,y=t.child.memoizedState,y===null?y=kc(n):(o=y.cachePool,o!==null?(T=Te._currentValue,o=o.parent!==T?{parent:T,pool:T}:o):o=qf(),y={baseLanes:y.baseLanes|n,cachePool:o}),s.memoizedState=y,s.childLanes=wc(t,h,n),e.memoizedState=Dc,Xi(t.child,s)):(va(e),n=t.child,t=n.sibling,n=In(n,{mode:"visible",children:s.children}),n.return=e,n.sibling=null,t!==null&&(h=e.deletions,h===null?(e.deletions=[t],e.flags|=16):h.push(t)),e.child=n,e.memoizedState=null,n)}function Mc(t,e){return e=vo({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function vo(t,e){return t=Je(22,t,null,e),t.lanes=0,t}function Oc(t,e,n){return es(e,t.child,null,n),t=Mc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function em(t,e,n){t.lanes|=e;var s=t.alternate;s!==null&&(s.lanes|=e),Qr(t.return,e,n)}function Rc(t,e,n,s,o,c){var h=t.memoizedState;h===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:o,treeForkCount:c}:(h.isBackwards=e,h.rendering=null,h.renderingStartTime=0,h.last=s,h.tail=n,h.tailMode=o,h.treeForkCount=c)}function nm(t,e,n){var s=e.pendingProps,o=s.revealOrder,c=s.tail;s=s.children;var h=ve.current,y=(h&2)!==0;if(y?(h=h&1|2,e.flags|=128):h&=1,St(ve,h),Re(t,e,s,n),s=Ot?Oi:0,!y&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&em(t,n,e);else if(t.tag===19)em(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(o){case"forwards":for(n=e.child,o=null;n!==null;)t=n.alternate,t!==null&&so(t)===null&&(o=n),n=n.sibling;n=o,n===null?(o=e.child,e.child=null):(o=n.sibling,n.sibling=null),Rc(e,!1,o,n,c,s);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=e.child,e.child=null;o!==null;){if(t=o.alternate,t!==null&&so(t)===null){e.child=o;break}t=o.sibling,o.sibling=n,n=o,o=t}Rc(e,!0,n,null,c,s);break;case"together":Rc(e,!1,null,null,void 0,s);break;default:e.memoizedState=null}return e.child}function Pn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),_a|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(Rs(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(r(153));if(e.child!==null){for(t=e.child,n=In(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=In(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Bc(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Fl(t)))}function ub(t,e,n){switch(e.tag){case 3:pe(e,e.stateNode.containerInfo),ha(e,Te,t.memoizedState.cache),Pa();break;case 27:case 5:Pe(e);break;case 4:pe(e,e.stateNode.containerInfo);break;case 10:ha(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,lc(e),null;break;case 13:var s=e.memoizedState;if(s!==null)return s.dehydrated!==null?(va(e),e.flags|=128,null):(n&e.child.childLanes)!==0?tm(t,e,n):(va(e),t=Pn(t,e,n),t!==null?t.sibling:null);va(e);break;case 19:var o=(t.flags&128)!==0;if(s=(n&e.childLanes)!==0,s||(Rs(t,e,n,!1),s=(n&e.childLanes)!==0),o){if(s)return nm(t,e,n);e.flags|=128}if(o=e.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),St(ve,ve.current),s)break;return null;case 22:return e.lanes=0,Qh(t,e,n,e.pendingProps);case 24:ha(e,Te,t.memoizedState.cache)}return Pn(t,e,n)}function am(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)Ae=!0;else{if(!Bc(t,n)&&(e.flags&128)===0)return Ae=!1,ub(t,e,n);Ae=(t.flags&131072)!==0}else Ae=!1,Ot&&(e.flags&1048576)!==0&&Bf(e,Oi,e.index);switch(e.lanes=0,e.tag){case 16:t:{var s=e.pendingProps;if(t=Wa(e.elementType),e.type=t,typeof t=="function")Hr(t)?(s=as(t,s),e.tag=1,e=$h(null,e,t,s,n)):(e.tag=0,e=Nc(null,e,t,s,n));else{if(t!=null){var o=t.$$typeof;if(o===K){e.tag=11,e=Zh(null,e,t,s,n);break t}else if(o===W){e.tag=14,e=Xh(null,e,t,s,n);break t}}throw e=Lt(t)||t,Error(r(306,e,""))}}return e;case 0:return Nc(t,e,e.type,e.pendingProps,n);case 1:return s=e.type,o=as(s,e.pendingProps),$h(t,e,s,o,n);case 3:t:{if(pe(e,e.stateNode.containerInfo),t===null)throw Error(r(387));s=e.pendingProps;var c=e.memoizedState;o=c.element,ec(t,e),Gi(e,s,null,n);var h=e.memoizedState;if(s=h.cache,ha(e,Te,s),s!==c.cache&&Pr(e,[Te],n,!0),Hi(),s=h.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:h.cache},e.updateQueue.baseState=c,e.memoizedState=c,e.flags&256){e=Wh(t,e,s,n);break t}else if(s!==o){o=dn(Error(r(424)),e),Ri(o),e=Wh(t,e,s,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(ee=gn(t.firstChild),Me=e,Ot=!0,da=null,mn=!0,n=Qf(e,null,s,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Pa(),s===o){e=Pn(t,e,n);break t}Re(t,e,s,n)}e=e.child}return e;case 26:return go(t,e),t===null?(n=mp(e.type,null,e.pendingProps,null))?e.memoizedState=n:Ot||(n=e.type,t=e.pendingProps,s=Oo(_e.current).createElement(n),s[$]=e,s[_t]=t,Be(s,n,t),De(s),e.stateNode=s):e.memoizedState=mp(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Pe(e),t===null&&Ot&&(s=e.stateNode=dp(e.type,e.pendingProps,_e.current),Me=e,mn=!0,o=ee,Ea(e.type)?(mu=o,ee=gn(s.firstChild)):ee=o),Re(t,e,e.pendingProps.children,n),go(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Ot&&((o=s=ee)&&(s=Hb(s,e.type,e.pendingProps,mn),s!==null?(e.stateNode=s,Me=e,ee=gn(s.firstChild),mn=!1,o=!0):o=!1),o||fa(e)),Pe(e),o=e.type,c=e.pendingProps,h=t!==null?t.memoizedProps:null,s=c.children,cu(o,c)?s=null:h!==null&&cu(o,h)&&(e.flags|=32),e.memoizedState!==null&&(o=rc(t,e,eb,null,null,n),ol._currentValue=o),go(t,e),Re(t,e,s,n),e.child;case 6:return t===null&&Ot&&((t=n=ee)&&(n=Gb(n,e.pendingProps,mn),n!==null?(e.stateNode=n,Me=e,ee=null,t=!0):t=!1),t||fa(e)),null;case 13:return tm(t,e,n);case 4:return pe(e,e.stateNode.containerInfo),s=e.pendingProps,t===null?e.child=es(e,null,s,n):Re(t,e,s,n),e.child;case 11:return Zh(t,e,e.type,e.pendingProps,n);case 7:return Re(t,e,e.pendingProps,n),e.child;case 8:return Re(t,e,e.pendingProps.children,n),e.child;case 12:return Re(t,e,e.pendingProps.children,n),e.child;case 10:return s=e.pendingProps,ha(e,e.type,s.value),Re(t,e,s.children,n),e.child;case 9:return o=e.type._context,s=e.pendingProps.children,Ja(e),o=Oe(o),s=s(o),e.flags|=1,Re(t,e,s,n),e.child;case 14:return Xh(t,e,e.type,e.pendingProps,n);case 15:return Kh(t,e,e.type,e.pendingProps,n);case 19:return nm(t,e,n);case 31:return cb(t,e,n);case 22:return Qh(t,e,n,e.pendingProps);case 24:return Ja(e),s=Oe(Te),t===null?(o=$r(),o===null&&(o=te,c=Fr(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=n),o=c),e.memoizedState={parent:s,cache:o},tc(e),ha(e,Te,o)):((t.lanes&n)!==0&&(ec(t,e),Gi(e,null,null,n),Hi()),o=t.memoizedState,c=e.memoizedState,o.parent!==s?(o={parent:s,cache:s},e.memoizedState=o,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=o),ha(e,Te,s)):(s=c.cache,ha(e,Te,s),s!==o.cache&&Pr(e,[Te],n,!0))),Re(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(r(156,e.tag))}function Fn(t){t.flags|=4}function zc(t,e,n,s,o){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(o&335544128)===o)if(t.stateNode.complete)t.flags|=8192;else if(km())t.flags|=8192;else throw ts=to,Wr}else t.flags&=-16777217}function sm(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!bp(e))if(km())t.flags|=8192;else throw ts=to,Wr}function yo(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?gi():536870912,t.lanes|=e,Xs|=e)}function Ki(t,e){if(!Ot)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function ne(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,s=0;if(e)for(var o=t.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=t,o=o.sibling;else for(o=t.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=t,o=o.sibling;return t.subtreeFlags|=s,t.childLanes=n,e}function db(t,e,n){var s=e.pendingProps;switch(Yr(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ne(e),null;case 1:return ne(e),null;case 3:return n=e.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),e.memoizedState.cache!==s&&(e.flags|=2048),Xn(Te),se(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Os(e)?Fn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Xr())),ne(e),null;case 26:var o=e.type,c=e.memoizedState;return t===null?(Fn(e),c!==null?(ne(e),sm(e,c)):(ne(e),zc(e,o,null,s,n))):c?c!==t.memoizedState?(Fn(e),ne(e),sm(e,c)):(ne(e),e.flags&=-16777217):(t=t.memoizedProps,t!==s&&Fn(e),ne(e),zc(e,o,t,s,n)),null;case 27:if(bt(e),n=_e.current,o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&Fn(e);else{if(!s){if(e.stateNode===null)throw Error(r(166));return ne(e),null}t=I.current,Os(e)?Uf(e):(t=dp(o,s,n),e.stateNode=t,Fn(e))}return ne(e),null;case 5:if(bt(e),o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&Fn(e);else{if(!s){if(e.stateNode===null)throw Error(r(166));return ne(e),null}if(c=I.current,Os(e))Uf(e);else{var h=Oo(_e.current);switch(c){case 1:c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=h.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?h.createElement("select",{is:s.is}):h.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?h.createElement(o,{is:s.is}):h.createElement(o)}}c[$]=e,c[_t]=s;t:for(h=e.child;h!==null;){if(h.tag===5||h.tag===6)c.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break t;for(;h.sibling===null;){if(h.return===null||h.return===e)break t;h=h.return}h.sibling.return=h.return,h=h.sibling}e.stateNode=c;t:switch(Be(c,o,s),o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break t;case"img":s=!0;break t;default:s=!1}s&&Fn(e)}}return ne(e),zc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==s&&Fn(e);else{if(typeof s!="string"&&e.stateNode===null)throw Error(r(166));if(t=_e.current,Os(e)){if(t=e.stateNode,n=e.memoizedProps,s=null,o=Me,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}t[$]=e,t=!!(t.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||tp(t.nodeValue,n)),t||fa(e,!0)}else t=Oo(t).createTextNode(s),t[$]=e,e.stateNode=t}return ne(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(s=Os(e),n!==null){if(t===null){if(!s)throw Error(r(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[$]=e}else Pa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ne(e),t=!1}else n=Xr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(We(e),e):(We(e),null);if((e.flags&128)!==0)throw Error(r(558))}return ne(e),null;case 13:if(s=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(o=Os(e),s!==null&&s.dehydrated!==null){if(t===null){if(!o)throw Error(r(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[$]=e}else Pa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ne(e),o=!1}else o=Xr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),o=!0;if(!o)return e.flags&256?(We(e),e):(We(e),null)}return We(e),(e.flags&128)!==0?(e.lanes=n,e):(n=s!==null,t=t!==null&&t.memoizedState!==null,n&&(s=e.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==o&&(s.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),yo(e,e.updateQueue),ne(e),null);case 4:return se(),t===null&&su(e.stateNode.containerInfo),ne(e),null;case 10:return Xn(e.type),ne(e),null;case 19:if(Rt(ve),s=e.memoizedState,s===null)return ne(e),null;if(o=(e.flags&128)!==0,c=s.rendering,c===null)if(o)Ki(s,!1);else{if(fe!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(c=so(t),c!==null){for(e.flags|=128,Ki(s,!1),t=c.updateQueue,e.updateQueue=t,yo(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)Mf(n,t),n=n.sibling;return St(ve,ve.current&1|2),Ot&&Yn(e,s.treeForkCount),e.child}t=t.sibling}s.tail!==null&&Ht()>xo&&(e.flags|=128,o=!0,Ki(s,!1),e.lanes=4194304)}else{if(!o)if(t=so(c),t!==null){if(e.flags|=128,o=!0,t=t.updateQueue,e.updateQueue=t,yo(e,t),Ki(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Ot)return ne(e),null}else 2*Ht()-s.renderingStartTime>xo&&n!==536870912&&(e.flags|=128,o=!0,Ki(s,!1),e.lanes=4194304);s.isBackwards?(c.sibling=e.child,e.child=c):(t=s.last,t!==null?t.sibling=c:e.child=c,s.last=c)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ht(),t.sibling=null,n=ve.current,St(ve,o?n&1|2:n&1),Ot&&Yn(e,s.treeForkCount),t):(ne(e),null);case 22:case 23:return We(e),ic(),s=e.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(e.flags|=8192):s&&(e.flags|=8192),s?(n&536870912)!==0&&(e.flags&128)===0&&(ne(e),e.subtreeFlags&6&&(e.flags|=8192)):ne(e),n=e.updateQueue,n!==null&&yo(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),s=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),s!==n&&(e.flags|=2048),t!==null&&Rt($a),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Xn(Te),ne(e),null;case 25:return null;case 30:return null}throw Error(r(156,e.tag))}function fb(t,e){switch(Yr(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Xn(Te),se(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return bt(e),null;case 31:if(e.memoizedState!==null){if(We(e),e.alternate===null)throw Error(r(340));Pa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(We(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(r(340));Pa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Rt(ve),null;case 4:return se(),null;case 10:return Xn(e.type),null;case 22:case 23:return We(e),ic(),t!==null&&Rt($a),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Xn(Te),null;case 25:return null;default:return null}}function im(t,e){switch(Yr(e),e.tag){case 3:Xn(Te),se();break;case 26:case 27:case 5:bt(e);break;case 4:se();break;case 31:e.memoizedState!==null&&We(e);break;case 13:We(e);break;case 19:Rt(ve);break;case 10:Xn(e.type);break;case 22:case 23:We(e),ic(),t!==null&&Rt($a);break;case 24:Xn(Te)}}function Qi(t,e){try{var n=e.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var o=s.next;n=o;do{if((n.tag&t)===t){s=void 0;var c=n.create,h=n.inst;s=c(),h.destroy=s}n=n.next}while(n!==o)}}catch(y){Kt(e,e.return,y)}}function ba(t,e,n){try{var s=e.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var c=o.next;s=c;do{if((s.tag&t)===t){var h=s.inst,y=h.destroy;if(y!==void 0){h.destroy=void 0,o=e;var T=n,N=y;try{N()}catch(U){Kt(o,T,U)}}}s=s.next}while(s!==c)}}catch(U){Kt(e,e.return,U)}}function lm(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{Ff(e,n)}catch(s){Kt(t,t.return,s)}}}function om(t,e,n){n.props=as(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(s){Kt(t,e,s)}}function Pi(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof n=="function"?t.refCleanup=n(s):n.current=s}}catch(o){Kt(t,e,o)}}function Mn(t,e){var n=t.ref,s=t.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(o){Kt(t,e,o)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){Kt(t,e,o)}else n.current=null}function rm(t){var e=t.type,n=t.memoizedProps,s=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break t;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(o){Kt(t,t.return,o)}}function Uc(t,e,n){try{var s=t.stateNode;Rb(s,t.type,n,e),s[_t]=e}catch(o){Kt(t,t.return,o)}}function cm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ea(t.type)||t.tag===4}function Vc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||cm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ea(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Lc(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Gn));else if(s!==4&&(s===27&&Ea(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(Lc(t,e,n),t=t.sibling;t!==null;)Lc(t,e,n),t=t.sibling}function bo(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(s!==4&&(s===27&&Ea(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(bo(t,e,n),t=t.sibling;t!==null;)bo(t,e,n),t=t.sibling}function um(t){var e=t.stateNode,n=t.memoizedProps;try{for(var s=t.type,o=e.attributes;o.length;)e.removeAttributeNode(o[0]);Be(e,s,n),e[$]=t,e[_t]=n}catch(c){Kt(t,t.return,c)}}var Jn=!1,je=!1,Hc=!1,dm=typeof WeakSet=="function"?WeakSet:Set,ke=null;function hb(t,e){if(t=t.containerInfo,ou=Ho,t=xf(t),Or(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var o=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break t}var h=0,y=-1,T=-1,N=0,U=0,H=t,k=null;e:for(;;){for(var M;H!==n||o!==0&&H.nodeType!==3||(y=h+o),H!==c||s!==0&&H.nodeType!==3||(T=h+s),H.nodeType===3&&(h+=H.nodeValue.length),(M=H.firstChild)!==null;)k=H,H=M;for(;;){if(H===t)break e;if(k===n&&++N===o&&(y=h),k===c&&++U===s&&(T=h),(M=H.nextSibling)!==null)break;H=k,k=H.parentNode}H=M}n=y===-1||T===-1?null:{start:y,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(ru={focusedElem:t,selectionRange:n},Ho=!1,ke=e;ke!==null;)if(e=ke,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ke=t;else for(;ke!==null;){switch(e=ke,c=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n<t.length;n++)o=t[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&c!==null){t=void 0,n=e,o=c.memoizedProps,c=c.memoizedState,s=n.stateNode;try{var ot=as(n.type,o);t=s.getSnapshotBeforeUpdate(ot,c),s.__reactInternalSnapshotBeforeUpdate=t}catch(gt){Kt(n,n.return,gt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)du(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":du(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=e.sibling,t!==null){t.return=e.return,ke=t;break}ke=e.return}}function fm(t,e,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:Wn(t,n),s&4&&Qi(5,n);break;case 1:if(Wn(t,n),s&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(h){Kt(n,n.return,h)}else{var o=as(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(o,e,t.__reactInternalSnapshotBeforeUpdate)}catch(h){Kt(n,n.return,h)}}s&64&&lm(n),s&512&&Pi(n,n.return);break;case 3:if(Wn(t,n),s&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{Ff(t,e)}catch(h){Kt(n,n.return,h)}}break;case 27:e===null&&s&4&&um(n);case 26:case 5:Wn(t,n),e===null&&s&4&&rm(n),s&512&&Pi(n,n.return);break;case 12:Wn(t,n);break;case 31:Wn(t,n),s&4&&pm(t,n);break;case 13:Wn(t,n),s&4&&gm(t,n),s&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=Tb.bind(null,n),qb(t,n))));break;case 22:if(s=n.memoizedState!==null||Jn,!s){e=e!==null&&e.memoizedState!==null||je,o=Jn;var c=je;Jn=s,(je=e)&&!c?ta(t,n,(n.subtreeFlags&8772)!==0):Wn(t,n),Jn=o,je=c}break;case 30:break;default:Wn(t,n)}}function hm(t){var e=t.alternate;e!==null&&(t.alternate=null,hm(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&gr(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ie=null,Ye=!1;function $n(t,e,n){for(n=n.child;n!==null;)mm(t,e,n),n=n.sibling}function mm(t,e,n){if(J&&typeof J.onCommitFiberUnmount=="function")try{J.onCommitFiberUnmount(Ln,n)}catch{}switch(n.tag){case 26:je||Mn(n,e),$n(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:je||Mn(n,e);var s=ie,o=Ye;Ea(n.type)&&(ie=n.stateNode,Ye=!1),$n(t,e,n),sl(n.stateNode),ie=s,Ye=o;break;case 5:je||Mn(n,e);case 6:if(s=ie,o=Ye,ie=null,$n(t,e,n),ie=s,Ye=o,ie!==null)if(Ye)try{(ie.nodeType===9?ie.body:ie.nodeName==="HTML"?ie.ownerDocument.body:ie).removeChild(n.stateNode)}catch(c){Kt(n,e,c)}else try{ie.removeChild(n.stateNode)}catch(c){Kt(n,e,c)}break;case 18:ie!==null&&(Ye?(t=ie,lp(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),ti(t)):lp(ie,n.stateNode));break;case 4:s=ie,o=Ye,ie=n.stateNode.containerInfo,Ye=!0,$n(t,e,n),ie=s,Ye=o;break;case 0:case 11:case 14:case 15:ba(2,n,e),je||ba(4,n,e),$n(t,e,n);break;case 1:je||(Mn(n,e),s=n.stateNode,typeof s.componentWillUnmount=="function"&&om(n,e,s)),$n(t,e,n);break;case 21:$n(t,e,n);break;case 22:je=(s=je)||n.memoizedState!==null,$n(t,e,n),je=s;break;default:$n(t,e,n)}}function pm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ti(t)}catch(n){Kt(e,e.return,n)}}}function gm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ti(t)}catch(n){Kt(e,e.return,n)}}function mb(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new dm),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new dm),e;default:throw Error(r(435,t.tag))}}function So(t,e){var n=mb(t);e.forEach(function(s){if(!n.has(s)){n.add(s);var o=xb.bind(null,t,s);s.then(o,o)}})}function Ze(t,e){var n=e.deletions;if(n!==null)for(var s=0;s<n.length;s++){var o=n[s],c=t,h=e,y=h;t:for(;y!==null;){switch(y.tag){case 27:if(Ea(y.type)){ie=y.stateNode,Ye=!1;break t}break;case 5:ie=y.stateNode,Ye=!1;break t;case 3:case 4:ie=y.stateNode.containerInfo,Ye=!0;break t}y=y.return}if(ie===null)throw Error(r(160));mm(c,h,o),ie=null,Ye=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)vm(e,t),e=e.sibling}var xn=null;function vm(t,e){var n=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Ze(e,t),Xe(t),s&4&&(ba(3,t,t.return),Qi(3,t),ba(5,t,t.return));break;case 1:Ze(e,t),Xe(t),s&512&&(je||n===null||Mn(n,n.return)),s&64&&Jn&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?s:n.concat(s))));break;case 26:var o=xn;if(Ze(e,t),Xe(t),s&512&&(je||n===null||Mn(n,n.return)),s&4){var c=n!==null?n.memoizedState:null;if(s=t.memoizedState,n===null)if(s===null)if(t.stateNode===null){t:{s=t.type,n=t.memoizedProps,o=o.ownerDocument||o;e:switch(s){case"title":c=o.getElementsByTagName("title")[0],(!c||c[Ti]||c[$]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(s),o.head.insertBefore(c,o.querySelector("head > title"))),Be(c,s,n),c[$]=t,De(c),s=c;break t;case"link":var h=vp("link","href",o).get(s+(n.href||""));if(h){for(var y=0;y<h.length;y++)if(c=h[y],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){h.splice(y,1);break e}}c=o.createElement(s),Be(c,s,n),o.head.appendChild(c);break;case"meta":if(h=vp("meta","content",o).get(s+(n.content||""))){for(y=0;y<h.length;y++)if(c=h[y],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){h.splice(y,1);break e}}c=o.createElement(s),Be(c,s,n),o.head.appendChild(c);break;default:throw Error(r(468,s))}c[$]=t,De(c),s=c}t.stateNode=s}else yp(o,t.type,t.stateNode);else t.stateNode=gp(o,s,t.memoizedProps);else c!==s?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,s===null?yp(o,t.type,t.stateNode):gp(o,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Uc(t,t.memoizedProps,n.memoizedProps)}break;case 27:Ze(e,t),Xe(t),s&512&&(je||n===null||Mn(n,n.return)),n!==null&&s&4&&Uc(t,t.memoizedProps,n.memoizedProps);break;case 5:if(Ze(e,t),Xe(t),s&512&&(je||n===null||Mn(n,n.return)),t.flags&32){o=t.stateNode;try{xs(o,"")}catch(ot){Kt(t,t.return,ot)}}s&4&&t.stateNode!=null&&(o=t.memoizedProps,Uc(t,o,n!==null?n.memoizedProps:o)),s&1024&&(Hc=!0);break;case 6:if(Ze(e,t),Xe(t),s&4){if(t.stateNode===null)throw Error(r(162));s=t.memoizedProps,n=t.stateNode;try{n.nodeValue=s}catch(ot){Kt(t,t.return,ot)}}break;case 3:if(zo=null,o=xn,xn=Ro(e.containerInfo),Ze(e,t),xn=o,Xe(t),s&4&&n!==null&&n.memoizedState.isDehydrated)try{ti(e.containerInfo)}catch(ot){Kt(t,t.return,ot)}Hc&&(Hc=!1,ym(t));break;case 4:s=xn,xn=Ro(t.stateNode.containerInfo),Ze(e,t),Xe(t),xn=s;break;case 12:Ze(e,t),Xe(t);break;case 31:Ze(e,t),Xe(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,So(t,s)));break;case 13:Ze(e,t),Xe(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(To=Ht()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,So(t,s)));break;case 22:o=t.memoizedState!==null;var T=n!==null&&n.memoizedState!==null,N=Jn,U=je;if(Jn=N||o,je=U||T,Ze(e,t),je=U,Jn=N,Xe(t),s&8192)t:for(e=t.stateNode,e._visibility=o?e._visibility&-2:e._visibility|1,o&&(n===null||T||Jn||je||ss(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){T=n=e;try{if(c=T.stateNode,o)h=c.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{y=T.stateNode;var H=T.memoizedProps.style,k=H!=null&&H.hasOwnProperty("display")?H.display:null;y.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(ot){Kt(T,T.return,ot)}}}else if(e.tag===6){if(n===null){T=e;try{T.stateNode.nodeValue=o?"":T.memoizedProps}catch(ot){Kt(T,T.return,ot)}}}else if(e.tag===18){if(n===null){T=e;try{var M=T.stateNode;o?op(M,!0):op(T.stateNode,!1)}catch(ot){Kt(T,T.return,ot)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}s&4&&(s=t.updateQueue,s!==null&&(n=s.retryQueue,n!==null&&(s.retryQueue=null,So(t,n))));break;case 19:Ze(e,t),Xe(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,So(t,s)));break;case 30:break;case 21:break;default:Ze(e,t),Xe(t)}}function Xe(t){var e=t.flags;if(e&2){try{for(var n,s=t.return;s!==null;){if(cm(s)){n=s;break}s=s.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var o=n.stateNode,c=Vc(t);bo(t,c,o);break;case 5:var h=n.stateNode;n.flags&32&&(xs(h,""),n.flags&=-33);var y=Vc(t);bo(t,y,h);break;case 3:case 4:var T=n.stateNode.containerInfo,N=Vc(t);Lc(t,N,T);break;default:throw Error(r(161))}}catch(U){Kt(t,t.return,U)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function ym(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;ym(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Wn(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)fm(t,e.alternate,e),e=e.sibling}function ss(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:ba(4,e,e.return),ss(e);break;case 1:Mn(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&om(e,e.return,n),ss(e);break;case 27:sl(e.stateNode);case 26:case 5:Mn(e,e.return),ss(e);break;case 22:e.memoizedState===null&&ss(e);break;case 30:ss(e);break;default:ss(e)}t=t.sibling}}function ta(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var s=e.alternate,o=t,c=e,h=c.flags;switch(c.tag){case 0:case 11:case 15:ta(o,c,n),Qi(4,c);break;case 1:if(ta(o,c,n),s=c,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(N){Kt(s,s.return,N)}if(s=c,o=s.updateQueue,o!==null){var y=s.stateNode;try{var T=o.shared.hiddenCallbacks;if(T!==null)for(o.shared.hiddenCallbacks=null,o=0;o<T.length;o++)Pf(T[o],y)}catch(N){Kt(s,s.return,N)}}n&&h&64&&lm(c),Pi(c,c.return);break;case 27:um(c);case 26:case 5:ta(o,c,n),n&&s===null&&h&4&&rm(c),Pi(c,c.return);break;case 12:ta(o,c,n);break;case 31:ta(o,c,n),n&&h&4&&pm(o,c);break;case 13:ta(o,c,n),n&&h&4&&gm(o,c);break;case 22:c.memoizedState===null&&ta(o,c,n),Pi(c,c.return);break;case 30:break;default:ta(o,c,n)}e=e.sibling}}function Gc(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&Bi(n))}function qc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Bi(t))}function An(t,e,n,s){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bm(t,e,n,s),e=e.sibling}function bm(t,e,n,s){var o=e.flags;switch(e.tag){case 0:case 11:case 15:An(t,e,n,s),o&2048&&Qi(9,e);break;case 1:An(t,e,n,s);break;case 3:An(t,e,n,s),o&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Bi(t)));break;case 12:if(o&2048){An(t,e,n,s),t=e.stateNode;try{var c=e.memoizedProps,h=c.id,y=c.onPostCommit;typeof y=="function"&&y(h,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(T){Kt(e,e.return,T)}}else An(t,e,n,s);break;case 31:An(t,e,n,s);break;case 13:An(t,e,n,s);break;case 23:break;case 22:c=e.stateNode,h=e.alternate,e.memoizedState!==null?c._visibility&2?An(t,e,n,s):Fi(t,e):c._visibility&2?An(t,e,n,s):(c._visibility|=2,Is(t,e,n,s,(e.subtreeFlags&10256)!==0||!1)),o&2048&&Gc(h,e);break;case 24:An(t,e,n,s),o&2048&&qc(e.alternate,e);break;default:An(t,e,n,s)}}function Is(t,e,n,s,o){for(o=o&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var c=t,h=e,y=n,T=s,N=h.flags;switch(h.tag){case 0:case 11:case 15:Is(c,h,y,T,o),Qi(8,h);break;case 23:break;case 22:var U=h.stateNode;h.memoizedState!==null?U._visibility&2?Is(c,h,y,T,o):Fi(c,h):(U._visibility|=2,Is(c,h,y,T,o)),o&&N&2048&&Gc(h.alternate,h);break;case 24:Is(c,h,y,T,o),o&&N&2048&&qc(h.alternate,h);break;default:Is(c,h,y,T,o)}e=e.sibling}}function Fi(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,s=e,o=s.flags;switch(s.tag){case 22:Fi(n,s),o&2048&&Gc(s.alternate,s);break;case 24:Fi(n,s),o&2048&&qc(s.alternate,s);break;default:Fi(n,s)}e=e.sibling}}var Ji=8192;function Ys(t,e,n){if(t.subtreeFlags&Ji)for(t=t.child;t!==null;)Sm(t,e,n),t=t.sibling}function Sm(t,e,n){switch(t.tag){case 26:Ys(t,e,n),t.flags&Ji&&t.memoizedState!==null&&tS(n,xn,t.memoizedState,t.memoizedProps);break;case 5:Ys(t,e,n);break;case 3:case 4:var s=xn;xn=Ro(t.stateNode.containerInfo),Ys(t,e,n),xn=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=Ji,Ji=16777216,Ys(t,e,n),Ji=s):Ys(t,e,n));break;default:Ys(t,e,n)}}function _m(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function $i(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];ke=s,xm(s,t)}_m(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Tm(t),t=t.sibling}function Tm(t){switch(t.tag){case 0:case 11:case 15:$i(t),t.flags&2048&&ba(9,t,t.return);break;case 3:$i(t);break;case 12:$i(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,_o(t)):$i(t);break;default:$i(t)}}function _o(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];ke=s,xm(s,t)}_m(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:ba(8,e,e.return),_o(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,_o(e));break;default:_o(e)}t=t.sibling}}function xm(t,e){for(;ke!==null;){var n=ke;switch(n.tag){case 0:case 11:case 15:ba(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var s=n.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Bi(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,ke=s;else t:for(n=t;ke!==null;){s=ke;var o=s.sibling,c=s.return;if(hm(s),s===n){ke=null;break t}if(o!==null){o.return=c,ke=o;break t}ke=c}}}var pb={getCacheForType:function(t){var e=Oe(Te),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return Oe(Te).controller.signal}},gb=typeof WeakMap=="function"?WeakMap:Map,Gt=0,te=null,Nt=null,wt=0,Xt=0,tn=null,Sa=!1,Zs=!1,Ic=!1,ea=0,fe=0,_a=0,is=0,Yc=0,en=0,Xs=0,Wi=null,Ke=null,Zc=!1,To=0,Am=0,xo=1/0,Ao=null,Ta=null,Ce=0,xa=null,Ks=null,na=0,Xc=0,Kc=null,jm=null,tl=0,Qc=null;function nn(){return(Gt&2)!==0&&wt!==0?wt&-wt:A.T!==null?tu():Si()}function Em(){if(en===0)if((wt&536870912)===0||Ot){var t=Ha;Ha<<=1,(Ha&3932160)===0&&(Ha=262144),en=t}else en=536870912;return t=$e.current,t!==null&&(t.flags|=32),en}function Qe(t,e,n){(t===te&&(Xt===2||Xt===9)||t.cancelPendingCommit!==null)&&(Qs(t,0),Aa(t,wt,en,!1)),ra(t,n),((Gt&2)===0||t!==te)&&(t===te&&((Gt&2)===0&&(is|=n),fe===4&&Aa(t,wt,en,!1)),On(t))}function Cm(t,e,n){if((Gt&6)!==0)throw Error(r(327));var s=!n&&(e&127)===0&&(e&t.expiredLanes)===0||oa(t,e),o=s?bb(t,e):Fc(t,e,!0),c=s;do{if(o===0){Zs&&!s&&Aa(t,e,0,!1);break}else{if(n=t.current.alternate,c&&!vb(n)){o=Fc(t,e,!1),c=!1;continue}if(o===2){if(c=e,t.errorRecoveryDisabledLanes&c)var h=0;else h=t.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){e=h;t:{var y=t;o=Wi;var T=y.current.memoizedState.isDehydrated;if(T&&(Qs(y,h).flags|=256),h=Fc(y,h,!1),h!==2){if(Ic&&!T){y.errorRecoveryDisabledLanes|=c,is|=c,o=4;break t}c=Ke,Ke=o,c!==null&&(Ke===null?Ke=c:Ke.push.apply(Ke,c))}o=h}if(c=!1,o!==2)continue}}if(o===1){Qs(t,0),Aa(t,e,0,!0);break}t:{switch(s=t,c=o,c){case 0:case 1:throw Error(r(345));case 4:if((e&4194048)!==e)break;case 6:Aa(s,e,en,!Sa);break t;case 2:Ke=null;break;case 3:case 5:break;default:throw Error(r(329))}if((e&62914560)===e&&(o=To+300-Ht(),10<o)){if(Aa(s,e,en,!Sa),qa(s,0,!0)!==0)break t;na=e,s.timeoutHandle=sp(Nm.bind(null,s,n,Ke,Ao,Zc,e,en,is,Xs,Sa,c,"Throttled",-0,0),o);break t}Nm(s,n,Ke,Ao,Zc,e,en,is,Xs,Sa,c,null,-0,0)}}break}while(!0);On(t)}function Nm(t,e,n,s,o,c,h,y,T,N,U,H,k,M){if(t.timeoutHandle=-1,H=e.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gn},Sm(e,c,H);var ot=(c&62914560)===c?To-Ht():(c&4194048)===c?Am-Ht():0;if(ot=eS(H,ot),ot!==null){na=c,t.cancelPendingCommit=ot(zm.bind(null,t,e,c,n,s,o,h,y,T,U,H,null,k,M)),Aa(t,c,h,!N);return}}zm(t,e,c,n,s,o,h,y,T)}function vb(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var s=0;s<n.length;s++){var o=n[s],c=o.getSnapshot;o=o.value;try{if(!Fe(c(),o))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Aa(t,e,n,s){e&=~Yc,e&=~is,t.suspendedLanes|=e,t.pingedLanes&=~e,s&&(t.warmLanes|=e),s=t.expirationTimes;for(var o=e;0<o;){var c=31-Bt(o),h=1<<c;s[c]=-1,o&=~h}n!==0&&vi(t,n,e)}function jo(){return(Gt&6)===0?(el(0),!1):!0}function Pc(){if(Nt!==null){if(Xt===0)var t=Nt.return;else t=Nt,Zn=Fa=null,dc(t),Vs=null,Ui=0,t=Nt;for(;t!==null;)im(t.alternate,t),t=t.return;Nt=null}}function Qs(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,Ub(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),na=0,Pc(),te=t,Nt=n=In(t.current,null),wt=e,Xt=0,tn=null,Sa=!1,Zs=oa(t,e),Ic=!1,Xs=en=Yc=is=_a=fe=0,Ke=Wi=null,Zc=!1,(e&8)!==0&&(e|=e&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=e;0<s;){var o=31-Bt(s),c=1<<o;e|=t[o],s&=~c}return ea=e,Zl(),n}function Dm(t,e){Tt=null,A.H=Zi,e===Us||e===Wl?(e=Zf(),Xt=3):e===Wr?(e=Zf(),Xt=4):Xt=e===Cc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,tn=e,Nt===null&&(fe=1,mo(t,dn(e,t.current)))}function km(){var t=$e.current;return t===null?!0:(wt&4194048)===wt?pn===null:(wt&62914560)===wt||(wt&536870912)!==0?t===pn:!1}function wm(){var t=A.H;return A.H=Zi,t===null?Zi:t}function Mm(){var t=A.A;return A.A=pb,t}function Eo(){fe=4,Sa||(wt&4194048)!==wt&&$e.current!==null||(Zs=!0),(_a&134217727)===0&&(is&134217727)===0||te===null||Aa(te,wt,en,!1)}function Fc(t,e,n){var s=Gt;Gt|=2;var o=wm(),c=Mm();(te!==t||wt!==e)&&(Ao=null,Qs(t,e)),e=!1;var h=fe;t:do try{if(Xt!==0&&Nt!==null){var y=Nt,T=tn;switch(Xt){case 8:Pc(),h=6;break t;case 3:case 2:case 9:case 6:$e.current===null&&(e=!0);var N=Xt;if(Xt=0,tn=null,Ps(t,y,T,N),n&&Zs){h=0;break t}break;default:N=Xt,Xt=0,tn=null,Ps(t,y,T,N)}}yb(),h=fe;break}catch(U){Dm(t,U)}while(!0);return e&&t.shellSuspendCounter++,Zn=Fa=null,Gt=s,A.H=o,A.A=c,Nt===null&&(te=null,wt=0,Zl()),h}function yb(){for(;Nt!==null;)Om(Nt)}function bb(t,e){var n=Gt;Gt|=2;var s=wm(),o=Mm();te!==t||wt!==e?(Ao=null,xo=Ht()+500,Qs(t,e)):Zs=oa(t,e);t:do try{if(Xt!==0&&Nt!==null){e=Nt;var c=tn;e:switch(Xt){case 1:Xt=0,tn=null,Ps(t,e,c,1);break;case 2:case 9:if(If(c)){Xt=0,tn=null,Rm(e);break}e=function(){Xt!==2&&Xt!==9||te!==t||(Xt=7),On(t)},c.then(e,e);break t;case 3:Xt=7;break t;case 4:Xt=5;break t;case 7:If(c)?(Xt=0,tn=null,Rm(e)):(Xt=0,tn=null,Ps(t,e,c,7));break;case 5:var h=null;switch(Nt.tag){case 26:h=Nt.memoizedState;case 5:case 27:var y=Nt;if(h?bp(h):y.stateNode.complete){Xt=0,tn=null;var T=y.sibling;if(T!==null)Nt=T;else{var N=y.return;N!==null?(Nt=N,Co(N)):Nt=null}break e}}Xt=0,tn=null,Ps(t,e,c,5);break;case 6:Xt=0,tn=null,Ps(t,e,c,6);break;case 8:Pc(),fe=6;break t;default:throw Error(r(462))}}Sb();break}catch(U){Dm(t,U)}while(!0);return Zn=Fa=null,A.H=s,A.A=o,Gt=n,Nt!==null?0:(te=null,wt=0,Zl(),fe)}function Sb(){for(;Nt!==null&&!ht();)Om(Nt)}function Om(t){var e=am(t.alternate,t,ea);t.memoizedProps=t.pendingProps,e===null?Co(t):Nt=e}function Rm(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=Jh(n,e,e.pendingProps,e.type,void 0,wt);break;case 11:e=Jh(n,e,e.pendingProps,e.type.render,e.ref,wt);break;case 5:dc(e);default:im(n,e),e=Nt=Mf(e,ea),e=am(n,e,ea)}t.memoizedProps=t.pendingProps,e===null?Co(t):Nt=e}function Ps(t,e,n,s){Zn=Fa=null,dc(e),Vs=null,Ui=0;var o=e.return;try{if(rb(t,o,e,n,wt)){fe=1,mo(t,dn(n,t.current)),Nt=null;return}}catch(c){if(o!==null)throw Nt=o,c;fe=1,mo(t,dn(n,t.current)),Nt=null;return}e.flags&32768?(Ot||s===1?t=!0:Zs||(wt&536870912)!==0?t=!1:(Sa=t=!0,(s===2||s===9||s===3||s===6)&&(s=$e.current,s!==null&&s.tag===13&&(s.flags|=16384))),Bm(e,t)):Co(e)}function Co(t){var e=t;do{if((e.flags&32768)!==0){Bm(e,Sa);return}t=e.return;var n=db(e.alternate,e,ea);if(n!==null){Nt=n;return}if(e=e.sibling,e!==null){Nt=e;return}Nt=e=t}while(e!==null);fe===0&&(fe=5)}function Bm(t,e){do{var n=fb(t.alternate,t);if(n!==null){n.flags&=32767,Nt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){Nt=t;return}Nt=t=n}while(t!==null);fe=6,Nt=null}function zm(t,e,n,s,o,c,h,y,T){t.cancelPendingCommit=null;do No();while(Ce!==0);if((Gt&6)!==0)throw Error(r(327));if(e!==null){if(e===t.current)throw Error(r(177));if(c=e.lanes|e.childLanes,c|=Vr,Ml(t,n,c,h,y,T),t===te&&(Nt=te=null,wt=0),Ks=e,xa=t,na=n,Xc=c,Kc=o,jm=s,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Ab(et,function(){return Gm(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||s){s=A.T,A.T=null,o=Z.p,Z.p=2,h=Gt,Gt|=4;try{hb(t,e,n)}finally{Gt=h,Z.p=o,A.T=s}}Ce=1,Um(),Vm(),Lm()}}function Um(){if(Ce===1){Ce=0;var t=xa,e=Ks,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=A.T,A.T=null;var s=Z.p;Z.p=2;var o=Gt;Gt|=4;try{vm(e,t);var c=ru,h=xf(t.containerInfo),y=c.focusedElem,T=c.selectionRange;if(h!==y&&y&&y.ownerDocument&&Tf(y.ownerDocument.documentElement,y)){if(T!==null&&Or(y)){var N=T.start,U=T.end;if(U===void 0&&(U=N),"selectionStart"in y)y.selectionStart=N,y.selectionEnd=Math.min(U,y.value.length);else{var H=y.ownerDocument||document,k=H&&H.defaultView||window;if(k.getSelection){var M=k.getSelection(),ot=y.textContent.length,gt=Math.min(T.start,ot),Jt=T.end===void 0?gt:Math.min(T.end,ot);!M.extend&&gt>Jt&&(h=Jt,Jt=gt,gt=h);var E=_f(y,gt),j=_f(y,Jt);if(E&&j&&(M.rangeCount!==1||M.anchorNode!==E.node||M.anchorOffset!==E.offset||M.focusNode!==j.node||M.focusOffset!==j.offset)){var C=H.createRange();C.setStart(E.node,E.offset),M.removeAllRanges(),gt>Jt?(M.addRange(C),M.extend(j.node,j.offset)):(C.setEnd(j.node,j.offset),M.addRange(C))}}}}for(H=[],M=y;M=M.parentNode;)M.nodeType===1&&H.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<H.length;y++){var L=H[y];L.element.scrollLeft=L.left,L.element.scrollTop=L.top}}Ho=!!ou,ru=ou=null}finally{Gt=o,Z.p=s,A.T=n}}t.current=e,Ce=2}}function Vm(){if(Ce===2){Ce=0;var t=xa,e=Ks,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=A.T,A.T=null;var s=Z.p;Z.p=2;var o=Gt;Gt|=4;try{fm(t,e.alternate,e)}finally{Gt=o,Z.p=s,A.T=n}}Ce=3}}function Lm(){if(Ce===4||Ce===3){Ce=0,xt();var t=xa,e=Ks,n=na,s=jm;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Ce=5:(Ce=0,Ks=xa=null,Hm(t,t.pendingLanes));var o=t.pendingLanes;if(o===0&&(Ta=null),ps(n),e=e.stateNode,J&&typeof J.onCommitFiberRoot=="function")try{J.onCommitFiberRoot(Ln,e,void 0,(e.current.flags&128)===128)}catch{}if(s!==null){e=A.T,o=Z.p,Z.p=2,A.T=null;try{for(var c=t.onRecoverableError,h=0;h<s.length;h++){var y=s[h];c(y.value,{componentStack:y.stack})}}finally{A.T=e,Z.p=o}}(na&3)!==0&&No(),On(t),o=t.pendingLanes,(n&261930)!==0&&(o&42)!==0?t===Qc?tl++:(tl=0,Qc=t):tl=0,el(0)}}function Hm(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Bi(e)))}function No(){return Um(),Vm(),Lm(),Gm()}function Gm(){if(Ce!==5)return!1;var t=xa,e=Xc;Xc=0;var n=ps(na),s=A.T,o=Z.p;try{Z.p=32>n?32:n,A.T=null,n=Kc,Kc=null;var c=xa,h=na;if(Ce=0,Ks=xa=null,na=0,(Gt&6)!==0)throw Error(r(331));var y=Gt;if(Gt|=4,Tm(c.current),bm(c,c.current,h,n),Gt=y,el(0,!1),J&&typeof J.onPostCommitFiberRoot=="function")try{J.onPostCommitFiberRoot(Ln,c)}catch{}return!0}finally{Z.p=o,A.T=s,Hm(t,e)}}function qm(t,e,n){e=dn(n,e),e=Ec(t.stateNode,e,2),t=ga(t,e,2),t!==null&&(ra(t,2),On(t))}function Kt(t,e,n){if(t.tag===3)qm(t,t,n);else for(;e!==null;){if(e.tag===3){qm(e,t,n);break}else if(e.tag===1){var s=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ta===null||!Ta.has(s))){t=dn(n,t),n=Ih(2),s=ga(e,n,2),s!==null&&(Yh(n,s,e,t),ra(s,2),On(s));break}}e=e.return}}function Jc(t,e,n){var s=t.pingCache;if(s===null){s=t.pingCache=new gb;var o=new Set;s.set(e,o)}else o=s.get(e),o===void 0&&(o=new Set,s.set(e,o));o.has(n)||(Ic=!0,o.add(n),t=_b.bind(null,t,e,n),e.then(t,t))}function _b(t,e,n){var s=t.pingCache;s!==null&&s.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,te===t&&(wt&n)===n&&(fe===4||fe===3&&(wt&62914560)===wt&&300>Ht()-To?(Gt&2)===0&&Qs(t,0):Yc|=n,Xs===wt&&(Xs=0)),On(t)}function Im(t,e){e===0&&(e=gi()),t=Ka(t,e),t!==null&&(ra(t,e),On(t))}function Tb(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Im(t,n)}function xb(t,e){var n=0;switch(t.tag){case 31:case 13:var s=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(e),Im(t,n)}function Ab(t,e){return ut(t,e)}var Do=null,Fs=null,$c=!1,ko=!1,Wc=!1,ja=0;function On(t){t!==Fs&&t.next===null&&(Fs===null?Do=Fs=t:Fs=Fs.next=t),ko=!0,$c||($c=!0,Eb())}function el(t,e){if(!Wc&&ko){Wc=!0;do for(var n=!1,s=Do;s!==null;){if(t!==0){var o=s.pendingLanes;if(o===0)var c=0;else{var h=s.suspendedLanes,y=s.pingedLanes;c=(1<<31-Bt(42|t)+1)-1,c&=o&~(h&~y),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Km(s,c))}else c=wt,c=qa(s,s===te?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||oa(s,c)||(n=!0,Km(s,c));s=s.next}while(n);Wc=!1}}function jb(){Ym()}function Ym(){ko=$c=!1;var t=0;ja!==0&&zb()&&(t=ja);for(var e=Ht(),n=null,s=Do;s!==null;){var o=s.next,c=Zm(s,e);c===0?(s.next=null,n===null?Do=o:n.next=o,o===null&&(Fs=n)):(n=s,(t!==0||(c&3)!==0)&&(ko=!0)),s=o}Ce!==0&&Ce!==5||el(t),ja!==0&&(ja=0)}function Zm(t,e){for(var n=t.suspendedLanes,s=t.pingedLanes,o=t.expirationTimes,c=t.pendingLanes&-62914561;0<c;){var h=31-Bt(c),y=1<<h,T=o[h];T===-1?((y&n)===0||(y&s)!==0)&&(o[h]=wl(y,e)):T<=e&&(t.expiredLanes|=y),c&=~y}if(e=te,n=wt,n=qa(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,n===0||t===e&&(Xt===2||Xt===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&pt(s),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||oa(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(s!==null&&pt(s),ps(n)){case 2:case 8:n=It;break;case 32:n=et;break;case 268435456:n=Ee;break;default:n=et}return s=Xm.bind(null,t),n=ut(n,s),t.callbackPriority=e,t.callbackNode=n,e}return s!==null&&s!==null&&pt(s),t.callbackPriority=2,t.callbackNode=null,2}function Xm(t,e){if(Ce!==0&&Ce!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(No()&&t.callbackNode!==n)return null;var s=wt;return s=qa(t,t===te?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(Cm(t,s,e),Zm(t,Ht()),t.callbackNode!=null&&t.callbackNode===n?Xm.bind(null,t):null)}function Km(t,e){if(No())return null;Cm(t,e,!0)}function Eb(){Vb(function(){(Gt&6)!==0?ut(st,jb):Ym()})}function tu(){if(ja===0){var t=Bs;t===0&&(t=Sn,Sn<<=1,(Sn&261888)===0&&(Sn=256)),ja=t}return ja}function Qm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ul(""+t)}function Pm(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function Cb(t,e,n,s,o){if(e==="submit"&&n&&n.stateNode===o){var c=Qm((o[_t]||null).action),h=s.submitter;h&&(e=(e=h[_t]||null)?Qm(e.formAction):h.getAttribute("formAction"),e!==null&&(c=e,h=null));var y=new Gl("action","action",null,s,o);t.push({event:y,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ja!==0){var T=h?Pm(o,h):new FormData(o);Sc(n,{pending:!0,data:T,method:o.method,action:c},null,T)}}else typeof c=="function"&&(y.preventDefault(),T=h?Pm(o,h):new FormData(o),Sc(n,{pending:!0,data:T,method:o.method,action:c},c,T))},currentTarget:o}]})}}for(var eu=0;eu<Ur.length;eu++){var nu=Ur[eu],Nb=nu.toLowerCase(),Db=nu[0].toUpperCase()+nu.slice(1);Tn(Nb,"on"+Db)}Tn(Ef,"onAnimationEnd"),Tn(Cf,"onAnimationIteration"),Tn(Nf,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(Zy,"onTransitionRun"),Tn(Xy,"onTransitionStart"),Tn(Ky,"onTransitionCancel"),Tn(Df,"onTransitionEnd"),_s("onMouseEnter",["mouseout","mouseover"]),_s("onMouseLeave",["mouseout","mouseover"]),_s("onPointerEnter",["pointerout","pointerover"]),_s("onPointerLeave",["pointerout","pointerover"]),Ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nl="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(" "),kb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(nl));function Fm(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var s=t[n],o=s.event;s=s.listeners;t:{var c=void 0;if(e)for(var h=s.length-1;0<=h;h--){var y=s[h],T=y.instance,N=y.currentTarget;if(y=y.listener,T!==c&&o.isPropagationStopped())break t;c=y,o.currentTarget=N;try{c(o)}catch(U){Yl(U)}o.currentTarget=null,c=T}else for(h=0;h<s.length;h++){if(y=s[h],T=y.instance,N=y.currentTarget,y=y.listener,T!==c&&o.isPropagationStopped())break t;c=y,o.currentTarget=N;try{c(o)}catch(U){Yl(U)}o.currentTarget=null,c=T}}}}function Dt(t,e){var n=e[Wt];n===void 0&&(n=e[Wt]=new Set);var s=t+"__bubble";n.has(s)||(Jm(e,t,2,!1),n.add(s))}function au(t,e,n){var s=0;e&&(s|=4),Jm(n,t,s,e)}var wo="_reactListening"+Math.random().toString(36).slice(2);function su(t){if(!t[wo]){t[wo]=!0,Id.forEach(function(n){n!=="selectionchange"&&(kb.has(n)||au(n,!1,t),au(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[wo]||(e[wo]=!0,au("selectionchange",!1,e))}}function Jm(t,e,n,s){switch(Ep(e)){case 2:var o=sS;break;case 8:o=iS;break;default:o=bu}n=o.bind(null,e,n,t),o=void 0,!Ar||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(o=!0),s?o!==void 0?t.addEventListener(e,n,{capture:!0,passive:o}):t.addEventListener(e,n,!0):o!==void 0?t.addEventListener(e,n,{passive:o}):t.addEventListener(e,n,!1)}function iu(t,e,n,s,o){var c=s;if((e&1)===0&&(e&2)===0&&s!==null)t:for(;;){if(s===null)return;var h=s.tag;if(h===3||h===4){var y=s.stateNode.containerInfo;if(y===o)break;if(h===4)for(h=s.return;h!==null;){var T=h.tag;if((T===3||T===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;y!==null;){if(h=ys(y),h===null)return;if(T=h.tag,T===5||T===6||T===26||T===27){s=c=h;continue t}y=y.parentNode}}s=s.return}ef(function(){var N=c,U=Tr(n),H=[];t:{var k=kf.get(t);if(k!==void 0){var M=Gl,ot=t;switch(t){case"keypress":if(Ll(n)===0)break t;case"keydown":case"keyup":M=xy;break;case"focusin":ot="focus",M=Nr;break;case"focusout":ot="blur",M=Nr;break;case"beforeblur":case"afterblur":M=Nr;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=sf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=dy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Ey;break;case Ef:case Cf:case Nf:M=my;break;case Df:M=Ny;break;case"scroll":case"scrollend":M=cy;break;case"wheel":M=ky;break;case"copy":case"cut":case"paste":M=gy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=of;break;case"toggle":case"beforetoggle":M=My}var gt=(e&4)!==0,Jt=!gt&&(t==="scroll"||t==="scrollend"),E=gt?k!==null?k+"Capture":null:k;gt=[];for(var j=N,C;j!==null;){var L=j;if(C=L.stateNode,L=L.tag,L!==5&&L!==26&&L!==27||C===null||E===null||(L=Ai(j,E),L!=null&&gt.push(al(j,L,C))),Jt)break;j=j.return}0<gt.length&&(k=new M(k,ot,null,n,U),H.push({event:k,listeners:gt}))}}if((e&7)===0){t:{if(k=t==="mouseover"||t==="pointerover",M=t==="mouseout"||t==="pointerout",k&&n!==_r&&(ot=n.relatedTarget||n.fromElement)&&(ys(ot)||ot[kt]))break t;if((M||k)&&(k=U.window===U?U:(k=U.ownerDocument)?k.defaultView||k.parentWindow:window,M?(ot=n.relatedTarget||n.toElement,M=N,ot=ot?ys(ot):null,ot!==null&&(Jt=f(ot),gt=ot.tag,ot!==Jt||gt!==5&&gt!==27&&gt!==6)&&(ot=null)):(M=null,ot=N),M!==ot)){if(gt=sf,L="onMouseLeave",E="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(gt=of,L="onPointerLeave",E="onPointerEnter",j="pointer"),Jt=M==null?k:xi(M),C=ot==null?k:xi(ot),k=new gt(L,j+"leave",M,n,U),k.target=Jt,k.relatedTarget=C,L=null,ys(U)===N&&(gt=new gt(E,j+"enter",ot,n,U),gt.target=C,gt.relatedTarget=Jt,L=gt),Jt=L,M&&ot)e:{for(gt=wb,E=M,j=ot,C=0,L=E;L;L=gt(L))C++;L=0;for(var ft=j;ft;ft=gt(ft))L++;for(;0<C-L;)E=gt(E),C--;for(;0<L-C;)j=gt(j),L--;for(;C--;){if(E===j||j!==null&&E===j.alternate){gt=E;break e}E=gt(E),j=gt(j)}gt=null}else gt=null;M!==null&&$m(H,k,M,gt,!1),ot!==null&&Jt!==null&&$m(H,Jt,ot,gt,!0)}}t:{if(k=N?xi(N):window,M=k.nodeName&&k.nodeName.toLowerCase(),M==="select"||M==="input"&&k.type==="file")var Ut=pf;else if(hf(k))if(gf)Ut=qy;else{Ut=Hy;var ct=Ly}else M=k.nodeName,!M||M.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?N&&Sr(N.elementType)&&(Ut=pf):Ut=Gy;if(Ut&&(Ut=Ut(t,N))){mf(H,Ut,n,U);break t}ct&&ct(t,k,N),t==="focusout"&&N&&k.type==="number"&&N.memoizedProps.value!=null&&br(k,"number",k.value)}switch(ct=N?xi(N):window,t){case"focusin":(hf(ct)||ct.contentEditable==="true")&&(Cs=ct,Rr=N,Mi=null);break;case"focusout":Mi=Rr=Cs=null;break;case"mousedown":Br=!0;break;case"contextmenu":case"mouseup":case"dragend":Br=!1,Af(H,n,U);break;case"selectionchange":if(Yy)break;case"keydown":case"keyup":Af(H,n,U)}var At;if(kr)t:{switch(t){case"compositionstart":var Mt="onCompositionStart";break t;case"compositionend":Mt="onCompositionEnd";break t;case"compositionupdate":Mt="onCompositionUpdate";break t}Mt=void 0}else Es?df(t,n)&&(Mt="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(Mt="onCompositionStart");Mt&&(rf&&n.locale!=="ko"&&(Es||Mt!=="onCompositionStart"?Mt==="onCompositionEnd"&&Es&&(At=nf()):(ca=U,jr="value"in ca?ca.value:ca.textContent,Es=!0)),ct=Mo(N,Mt),0<ct.length&&(Mt=new lf(Mt,t,null,n,U),H.push({event:Mt,listeners:ct}),At?Mt.data=At:(At=ff(n),At!==null&&(Mt.data=At)))),(At=Ry?By(t,n):zy(t,n))&&(Mt=Mo(N,"onBeforeInput"),0<Mt.length&&(ct=new lf("onBeforeInput","beforeinput",null,n,U),H.push({event:ct,listeners:Mt}),ct.data=At)),Cb(H,t,N,n,U)}Fm(H,e)})}function al(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Mo(t,e){for(var n=e+"Capture",s=[];t!==null;){var o=t,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=Ai(t,n),o!=null&&s.unshift(al(t,o,c)),o=Ai(t,e),o!=null&&s.push(al(t,o,c))),t.tag===3)return s;t=t.return}return[]}function wb(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function $m(t,e,n,s,o){for(var c=e._reactName,h=[];n!==null&&n!==s;){var y=n,T=y.alternate,N=y.stateNode;if(y=y.tag,T!==null&&T===s)break;y!==5&&y!==26&&y!==27||N===null||(T=N,o?(N=Ai(n,c),N!=null&&h.unshift(al(n,N,T))):o||(N=Ai(n,c),N!=null&&h.push(al(n,N,T)))),n=n.return}h.length!==0&&t.push({event:e,listeners:h})}var Mb=/\r\n?/g,Ob=/\u0000|\uFFFD/g;function Wm(t){return(typeof t=="string"?t:""+t).replace(Mb,`
25
+ `).replace(Ob,"")}function tp(t,e){return e=Wm(e),Wm(t)===e}function Ft(t,e,n,s,o,c){switch(n){case"children":typeof s=="string"?e==="body"||e==="textarea"&&s===""||xs(t,s):(typeof s=="number"||typeof s=="bigint")&&e!=="body"&&xs(t,""+s);break;case"className":Bl(t,"class",s);break;case"tabIndex":Bl(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Bl(t,n,s);break;case"style":Wd(t,s,c);break;case"data":if(e!=="object"){Bl(t,"data",s);break}case"src":case"href":if(s===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=Ul(""+s),t.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(n,"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 c=="function"&&(n==="formAction"?(e!=="input"&&Ft(t,e,"name",o.name,o,null),Ft(t,e,"formEncType",o.formEncType,o,null),Ft(t,e,"formMethod",o.formMethod,o,null),Ft(t,e,"formTarget",o.formTarget,o,null)):(Ft(t,e,"encType",o.encType,o,null),Ft(t,e,"method",o.method,o,null),Ft(t,e,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=Ul(""+s),t.setAttribute(n,s);break;case"onClick":s!=null&&(t.onclick=Gn);break;case"onScroll":s!=null&&Dt("scroll",t);break;case"onScrollEnd":s!=null&&Dt("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(r(60));t.innerHTML=n}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}n=Ul(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""+s):t.removeAttribute(n);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":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":s===!0?t.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,s):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(n,s):t.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(n):t.setAttribute(n,s);break;case"popover":Dt("beforetoggle",t),Dt("toggle",t),Rl(t,"popover",s);break;case"xlinkActuate":Hn(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Hn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Hn(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Hn(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Hn(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Hn(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Hn(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Hn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Hn(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Rl(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=oy.get(n)||n,Rl(t,n,s))}}function lu(t,e,n,s,o,c){switch(n){case"style":Wd(t,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(r(60));t.innerHTML=n}}break;case"children":typeof s=="string"?xs(t,s):(typeof s=="number"||typeof s=="bigint")&&xs(t,""+s);break;case"onScroll":s!=null&&Dt("scroll",t);break;case"onScrollEnd":s!=null&&Dt("scrollend",t);break;case"onClick":s!=null&&(t.onclick=Gn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yd.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),e=n.slice(2,o?n.length-7:void 0),c=t[_t]||null,c=c!=null?c[n]:null,typeof c=="function"&&t.removeEventListener(e,c,o),typeof s=="function")){typeof c!="function"&&c!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,s,o);break t}n in t?t[n]=s:s===!0?t.setAttribute(n,""):Rl(t,n,s)}}}function Be(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Dt("error",t),Dt("load",t);var s=!1,o=!1,c;for(c in n)if(n.hasOwnProperty(c)){var h=n[c];if(h!=null)switch(c){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Ft(t,e,c,h,n,null)}}o&&Ft(t,e,"srcSet",n.srcSet,n,null),s&&Ft(t,e,"src",n.src,n,null);return;case"input":Dt("invalid",t);var y=c=h=o=null,T=null,N=null;for(s in n)if(n.hasOwnProperty(s)){var U=n[s];if(U!=null)switch(s){case"name":o=U;break;case"type":h=U;break;case"checked":T=U;break;case"defaultChecked":N=U;break;case"value":c=U;break;case"defaultValue":y=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,e));break;default:Ft(t,e,s,U,n,null)}}Pd(t,c,y,T,N,h,o,!1);return;case"select":Dt("invalid",t),s=h=c=null;for(o in n)if(n.hasOwnProperty(o)&&(y=n[o],y!=null))switch(o){case"value":c=y;break;case"defaultValue":h=y;break;case"multiple":s=y;default:Ft(t,e,o,y,n,null)}e=c,n=h,t.multiple=!!s,e!=null?Ts(t,!!s,e,!1):n!=null&&Ts(t,!!s,n,!0);return;case"textarea":Dt("invalid",t),c=o=s=null;for(h in n)if(n.hasOwnProperty(h)&&(y=n[h],y!=null))switch(h){case"value":s=y;break;case"defaultValue":o=y;break;case"children":c=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:Ft(t,e,h,y,n,null)}Jd(t,s,o,c);return;case"option":for(T in n)if(n.hasOwnProperty(T)&&(s=n[T],s!=null))switch(T){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ft(t,e,T,s,n,null)}return;case"dialog":Dt("beforetoggle",t),Dt("toggle",t),Dt("cancel",t),Dt("close",t);break;case"iframe":case"object":Dt("load",t);break;case"video":case"audio":for(s=0;s<nl.length;s++)Dt(nl[s],t);break;case"image":Dt("error",t),Dt("load",t);break;case"details":Dt("toggle",t);break;case"embed":case"source":case"link":Dt("error",t),Dt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(N in n)if(n.hasOwnProperty(N)&&(s=n[N],s!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Ft(t,e,N,s,n,null)}return;default:if(Sr(e)){for(U in n)n.hasOwnProperty(U)&&(s=n[U],s!==void 0&&lu(t,e,U,s,n,void 0));return}}for(y in n)n.hasOwnProperty(y)&&(s=n[y],s!=null&&Ft(t,e,y,s,n,null))}function Rb(t,e,n,s){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,h=null,y=null,T=null,N=null,U=null;for(M in n){var H=n[M];if(n.hasOwnProperty(M)&&H!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":T=H;default:s.hasOwnProperty(M)||Ft(t,e,M,null,s,H)}}for(var k in s){var M=s[k];if(H=n[k],s.hasOwnProperty(k)&&(M!=null||H!=null))switch(k){case"type":c=M;break;case"name":o=M;break;case"checked":N=M;break;case"defaultChecked":U=M;break;case"value":h=M;break;case"defaultValue":y=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,e));break;default:M!==H&&Ft(t,e,k,M,s,H)}}yr(t,h,y,T,N,U,c,o);return;case"select":M=h=y=k=null;for(c in n)if(T=n[c],n.hasOwnProperty(c)&&T!=null)switch(c){case"value":break;case"multiple":M=T;default:s.hasOwnProperty(c)||Ft(t,e,c,null,s,T)}for(o in s)if(c=s[o],T=n[o],s.hasOwnProperty(o)&&(c!=null||T!=null))switch(o){case"value":k=c;break;case"defaultValue":y=c;break;case"multiple":h=c;default:c!==T&&Ft(t,e,o,c,s,T)}e=y,n=h,s=M,k!=null?Ts(t,!!n,k,!1):!!s!=!!n&&(e!=null?Ts(t,!!n,e,!0):Ts(t,!!n,n?[]:"",!1));return;case"textarea":M=k=null;for(y in n)if(o=n[y],n.hasOwnProperty(y)&&o!=null&&!s.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Ft(t,e,y,null,s,o)}for(h in s)if(o=s[h],c=n[h],s.hasOwnProperty(h)&&(o!=null||c!=null))switch(h){case"value":k=o;break;case"defaultValue":M=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Ft(t,e,h,o,s,c)}Fd(t,k,M);return;case"option":for(var ot in n)if(k=n[ot],n.hasOwnProperty(ot)&&k!=null&&!s.hasOwnProperty(ot))switch(ot){case"selected":t.selected=!1;break;default:Ft(t,e,ot,null,s,k)}for(T in s)if(k=s[T],M=n[T],s.hasOwnProperty(T)&&k!==M&&(k!=null||M!=null))switch(T){case"selected":t.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:Ft(t,e,T,k,s,M)}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 gt in n)k=n[gt],n.hasOwnProperty(gt)&&k!=null&&!s.hasOwnProperty(gt)&&Ft(t,e,gt,null,s,k);for(N in s)if(k=s[N],M=n[N],s.hasOwnProperty(N)&&k!==M&&(k!=null||M!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,e));break;default:Ft(t,e,N,k,s,M)}return;default:if(Sr(e)){for(var Jt in n)k=n[Jt],n.hasOwnProperty(Jt)&&k!==void 0&&!s.hasOwnProperty(Jt)&&lu(t,e,Jt,void 0,s,k);for(U in s)k=s[U],M=n[U],!s.hasOwnProperty(U)||k===M||k===void 0&&M===void 0||lu(t,e,U,k,s,M);return}}for(var E in n)k=n[E],n.hasOwnProperty(E)&&k!=null&&!s.hasOwnProperty(E)&&Ft(t,e,E,null,s,k);for(H in s)k=s[H],M=n[H],!s.hasOwnProperty(H)||k===M||k==null&&M==null||Ft(t,e,H,k,s,M)}function ep(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Bb(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var o=n[s],c=o.transferSize,h=o.initiatorType,y=o.duration;if(c&&y&&ep(h)){for(h=0,y=o.responseEnd,s+=1;s<n.length;s++){var T=n[s],N=T.startTime;if(N>y)break;var U=T.transferSize,H=T.initiatorType;U&&ep(H)&&(T=T.responseEnd,h+=U*(T<y?1:(y-N)/(T-N)))}if(--s,e+=8*(c+h)/(o.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var ou=null,ru=null;function Oo(t){return t.nodeType===9?t:t.ownerDocument}function np(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ap(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function cu(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var uu=null;function zb(){var t=window.event;return t&&t.type==="popstate"?t===uu?!1:(uu=t,!0):(uu=null,!1)}var sp=typeof setTimeout=="function"?setTimeout:void 0,Ub=typeof clearTimeout=="function"?clearTimeout:void 0,ip=typeof Promise=="function"?Promise:void 0,Vb=typeof queueMicrotask=="function"?queueMicrotask:typeof ip<"u"?function(t){return ip.resolve(null).then(t).catch(Lb)}:sp;function Lb(t){setTimeout(function(){throw t})}function Ea(t){return t==="head"}function lp(t,e){var n=e,s=0;do{var o=n.nextSibling;if(t.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(s===0){t.removeChild(o),ti(e);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")sl(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,sl(n);for(var c=n.firstChild;c;){var h=c.nextSibling,y=c.nodeName;c[Ti]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=h}}else n==="body"&&sl(t.ownerDocument.body);n=o}while(n);ti(e)}function op(t,e){var n=t;t=0;do{var s=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=s}while(n)}function du(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":du(n),gr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function Hb(t,e,n,s){for(;t.nodeType===1;){var o=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[Ti])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(c=t.getAttribute("rel"),c==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(c!==o.rel||t.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||t.getAttribute("title")!==(o.title==null?null:o.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(c=t.getAttribute("src"),(c!==(o.src==null?null:o.src)||t.getAttribute("type")!==(o.type==null?null:o.type)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&t.getAttribute("name")===c)return t}else return t;if(t=gn(t.nextSibling),t===null)break}return null}function Gb(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=gn(t.nextSibling),t===null))return null;return t}function rp(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=gn(t.nextSibling),t===null))return null;return t}function fu(t){return t.data==="$?"||t.data==="$~"}function hu(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function qb(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var s=function(){e(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function gn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var mu=null;function cp(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return gn(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function up(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function dp(t,e,n){switch(e=Oo(n),t){case"html":if(t=e.documentElement,!t)throw Error(r(452));return t;case"head":if(t=e.head,!t)throw Error(r(453));return t;case"body":if(t=e.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function sl(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);gr(t)}var vn=new Map,fp=new Set;function Ro(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var aa=Z.d;Z.d={f:Ib,r:Yb,D:Zb,C:Xb,L:Kb,m:Qb,X:Fb,S:Pb,M:Jb};function Ib(){var t=aa.f(),e=jo();return t||e}function Yb(t){var e=bs(t);e!==null&&e.tag===5&&e.type==="form"?Dh(e):aa.r(t)}var Js=typeof document>"u"?null:document;function hp(t,e,n){var s=Js;if(s&&typeof e=="string"&&e){var o=cn(e);o='link[rel="'+t+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),fp.has(o)||(fp.add(o),t={rel:t,crossOrigin:n,href:e},s.querySelector(o)===null&&(e=s.createElement("link"),Be(e,"link",t),De(e),s.head.appendChild(e)))}}function Zb(t){aa.D(t),hp("dns-prefetch",t,null)}function Xb(t,e){aa.C(t,e),hp("preconnect",t,e)}function Kb(t,e,n){aa.L(t,e,n);var s=Js;if(s&&t&&e){var o='link[rel="preload"][as="'+cn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+cn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+cn(n.imageSizes)+'"]')):o+='[href="'+cn(t)+'"]';var c=o;switch(e){case"style":c=$s(t);break;case"script":c=Ws(t)}vn.has(c)||(t=S({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),vn.set(c,t),s.querySelector(o)!==null||e==="style"&&s.querySelector(il(c))||e==="script"&&s.querySelector(ll(c))||(e=s.createElement("link"),Be(e,"link",t),De(e),s.head.appendChild(e)))}}function Qb(t,e){aa.m(t,e);var n=Js;if(n&&t){var s=e&&typeof e.as=="string"?e.as:"script",o='link[rel="modulepreload"][as="'+cn(s)+'"][href="'+cn(t)+'"]',c=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ws(t)}if(!vn.has(c)&&(t=S({rel:"modulepreload",href:t},e),vn.set(c,t),n.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ll(c)))return}s=n.createElement("link"),Be(s,"link",t),De(s),n.head.appendChild(s)}}}function Pb(t,e,n){aa.S(t,e,n);var s=Js;if(s&&t){var o=Ss(s).hoistableStyles,c=$s(t);e=e||"default";var h=o.get(c);if(!h){var y={loading:0,preload:null};if(h=s.querySelector(il(c)))y.loading=5;else{t=S({rel:"stylesheet",href:t,"data-precedence":e},n),(n=vn.get(c))&&pu(t,n);var T=h=s.createElement("link");De(T),Be(T,"link",t),T._p=new Promise(function(N,U){T.onload=N,T.onerror=U}),T.addEventListener("load",function(){y.loading|=1}),T.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Bo(h,e,s)}h={type:"stylesheet",instance:h,count:1,state:y},o.set(c,h)}}}function Fb(t,e){aa.X(t,e);var n=Js;if(n&&t){var s=Ss(n).hoistableScripts,o=Ws(t),c=s.get(o);c||(c=n.querySelector(ll(o)),c||(t=S({src:t,async:!0},e),(e=vn.get(o))&&gu(t,e),c=n.createElement("script"),De(c),Be(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function Jb(t,e){aa.M(t,e);var n=Js;if(n&&t){var s=Ss(n).hoistableScripts,o=Ws(t),c=s.get(o);c||(c=n.querySelector(ll(o)),c||(t=S({src:t,async:!0,type:"module"},e),(e=vn.get(o))&&gu(t,e),c=n.createElement("script"),De(c),Be(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(o,c))}}function mp(t,e,n,s){var o=(o=_e.current)?Ro(o):null;if(!o)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=$s(n.href),n=Ss(o).hoistableStyles,s=n.get(e),s||(s={type:"style",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=$s(n.href);var c=Ss(o).hoistableStyles,h=c.get(t);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(t,h),(c=o.querySelector(il(t)))&&!c._p&&(h.instance=c,h.state.loading=5),vn.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vn.set(t,n),c||$b(o,t,n,h.state))),e&&s===null)throw Error(r(528,""));return h}if(e&&s!==null)throw Error(r(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Ws(n),n=Ss(o).hoistableScripts,s=n.get(e),s||(s={type:"script",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function $s(t){return'href="'+cn(t)+'"'}function il(t){return'link[rel="stylesheet"]['+t+"]"}function pp(t){return S({},t,{"data-precedence":t.precedence,precedence:null})}function $b(t,e,n,s){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?s.loading=1:(e=t.createElement("link"),s.preload=e,e.addEventListener("load",function(){return s.loading|=1}),e.addEventListener("error",function(){return s.loading|=2}),Be(e,"link",n),De(e),t.head.appendChild(e))}function Ws(t){return'[src="'+cn(t)+'"]'}function ll(t){return"script[async]"+t}function gp(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var s=t.querySelector('style[data-href~="'+cn(n.href)+'"]');if(s)return e.instance=s,De(s),s;var o=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),De(s),Be(s,"style",o),Bo(s,n.precedence,t),e.instance=s;case"stylesheet":o=$s(n.href);var c=t.querySelector(il(o));if(c)return e.state.loading|=4,e.instance=c,De(c),c;s=pp(n),(o=vn.get(o))&&pu(s,o),c=(t.ownerDocument||t).createElement("link"),De(c);var h=c;return h._p=new Promise(function(y,T){h.onload=y,h.onerror=T}),Be(c,"link",s),e.state.loading|=4,Bo(c,n.precedence,t),e.instance=c;case"script":return c=Ws(n.src),(o=t.querySelector(ll(c)))?(e.instance=o,De(o),o):(s=n,(o=vn.get(c))&&(s=S({},n),gu(s,o)),t=t.ownerDocument||t,o=t.createElement("script"),De(o),Be(o,"link",s),t.head.appendChild(o),e.instance=o);case"void":return null;default:throw Error(r(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(s=e.instance,e.state.loading|=4,Bo(s,n.precedence,t));return e.instance}function Bo(t,e,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,c=o,h=0;h<s.length;h++){var y=s[h];if(y.dataset.precedence===e)c=y;else if(c!==o)break}c?c.parentNode.insertBefore(t,c.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function pu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function gu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var zo=null;function vp(t,e,n){if(zo===null){var s=new Map,o=zo=new Map;o.set(n,s)}else o=zo,s=o.get(n),s||(s=new Map,o.set(n,s));if(s.has(t))return s;for(s.set(t,null),n=n.getElementsByTagName(t),o=0;o<n.length;o++){var c=n[o];if(!(c[Ti]||c[$]||t==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var h=c.getAttribute(e)||"";h=t+h;var y=s.get(h);y?y.push(c):s.set(h,[c])}}return s}function yp(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function Wb(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function bp(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function tS(t,e,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=$s(s.href),c=e.querySelector(il(o));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Uo.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=c,De(c);return}c=e.ownerDocument||e,s=pp(s),(o=vn.get(o))&&pu(s,o),c=c.createElement("link"),De(c);var h=c;h._p=new Promise(function(y,T){h.onload=y,h.onerror=T}),Be(c,"link",s),n.instance=c}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=Uo.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var vu=0;function eS(t,e){return t.stylesheets&&t.count===0&&Lo(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var s=setTimeout(function(){if(t.stylesheets&&Lo(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4+e);0<t.imgBytes&&vu===0&&(vu=62500*Bb());var o=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Lo(t,t.stylesheets),t.unsuspend)){var c=t.unsuspend;t.unsuspend=null,c()}},(t.imgBytes>vu?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function Uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Vo=null;function Lo(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Vo=new Map,e.forEach(nS,t),Vo=null,Uo.call(t))}function nS(t,e){if(!(e.state.loading&4)){var n=Vo.get(t);if(n)var s=n.get(null);else{n=new Map,Vo.set(t,n);for(var o=t.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var h=o[c];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(n.set(h.dataset.precedence,h),s=h)}s&&n.set(null,s)}o=e.instance,h=o.getAttribute("data-precedence"),c=n.get(h)||s,c===s&&n.set(null,o),n.set(h,o),this.count++,s=Uo.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),c?c.parentNode.insertBefore(o,c.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(o,t.firstChild)),e.state.loading|=4}}var ol={$$typeof:R,Provider:null,Consumer:null,_currentValue:at,_currentValue2:at,_threadCount:0};function aS(t,e,n,s,o,c,h,y,T){this.tag=1,this.containerInfo=t,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=hs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hs(0),this.hiddenUpdates=hs(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function Sp(t,e,n,s,o,c,h,y,T,N,U,H){return t=new aS(t,e,n,h,T,N,U,H,y),e=1,c===!0&&(e|=24),c=Je(3,null,null,e),t.current=c,c.stateNode=t,e=Fr(),e.refCount++,t.pooledCache=e,e.refCount++,c.memoizedState={element:s,isDehydrated:n,cache:e},tc(c),t}function _p(t){return t?(t=ks,t):ks}function Tp(t,e,n,s,o,c){o=_p(o),s.context===null?s.context=o:s.pendingContext=o,s=pa(e),s.payload={element:n},c=c===void 0?null:c,c!==null&&(s.callback=c),n=ga(t,s,e),n!==null&&(Qe(n,t,e),Li(n,t,e))}function xp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function yu(t,e){xp(t,e),(t=t.alternate)&&xp(t,e)}function Ap(t){if(t.tag===13||t.tag===31){var e=Ka(t,67108864);e!==null&&Qe(e,t,67108864),yu(t,67108864)}}function jp(t){if(t.tag===13||t.tag===31){var e=nn();e=ms(e);var n=Ka(t,e);n!==null&&Qe(n,t,e),yu(t,e)}}var Ho=!0;function sS(t,e,n,s){var o=A.T;A.T=null;var c=Z.p;try{Z.p=2,bu(t,e,n,s)}finally{Z.p=c,A.T=o}}function iS(t,e,n,s){var o=A.T;A.T=null;var c=Z.p;try{Z.p=8,bu(t,e,n,s)}finally{Z.p=c,A.T=o}}function bu(t,e,n,s){if(Ho){var o=Su(s);if(o===null)iu(t,e,s,Go,n),Cp(t,s);else if(oS(o,t,e,n,s))s.stopPropagation();else if(Cp(t,s),e&4&&-1<lS.indexOf(t)){for(;o!==null;){var c=bs(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var h=Dn(c.pendingLanes);if(h!==0){var y=c;for(y.pendingLanes|=2,y.entangledLanes|=2;h;){var T=1<<31-Bt(h);y.entanglements[1]|=T,h&=~T}On(c),(Gt&6)===0&&(xo=Ht()+500,el(0))}}break;case 31:case 13:y=Ka(c,2),y!==null&&Qe(y,c,2),jo(),yu(c,2)}if(c=Su(s),c===null&&iu(t,e,s,Go,n),c===o)break;o=c}o!==null&&s.stopPropagation()}else iu(t,e,s,null,n)}}function Su(t){return t=Tr(t),_u(t)}var Go=null;function _u(t){if(Go=null,t=ys(t),t!==null){var e=f(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=d(e),t!==null)return t;t=null}else if(n===31){if(t=p(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Go=t,null}function Ep(t){switch(t){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(dt()){case st:return 2;case It:return 8;case et:case Zt:return 32;case Ee:return 268435456;default:return 32}default:return 32}}var Tu=!1,Ca=null,Na=null,Da=null,rl=new Map,cl=new Map,ka=[],lS="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 Cp(t,e){switch(t){case"focusin":case"focusout":Ca=null;break;case"dragenter":case"dragleave":Na=null;break;case"mouseover":case"mouseout":Da=null;break;case"pointerover":case"pointerout":rl.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":cl.delete(e.pointerId)}}function ul(t,e,n,s,o,c){return t===null||t.nativeEvent!==c?(t={blockedOn:e,domEventName:n,eventSystemFlags:s,nativeEvent:c,targetContainers:[o]},e!==null&&(e=bs(e),e!==null&&Ap(e)),t):(t.eventSystemFlags|=s,e=t.targetContainers,o!==null&&e.indexOf(o)===-1&&e.push(o),t)}function oS(t,e,n,s,o){switch(e){case"focusin":return Ca=ul(Ca,t,e,n,s,o),!0;case"dragenter":return Na=ul(Na,t,e,n,s,o),!0;case"mouseover":return Da=ul(Da,t,e,n,s,o),!0;case"pointerover":var c=o.pointerId;return rl.set(c,ul(rl.get(c)||null,t,e,n,s,o)),!0;case"gotpointercapture":return c=o.pointerId,cl.set(c,ul(cl.get(c)||null,t,e,n,s,o)),!0}return!1}function Np(t){var e=ys(t.target);if(e!==null){var n=f(e);if(n!==null){if(e=n.tag,e===13){if(e=d(n),e!==null){t.blockedOn=e,_i(t.priority,function(){jp(n)});return}}else if(e===31){if(e=p(n),e!==null){t.blockedOn=e,_i(t.priority,function(){jp(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function qo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Su(t.nativeEvent);if(n===null){n=t.nativeEvent;var s=new n.constructor(n.type,n);_r=s,n.target.dispatchEvent(s),_r=null}else return e=bs(n),e!==null&&Ap(e),t.blockedOn=n,!1;e.shift()}return!0}function Dp(t,e,n){qo(t)&&n.delete(e)}function rS(){Tu=!1,Ca!==null&&qo(Ca)&&(Ca=null),Na!==null&&qo(Na)&&(Na=null),Da!==null&&qo(Da)&&(Da=null),rl.forEach(Dp),cl.forEach(Dp)}function Io(t,e){t.blockedOn===e&&(t.blockedOn=null,Tu||(Tu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,rS)))}var Yo=null;function kp(t){Yo!==t&&(Yo=t,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Yo===t&&(Yo=null);for(var e=0;e<t.length;e+=3){var n=t[e],s=t[e+1],o=t[e+2];if(typeof s!="function"){if(_u(s||n)===null)continue;break}var c=bs(n);c!==null&&(t.splice(e,3),e-=3,Sc(c,{pending:!0,data:o,method:n.method,action:s},s,o))}}))}function ti(t){function e(T){return Io(T,t)}Ca!==null&&Io(Ca,t),Na!==null&&Io(Na,t),Da!==null&&Io(Da,t),rl.forEach(e),cl.forEach(e);for(var n=0;n<ka.length;n++){var s=ka[n];s.blockedOn===t&&(s.blockedOn=null)}for(;0<ka.length&&(n=ka[0],n.blockedOn===null);)Np(n),n.blockedOn===null&&ka.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var o=n[s],c=n[s+1],h=o[_t]||null;if(typeof c=="function")h||kp(n);else if(h){var y=null;if(c&&c.hasAttribute("formAction")){if(o=c,h=c[_t]||null)y=h.formAction;else if(_u(o)!==null)continue}else y=h.action;typeof y=="function"?n[s+1]=y:(n.splice(s,3),s-=3),kp(n)}}}function wp(){function t(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function e(){o!==null&&(o(),o=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),o!==null&&(o(),o=null)}}}function xu(t){this._internalRoot=t}Zo.prototype.render=xu.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(r(409));var n=e.current,s=nn();Tp(n,s,t,e,null,null)},Zo.prototype.unmount=xu.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Tp(t.current,2,null,t,null,null),jo(),e[kt]=null}};function Zo(t){this._internalRoot=t}Zo.prototype.unstable_scheduleHydration=function(t){if(t){var e=Si();t={blockedOn:null,target:t,priority:e};for(var n=0;n<ka.length&&e!==0&&e<ka[n].priority;n++);ka.splice(n,0,t),n===0&&Np(t)}};var Mp=i.version;if(Mp!=="19.2.4")throw Error(r(527,Mp,"19.2.4"));Z.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=v(e),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var cS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xo.isDisabled&&Xo.supportsFiber)try{Ln=Xo.inject(cS),J=Xo}catch{}}return dl.createRoot=function(t,e){if(!u(t))throw Error(r(299));var n=!1,s="",o=Lh,c=Hh,h=Gh;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(s=e.identifierPrefix),e.onUncaughtError!==void 0&&(o=e.onUncaughtError),e.onCaughtError!==void 0&&(c=e.onCaughtError),e.onRecoverableError!==void 0&&(h=e.onRecoverableError)),e=Sp(t,1,!1,null,null,n,s,null,o,c,h,wp),t[kt]=e.current,su(t),new xu(e)},dl.hydrateRoot=function(t,e,n){if(!u(t))throw Error(r(299));var s=!1,o="",c=Lh,h=Hh,y=Gh,T=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError),n.formState!==void 0&&(T=n.formState)),e=Sp(t,1,!0,e,n??null,s,o,T,c,h,y,wp),e.context=_p(null),n=e.current,s=nn(),s=ms(s),o=pa(s),o.callback=null,ga(n,o,s),n=s,e.current.lanes=n,ra(e,n),On(e),t[kt]=e.current,su(t),new Zo(e)},dl.version="19.2.4",dl}var Lp;function jS(){if(Lp)return Au.exports;Lp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),Au.exports=AS(),Au.exports}var ES=jS();function qe(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function vl(a,i){return console.warn(`[ws] Malformed "${a}" message: ${i}`),!1}function CS(a){return qe(a)&&typeof a.id=="string"&&typeof a.displayName=="string"&&typeof a.adapterType=="string"&&typeof a.defaultRuntime=="string"&&typeof a.status=="string"&&typeof a.bootstrapped=="boolean"}function Hp(a){return qe(a)&&typeof a.id=="string"&&typeof a.environmentId=="string"&&typeof a.runtime=="string"&&typeof a.status=="string"&&typeof a.prompt=="string"&&typeof a.startedAt=="string"&&(a.endedAt===void 0||typeof a.endedAt=="string")&&(a.error===void 0||typeof a.error=="string")}function Gp(a){return qe(a)&&typeof a.sessionId=="string"&&typeof a.eventType=="string"&&typeof a.timestamp=="string"&&typeof a.content=="string"}function NS(a){return qe(a)&&typeof a.id=="string"&&typeof a.name=="string"&&typeof a.description=="string"&&typeof a.repoUrl=="string"&&typeof a.defaultEnvironmentId=="string"&&typeof a.status=="string"&&typeof a.createdAt=="string"}function DS(a){return qe(a)&&typeof a.id=="string"&&typeof a.projectId=="string"&&typeof a.title=="string"&&typeof a.status=="string"&&typeof a.branch=="string"&&typeof a.sortOrder=="number"&&typeof a.depth=="number"&&Array.isArray(a.dependsOn)&&Array.isArray(a.childTaskIds)}function kS(a){return qe(a)&&typeof a.id=="string"&&typeof a.projectId=="string"&&typeof a.taskId=="string"&&typeof a.sessionId=="string"&&typeof a.category=="string"&&typeof a.title=="string"&&typeof a.content=="string"&&Array.isArray(a.tags)&&typeof a.createdAt=="string"}function wS(a){return qe(a)&&typeof a.name=="string"&&typeof a.tokenType=="string"&&typeof a.envVar=="string"&&typeof a.filePath=="string"&&typeof a.expiresAt=="string"}function MS(a){return qe(a)&&typeof a.environmentId=="string"&&typeof a.stage=="string"&&typeof a.message=="string"&&typeof a.progress=="number"}function OS(a){return qe(a)&&typeof a.name=="string"&&typeof a.repository=="string"&&typeof a.state=="string"&&typeof a.gitStatus=="string"}function RS(a){return qe(a)&&typeof a.id=="string"&&typeof a.name=="string"&&typeof a.description=="string"&&typeof a.systemPrompt=="string"&&typeof a.toolConfig=="string"&&typeof a.runtime=="string"&&typeof a.model=="string"&&typeof a.maxTurns=="number"&&typeof a.mcpServers=="string"&&typeof a.createdAt=="string"&&typeof a.updatedAt=="string"}function Rn(a,i,l,r){return Array.isArray(a)?a.filter((u,f)=>i(u)?!0:(vl(l,`item at index ${f} in "${r}" has unexpected shape`),!1)):(vl(l,`expected "${r}" to be an array, got ${typeof a}`),[])}function BS(a){let i;try{i=JSON.parse(a)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!qe(i)||typeof i.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",i);return}return{type:i.type,payload:qe(i.payload)?i.payload:void 0}}const zS=3e3,ei=5e3;function US(a){const i=typeof window<"u"&&window.__GRACKLE_API_KEY__||"",l=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}?token=${encodeURIComponent(i)}`:"ws://localhost:3000",r=_.useRef(void 0),[u,f]=_.useState(!1),[d,p]=_.useState([]),[g,v]=_.useState([]),[b,S]=_.useState([]),[x,D]=_.useState(0),[w,O]=_.useState(void 0),[q,z]=_.useState([]),[X,R]=_.useState([]),[K,G]=_.useState([]),[Q,W]=_.useState([]),[V,F]=_.useState({}),[rt,mt]=_.useState([]),[Et,P]=_.useState(""),[Lt,zt]=_.useState(!1),[A,Z]=_.useState([]),[at,tt]=_.useState({}),[jt,$t]=_.useState(!1),[Rt,St]=_.useState(void 0),I=_.useCallback(J=>{var Ct;((Ct=r.current)==null?void 0:Ct.readyState)===WebSocket.OPEN&&r.current.send(JSON.stringify(J))},[]);_.useEffect(()=>{let J,Ct;function Bt(){J=new WebSocket(l),r.current=J,J.onopen=()=>{f(!0),I({type:"list_environments"}),I({type:"list_sessions"}),I({type:"list_projects"}),I({type:"list_tokens"}),I({type:"list_personas"}),I({type:"subscribe_all"})},J.onmessage=le=>{var Nn,Sn,Ha,Ga,Dn,qa,oa,wl,gi,hs,ra,Ml,vi,yi,bi,ms,ps,Si,_i,_n;if(typeof le.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const vt=BS(le.data);if(vt)switch(vt.type){case"environments":p(Rn((Nn=vt.payload)==null?void 0:Nn.environments,CS,"environments","environments"));break;case"sessions":v(Rn((Sn=vt.payload)==null?void 0:Sn.sessions,Hp,"sessions","sessions"));break;case"session_event":{if(!Gp(vt.payload)){vl("session_event","payload is not a valid SessionEvent");break}const $=vt.payload;let _t=0;S(kt=>{const Wt=[...kt,$];return Wt.length>ei?(_t=Wt.length-ei,Wt.slice(-ei)):Wt}),_t>0&&D(kt=>kt+_t),$.eventType==="status"&&v(kt=>kt.map(Wt=>Wt.id===$.sessionId?{...Wt,status:$.content}:Wt));break}case"session_events":{const $=Rn((Ha=vt.payload)==null?void 0:Ha.events,Gp,"session_events","events"),_t=(Ga=vt.payload)==null?void 0:Ga.sessionId;if(typeof _t!="string"){vl("session_events","missing or non-string sessionId");break}if($.length>0){let kt=0;S(Wt=>{const vs=[...Wt.filter(Ol=>Ol.sessionId!==_t),...$];return vs.length>ei?(kt=vs.length-ei,vs.slice(-ei)):vs}),kt>0&&D(Wt=>Wt+kt)}break}case"spawned":{const $=(Dn=vt.payload)==null?void 0:Dn.sessionId;typeof $=="string"&&$&&O($),I({type:"list_sessions"});break}case"projects":z(Rn((qa=vt.payload)==null?void 0:qa.projects,NS,"projects","projects"));break;case"project_created":$t(!1),I({type:"list_projects"});break;case"project_archived":I({type:"list_projects"});break;case"tasks":{const $=Rn((oa=vt.payload)==null?void 0:oa.tasks,DS,"tasks","tasks"),_t=(typeof((wl=vt.payload)==null?void 0:wl.projectId)=="string"?vt.payload.projectId:"")||($.length>0?$[0].projectId:"");if(!_t){R($);break}R(kt=>[...kt.filter(Wt=>Wt.projectId!==_t),...$]);break}case"task_created":{const $=(gi=vt.payload)==null?void 0:gi.task;if(qe($)){const _t=typeof $.project_id=="string"?$.project_id:typeof $.projectId=="string"?$.projectId:"";_t&&I({type:"list_tasks",payload:{projectId:_t}})}break}case"task_started":{const $=vt.payload;if(!qe($))break;St(kt=>$.taskId&&kt===$.taskId?void 0:kt),$.sessionId&&I({type:"list_sessions"});const _t=typeof $.projectId=="string"?$.projectId:void 0;_t?I({type:"list_tasks",payload:{projectId:_t}}):$.taskId&&R(kt=>{const Wt=kt.find(gs=>gs.id===$.taskId);return Wt&&I({type:"list_tasks",payload:{projectId:Wt.projectId}}),kt});break}case"task_approved":case"task_rejected":case"task_deleted":case"task_updated":{const $=vt.payload;if(!qe($))break;const _t=typeof $.projectId=="string"?$.projectId:void 0;_t?I({type:"list_tasks",payload:{projectId:_t}}):$.taskId&&R(kt=>{const Wt=kt.find(gs=>gs.id===$.taskId);return Wt&&I({type:"list_tasks",payload:{projectId:Wt.projectId}}),kt});break}case"findings":G(Rn((hs=vt.payload)==null?void 0:hs.findings,kS,"findings","findings"));break;case"finding_posted":typeof((ra=vt.payload)==null?void 0:ra.projectId)=="string"&&I({type:"list_findings",payload:{projectId:vt.payload.projectId}});break;case"tokens":W(Rn((Ml=vt.payload)==null?void 0:Ml.tokens,wS,"tokens","tokens"));break;case"token_changed":I({type:"list_tokens"});break;case"provision_progress":{if(!MS(vt.payload)){vl("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const $=vt.payload;F(_t=>({..._t,[$.environmentId]:{stage:$.stage,message:$.message,progress:$.progress}})),$.stage==="ready"&&setTimeout(()=>{F(kt=>{const Wt={...kt};return delete Wt[$.environmentId],Wt})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((vi=vt.payload)==null?void 0:vi.environmentId)=="string"){const $=vt.payload.environmentId;p(_t=>_t.filter(kt=>kt.id!==$)),F(_t=>{const kt={..._t};return delete kt[$],kt})}I({type:"list_sessions"});break;case"codespaces_list":{const $=Rn((yi=vt.payload)==null?void 0:yi.codespaces,OS,"codespaces_list","codespaces"),_t=typeof((bi=vt.payload)==null?void 0:bi.error)=="string"?vt.payload.error:"";mt($),P(_t);break}case"codespace_created":{zt(!1),I({type:"list_codespaces"});break}case"codespace_create_error":{zt(!1);const $=typeof((ms=vt.payload)==null?void 0:ms.message)=="string"?vt.payload.message:"Failed to create codespace";P($);break}case"personas":{const $=Rn((ps=vt.payload)==null?void 0:ps.personas,RS,"personas","personas");Z($);break}case"persona_created":case"persona_updated":case"persona_deleted":I({type:"list_personas"});break;case"task_sessions":{const $=(Si=vt.payload)==null?void 0:Si.taskId;if(typeof $!="string"||!$)break;const _t=Rn((_i=vt.payload)==null?void 0:_i.sessions,Hp,"task_sessions","sessions");tt(kt=>({...kt,[$]:_t}));break}case"error":console.error("[ws]",(_n=vt.payload)==null?void 0:_n.message);break}},J.onclose=()=>{f(!1),r.current=void 0,$t(!1),St(void 0),clearTimeout(Ct),Ct=setTimeout(Bt,zS)},J.onerror=()=>{J.close()}}return Bt(),()=>{clearTimeout(Ct),J==null||J.close()}},[l,I]);const Qt=_.useCallback((J,Ct,Bt,le,vt)=>{I({type:"spawn",payload:{environmentId:J,prompt:Ct,model:Bt||"",runtime:le||"",personaId:vt||""}})},[I]),_e=_.useCallback((J,Ct)=>{I({type:"send_input",payload:{sessionId:J,text:Ct}})},[I]),ce=_.useCallback(J=>{I({type:"kill",payload:{sessionId:J}})},[I]),pe=_.useCallback(()=>{I({type:"list_environments"}),I({type:"list_sessions"}),I({type:"list_projects"}),I({type:"list_tokens"})},[I]),se=_.useCallback(J=>{I({type:"get_session_events",payload:{sessionId:J}})},[I]),Pe=_.useCallback(()=>{S([]),D(0)},[]),bt=_.useCallback((J,Ct,Bt,le)=>{$t(!0),I({type:"create_project",payload:{name:J,description:Ct||"",repoUrl:Bt||"",defaultEnvironmentId:le||""}})},[I]),ue=_.useCallback(J=>{I({type:"archive_project",payload:{projectId:J}})},[I]),Le=_.useCallback(J=>{I({type:"list_tasks",payload:{projectId:J}})},[I]),ge=_.useCallback((J,Ct,Bt,le,vt,Nn,Sn)=>{I({type:"create_task",payload:{projectId:J,title:Ct,description:Bt||"",environmentId:le||"",dependsOn:vt||[],parentTaskId:Nn||"",personaId:Sn||""}})},[I]),on=_.useCallback((J,Ct,Bt,le)=>{St(J),I({type:"start_task",payload:{taskId:J,runtime:Ct||"",model:Bt||"",personaId:le||""}})},[I]),Cn=_.useCallback(J=>{I({type:"approve_task",payload:{taskId:J}})},[I]),Y=_.useCallback((J,Ct)=>{I({type:"reject_task",payload:{taskId:J,reviewNotes:Ct}})},[I]),it=_.useCallback(J=>{I({type:"delete_task",payload:{taskId:J}})},[I]),lt=_.useCallback(J=>{I({type:"list_findings",payload:{projectId:J}})},[I]),ut=_.useCallback((J,Ct,Bt,le,vt)=>{I({type:"post_finding",payload:{projectId:J,title:Ct,content:Bt,category:le||"general",tags:vt||[]}})},[I]),pt=_.useCallback(()=>{I({type:"list_tokens"})},[I]),ht=_.useCallback((J,Ct,Bt,le,vt)=>{I({type:"set_token",payload:{name:J,value:Ct,tokenType:Bt,envVar:le,filePath:vt}})},[I]),xt=_.useCallback(J=>{I({type:"delete_token",payload:{name:J}})},[I]),Ht=_.useCallback((J,Ct,Bt,le)=>{const vt={displayName:J,adapterType:Ct,adapterConfig:Bt||{}};le&&(vt.defaultRuntime=le),I({type:"add_environment",payload:vt})},[I]),dt=_.useCallback(J=>{I({type:"provision_environment",payload:{environmentId:J}})},[I]),st=_.useCallback(J=>{I({type:"stop_environment",payload:{environmentId:J}})},[I]),It=_.useCallback(J=>{I({type:"remove_environment",payload:{environmentId:J}})},[I]),et=_.useCallback(()=>{I({type:"list_codespaces"})},[I]),Zt=_.useCallback(J=>{if(!u){P("Not connected to server. Please try again once the connection is restored.");return}zt(!0),P(""),I({type:"create_codespace",payload:{repo:J}})},[I,u]),Ee=_.useCallback((J,Ct,Bt,le,vt,Nn)=>{I({type:"create_persona",payload:{name:J,description:Ct,systemPrompt:Bt,runtime:le||"",model:vt||"",maxTurns:Nn||0}})},[I]),mi=_.useCallback((J,Ct,Bt,le,vt,Nn,Sn)=>{I({type:"update_persona",payload:{personaId:J,name:Ct||"",description:Bt||"",systemPrompt:le||"",runtime:vt||"",model:Nn||"",maxTurns:Sn||0}})},[I]),pi=_.useCallback(J=>{I({type:"delete_persona",payload:{personaId:J}})},[I]),Ln=_.useCallback(J=>{I({type:"get_task_sessions",payload:{taskId:J}})},[I]);return{connected:u,environments:d,sessions:g,events:b,eventsDropped:x,lastSpawnedId:w,projects:q,tasks:X,findings:K,tokens:Q,spawn:Qt,sendInput:_e,kill:ce,refresh:pe,loadSessionEvents:se,clearEvents:Pe,createProject:bt,archiveProject:ue,loadTasks:Le,createTask:ge,startTask:on,approveTask:Cn,rejectTask:Y,deleteTask:it,loadFindings:lt,postFinding:ut,addEnvironment:Ht,loadTokens:pt,setToken:ht,deleteToken:xt,provisionStatus:V,provisionEnvironment:dt,stopEnvironment:st,removeEnvironment:It,codespaces:rt,codespaceError:Et,codespaceCreating:Lt,listCodespaces:et,createCodespace:Zt,projectCreating:jt,taskStartingId:Rt,personas:A,createPersona:Ee,updatePersona:mi,deletePersona:pi,taskSessions:at,loadTaskSessions:Ln}}const ld=_.createContext(void 0);function VS({children:a}){const i=US();return m.jsx(ld.Provider,{value:i,children:a})}function En(){const a=_.useContext(ld);if(!a)throw new Error("useGrackle must be used within GrackleProvider");return a}const LS=[{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}],HS=[{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"}],GS=[{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"}],qS=[{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",createdAt:"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",createdAt:"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",createdAt:"2025-11-20T09:00:00Z"}],IS=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"in_progress",branch:"feat/jwt-auth",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0,personaId:"persona-arch"},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"done",branch:"feat/jwt-auth/design-token-schema",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"in_progress",branch:"feat/jwt-auth/implement-auth-middleware",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:"persona-fe"},{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:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:"persona-tester"},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"review",branch:"feat/openapi-docs",environmentId:"env-local-01",sessionId:"sess-002",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:"persona-fe"},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"done",branch:"feat/db-pool",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"LGTM — pool size and idle timeout values are sensible.",sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{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:"assigned",branch:"fix/user-list-n1",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"The fix breaks pagination — cursor should reference the joined table, not the subquery.",sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{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:"in_progress",branch:"feat/parquet-export",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0,personaId:""},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"done",branch:"feat/parquet-export/define-parquet-schema-mapping",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"done",branch:"feat/parquet-export/implement-row-group-writer",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006a"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"in_progress",branch:"feat/parquet-export/add-compression-options",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{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:"pending",branch:"",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006c"],reviewNotes:"",sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"in_progress",branch:"feat/incremental",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0,personaId:""},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"done",branch:"feat/incremental/design-watermark-storage",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{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",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-007a"],reviewNotes:"Query fails on tables without a monotonic primary key",sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"review",branch:"feat/monitoring",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""}],qp=[{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"}],YS=[{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:""}],ZS=[{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"}],XS={"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 Ne(a){return new Date(Date.now()+a).toISOString()}const Ip=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ne(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Ne(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Ne(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:Ne(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:Ne(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Ne(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ne(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Ne(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Ne(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:Ne(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:Ne(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Ne(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:Ne(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Ne(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ne(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Ne(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Ne(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:Ne(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:Ne(3500),content:"failed"}}]}],Yp=400;function KS({children:a}){const[i,l]=_.useState(HS),[r,u]=_.useState(GS),[f,d]=_.useState(void 0),[p,g]=_.useState(qS),[v,b]=_.useState(IS),[S,x]=_.useState(qp),[D,w]=_.useState(YS),[O,q]=_.useState(ZS),[z]=_.useState(XS),X=_.useRef(0),R=_.useRef(0),K=_.useRef(new Set),G=_.useRef(new Map),Q=_.useRef(v);Q.current=v;const W=_.useRef(new Map),V=_.useRef(new Map),F=_.useCallback(Y=>(X.current+=1,`mock-${Y}-${String(X.current).padStart(3,"0")}`),[]),rt=_.useCallback(()=>{const Y=Ip[R.current%Ip.length];return R.current+=1,Y},[]),mt=_.useCallback((Y,it,lt)=>{const ut=setTimeout(()=>{var pt;K.current.delete(ut),lt&&((pt=G.current.get(lt))==null||pt.delete(ut)),Y()},it);K.current.add(ut),lt&&(G.current.has(lt)||G.current.set(lt,new Set),G.current.get(lt).add(ut))},[]),Et=_.useCallback(Y=>{const it=G.current.get(Y);it&&(it.forEach(lt=>{clearTimeout(lt),K.current.delete(lt)}),G.current.delete(Y))},[]),P=_.useCallback((Y,it)=>{l(lt=>lt.map(ut=>ut.id===Y?{...ut,status:it}:ut))},[]),Lt=_.useCallback(Y=>{u(it=>[...it,Y])},[]),zt=_.useCallback((Y,it,lt)=>{it.forEach((ut,pt)=>{mt(()=>{const ht={sessionId:Y,...ut.event,timestamp:new Date().toISOString()};Lt(ht),ut.event.eventType==="status"&&P(Y,ut.event.content),pt===it.length-1&&lt&&lt()},ut.delayMs,Y)})},[mt,Lt,P]),A=_.useCallback((Y,it,lt,ut)=>{console.log("[MockGrackle] spawn",{environmentId:Y,prompt:it,runtime:ut});const pt=F("sess"),ht={id:pt,environmentId:Y,runtime:ut||"claude-code",status:"running",prompt:it,startedAt:new Date().toISOString()};l(Ht=>[...Ht,ht]),d(pt);const xt=rt();if(console.log(`[MockGrackle] Playing scenario: ${xt.label}`),xt.pauseForInput){const Ht=xt.pauseAfterStep??xt.steps.length-1,dt=xt.steps.slice(0,Ht+1),st=dt.length>0?dt[dt.length-1].delayMs:0;zt(pt,dt),mt(()=>{P(pt,"waiting_input"),Lt({sessionId:pt,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},st+Yp,pt),xt.resumeSteps&&W.current.set(pt,xt.resumeSteps)}else zt(pt,xt.steps)},[F,rt,zt,mt,P,Lt]),Z=_.useCallback(Y=>{console.log("[MockGrackle] kill",Y),Et(Y),W.current.delete(Y),P(Y,"killed"),Lt({sessionId:Y,eventType:"status",timestamp:new Date().toISOString(),content:"killed"}),b(it=>it.map(lt=>lt.sessionId===Y&&lt.status==="in_progress"?{...lt,status:"failed"}:lt))},[Et,P,Lt]),at=_.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),tt=_.useCallback(Y=>{console.log("[MockGrackle] loadSessionEvents",Y)},[]),jt=_.useCallback(()=>{console.log("[MockGrackle] clearEvents"),u([])},[]),$t=_.useCallback((Y,it,lt,ut)=>{console.log("[MockGrackle] createProject",{name:Y,description:it});const pt={id:F("proj"),name:Y,description:it||"",repoUrl:lt||"",defaultEnvironmentId:ut||"",status:"active",createdAt:new Date().toISOString()};g(ht=>[...ht,pt])},[F]),Rt=_.useCallback(Y=>{console.log("[MockGrackle] archiveProject",Y),g(it=>it.map(lt=>lt.id===Y?{...lt,status:"archived"}:lt))},[]),St=_.useCallback(Y=>{console.log("[MockGrackle] loadTasks",Y)},[]),I=_.useCallback((Y,it,lt,ut,pt,ht)=>{console.log("[MockGrackle] createTask",{projectId:Y,title:it,parentTaskId:ht}),b(xt=>{const dt=xt.filter(Zt=>Zt.projectId===Y).reduce((Zt,Ee)=>Math.max(Zt,Ee.sortOrder),0),st=ht?xt.find(Zt=>Zt.id===ht):void 0;if(ht&&!st)return console.warn("[MockGrackle] Parent task not found:",ht),xt;if(st&&!st.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",ht),xt;const It=st?st.depth+1:0,et={id:F("task"),projectId:Y,title:it,description:lt||"",status:"pending",branch:"",environmentId:ut||"",sessionId:"",dependsOn:pt||[],reviewNotes:"",sortOrder:dt+1,createdAt:new Date().toISOString(),parentTaskId:ht||"",depth:It,childTaskIds:[],canDecompose:!ht,personaId:""};return[...xt,et]})},[F]),Qt=_.useCallback((Y,it,lt)=>{var st;console.log("[MockGrackle] startTask",{taskId:Y,runtime:it});const ut=Q.current.find(It=>It.id===Y),pt=(ut==null?void 0:ut.environmentId)??"",ht=(ut==null?void 0:ut.title)??"",xt=F("sess"),Ht={id:xt,environmentId:pt||"env-local-01",runtime:it||"claude-code",status:"running",prompt:ht||Y,startedAt:new Date().toISOString()};l(It=>[...It,Ht]),b(It=>It.map(et=>et.id===Y?{...et,status:"in_progress",sessionId:xt,branch:`mock/${Y.slice(0,8)}`}:et));const dt=rt();if(console.log(`[MockGrackle] Playing task scenario: ${dt.label}`),dt.pauseForInput){const It=dt.pauseAfterStep??dt.steps.length-1,et=dt.steps.slice(0,It+1),Zt=et.length>0?et[et.length-1].delayMs:0;if(zt(xt,et),mt(()=>{P(xt,"waiting_input"),Lt({sessionId:xt,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},Zt+Yp,xt),dt.resumeSteps){const Ee=[...dt.resumeSteps];W.current.set(xt,Ee);const mi=Ee.reduce((pi,Ln)=>Math.max(pi,Ln.delayMs),0);V.current.set(xt,{taskId:Y,delayAfterResume:mi+200})}}else{const It=dt.steps.length>0?dt.steps[dt.steps.length-1].delayMs:0;zt(xt,dt.steps);const et=(st=dt.steps[dt.steps.length-1])==null?void 0:st.event.content;mt(()=>{et==="completed"?b(Zt=>Zt.map(Ee=>Ee.id===Y&&Ee.status==="in_progress"?{...Ee,status:"review"}:Ee)):et==="failed"&&b(Zt=>Zt.map(Ee=>Ee.id===Y&&Ee.status==="in_progress"?{...Ee,status:"failed"}:Ee))},It+100,xt)}},[F,rt,zt,mt,P,Lt]),_e=_.useCallback((Y,it)=>{console.log("[MockGrackle] sendInput",{sessionId:Y,text:it}),Lt({sessionId:Y,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${it}`}),P(Y,"running"),Lt({sessionId:Y,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const lt=W.current.get(Y);if(lt)W.current.delete(Y),zt(Y,lt);else{const pt=[{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"}}];zt(Y,pt)}const ut=V.current.get(Y);ut&&(V.current.delete(Y),mt(()=>{b(pt=>pt.map(ht=>ht.id===ut.taskId&&ht.status==="in_progress"?{...ht,status:"review"}:ht))},ut.delayAfterResume,Y))},[Lt,P,zt,mt]),ce=_.useCallback(Y=>{console.log("[MockGrackle] approveTask",Y),b(it=>it.map(lt=>lt.id===Y?{...lt,status:"done"}:lt))},[]),pe=_.useCallback((Y,it)=>{console.log("[MockGrackle] rejectTask",{taskId:Y,reviewNotes:it}),b(lt=>lt.map(ut=>ut.id===Y?{...ut,status:"assigned",reviewNotes:it,sessionId:""}:ut))},[]),se=_.useCallback(Y=>{console.log("[MockGrackle] deleteTask",Y),b(it=>it.filter(lt=>lt.id!==Y))},[]),Pe=_.useCallback(Y=>{console.log("[MockGrackle] loadFindings",Y),x(qp.filter(it=>it.projectId===Y))},[]),bt=_.useCallback((Y,it,lt,ut,pt)=>{console.log("[MockGrackle] postFinding",{projectId:Y,title:it});const ht={id:F("find"),projectId:Y,taskId:"",sessionId:"",category:ut||"general",title:it,content:lt,tags:pt||[],createdAt:new Date().toISOString()};x(xt=>[...xt,ht])},[F]),ue=_.useCallback((Y,it,lt,ut)=>{console.log("[MockGrackle] addEnvironment",{displayName:Y,adapterType:it,adapterConfig:lt,defaultRuntime:ut})},[]),Le=_.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),ge=_.useCallback((Y,it,lt,ut,pt)=>{console.log("[MockGrackle] setToken",{name:Y,tokenType:lt}),w(ht=>[...ht.filter(Ht=>Ht.name!==Y),{name:Y,tokenType:lt,envVar:ut,filePath:pt,expiresAt:""}])},[]),on=_.useCallback(Y=>{console.log("[MockGrackle] deleteToken",Y),w(it=>it.filter(lt=>lt.name!==Y))},[]);_.useEffect(()=>()=>{K.current.forEach(clearTimeout),K.current.clear()},[]);const Cn=_.useMemo(()=>({connected:!0,environments:LS,sessions:i,events:r,eventsDropped:0,lastSpawnedId:f,projects:p,tasks:v,findings:S,tokens:D,spawn:A,sendInput:_e,kill:Z,refresh:at,loadSessionEvents:tt,clearEvents:jt,createProject:$t,archiveProject:Rt,loadTasks:St,createTask:I,startTask:Qt,approveTask:ce,rejectTask:pe,deleteTask:se,loadFindings:Pe,postFinding:bt,addEnvironment:ue,loadTokens:Le,setToken:ge,deleteToken:on,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:O,createPersona:(Y,it,lt,ut,pt,ht)=>{console.log("[MockGrackle] createPersona",{name:Y});const xt={id:`mock-persona-${Date.now()}`,name:Y,description:it,systemPrompt:lt,toolConfig:"{}",runtime:ut??"claude-code",model:pt||"",maxTurns:ht||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};q(Ht=>[...Ht,xt])},updatePersona:(Y,it,lt,ut,pt,ht,xt)=>{console.log("[MockGrackle] updatePersona",{personaId:Y,name:it}),q(Ht=>Ht.map(dt=>dt.id!==Y?dt:{...dt,...it!==void 0?{name:it}:{},...lt!==void 0?{description:lt}:{},...ut!==void 0?{systemPrompt:ut}:{},...pt!==void 0?{runtime:pt}:{},...ht!==void 0?{model:ht}:{},...xt!==void 0?{maxTurns:xt}:{},updatedAt:new Date().toISOString()}))},deletePersona:Y=>{console.log("[MockGrackle] deletePersona",Y),q(it=>it.filter(lt=>lt.id!==Y))},taskSessions:z,loadTaskSessions:Y=>{console.log("[MockGrackle] loadTaskSessions",Y)}}),[i,r,f,p,v,S,D,O,z,A,_e,Z,at,tt,jt,$t,Rt,St,I,Qt,ce,pe,se,Pe,bt,ue,Le,ge,on]);return m.jsx(ld.Provider,{value:Cn,children:a})}const S0=_.createContext(void 0),QS=4e3;function PS({children:a}){const[i,l]=_.useState([]),r=_.useRef(0),u=_.useCallback(d=>{l(p=>p.filter(g=>g.id!==d))},[]),f=_.useCallback((d,p="info",g=QS)=>{const v=`toast-${++r.current}`;l(b=>[...b,{id:v,message:d,variant:p,duration:g}])},[]);return m.jsx(S0.Provider,{value:{toasts:i,showToast:f,dismissToast:u},children:a})}function od(){const a=_.useContext(S0);if(!a)throw new Error("useToast must be used within ToastProvider");return a}const FS="_container_ew76q_1",JS="_brand_ew76q_26",$S="_info_ew76q_34",WS="_connectionDot_ew76q_41",t1="_connected_ew76q_44",e1="_disconnected_ew76q_48",n1="_settingsButton_ew76q_52",Ma={container:FS,brand:JS,info:$S,connectionDot:WS,connected:t1,disconnected:e1,settingsButton:n1};function a1({setViewMode:a}){const{connected:i,environments:l,sessions:r}=En(),u=l.length,f=l.filter(p=>p.status==="connected").length,d=r.filter(p=>["running","waiting_input"].includes(p.status)).length;return m.jsxs("div",{className:Ma.container,children:[m.jsx("div",{className:Ma.brand,children:"Grackle"}),m.jsxs("div",{className:Ma.info,children:[m.jsxs("span",{children:[m.jsx("span",{className:`${Ma.connectionDot} ${i?Ma.connected:Ma.disconnected}`,children:"●"})," ",i?"Connected":"Disconnected"]}),m.jsxs("span",{children:[f,"/",u," env",u!==1?"s":""]}),m.jsxs("span",{children:[d," active"]}),a&&m.jsxs(m.Fragment,{children:[m.jsx("button",{className:Ma.settingsButton,onClick:()=>a({kind:"persona_management"}),title:"Personas",children:"👤"}),m.jsx("button",{className:Ma.settingsButton,onClick:()=>a({kind:"settings"}),title:"Settings",children:"⚙"})]})]})]})}const rd=_.createContext({});function cd(a){const i=_.useRef(null);return i.current===null&&(i.current=a()),i.current}const ur=_.createContext(null),ud=_.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});class s1 extends _.Component{getSnapshotBeforeUpdate(i){const l=this.props.childRef.current;if(l&&i.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=l.offsetHeight||0,r.width=l.offsetWidth||0,r.top=l.offsetTop,r.left=l.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function i1({children:a,isPresent:i}){const l=_.useId(),r=_.useRef(null),u=_.useRef({width:0,height:0,top:0,left:0}),{nonce:f}=_.useContext(ud);return _.useInsertionEffect(()=>{const{width:d,height:p,top:g,left:v}=u.current;if(i||!r.current||!d||!p)return;r.current.dataset.motionPopId=l;const b=document.createElement("style");return f&&(b.nonce=f),document.head.appendChild(b),b.sheet&&b.sheet.insertRule(`
68
+ [data-motion-pop-id="${l}"] {
69
+ position: absolute !important;
70
+ width: ${d}px !important;
71
+ height: ${p}px !important;
72
+ top: ${g}px !important;
73
+ left: ${v}px !important;
74
+ }
75
+ `),()=>{document.head.removeChild(b)}},[i]),m.jsx(s1,{isPresent:i,childRef:r,sizeRef:u,children:_.cloneElement(a,{ref:r})})}const l1=({children:a,initial:i,isPresent:l,onExitComplete:r,custom:u,presenceAffectsLayout:f,mode:d})=>{const p=cd(o1),g=_.useId(),v=_.useCallback(S=>{p.set(S,!0);for(const x of p.values())if(!x)return;r&&r()},[p,r]),b=_.useMemo(()=>({id:g,initial:i,isPresent:l,custom:u,onExitComplete:v,register:S=>(p.set(S,!1),()=>p.delete(S))}),f?[Math.random(),v]:[l,v]);return _.useMemo(()=>{p.forEach((S,x)=>p.set(x,!1))},[l]),_.useEffect(()=>{!l&&!p.size&&r&&r()},[l]),d==="popLayout"&&(a=m.jsx(i1,{isPresent:l,children:a})),m.jsx(ur.Provider,{value:b,children:a})};function o1(){return new Map}function _0(a=!0){const i=_.useContext(ur);if(i===null)return[!0,null];const{isPresent:l,onExitComplete:r,register:u}=i,f=_.useId();_.useEffect(()=>{a&&u(f)},[a]);const d=_.useCallback(()=>a&&r&&r(f),[f,r,a]);return!l&&r?[!1,d]:[!0]}const Qo=a=>a.key||"";function Zp(a){const i=[];return _.Children.forEach(a,l=>{_.isValidElement(l)&&i.push(l)}),i}const dd=typeof window<"u",T0=dd?_.useLayoutEffect:_.useEffect,di=({children:a,custom:i,initial:l=!0,onExitComplete:r,presenceAffectsLayout:u=!0,mode:f="sync",propagate:d=!1})=>{const[p,g]=_0(d),v=_.useMemo(()=>Zp(a),[a]),b=d&&!p?[]:v.map(Qo),S=_.useRef(!0),x=_.useRef(v),D=cd(()=>new Map),[w,O]=_.useState(v),[q,z]=_.useState(v);T0(()=>{S.current=!1,x.current=v;for(let K=0;K<q.length;K++){const G=Qo(q[K]);b.includes(G)?D.delete(G):D.get(G)!==!0&&D.set(G,!1)}},[q,b.length,b.join("-")]);const X=[];if(v!==w){let K=[...v];for(let G=0;G<q.length;G++){const Q=q[G],W=Qo(Q);b.includes(W)||(K.splice(G,0,Q),X.push(Q))}f==="wait"&&X.length&&(K=X),z(Zp(K)),O(v);return}const{forceRender:R}=_.useContext(rd);return m.jsx(m.Fragment,{children:q.map(K=>{const G=Qo(K),Q=d&&!p?!1:v===q||b.includes(G),W=()=>{if(D.has(G))D.set(G,!0);else return;let V=!0;D.forEach(F=>{F||(V=!1)}),V&&(R==null||R(),z(x.current),d&&(g==null||g()),r&&r())};return m.jsx(l1,{isPresent:Q,initial:!S.current||l?void 0:!1,custom:Q?void 0:i,presenceAffectsLayout:u,mode:f,onExitComplete:Q?void 0:W,children:K},G)})})},an=a=>a;let x0=an;const r1={useManualTiming:!1};function c1(a){let i=new Set,l=new Set,r=!1,u=!1;const f=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function p(v){f.has(v)&&(g.schedule(v),a()),v(d)}const g={schedule:(v,b=!1,S=!1)=>{const D=S&&r?i:l;return b&&f.add(v),D.has(v)||D.add(v),v},cancel:v=>{l.delete(v),f.delete(v)},process:v=>{if(d=v,r){u=!0;return}r=!0,[i,l]=[l,i],i.forEach(p),i.clear(),r=!1,u&&(u=!1,g.process(v))}};return g}const Po=["read","resolveKeyframes","update","preRender","render","postRender"],u1=40;function A0(a,i){let l=!1,r=!0;const u={delta:0,timestamp:0,isProcessing:!1},f=()=>l=!0,d=Po.reduce((z,X)=>(z[X]=c1(f),z),{}),{read:p,resolveKeyframes:g,update:v,preRender:b,render:S,postRender:x}=d,D=()=>{const z=performance.now();l=!1,u.delta=r?1e3/60:Math.max(Math.min(z-u.timestamp,u1),1),u.timestamp=z,u.isProcessing=!0,p.process(u),g.process(u),v.process(u),b.process(u),S.process(u),x.process(u),u.isProcessing=!1,l&&i&&(r=!1,a(D))},w=()=>{l=!0,r=!0,u.isProcessing||a(D)};return{schedule:Po.reduce((z,X)=>{const R=d[X];return z[X]=(K,G=!1,Q=!1)=>(l||w(),R.schedule(K,G,Q)),z},{}),cancel:z=>{for(let X=0;X<Po.length;X++)d[Po[X]].cancel(z)},state:u,steps:d}}const{schedule:ae,cancel:Ua,state:ze,steps:Cu}=A0(typeof requestAnimationFrame<"u"?requestAnimationFrame:an,!0),j0=_.createContext({strict:!1}),Xp={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ri={};for(const a in Xp)ri[a]={isEnabled:i=>Xp[a].some(l=>!!i[l])};function d1(a){for(const i in a)ri[i]={...ri[i],...a[i]}}const f1=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 nr(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||f1.has(a)}let E0=a=>!nr(a);function h1(a){a&&(E0=i=>i.startsWith("on")?!nr(i):a(i))}try{h1(require("@emotion/is-prop-valid").default)}catch{}function m1(a,i,l){const r={};for(const u in a)u==="values"&&typeof a.values=="object"||(E0(u)||l===!0&&nr(u)||!i&&!nr(u)||a.draggable&&u.startsWith("onDrag"))&&(r[u]=a[u]);return r}function p1(a){if(typeof Proxy>"u")return a;const i=new Map,l=(...r)=>a(...r);return new Proxy(l,{get:(r,u)=>u==="create"?a:(i.has(u)||i.set(u,a(u)),i.get(u))})}const dr=_.createContext({});function Tl(a){return typeof a=="string"||Array.isArray(a)}function fr(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}const fd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hd=["initial",...fd];function hr(a){return fr(a.animate)||hd.some(i=>Tl(a[i]))}function C0(a){return!!(hr(a)||a.variants)}function g1(a,i){if(hr(a)){const{initial:l,animate:r}=a;return{initial:l===!1||Tl(l)?l:void 0,animate:Tl(r)?r:void 0}}return a.inherit!==!1?i:{}}function v1(a){const{initial:i,animate:l}=g1(a,_.useContext(dr));return _.useMemo(()=>({initial:i,animate:l}),[Kp(i),Kp(l)])}function Kp(a){return Array.isArray(a)?a.join(" "):a}const y1=Symbol.for("motionComponentSymbol");function ai(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function b1(a,i,l){return _.useCallback(r=>{r&&a.onMount&&a.onMount(r),i&&(r?i.mount(r):i.unmount()),l&&(typeof l=="function"?l(r):ai(l)&&(l.current=r))},[i])}const md=a=>a.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),S1="framerAppearId",N0="data-"+md(S1),{schedule:pd}=A0(queueMicrotask,!1),D0=_.createContext({});function _1(a,i,l,r,u){var f,d;const{visualElement:p}=_.useContext(dr),g=_.useContext(j0),v=_.useContext(ur),b=_.useContext(ud).reducedMotion,S=_.useRef(null);r=r||g.renderer,!S.current&&r&&(S.current=r(a,{visualState:i,parent:p,props:l,presenceContext:v,blockInitialAnimation:v?v.initial===!1:!1,reducedMotionConfig:b}));const x=S.current,D=_.useContext(D0);x&&!x.projection&&u&&(x.type==="html"||x.type==="svg")&&T1(S.current,l,u,D);const w=_.useRef(!1);_.useInsertionEffect(()=>{x&&w.current&&x.update(l,v)});const O=l[N0],q=_.useRef(!!O&&!(!((f=window.MotionHandoffIsComplete)===null||f===void 0)&&f.call(window,O))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,O)));return T0(()=>{x&&(w.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),pd.render(x.render),q.current&&x.animationState&&x.animationState.animateChanges())}),_.useEffect(()=>{x&&(!q.current&&x.animationState&&x.animationState.animateChanges(),q.current&&(queueMicrotask(()=>{var z;(z=window.MotionHandoffMarkAsComplete)===null||z===void 0||z.call(window,O)}),q.current=!1))}),x}function T1(a,i,l,r){const{layoutId:u,layout:f,drag:d,dragConstraints:p,layoutScroll:g,layoutRoot:v}=i;a.projection=new l(a.latestValues,i["data-framer-portal-id"]?void 0:k0(a.parent)),a.projection.setOptions({layoutId:u,layout:f,alwaysMeasureLayout:!!d||p&&ai(p),visualElement:a,animationType:typeof f=="string"?f:"both",initialPromotionConfig:r,layoutScroll:g,layoutRoot:v})}function k0(a){if(a)return a.options.allowProjection!==!1?a.projection:k0(a.parent)}function x1({preloadedFeatures:a,createVisualElement:i,useRender:l,useVisualState:r,Component:u}){var f,d;a&&d1(a);function p(v,b){let S;const x={..._.useContext(ud),...v,layoutId:A1(v)},{isStatic:D}=x,w=v1(v),O=r(v,D);if(!D&&dd){j1();const q=E1(x);S=q.MeasureLayout,w.visualElement=_1(u,O,x,i,q.ProjectionNode)}return m.jsxs(dr.Provider,{value:w,children:[S&&w.visualElement?m.jsx(S,{visualElement:w.visualElement,...x}):null,l(u,v,b1(O,w.visualElement,b),O,D,w.visualElement)]})}p.displayName=`motion.${typeof u=="string"?u:`create(${(d=(f=u.displayName)!==null&&f!==void 0?f:u.name)!==null&&d!==void 0?d:""})`}`;const g=_.forwardRef(p);return g[y1]=u,g}function A1({layoutId:a}){const i=_.useContext(rd).id;return i&&a!==void 0?i+"-"+a:a}function j1(a,i){_.useContext(j0).strict}function E1(a){const{drag:i,layout:l}=ri;if(!i&&!l)return{};const r={...i,...l};return{MeasureLayout:i!=null&&i.isEnabled(a)||l!=null&&l.isEnabled(a)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const C1=["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 gd(a){return typeof a!="string"||a.includes("-")?!1:!!(C1.indexOf(a)>-1||/[A-Z]/u.test(a))}function Qp(a){const i=[{},{}];return a==null||a.values.forEach((l,r)=>{i[0][r]=l.get(),i[1][r]=l.getVelocity()}),i}function vd(a,i,l,r){if(typeof i=="function"){const[u,f]=Qp(r);i=i(l!==void 0?l:a.custom,u,f)}if(typeof i=="string"&&(i=a.variants&&a.variants[i]),typeof i=="function"){const[u,f]=Qp(r);i=i(l!==void 0?l:a.custom,u,f)}return i}const Iu=a=>Array.isArray(a),N1=a=>!!(a&&typeof a=="object"&&a.mix&&a.toValue),D1=a=>Iu(a)?a[a.length-1]||0:a,Ve=a=>!!(a&&a.getVelocity);function Wo(a){const i=Ve(a)?a.get():a;return N1(i)?i.toValue():i}function k1({scrapeMotionValuesFromProps:a,createRenderState:i,onUpdate:l},r,u,f){const d={latestValues:w1(r,u,f,a),renderState:i()};return l&&(d.onMount=p=>l({props:r,current:p,...d}),d.onUpdate=p=>l(p)),d}const w0=a=>(i,l)=>{const r=_.useContext(dr),u=_.useContext(ur),f=()=>k1(a,i,r,u);return l?f():cd(f)};function w1(a,i,l,r){const u={},f=r(a,{});for(const x in f)u[x]=Wo(f[x]);let{initial:d,animate:p}=a;const g=hr(a),v=C0(a);i&&v&&!g&&a.inherit!==!1&&(d===void 0&&(d=i.initial),p===void 0&&(p=i.animate));let b=l?l.initial===!1:!1;b=b||d===!1;const S=b?p:d;if(S&&typeof S!="boolean"&&!fr(S)){const x=Array.isArray(S)?S:[S];for(let D=0;D<x.length;D++){const w=vd(a,x[D]);if(w){const{transitionEnd:O,transition:q,...z}=w;for(const X in z){let R=z[X];if(Array.isArray(R)){const K=b?R.length-1:0;R=R[K]}R!==null&&(u[X]=R)}for(const X in O)u[X]=O[X]}}}return u}const fi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fs=new Set(fi),M0=a=>i=>typeof i=="string"&&i.startsWith(a),O0=M0("--"),M1=M0("var(--"),yd=a=>M1(a)?O1.test(a.split("/*")[0].trim()):!1,O1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,R0=(a,i)=>i&&typeof a=="number"?i.transform(a):a,la=(a,i,l)=>l>i?i:l<a?a:l,hi={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},xl={...hi,transform:a=>la(0,1,a)},Fo={...hi,default:1},Cl=a=>({test:i=>typeof i=="string"&&i.endsWith(a)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${a}`}),Ra=Cl("deg"),zn=Cl("%"),yt=Cl("px"),R1=Cl("vh"),B1=Cl("vw"),Pp={...zn,parse:a=>zn.parse(a)/100,transform:a=>zn.transform(a*100)},z1={borderWidth:yt,borderTopWidth:yt,borderRightWidth:yt,borderBottomWidth:yt,borderLeftWidth:yt,borderRadius:yt,radius:yt,borderTopLeftRadius:yt,borderTopRightRadius:yt,borderBottomRightRadius:yt,borderBottomLeftRadius:yt,width:yt,maxWidth:yt,height:yt,maxHeight:yt,top:yt,right:yt,bottom:yt,left:yt,padding:yt,paddingTop:yt,paddingRight:yt,paddingBottom:yt,paddingLeft:yt,margin:yt,marginTop:yt,marginRight:yt,marginBottom:yt,marginLeft:yt,backgroundPositionX:yt,backgroundPositionY:yt},U1={rotate:Ra,rotateX:Ra,rotateY:Ra,rotateZ:Ra,scale:Fo,scaleX:Fo,scaleY:Fo,scaleZ:Fo,skew:Ra,skewX:Ra,skewY:Ra,distance:yt,translateX:yt,translateY:yt,translateZ:yt,x:yt,y:yt,z:yt,perspective:yt,transformPerspective:yt,opacity:xl,originX:Pp,originY:Pp,originZ:yt},Fp={...hi,transform:Math.round},bd={...z1,...U1,zIndex:Fp,size:yt,fillOpacity:xl,strokeOpacity:xl,numOctaves:Fp},V1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},L1=fi.length;function H1(a,i,l){let r="",u=!0;for(let f=0;f<L1;f++){const d=fi[f],p=a[d];if(p===void 0)continue;let g=!0;if(typeof p=="number"?g=p===(d.startsWith("scale")?1:0):g=parseFloat(p)===0,!g||l){const v=R0(p,bd[d]);if(!g){u=!1;const b=V1[d]||d;r+=`${b}(${v}) `}l&&(i[d]=v)}}return r=r.trim(),l?r=l(i,u?"":r):u&&(r="none"),r}function Sd(a,i,l){const{style:r,vars:u,transformOrigin:f}=a;let d=!1,p=!1;for(const g in i){const v=i[g];if(fs.has(g)){d=!0;continue}else if(O0(g)){u[g]=v;continue}else{const b=R0(v,bd[g]);g.startsWith("origin")?(p=!0,f[g]=b):r[g]=b}}if(i.transform||(d||l?r.transform=H1(i,a.transform,l):r.transform&&(r.transform="none")),p){const{originX:g="50%",originY:v="50%",originZ:b=0}=f;r.transformOrigin=`${g} ${v} ${b}`}}const G1={offset:"stroke-dashoffset",array:"stroke-dasharray"},q1={offset:"strokeDashoffset",array:"strokeDasharray"};function I1(a,i,l=1,r=0,u=!0){a.pathLength=1;const f=u?G1:q1;a[f.offset]=yt.transform(-r);const d=yt.transform(i),p=yt.transform(l);a[f.array]=`${d} ${p}`}function Jp(a,i,l){return typeof a=="string"?a:yt.transform(i+l*a)}function Y1(a,i,l){const r=Jp(i,a.x,a.width),u=Jp(l,a.y,a.height);return`${r} ${u}`}function _d(a,{attrX:i,attrY:l,attrScale:r,originX:u,originY:f,pathLength:d,pathSpacing:p=1,pathOffset:g=0,...v},b,S){if(Sd(a,v,S),b){a.style.viewBox&&(a.attrs.viewBox=a.style.viewBox);return}a.attrs=a.style,a.style={};const{attrs:x,style:D,dimensions:w}=a;x.transform&&(w&&(D.transform=x.transform),delete x.transform),w&&(u!==void 0||f!==void 0||D.transform)&&(D.transformOrigin=Y1(w,u!==void 0?u:.5,f!==void 0?f:.5)),i!==void 0&&(x.x=i),l!==void 0&&(x.y=l),r!==void 0&&(x.scale=r),d!==void 0&&I1(x,d,p,g,!1)}const Td=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),B0=()=>({...Td(),attrs:{}}),xd=a=>typeof a=="string"&&a.toLowerCase()==="svg";function z0(a,{style:i,vars:l},r,u){Object.assign(a.style,i,u&&u.getProjectionStyles(r));for(const f in l)a.style.setProperty(f,l[f])}const U0=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 V0(a,i,l,r){z0(a,i,void 0,r);for(const u in i.attrs)a.setAttribute(U0.has(u)?u:md(u),i.attrs[u])}const ar={};function Z1(a){Object.assign(ar,a)}function L0(a,{layout:i,layoutId:l}){return fs.has(a)||a.startsWith("origin")||(i||l!==void 0)&&(!!ar[a]||a==="opacity")}function Ad(a,i,l){var r;const{style:u}=a,f={};for(const d in u)(Ve(u[d])||i.style&&Ve(i.style[d])||L0(d,a)||((r=l==null?void 0:l.getValue(d))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(f[d]=u[d]);return f}function H0(a,i,l){const r=Ad(a,i,l);for(const u in a)if(Ve(a[u])||Ve(i[u])){const f=fi.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;r[f]=a[u]}return r}function X1(a,i){try{i.dimensions=typeof a.getBBox=="function"?a.getBBox():a.getBoundingClientRect()}catch{i.dimensions={x:0,y:0,width:0,height:0}}}const $p=["x","y","width","height","cx","cy","r"],K1={useVisualState:w0({scrapeMotionValuesFromProps:H0,createRenderState:B0,onUpdate:({props:a,prevProps:i,current:l,renderState:r,latestValues:u})=>{if(!l)return;let f=!!a.drag;if(!f){for(const p in u)if(fs.has(p)){f=!0;break}}if(!f)return;let d=!i;if(i)for(let p=0;p<$p.length;p++){const g=$p[p];a[g]!==i[g]&&(d=!0)}d&&ae.read(()=>{X1(l,r),ae.render(()=>{_d(r,u,xd(l.tagName),a.transformTemplate),V0(l,r)})})}})},Q1={useVisualState:w0({scrapeMotionValuesFromProps:Ad,createRenderState:Td})};function G0(a,i,l){for(const r in i)!Ve(i[r])&&!L0(r,l)&&(a[r]=i[r])}function P1({transformTemplate:a},i){return _.useMemo(()=>{const l=Td();return Sd(l,i,a),Object.assign({},l.vars,l.style)},[i])}function F1(a,i){const l=a.style||{},r={};return G0(r,l,a),Object.assign(r,P1(a,i)),r}function J1(a,i){const l={},r=F1(a,i);return a.drag&&a.dragListener!==!1&&(l.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=a.drag===!0?"none":`pan-${a.drag==="x"?"y":"x"}`),a.tabIndex===void 0&&(a.onTap||a.onTapStart||a.whileTap)&&(l.tabIndex=0),l.style=r,l}function $1(a,i,l,r){const u=_.useMemo(()=>{const f=B0();return _d(f,i,xd(r),a.transformTemplate),{...f.attrs,style:{...f.style}}},[i]);if(a.style){const f={};G0(f,a.style,a),u.style={...f,...u.style}}return u}function W1(a=!1){return(l,r,u,{latestValues:f},d)=>{const g=(gd(l)?$1:J1)(r,f,d,l),v=m1(r,typeof l=="string",a),b=l!==_.Fragment?{...v,...g,ref:u}:{},{children:S}=r,x=_.useMemo(()=>Ve(S)?S.get():S,[S]);return _.createElement(l,{...b,children:x})}}function t_(a,i){return function(r,{forwardMotionProps:u}={forwardMotionProps:!1}){const d={...gd(r)?K1:Q1,preloadedFeatures:a,useRender:W1(u),createVisualElement:i,Component:r};return x1(d)}}function q0(a,i){if(!Array.isArray(i))return!1;const l=i.length;if(l!==a.length)return!1;for(let r=0;r<l;r++)if(i[r]!==a[r])return!1;return!0}function mr(a,i,l){const r=a.getProps();return vd(r,i,l!==void 0?l:r.custom,a)}function jd(a,i){return a?a[i]||a.default||a:void 0}const I0=new Set(["width","height","top","left","right","bottom",...fi]);let tr;function e_(){tr=void 0}const Un={now:()=>(tr===void 0&&Un.set(ze.isProcessing||r1.useManualTiming?ze.timestamp:performance.now()),tr),set:a=>{tr=a,queueMicrotask(e_)}};function Ed(a,i){a.indexOf(i)===-1&&a.push(i)}function Cd(a,i){const l=a.indexOf(i);l>-1&&a.splice(l,1)}class Nd{constructor(){this.subscriptions=[]}add(i){return Ed(this.subscriptions,i),()=>Cd(this.subscriptions,i)}notify(i,l,r){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](i,l,r);else for(let f=0;f<u;f++){const d=this.subscriptions[f];d&&d(i,l,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Y0(a,i){return i?a*(1e3/i):0}const Wp=30,n_=a=>!isNaN(parseFloat(a));class a_{constructor(i,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,u=!0)=>{const f=Un.now();this.updatedAt!==f&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),u&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(i),this.owner=l.owner}setCurrent(i){this.current=i,this.updatedAt=Un.now(),this.canTrackVelocity===null&&i!==void 0&&(this.canTrackVelocity=n_(this.current))}setPrevFrameValue(i=this.current){this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt}onChange(i){return this.on("change",i)}on(i,l){this.events[i]||(this.events[i]=new Nd);const r=this.events[i].add(l);return i==="change"?()=>{r(),ae.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,l){this.passiveEffect=i,this.stopPassiveEffect=l}set(i,l=!0){!l||!this.passiveEffect?this.updateAndNotify(i,l):this.passiveEffect(i,this.updateAndNotify)}setWithVelocity(i,l,r){this.set(l),this.prev=void 0,this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt-r}jump(i,l=!0){this.updateAndNotify(i),this.prev=i,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const i=Un.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||i-this.updatedAt>Wp)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,Wp);return Y0(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(i){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=i(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 Al(a,i){return new a_(a,i)}function s_(a,i,l){a.hasValue(i)?a.getValue(i).set(l):a.addValue(i,Al(l))}function i_(a,i){const l=mr(a,i);let{transitionEnd:r={},transition:u={},...f}=l||{};f={...f,...r};for(const d in f){const p=D1(f[d]);s_(a,d,p)}}function l_(a){return!!(Ve(a)&&a.add)}function Yu(a,i){const l=a.getValue("willChange");if(l_(l))return l.add(i)}function Z0(a){return a.props[N0]}function Dd(a){let i;return()=>(i===void 0&&(i=a()),i)}const o_=Dd(()=>window.ScrollTimeline!==void 0);class r_{constructor(i){this.stop=()=>this.runAll("stop"),this.animations=i.filter(Boolean)}get finished(){return Promise.all(this.animations.map(i=>"finished"in i?i.finished:i))}getAll(i){return this.animations[0][i]}setAll(i,l){for(let r=0;r<this.animations.length;r++)this.animations[r][i]=l}attachTimeline(i,l){const r=this.animations.map(u=>{if(o_()&&u.attachTimeline)return u.attachTimeline(i);if(typeof l=="function")return l(u)});return()=>{r.forEach((u,f)=>{u&&u(),this.animations[f].stop()})}}get time(){return this.getAll("time")}set time(i){this.setAll("time",i)}get speed(){return this.getAll("speed")}set speed(i){this.setAll("speed",i)}get startTime(){return this.getAll("startTime")}get duration(){let i=0;for(let l=0;l<this.animations.length;l++)i=Math.max(i,this.animations[l].duration);return i}runAll(i){this.animations.forEach(l=>l[i]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class c_ extends r_{then(i,l){return Promise.all(this.animations).then(i).catch(l)}}const sa=a=>a*1e3,ia=a=>a/1e3;function kd(a){return typeof a=="function"}function tg(a,i){a.timeline=i,a.onfinish=null}const wd=a=>Array.isArray(a)&&typeof a[0]=="number",u_={linearEasing:void 0};function d_(a,i){const l=Dd(a);return()=>{var r;return(r=u_[i])!==null&&r!==void 0?r:l()}}const sr=d_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ci=(a,i,l)=>{const r=i-a;return r===0?1:(l-a)/r},X0=(a,i,l=10)=>{let r="";const u=Math.max(Math.round(i/l),2);for(let f=0;f<u;f++)r+=a(ci(0,u-1,f))+", ";return`linear(${r.substring(0,r.length-2)})`};function K0(a){return!!(typeof a=="function"&&sr()||!a||typeof a=="string"&&(a in Zu||sr())||wd(a)||Array.isArray(a)&&a.every(K0))}const ml=([a,i,l,r])=>`cubic-bezier(${a}, ${i}, ${l}, ${r})`,Zu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ml([0,.65,.55,1]),circOut:ml([.55,0,1,.45]),backIn:ml([.31,.01,.66,-.59]),backOut:ml([.33,1.53,.69,.99])};function Q0(a,i){if(a)return typeof a=="function"&&sr()?X0(a,i):wd(a)?ml(a):Array.isArray(a)?a.map(l=>Q0(l,i)||Zu.easeOut):Zu[a]}const P0=(a,i,l)=>(((1-3*l+3*i)*a+(3*l-6*i))*a+3*i)*a,f_=1e-7,h_=12;function m_(a,i,l,r,u){let f,d,p=0;do d=i+(l-i)/2,f=P0(d,r,u)-a,f>0?l=d:i=d;while(Math.abs(f)>f_&&++p<h_);return d}function Nl(a,i,l,r){if(a===i&&l===r)return an;const u=f=>m_(f,0,1,a,l);return f=>f===0||f===1?f:P0(u(f),i,r)}const F0=a=>i=>i<=.5?a(2*i)/2:(2-a(2*(1-i)))/2,J0=a=>i=>1-a(1-i),$0=Nl(.33,1.53,.69,.99),Md=J0($0),W0=F0(Md),tv=a=>(a*=2)<1?.5*Md(a):.5*(2-Math.pow(2,-10*(a-1))),Od=a=>1-Math.sin(Math.acos(a)),ev=J0(Od),nv=F0(Od),av=a=>/^0[^.\s]+$/u.test(a);function p_(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||av(a):!0}const yl=a=>Math.round(a*1e5)/1e5,Rd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function g_(a){return a==null}const v_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Bd=(a,i)=>l=>!!(typeof l=="string"&&v_.test(l)&&l.startsWith(a)||i&&!g_(l)&&Object.prototype.hasOwnProperty.call(l,i)),sv=(a,i,l)=>r=>{if(typeof r!="string")return r;const[u,f,d,p]=r.match(Rd);return{[a]:parseFloat(u),[i]:parseFloat(f),[l]:parseFloat(d),alpha:p!==void 0?parseFloat(p):1}},y_=a=>la(0,255,a),Nu={...hi,transform:a=>Math.round(y_(a))},us={test:Bd("rgb","red"),parse:sv("red","green","blue"),transform:({red:a,green:i,blue:l,alpha:r=1})=>"rgba("+Nu.transform(a)+", "+Nu.transform(i)+", "+Nu.transform(l)+", "+yl(xl.transform(r))+")"};function b_(a){let i="",l="",r="",u="";return a.length>5?(i=a.substring(1,3),l=a.substring(3,5),r=a.substring(5,7),u=a.substring(7,9)):(i=a.substring(1,2),l=a.substring(2,3),r=a.substring(3,4),u=a.substring(4,5),i+=i,l+=l,r+=r,u+=u),{red:parseInt(i,16),green:parseInt(l,16),blue:parseInt(r,16),alpha:u?parseInt(u,16)/255:1}}const Xu={test:Bd("#"),parse:b_,transform:us.transform},si={test:Bd("hsl","hue"),parse:sv("hue","saturation","lightness"),transform:({hue:a,saturation:i,lightness:l,alpha:r=1})=>"hsla("+Math.round(a)+", "+zn.transform(yl(i))+", "+zn.transform(yl(l))+", "+yl(xl.transform(r))+")"},Ue={test:a=>us.test(a)||Xu.test(a)||si.test(a),parse:a=>us.test(a)?us.parse(a):si.test(a)?si.parse(a):Xu.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?us.transform(a):si.transform(a)},S_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function __(a){var i,l;return isNaN(a)&&typeof a=="string"&&(((i=a.match(Rd))===null||i===void 0?void 0:i.length)||0)+(((l=a.match(S_))===null||l===void 0?void 0:l.length)||0)>0}const iv="number",lv="color",T_="var",x_="var(",eg="${}",A_=/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 jl(a){const i=a.toString(),l=[],r={color:[],number:[],var:[]},u=[];let f=0;const p=i.replace(A_,g=>(Ue.test(g)?(r.color.push(f),u.push(lv),l.push(Ue.parse(g))):g.startsWith(x_)?(r.var.push(f),u.push(T_),l.push(g)):(r.number.push(f),u.push(iv),l.push(parseFloat(g))),++f,eg)).split(eg);return{values:l,split:p,indexes:r,types:u}}function ov(a){return jl(a).values}function rv(a){const{split:i,types:l}=jl(a),r=i.length;return u=>{let f="";for(let d=0;d<r;d++)if(f+=i[d],u[d]!==void 0){const p=l[d];p===iv?f+=yl(u[d]):p===lv?f+=Ue.transform(u[d]):f+=u[d]}return f}}const j_=a=>typeof a=="number"?0:a;function E_(a){const i=ov(a);return rv(a)(i.map(j_))}const Va={test:__,parse:ov,createTransformer:rv,getAnimatableNone:E_},C_=new Set(["brightness","contrast","saturate","opacity"]);function N_(a){const[i,l]=a.slice(0,-1).split("(");if(i==="drop-shadow")return a;const[r]=l.match(Rd)||[];if(!r)return a;const u=l.replace(r,"");let f=C_.has(i)?1:0;return r!==l&&(f*=100),i+"("+f+u+")"}const D_=/\b([a-z-]*)\(.*?\)/gu,Ku={...Va,getAnimatableNone:a=>{const i=a.match(D_);return i?i.map(N_).join(" "):a}},k_={...bd,color:Ue,backgroundColor:Ue,outlineColor:Ue,fill:Ue,stroke:Ue,borderColor:Ue,borderTopColor:Ue,borderRightColor:Ue,borderBottomColor:Ue,borderLeftColor:Ue,filter:Ku,WebkitFilter:Ku},zd=a=>k_[a];function cv(a,i){let l=zd(a);return l!==Ku&&(l=Va),l.getAnimatableNone?l.getAnimatableNone(i):void 0}const w_=new Set(["auto","none","0"]);function M_(a,i,l){let r=0,u;for(;r<a.length&&!u;){const f=a[r];typeof f=="string"&&!w_.has(f)&&jl(f).values.length&&(u=a[r]),r++}if(u&&l)for(const f of i)a[f]=cv(l,u)}const ng=a=>a===hi||a===yt,ag=(a,i)=>parseFloat(a.split(", ")[i]),sg=(a,i)=>(l,{transform:r})=>{if(r==="none"||!r)return 0;const u=r.match(/^matrix3d\((.+)\)$/u);if(u)return ag(u[1],i);{const f=r.match(/^matrix\((.+)\)$/u);return f?ag(f[1],a):0}},O_=new Set(["x","y","z"]),R_=fi.filter(a=>!O_.has(a));function B_(a){const i=[];return R_.forEach(l=>{const r=a.getValue(l);r!==void 0&&(i.push([l,r.get()]),r.set(l.startsWith("scale")?1:0))}),i}const ui={width:({x:a},{paddingLeft:i="0",paddingRight:l="0"})=>a.max-a.min-parseFloat(i)-parseFloat(l),height:({y:a},{paddingTop:i="0",paddingBottom:l="0"})=>a.max-a.min-parseFloat(i)-parseFloat(l),top:(a,{top:i})=>parseFloat(i),left:(a,{left:i})=>parseFloat(i),bottom:({y:a},{top:i})=>parseFloat(i)+(a.max-a.min),right:({x:a},{left:i})=>parseFloat(i)+(a.max-a.min),x:sg(4,13),y:sg(5,14)};ui.translateX=ui.x;ui.translateY=ui.y;const ds=new Set;let Qu=!1,Pu=!1;function uv(){if(Pu){const a=Array.from(ds).filter(r=>r.needsMeasurement),i=new Set(a.map(r=>r.element)),l=new Map;i.forEach(r=>{const u=B_(r);u.length&&(l.set(r,u),r.render())}),a.forEach(r=>r.measureInitialState()),i.forEach(r=>{r.render();const u=l.get(r);u&&u.forEach(([f,d])=>{var p;(p=r.getValue(f))===null||p===void 0||p.set(d)})}),a.forEach(r=>r.measureEndState()),a.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Pu=!1,Qu=!1,ds.forEach(a=>a.complete()),ds.clear()}function dv(){ds.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(Pu=!0)})}function z_(){dv(),uv()}class Ud{constructor(i,l,r,u,f,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...i],this.onComplete=l,this.name=r,this.motionValue=u,this.element=f,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ds.add(this),Qu||(Qu=!0,ae.read(dv),ae.resolveKeyframes(uv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:i,name:l,element:r,motionValue:u}=this;for(let f=0;f<i.length;f++)if(i[f]===null)if(f===0){const d=u==null?void 0:u.get(),p=i[i.length-1];if(d!==void 0)i[0]=d;else if(r&&l){const g=r.readValue(l,p);g!=null&&(i[0]=g)}i[0]===void 0&&(i[0]=p),u&&d===void 0&&u.set(i[0])}else i[f]=i[f-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ds.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ds.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const fv=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),U_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function V_(a){const i=U_.exec(a);if(!i)return[,];const[,l,r,u]=i;return[`--${l??r}`,u]}function hv(a,i,l=1){const[r,u]=V_(a);if(!r)return;const f=window.getComputedStyle(i).getPropertyValue(r);if(f){const d=f.trim();return fv(d)?parseFloat(d):d}return yd(u)?hv(u,i,l+1):u}const mv=a=>i=>i.test(a),L_={test:a=>a==="auto",parse:a=>a},pv=[hi,yt,zn,Ra,B1,R1,L_],ig=a=>pv.find(mv(a));class gv extends Ud{constructor(i,l,r,u,f){super(i,l,r,u,f,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:l,name:r}=this;if(!l||!l.current)return;super.readKeyframes();for(let g=0;g<i.length;g++){let v=i[g];if(typeof v=="string"&&(v=v.trim(),yd(v))){const b=hv(v,l.current);b!==void 0&&(i[g]=b),g===i.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!I0.has(r)||i.length!==2)return;const[u,f]=i,d=ig(u),p=ig(f);if(d!==p)if(ng(d)&&ng(p))for(let g=0;g<i.length;g++){const v=i[g];typeof v=="string"&&(i[g]=parseFloat(v))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:i,name:l}=this,r=[];for(let u=0;u<i.length;u++)p_(i[u])&&r.push(u);r.length&&M_(i,r,l)}measureInitialState(){const{element:i,unresolvedKeyframes:l,name:r}=this;if(!i||!i.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ui[r](i.measureViewportBox(),window.getComputedStyle(i.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&i.getValue(r,u).jump(u,!1)}measureEndState(){var i;const{element:l,name:r,unresolvedKeyframes:u}=this;if(!l||!l.current)return;const f=l.getValue(r);f&&f.jump(this.measuredOrigin,!1);const d=u.length-1,p=u[d];u[d]=ui[r](l.measureViewportBox(),window.getComputedStyle(l.current)),p!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=p),!((i=this.removedTransforms)===null||i===void 0)&&i.length&&this.removedTransforms.forEach(([g,v])=>{l.getValue(g).set(v)}),this.resolveNoneKeyframes()}}const lg=(a,i)=>i==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(Va.test(a)||a==="0")&&!a.startsWith("url("));function H_(a){const i=a[0];if(a.length===1)return!0;for(let l=0;l<a.length;l++)if(a[l]!==i)return!0}function G_(a,i,l,r){const u=a[0];if(u===null)return!1;if(i==="display"||i==="visibility")return!0;const f=a[a.length-1],d=lg(u,i),p=lg(f,i);return!d||!p?!1:H_(a)||(l==="spring"||kd(l))&&r}const q_=a=>a!==null;function pr(a,{repeat:i,repeatType:l="loop"},r){const u=a.filter(q_),f=i&&l!=="loop"&&i%2===1?0:u.length-1;return!f||r===void 0?u[f]:r}const I_=40;class vv{constructor({autoplay:i=!0,delay:l=0,type:r="keyframes",repeat:u=0,repeatDelay:f=0,repeatType:d="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Un.now(),this.options={autoplay:i,delay:l,type:r,repeat:u,repeatDelay:f,repeatType:d,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>I_?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&z_(),this._resolved}onKeyframesResolved(i,l){this.resolvedAt=Un.now(),this.hasAttemptedResolve=!0;const{name:r,type:u,velocity:f,delay:d,onComplete:p,onUpdate:g,isGenerator:v}=this.options;if(!v&&!G_(i,r,u,f))if(d)this.options.duration=0;else{g&&g(pr(i,this.options,l)),p&&p(),this.resolveFinishedPromise();return}const b=this.initPlayback(i,l);b!==!1&&(this._resolved={keyframes:i,finalKeyframe:l,...b},this.onPostResolved())}onPostResolved(){}then(i,l){return this.currentFinishedPromise.then(i,l)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(i=>{this.resolveFinishedPromise=i})}}const Fu=2e4;function yv(a){let i=0;const l=50;let r=a.next(i);for(;!r.done&&i<Fu;)i+=l,r=a.next(i);return i>=Fu?1/0:i}const re=(a,i,l)=>a+(i-a)*l;function Du(a,i,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?a+(i-a)*6*l:l<1/2?i:l<2/3?a+(i-a)*(2/3-l)*6:a}function Y_({hue:a,saturation:i,lightness:l,alpha:r}){a/=360,i/=100,l/=100;let u=0,f=0,d=0;if(!i)u=f=d=l;else{const p=l<.5?l*(1+i):l+i-l*i,g=2*l-p;u=Du(g,p,a+1/3),f=Du(g,p,a),d=Du(g,p,a-1/3)}return{red:Math.round(u*255),green:Math.round(f*255),blue:Math.round(d*255),alpha:r}}function ir(a,i){return l=>l>0?i:a}const ku=(a,i,l)=>{const r=a*a,u=l*(i*i-r)+r;return u<0?0:Math.sqrt(u)},Z_=[Xu,us,si],X_=a=>Z_.find(i=>i.test(a));function og(a){const i=X_(a);if(!i)return!1;let l=i.parse(a);return i===si&&(l=Y_(l)),l}const rg=(a,i)=>{const l=og(a),r=og(i);if(!l||!r)return ir(a,i);const u={...l};return f=>(u.red=ku(l.red,r.red,f),u.green=ku(l.green,r.green,f),u.blue=ku(l.blue,r.blue,f),u.alpha=re(l.alpha,r.alpha,f),us.transform(u))},K_=(a,i)=>l=>i(a(l)),Dl=(...a)=>a.reduce(K_),Ju=new Set(["none","hidden"]);function Q_(a,i){return Ju.has(a)?l=>l<=0?a:i:l=>l>=1?i:a}function P_(a,i){return l=>re(a,i,l)}function Vd(a){return typeof a=="number"?P_:typeof a=="string"?yd(a)?ir:Ue.test(a)?rg:$_:Array.isArray(a)?bv:typeof a=="object"?Ue.test(a)?rg:F_:ir}function bv(a,i){const l=[...a],r=l.length,u=a.map((f,d)=>Vd(f)(f,i[d]));return f=>{for(let d=0;d<r;d++)l[d]=u[d](f);return l}}function F_(a,i){const l={...a,...i},r={};for(const u in l)a[u]!==void 0&&i[u]!==void 0&&(r[u]=Vd(a[u])(a[u],i[u]));return u=>{for(const f in r)l[f]=r[f](u);return l}}function J_(a,i){var l;const r=[],u={color:0,var:0,number:0};for(let f=0;f<i.values.length;f++){const d=i.types[f],p=a.indexes[d][u[d]],g=(l=a.values[p])!==null&&l!==void 0?l:0;r[f]=g,u[d]++}return r}const $_=(a,i)=>{const l=Va.createTransformer(i),r=jl(a),u=jl(i);return r.indexes.var.length===u.indexes.var.length&&r.indexes.color.length===u.indexes.color.length&&r.indexes.number.length>=u.indexes.number.length?Ju.has(a)&&!u.values.length||Ju.has(i)&&!r.values.length?Q_(a,i):Dl(bv(J_(r,u),u.values),l):ir(a,i)};function Sv(a,i,l){return typeof a=="number"&&typeof i=="number"&&typeof l=="number"?re(a,i,l):Vd(a)(a,i)}const W_=5;function _v(a,i,l){const r=Math.max(i-W_,0);return Y0(l-a(r),i-r)}const he={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},wu=.001;function tT({duration:a=he.duration,bounce:i=he.bounce,velocity:l=he.velocity,mass:r=he.mass}){let u,f,d=1-i;d=la(he.minDamping,he.maxDamping,d),a=la(he.minDuration,he.maxDuration,ia(a)),d<1?(u=v=>{const b=v*d,S=b*a,x=b-l,D=$u(v,d),w=Math.exp(-S);return wu-x/D*w},f=v=>{const S=v*d*a,x=S*l+l,D=Math.pow(d,2)*Math.pow(v,2)*a,w=Math.exp(-S),O=$u(Math.pow(v,2),d);return(-u(v)+wu>0?-1:1)*((x-D)*w)/O}):(u=v=>{const b=Math.exp(-v*a),S=(v-l)*a+1;return-wu+b*S},f=v=>{const b=Math.exp(-v*a),S=(l-v)*(a*a);return b*S});const p=5/a,g=nT(u,f,p);if(a=sa(a),isNaN(g))return{stiffness:he.stiffness,damping:he.damping,duration:a};{const v=Math.pow(g,2)*r;return{stiffness:v,damping:d*2*Math.sqrt(r*v),duration:a}}}const eT=12;function nT(a,i,l){let r=l;for(let u=1;u<eT;u++)r=r-a(r)/i(r);return r}function $u(a,i){return a*Math.sqrt(1-i*i)}const aT=["duration","bounce"],sT=["stiffness","damping","mass"];function cg(a,i){return i.some(l=>a[l]!==void 0)}function iT(a){let i={velocity:he.velocity,stiffness:he.stiffness,damping:he.damping,mass:he.mass,isResolvedFromDuration:!1,...a};if(!cg(a,sT)&&cg(a,aT))if(a.visualDuration){const l=a.visualDuration,r=2*Math.PI/(l*1.2),u=r*r,f=2*la(.05,1,1-(a.bounce||0))*Math.sqrt(u);i={...i,mass:he.mass,stiffness:u,damping:f}}else{const l=tT(a);i={...i,...l,mass:he.mass},i.isResolvedFromDuration=!0}return i}function Tv(a=he.visualDuration,i=he.bounce){const l=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:i}:a;let{restSpeed:r,restDelta:u}=l;const f=l.keyframes[0],d=l.keyframes[l.keyframes.length-1],p={done:!1,value:f},{stiffness:g,damping:v,mass:b,duration:S,velocity:x,isResolvedFromDuration:D}=iT({...l,velocity:-ia(l.velocity||0)}),w=x||0,O=v/(2*Math.sqrt(g*b)),q=d-f,z=ia(Math.sqrt(g/b)),X=Math.abs(q)<5;r||(r=X?he.restSpeed.granular:he.restSpeed.default),u||(u=X?he.restDelta.granular:he.restDelta.default);let R;if(O<1){const G=$u(z,O);R=Q=>{const W=Math.exp(-O*z*Q);return d-W*((w+O*z*q)/G*Math.sin(G*Q)+q*Math.cos(G*Q))}}else if(O===1)R=G=>d-Math.exp(-z*G)*(q+(w+z*q)*G);else{const G=z*Math.sqrt(O*O-1);R=Q=>{const W=Math.exp(-O*z*Q),V=Math.min(G*Q,300);return d-W*((w+O*z*q)*Math.sinh(V)+G*q*Math.cosh(V))/G}}const K={calculatedDuration:D&&S||null,next:G=>{const Q=R(G);if(D)p.done=G>=S;else{let W=0;O<1&&(W=G===0?sa(w):_v(R,G,Q));const V=Math.abs(W)<=r,F=Math.abs(d-Q)<=u;p.done=V&&F}return p.value=p.done?d:Q,p},toString:()=>{const G=Math.min(yv(K),Fu),Q=X0(W=>K.next(G*W).value,G,30);return G+"ms "+Q}};return K}function ug({keyframes:a,velocity:i=0,power:l=.8,timeConstant:r=325,bounceDamping:u=10,bounceStiffness:f=500,modifyTarget:d,min:p,max:g,restDelta:v=.5,restSpeed:b}){const S=a[0],x={done:!1,value:S},D=V=>p!==void 0&&V<p||g!==void 0&&V>g,w=V=>p===void 0?g:g===void 0||Math.abs(p-V)<Math.abs(g-V)?p:g;let O=l*i;const q=S+O,z=d===void 0?q:d(q);z!==q&&(O=z-S);const X=V=>-O*Math.exp(-V/r),R=V=>z+X(V),K=V=>{const F=X(V),rt=R(V);x.done=Math.abs(F)<=v,x.value=x.done?z:rt};let G,Q;const W=V=>{D(x.value)&&(G=V,Q=Tv({keyframes:[x.value,w(x.value)],velocity:_v(R,V,x.value),damping:u,stiffness:f,restDelta:v,restSpeed:b}))};return W(0),{calculatedDuration:null,next:V=>{let F=!1;return!Q&&G===void 0&&(F=!0,K(V),W(V)),G!==void 0&&V>=G?Q.next(V-G):(!F&&K(V),x)}}}const lT=Nl(.42,0,1,1),oT=Nl(0,0,.58,1),xv=Nl(.42,0,.58,1),rT=a=>Array.isArray(a)&&typeof a[0]!="number",cT={linear:an,easeIn:lT,easeInOut:xv,easeOut:oT,circIn:Od,circInOut:nv,circOut:ev,backIn:Md,backInOut:W0,backOut:$0,anticipate:tv},dg=a=>{if(wd(a)){x0(a.length===4);const[i,l,r,u]=a;return Nl(i,l,r,u)}else if(typeof a=="string")return cT[a];return a};function uT(a,i,l){const r=[],u=l||Sv,f=a.length-1;for(let d=0;d<f;d++){let p=u(a[d],a[d+1]);if(i){const g=Array.isArray(i)?i[d]||an:i;p=Dl(g,p)}r.push(p)}return r}function dT(a,i,{clamp:l=!0,ease:r,mixer:u}={}){const f=a.length;if(x0(f===i.length),f===1)return()=>i[0];if(f===2&&i[0]===i[1])return()=>i[1];const d=a[0]===a[1];a[0]>a[f-1]&&(a=[...a].reverse(),i=[...i].reverse());const p=uT(i,r,u),g=p.length,v=b=>{if(d&&b<a[0])return i[0];let S=0;if(g>1)for(;S<a.length-2&&!(b<a[S+1]);S++);const x=ci(a[S],a[S+1],b);return p[S](x)};return l?b=>v(la(a[0],a[f-1],b)):v}function fT(a,i){const l=a[a.length-1];for(let r=1;r<=i;r++){const u=ci(0,i,r);a.push(re(l,1,u))}}function hT(a){const i=[0];return fT(i,a.length-1),i}function mT(a,i){return a.map(l=>l*i)}function pT(a,i){return a.map(()=>i||xv).splice(0,a.length-1)}function lr({duration:a=300,keyframes:i,times:l,ease:r="easeInOut"}){const u=rT(r)?r.map(dg):dg(r),f={done:!1,value:i[0]},d=mT(l&&l.length===i.length?l:hT(i),a),p=dT(d,i,{ease:Array.isArray(u)?u:pT(i,u)});return{calculatedDuration:a,next:g=>(f.value=p(g),f.done=g>=a,f)}}const gT=a=>{const i=({timestamp:l})=>a(l);return{start:()=>ae.update(i,!0),stop:()=>Ua(i),now:()=>ze.isProcessing?ze.timestamp:Un.now()}},vT={decay:ug,inertia:ug,tween:lr,keyframes:lr,spring:Tv},yT=a=>a/100;class Ld extends vv{constructor(i){super(i),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:g}=this.options;g&&g()};const{name:l,motionValue:r,element:u,keyframes:f}=this.options,d=(u==null?void 0:u.KeyframeResolver)||Ud,p=(g,v)=>this.onKeyframesResolved(g,v);this.resolver=new d(f,p,l,r,u),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(i){const{type:l="keyframes",repeat:r=0,repeatDelay:u=0,repeatType:f,velocity:d=0}=this.options,p=kd(l)?l:vT[l]||lr;let g,v;p!==lr&&typeof i[0]!="number"&&(g=Dl(yT,Sv(i[0],i[1])),i=[0,100]);const b=p({...this.options,keyframes:i});f==="mirror"&&(v=p({...this.options,keyframes:[...i].reverse(),velocity:-d})),b.calculatedDuration===null&&(b.calculatedDuration=yv(b));const{calculatedDuration:S}=b,x=S+u,D=x*(r+1)-u;return{generator:b,mirroredGenerator:v,mapPercentToKeyframes:g,calculatedDuration:S,resolvedDuration:x,totalDuration:D}}onPostResolved(){const{autoplay:i=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!i?this.pause():this.state=this.pendingPlayState}tick(i,l=!1){const{resolved:r}=this;if(!r){const{keyframes:V}=this.options;return{done:!0,value:V[V.length-1]}}const{finalKeyframe:u,generator:f,mirroredGenerator:d,mapPercentToKeyframes:p,keyframes:g,calculatedDuration:v,totalDuration:b,resolvedDuration:S}=r;if(this.startTime===null)return f.next(0);const{delay:x,repeat:D,repeatType:w,repeatDelay:O,onUpdate:q}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,i):this.speed<0&&(this.startTime=Math.min(i-b/this.speed,this.startTime)),l?this.currentTime=i:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(i-this.startTime)*this.speed;const z=this.currentTime-x*(this.speed>=0?1:-1),X=this.speed>=0?z<0:z>b;this.currentTime=Math.max(z,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=b);let R=this.currentTime,K=f;if(D){const V=Math.min(this.currentTime,b)/S;let F=Math.floor(V),rt=V%1;!rt&&V>=1&&(rt=1),rt===1&&F--,F=Math.min(F,D+1),!!(F%2)&&(w==="reverse"?(rt=1-rt,O&&(rt-=O/S)):w==="mirror"&&(K=d)),R=la(0,1,rt)*S}const G=X?{done:!1,value:g[0]}:K.next(R);p&&(G.value=p(G.value));let{done:Q}=G;!X&&v!==null&&(Q=this.speed>=0?this.currentTime>=b:this.currentTime<=0);const W=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&Q);return W&&u!==void 0&&(G.value=pr(g,this.options,u)),q&&q(G.value),W&&this.finish(),G}get duration(){const{resolved:i}=this;return i?ia(i.calculatedDuration):0}get time(){return ia(this.currentTime)}set time(i){i=sa(i),this.currentTime=i,this.holdTime!==null||this.speed===0?this.holdTime=i:this.driver&&(this.startTime=this.driver.now()-i/this.speed)}get speed(){return this.playbackSpeed}set speed(i){const l=this.playbackSpeed!==i;this.playbackSpeed=i,l&&(this.time=ia(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:i=gT,onPlay:l,startTime:r}=this.options;this.driver||(this.driver=i(f=>this.tick(f))),l&&l();const u=this.driver.now();this.holdTime!==null?this.startTime=u-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=u):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var i;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(i=this.currentTime)!==null&&i!==void 0?i:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:i}=this.options;i&&i()}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(i){return this.startTime=0,this.tick(i,!0)}}const bT=new Set(["opacity","clipPath","filter","transform"]);function ST(a,i,l,{delay:r=0,duration:u=300,repeat:f=0,repeatType:d="loop",ease:p="easeInOut",times:g}={}){const v={[i]:l};g&&(v.offset=g);const b=Q0(p,u);return Array.isArray(b)&&(v.easing=b),a.animate(v,{delay:r,duration:u,easing:Array.isArray(b)?"linear":b,fill:"both",iterations:f+1,direction:d==="reverse"?"alternate":"normal"})}const _T=Dd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),or=10,TT=2e4;function xT(a){return kd(a.type)||a.type==="spring"||!K0(a.ease)}function AT(a,i){const l=new Ld({...i,keyframes:a,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:a[0]};const u=[];let f=0;for(;!r.done&&f<TT;)r=l.sample(f),u.push(r.value),f+=or;return{times:void 0,keyframes:u,duration:f-or,ease:"linear"}}const Av={anticipate:tv,backInOut:W0,circInOut:nv};function jT(a){return a in Av}class fg extends vv{constructor(i){super(i);const{name:l,motionValue:r,element:u,keyframes:f}=this.options;this.resolver=new gv(f,(d,p)=>this.onKeyframesResolved(d,p),l,r,u),this.resolver.scheduleResolve()}initPlayback(i,l){let{duration:r=300,times:u,ease:f,type:d,motionValue:p,name:g,startTime:v}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof f=="string"&&sr()&&jT(f)&&(f=Av[f]),xT(this.options)){const{onComplete:S,onUpdate:x,motionValue:D,element:w,...O}=this.options,q=AT(i,O);i=q.keyframes,i.length===1&&(i[1]=i[0]),r=q.duration,u=q.times,f=q.ease,d="keyframes"}const b=ST(p.owner.current,g,i,{...this.options,duration:r,times:u,ease:f});return b.startTime=v??this.calcStartTime(),this.pendingTimeline?(tg(b,this.pendingTimeline),this.pendingTimeline=void 0):b.onfinish=()=>{const{onComplete:S}=this.options;p.set(pr(i,this.options,l)),S&&S(),this.cancel(),this.resolveFinishedPromise()},{animation:b,duration:r,times:u,type:d,ease:f,keyframes:i}}get duration(){const{resolved:i}=this;if(!i)return 0;const{duration:l}=i;return ia(l)}get time(){const{resolved:i}=this;if(!i)return 0;const{animation:l}=i;return ia(l.currentTime||0)}set time(i){const{resolved:l}=this;if(!l)return;const{animation:r}=l;r.currentTime=sa(i)}get speed(){const{resolved:i}=this;if(!i)return 1;const{animation:l}=i;return l.playbackRate}set speed(i){const{resolved:l}=this;if(!l)return;const{animation:r}=l;r.playbackRate=i}get state(){const{resolved:i}=this;if(!i)return"idle";const{animation:l}=i;return l.playState}get startTime(){const{resolved:i}=this;if(!i)return null;const{animation:l}=i;return l.startTime}attachTimeline(i){if(!this._resolved)this.pendingTimeline=i;else{const{resolved:l}=this;if(!l)return an;const{animation:r}=l;tg(r,i)}return an}play(){if(this.isStopped)return;const{resolved:i}=this;if(!i)return;const{animation:l}=i;l.playState==="finished"&&this.updateFinishedPromise(),l.play()}pause(){const{resolved:i}=this;if(!i)return;const{animation:l}=i;l.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:i}=this;if(!i)return;const{animation:l,keyframes:r,duration:u,type:f,ease:d,times:p}=i;if(l.playState==="idle"||l.playState==="finished")return;if(this.time){const{motionValue:v,onUpdate:b,onComplete:S,element:x,...D}=this.options,w=new Ld({...D,keyframes:r,duration:u,type:f,ease:d,times:p,isGenerator:!0}),O=sa(this.time);v.setWithVelocity(w.sample(O-or).value,w.sample(O).value,or)}const{onStop:g}=this.options;g&&g(),this.cancel()}complete(){const{resolved:i}=this;i&&i.animation.finish()}cancel(){const{resolved:i}=this;i&&i.animation.cancel()}static supports(i){const{motionValue:l,name:r,repeatDelay:u,repeatType:f,damping:d,type:p}=i;if(!l||!l.owner||!(l.owner.current instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:v}=l.owner.getProps();return _T()&&r&&bT.has(r)&&!g&&!v&&!u&&f!=="mirror"&&d!==0&&p!=="inertia"}}const ET={type:"spring",stiffness:500,damping:25,restSpeed:10},CT=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),NT={type:"keyframes",duration:.8},DT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},kT=(a,{keyframes:i})=>i.length>2?NT:fs.has(a)?a.startsWith("scale")?CT(i[1]):ET:DT;function wT({when:a,delay:i,delayChildren:l,staggerChildren:r,staggerDirection:u,repeat:f,repeatType:d,repeatDelay:p,from:g,elapsed:v,...b}){return!!Object.keys(b).length}const Hd=(a,i,l,r={},u,f)=>d=>{const p=jd(r,a)||{},g=p.delay||r.delay||0;let{elapsed:v=0}=r;v=v-sa(g);let b={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:i.getVelocity(),...p,delay:-v,onUpdate:x=>{i.set(x),p.onUpdate&&p.onUpdate(x)},onComplete:()=>{d(),p.onComplete&&p.onComplete()},name:a,motionValue:i,element:f?void 0:u};wT(p)||(b={...b,...kT(a,b)}),b.duration&&(b.duration=sa(b.duration)),b.repeatDelay&&(b.repeatDelay=sa(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let S=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(b.duration=0,b.delay===0&&(S=!0)),S&&!f&&i.get()!==void 0){const x=pr(b.keyframes,p);if(x!==void 0)return ae.update(()=>{b.onUpdate(x),b.onComplete()}),new c_([])}return!f&&fg.supports(b)?new fg(b):new Ld(b)};function MT({protectedKeys:a,needsAnimating:i},l){const r=a.hasOwnProperty(l)&&i[l]!==!0;return i[l]=!1,r}function jv(a,i,{delay:l=0,transitionOverride:r,type:u}={}){var f;let{transition:d=a.getDefaultTransition(),transitionEnd:p,...g}=i;r&&(d=r);const v=[],b=u&&a.animationState&&a.animationState.getState()[u];for(const S in g){const x=a.getValue(S,(f=a.latestValues[S])!==null&&f!==void 0?f:null),D=g[S];if(D===void 0||b&&MT(b,S))continue;const w={delay:l,...jd(d||{},S)};let O=!1;if(window.MotionHandoffAnimation){const z=Z0(a);if(z){const X=window.MotionHandoffAnimation(z,S,ae);X!==null&&(w.startTime=X,O=!0)}}Yu(a,S),x.start(Hd(S,x,D,a.shouldReduceMotion&&I0.has(S)?{type:!1}:w,a,O));const q=x.animation;q&&v.push(q)}return p&&Promise.all(v).then(()=>{ae.update(()=>{p&&i_(a,p)})}),v}function Wu(a,i,l={}){var r;const u=mr(a,i,l.type==="exit"?(r=a.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:f=a.getDefaultTransition()||{}}=u||{};l.transitionOverride&&(f=l.transitionOverride);const d=u?()=>Promise.all(jv(a,u,l)):()=>Promise.resolve(),p=a.variantChildren&&a.variantChildren.size?(v=0)=>{const{delayChildren:b=0,staggerChildren:S,staggerDirection:x}=f;return OT(a,i,b+v,S,x,l)}:()=>Promise.resolve(),{when:g}=f;if(g){const[v,b]=g==="beforeChildren"?[d,p]:[p,d];return v().then(()=>b())}else return Promise.all([d(),p(l.delay)])}function OT(a,i,l=0,r=0,u=1,f){const d=[],p=(a.variantChildren.size-1)*r,g=u===1?(v=0)=>v*r:(v=0)=>p-v*r;return Array.from(a.variantChildren).sort(RT).forEach((v,b)=>{v.notify("AnimationStart",i),d.push(Wu(v,i,{...f,delay:l+g(b)}).then(()=>v.notify("AnimationComplete",i)))}),Promise.all(d)}function RT(a,i){return a.sortNodePosition(i)}function BT(a,i,l={}){a.notify("AnimationStart",i);let r;if(Array.isArray(i)){const u=i.map(f=>Wu(a,f,l));r=Promise.all(u)}else if(typeof i=="string")r=Wu(a,i,l);else{const u=typeof i=="function"?mr(a,i,l.custom):i;r=Promise.all(jv(a,u,l))}return r.then(()=>{a.notify("AnimationComplete",i)})}const zT=hd.length;function Ev(a){if(!a)return;if(!a.isControllingVariants){const l=a.parent?Ev(a.parent)||{}:{};return a.props.initial!==void 0&&(l.initial=a.props.initial),l}const i={};for(let l=0;l<zT;l++){const r=hd[l],u=a.props[r];(Tl(u)||u===!1)&&(i[r]=u)}return i}const UT=[...fd].reverse(),VT=fd.length;function LT(a){return i=>Promise.all(i.map(({animation:l,options:r})=>BT(a,l,r)))}function HT(a){let i=LT(a),l=hg(),r=!0;const u=g=>(v,b)=>{var S;const x=mr(a,b,g==="exit"?(S=a.presenceContext)===null||S===void 0?void 0:S.custom:void 0);if(x){const{transition:D,transitionEnd:w,...O}=x;v={...v,...O,...w}}return v};function f(g){i=g(a)}function d(g){const{props:v}=a,b=Ev(a.parent)||{},S=[],x=new Set;let D={},w=1/0;for(let q=0;q<VT;q++){const z=UT[q],X=l[z],R=v[z]!==void 0?v[z]:b[z],K=Tl(R),G=z===g?X.isActive:null;G===!1&&(w=q);let Q=R===b[z]&&R!==v[z]&&K;if(Q&&r&&a.manuallyAnimateOnMount&&(Q=!1),X.protectedKeys={...D},!X.isActive&&G===null||!R&&!X.prevProp||fr(R)||typeof R=="boolean")continue;const W=GT(X.prevProp,R);let V=W||z===g&&X.isActive&&!Q&&K||q>w&&K,F=!1;const rt=Array.isArray(R)?R:[R];let mt=rt.reduce(u(z),{});G===!1&&(mt={});const{prevResolvedValues:Et={}}=X,P={...Et,...mt},Lt=Z=>{V=!0,x.has(Z)&&(F=!0,x.delete(Z)),X.needsAnimating[Z]=!0;const at=a.getValue(Z);at&&(at.liveStyle=!1)};for(const Z in P){const at=mt[Z],tt=Et[Z];if(D.hasOwnProperty(Z))continue;let jt=!1;Iu(at)&&Iu(tt)?jt=!q0(at,tt):jt=at!==tt,jt?at!=null?Lt(Z):x.add(Z):at!==void 0&&x.has(Z)?Lt(Z):X.protectedKeys[Z]=!0}X.prevProp=R,X.prevResolvedValues=mt,X.isActive&&(D={...D,...mt}),r&&a.blockInitialAnimation&&(V=!1),V&&(!(Q&&W)||F)&&S.push(...rt.map(Z=>({animation:Z,options:{type:z}})))}if(x.size){const q={};x.forEach(z=>{const X=a.getBaseTarget(z),R=a.getValue(z);R&&(R.liveStyle=!0),q[z]=X??null}),S.push({animation:q})}let O=!!S.length;return r&&(v.initial===!1||v.initial===v.animate)&&!a.manuallyAnimateOnMount&&(O=!1),r=!1,O?i(S):Promise.resolve()}function p(g,v){var b;if(l[g].isActive===v)return Promise.resolve();(b=a.variantChildren)===null||b===void 0||b.forEach(x=>{var D;return(D=x.animationState)===null||D===void 0?void 0:D.setActive(g,v)}),l[g].isActive=v;const S=d(g);for(const x in l)l[x].protectedKeys={};return S}return{animateChanges:d,setActive:p,setAnimateFunction:f,getState:()=>l,reset:()=>{l=hg(),r=!0}}}function GT(a,i){return typeof i=="string"?i!==a:Array.isArray(i)?!q0(i,a):!1}function ls(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hg(){return{animate:ls(!0),whileInView:ls(),whileHover:ls(),whileTap:ls(),whileDrag:ls(),whileFocus:ls(),exit:ls()}}class La{constructor(i){this.isMounted=!1,this.node=i}update(){}}class qT extends La{constructor(i){super(i),i.animationState||(i.animationState=HT(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();fr(i)&&(this.unmountControls=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:l}=this.node.prevProps||{};i!==l&&this.updateAnimationControlsSubscription()}unmount(){var i;this.node.animationState.reset(),(i=this.unmountControls)===null||i===void 0||i.call(this)}}let IT=0;class YT extends La{constructor(){super(...arguments),this.id=IT++}update(){if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:l}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===r)return;const u=this.node.animationState.setActive("exit",!i);l&&!i&&u.then(()=>l(this.id))}mount(){const{register:i}=this.node.presenceContext||{};i&&(this.unmount=i(this.id))}unmount(){}}const ZT={animation:{Feature:qT},exit:{Feature:YT}},jn={x:!1,y:!1};function Cv(){return jn.x||jn.y}function XT(a){return a==="x"||a==="y"?jn[a]?null:(jn[a]=!0,()=>{jn[a]=!1}):jn.x||jn.y?null:(jn.x=jn.y=!0,()=>{jn.x=jn.y=!1})}const Gd=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1;function El(a,i,l,r={passive:!0}){return a.addEventListener(i,l,r),()=>a.removeEventListener(i,l)}function kl(a){return{point:{x:a.pageX,y:a.pageY}}}const KT=a=>i=>Gd(i)&&a(i,kl(i));function bl(a,i,l,r){return El(a,i,KT(l),r)}const mg=(a,i)=>Math.abs(a-i);function QT(a,i){const l=mg(a.x,i.x),r=mg(a.y,i.y);return Math.sqrt(l**2+r**2)}class Nv{constructor(i,l,{transformPagePoint:r,contextWindow:u,dragSnapToOrigin:f=!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 S=Ou(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,D=QT(S.offset,{x:0,y:0})>=3;if(!x&&!D)return;const{point:w}=S,{timestamp:O}=ze;this.history.push({...w,timestamp:O});const{onStart:q,onMove:z}=this.handlers;x||(q&&q(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),z&&z(this.lastMoveEvent,S)},this.handlePointerMove=(S,x)=>{this.lastMoveEvent=S,this.lastMoveEventInfo=Mu(x,this.transformPagePoint),ae.update(this.updatePoint,!0)},this.handlePointerUp=(S,x)=>{this.end();const{onEnd:D,onSessionEnd:w,resumeAnimation:O}=this.handlers;if(this.dragSnapToOrigin&&O&&O(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const q=Ou(S.type==="pointercancel"?this.lastMoveEventInfo:Mu(x,this.transformPagePoint),this.history);this.startEvent&&D&&D(S,q),w&&w(S,q)},!Gd(i))return;this.dragSnapToOrigin=f,this.handlers=l,this.transformPagePoint=r,this.contextWindow=u||window;const d=kl(i),p=Mu(d,this.transformPagePoint),{point:g}=p,{timestamp:v}=ze;this.history=[{...g,timestamp:v}];const{onSessionStart:b}=l;b&&b(i,Ou(p,this.history)),this.removeListeners=Dl(bl(this.contextWindow,"pointermove",this.handlePointerMove),bl(this.contextWindow,"pointerup",this.handlePointerUp),bl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(i){this.handlers=i}end(){this.removeListeners&&this.removeListeners(),Ua(this.updatePoint)}}function Mu(a,i){return i?{point:i(a.point)}:a}function pg(a,i){return{x:a.x-i.x,y:a.y-i.y}}function Ou({point:a},i){return{point:a,delta:pg(a,Dv(i)),offset:pg(a,PT(i)),velocity:FT(i,.1)}}function PT(a){return a[0]}function Dv(a){return a[a.length-1]}function FT(a,i){if(a.length<2)return{x:0,y:0};let l=a.length-1,r=null;const u=Dv(a);for(;l>=0&&(r=a[l],!(u.timestamp-r.timestamp>sa(i)));)l--;if(!r)return{x:0,y:0};const f=ia(u.timestamp-r.timestamp);if(f===0)return{x:0,y:0};const d={x:(u.x-r.x)/f,y:(u.y-r.y)/f};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const kv=1e-4,JT=1-kv,$T=1+kv,wv=.01,WT=0-wv,tx=0+wv;function ln(a){return a.max-a.min}function ex(a,i,l){return Math.abs(a-i)<=l}function gg(a,i,l,r=.5){a.origin=r,a.originPoint=re(i.min,i.max,a.origin),a.scale=ln(l)/ln(i),a.translate=re(l.min,l.max,a.origin)-a.originPoint,(a.scale>=JT&&a.scale<=$T||isNaN(a.scale))&&(a.scale=1),(a.translate>=WT&&a.translate<=tx||isNaN(a.translate))&&(a.translate=0)}function Sl(a,i,l,r){gg(a.x,i.x,l.x,r?r.originX:void 0),gg(a.y,i.y,l.y,r?r.originY:void 0)}function vg(a,i,l){a.min=l.min+i.min,a.max=a.min+ln(i)}function nx(a,i,l){vg(a.x,i.x,l.x),vg(a.y,i.y,l.y)}function yg(a,i,l){a.min=i.min-l.min,a.max=a.min+ln(i)}function _l(a,i,l){yg(a.x,i.x,l.x),yg(a.y,i.y,l.y)}function ax(a,{min:i,max:l},r){return i!==void 0&&a<i?a=r?re(i,a,r.min):Math.max(a,i):l!==void 0&&a>l&&(a=r?re(l,a,r.max):Math.min(a,l)),a}function bg(a,i,l){return{min:i!==void 0?a.min+i:void 0,max:l!==void 0?a.max+l-(a.max-a.min):void 0}}function sx(a,{top:i,left:l,bottom:r,right:u}){return{x:bg(a.x,l,u),y:bg(a.y,i,r)}}function Sg(a,i){let l=i.min-a.min,r=i.max-a.max;return i.max-i.min<a.max-a.min&&([l,r]=[r,l]),{min:l,max:r}}function ix(a,i){return{x:Sg(a.x,i.x),y:Sg(a.y,i.y)}}function lx(a,i){let l=.5;const r=ln(a),u=ln(i);return u>r?l=ci(i.min,i.max-r,a.min):r>u&&(l=ci(a.min,a.max-u,i.min)),la(0,1,l)}function ox(a,i){const l={};return i.min!==void 0&&(l.min=i.min-a.min),i.max!==void 0&&(l.max=i.max-a.min),l}const td=.35;function rx(a=td){return a===!1?a=0:a===!0&&(a=td),{x:_g(a,"left","right"),y:_g(a,"top","bottom")}}function _g(a,i,l){return{min:Tg(a,i),max:Tg(a,l)}}function Tg(a,i){return typeof a=="number"?a:a[i]||0}const xg=()=>({translate:0,scale:1,origin:0,originPoint:0}),ii=()=>({x:xg(),y:xg()}),Ag=()=>({min:0,max:0}),Se=()=>({x:Ag(),y:Ag()});function bn(a){return[a("x"),a("y")]}function Mv({top:a,left:i,right:l,bottom:r}){return{x:{min:i,max:l},y:{min:a,max:r}}}function cx({x:a,y:i}){return{top:i.min,right:a.max,bottom:i.max,left:a.min}}function ux(a,i){if(!i)return a;const l=i({x:a.left,y:a.top}),r=i({x:a.right,y:a.bottom});return{top:l.y,left:l.x,bottom:r.y,right:r.x}}function Ru(a){return a===void 0||a===1}function ed({scale:a,scaleX:i,scaleY:l}){return!Ru(a)||!Ru(i)||!Ru(l)}function rs(a){return ed(a)||Ov(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function Ov(a){return jg(a.x)||jg(a.y)}function jg(a){return a&&a!=="0%"}function rr(a,i,l){const r=a-l,u=i*r;return l+u}function Eg(a,i,l,r,u){return u!==void 0&&(a=rr(a,u,r)),rr(a,l,r)+i}function nd(a,i=0,l=1,r,u){a.min=Eg(a.min,i,l,r,u),a.max=Eg(a.max,i,l,r,u)}function Rv(a,{x:i,y:l}){nd(a.x,i.translate,i.scale,i.originPoint),nd(a.y,l.translate,l.scale,l.originPoint)}const Cg=.999999999999,Ng=1.0000000000001;function dx(a,i,l,r=!1){const u=l.length;if(!u)return;i.x=i.y=1;let f,d;for(let p=0;p<u;p++){f=l[p],d=f.projectionDelta;const{visualElement:g}=f.options;g&&g.props.style&&g.props.style.display==="contents"||(r&&f.options.layoutScroll&&f.scroll&&f!==f.root&&oi(a,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),d&&(i.x*=d.x.scale,i.y*=d.y.scale,Rv(a,d)),r&&rs(f.latestValues)&&oi(a,f.latestValues))}i.x<Ng&&i.x>Cg&&(i.x=1),i.y<Ng&&i.y>Cg&&(i.y=1)}function li(a,i){a.min=a.min+i,a.max=a.max+i}function Dg(a,i,l,r,u=.5){const f=re(a.min,a.max,u);nd(a,i,l,f,r)}function oi(a,i){Dg(a.x,i.x,i.scaleX,i.scale,i.originX),Dg(a.y,i.y,i.scaleY,i.scale,i.originY)}function Bv(a,i){return Mv(ux(a.getBoundingClientRect(),i))}function fx(a,i,l){const r=Bv(a,l),{scroll:u}=i;return u&&(li(r.x,u.offset.x),li(r.y,u.offset.y)),r}const zv=({current:a})=>a?a.ownerDocument.defaultView:null,hx=new WeakMap;class mx{constructor(i){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Se(),this.visualElement=i}start(i,{snapToCursor:l=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const u=b=>{const{dragSnapToOrigin:S}=this.getProps();S?this.pauseAnimation():this.stopAnimation(),l&&this.snapToCursor(kl(b).point)},f=(b,S)=>{const{drag:x,dragPropagation:D,onDragStart:w}=this.getProps();if(x&&!D&&(this.openDragLock&&this.openDragLock(),this.openDragLock=XT(x),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),bn(q=>{let z=this.getAxisMotionValue(q).get()||0;if(zn.test(z)){const{projection:X}=this.visualElement;if(X&&X.layout){const R=X.layout.layoutBox[q];R&&(z=ln(R)*(parseFloat(z)/100))}}this.originPoint[q]=z}),w&&ae.postRender(()=>w(b,S)),Yu(this.visualElement,"transform");const{animationState:O}=this.visualElement;O&&O.setActive("whileDrag",!0)},d=(b,S)=>{const{dragPropagation:x,dragDirectionLock:D,onDirectionLock:w,onDrag:O}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:q}=S;if(D&&this.currentDirection===null){this.currentDirection=px(q),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",S.point,q),this.updateAxis("y",S.point,q),this.visualElement.render(),O&&O(b,S)},p=(b,S)=>this.stop(b,S),g=()=>bn(b=>{var S;return this.getAnimationState(b)==="paused"&&((S=this.getAxisMotionValue(b).animation)===null||S===void 0?void 0:S.play())}),{dragSnapToOrigin:v}=this.getProps();this.panSession=new Nv(i,{onSessionStart:u,onStart:f,onMove:d,onSessionEnd:p,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,contextWindow:zv(this.visualElement)})}stop(i,l){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:u}=l;this.startAnimation(u);const{onDragEnd:f}=this.getProps();f&&ae.postRender(()=>f(i,l))}cancel(){this.isDragging=!1;const{projection:i,animationState:l}=this.visualElement;i&&(i.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}updateAxis(i,l,r){const{drag:u}=this.getProps();if(!r||!Jo(i,u,this.currentDirection))return;const f=this.getAxisMotionValue(i);let d=this.originPoint[i]+r[i];this.constraints&&this.constraints[i]&&(d=ax(d,this.constraints[i],this.elastic[i])),f.set(d)}resolveConstraints(){var i;const{dragConstraints:l,dragElastic:r}=this.getProps(),u=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)===null||i===void 0?void 0:i.layout,f=this.constraints;l&&ai(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&u?this.constraints=sx(u.layoutBox,l):this.constraints=!1,this.elastic=rx(r),f!==this.constraints&&u&&this.constraints&&!this.hasMutatedConstraints&&bn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=ox(u.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:i,onMeasureDragConstraints:l}=this.getProps();if(!i||!ai(i))return!1;const r=i.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const f=fx(r,u.root,this.visualElement.getTransformPagePoint());let d=ix(u.layout.layoutBox,f);if(l){const p=l(cx(d));this.hasMutatedConstraints=!!p,p&&(d=Mv(p))}return d}startAnimation(i){const{drag:l,dragMomentum:r,dragElastic:u,dragTransition:f,dragSnapToOrigin:d,onDragTransitionEnd:p}=this.getProps(),g=this.constraints||{},v=bn(b=>{if(!Jo(b,l,this.currentDirection))return;let S=g&&g[b]||{};d&&(S={min:0,max:0});const x=u?200:1e6,D=u?40:1e7,w={type:"inertia",velocity:r?i[b]:0,bounceStiffness:x,bounceDamping:D,timeConstant:750,restDelta:1,restSpeed:10,...f,...S};return this.startAxisValueAnimation(b,w)});return Promise.all(v).then(p)}startAxisValueAnimation(i,l){const r=this.getAxisMotionValue(i);return Yu(this.visualElement,i),r.start(Hd(i,r,0,l,this.visualElement,!1))}stopAnimation(){bn(i=>this.getAxisMotionValue(i).stop())}pauseAnimation(){bn(i=>{var l;return(l=this.getAxisMotionValue(i).animation)===null||l===void 0?void 0:l.pause()})}getAnimationState(i){var l;return(l=this.getAxisMotionValue(i).animation)===null||l===void 0?void 0:l.state}getAxisMotionValue(i){const l=`_drag${i.toUpperCase()}`,r=this.visualElement.getProps(),u=r[l];return u||this.visualElement.getValue(i,(r.initial?r.initial[i]:void 0)||0)}snapToCursor(i){bn(l=>{const{drag:r}=this.getProps();if(!Jo(l,r,this.currentDirection))return;const{projection:u}=this.visualElement,f=this.getAxisMotionValue(l);if(u&&u.layout){const{min:d,max:p}=u.layout.layoutBox[l];f.set(i[l]-re(d,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:i,dragConstraints:l}=this.getProps(),{projection:r}=this.visualElement;if(!ai(l)||!r||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};bn(d=>{const p=this.getAxisMotionValue(d);if(p&&this.constraints!==!1){const g=p.get();u[d]=lx({min:g,max:g},this.constraints[d])}});const{transformTemplate:f}=this.visualElement.getProps();this.visualElement.current.style.transform=f?f({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),bn(d=>{if(!Jo(d,i,null))return;const p=this.getAxisMotionValue(d),{min:g,max:v}=this.constraints[d];p.set(re(g,v,u[d]))})}addListeners(){if(!this.visualElement.current)return;hx.set(this.visualElement,this);const i=this.visualElement.current,l=bl(i,"pointerdown",g=>{const{drag:v,dragListener:b=!0}=this.getProps();v&&b&&this.start(g)}),r=()=>{const{dragConstraints:g}=this.getProps();ai(g)&&g.current&&(this.constraints=this.resolveRefConstraints())},{projection:u}=this.visualElement,f=u.addEventListener("measure",r);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),ae.read(r);const d=El(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:g,hasLayoutChanged:v})=>{this.isDragging&&v&&(bn(b=>{const S=this.getAxisMotionValue(b);S&&(this.originPoint[b]+=g[b].translate,S.set(S.get()+g[b].translate))}),this.visualElement.render())}));return()=>{d(),l(),f(),p&&p()}}getProps(){const i=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:r=!1,dragPropagation:u=!1,dragConstraints:f=!1,dragElastic:d=td,dragMomentum:p=!0}=i;return{...i,drag:l,dragDirectionLock:r,dragPropagation:u,dragConstraints:f,dragElastic:d,dragMomentum:p}}}function Jo(a,i,l){return(i===!0||i===a)&&(l===null||l===a)}function px(a,i=10){let l=null;return Math.abs(a.y)>i?l="y":Math.abs(a.x)>i&&(l="x"),l}class gx extends La{constructor(i){super(i),this.removeGroupControls=an,this.removeListeners=an,this.controls=new mx(i)}mount(){const{dragControls:i}=this.node.getProps();i&&(this.removeGroupControls=i.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||an}unmount(){this.removeGroupControls(),this.removeListeners()}}const kg=a=>(i,l)=>{a&&ae.postRender(()=>a(i,l))};class vx extends La{constructor(){super(...arguments),this.removePointerDownListener=an}onPointerDown(i){this.session=new Nv(i,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zv(this.node)})}createPanHandlers(){const{onPanSessionStart:i,onPanStart:l,onPan:r,onPanEnd:u}=this.node.getProps();return{onSessionStart:kg(i),onStart:kg(l),onMove:r,onEnd:(f,d)=>{delete this.session,u&&ae.postRender(()=>u(f,d))}}}mount(){this.removePointerDownListener=bl(this.node.current,"pointerdown",i=>this.onPointerDown(i))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const er={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wg(a,i){return i.max===i.min?0:a/(i.max-i.min)*100}const fl={correct:(a,i)=>{if(!i.target)return a;if(typeof a=="string")if(yt.test(a))a=parseFloat(a);else return a;const l=wg(a,i.target.x),r=wg(a,i.target.y);return`${l}% ${r}%`}},yx={correct:(a,{treeScale:i,projectionDelta:l})=>{const r=a,u=Va.parse(a);if(u.length>5)return r;const f=Va.createTransformer(a),d=typeof u[0]!="number"?1:0,p=l.x.scale*i.x,g=l.y.scale*i.y;u[0+d]/=p,u[1+d]/=g;const v=re(p,g,.5);return typeof u[2+d]=="number"&&(u[2+d]/=v),typeof u[3+d]=="number"&&(u[3+d]/=v),f(u)}};class bx extends _.Component{componentDidMount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:r,layoutId:u}=this.props,{projection:f}=i;Z1(Sx),f&&(l.group&&l.group.add(f),r&&r.register&&u&&r.register(f),f.root.didUpdate(),f.addEventListener("animationComplete",()=>{this.safeToRemove()}),f.setOptions({...f.options,onExitComplete:()=>this.safeToRemove()})),er.hasEverUpdated=!0}getSnapshotBeforeUpdate(i){const{layoutDependency:l,visualElement:r,drag:u,isPresent:f}=this.props,d=r.projection;return d&&(d.isPresent=f,u||i.layoutDependency!==l||l===void 0?d.willUpdate():this.safeToRemove(),i.isPresent!==f&&(f?d.promote():d.relegate()||ae.postRender(()=>{const p=d.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:i}=this.props.visualElement;i&&(i.root.didUpdate(),pd.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:r}=this.props,{projection:u}=i;u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),r&&r.deregister&&r.deregister(u))}safeToRemove(){const{safeToRemove:i}=this.props;i&&i()}render(){return null}}function Uv(a){const[i,l]=_0(),r=_.useContext(rd);return m.jsx(bx,{...a,layoutGroup:r,switchLayoutGroup:_.useContext(D0),isPresent:i,safeToRemove:l})}const Sx={borderRadius:{...fl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fl,borderTopRightRadius:fl,borderBottomLeftRadius:fl,borderBottomRightRadius:fl,boxShadow:yx};function _x(a,i,l){const r=Ve(a)?a:Al(a);return r.start(Hd("",r,i,l)),r.animation}function Tx(a){return a instanceof SVGElement&&a.tagName!=="svg"}const xx=(a,i)=>a.depth-i.depth;class Ax{constructor(){this.children=[],this.isDirty=!1}add(i){Ed(this.children,i),this.isDirty=!0}remove(i){Cd(this.children,i),this.isDirty=!0}forEach(i){this.isDirty&&this.children.sort(xx),this.isDirty=!1,this.children.forEach(i)}}function jx(a,i){const l=Un.now(),r=({timestamp:u})=>{const f=u-l;f>=i&&(Ua(r),a(f-i))};return ae.read(r,!0),()=>Ua(r)}const Vv=["TopLeft","TopRight","BottomLeft","BottomRight"],Ex=Vv.length,Mg=a=>typeof a=="string"?parseFloat(a):a,Og=a=>typeof a=="number"||yt.test(a);function Cx(a,i,l,r,u,f){u?(a.opacity=re(0,l.opacity!==void 0?l.opacity:1,Nx(r)),a.opacityExit=re(i.opacity!==void 0?i.opacity:1,0,Dx(r))):f&&(a.opacity=re(i.opacity!==void 0?i.opacity:1,l.opacity!==void 0?l.opacity:1,r));for(let d=0;d<Ex;d++){const p=`border${Vv[d]}Radius`;let g=Rg(i,p),v=Rg(l,p);if(g===void 0&&v===void 0)continue;g||(g=0),v||(v=0),g===0||v===0||Og(g)===Og(v)?(a[p]=Math.max(re(Mg(g),Mg(v),r),0),(zn.test(v)||zn.test(g))&&(a[p]+="%")):a[p]=v}(i.rotate||l.rotate)&&(a.rotate=re(i.rotate||0,l.rotate||0,r))}function Rg(a,i){return a[i]!==void 0?a[i]:a.borderRadius}const Nx=Lv(0,.5,ev),Dx=Lv(.5,.95,an);function Lv(a,i,l){return r=>r<a?0:r>i?1:l(ci(a,i,r))}function Bg(a,i){a.min=i.min,a.max=i.max}function yn(a,i){Bg(a.x,i.x),Bg(a.y,i.y)}function zg(a,i){a.translate=i.translate,a.scale=i.scale,a.originPoint=i.originPoint,a.origin=i.origin}function Ug(a,i,l,r,u){return a-=i,a=rr(a,1/l,r),u!==void 0&&(a=rr(a,1/u,r)),a}function kx(a,i=0,l=1,r=.5,u,f=a,d=a){if(zn.test(i)&&(i=parseFloat(i),i=re(d.min,d.max,i/100)-d.min),typeof i!="number")return;let p=re(f.min,f.max,r);a===f&&(p-=i),a.min=Ug(a.min,i,l,p,u),a.max=Ug(a.max,i,l,p,u)}function Vg(a,i,[l,r,u],f,d){kx(a,i[l],i[r],i[u],i.scale,f,d)}const wx=["x","scaleX","originX"],Mx=["y","scaleY","originY"];function Lg(a,i,l,r){Vg(a.x,i,wx,l?l.x:void 0,r?r.x:void 0),Vg(a.y,i,Mx,l?l.y:void 0,r?r.y:void 0)}function Hg(a){return a.translate===0&&a.scale===1}function Hv(a){return Hg(a.x)&&Hg(a.y)}function Gg(a,i){return a.min===i.min&&a.max===i.max}function Ox(a,i){return Gg(a.x,i.x)&&Gg(a.y,i.y)}function qg(a,i){return Math.round(a.min)===Math.round(i.min)&&Math.round(a.max)===Math.round(i.max)}function Gv(a,i){return qg(a.x,i.x)&&qg(a.y,i.y)}function Ig(a){return ln(a.x)/ln(a.y)}function Yg(a,i){return a.translate===i.translate&&a.scale===i.scale&&a.originPoint===i.originPoint}class Rx{constructor(){this.members=[]}add(i){Ed(this.members,i),i.scheduleRender()}remove(i){if(Cd(this.members,i),i===this.prevLead&&(this.prevLead=void 0),i===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(i){const l=this.members.findIndex(u=>i===u);if(l===0)return!1;let r;for(let u=l;u>=0;u--){const f=this.members[u];if(f.isPresent!==!1){r=f;break}}return r?(this.promote(r),!0):!1}promote(i,l){const r=this.lead;if(i!==r&&(this.prevLead=r,this.lead=i,i.show(),r)){r.instance&&r.scheduleRender(),i.scheduleRender(),i.resumeFrom=r,l&&(i.resumeFrom.preserveOpacity=!0),r.snapshot&&(i.snapshot=r.snapshot,i.snapshot.latestValues=r.animationValues||r.latestValues),i.root&&i.root.isUpdating&&(i.isLayoutDirty=!0);const{crossfade:u}=i.options;u===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(i=>{const{options:l,resumingFrom:r}=i;l.onExitComplete&&l.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(i=>{i.instance&&i.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Bx(a,i,l){let r="";const u=a.x.translate/i.x,f=a.y.translate/i.y,d=(l==null?void 0:l.z)||0;if((u||f||d)&&(r=`translate3d(${u}px, ${f}px, ${d}px) `),(i.x!==1||i.y!==1)&&(r+=`scale(${1/i.x}, ${1/i.y}) `),l){const{transformPerspective:v,rotate:b,rotateX:S,rotateY:x,skewX:D,skewY:w}=l;v&&(r=`perspective(${v}px) ${r}`),b&&(r+=`rotate(${b}deg) `),S&&(r+=`rotateX(${S}deg) `),x&&(r+=`rotateY(${x}deg) `),D&&(r+=`skewX(${D}deg) `),w&&(r+=`skewY(${w}deg) `)}const p=a.x.scale*i.x,g=a.y.scale*i.y;return(p!==1||g!==1)&&(r+=`scale(${p}, ${g})`),r||"none"}const cs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},pl=typeof window<"u"&&window.MotionDebug!==void 0,Bu=["","X","Y","Z"],zx={visibility:"hidden"},Zg=1e3;let Ux=0;function zu(a,i,l,r){const{latestValues:u}=i;u[a]&&(l[a]=u[a],i.setStaticValue(a,0),r&&(r[a]=0))}function qv(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:i}=a.options;if(!i)return;const l=Z0(i);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:f}=a.options;window.MotionCancelOptimisedAnimation(l,"transform",ae,!(u||f))}const{parent:r}=a;r&&!r.hasCheckedOptimisedAppear&&qv(r)}function Iv({attachResizeListener:a,defaultParent:i,measureScroll:l,checkIsScrollRoot:r,resetTransform:u}){return class{constructor(d={},p=i==null?void 0:i()){this.id=Ux++,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,pl&&(cs.totalNodes=cs.resolvedTargetDeltas=cs.recalculatedProjection=0),this.nodes.forEach(Hx),this.nodes.forEach(Zx),this.nodes.forEach(Xx),this.nodes.forEach(Gx),pl&&window.MotionDebug.record(cs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let g=0;g<this.path.length;g++)this.path[g].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ax)}addEventListener(d,p){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new Nd),this.eventHandlers.get(d).add(p)}notifyListeners(d,...p){const g=this.eventHandlers.get(d);g&&g.notify(...p)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Tx(d),this.instance=d;const{layoutId:g,layout:v,visualElement:b}=this.options;if(b&&!b.current&&b.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(v||g)&&(this.isLayoutDirty=!0),a){let S;const x=()=>this.root.updateBlockedByResize=!1;a(d,()=>{this.root.updateBlockedByResize=!0,S&&S(),S=jx(x,250),er.hasAnimatedSinceResize&&(er.hasAnimatedSinceResize=!1,this.nodes.forEach(Kg))})}g&&this.root.registerSharedNode(g,this),this.options.animate!==!1&&b&&(g||v)&&this.addEventListener("didUpdate",({delta:S,hasLayoutChanged:x,hasRelativeTargetChanged:D,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=this.options.transition||b.getDefaultTransition()||Jx,{onLayoutAnimationStart:q,onLayoutAnimationComplete:z}=b.getProps(),X=!this.targetLayout||!Gv(this.targetLayout,w)||D,R=!x&&D;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||R||x&&(X||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(S,R);const K={...jd(O,"layout"),onPlay:q,onComplete:z};(b.shouldReduceMotion||this.options.layoutRoot)&&(K.delay=0,K.type=!1),this.startAnimation(K)}else x||Kg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}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,Ua(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(Kx),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&&qv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const S=this.path[b];S.shouldResetTransform=!0,S.updateScroll("snapshot"),S.options.layoutRoot&&S.willUpdate(!1)}const{layoutId:p,layout:g}=this.options;if(p===void 0&&!g)return;const v=this.getTransformTemplate();this.prevTransformTemplateValue=v?v(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Xg);return}this.isUpdating||this.nodes.forEach(Ix),this.isUpdating=!1,this.nodes.forEach(Yx),this.nodes.forEach(Vx),this.nodes.forEach(Lx),this.clearAllSnapshots();const p=Un.now();ze.delta=la(0,1e3/60,p-ze.timestamp),ze.timestamp=p,ze.isProcessing=!0,Cu.update.process(ze),Cu.preRender.process(ze),Cu.render.process(ze),ze.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qx),this.sharedNodes.forEach(Qx)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ae.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ae.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 g=0;g<this.path.length;g++)this.path[g].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Se(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(p=!1),p){const g=r(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:g,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:g}}}resetTransform(){if(!u)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!Hv(this.projectionDelta),g=this.getTransformTemplate(),v=g?g(this.latestValues,""):void 0,b=v!==this.prevTransformTemplateValue;d&&(p||rs(this.latestValues)||b)&&(u(this.instance,v),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const p=this.measurePageBox();let g=this.removeElementScroll(p);return d&&(g=this.removeTransform(g)),$x(g),{animationId:this.root.animationId,measuredBox:p,layoutBox:g,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:p}=this.options;if(!p)return Se();const g=p.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(Wx))){const{scroll:b}=this.root;b&&(li(g.x,b.offset.x),li(g.y,b.offset.y))}return g}removeElementScroll(d){var p;const g=Se();if(yn(g,d),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return g;for(let v=0;v<this.path.length;v++){const b=this.path[v],{scroll:S,options:x}=b;b!==this.root&&S&&x.layoutScroll&&(S.wasRoot&&yn(g,d),li(g.x,S.offset.x),li(g.y,S.offset.y))}return g}applyTransform(d,p=!1){const g=Se();yn(g,d);for(let v=0;v<this.path.length;v++){const b=this.path[v];!p&&b.options.layoutScroll&&b.scroll&&b!==b.root&&oi(g,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),rs(b.latestValues)&&oi(g,b.latestValues)}return rs(this.latestValues)&&oi(g,this.latestValues),g}removeTransform(d){const p=Se();yn(p,d);for(let g=0;g<this.path.length;g++){const v=this.path[g];if(!v.instance||!rs(v.latestValues))continue;ed(v.latestValues)&&v.updateSnapshot();const b=Se(),S=v.measurePageBox();yn(b,S),Lg(p,v.latestValues,v.snapshot?v.snapshot.layoutBox:void 0,b)}return rs(this.latestValues)&&Lg(p,this.latestValues),p}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!==ze.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var p;const g=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=g.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=g.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=g.isSharedProjectionDirty);const v=!!this.resumingFrom||this!==g;if(!(d||v&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:S,layoutId:x}=this.options;if(!(!this.layout||!(S||x))){if(this.resolvedRelativeTargetAt=ze.timestamp,!this.targetDelta&&!this.relativeTarget){const D=this.getClosestProjectingParent();D&&D.layout&&this.animationProgress!==1?(this.relativeParent=D,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),_l(this.relativeTargetOrigin,this.layout.layoutBox,D.layout.layoutBox),yn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Se(),this.targetWithTransforms=Se()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),nx(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):yn(this.target,this.layout.layoutBox),Rv(this.target,this.targetDelta)):yn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const D=this.getClosestProjectingParent();D&&!!D.resumingFrom==!!this.resumingFrom&&!D.options.layoutScroll&&D.target&&this.animationProgress!==1?(this.relativeParent=D,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),_l(this.relativeTargetOrigin,this.target,D.target),yn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}pl&&cs.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ed(this.parent.latestValues)||Ov(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 p=this.getLead(),g=!!this.resumingFrom||this!==p;let v=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(v=!1),g&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(v=!1),this.resolvedRelativeTargetAt===ze.timestamp&&(v=!1),v)return;const{layout:b,layoutId:S}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(b||S))return;yn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,D=this.treeScale.y;dx(this.layoutCorrected,this.treeScale,this.path,g),p.layout&&!p.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(p.target=p.layout.layoutBox,p.targetWithTransforms=Se());const{target:w}=p;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zg(this.prevProjectionDelta.x,this.projectionDelta.x),zg(this.prevProjectionDelta.y,this.projectionDelta.y)),Sl(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==D||!Yg(this.projectionDelta.x,this.prevProjectionDelta.x)||!Yg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w)),pl&&cs.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var p;if((p=this.options.visualElement)===null||p===void 0||p.scheduleRender(),d){const g=this.getStack();g&&g.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ii(),this.projectionDelta=ii(),this.projectionDeltaWithTransform=ii()}setAnimationOrigin(d,p=!1){const g=this.snapshot,v=g?g.latestValues:{},b={...this.latestValues},S=ii();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const x=Se(),D=g?g.source:void 0,w=this.layout?this.layout.source:void 0,O=D!==w,q=this.getStack(),z=!q||q.members.length<=1,X=!!(O&&!z&&this.options.crossfade===!0&&!this.path.some(Fx));this.animationProgress=0;let R;this.mixTargetDelta=K=>{const G=K/1e3;Qg(S.x,d.x,G),Qg(S.y,d.y,G),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_l(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Px(this.relativeTarget,this.relativeTargetOrigin,x,G),R&&Ox(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Se()),yn(R,this.relativeTarget)),O&&(this.animationValues=b,Cx(b,v,this.latestValues,G,X,z)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=G},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&&(Ua(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ae.update(()=>{er.hasAnimatedSinceResize=!0,this.currentAnimation=_x(0,Zg,{...d,onUpdate:p=>{this.mixTargetDelta(p),d.onUpdate&&d.onUpdate(p)},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(Zg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:p,target:g,layout:v,latestValues:b}=d;if(!(!p||!g||!v)){if(this!==d&&this.layout&&v&&Yv(this.options.animationType,this.layout.layoutBox,v.layoutBox)){g=this.target||Se();const S=ln(this.layout.layoutBox.x);g.x.min=d.target.x.min,g.x.max=g.x.min+S;const x=ln(this.layout.layoutBox.y);g.y.min=d.target.y.min,g.y.max=g.y.min+x}yn(p,g),oi(p,b),Sl(this.projectionDeltaWithTransform,this.layoutCorrected,p,b)}}registerSharedNode(d,p){this.sharedNodes.has(d)||this.sharedNodes.set(d,new Rx),this.sharedNodes.get(d).add(p);const v=p.options.initialPromotionConfig;p.promote({transition:v?v.transition:void 0,preserveFollowOpacity:v&&v.shouldPreserveFollowOpacity?v.shouldPreserveFollowOpacity(p):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var d;const{layoutId:p}=this.options;return p?((d=this.getStack())===null||d===void 0?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:p}=this.options;return p?(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:p,preserveFollowOpacity:g}={}){const v=this.getStack();v&&v.promote(this,g),d&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let p=!1;const{latestValues:g}=d;if((g.z||g.rotate||g.rotateX||g.rotateY||g.rotateZ||g.skewX||g.skewY)&&(p=!0),!p)return;const v={};g.z&&zu("z",d,v,this.animationValues);for(let b=0;b<Bu.length;b++)zu(`rotate${Bu[b]}`,d,v,this.animationValues),zu(`skew${Bu[b]}`,d,v,this.animationValues);d.render();for(const b in v)d.setStaticValue(b,v[b]),this.animationValues&&(this.animationValues[b]=v[b]);d.scheduleRender()}getProjectionStyles(d){var p,g;if(!this.instance||this.isSVG)return;if(!this.isVisible)return zx;const v={visibility:""},b=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,v.opacity="",v.pointerEvents=Wo(d==null?void 0:d.pointerEvents)||"",v.transform=b?b(this.latestValues,""):"none",v;const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){const O={};return this.options.layoutId&&(O.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,O.pointerEvents=Wo(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!rs(this.latestValues)&&(O.transform=b?b({},""):"none",this.hasProjected=!1),O}const x=S.animationValues||S.latestValues;this.applyTransformsToTarget(),v.transform=Bx(this.projectionDeltaWithTransform,this.treeScale,x),b&&(v.transform=b(x,v.transform));const{x:D,y:w}=this.projectionDelta;v.transformOrigin=`${D.origin*100}% ${w.origin*100}% 0`,S.animationValues?v.opacity=S===this?(g=(p=x.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&g!==void 0?g:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:v.opacity=S===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const O in ar){if(x[O]===void 0)continue;const{correct:q,applyTo:z}=ar[O],X=v.transform==="none"?x[O]:q(x[O],S);if(z){const R=z.length;for(let K=0;K<R;K++)v[z[K]]=X}else v[O]=X}return this.options.layoutId&&(v.pointerEvents=S===this?Wo(d==null?void 0:d.pointerEvents)||"":"none"),v}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var p;return(p=d.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(Xg),this.root.sharedNodes.clear()}}}function Vx(a){a.updateLayout()}function Lx(a){var i;const l=((i=a.resumeFrom)===null||i===void 0?void 0:i.snapshot)||a.snapshot;if(a.isLead()&&a.layout&&l&&a.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:u}=a.layout,{animationType:f}=a.options,d=l.source!==a.layout.source;f==="size"?bn(S=>{const x=d?l.measuredBox[S]:l.layoutBox[S],D=ln(x);x.min=r[S].min,x.max=x.min+D}):Yv(f,l.layoutBox,r)&&bn(S=>{const x=d?l.measuredBox[S]:l.layoutBox[S],D=ln(r[S]);x.max=x.min+D,a.relativeTarget&&!a.currentAnimation&&(a.isProjectionDirty=!0,a.relativeTarget[S].max=a.relativeTarget[S].min+D)});const p=ii();Sl(p,r,l.layoutBox);const g=ii();d?Sl(g,a.applyTransform(u,!0),l.measuredBox):Sl(g,r,l.layoutBox);const v=!Hv(p);let b=!1;if(!a.resumeFrom){const S=a.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:x,layout:D}=S;if(x&&D){const w=Se();_l(w,l.layoutBox,x.layoutBox);const O=Se();_l(O,r,D.layoutBox),Gv(w,O)||(b=!0),S.options.layoutRoot&&(a.relativeTarget=O,a.relativeTargetOrigin=w,a.relativeParent=S)}}}a.notifyListeners("didUpdate",{layout:r,snapshot:l,delta:g,layoutDelta:p,hasLayoutChanged:v,hasRelativeTargetChanged:b})}else if(a.isLead()){const{onExitComplete:r}=a.options;r&&r()}a.options.transition=void 0}function Hx(a){pl&&cs.totalNodes++,a.parent&&(a.isProjecting()||(a.isProjectionDirty=a.parent.isProjectionDirty),a.isSharedProjectionDirty||(a.isSharedProjectionDirty=!!(a.isProjectionDirty||a.parent.isProjectionDirty||a.parent.isSharedProjectionDirty)),a.isTransformDirty||(a.isTransformDirty=a.parent.isTransformDirty))}function Gx(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function qx(a){a.clearSnapshot()}function Xg(a){a.clearMeasurements()}function Ix(a){a.isLayoutDirty=!1}function Yx(a){const{visualElement:i}=a.options;i&&i.getProps().onBeforeLayoutMeasure&&i.notify("BeforeLayoutMeasure"),a.resetTransform()}function Kg(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function Zx(a){a.resolveTargetDelta()}function Xx(a){a.calcProjection()}function Kx(a){a.resetSkewAndRotation()}function Qx(a){a.removeLeadSnapshot()}function Qg(a,i,l){a.translate=re(i.translate,0,l),a.scale=re(i.scale,1,l),a.origin=i.origin,a.originPoint=i.originPoint}function Pg(a,i,l,r){a.min=re(i.min,l.min,r),a.max=re(i.max,l.max,r)}function Px(a,i,l,r){Pg(a.x,i.x,l.x,r),Pg(a.y,i.y,l.y,r)}function Fx(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const Jx={duration:.45,ease:[.4,0,.1,1]},Fg=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),Jg=Fg("applewebkit/")&&!Fg("chrome/")?Math.round:an;function $g(a){a.min=Jg(a.min),a.max=Jg(a.max)}function $x(a){$g(a.x),$g(a.y)}function Yv(a,i,l){return a==="position"||a==="preserve-aspect"&&!ex(Ig(i),Ig(l),.2)}function Wx(a){var i;return a!==a.root&&((i=a.scroll)===null||i===void 0?void 0:i.wasRoot)}const t2=Iv({attachResizeListener:(a,i)=>El(a,"resize",i),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Uu={current:void 0},Zv=Iv({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Uu.current){const a=new t2({});a.mount(window),a.setOptions({layoutScroll:!0}),Uu.current=a}return Uu.current},resetTransform:(a,i)=>{a.style.transform=i!==void 0?i:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),e2={pan:{Feature:vx},drag:{Feature:gx,ProjectionNode:Zv,MeasureLayout:Uv}};function n2(a,i,l){var r;if(a instanceof Element)return[a];if(typeof a=="string"){let u=document;const f=(r=void 0)!==null&&r!==void 0?r:u.querySelectorAll(a);return f?Array.from(f):[]}return Array.from(a)}function Xv(a,i){const l=n2(a),r=new AbortController,u={passive:!0,...i,signal:r.signal};return[l,u,()=>r.abort()]}function Wg(a){return i=>{i.pointerType==="touch"||Cv()||a(i)}}function a2(a,i,l={}){const[r,u,f]=Xv(a,l),d=Wg(p=>{const{target:g}=p,v=i(p);if(typeof v!="function"||!g)return;const b=Wg(S=>{v(S),g.removeEventListener("pointerleave",b)});g.addEventListener("pointerleave",b,u)});return r.forEach(p=>{p.addEventListener("pointerenter",d,u)}),f}function t0(a,i,l){const{props:r}=a;a.animationState&&r.whileHover&&a.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,f=r[u];f&&ae.postRender(()=>f(i,kl(i)))}class s2 extends La{mount(){const{current:i}=this.node;i&&(this.unmount=a2(i,l=>(t0(this.node,l,"Start"),r=>t0(this.node,r,"End"))))}unmount(){}}class i2 extends La{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!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=Dl(El(this.node.current,"focus",()=>this.onFocus()),El(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Kv=(a,i)=>i?a===i?!0:Kv(a,i.parentElement):!1,l2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function o2(a){return l2.has(a.tagName)||a.tabIndex!==-1}const gl=new WeakSet;function e0(a){return i=>{i.key==="Enter"&&a(i)}}function Vu(a,i){a.dispatchEvent(new PointerEvent("pointer"+i,{isPrimary:!0,bubbles:!0}))}const r2=(a,i)=>{const l=a.currentTarget;if(!l)return;const r=e0(()=>{if(gl.has(l))return;Vu(l,"down");const u=e0(()=>{Vu(l,"up")}),f=()=>Vu(l,"cancel");l.addEventListener("keyup",u,i),l.addEventListener("blur",f,i)});l.addEventListener("keydown",r,i),l.addEventListener("blur",()=>l.removeEventListener("keydown",r),i)};function n0(a){return Gd(a)&&!Cv()}function c2(a,i,l={}){const[r,u,f]=Xv(a,l),d=p=>{const g=p.currentTarget;if(!n0(p)||gl.has(g))return;gl.add(g);const v=i(p),b=(D,w)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",x),!(!n0(D)||!gl.has(g))&&(gl.delete(g),typeof v=="function"&&v(D,{success:w}))},S=D=>{b(D,l.useGlobalTarget||Kv(g,D.target))},x=D=>{b(D,!1)};window.addEventListener("pointerup",S,u),window.addEventListener("pointercancel",x,u)};return r.forEach(p=>{!o2(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(l.useGlobalTarget?window:p).addEventListener("pointerdown",d,u),p.addEventListener("focus",v=>r2(v,u),u)}),f}function a0(a,i,l){const{props:r}=a;a.animationState&&r.whileTap&&a.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),f=r[u];f&&ae.postRender(()=>f(i,kl(i)))}class u2 extends La{mount(){const{current:i}=this.node;i&&(this.unmount=c2(i,l=>(a0(this.node,l,"Start"),(r,{success:u})=>a0(this.node,r,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ad=new WeakMap,Lu=new WeakMap,d2=a=>{const i=ad.get(a.target);i&&i(a)},f2=a=>{a.forEach(d2)};function h2({root:a,...i}){const l=a||document;Lu.has(l)||Lu.set(l,{});const r=Lu.get(l),u=JSON.stringify(i);return r[u]||(r[u]=new IntersectionObserver(f2,{root:a,...i})),r[u]}function m2(a,i,l){const r=h2(i);return ad.set(a,l),r.observe(a),()=>{ad.delete(a),r.unobserve(a)}}const p2={some:0,all:1};class g2 extends La{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:i={}}=this.node.getProps(),{root:l,margin:r,amount:u="some",once:f}=i,d={root:l?l.current:void 0,rootMargin:r,threshold:typeof u=="number"?u:p2[u]},p=g=>{const{isIntersecting:v}=g;if(this.isInView===v||(this.isInView=v,f&&!v&&this.hasEnteredView))return;v&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",v);const{onViewportEnter:b,onViewportLeave:S}=this.node.getProps(),x=v?b:S;x&&x(g)};return m2(this.node.current,d,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:l}=this.node;["amount","margin","root"].some(v2(i,l))&&this.startObserver()}unmount(){}}function v2({viewport:a={}},{viewport:i={}}={}){return l=>a[l]!==i[l]}const y2={inView:{Feature:g2},tap:{Feature:u2},focus:{Feature:i2},hover:{Feature:s2}},b2={layout:{ProjectionNode:Zv,MeasureLayout:Uv}},sd={current:null},Qv={current:!1};function S2(){if(Qv.current=!0,!!dd)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),i=()=>sd.current=a.matches;a.addListener(i),i()}else sd.current=!1}const _2=[...pv,Ue,Va],T2=a=>_2.find(mv(a)),s0=new WeakMap;function x2(a,i,l){for(const r in i){const u=i[r],f=l[r];if(Ve(u))a.addValue(r,u);else if(Ve(f))a.addValue(r,Al(u,{owner:a}));else if(f!==u)if(a.hasValue(r)){const d=a.getValue(r);d.liveStyle===!0?d.jump(u):d.hasAnimated||d.set(u)}else{const d=a.getStaticValue(r);a.addValue(r,Al(d!==void 0?d:u,{owner:a}))}}for(const r in l)i[r]===void 0&&a.removeValue(r);return i}const i0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class A2{scrapeMotionValuesFromProps(i,l,r){return{}}constructor({parent:i,props:l,presenceContext:r,reducedMotionConfig:u,blockInitialAnimation:f,visualState:d},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ud,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 D=Un.now();this.renderScheduledAt<D&&(this.renderScheduledAt=D,ae.render(this.render,!1,!0))};const{latestValues:g,renderState:v,onUpdate:b}=d;this.onUpdate=b,this.latestValues=g,this.baseTarget={...g},this.initialValues=l.initial?{...g}:{},this.renderState=v,this.parent=i,this.props=l,this.presenceContext=r,this.depth=i?i.depth+1:0,this.reducedMotionConfig=u,this.options=p,this.blockInitialAnimation=!!f,this.isControllingVariants=hr(l),this.isVariantNode=C0(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:S,...x}=this.scrapeMotionValuesFromProps(l,{},this);for(const D in x){const w=x[D];g[D]!==void 0&&Ve(w)&&w.set(g[D],!1)}}mount(i){this.current=i,s0.set(i,this),this.projection&&!this.projection.instance&&this.projection.mount(i),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,r)=>this.bindToMotionValue(r,l)),Qv.current||S2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:sd.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){s0.delete(this.current),this.projection&&this.projection.unmount(),Ua(this.notifyUpdate),Ua(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const l=this.features[i];l&&(l.unmount(),l.isMounted=!1)}this.current=null}bindToMotionValue(i,l){this.valueSubscriptions.has(i)&&this.valueSubscriptions.get(i)();const r=fs.has(i),u=l.on("change",p=>{this.latestValues[i]=p,this.props.onUpdate&&ae.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),f=l.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,i,l)),this.valueSubscriptions.set(i,()=>{u(),f(),d&&d(),l.owner&&l.stop()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}updateFeatures(){let i="animation";for(i in ri){const l=ri[i];if(!l)continue;const{isEnabled:r,Feature:u}=l;if(!this.features[i]&&u&&r(this.props)&&(this.features[i]=new u(this)),this.features[i]){const f=this.features[i];f.isMounted?f.update():(f.mount(),f.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Se()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,l){this.latestValues[i]=l}update(i,l){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let r=0;r<i0.length;r++){const u=i0[r];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const f="on"+u,d=i[f];d&&(this.propEventSubscriptions[u]=this.on(u,d))}this.prevMotionValues=x2(this,this.scrapeMotionValuesFromProps(i,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(i){return this.props.variants?this.props.variants[i]: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(i){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(i),()=>l.variantChildren.delete(i)}addValue(i,l){const r=this.values.get(i);l!==r&&(r&&this.removeValue(i),this.bindToMotionValue(i,l),this.values.set(i,l),this.latestValues[i]=l.get())}removeValue(i){this.values.delete(i);const l=this.valueSubscriptions.get(i);l&&(l(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,l){if(this.props.values&&this.props.values[i])return this.props.values[i];let r=this.values.get(i);return r===void 0&&l!==void 0&&(r=Al(l===null?void 0:l,{owner:this}),this.addValue(i,r)),r}readValue(i,l){var r;let u=this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:(r=this.getBaseTargetFromProps(this.props,i))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,i,this.options);return u!=null&&(typeof u=="string"&&(fv(u)||av(u))?u=parseFloat(u):!T2(u)&&Va.test(l)&&(u=cv(i,l)),this.setBaseTarget(i,Ve(u)?u.get():u)),Ve(u)?u.get():u}setBaseTarget(i,l){this.baseTarget[i]=l}getBaseTarget(i){var l;const{initial:r}=this.props;let u;if(typeof r=="string"||typeof r=="object"){const d=vd(this.props,r,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);d&&(u=d[i])}if(r&&u!==void 0)return u;const f=this.getBaseTargetFromProps(this.props,i);return f!==void 0&&!Ve(f)?f:this.initialValues[i]!==void 0&&u===void 0?void 0:this.baseTarget[i]}on(i,l){return this.events[i]||(this.events[i]=new Nd),this.events[i].add(l)}notify(i,...l){this.events[i]&&this.events[i].notify(...l)}}class Pv extends A2{constructor(){super(...arguments),this.KeyframeResolver=gv}sortInstanceNodePosition(i,l){return i.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(i,l){return i.style?i.style[l]:void 0}removeValueFromRenderState(i,{vars:l,style:r}){delete l[i],delete r[i]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;Ve(i)&&(this.childSubscription=i.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function j2(a){return window.getComputedStyle(a)}class E2 extends Pv{constructor(){super(...arguments),this.type="html",this.renderInstance=z0}readValueFromInstance(i,l){if(fs.has(l)){const r=zd(l);return r&&r.default||0}else{const r=j2(i),u=(O0(l)?r.getPropertyValue(l):r[l])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(i,{transformPagePoint:l}){return Bv(i,l)}build(i,l,r){Sd(i,l,r.transformTemplate)}scrapeMotionValuesFromProps(i,l,r){return Ad(i,l,r)}}class C2 extends Pv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Se}getBaseTargetFromProps(i,l){return i[l]}readValueFromInstance(i,l){if(fs.has(l)){const r=zd(l);return r&&r.default||0}return l=U0.has(l)?l:md(l),i.getAttribute(l)}scrapeMotionValuesFromProps(i,l,r){return H0(i,l,r)}build(i,l,r){_d(i,l,this.isSVGTag,r.transformTemplate)}renderInstance(i,l,r,u){V0(i,l,r,u)}mount(i){this.isSVGTag=xd(i.tagName),super.mount(i)}}const N2=(a,i)=>gd(a)?new C2(i):new E2(i,{allowProjection:a!==_.Fragment}),D2=t_({...ZT,...y2,...e2,...b2},N2),Vn=p1(D2);var me;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.TEXT=1]="TEXT",a[a.TOOL_USE=2]="TOOL_USE",a[a.TOOL_RESULT=3]="TOOL_RESULT",a[a.ERROR=4]="ERROR",a[a.STATUS=5]="STATUS",a[a.SYSTEM=6]="SYSTEM",a[a.FINDING=7]="FINDING",a[a.SUBTASK_CREATE=8]="SUBTASK_CREATE",a[a.USER_INPUT=9]="USER_INPUT"})(me||(me={}));var we;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.PENDING=1]="PENDING",a[a.ASSIGNED=2]="ASSIGNED",a[a.IN_PROGRESS=3]="IN_PROGRESS",a[a.REVIEW=4]="REVIEW",a[a.DONE=5]="DONE",a[a.FAILED=6]="FAILED",a[a.WAITING_INPUT=7]="WAITING_INPUT"})(we||(we={}));var Ba;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.ACTIVE=1]="ACTIVE",a[a.ARCHIVED=2]="ARCHIVED"})(Ba||(Ba={}));var za;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.OPEN=1]="OPEN",a[a.CLOSED=2]="CLOSED"})(za||(za={}));const k2=8;Object.assign(Object.create(null),{"":me.UNSPECIFIED,text:me.TEXT,tool_use:me.TOOL_USE,tool_result:me.TOOL_RESULT,error:me.ERROR,status:me.STATUS,system:me.SYSTEM,finding:me.FINDING,subtask_create:me.SUBTASK_CREATE,user_input:me.USER_INPUT});me.UNSPECIFIED+"",me.TEXT+"",me.TOOL_USE+"",me.TOOL_RESULT+"",me.ERROR+"",me.STATUS+"",me.SYSTEM+"",me.FINDING+"",me.SUBTASK_CREATE+"",me.USER_INPUT+"";Object.assign(Object.create(null),{"":we.UNSPECIFIED,pending:we.PENDING,assigned:we.ASSIGNED,in_progress:we.IN_PROGRESS,review:we.REVIEW,done:we.DONE,failed:we.FAILED,waiting_input:we.WAITING_INPUT});we.UNSPECIFIED+"",we.PENDING+"",we.ASSIGNED+"",we.IN_PROGRESS+"",we.REVIEW+"",we.DONE+"",we.FAILED+"",we.WAITING_INPUT+"";Object.assign(Object.create(null),{"":Ba.UNSPECIFIED,active:Ba.ACTIVE,archived:Ba.ARCHIVED});Ba.UNSPECIFIED+"",Ba.ACTIVE+"",Ba.ARCHIVED+"";Object.assign(Object.create(null),{"":za.UNSPECIFIED,open:za.OPEN,closed:za.CLOSED});za.UNSPECIFIED+"",za.OPEN+"",za.CLOSED+"";const w2="_breadcrumbs_1s6xc_1",M2="_list_1s6xc_11",O2="_item_1s6xc_21",R2="_separator_1s6xc_28",B2="_link_1s6xc_34",z2="_current_1s6xc_57",ni={breadcrumbs:w2,list:M2,item:O2,separator:R2,link:B2,current:z2},U2="›";function Oa({segments:a,onNavigate:i}){return m.jsx("nav",{className:ni.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:m.jsx("ol",{className:ni.list,children:a.map((l,r)=>{const u=r===a.length-1;return m.jsxs("li",{className:ni.item,children:[r>0&&m.jsx("span",{className:ni.separator,"aria-hidden":"true",children:U2}),l.viewMode&&!u?m.jsx("button",{className:ni.link,onClick:()=>i(l),title:l.label,children:l.label}):m.jsx("span",{className:ni.current,"aria-current":"page",title:l.label,children:l.label})]},r)})})})}function id(){id=function(u,f){return new l(u,void 0,f)};var a=RegExp.prototype,i=new WeakMap;function l(u,f,d){var p=new RegExp(u,f);return i.set(p,d||i.get(u)),cr(p,l.prototype)}function r(u,f){var d=i.get(f);return Object.keys(d).reduce(function(p,g){var v=d[g];if(typeof v=="number")p[g]=u[v];else{for(var b=0;u[v[b]]===void 0&&b+1<v.length;)b++;p[g]=u[v[b]]}return p},Object.create(null))}return(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),f&&cr(u,f)})(l,RegExp),l.prototype.exec=function(u){var f=a.exec.call(this,u);if(f){f.groups=r(f,this);var d=f.indices;d&&(d.groups=r(d,this))}return f},l.prototype[Symbol.replace]=function(u,f){if(typeof f=="string"){var d=i.get(this);return a[Symbol.replace].call(this,u,f.replace(/\$<([^>]+)>/g,function(g,v){var b=d[v];return"$"+(Array.isArray(b)?b.join("$"):b)}))}if(typeof f=="function"){var p=this;return a[Symbol.replace].call(this,u,function(){var g=arguments;return typeof g[g.length-1]!="object"&&(g=[].slice.call(g)).push(r(g,p)),f.apply(this,g)})}return a[Symbol.replace].call(this,u,f)},id.apply(this,arguments)}function cr(a,i){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,r){return l.__proto__=r,l},cr(a,i)}function l0(a,i){(i==null||i>a.length)&&(i=a.length);for(var l=0,r=new Array(i);l<i;l++)r[l]=a[l];return r}function Hu(a,i){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=(function(u,f){if(u){if(typeof u=="string")return l0(u,f);var d=Object.prototype.toString.call(u).slice(8,-1);return d==="Object"&&u.constructor&&(d=u.constructor.name),d==="Map"||d==="Set"?Array.from(u):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?l0(u,f):void 0}})(a))||i){l&&(a=l);var r=0;return function(){return r>=a.length?{done:!0}:{done:!1,value:a[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
76
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var V2=(function(a){return function(i){return i===void 0&&(i={}),(function(r,u){if(u&&!r.registered(u))throw new Error('The default language "'+u+'" is not registered with refractor.')})(a,i.defaultLanguage),function(r){fS(r,"element",l)};function l(r,u,f){var d,p;if(f&&f.tagName==="pre"&&r.tagName==="code"){var g=(r==null||(d=r.data)==null?void 0:d.meta)||(r==null||(p=r.properties)==null?void 0:p.metastring)||"";r.properties.className?typeof r.properties.className=="boolean"?r.properties.className=[]:Array.isArray(r.properties.className)||(r.properties.className=[r.properties.className]):r.properties.className=[];var v,b,S=(function(G){for(var Q,W=Hu(G.properties.className);!(Q=W()).done;){var V=Q.value;if(V.slice(0,9)==="language-")return V.slice(9).toLowerCase()}return null})(r);if(!S&&i.defaultLanguage&&r.properties.className.push("language-"+(S=i.defaultLanguage)),r.properties.className.push("code-highlight"),S)try{var x,D;D=(x=S)!=null&&x.includes("diff-")?S.split("-")[1]:S,v=a.highlight(Ko(r),D),f.properties.className=(f.properties.className||[]).concat("language-"+D)}catch(G){if(!i.ignoreMissing||!/Unknown language/.test(G.message))throw G;v=r}else v=r;v.children=(b=1,function G(Q){return Q.reduce(function(W,V){if(V.type==="text"){var F=V.value,rt=(F.match(/\n/g)||"").length;if(rt===0)V.position={start:{line:b,column:1},end:{line:b,column:1}},W.push(V);else for(var mt,Et=F.split(`
77
+ `),P=Hu(Et.entries());!(mt=P()).done;){var Lt=mt.value,zt=Lt[0],A=Lt[1];W.push({type:"text",value:zt===Et.length-1?A:A+`
78
+ `,position:{start:{line:b+zt,column:1},end:{line:b+zt,column:1}}})}return b+=rt,W}if(Object.prototype.hasOwnProperty.call(V,"children")){var Z=b;return V.children=G(V.children),W.push(V),V.position={start:{line:Z,column:1},end:{line:b,column:1}},W}return W.push(V),W},[])})(v.children),v.position=v.children.length>0?{start:{line:v.children[0].position.start.line,column:0},end:{line:v.children[v.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var w,O=(function(G){var Q=/{([\d,-]+)}/,W=G.split(",").map(function(rt){return rt.trim()}).join();if(Q.test(W)){var V=Q.exec(W)[1],F=mS(V);return function(rt){return F.includes(rt+1)}}return function(){return!1}})(g),q=(function(G){var Q=id(/showLineNumbers=(\d+)/i,{lines:1});if(Q.test(G)){var W=Q.exec(G);return Number(W.groups.lines)}return 1})(g),z=(function(G){for(var Q=new Array(G),W=0;W<G;W++)Q[W]={type:"element",tagName:"span",properties:{className:[]},children:[]};return Q})(v.position.end.line),X=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],R=function(){var G,Q,W=w.value,V=W[0],F=W[1];F.properties.className=["code-line"];var rt=pS(v,function(mt){return mt.position.start.line<=V+1&&mt.position.end.line>=V+1});F.children=rt.children,(g.toLowerCase().includes("showLineNumbers".toLowerCase())||i.showLineNumbers===!0||typeof i.showLineNumbers=="object"&&i.showLineNumbers.includes(S))&&!X.some(function(mt){return g.toLowerCase().includes(mt)})&&(F.properties.line=[(V+q).toString()],F.properties.className.push("line-number")),O(V)&&F.properties.className.push("highlight-line"),(S==="diff"||(G=S)!=null&&G.includes("diff-"))&&Ko(F).substring(0,1)==="-"?F.properties.className.push("deleted"):(S==="diff"||(Q=S)!=null&&Q.includes("diff-"))&&Ko(F).substring(0,1)==="+"&&F.properties.className.push("inserted")},K=Hu(z.entries());!(w=K()).done;)R();z.length>0&&Ko(z[z.length-1]).trim()===""&&z.pop(),r.children=z}}}})(hS);const L2="_systemEvent_11qnw_1",H2="_systemTimestamp_11qnw_9",G2="_textEvent_11qnw_13",q2="_toolUseEvent_11qnw_100",I2="_toolUsePrefix_11qnw_116",Y2="_toolResultEvent_11qnw_120",Z2="_toolResultSummary_11qnw_126",X2="_toolResultPre_11qnw_140",K2="_errorEvent_11qnw_154",Q2="_statusEvent_11qnw_163",P2="_userInputEvent_11qnw_173",F2="_userInputContent_11qnw_180",J2="_defaultEvent_11qnw_191",sn={systemEvent:L2,systemTimestamp:H2,textEvent:G2,toolUseEvent:q2,toolUsePrefix:I2,toolResultEvent:Y2,toolResultSummary:Z2,toolResultPre:X2,errorEvent:K2,statusEvent:Q2,userInputEvent:P2,userInputContent:F2,defaultEvent:J2};function $2({time:a,content:i}){return m.jsxs("div",{className:sn.systemEvent,children:[m.jsxs("span",{className:sn.systemTimestamp,children:["[",a,"]"]})," ",i]})}function W2({content:a}){return m.jsx("div",{className:sn.textEvent,children:m.jsx(y0,{remarkPlugins:[b0],rehypePlugins:[V2],children:a})})}function tA({content:a}){let i=a;try{const l=JSON.parse(a);i=`${l.tool}: ${JSON.stringify(l.args,null,2)}`}catch{}return m.jsxs("div",{className:sn.toolUseEvent,children:[m.jsx("span",{className:sn.toolUsePrefix,children:">"})," ",i]})}function eA({content:a}){return m.jsxs("details",{className:sn.toolResultEvent,children:[m.jsx("summary",{className:sn.toolResultSummary,children:"Tool output"}),m.jsx("pre",{className:sn.toolResultPre,children:a})]})}function nA({content:a}){return m.jsxs("div",{className:sn.errorEvent,children:["Error: ",a]})}function aA({content:a}){return m.jsxs("div",{className:sn.statusEvent,children:["--- ",a," ---"]})}function sA({content:a}){return m.jsx("div",{className:sn.userInputEvent,children:m.jsx("span",{className:sn.userInputContent,children:a})})}function iA({content:a}){return m.jsx("div",{className:sn.defaultEvent,children:a})}function Fv({event:a}){const i=new Date(a.timestamp).toLocaleTimeString();switch(a.eventType){case"system":return m.jsx($2,{time:i,content:a.content});case"text":case"output":return m.jsx(W2,{content:a.content});case"tool_use":return m.jsx(tA,{content:a.content});case"tool_result":return m.jsx(eA,{content:a.content});case"error":return m.jsx(nA,{content:a.content});case"status":return m.jsx(aA,{content:a.content});case"user_input":return m.jsx(sA,{content:a.content});default:return m.jsx(iA,{content:a.content})}}const lA="_overlay_1hz80_1",oA="_dialog_1hz80_13",rA="_title_1hz80_31",cA="_description_1hz80_39",uA="_actions_1hz80_46",dA="_cancelButton_1hz80_53",fA="_confirmButton_1hz80_71",os={overlay:lA,dialog:oA,title:rA,description:cA,actions:uA,cancelButton:dA,confirmButton:fA};function qd({isOpen:a,title:i,description:l,confirmLabel:r="Delete",onConfirm:u,onCancel:f}){const d=_.useId(),p=_.useId();return m.jsx(di,{children:a&&m.jsx(Vn.div,{className:os.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:f,onKeyDown:g=>{g.key==="Escape"&&f()},role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":l?p:void 0,children:m.jsxs(Vn.div,{className:os.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:g=>g.stopPropagation(),children:[m.jsx("h3",{id:d,className:os.title,children:i}),l&&m.jsx("p",{id:p,className:os.description,children:l}),m.jsxs("div",{className:os.actions,children:[m.jsx("button",{type:"button",className:os.cancelButton,onClick:f,autoFocus:!0,children:"Cancel"}),m.jsx("button",{type:"button",className:os.confirmButton,onClick:u,children:r})]})]})})})}const hA="_spinner_13c8l_1",mA="_spin_13c8l_1",pA="_sm_13c8l_14",gA="_md_13c8l_20",vA="_lg_13c8l_26",o0={spinner:hA,spin:mA,sm:pA,md:gA,lg:vA};function r0({size:a="md",className:i,label:l="Loading",liveRegion:r=!1}){return m.jsx("span",{className:`${o0.spinner} ${o0[a]} ${i??""}`,role:r?"status":void 0,"aria-label":l,"aria-hidden":r?void 0:!0})}const yA="_container_d6rhh_1",bA="_header_d6rhh_5",SA="_addButton_d6rhh_17",_A="_createForm_d6rhh_35",TA="_createInput_d6rhh_41",xA="_createButton_d6rhh_71",AA="_creatingHint_d6rhh_107",jA="_projectRow_d6rhh_116",EA="_selected_d6rhh_136",CA="_expandArrow_d6rhh_143",NA="_expanded_d6rhh_150",DA="_projectName_d6rhh_154",kA="_taskCount_d6rhh_158",wA="_newTaskButton_d6rhh_164",MA="_taskRow_d6rhh_182",OA="_taskStatusIcon_d6rhh_211",RA="_taskTitle_d6rhh_215",BA="_dependencyBadge_d6rhh_222",zA="_blockedBadge_d6rhh_234",UA="_leafSpacer_d6rhh_239",VA="_childCountBadge_d6rhh_244",LA="_addChildButton_d6rhh_257",HA="_emptyCta_d6rhh_292",GA="_ctaDescription_d6rhh_305",qA="_ctaButton_d6rhh_311",IA="_emptyTaskCta_d6rhh_341",YA="_createTaskLink_d6rhh_346",qt={container:yA,header:bA,addButton:SA,createForm:_A,createInput:TA,createButton:xA,creatingHint:AA,projectRow:jA,selected:EA,expandArrow:CA,expanded:NA,projectName:DA,taskCount:kA,newTaskButton:wA,taskRow:MA,taskStatusIcon:OA,taskTitle:RA,dependencyBadge:BA,blockedBadge:zA,leafSpacer:UA,childCountBadge:VA,addChildButton:LA,emptyCta:HA,ctaDescription:GA,ctaButton:qA,emptyTaskCta:IA,createTaskLink:YA},c0={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting_input:{color:"var(--accent-yellow)",icon:"⧖"}};function ZA(a){const i=new Map(a.map(r=>[r.id,{...r,children:[]}])),l=[];for(const r of i.values())r.parentTaskId&&i.has(r.parentTaskId)?i.get(r.parentTaskId).children.push(r):l.push(r);for(const r of i.values())r.children.sort((u,f)=>u.sortOrder-f.sortOrder);return l.sort((r,u)=>r.sortOrder-u.sortOrder)}const XA=34,KA=16;function Jv({node:a,depth:i,expandedTasks:l,toggleTask:r,selectedTaskId:u,setViewMode:f,projectId:d,taskStatusById:p}){const{personas:g}=En(),v=c0[a.status]||c0.pending,b=a.dependsOn.length>0&&a.dependsOn.some(O=>p.get(O)!=="done"),S=l.has(a.id),x=a.children.length>0,D=u===a.id,w=XA+i*KA;return m.jsxs(m.Fragment,{children:[m.jsxs("div",{onClick:()=>f({kind:"task",taskId:a.id}),className:`${qt.taskRow} ${D?qt.selected:""}`,style:{paddingLeft:w},"data-task-id":a.id,children:[x&&m.jsx("span",{className:`${qt.expandArrow} ${S?qt.expanded:""}`,role:"button",tabIndex:0,"aria-label":S?"Collapse task":"Expand task",onClick:O=>{O.stopPropagation(),r(a.id)},onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),O.stopPropagation(),r(a.id))},children:"▸"}),!x&&m.jsx("span",{className:qt.leafSpacer}),m.jsx("span",{className:qt.taskStatusIcon,style:{color:v.color},children:v.icon}),m.jsx("span",{className:qt.taskTitle,title:a.title,children:a.title}),x&&m.jsxs("span",{className:qt.childCountBadge,children:[a.children.filter(O=>O.status==="done").length,"/",a.children.length]}),a.dependsOn.length>0&&m.jsx("span",{className:`${qt.dependencyBadge} ${b?qt.blockedBadge:""}`,title:`Depends on: ${a.dependsOn.join(", ")}`,children:b?"blocked":"dep"}),a.personaId&&(()=>{const O=g.find(q=>q.id===a.personaId);return O?m.jsx("span",{className:qt.dependencyBadge,title:`Persona: ${O.name}`,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"8rem"},children:O.name}):null})(),i<k2&&m.jsx("button",{onClick:O=>{O.stopPropagation(),f({kind:"new_task",projectId:d,parentTaskId:a.id})},title:"Add child task","aria-label":"Add child task",className:qt.addChildButton,children:"+"})]}),m.jsx(di,{children:x&&S&&m.jsx(Vn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:a.children.map(O=>m.jsx(Jv,{node:O,depth:i+1,expandedTasks:l,toggleTask:r,selectedTaskId:u,setViewMode:f,projectId:d,taskStatusById:p},O.id))})})]})}function QA({viewMode:a,setViewMode:i}){const{projects:l,tasks:r,loadTasks:u,createProject:f,projectCreating:d}=En(),[p,g]=_.useState(new Set),[v,b]=_.useState(new Set),[S,x]=_.useState(new Set),[D,w]=_.useState(!1),[O,q]=_.useState(""),z=a.kind==="project"?a.projectId:void 0,X=a.kind==="task"?a.taskId:void 0,R=_.useRef(p);R.current=p;const K=_.useMemo(()=>new Map(r.map(V=>[V.id,V.status])),[r]),G=V=>{g(F=>{const rt=new Set(F);return rt.has(V)?rt.delete(V):(rt.add(V),u(V)),rt})},Q=V=>{b(F=>{const rt=new Set(F);return rt.has(V)?(rt.delete(V),x(mt=>new Set(mt).add(V))):(rt.add(V),x(mt=>{const Et=new Set(mt);return Et.delete(V),Et})),rt})};_.useEffect(()=>{const V=new Set(r.filter(F=>F.parentTaskId).map(F=>F.parentTaskId));V.size>0&&b(F=>{const rt=new Set(F);for(const mt of V)S.has(mt)||rt.add(mt);return rt})},[r,S]),_.useEffect(()=>{z&&!R.current.has(z)&&(g(V=>new Set(V).add(z)),u(z))},[z,u]);const W=()=>{!O.trim()||d||(f(O.trim()),q(""),w(!1))};return m.jsxs("div",{className:qt.container,children:[m.jsxs("div",{className:qt.header,children:[m.jsx("span",{children:"Projects"}),m.jsx("button",{className:qt.addButton,onClick:()=>w(!D),"aria-label":"Create project",title:"Create project",children:"+"})]}),D&&m.jsxs("div",{className:qt.createForm,children:[m.jsx("input",{type:"text",value:O,onChange:V=>q(V.target.value),onKeyDown:V=>V.key==="Enter"&&W(),placeholder:"Project name...",autoFocus:!0,disabled:d,className:qt.createInput}),m.jsx("button",{onClick:W,className:qt.createButton,disabled:d,children:d?m.jsx(r0,{size:"sm",label:"Creating project"}):"OK"})]}),d&&m.jsxs("div",{className:qt.creatingHint,children:[m.jsx(r0,{size:"sm",label:"Creating project"}),"Creating project…"]}),l.length===0&&!D&&m.jsxs("div",{className:qt.emptyCta,children:[m.jsx("button",{className:qt.ctaButton,onClick:()=>w(!0),children:"Create Project"}),m.jsx("div",{className:qt.ctaDescription,children:"Organize your work into projects"})]}),l.map(V=>{const F=p.has(V.id),rt=r.filter(P=>P.projectId===V.id),mt=z===V.id,Et=F?ZA(rt):[];return m.jsxs("div",{children:[m.jsxs("div",{onClick:()=>{mt?G(V.id):(F||G(V.id),i({kind:"project",projectId:V.id}))},className:`${qt.projectRow} ${mt?qt.selected:""}`,children:[m.jsx("span",{className:`${qt.expandArrow} ${F?qt.expanded:""}`,children:"▸"}),m.jsx("span",{className:qt.projectName,title:V.name,children:V.name}),m.jsx("span",{className:qt.taskCount,children:rt.length>0&&`${rt.filter(P=>P.status==="done").length}/${rt.length}`}),m.jsx("button",{onClick:P=>{P.stopPropagation(),i({kind:"new_task",projectId:V.id})},title:"New task",className:qt.newTaskButton,children:"+"})]}),m.jsx(di,{children:F&&m.jsxs(Vn.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:[Et.map(P=>m.jsx(Jv,{node:P,depth:0,expandedTasks:v,toggleTask:Q,selectedTaskId:X,setViewMode:i,projectId:V.id,taskStatusById:K},P.id)),rt.length===0&&m.jsx("div",{className:qt.emptyTaskCta,children:m.jsx("button",{className:qt.createTaskLink,onClick:()=>i({kind:"new_task",projectId:V.id}),children:"+ Create Task"})})]})})]},V.id)})]})}const PA="_container_1xzk5_1",FA="_content_1xzk5_28",u0={container:PA,content:FA},JA=320,$v=220,Wv=600,ty="grackle-sidebar-width";function $A(){try{const a=localStorage.getItem(ty);if(a!==null){const i=Number(a);if(Number.isFinite(i)&&i>=$v&&i<=Wv)return i}}catch{}return JA}function WA(a){try{localStorage.setItem(ty,String(a))}catch{}}function tj({viewMode:a,setViewMode:i}){const[l]=_.useState($A),r=_.useRef(null);return _.useEffect(()=>{const u=r.current;if(!u)return;const f=new ResizeObserver(d=>{for(const p of d){const g=p.borderBoxSize[0];if(g){const v=Math.round(g.inlineSize);v>=$v&&v<=Wv&&WA(v)}}});return f.observe(u),()=>{f.disconnect()}},[]),m.jsx("div",{className:u0.container,ref:r,"data-testid":"sidebar",style:{width:l},children:m.jsx("div",{className:u0.content,children:m.jsx(QA,{viewMode:a,setViewMode:i})})})}const ej="_bar_5apte_1",nj="_barColumn_5apte_25",aj="_barRow_5apte_50",sj="_input_5apte_56",ij="_inputSmall_5apte_84",lj="_textarea_5apte_113",oj="_select_5apte_145",rj="_btnPrimary_5apte_174",cj="_btnDanger_5apte_200",uj="_btnGhost_5apte_232",dj="_badge_5apte_251",fj="_statusText_5apte_261",hj="_statusCompleted_5apte_266",mj="_statusFailed_5apte_270",pj="_statusBlocked_5apte_274",gj="_hintText_5apte_279",vj="_creatingHint_5apte_284",yj="_errorHint_5apte_292",nt={bar:ej,barColumn:nj,barRow:aj,input:sj,inputSmall:ij,textarea:lj,select:oj,btnPrimary:rj,btnDanger:cj,btnGhost:uj,badge:dj,statusText:fj,statusCompleted:hj,statusFailed:mj,statusBlocked:pj,hintText:gj,creatingHint:vj,errorHint:yj};function d0({value:a,onChange:i,testId:l}){return m.jsxs("select",{"data-testid":l,value:a,onChange:r=>i(r.target.value),className:nt.select,children:[m.jsx("option",{value:"claude-code",children:"claude-code"}),m.jsx("option",{value:"codex",children:"codex"}),m.jsx("option",{value:"copilot",children:"copilot"}),m.jsx("option",{value:"stub",children:"stub"})]})}function bj({viewMode:a,setViewMode:i}){const{spawn:l,sendInput:r,kill:u,sessions:f,tasks:d,environments:p,personas:g,createTask:v,addEnvironment:b,codespaces:S,codespaceError:x,codespaceCreating:D,listCodespaces:w,createCodespace:O}=En(),{showToast:q}=od(),[z,X]=_.useState(""),[R,K]=_.useState(a.kind==="new_chat"?a.runtime:"claude-code"),[G,Q]=_.useState(""),[W,V]=_.useState(""),[F,rt]=_.useState(""),[mt,Et]=_.useState(""),[P,Lt]=_.useState(""),zt=dt=>{Et(dt)},A=dt=>{if(Lt(dt),dt){const st=g.find(It=>It.id===dt);st!=null&&st.runtime&&K(st.runtime)}},[Z,at]=_.useState(""),[tt,jt]=_.useState("local"),[$t,Rt]=_.useState("claude-code"),[St,I]=_.useState(""),[Qt,_e]=_.useState(""),[ce,pe]=_.useState(""),[se,Pe]=_.useState(""),[bt,ue]=_.useState(""),[Le,ge]=_.useState(""),[on,Cn]=_.useState(""),[Y,it]=_.useState(""),[lt,ut]=_.useState("pick");_.useEffect(()=>{if(a.kind==="new_chat"&&K(a.runtime),a.kind==="new_task"&&a.parentTaskId){const dt=d.find(st=>st.id===a.parentTaskId);dt!=null&&dt.environmentId&&rt(dt.environmentId)}a.kind==="new_task"&&!a.parentTaskId&&p.length===1&&rt(p[0].id)},[a]);const pt=a.kind==="session"?f.find(dt=>dt.id===a.sessionId):void 0,ht=a.kind==="task"?d.find(dt=>dt.id===a.taskId):void 0,xt=ht!=null&&ht.sessionId?f.find(dt=>dt.id===ht.sessionId):void 0,Ht=ht?ht.dependsOn.some(dt=>{const st=d.find(It=>It.id===dt);return st&&st.status!=="done"}):!1;if(a.kind==="empty")return m.jsx("div",{className:nt.bar,children:m.jsx("span",{className:nt.hintText,children:"Select a session or click + to start"})});if(a.kind==="new_environment"){const dt=et=>{if(!et.trim())return!0;const Zt=Number(et);return Number.isInteger(Zt)&&Zt>=1&&Zt<=65535},st=()=>!(!Z.trim()||tt==="ssh"&&!St.trim()||tt==="codespace"&&!Le.trim()||(tt==="local"||tt==="ssh")&&!dt(Qt)),It=()=>{if(!st())return;const et={};if(tt==="local"){if(St.trim()&&(et.host=St.trim()),Qt.trim()){const Zt=Number(Qt);Number.isInteger(Zt)&&(et.port=Zt)}}else if(tt==="ssh"){if(et.host=St.trim(),ce.trim()&&(et.user=ce.trim()),Qt.trim()){const Zt=Number(Qt);Number.isInteger(Zt)&&(et.sshPort=Zt)}on.trim()&&(et.identityFile=on.trim())}else tt==="docker"?(se.trim()&&(et.image=se.trim()),bt.trim()&&(et.repo=bt.trim())):tt==="codespace"&&(et.codespaceName=Le.trim());b(Z.trim(),tt,et,$t),q("Environment added successfully","success"),at(""),jt("local"),Rt("claude-code"),I(""),_e(""),pe(""),Pe(""),ue(""),ge(""),Cn(""),it(""),ut("pick"),i({kind:"settings"})};return m.jsxs("div",{className:nt.barColumn,children:[m.jsxs("div",{className:nt.barRow,children:[m.jsx("span",{className:nt.badge,children:"new env"}),m.jsx("input",{type:"text",value:Z,onChange:et=>at(et.target.value),placeholder:"Environment name...",autoFocus:!0,className:nt.input}),m.jsxs("select",{value:tt,onChange:et=>{jt(et.target.value),et.target.value==="codespace"&&(w(),ut("pick"),ge(""))},className:nt.select,children:[m.jsx("option",{value:"local",children:"local"}),m.jsx("option",{value:"ssh",children:"ssh"}),m.jsx("option",{value:"docker",children:"docker"}),m.jsx("option",{value:"codespace",children:"codespace"})]}),m.jsx(d0,{value:$t,onChange:Rt,testId:"new-environment-runtime-select"}),m.jsx("button",{onClick:It,disabled:!st(),className:nt.btnPrimary,children:"Add"})]}),m.jsxs("div",{className:nt.barRow,children:[tt==="local"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"text",value:St,onChange:et=>I(et.target.value),placeholder:"Host (optional)...",className:nt.inputSmall}),m.jsx("input",{type:"number",min:1,max:65535,value:Qt,onChange:et=>_e(et.target.value),placeholder:"Port (optional)...",className:nt.inputSmall})]}),tt==="ssh"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"text",value:St,onChange:et=>I(et.target.value),placeholder:"Host (required)...",className:nt.inputSmall}),m.jsx("input",{type:"text",value:ce,onChange:et=>pe(et.target.value),placeholder:"User (optional)...",className:nt.inputSmall}),m.jsx("input",{type:"number",min:1,max:65535,value:Qt,onChange:et=>_e(et.target.value),placeholder:"SSH port (optional)...",className:nt.inputSmall}),m.jsx("input",{type:"text",value:on,onChange:et=>Cn(et.target.value),placeholder:"Identity file (optional)...",className:nt.inputSmall})]}),tt==="docker"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"text",value:se,onChange:et=>Pe(et.target.value),placeholder:"Image (optional)...",className:nt.inputSmall}),m.jsx("input",{type:"text",value:bt,onChange:et=>ue(et.target.value),placeholder:"Repo (optional)...",className:nt.inputSmall})]}),tt==="codespace"&&lt==="pick"&&m.jsxs(m.Fragment,{children:[m.jsxs("select",{value:Le,onChange:et=>{et.target.value==="__create__"?(ut("create"),ge("")):(ge(et.target.value),et.target.value&&!Z.trim()&&at(et.target.value))},disabled:D,className:nt.select,children:[m.jsx("option",{value:"",children:"Select a codespace..."}),S.map(et=>m.jsxs("option",{value:et.name,children:[et.name," (",et.repository,") — ",et.state]},et.name)),m.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),D&&m.jsx("span",{className:nt.creatingHint,children:"Creating codespace..."}),x&&m.jsx("span",{className:nt.errorHint,children:x})]}),tt==="codespace"&&lt==="create"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"text",value:Y,onChange:et=>it(et.target.value),placeholder:"owner/repo",className:nt.inputSmall}),m.jsx("button",{onClick:()=>{Y.trim()&&(O(Y.trim()),ut("pick"),it(""))},disabled:!Y.trim(),className:nt.btnPrimary,children:"Create"}),m.jsx("button",{onClick:()=>{ut("pick"),it("")},className:nt.btnGhost,children:"Cancel"})]})]})]})}if(a.kind==="project")return m.jsx("div",{className:nt.bar,children:m.jsx("span",{className:nt.hintText,children:"Select a task or click + to create one"})});if(a.kind==="new_task"){const dt=st=>{G.trim()&&(v(a.projectId,G.trim(),W,F,void 0,a.parentTaskId,mt),q("Task created successfully","success"),Q(""),V(""),rt(""),Et(""),i({kind:"project",projectId:a.projectId}))};return m.jsxs("div",{className:nt.barColumn,children:[m.jsxs("div",{className:nt.barRow,children:[m.jsx("span",{className:nt.badge,children:a.parentTaskId?"child task":"new task"}),m.jsx("input",{type:"text",value:G,onChange:st=>Q(st.target.value),placeholder:"Task title...",autoFocus:!0,className:nt.input}),m.jsxs("select",{value:F,onChange:st=>rt(st.target.value),className:nt.select,children:[m.jsx("option",{value:"",children:"Default env"}),p.map(st=>m.jsx("option",{value:st.id,children:st.displayName},st.id))]}),m.jsxs("select",{value:mt,onChange:st=>zt(st.target.value),className:nt.select,children:[m.jsx("option",{value:"",children:"No persona"}),g.map(st=>m.jsx("option",{value:st.id,children:st.name},st.id))]}),m.jsx("button",{onClick:()=>dt(),disabled:!G.trim(),className:nt.btnPrimary,children:"Create"})]}),m.jsx("textarea",{value:W,onChange:st=>V(st.target.value),placeholder:"Description (optional)...",className:nt.textarea,rows:3})]})}if(a.kind==="task"&&ht){if(ht.status==="pending"||ht.status==="assigned"){const dt=Ht?ht.dependsOn.map(st=>d.find(It=>It.id===st)).filter(st=>st&&st.status!=="done").map(st=>st.title):[];return m.jsx("div",{className:nt.bar,children:Ht?m.jsxs("span",{className:nt.statusBlocked,children:["Blocked by: ",dt.join(", ")]}):m.jsx("span",{className:nt.hintText,children:"Use the buttons above to start or manage this task"})})}if(ht.status==="in_progress"||ht.status==="waiting_input"){if((xt==null?void 0:xt.status)==="waiting_input"){const st=It=>{It.preventDefault(),!(!z.trim()||!ht.sessionId)&&(r(ht.sessionId,z),X(""))};return m.jsxs("form",{onSubmit:st,className:nt.bar,children:[m.jsx("input",{type:"text",value:z,onChange:It=>X(It.target.value),placeholder:"Type a message...",autoFocus:!0,className:nt.input}),m.jsx("button",{type:"submit",disabled:!z.trim(),className:nt.btnPrimary,children:"Send"})]})}return m.jsx("div",{className:nt.bar,children:m.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:nt.input})})}if(ht.status==="review")return m.jsx("div",{className:nt.bar,children:m.jsx("span",{className:nt.hintText,children:"Review the changes above, then approve or reject in the header"})});if(ht.status==="done")return m.jsxs("div",{className:nt.bar,children:[m.jsx("span",{className:`${nt.statusText} ${nt.statusCompleted}`,children:"Task completed"}),m.jsx("button",{onClick:()=>i({kind:"new_task",projectId:ht.projectId}),className:nt.btnPrimary,children:"+ New Task"})]});if(ht.status==="failed")return m.jsx("div",{className:nt.bar,children:m.jsx("span",{className:`${nt.statusText} ${nt.statusFailed}`,children:"Task failed"})})}if(a.kind==="new_chat"){const dt=st=>{st.preventDefault(),z.trim()&&(l(a.environmentId,z,void 0,R,P),q("Session started","success"),X(""),Lt(""))};return m.jsxs("form",{onSubmit:dt,className:nt.bar,children:[m.jsx("span",{className:nt.badge,children:"new chat"}),m.jsx("input",{type:"text",value:z,onChange:st=>X(st.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:nt.input}),m.jsx(d0,{value:R,onChange:K,testId:"new-chat-runtime-select"}),m.jsxs("select",{value:P,onChange:st=>A(st.target.value),className:nt.select,children:[m.jsx("option",{value:"",children:"No persona"}),g.map(st=>m.jsx("option",{value:st.id,children:st.name},st.id))]}),m.jsx("button",{type:"submit",disabled:!z.trim(),className:nt.btnPrimary,children:"Go"})]})}if(a.kind==="session"){const dt=(pt==null?void 0:pt.status)==="running",st=(pt==null?void 0:pt.status)==="waiting_input",It=pt!==void 0&&["completed","failed","killed"].includes(pt.status);if(dt)return m.jsxs("div",{className:nt.bar,children:[m.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:nt.input}),m.jsx("button",{onClick:()=>u(a.sessionId),className:nt.btnDanger,title:"Stop session",children:"Stop"})]});if(st){const et=Zt=>{Zt.preventDefault(),z.trim()&&(r(a.sessionId,z),X(""))};return m.jsxs("form",{onSubmit:et,className:nt.bar,children:[m.jsx("input",{type:"text",value:z,onChange:Zt=>X(Zt.target.value),placeholder:"Type a message...",autoFocus:!0,className:nt.input}),m.jsx("button",{type:"submit",disabled:!z.trim(),className:nt.btnPrimary,children:"Send"}),m.jsx("button",{type:"button",onClick:()=>u(a.sessionId),className:nt.btnDanger,title:"Stop session",children:"Stop"})]})}if(It&&pt)return m.jsxs("div",{className:nt.bar,children:[m.jsxs("span",{className:`${nt.statusText} ${nt.hintText}`,children:["Session ",pt.status]}),m.jsx("button",{onClick:()=>i({kind:"new_chat",environmentId:pt.environmentId,runtime:pt.runtime}),className:nt.btnPrimary,children:"+ New Chat"})]})}return m.jsx("div",{className:nt.bar,children:m.jsx("span",{className:nt.hintText,children:"Loading..."})})}const Sj="_container_twqwx_1",_j="_emptyState_twqwx_8",Tj="_card_twqwx_14",xj="_cardHeader_twqwx_34",Aj="_categoryBadge_twqwx_41",jj="_findingTitle_twqwx_49",Ej="_findingDate_twqwx_55",Cj="_findingContent_twqwx_61",Nj="_tags_twqwx_67",Dj="_tag_twqwx_67",Bn={container:Sj,emptyState:_j,card:Tj,cardHeader:xj,categoryBadge:Aj,findingTitle:jj,findingDate:Ej,findingContent:Cj,tags:Nj,tag:Dj};function kj(a){const i=new Date(a),l=new Date,r=l.getTime()-i.getTime(),u=Math.floor(r/1e3),f=Math.floor(u/60),d=Math.floor(f/60),p=Math.floor(d/24);if(u<60)return"just now";if(f<60)return`${f}m ago`;if(d<24)return`${d}h ago`;if(p===1)return"yesterday";if(p<7)return`${p} days ago`;const g=i.getFullYear()===l.getFullYear(),v=i.toLocaleString("en-US",{month:"short"}),b=i.getDate();return g?`${v} ${b}`:`${v} ${b} ${i.getFullYear()}`}const wj={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)"}},Mj={text:"var(--text-secondary)",bg:"var(--bg-elevated)"};function Oj({projectId:a}){const{findings:i}=En(),l=i.filter(r=>r.projectId===a);return l.length===0?m.jsx("div",{className:Bn.emptyState,children:"No findings yet. Agents will post discoveries here."}):m.jsx("div",{className:Bn.container,children:l.map((r,u)=>{const f=wj[r.category]||Mj;return m.jsxs(Vn.div,{className:Bn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:u*.05,duration:.2},children:[m.jsxs("div",{className:Bn.cardHeader,children:[m.jsx("span",{className:Bn.categoryBadge,style:{background:f.bg,color:f.text},children:r.category}),m.jsx("span",{className:Bn.findingTitle,children:r.title}),m.jsx("span",{className:Bn.findingDate,title:r.createdAt,children:kj(r.createdAt)})]}),m.jsx("div",{className:Bn.findingContent,children:r.content.length>300?r.content.slice(0,300)+"...":r.content}),r.tags.length>0&&m.jsx("div",{className:Bn.tags,children:r.tags.map(d=>m.jsx("span",{className:Bn.tag,style:{color:f.text,textShadow:`0 0 8px ${f.text}`},children:d},d))})]},r.id)})})}const Rj="_container_vs9om_1",Bj="_header_vs9om_5",zj="_headerLabel_vs9om_12",Uj="_addButton_vs9om_20",Vj="_envRow_vs9om_46",Lj="_targeted_vs9om_60",Hj="_expanded_vs9om_63",Gj="_statusDot_vs9om_67",qj="_pulse_vs9om_70",Ij="_envName_vs9om_74",Yj="_envActions_vs9om_78",Zj="_idleLabel_vs9om_85",Xj="_newChatButton_vs9om_90",Kj="_envActionsRow_vs9om_108",Qj="_connectButton_vs9om_116",Pj="_stopButton_vs9om_133",Fj="_deleteButton_vs9om_150",Jj="_provisionMessage_vs9om_168",$j="_errorMessage_vs9om_175",Wj="_sessionRow_vs9om_182",tE="_selected_vs9om_200",eE="_sessionDot_vs9om_207",nE="_sessionSummaryRow_vs9om_211",aE="_sessionExpandArrow_vs9om_233",sE="_sessionSummaryText_vs9om_244",iE="_sessionCountBadge_vs9om_251",lE="_emptyCta_vs9om_274",oE="_ctaDescription_vs9om_287",rE="_ctaButton_vs9om_293",Yt={container:Rj,header:Bj,headerLabel:zj,addButton:Uj,envRow:Vj,targeted:Lj,expanded:Hj,statusDot:Gj,pulse:qj,envName:Ij,envActions:Yj,idleLabel:Zj,newChatButton:Xj,envActionsRow:Kj,connectButton:Qj,stopButton:Pj,deleteButton:Fj,provisionMessage:Jj,errorMessage:$j,sessionRow:Wj,selected:tE,sessionDot:eE,sessionSummaryRow:nE,sessionExpandArrow:aE,sessionSummaryText:sE,sessionCountBadge:iE,emptyCta:lE,ctaDescription:oE,ctaButton:rE},cE={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},uE={running:"running",waiting_input:"awaiting input",failed:"failed",killed:"killed",completed:"completed"},f0=["running","waiting_input","failed","killed","completed"],dE=.2;function fE(a){const i={};for(const f of a)i[f.status]=(i[f.status]||0)+1;const l=f0.filter(f=>i[f]>0).map(f=>`${i[f]} ${uE[f]||f}`),r=new Set(f0),u=Object.keys(i).filter(f=>!r.has(f)).sort().map(f=>`${i[f]} ${f}`);return[...l,...u].join(", ")}function hE({status:a}){const i=a==="running"?"var(--accent-green)":a==="waiting_input"?"var(--accent-yellow)":a==="completed"?"var(--text-secondary)":a==="failed"||a==="killed"?"var(--accent-red)":"var(--text-tertiary)";return m.jsx("span",{className:Yt.sessionDot,style:{color:i},children:"●"})}function mE({env:a,envSessions:i,selectedSessionId:l,isNewChatTarget:r,expanded:u,onToggleExpand:f,sessionsExpanded:d,onToggleSessionsExpand:p,provisionProgress:g,onProvision:v,onStop:b,onRemove:S,setViewMode:x}){const[D,w]=_.useState(!1),O=cE[a.status]||"var(--text-tertiary)",q=a.status==="connected",z=a.status==="connecting",X=a.status==="disconnected"||a.status==="error";return m.jsxs("div",{children:[m.jsx(qd,{isOpen:D,title:"Delete Environment?",description:`"${a.displayName||a.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{S(a.id),w(!1)},onCancel:()=>w(!1)}),m.jsxs("div",{className:`${Yt.envRow} ${r?Yt.targeted:""} ${u?Yt.expanded:""}`,"data-testid":"env-row",onClick:f,children:[m.jsx("span",{className:`${Yt.statusDot} ${q?Yt.pulse:""}`,style:{color:O},children:"●"}),m.jsx("span",{className:Yt.envName,title:a.displayName||a.id,children:a.displayName||a.id}),m.jsxs("span",{className:Yt.envActions,children:[i.length===0&&!r&&!u&&m.jsx("span",{className:Yt.idleLabel,children:"(idle)"}),q&&m.jsx("button",{onClick:R=>{R.stopPropagation(),x({kind:"new_chat",environmentId:a.id,runtime:a.defaultRuntime||"claude-code"})},title:"New chat",className:Yt.newChatButton,children:"+"})]})]}),u&&m.jsxs("div",{className:Yt.envActionsRow,children:[z&&g&&m.jsx("span",{className:Yt.provisionMessage,children:g.message}),a.status==="error"&&(g==null?void 0:g.stage)==="error"&&m.jsx("span",{className:Yt.errorMessage,children:g.message}),X&&m.jsx("button",{onClick:R=>{R.stopPropagation(),v(a.id)},className:Yt.connectButton,children:a.status==="error"?"Retry":"Connect"}),q&&m.jsx("button",{onClick:R=>{R.stopPropagation(),b(a.id)},className:Yt.stopButton,children:"Stop"}),!z&&m.jsx("button",{onClick:R=>{R.stopPropagation(),w(!0)},className:Yt.deleteButton,children:"Delete"})]}),i.length>0&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:Yt.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":d,"aria-label":d?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),p())},children:[m.jsx("span",{className:`${Yt.sessionExpandArrow} ${d?Yt.expanded:""}`,children:"▸"}),m.jsx("span",{className:Yt.sessionSummaryText,children:fE(i)}),m.jsx("span",{className:Yt.sessionCountBadge,children:i.length})]}),m.jsx(di,{children:d&&m.jsx(Vn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:dE,ease:"easeInOut"},style:{overflow:"hidden"},children:i.map(R=>m.jsxs("div",{onClick:K=>{K.stopPropagation(),x({kind:"session",sessionId:R.id})},className:`${Yt.sessionRow} ${l===R.id?Yt.selected:""}`,title:R.prompt,"data-testid":"session-row",children:[m.jsx(hE,{status:R.status})," ",R.prompt.length>24?R.prompt.slice(0,24)+"...":R.prompt]},R.id))})})]})]})}function pE({viewMode:a,setViewMode:i}){const{environments:l,sessions:r,provisionStatus:u,provisionEnvironment:f,stopEnvironment:d,removeEnvironment:p}=En(),[g,v]=_.useState(null),[b,S]=_.useState(new Set),x=a.kind==="session"?a.sessionId:void 0,D=a.kind==="new_chat"?a.environmentId:void 0;return m.jsxs("div",{className:Yt.container,children:[m.jsxs("div",{className:Yt.header,children:[m.jsx("span",{className:Yt.headerLabel,children:"Environments"}),m.jsx("button",{className:Yt.addButton,onClick:()=>i({kind:"new_environment"}),title:"Add environment",children:"+ Add Environment"})]}),l.length===0&&m.jsxs("div",{className:Yt.emptyCta,children:[m.jsx("button",{className:Yt.ctaButton,onClick:()=>i({kind:"new_environment"}),children:"Add Environment"}),m.jsx("div",{className:Yt.ctaDescription,children:"Connect an environment to run agents"})]}),l.map(w=>{const O=r.filter(q=>q.environmentId===w.id);return m.jsx(mE,{env:w,envSessions:O,selectedSessionId:x,isNewChatTarget:D===w.id,expanded:g===w.id,onToggleExpand:()=>v(g===w.id?null:w.id),sessionsExpanded:b.has(w.id),onToggleSessionsExpand:()=>{S(q=>{const z=new Set(q);return z.has(w.id)?z.delete(w.id):z.add(w.id),z})},provisionProgress:u[w.id],onProvision:f,onStop:d,onRemove:p,setViewMode:i},w.id)})]})}const gE="_container_8bik7_1",vE="_heading_8bik7_7",yE="_section_8bik7_14",bE="_sectionTitle_8bik7_25",SE="_sectionDescription_8bik7_34",_E="_tokenList_8bik7_47",TE="_tokenRow_8bik7_54",xE="_tokenBadge_8bik7_67",AE="_tokenName_8bik7_82",jE="_tokenTarget_8bik7_89",EE="_deleteButton_8bik7_98",CE="_addForm_8bik7_112",NE="_formRow_8bik7_118",DE="_input_8bik7_124",kE="_select_8bik7_153",wE="_addButton_8bik7_184",ME="_emptyStateInfo_8bik7_213",oe={container:gE,heading:vE,section:yE,sectionTitle:bE,sectionDescription:SE,tokenList:_E,tokenRow:TE,tokenBadge:xE,tokenName:AE,tokenTarget:jE,deleteButton:EE,addForm:CE,formRow:NE,input:DE,select:kE,addButton:wE,emptyStateInfo:ME},OE=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function RE({viewMode:a,setViewMode:i}){const{tokens:l,setToken:r,deleteToken:u}=En(),{showToast:f}=od(),[d,p]=_.useState(""),[g,v]=_.useState(""),[b,S]=_.useState("env_var"),[x,D]=_.useState(""),[w,O]=_.useState(null),q=R=>{if(R.preventDefault(),!d||!g)return;const K=b==="env_var"?x||d.toUpperCase()+"_TOKEN":"";r(d,g,b,K,b==="file"?x:""),f("Token saved successfully","success"),p(""),v(""),D("")},z=R=>{O(R)},X=()=>{w&&(u(w),f("Token deleted","info")),O(null)};return m.jsxs("div",{className:oe.container,children:[m.jsx(qd,{isOpen:w!==null,title:"Delete Token?",description:w?`"${w}" will be permanently removed.`:void 0,onConfirm:X,onCancel:()=>O(null)}),m.jsx("h2",{className:oe.heading,children:"Settings"}),m.jsxs("section",{className:oe.section,children:[m.jsx("h3",{className:oe.sectionTitle,children:"Environments"}),m.jsx("p",{className:oe.sectionDescription,children:"Environments are compute workspaces where agents run. Configure once, reuse across projects."}),m.jsx(pE,{viewMode:a,setViewMode:i})]}),m.jsxs("section",{className:oe.section,children:[m.jsx("h3",{className:oe.sectionTitle,children:"Tokens"}),m.jsx("p",{className:oe.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),l.length===0?m.jsx("div",{className:oe.emptyStateInfo,children:"Add your first API token to enable service integrations."}):m.jsx("div",{className:oe.tokenList,children:l.map(R=>m.jsxs("div",{className:oe.tokenRow,children:[m.jsx("span",{className:oe.tokenBadge,children:R.tokenType}),m.jsx("span",{className:oe.tokenName,children:R.name}),m.jsx("span",{className:oe.tokenTarget,children:R.tokenType==="env_var"?R.envVar:R.filePath}),m.jsx("button",{className:oe.deleteButton,onClick:()=>z(R.name),title:`Delete ${R.name}`,children:"×"})]},R.name))}),m.jsxs("form",{className:oe.addForm,onSubmit:q,children:[m.jsxs("div",{className:oe.formRow,children:[m.jsx("input",{className:oe.input,type:"text",placeholder:"Token name",value:d,onChange:R=>p(R.target.value)}),m.jsx("input",{className:oe.input,type:"password",placeholder:"Value",value:g,onChange:R=>v(R.target.value)})]}),m.jsxs("div",{className:oe.formRow,children:[m.jsx("select",{className:oe.select,value:b,onChange:R=>S(R.target.value),children:OE.map(R=>m.jsx("option",{value:R.value,children:R.label},R.value))}),m.jsx("input",{className:oe.input,type:"text",placeholder:b==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:x,onChange:R=>D(R.target.value)}),m.jsx("button",{className:oe.addButton,type:"submit",children:"Add Token"})]})]})]})]})}const BE="_container_14lk7_1",zE="_header_14lk7_7",UE="_form_14lk7_18",VE="_formActions_14lk7_61",LE="_list_14lk7_67",HE="_card_14lk7_73",GE="_active_14lk7_79",qE="_cardHeader_14lk7_83",IE="_cardActions_14lk7_92",YE="_description_14lk7_97",ZE="_meta_14lk7_103",XE="_promptDetails_14lk7_116",KE="_promptText_14lk7_128",QE="_empty_14lk7_140",PE="_btnPrimary_14lk7_146",FE="_btnSecondary_14lk7_160",JE="_btnSmall_14lk7_174",$E="_btnDanger_14lk7_188",be={container:BE,header:zE,form:UE,formActions:VE,list:LE,card:HE,active:GE,cardHeader:qE,cardActions:IE,description:YE,meta:ZE,promptDetails:XE,promptText:KE,empty:QE,btnPrimary:PE,btnSecondary:FE,btnSmall:JE,btnDanger:$E};function WE(){const{personas:a,createPersona:i,updatePersona:l,deletePersona:r}=En(),[u,f]=_.useState(null),[d,p]=_.useState(!1),[g,v]=_.useState(null),[b,S]=_.useState(""),[x,D]=_.useState(""),[w,O]=_.useState(""),[q,z]=_.useState(""),[X,R]=_.useState(""),[K,G]=_.useState(0),Q=()=>{S(""),D(""),O(""),z(""),R(""),G(0)},W=()=>{Q(),f(null),p(!0)},V=P=>{S(P.name),D(P.description),O(P.systemPrompt),z(P.runtime),R(P.model),G(P.maxTurns),f(P),p(!1)},F=P=>{P.preventDefault(),!(!b.trim()||!w.trim())&&(u?(l(u.id,b,x,w,q,X,K),f(null)):(i(b,x,w,q,X,K),p(!1)),Q())},rt=P=>{r(P),v(null),(u==null?void 0:u.id)===P&&(f(null),Q())},mt=()=>{f(null),p(!1),Q()},Et=()=>m.jsxs("form",{onSubmit:F,className:be.form,children:[m.jsx("h3",{children:u?"Edit Persona":"Create Persona"}),m.jsxs("label",{children:["Name",m.jsx("input",{type:"text",value:b,onChange:P=>S(P.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),m.jsxs("label",{children:["Description",m.jsx("input",{type:"text",value:x,onChange:P=>D(P.target.value),placeholder:"Brief description..."})]}),m.jsxs("label",{children:["Runtime",m.jsxs("select",{value:q,onChange:P=>z(P.target.value),children:[m.jsx("option",{value:"",children:"Default"}),m.jsx("option",{value:"claude-code",children:"claude-code"}),m.jsx("option",{value:"codex",children:"codex"}),m.jsx("option",{value:"copilot",children:"copilot"})]})]}),m.jsxs("label",{children:["Model",m.jsx("input",{type:"text",value:X,onChange:P=>R(P.target.value),placeholder:"e.g. sonnet"})]}),m.jsxs("label",{children:["Max Turns",m.jsx("input",{type:"number",value:K,onChange:P=>G(parseInt(P.target.value,10)||0),min:0})]}),m.jsxs("label",{children:["System Prompt",m.jsx("textarea",{value:w,onChange:P=>O(P.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),m.jsxs("div",{className:be.formActions,children:[m.jsx("button",{type:"submit",className:be.btnPrimary,children:u?"Save":"Create"}),m.jsx("button",{type:"button",onClick:mt,className:be.btnSecondary,children:"Cancel"})]})]});return m.jsxs("div",{className:be.container,children:[m.jsxs("div",{className:be.header,children:[m.jsx("h2",{children:"Personas"}),m.jsx("button",{onClick:W,className:be.btnPrimary,children:"+ New Persona"})]}),(d||u)&&Et(),a.length===0&&!d?m.jsx("p",{className:be.empty,children:"No personas yet. Create one to get started."}):m.jsx("div",{className:be.list,children:a.map(P=>m.jsxs("div",{className:`${be.card} ${(u==null?void 0:u.id)===P.id?be.active:""}`,children:[m.jsxs("div",{className:be.cardHeader,children:[m.jsx("strong",{children:P.name}),m.jsxs("div",{className:be.cardActions,children:[m.jsx("button",{onClick:()=>V(P),className:be.btnSmall,children:"Edit"}),g===P.id?m.jsxs(m.Fragment,{children:[m.jsx("button",{onClick:()=>rt(P.id),className:be.btnDanger,children:"Confirm"}),m.jsx("button",{onClick:()=>v(null),className:be.btnSmall,children:"Cancel"})]}):m.jsx("button",{onClick:()=>v(P.id),className:be.btnSmall,children:"Delete"})]})]}),P.description&&m.jsx("p",{className:be.description,children:P.description}),m.jsxs("div",{className:be.meta,children:[P.runtime&&m.jsxs("span",{children:["Runtime: ",P.runtime]}),P.model&&m.jsxs("span",{children:["Model: ",P.model]}),P.maxTurns>0&&m.jsxs("span",{children:["Max turns: ",P.maxTurns]})]}),m.jsxs("details",{className:be.promptDetails,children:[m.jsx("summary",{children:"System Prompt"}),m.jsx("pre",{className:be.promptText,children:P.systemPrompt})]})]},P.id))})]})}const h0=220,m0=70,tC=40,eC=60,nC="hierarchy",aC="dependency";function sC(a){return _.useMemo(()=>{if(a.length===0)return{nodes:[],edges:[]};const i=new Op.graphlib.Graph({multigraph:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:"TB",nodesep:tC,ranksep:eC});const l=new Map(a.map(d=>[d.id,d])),r=new Map;for(const d of a)if(d.parentTaskId&&l.has(d.parentTaskId)){const p=r.get(d.parentTaskId)||[];p.push(d),r.set(d.parentTaskId,p)}for(const d of a)i.setNode(d.id,{width:h0,height:m0});const u=[];for(const d of a){if(d.parentTaskId&&l.has(d.parentTaskId)){const p=`hierarchy-${d.parentTaskId}-${d.id}`;i.setEdge(d.parentTaskId,d.id,{},p),u.push({id:p,source:d.parentTaskId,target:d.id,type:"smoothstep",data:{edgeType:nC},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of d.dependsOn)if(l.has(p)){const g=`dependency-${p}-${d.id}`;i.setEdge(p,d.id,{},g),u.push({id:g,source:p,target:d.id,type:"smoothstep",data:{edgeType:aC},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return Op.layout(i),{nodes:a.map(d=>{const p=i.node(d.id),g=r.get(d.id)||[];return{id:d.id,type:"task",position:{x:p.x-h0/2,y:p.y-m0/2},data:{task:d,childCount:g.length,doneChildCount:g.filter(v=>v.status==="done").length,hasDependencies:d.dependsOn.length>0}}}),edges:u}},[a])}const iC="_dagContainer_iizup_1",lC="_taskNode_iizup_26",oC="_taskNodeBorder_iizup_48",rC="_taskNodeContent_iizup_54",cC="_taskNodeHeader_iizup_64",uC="_taskNodeIcon_iizup_71",dC="_taskNodeTitle_iizup_76",fC="_taskNodeBadges_iizup_84",hC="_childBadge_iizup_89",mC="_depBadge_iizup_101",pC="_handle_iizup_113",gC="_emptyCta_iizup_120",vC="_ctaDescription_iizup_131",yC="_ctaButton_iizup_138",Ge={dagContainer:iC,taskNode:lC,taskNodeBorder:oC,taskNodeContent:rC,taskNodeHeader:cC,taskNodeIcon:uC,taskNodeTitle:dC,taskNodeBadges:fC,childBadge:hC,depBadge:mC,handle:pC,emptyCta:gC,ctaDescription:vC,ctaButton:yC},p0={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting_input:{color:"var(--accent-yellow)",icon:"⧖"}};function bC({data:a}){const{task:i,childCount:l,doneChildCount:r,hasDependencies:u}=a,f=p0[i.status]||p0.pending;return m.jsxs("div",{className:Ge.taskNode,"data-task-id":i.id,"data-task-title":i.title,children:[m.jsx(Rp,{type:"target",position:Bp.Top,className:Ge.handle}),m.jsx("div",{className:Ge.taskNodeBorder,style:{backgroundColor:f.color}}),m.jsxs("div",{className:Ge.taskNodeContent,children:[m.jsxs("div",{className:Ge.taskNodeHeader,children:[m.jsx("span",{className:Ge.taskNodeIcon,style:{color:f.color},children:f.icon}),m.jsx("span",{className:Ge.taskNodeTitle,children:i.title})]}),m.jsxs("div",{className:Ge.taskNodeBadges,children:[l>0&&m.jsxs("span",{className:Ge.childBadge,children:[r,"/",l]}),u&&m.jsx("span",{className:Ge.depBadge,children:"dep"})]})]}),m.jsx(Rp,{type:"source",position:Bp.Bottom,className:Ge.handle})]})}const g0={pending:"#6b7a8d",assigned:"#70a1ff",in_progress:"#4ecca3",review:"#f0c040",done:"#4ecca3",failed:"#e94560",waiting_input:"#f0c040"},SC={task:bC};function _C({projectId:a,setViewMode:i}){const{tasks:l}=En(),r=_.useMemo(()=>l.filter(g=>g.projectId===a),[l,a]),{nodes:u,edges:f}=sC(r),d=_.useCallback((g,v)=>{i({kind:"task",taskId:v.id})},[i]),p=_.useCallback(g=>{const v=g.data;return g0[v.task.status]||g0.pending},[]);return r.length===0?m.jsxs("div",{className:Ge.emptyCta,children:[m.jsx("button",{className:Ge.ctaButton,onClick:()=>i({kind:"new_task",projectId:a}),children:"Create Task"}),m.jsx("div",{className:Ge.ctaDescription,children:"Create tasks to see the dependency graph"})]}):m.jsx("div",{className:Ge.dagContainer,children:m.jsxs(vS,{nodes:u,edges:f,nodeTypes:SC,onNodeClick:d,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[m.jsx(yS,{variant:bS.Dots,gap:20,size:1,color:"rgba(255,255,255,0.05)"}),m.jsx(SS,{showInteractive:!1}),m.jsx(_S,{nodeColor:p,maskColor:"rgba(10, 12, 20, 0.7)",style:{background:"var(--bg-inset)"}})]})})}const TC="_panelContainer_k8otb_1",xC="_emptyState_k8otb_8",AC="_projectSummary_k8otb_17",jC="_projectSummaryTitle_k8otb_28",EC="_projectSummarySubtitle_k8otb_32",CC="_header_k8otb_36",NC="_headerInfo_k8otb_62",DC="_killButton_k8otb_68",kC="_headerTitle_k8otb_89",wC="_headerActions_k8otb_99",MC="_taskStatusBadge_k8otb_106",OC="_taskBranch_k8otb_115",RC="_taskBlockedBadge_k8otb_121",BC="_btnPrimary_k8otb_129",zC="_btnDanger_k8otb_155",UC="_rejectInput_k8otb_187",VC="_tabBar_k8otb_216",LC="_tab_k8otb_216",HC="_active_k8otb_239",GC="_eventScroll_k8otb_244",qC="_tabContent_k8otb_250",IC="_noContext_k8otb_255",YC="_overviewContent_k8otb_261",ZC="_overviewDashboard_k8otb_270",XC="_overviewHero_k8otb_276",KC="_statusBadge_k8otb_283",QC="_statusPending_k8otb_295",PC="_statusAssigned_k8otb_300",FC="_statusInProgress_k8otb_305",JC="_statusReview_k8otb_310",$C="_statusDone_k8otb_315",WC="_statusFailed_k8otb_320",tN="_statusWaitingInput_k8otb_325",eN="_overviewBranchPill_k8otb_330",nN="_branchLink_k8otb_345",aN="_overviewSection_k8otb_356",sN="_overviewLabel_k8otb_362",iN="_overviewValue_k8otb_369",lN="_overviewMuted_k8otb_374",oN="_overviewMarkdown_k8otb_380",rN="_envRow_k8otb_449",cN="_envDot_k8otb_455",uN="_envDotGreen_k8otb_462",dN="_envDotYellow_k8otb_467",fN="_envDotRed_k8otb_472",hN="_envDotGray_k8otb_477",mN="_depList_k8otb_481",pN="_depItem_k8otb_487",gN="_depBlocked_k8otb_494",vN="_depDone_k8otb_498",yN="_timeline_k8otb_502",bN="_timelineRow_k8otb_508",SN="_timelineKey_k8otb_515",_N="_timelineValue_k8otb_521",TN="_timelineDelta_k8otb_525",xN="_reviewNotes_k8otb_536",AN="_waitingMessage_k8otb_553",jN="_errorMessage_k8otb_557",EN="_eventOverflowWarning_k8otb_561",CN="_attemptSelector_k8otb_575",NN="_attemptLabel_k8otb_586",DN="_attemptButton_k8otb_590",kN="_attemptActive_k8otb_607",wN="_attemptStatus_k8otb_613",MN="_emptyCta_k8otb_619",ON="_ctaTitle_k8otb_631",RN="_ctaDescription_k8otb_637",BN="_ctaButton_k8otb_644",B={panelContainer:TC,emptyState:xC,projectSummary:AC,projectSummaryTitle:jC,projectSummarySubtitle:EC,header:CC,headerInfo:NC,killButton:DC,headerTitle:kC,headerActions:wC,taskStatusBadge:MC,taskBranch:OC,taskBlockedBadge:RC,btnPrimary:BC,btnDanger:zC,rejectInput:UC,tabBar:VC,tab:LC,active:HC,eventScroll:GC,tabContent:qC,noContext:IC,overviewContent:YC,overviewDashboard:ZC,overviewHero:XC,statusBadge:KC,statusPending:QC,statusAssigned:PC,statusInProgress:FC,statusReview:JC,statusDone:$C,statusFailed:WC,statusWaitingInput:tN,overviewBranchPill:eN,branchLink:nN,overviewSection:aN,overviewLabel:sN,overviewValue:iN,overviewMuted:lN,overviewMarkdown:oN,envRow:rN,envDot:cN,envDotGreen:uN,envDotYellow:dN,envDotRed:fN,envDotGray:hN,depList:mN,depItem:pN,depBlocked:gN,depDone:vN,timeline:yN,timelineRow:bN,timelineKey:SN,timelineValue:_N,timelineDelta:TN,reviewNotes:xN,waitingMessage:AN,errorMessage:jN,eventOverflowWarning:EN,attemptSelector:CN,attemptLabel:NN,attemptButton:DN,attemptActive:kN,attemptStatus:wN,emptyCta:MN,ctaTitle:ON,ctaDescription:RN,ctaButton:BN};function v0(a,i){const l=[];let r=a;const u=new Set;for(;r&&i.has(r)&&!u.has(r);){u.add(r);const f=i.get(r);l.unshift(f),r=f.parentTaskId||void 0}return l}function zN(a,i,l){const r={label:"Home",viewMode:{kind:"empty"}};switch(a.kind){case"empty":return[{label:"Home",viewMode:void 0}];case"settings":return[r,{label:"Settings",viewMode:void 0}];case"persona_management":return[r,{label:"Personas",viewMode:void 0}];case"new_environment":return[r,{label:"New Environment",viewMode:void 0}];case"project":{const u=i.find(f=>f.id===a.projectId);return[r,{label:(u==null?void 0:u.name)??"Project",viewMode:void 0}]}case"new_task":{const u=i.find(d=>d.id===a.projectId),f=[r,{label:(u==null?void 0:u.name)??"Project",viewMode:{kind:"project",projectId:a.projectId}}];if(a.parentTaskId){const d=v0(a.parentTaskId,l);for(const p of d)f.push({label:p.title,viewMode:{kind:"task",taskId:p.id}})}return f.push({label:"New Task",viewMode:void 0}),f}case"task":{const u=v0(a.taskId,l),f=l.get(a.taskId),d=f==null?void 0:f.projectId,p=d?i.find(b=>b.id===d):void 0,g=[r];p&&g.push({label:p.name,viewMode:{kind:"project",projectId:p.id}});for(let b=0;b<u.length-1;b++)g.push({label:u[b].title,viewMode:{kind:"task",taskId:u[b].id}});const v=u[u.length-1];return g.push({label:(v==null?void 0:v.title)??a.taskId,viewMode:void 0}),g}case"new_chat":return[r,{label:"New Chat",viewMode:void 0}];case"session":return[r,{label:`Session ${a.sessionId.slice(0,8)}`,viewMode:void 0}];default:return[{label:"Home",viewMode:void 0}]}}function UN({sessionId:a,session:i,isActive:l,onKill:r}){return m.jsxs("div",{className:B.header,children:[m.jsxs("span",{children:["Session: ",a.slice(0,8),i&&` | ${i.runtime} | ${i.status}`]}),m.jsxs("span",{className:B.headerInfo,children:[i&&m.jsx("span",{children:i.prompt.length>60?i.prompt.slice(0,60)+"...":i.prompt}),l&&m.jsx("button",{onClick:()=>r(a),title:"Stop session",className:B.killButton,children:"×"})]})]})}function ey({eventsDropped:a}){return a<=0?m.jsx(m.Fragment,{}):m.jsxs("div",{className:B.eventOverflowWarning,role:"alert",children:["⚠ ",a.toLocaleString()," older event",a===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function VN({sessionEvents:a,session:i,eventsDropped:l,scrollRef:r}){const u=i&&["completed","failed","killed"].includes(i.status),f=u?`Session ${i.status} with no events recorded.`:"Waiting for events...";return m.jsxs("div",{ref:r,className:B.eventScroll,children:[a.length===0&&m.jsx("div",{className:u?B.errorMessage:B.waitingMessage,children:f}),m.jsx(ey,{eventsDropped:l}),a.map((d,p)=>m.jsx(Fv,{event:d},`${d.sessionId}-${d.timestamp}-${p}`))]})}function LN(a){const i=[];for(const l of a){const r=i[i.length-1];l.eventType==="text"&&(r==null?void 0:r.eventType)==="text"?i[i.length-1]={...r,content:r.content+l.content}:i.push(l)}return i}function $o(a){if(!a)return"—";const i=new Date(a);return isNaN(i.getTime())?"—":i.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Gu(a,i){if(!a||!i)return;const l=new Date(i).getTime()-new Date(a).getTime();if(isNaN(l)||l<0)return;const r=Math.floor(l/6e4),u=Math.floor(l%6e4/1e3);if(r===0)return`${u}s`;const f=Math.floor(r/60),d=r%60;return f===0?`${r}m ${u}s`:`${f}h ${d}m`}function HN(a){const i=a.toLowerCase();return i==="ready"||i==="running"||i==="available"||i==="connected"?B.envDotGreen:i==="provisioning"||i==="starting"||i==="pending"||i==="connecting"?B.envDotYellow:i==="error"||i==="failed"||i==="disconnected"?B.envDotRed:B.envDotGray}function GN({status:a}){const i={pending:"Pending",assigned:"Assigned",in_progress:"In Progress",waiting_input:"Waiting for Input",review:"Review",done:"Done",failed:"Failed"},l={pending:B.statusPending,assigned:B.statusAssigned,in_progress:B.statusInProgress,waiting_input:B.statusWaitingInput,review:B.statusReview,done:B.statusDone,failed:B.statusFailed};return m.jsx("span",{className:`${B.statusBadge} ${l[a]??B.statusPending}`,children:i[a]??a})}function qN({task:a,tasksById:i,environments:l,projects:r}){const u=l.find(p=>p.id===a.environmentId),f=r.find(p=>p.id===a.projectId),d=a.branch&&(f!=null&&f.repoUrl)?`${f.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(a.branch)}`:void 0;return m.jsxs("div",{className:B.overviewDashboard,children:[m.jsxs("div",{className:B.overviewHero,children:[m.jsx(GN,{status:a.status}),a.branch&&m.jsx("span",{className:B.overviewBranchPill,children:d?m.jsxs("a",{href:d,target:"_blank",rel:"noreferrer noopener",className:B.branchLink,children:["🔗"," ",a.branch]}):m.jsxs("span",{children:["🔗"," ",a.branch]})})]}),typeof a.description=="string"&&a.description&&m.jsxs("div",{className:B.overviewSection,children:[m.jsx("div",{className:B.overviewLabel,children:"Description"}),m.jsx("div",{className:B.overviewMarkdown,children:m.jsx(y0,{remarkPlugins:[b0],children:a.description})})]}),a.environmentId&&m.jsxs("div",{className:B.overviewSection,children:[m.jsx("div",{className:B.overviewLabel,children:"Environment"}),m.jsxs("div",{className:B.envRow,children:[u&&m.jsx("span",{className:`${B.envDot} ${HN(u.status)}`,title:u.status,"aria-label":`Status: ${u.status}`,role:"img"}),m.jsx("span",{className:B.overviewValue,children:(u==null?void 0:u.displayName)??a.environmentId})]})]}),m.jsxs("div",{className:B.overviewSection,children:[m.jsx("div",{className:B.overviewLabel,children:"Dependencies"}),a.dependsOn.length===0?m.jsx("div",{className:B.overviewMuted,children:"None"}):m.jsx("div",{className:B.depList,children:a.dependsOn.map(p=>{const g=i.get(p),v=(g==null?void 0:g.status)==="done";return m.jsxs("div",{className:`${B.depItem} ${v?B.depDone:B.depBlocked}`,children:[m.jsx("span",{children:v?"✓":"○"}),m.jsx("span",{children:(g==null?void 0:g.title)??p})]},p)})})]}),m.jsxs("div",{className:B.overviewSection,children:[m.jsx("div",{className:B.overviewLabel,children:"Timeline"}),m.jsxs("div",{className:B.timeline,children:[a.createdAt&&m.jsxs("div",{className:B.timelineRow,children:[m.jsx("span",{className:B.timelineKey,children:"Created"}),m.jsx("span",{className:B.timelineValue,children:$o(a.createdAt)})]}),a.assignedAt&&(()=>{const p=Gu(a.createdAt,a.assignedAt);return m.jsxs("div",{className:B.timelineRow,children:[m.jsx("span",{className:B.timelineKey,children:"Assigned"}),m.jsx("span",{className:B.timelineValue,children:$o(a.assignedAt)}),p!==void 0&&m.jsx("span",{className:B.timelineDelta,children:p})]})})(),a.startedAt&&(()=>{const p=Gu(a.assignedAt??a.createdAt,a.startedAt);return m.jsxs("div",{className:B.timelineRow,children:[m.jsx("span",{className:B.timelineKey,children:"Started"}),m.jsx("span",{className:B.timelineValue,children:$o(a.startedAt)}),p!==void 0&&m.jsx("span",{className:B.timelineDelta,children:p})]})})(),a.completedAt&&(()=>{const p=Gu(a.startedAt,a.completedAt);return m.jsxs("div",{className:B.timelineRow,children:[m.jsx("span",{className:B.timelineKey,children:"Completed"}),m.jsx("span",{className:B.timelineValue,children:$o(a.completedAt)}),p!==void 0&&m.jsx("span",{className:B.timelineDelta,children:p})]})})(),!a.createdAt&&!a.assignedAt&&!a.startedAt&&!a.completedAt&&m.jsx("div",{className:B.overviewMuted,children:"No timing data"})]})]}),a.reviewNotes&&m.jsxs("div",{className:B.overviewSection,children:[m.jsx("div",{className:B.overviewLabel,children:"Review Notes"}),m.jsx("div",{className:B.reviewNotes,children:a.reviewNotes})]})]})}function IN({task:a,sessionId:i,isBlocked:l,rejectNotes:r,onRejectNotesChange:u,onStart:f,onStop:d,onApprove:p,onReject:g,onDelete:v}){if(a.status==="pending"||a.status==="assigned")return l?m.jsx("div",{className:B.headerActions,children:m.jsx("button",{onClick:v,className:B.btnDanger,children:"Delete"})}):m.jsxs("div",{className:B.headerActions,children:[m.jsx("button",{onClick:f,className:B.btnPrimary,children:"Start"}),m.jsx("button",{onClick:v,className:B.btnDanger,children:"Delete"})]});if(a.status==="in_progress"||a.status==="waiting_input")return m.jsx("div",{className:B.headerActions,children:m.jsx("button",{onClick:d,disabled:!i,className:B.btnDanger,children:"Stop"})});if(a.status==="review")return m.jsxs("div",{className:B.headerActions,children:[m.jsx("input",{type:"text",value:r,onChange:b=>u(b.target.value),placeholder:"Rejection notes...",className:B.rejectInput}),m.jsx("button",{onClick:p,className:B.btnPrimary,children:"Approve"}),m.jsx("button",{onClick:g,className:B.btnDanger,children:"Reject"})]});if(a.status==="done")return m.jsx("div",{className:B.headerActions,children:m.jsx("button",{onClick:v,className:B.btnDanger,children:"Delete"})});if(a.status==="failed")return m.jsxs("div",{className:B.headerActions,children:[m.jsx("button",{onClick:f,className:B.btnPrimary,children:"Retry"}),m.jsx("button",{onClick:v,className:B.btnDanger,children:"Delete"})]})}function YN({taskSessions:a,selectedSessionId:i,onSelect:l}){if(!(a.length<2))return m.jsxs("div",{className:B.attemptSelector,"data-testid":"attempt-selector",children:[m.jsx("span",{className:B.attemptLabel,children:"Attempts:"}),a.map((r,u)=>{const f=r.id===i,d=r.status==="completed"?"✓":r.status==="failed"?"✗":r.status==="running"||r.status==="waiting_input"?"●":"";return m.jsxs("button",{className:`${B.attemptButton} ${f?B.attemptActive:""}`,onClick:()=>l(r.id),title:`Attempt #${u+1} — ${r.status}`,"aria-label":`Attempt #${u+1}, ${r.status}`,"aria-pressed":f,"data-testid":`attempt-${u+1}`,children:["#",u+1,d&&m.jsx("span",{className:B.attemptStatus,children:d})]},r.id)})]})}function ZN({viewMode:a,setViewMode:i}){const{events:l,eventsDropped:r,sessions:u,tasks:f,environments:d,loadSessionEvents:p,loadFindings:g,kill:v,startTask:b,approveTask:S,rejectTask:x,deleteTask:D,projects:w,createProject:O,taskSessions:q,loadTaskSessions:z}=En(),X=_.useRef(null),R=_.useRef(void 0),[K,G]=_.useState("overview"),[Q,W]=_.useState("tasks"),[V,F]=_.useState(""),[rt,mt]=_.useState(!1),[Et,P]=_.useState(void 0),Lt=_.useRef(void 0),zt=_.useRef(void 0);let A,Z;a.kind==="task"&&(A=f.find(bt=>bt.id===a.taskId),Z=(A==null?void 0:A.projectId)||void 0);const at=A?q[A.id]??[]:[];let tt;a.kind==="session"?tt=a.sessionId:a.kind==="task"&&(Et&&at.some(bt=>bt.id===Et)?tt=Et:tt=(A==null?void 0:A.sessionId)||void 0);const jt=()=>{mt(!0)},$t=()=>{A&&(D(A.id),mt(!1),i({kind:"project",projectId:A.projectId}))};a.kind==="task"&&(A==null?void 0:A.id)!==Lt.current&&(Lt.current=A==null?void 0:A.id,K!=="overview"&&G("overview"),V!==""&&F(""),Et!==void 0&&P(void 0));const Rt=_.useRef(void 0),St=_.useRef(void 0);if(_.useEffect(()=>{if(!(A!=null&&A.id))return;const bt=A.id!==Rt.current,ue=A.sessionId!==St.current;(bt||ue)&&(Rt.current=A.id,St.current=A.sessionId,z(A.id))},[A==null?void 0:A.id,A==null?void 0:A.sessionId,z]),(A==null?void 0:A.status)!==zt.current){zt.current=A==null?void 0:A.status;const bt=(A==null?void 0:A.status)==="pending"||(A==null?void 0:A.status)==="assigned"?"overview":(A==null?void 0:A.status)==="in_progress"||(A==null?void 0:A.status)==="waiting_input"||(A==null?void 0:A.status)==="review"?"stream":(A==null?void 0:A.status)==="done"?"findings":void 0;bt&&bt!==K&&G(bt)}const I=_.useMemo(()=>{const bt=tt?l.filter(ue=>ue.sessionId===tt):[];return LN(bt)},[l,tt]),Qt=_.useMemo(()=>new Map(f.map(bt=>[bt.id,bt])),[f]),_e=A?A.dependsOn.some(bt=>{const ue=Qt.get(bt);return ue!==void 0&&ue.status!=="done"}):!1,ce=_.useMemo(()=>zN(a,w,Qt),[a,w,Qt]),pe=bt=>{bt.viewMode&&i(bt.viewMode)},se=tt?u.find(bt=>bt.id===tt)??void 0:void 0;if(_.useEffect(()=>{tt&&tt!==R.current&&(R.current=tt,p(tt))},[tt,p]),_.useEffect(()=>{K==="findings"&&Z&&g(Z)},[K,Z,g]),_.useEffect(()=>{X.current&&K==="stream"&&(X.current.scrollTop=X.current.scrollHeight)},[I.length,K]),a.kind==="settings")return m.jsxs("div",{className:B.panelContainer,children:[m.jsx(Oa,{segments:ce,onNavigate:pe}),m.jsx(RE,{viewMode:a,setViewMode:i})]});if(a.kind==="persona_management")return m.jsxs("div",{className:B.panelContainer,children:[m.jsx(Oa,{segments:ce,onNavigate:pe}),m.jsx(WE,{})]});if(a.kind==="empty")return w.length===0?m.jsxs("div",{className:B.emptyCta,children:[m.jsx("div",{className:B.ctaTitle,children:"Welcome to Grackle"}),m.jsx("div",{className:B.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),m.jsx("button",{className:B.ctaButton,onClick:()=>{const bt=window.prompt("Project name:");bt!=null&&bt.trim()&&O(bt.trim())},children:"Create Your First Project"})]}):m.jsx("div",{className:B.emptyState,children:"Select a project or task to get started"});if(a.kind==="new_chat")return m.jsxs("div",{className:B.panelContainer,children:[m.jsx(Oa,{segments:ce,onNavigate:pe}),m.jsx("div",{className:B.emptyState,children:"Enter a prompt below to start a new session"})]});if(a.kind==="project"){const bt=f.filter(ge=>ge.projectId===a.projectId),ue=bt.filter(ge=>ge.status==="done").length,Le=bt.length;return m.jsxs("div",{className:B.panelContainer,children:[m.jsx(Oa,{segments:ce,onNavigate:pe}),m.jsxs("div",{className:B.tabBar,role:"tablist","aria-label":"Project view",children:[m.jsx("button",{role:"tab","aria-selected":Q==="graph",className:`${B.tab} ${Q==="graph"?B.active:""}`,onClick:()=>W("graph"),children:"Graph"}),m.jsx("button",{role:"tab","aria-selected":Q==="tasks",className:`${B.tab} ${Q==="tasks"?B.active:""}`,onClick:()=>W("tasks"),children:"Tasks"})]}),Q==="tasks"&&Le>0&&m.jsxs("div",{className:B.projectSummary,children:[m.jsx("span",{className:B.projectSummaryTitle,children:`${ue}/${Le} tasks complete`}),m.jsx("span",{className:B.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),Q==="tasks"&&Le===0&&m.jsxs("div",{className:B.emptyCta,children:[m.jsx("button",{className:B.ctaButton,onClick:()=>i({kind:"new_task",projectId:a.projectId}),children:"Create Task"}),m.jsx("div",{className:B.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),Q==="graph"&&m.jsx(_C,{projectId:a.projectId,setViewMode:i})]})}if(a.kind==="new_environment")return m.jsxs("div",{className:B.panelContainer,children:[m.jsx(Oa,{segments:ce,onNavigate:pe}),m.jsx("div",{className:B.emptyState,children:"Configure the new environment below"})]});if(a.kind==="new_task")return m.jsxs("div",{className:B.panelContainer,children:[m.jsx(Oa,{segments:ce,onNavigate:pe}),m.jsx("div",{className:B.emptyState,children:"Fill in the task details below"})]});if(a.kind==="task")return m.jsxs("div",{className:B.panelContainer,children:[m.jsx(Oa,{segments:ce,onNavigate:pe}),m.jsxs("div",{className:B.header,children:[m.jsxs("span",{className:B.headerTitle,children:[m.jsx("span",{"data-testid":"task-title",children:(A==null?void 0:A.title)||a.taskId}),A&&m.jsx("span",{className:B.taskStatusBadge,"data-testid":"task-status",children:A.status}),(A==null?void 0:A.branch)&&m.jsx("span",{className:B.taskBranch,children:A.branch}),_e&&m.jsx("span",{className:B.taskBlockedBadge,children:"blocked"})]}),A&&m.jsx(IN,{task:A,sessionId:tt,isBlocked:_e,rejectNotes:V,onRejectNotesChange:F,onStart:()=>b(A.id),onStop:()=>tt&&v(tt),onApprove:()=>S(A.id),onReject:()=>{x(A.id,V),F("")},onDelete:jt})]}),m.jsxs("div",{className:B.tabBar,role:"tablist","aria-label":"Task view",children:[m.jsx("button",{role:"tab","aria-selected":K==="overview",className:`${B.tab} ${K==="overview"?B.active:""}`,onClick:()=>G("overview"),children:"Overview"}),m.jsx("button",{role:"tab","aria-selected":K==="stream",className:`${B.tab} ${K==="stream"?B.active:""}`,onClick:()=>G("stream"),children:"Stream"}),m.jsx("button",{role:"tab","aria-selected":K==="findings",className:`${B.tab} ${K==="findings"?B.active:""}`,onClick:()=>G("findings"),children:"Findings"})]}),m.jsxs(di,{mode:"wait",children:[K==="overview"&&m.jsx(Vn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:B.overviewContent,children:A?m.jsx(qN,{task:A,tasksById:Qt,environments:d,projects:w}):m.jsx("div",{className:B.waitingMessage,children:"No additional details"})},"overview"),K==="stream"&&m.jsxs(Vn.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:[m.jsx(YN,{taskSessions:at,selectedSessionId:tt,onSelect:bt=>{P(bt)}}),m.jsxs("div",{ref:X,className:B.eventScroll,children:[!tt&&A&&m.jsxs("div",{className:B.emptyCta,children:[m.jsx("button",{className:B.ctaButton,onClick:()=>b(A.id),children:"Start Task"}),m.jsx("div",{className:B.ctaDescription,children:"Click to begin agent execution"})]}),tt&&I.length===0&&m.jsx("div",{className:B.waitingMessage,children:"Waiting for events..."}),m.jsx(ey,{eventsDropped:r}),I.map((bt,ue)=>m.jsx(Fv,{event:bt},`${bt.sessionId}-${bt.timestamp}-${ue}`))]})]},"stream"),K==="findings"&&m.jsx(Vn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:B.tabContent,children:Z?m.jsx(Oj,{projectId:Z}):m.jsx("div",{className:B.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),A&&m.jsx(qd,{isOpen:rt,title:"Delete Task?",description:`"${A.title}" will be permanently removed.`,onConfirm:$t,onCancel:()=>mt(!1)})]});if(!tt)return m.jsx("div",{className:B.emptyState,children:"No session selected"});const Pe=(se==null?void 0:se.status)==="running"||(se==null?void 0:se.status)==="waiting_input";return m.jsxs("div",{className:B.panelContainer,children:[m.jsx(Oa,{segments:ce,onNavigate:pe}),m.jsx(UN,{sessionId:tt,session:se,isActive:Pe,onKill:v}),m.jsx(VN,{sessionEvents:I,session:se,eventsDropped:r,scrollRef:X})]})}const XN="_toast_1bnyi_1",KN="_success_1bnyi_17",QN="_icon_1bnyi_21",PN="_error_1bnyi_24",FN="_warning_1bnyi_31",JN="_info_1bnyi_37",$N="_message_1bnyi_52",WN="_close_1bnyi_59",hl={toast:XN,success:KN,icon:QN,error:PN,warning:FN,info:JN,message:$N,close:WN},tD={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function eD({toast:a,onDismiss:i}){return _.useEffect(()=>{const l=setTimeout(()=>i(a.id),a.duration);return()=>clearTimeout(l)},[a.id,a.duration,i]),m.jsxs(Vn.div,{className:`${hl.toast} ${hl[a.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:[m.jsx("span",{className:hl.icon,"aria-hidden":"true",children:tD[a.variant]}),m.jsx("span",{className:hl.message,children:a.message}),m.jsx("button",{type:"button",className:hl.close,onClick:()=>i(a.id),"aria-label":"Dismiss notification",children:"×"})]})}const nD="_container_qqse2_1",aD={container:nD};function sD(){const{toasts:a,dismissToast:i}=od();return m.jsx("div",{className:aD.container,"data-testid":"toast-container",children:m.jsx(di,{children:a.map(l=>m.jsx(eD,{toast:l,onDismiss:i},l.id))})})}const iD="_root_cdda9_1",lD="_body_cdda9_7",oD="_main_cdda9_13",qu={root:iD,body:lD,main:oD},rD=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function cD(){const[a,i]=_.useState({kind:"empty"}),{lastSpawnedId:l}=En();return _.useEffect(()=>{l&&i({kind:"session",sessionId:l})},[l]),m.jsxs("div",{className:qu.root,children:[m.jsx(a1,{setViewMode:i}),m.jsxs("div",{className:qu.body,children:[m.jsx(tj,{viewMode:a,setViewMode:i}),m.jsxs("div",{className:qu.main,children:[m.jsx(ZN,{viewMode:a,setViewMode:i},a.kind==="task"?a.taskId:a.kind==="session"?a.sessionId:a.kind),m.jsx(bj,{viewMode:a,setViewMode:i})]})]}),m.jsx(sD,{})]})}function uD(){const a=rD?KS:VS;return m.jsx(PS,{children:m.jsx(a,{children:m.jsx(cD,{})})})}ES.createRoot(document.getElementById("root")).render(m.jsx(_.StrictMode,{children:m.jsx(uD,{})}));