@grackle-ai/web 0.13.0 → 0.14.2
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,141 @@
|
|
|
1
|
+
import{r as Q1,a as x,j as y,v as F1,b as J1,t as Oo,i as P1,f as W1,M as $1,c as tS}from"./markdown-gcy1Jmzi.js";import{r as eS,d as Ep,H as Ap,P as Np,i as nS,B as aS,a as iS,C as sS,M as lS}from"./dagview-EHk2VaeR.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function o(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(c){if(c.ep)return;c.ep=!0;const h=o(c);fetch(c.href,h)}})();var cc={exports:{}},Ps={},fc={exports:{}},dc={};/**
|
|
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 Dp;function oS(){return Dp||(Dp=1,(function(a){function s(E,q){var et=E.length;E.push(q);t:for(;0<et;){var yt=et-1>>>1,St=E[yt];if(0<c(St,q))E[yt]=q,E[et]=St,et=yt;else break t}}function o(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var q=E[0],et=E.pop();if(et!==q){E[0]=et;t:for(var yt=0,St=E.length,Gt=St>>>1;yt<Gt;){var Ct=2*(yt+1)-1,mt=E[Ct],Ht=Ct+1,de=E[Ht];if(0>c(mt,et))Ht<St&&0>c(de,mt)?(E[yt]=de,E[Ht]=et,yt=Ht):(E[yt]=mt,E[Ct]=et,yt=Ct);else if(Ht<St&&0>c(de,et))E[yt]=de,E[Ht]=et,yt=Ht;else break t}}return q}function c(E,q){var et=E.sortIndex-q.sortIndex;return et!==0?et:E.id-q.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;a.unstable_now=function(){return h.now()}}else{var f=Date,m=f.now();a.unstable_now=function(){return f.now()-m}}var p=[],g=[],S=1,b=null,_=3,N=!1,R=!1,w=!1,X=!1,I=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function k(E){for(var q=o(g);q!==null;){if(q.callback===null)r(g);else if(q.startTime<=E)r(g),q.sortIndex=q.expirationTime,s(p,q);else break;q=o(g)}}function Y(E){if(w=!1,k(E),!R)if(o(p)!==null)R=!0,G||(G=!0,ft());else{var q=o(g);q!==null&&Yt(Y,q.startTime-E)}}var G=!1,F=-1,B=5,nt=-1;function ct(){return X?!0:!(a.unstable_now()-nt<B)}function st(){if(X=!1,G){var E=a.unstable_now();nt=E;var q=!0;try{t:{R=!1,w&&(w=!1,J(F),F=-1),N=!0;var et=_;try{e:{for(k(E),b=o(p);b!==null&&!(b.expirationTime>E&&ct());){var yt=b.callback;if(typeof yt=="function"){b.callback=null,_=b.priorityLevel;var St=yt(b.expirationTime<=E);if(E=a.unstable_now(),typeof St=="function"){b.callback=St,k(E),q=!0;break e}b===o(p)&&r(p),k(E)}else r(p);b=o(p)}if(b!==null)q=!0;else{var Gt=o(g);Gt!==null&&Yt(Y,Gt.startTime-E),q=!1}}break t}finally{b=null,_=et,N=!1}q=void 0}}finally{q?ft():G=!1}}}var ft;if(typeof L=="function")ft=function(){L(st)};else if(typeof MessageChannel<"u"){var gt=new MessageChannel,Dt=gt.port2;gt.port1.onmessage=st,ft=function(){Dt.postMessage(null)}}else ft=function(){I(st,0)};function Yt(E,q){F=I(function(){E(a.unstable_now())},q)}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(E){E.callback=null},a.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<E?Math.floor(1e3/E):5},a.unstable_getCurrentPriorityLevel=function(){return _},a.unstable_next=function(E){switch(_){case 1:case 2:case 3:var q=3;break;default:q=_}var et=_;_=q;try{return E()}finally{_=et}},a.unstable_requestPaint=function(){X=!0},a.unstable_runWithPriority=function(E,q){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var et=_;_=E;try{return q()}finally{_=et}},a.unstable_scheduleCallback=function(E,q,et){var yt=a.unstable_now();switch(typeof et=="object"&&et!==null?(et=et.delay,et=typeof et=="number"&&0<et?yt+et:yt):et=yt,E){case 1:var St=-1;break;case 2:St=250;break;case 5:St=1073741823;break;case 4:St=1e4;break;default:St=5e3}return St=et+St,E={id:S++,callback:q,priorityLevel:E,startTime:et,expirationTime:St,sortIndex:-1},et>yt?(E.sortIndex=et,s(g,E),o(p)===null&&E===o(g)&&(w?(J(F),F=-1):w=!0,Yt(Y,et-yt))):(E.sortIndex=St,s(p,E),R||N||(R=!0,G||(G=!0,ft()))),E},a.unstable_shouldYield=ct,a.unstable_wrapCallback=function(E){var q=_;return function(){var et=_;_=q;try{return E.apply(this,arguments)}finally{_=et}}}})(dc)),dc}var Cp;function rS(){return Cp||(Cp=1,fc.exports=oS()),fc.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 jp;function uS(){if(jp)return Ps;jp=1;var a=rS(),s=Q1(),o=eS();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 c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function h(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 f(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 m(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 p(t){if(h(t)!==t)throw Error(r(188))}function g(t){var e=t.alternate;if(!e){if(e=h(t),e===null)throw Error(r(188));return e!==t?null:t}for(var n=t,i=e;;){var l=n.return;if(l===null)break;var u=l.alternate;if(u===null){if(i=l.return,i!==null){n=i;continue}break}if(l.child===u.child){for(u=l.child;u;){if(u===n)return p(l),t;if(u===i)return p(l),e;u=u.sibling}throw Error(r(188))}if(n.return!==i.return)n=l,i=u;else{for(var d=!1,v=l.child;v;){if(v===n){d=!0,n=l,i=u;break}if(v===i){d=!0,i=l,n=u;break}v=v.sibling}if(!d){for(v=u.child;v;){if(v===n){d=!0,n=u,i=l;break}if(v===i){d=!0,i=u,n=l;break}v=v.sibling}if(!d)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?t:e}function S(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=S(t),e!==null)return e;t=t.sibling}return null}var b=Object.assign,_=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),L=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),nt=Symbol.for("react.activity"),ct=Symbol.for("react.memo_cache_sentinel"),st=Symbol.iterator;function ft(t){return t===null||typeof t!="object"?null:(t=st&&t[st]||t["@@iterator"],typeof t=="function"?t:null)}var gt=Symbol.for("react.client.reference");function Dt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===gt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case w:return"Fragment";case I:return"Profiler";case X:return"StrictMode";case Y:return"Suspense";case G:return"SuspenseList";case nt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case R:return"Portal";case L:return t.displayName||"Context";case J: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 F:return e=t.displayName||null,e!==null?e:Dt(t.type)||"Memo";case B:e=t._payload,t=t._init;try{return Dt(t(e))}catch{}}return null}var Yt=Array.isArray,E=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,et={pending:!1,data:null,method:null,action:null},yt=[],St=-1;function Gt(t){return{current:t}}function Ct(t){0>St||(t.current=yt[St],yt[St]=null,St--)}function mt(t,e){St++,yt[St]=t.current,t.current=e}var Ht=Gt(null),de=Gt(null),Ne=Gt(null),Ie=Gt(null);function sn(t,e){switch(mt(Ne,e),mt(de,t),mt(Ht,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Zm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Zm(e),t=Qm(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Ct(Ht),mt(Ht,t)}function ke(){Ct(Ht),Ct(de),Ct(Ne)}function Sn(t){t.memoizedState!==null&&mt(Ie,t);var e=Ht.current,n=Qm(e,t.type);e!==n&&(mt(de,t),mt(Ht,n))}function Xe(t){de.current===t&&(Ct(Ht),Ct(de)),Ie.current===t&&(Ct(Ie),Zs._currentValue=et)}var Ke,bn;function we(t){if(Ke===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Ke=e&&e[1]||"",bn=-1<n.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+Ke+t+bn}var Ze=!1;function ln(t,e){if(!t||Ze)return"";Ze=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(e){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(O){var M=O}Reflect.construct(t,[],V)}else{try{V.call()}catch(O){M=O}t.call(V.prototype)}}else{try{throw Error()}catch(O){M=O}(V=t())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(O){if(O&&M&&typeof O.stack=="string")return[O.stack,M.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=i.DetermineComponentFrameRoot(),d=u[0],v=u[1];if(d&&v){var T=d.split(`
|
|
20
|
+
`),j=v.split(`
|
|
21
|
+
`);for(l=i=0;i<T.length&&!T[i].includes("DetermineComponentFrameRoot");)i++;for(;l<j.length&&!j[l].includes("DetermineComponentFrameRoot");)l++;if(i===T.length||l===j.length)for(i=T.length-1,l=j.length-1;1<=i&&0<=l&&T[i]!==j[l];)l--;for(;1<=i&&0<=l;i--,l--)if(T[i]!==j[l]){if(i!==1||l!==1)do if(i--,l--,0>l||T[i]!==j[l]){var z=`
|
|
22
|
+
`+T[i].replace(" at new "," at ");return t.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",t.displayName)),z}while(1<=i&&0<=l);break}}}finally{Ze=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?we(n):""}function K(t,e){switch(t.tag){case 26:case 27:case 5:return we(t.type);case 16:return we("Lazy");case 13:return t.child!==e&&e!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return ln(t.type,!1);case 11:return ln(t.type.render,!1);case 1:return ln(t.type,!0);case 31:return we("Activity");default:return""}}function at(t){try{var e="",n=null;do e+=K(t,n),n=t,t=t.return;while(t);return e}catch(i){return`
|
|
23
|
+
Error generating stack: `+i.message+`
|
|
24
|
+
`+i.stack}}var $=Object.prototype.hasOwnProperty,Q=a.unstable_scheduleCallback,bt=a.unstable_cancelCallback,Ot=a.unstable_shouldYield,H=a.unstable_requestPaint,P=a.unstable_now,Z=a.unstable_getCurrentPriorityLevel,Tt=a.unstable_ImmediatePriority,kt=a.unstable_UserBlockingPriority,dt=a.unstable_NormalPriority,De=a.unstable_LowPriority,ie=a.unstable_IdlePriority,di=a.log,hi=a.unstable_setDisableYieldValue,Dn=null,Ce=null;function Tn(t){if(typeof di=="function"&&hi(t),Ce&&typeof Ce.setStrictMode=="function")try{Ce.setStrictMode(Dn,t)}catch{}}var je=Math.clz32?Math.clz32:gl,pl=Math.log,vl=Math.LN2;function gl(t){return t>>>=0,t===0?32:31-(pl(t)/vl|0)|0}var za=256,Ba=262144,Ua=4194304;function Cn(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 Va(t,e,n){var i=t.pendingLanes;if(i===0)return 0;var l=0,u=t.suspendedLanes,d=t.pingedLanes;t=t.warmLanes;var v=i&134217727;return v!==0?(i=v&~u,i!==0?l=Cn(i):(d&=v,d!==0?l=Cn(d):n||(n=v&~t,n!==0&&(l=Cn(n))))):(v=i&~u,v!==0?l=Cn(v):d!==0?l=Cn(d):n||(n=i&~t,n!==0&&(l=Cn(n)))),l===0?0:e!==0&&e!==l&&(e&u)===0&&(u=l&-l,n=e&-e,u>=n||u===32&&(n&4194048)!==0)?e:l}function ia(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function ht(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 Bt(){var t=Ua;return Ua<<=1,(Ua&62914560)===0&&(Ua=4194304),t}function It(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ye(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function La(t,e,n,i,l,u){var d=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 v=t.entanglements,T=t.expirationTimes,j=t.hiddenUpdates;for(n=d&~n;0<n;){var z=31-je(n),V=1<<z;v[z]=0,T[z]=-1;var M=j[z];if(M!==null)for(j[z]=null,z=0;z<M.length;z++){var O=M[z];O!==null&&(O.lane&=-536870913)}n&=~V}i!==0&&jf(t,i,0),u!==0&&l===0&&t.tag!==0&&(t.suspendedLanes|=u&~(d&~e))}function jf(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var i=31-je(e);t.entangledLanes|=e,t.entanglements[i]=t.entanglements[i]|1073741824|n&261930}function Mf(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var i=31-je(n),l=1<<i;l&e|t[i]&e&&(t[i]|=e),n&=~l}}function Of(t,e){var n=e&-e;return n=(n&42)!==0?1:$o(n),(n&(t.suspendedLanes|e))!==0?0:n}function $o(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 tr(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Rf(){var t=q.p;return t!==0?t:(t=window.event,t===void 0?32:gp(t.type))}function kf(t,e){var n=q.p;try{return q.p=t,e()}finally{q.p=n}}var sa=Math.random().toString(36).slice(2),Se="__reactFiber$"+sa,Be="__reactProps$"+sa,mi="__reactContainer$"+sa,er="__reactEvents$"+sa,Ug="__reactListeners$"+sa,Vg="__reactHandles$"+sa,wf="__reactResources$"+sa,rs="__reactMarker$"+sa;function nr(t){delete t[Se],delete t[Be],delete t[er],delete t[Ug],delete t[Vg]}function pi(t){var e=t[Se];if(e)return e;for(var n=t.parentNode;n;){if(e=n[mi]||n[Se]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=ep(t);t!==null;){if(n=t[Se])return n;t=ep(t)}return e}t=n,n=t.parentNode}return null}function vi(t){if(t=t[Se]||t[mi]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function us(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(r(33))}function gi(t){var e=t[wf];return e||(e=t[wf]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function pe(t){t[rs]=!0}var zf=new Set,Bf={};function Ga(t,e){yi(t,e),yi(t+"Capture",e)}function yi(t,e){for(Bf[t]=e,t=0;t<e.length;t++)zf.add(e[t])}var Lg=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]*$"),Uf={},Vf={};function Gg(t){return $.call(Vf,t)?!0:$.call(Uf,t)?!1:Lg.test(t)?Vf[t]=!0:(Uf[t]=!0,!1)}function yl(t,e,n){if(Gg(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var i=e.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function Sl(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 Bn(t,e,n,i){if(i===null)t.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+i)}}function on(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Lf(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Hg(t,e,n){var i=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var l=i.get,u=i.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return l.call(this)},set:function(d){n=""+d,u.call(this,d)}}),Object.defineProperty(t,e,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(d){n=""+d},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function ar(t){if(!t._valueTracker){var e=Lf(t)?"checked":"value";t._valueTracker=Hg(t,e,""+t[e])}}function Gf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=Lf(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function bl(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 qg=/[\n"\\]/g;function rn(t){return t.replace(qg,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function ir(t,e,n,i,l,u,d,v){t.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?t.type=d:t.removeAttribute("type"),e!=null?d==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+on(e)):t.value!==""+on(e)&&(t.value=""+on(e)):d!=="submit"&&d!=="reset"||t.removeAttribute("value"),e!=null?sr(t,d,on(e)):n!=null?sr(t,d,on(n)):i!=null&&t.removeAttribute("value"),l==null&&u!=null&&(t.defaultChecked=!!u),l!=null&&(t.checked=l&&typeof l!="function"&&typeof l!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.name=""+on(v):t.removeAttribute("name")}function Hf(t,e,n,i,l,u,d,v){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){ar(t);return}n=n!=null?""+on(n):"",e=e!=null?""+on(e):n,v||e===t.value||(t.value=e),t.defaultValue=e}i=i??l,i=typeof i!="function"&&typeof i!="symbol"&&!!i,t.checked=v?t.checked:!!i,t.defaultChecked=!!i,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(t.name=d),ar(t)}function sr(t,e,n){e==="number"&&bl(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function Si(t,e,n,i){if(t=t.options,e){e={};for(var l=0;l<n.length;l++)e["$"+n[l]]=!0;for(n=0;n<t.length;n++)l=e.hasOwnProperty("$"+t[n].value),t[n].selected!==l&&(t[n].selected=l),l&&i&&(t[n].defaultSelected=!0)}else{for(n=""+on(n),e=null,l=0;l<t.length;l++){if(t[l].value===n){t[l].selected=!0,i&&(t[l].defaultSelected=!0);return}e!==null||t[l].disabled||(e=t[l])}e!==null&&(e.selected=!0)}}function qf(t,e,n){if(e!=null&&(e=""+on(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+on(n):""}function Yf(t,e,n,i){if(e==null){if(i!=null){if(n!=null)throw Error(r(92));if(Yt(i)){if(1<i.length)throw Error(r(93));i=i[0]}n=i}n==null&&(n=""),e=n}n=on(e),t.defaultValue=n,i=t.textContent,i===n&&i!==""&&i!==null&&(t.value=i),ar(t)}function bi(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Yg=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 If(t,e,n){var i=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":i?t.setProperty(e,n):typeof n!="number"||n===0||Yg.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function Xf(t,e,n){if(e!=null&&typeof e!="object")throw Error(r(62));if(t=t.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||e!=null&&e.hasOwnProperty(i)||(i.indexOf("--")===0?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="");for(var l in e)i=e[l],e.hasOwnProperty(l)&&n[l]!==i&&If(t,l,i)}else for(var u in e)e.hasOwnProperty(u)&&If(t,u,e[u])}function lr(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 Ig=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"]]),Xg=/^[\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 Tl(t){return Xg.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Un(){}var or=null;function rr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ti=null,_i=null;function Kf(t){var e=vi(t);if(e&&(t=e.stateNode)){var n=t[Be]||null;t:switch(t=e.stateNode,e.type){case"input":if(ir(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="'+rn(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var l=i[Be]||null;if(!l)throw Error(r(90));ir(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(e=0;e<n.length;e++)i=n[e],i.form===t.form&&Gf(i)}break t;case"textarea":qf(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&Si(t,!!n.multiple,e,!1)}}}var ur=!1;function Zf(t,e,n){if(ur)return t(e,n);ur=!0;try{var i=t(e);return i}finally{if(ur=!1,(Ti!==null||_i!==null)&&(ro(),Ti&&(e=Ti,t=_i,_i=Ti=null,Kf(e),t)))for(e=0;e<t.length;e++)Kf(t[e])}}function cs(t,e){var n=t.stateNode;if(n===null)return null;var i=n[Be]||null;if(i===null)return null;n=i[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":(i=!i.disabled)||(t=t.type,i=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!i;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(r(231,e,typeof n));return n}var Vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cr=!1;if(Vn)try{var fs={};Object.defineProperty(fs,"passive",{get:function(){cr=!0}}),window.addEventListener("test",fs,fs),window.removeEventListener("test",fs,fs)}catch{cr=!1}var la=null,fr=null,_l=null;function Qf(){if(_l)return _l;var t,e=fr,n=e.length,i,l="value"in la?la.value:la.textContent,u=l.length;for(t=0;t<n&&e[t]===l[t];t++);var d=n-t;for(i=1;i<=d&&e[n-i]===l[u-i];i++);return _l=l.slice(t,1<i?1-i:void 0)}function xl(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 El(){return!0}function Ff(){return!1}function Ue(t){function e(n,i,l,u,d){this._reactName=n,this._targetInst=l,this.type=i,this.nativeEvent=u,this.target=d,this.currentTarget=null;for(var v in t)t.hasOwnProperty(v)&&(n=t[v],this[v]=n?n(u):u[v]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?El:Ff,this.isPropagationStopped=Ff,this}return b(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=El)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=El)},persist:function(){},isPersistent:El}),e}var Ha={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Al=Ue(Ha),ds=b({},Ha,{view:0,detail:0}),Kg=Ue(ds),dr,hr,hs,Nl=b({},ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pr,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!==hs&&(hs&&t.type==="mousemove"?(dr=t.screenX-hs.screenX,hr=t.screenY-hs.screenY):hr=dr=0,hs=t),dr)},movementY:function(t){return"movementY"in t?t.movementY:hr}}),Jf=Ue(Nl),Zg=b({},Nl,{dataTransfer:0}),Qg=Ue(Zg),Fg=b({},ds,{relatedTarget:0}),mr=Ue(Fg),Jg=b({},Ha,{animationName:0,elapsedTime:0,pseudoElement:0}),Pg=Ue(Jg),Wg=b({},Ha,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),$g=Ue(Wg),ty=b({},Ha,{data:0}),Pf=Ue(ty),ey={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ny={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"},ay={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iy(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=ay[t])?!!e[t]:!1}function pr(){return iy}var sy=b({},ds,{key:function(t){if(t.key){var e=ey[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=xl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?ny[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pr,charCode:function(t){return t.type==="keypress"?xl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?xl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),ly=Ue(sy),oy=b({},Nl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wf=Ue(oy),ry=b({},ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pr}),uy=Ue(ry),cy=b({},Ha,{propertyName:0,elapsedTime:0,pseudoElement:0}),fy=Ue(cy),dy=b({},Nl,{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}),hy=Ue(dy),my=b({},Ha,{newState:0,oldState:0}),py=Ue(my),vy=[9,13,27,32],vr=Vn&&"CompositionEvent"in window,ms=null;Vn&&"documentMode"in document&&(ms=document.documentMode);var gy=Vn&&"TextEvent"in window&&!ms,$f=Vn&&(!vr||ms&&8<ms&&11>=ms),td=" ",ed=!1;function nd(t,e){switch(t){case"keyup":return vy.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ad(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var xi=!1;function yy(t,e){switch(t){case"compositionend":return ad(e);case"keypress":return e.which!==32?null:(ed=!0,td);case"textInput":return t=e.data,t===td&&ed?null:t;default:return null}}function Sy(t,e){if(xi)return t==="compositionend"||!vr&&nd(t,e)?(t=Qf(),_l=fr=la=null,xi=!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 $f&&e.locale!=="ko"?null:e.data;default:return null}}var by={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 id(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!by[t.type]:e==="textarea"}function sd(t,e,n,i){Ti?_i?_i.push(i):_i=[i]:Ti=i,e=vo(e,"onChange"),0<e.length&&(n=new Al("onChange","change",null,n,i),t.push({event:n,listeners:e}))}var ps=null,vs=null;function Ty(t){Hm(t,0)}function Dl(t){var e=us(t);if(Gf(e))return t}function ld(t,e){if(t==="change")return e}var od=!1;if(Vn){var gr;if(Vn){var yr="oninput"in document;if(!yr){var rd=document.createElement("div");rd.setAttribute("oninput","return;"),yr=typeof rd.oninput=="function"}gr=yr}else gr=!1;od=gr&&(!document.documentMode||9<document.documentMode)}function ud(){ps&&(ps.detachEvent("onpropertychange",cd),vs=ps=null)}function cd(t){if(t.propertyName==="value"&&Dl(vs)){var e=[];sd(e,vs,t,rr(t)),Zf(Ty,e)}}function _y(t,e,n){t==="focusin"?(ud(),ps=e,vs=n,ps.attachEvent("onpropertychange",cd)):t==="focusout"&&ud()}function xy(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Dl(vs)}function Ey(t,e){if(t==="click")return Dl(e)}function Ay(t,e){if(t==="input"||t==="change")return Dl(e)}function Ny(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Qe=typeof Object.is=="function"?Object.is:Ny;function gs(t,e){if(Qe(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var l=n[i];if(!$.call(e,l)||!Qe(t[l],e[l]))return!1}return!0}function fd(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function dd(t,e){var n=fd(t);t=0;for(var i;n;){if(n.nodeType===3){if(i=t+n.textContent.length,t<=e&&i>=e)return{node:n,offset:e-t};t=i}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=fd(n)}}function hd(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?hd(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function md(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=bl(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=bl(t.document)}return e}function Sr(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 Dy=Vn&&"documentMode"in document&&11>=document.documentMode,Ei=null,br=null,ys=null,Tr=!1;function pd(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tr||Ei==null||Ei!==bl(i)||(i=Ei,"selectionStart"in i&&Sr(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ys&&gs(ys,i)||(ys=i,i=vo(br,"onSelect"),0<i.length&&(e=new Al("onSelect","select",null,e,n),t.push({event:e,listeners:i}),e.target=Ei)))}function qa(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Ai={animationend:qa("Animation","AnimationEnd"),animationiteration:qa("Animation","AnimationIteration"),animationstart:qa("Animation","AnimationStart"),transitionrun:qa("Transition","TransitionRun"),transitionstart:qa("Transition","TransitionStart"),transitioncancel:qa("Transition","TransitionCancel"),transitionend:qa("Transition","TransitionEnd")},_r={},vd={};Vn&&(vd=document.createElement("div").style,"AnimationEvent"in window||(delete Ai.animationend.animation,delete Ai.animationiteration.animation,delete Ai.animationstart.animation),"TransitionEvent"in window||delete Ai.transitionend.transition);function Ya(t){if(_r[t])return _r[t];if(!Ai[t])return t;var e=Ai[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in vd)return _r[t]=e[n];return t}var gd=Ya("animationend"),yd=Ya("animationiteration"),Sd=Ya("animationstart"),Cy=Ya("transitionrun"),jy=Ya("transitionstart"),My=Ya("transitioncancel"),bd=Ya("transitionend"),Td=new Map,xr="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(" ");xr.push("scrollEnd");function _n(t,e){Td.set(t,e),Ga(e,[t])}var Cl=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=[],Ni=0,Er=0;function jl(){for(var t=Ni,e=Er=Ni=0;e<t;){var n=un[e];un[e++]=null;var i=un[e];un[e++]=null;var l=un[e];un[e++]=null;var u=un[e];if(un[e++]=null,i!==null&&l!==null){var d=i.pending;d===null?l.next=l:(l.next=d.next,d.next=l),i.pending=l}u!==0&&_d(n,l,u)}}function Ml(t,e,n,i){un[Ni++]=t,un[Ni++]=e,un[Ni++]=n,un[Ni++]=i,Er|=i,t.lanes|=i,t=t.alternate,t!==null&&(t.lanes|=i)}function Ar(t,e,n,i){return Ml(t,e,n,i),Ol(t)}function Ia(t,e){return Ml(t,null,null,e),Ol(t)}function _d(t,e,n){t.lanes|=n;var i=t.alternate;i!==null&&(i.lanes|=n);for(var l=!1,u=t.return;u!==null;)u.childLanes|=n,i=u.alternate,i!==null&&(i.childLanes|=n),u.tag===22&&(t=u.stateNode,t===null||t._visibility&1||(l=!0)),t=u,u=u.return;return t.tag===3?(u=t.stateNode,l&&e!==null&&(l=31-je(n),t=u.hiddenUpdates,i=t[l],i===null?t[l]=[e]:i.push(e),e.lane=n|536870912),u):null}function Ol(t){if(50<Gs)throw Gs=0,wu=null,Error(r(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Di={};function Oy(t,e,n,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fe(t,e,n,i){return new Oy(t,e,n,i)}function Nr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ln(t,e){var n=t.alternate;return n===null?(n=Fe(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 xd(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 Rl(t,e,n,i,l,u){var d=0;if(i=t,typeof t=="function")Nr(t)&&(d=1);else if(typeof t=="string")d=B1(t,n,Ht.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case nt:return t=Fe(31,n,e,l),t.elementType=nt,t.lanes=u,t;case w:return Xa(n.children,l,u,e);case X:d=8,l|=24;break;case I:return t=Fe(12,n,e,l|2),t.elementType=I,t.lanes=u,t;case Y:return t=Fe(13,n,e,l),t.elementType=Y,t.lanes=u,t;case G:return t=Fe(19,n,e,l),t.elementType=G,t.lanes=u,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case L:d=10;break t;case J:d=9;break t;case k:d=11;break t;case F:d=14;break t;case B:d=16,i=null;break t}d=29,n=Error(r(130,t===null?"null":typeof t,"")),i=null}return e=Fe(d,n,e,l),e.elementType=t,e.type=i,e.lanes=u,e}function Xa(t,e,n,i){return t=Fe(7,t,i,e),t.lanes=n,t}function Dr(t,e,n){return t=Fe(6,t,null,e),t.lanes=n,t}function Ed(t){var e=Fe(18,null,null,0);return e.stateNode=t,e}function Cr(t,e,n){return e=Fe(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Ad=new WeakMap;function cn(t,e){if(typeof t=="object"&&t!==null){var n=Ad.get(t);return n!==void 0?n:(e={value:t,source:e,stack:at(e)},Ad.set(t,e),e)}return{value:t,source:e,stack:at(e)}}var Ci=[],ji=0,kl=null,Ss=0,fn=[],dn=0,oa=null,jn=1,Mn="";function Gn(t,e){Ci[ji++]=Ss,Ci[ji++]=kl,kl=t,Ss=e}function Nd(t,e,n){fn[dn++]=jn,fn[dn++]=Mn,fn[dn++]=oa,oa=t;var i=jn;t=Mn;var l=32-je(i)-1;i&=~(1<<l),n+=1;var u=32-je(e)+l;if(30<u){var d=l-l%5;u=(i&(1<<d)-1).toString(32),i>>=d,l-=d,jn=1<<32-je(e)+l|n<<l|i,Mn=u+t}else jn=1<<u|n<<l|i,Mn=t}function jr(t){t.return!==null&&(Gn(t,1),Nd(t,1,0))}function Mr(t){for(;t===kl;)kl=Ci[--ji],Ci[ji]=null,Ss=Ci[--ji],Ci[ji]=null;for(;t===oa;)oa=fn[--dn],fn[dn]=null,Mn=fn[--dn],fn[dn]=null,jn=fn[--dn],fn[dn]=null}function Dd(t,e){fn[dn++]=jn,fn[dn++]=Mn,fn[dn++]=oa,jn=e.id,Mn=e.overflow,oa=t}var be=null,Kt=null,Nt=!1,ra=null,hn=!1,Or=Error(r(519));function ua(t){var e=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bs(cn(e,t)),Or}function Cd(t){var e=t.stateNode,n=t.type,i=t.memoizedProps;switch(e[Se]=t,e[Be]=i,n){case"dialog":xt("cancel",e),xt("close",e);break;case"iframe":case"object":case"embed":xt("load",e);break;case"video":case"audio":for(n=0;n<qs.length;n++)xt(qs[n],e);break;case"source":xt("error",e);break;case"img":case"image":case"link":xt("error",e),xt("load",e);break;case"details":xt("toggle",e);break;case"input":xt("invalid",e),Hf(e,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":xt("invalid",e);break;case"textarea":xt("invalid",e),Yf(e,i.value,i.defaultValue,i.children)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||i.suppressHydrationWarning===!0||Xm(e.textContent,n)?(i.popover!=null&&(xt("beforetoggle",e),xt("toggle",e)),i.onScroll!=null&&xt("scroll",e),i.onScrollEnd!=null&&xt("scrollend",e),i.onClick!=null&&(e.onclick=Un),e=!0):e=!1,e||ua(t,!0)}function jd(t){for(be=t.return;be;)switch(be.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:be=be.return}}function Mi(t){if(t!==be)return!1;if(!Nt)return jd(t),Nt=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||Fu(t.type,t.memoizedProps)),n=!n),n&&Kt&&ua(t),jd(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Kt=tp(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Kt=tp(t)}else e===27?(e=Kt,xa(t.type)?(t=tc,tc=null,Kt=t):Kt=e):Kt=be?pn(t.stateNode.nextSibling):null;return!0}function Ka(){Kt=be=null,Nt=!1}function Rr(){var t=ra;return t!==null&&(He===null?He=t:He.push.apply(He,t),ra=null),t}function bs(t){ra===null?ra=[t]:ra.push(t)}var kr=Gt(null),Za=null,Hn=null;function ca(t,e,n){mt(kr,e._currentValue),e._currentValue=n}function qn(t){t._currentValue=kr.current,Ct(kr)}function wr(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function zr(t,e,n,i){var l=t.child;for(l!==null&&(l.return=t);l!==null;){var u=l.dependencies;if(u!==null){var d=l.child;u=u.firstContext;t:for(;u!==null;){var v=u;u=l;for(var T=0;T<e.length;T++)if(v.context===e[T]){u.lanes|=n,v=u.alternate,v!==null&&(v.lanes|=n),wr(u.return,n,t),i||(d=null);break t}u=v.next}}else if(l.tag===18){if(d=l.return,d===null)throw Error(r(341));d.lanes|=n,u=d.alternate,u!==null&&(u.lanes|=n),wr(d,n,t),d=null}else d=l.child;if(d!==null)d.return=l;else for(d=l;d!==null;){if(d===t){d=null;break}if(l=d.sibling,l!==null){l.return=d.return,d=l;break}d=d.return}l=d}}function Oi(t,e,n,i){t=null;for(var l=e,u=!1;l!==null;){if(!u){if((l.flags&524288)!==0)u=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var d=l.alternate;if(d===null)throw Error(r(387));if(d=d.memoizedProps,d!==null){var v=l.type;Qe(l.pendingProps.value,d.value)||(t!==null?t.push(v):t=[v])}}else if(l===Ie.current){if(d=l.alternate,d===null)throw Error(r(387));d.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(t!==null?t.push(Zs):t=[Zs])}l=l.return}t!==null&&zr(e,t,n,i),e.flags|=262144}function wl(t){for(t=t.firstContext;t!==null;){if(!Qe(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Qa(t){Za=t,Hn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Te(t){return Md(Za,t)}function zl(t,e){return Za===null&&Qa(t),Md(t,e)}function Md(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},Hn===null){if(t===null)throw Error(r(308));Hn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Hn=Hn.next=e;return n}var Ry=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,i){t.push(i)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},ky=a.unstable_scheduleCallback,wy=a.unstable_NormalPriority,se={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Br(){return{controller:new Ry,data:new Map,refCount:0}}function Ts(t){t.refCount--,t.refCount===0&&ky(wy,function(){t.controller.abort()})}var _s=null,Ur=0,Ri=0,ki=null;function zy(t,e){if(_s===null){var n=_s=[];Ur=0,Ri=Gu(),ki={status:"pending",value:void 0,then:function(i){n.push(i)}}}return Ur++,e.then(Od,Od),e}function Od(){if(--Ur===0&&_s!==null){ki!==null&&(ki.status="fulfilled");var t=_s;_s=null,Ri=0,ki=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function By(t,e){var n=[],i={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return t.then(function(){i.status="fulfilled",i.value=e;for(var l=0;l<n.length;l++)(0,n[l])(e)},function(l){for(i.status="rejected",i.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),i}var Rd=E.S;E.S=function(t,e){pm=P(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&zy(t,e),Rd!==null&&Rd(t,e)};var Fa=Gt(null);function Vr(){var t=Fa.current;return t!==null?t:qt.pooledCache}function Bl(t,e){e===null?mt(Fa,Fa.current):mt(Fa,e.pool)}function kd(){var t=Vr();return t===null?null:{parent:se._currentValue,pool:t}}var wi=Error(r(460)),Lr=Error(r(474)),Ul=Error(r(542)),Vl={then:function(){}};function wd(t){return t=t.status,t==="fulfilled"||t==="rejected"}function zd(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(Un,Un),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Ud(t),t;default:if(typeof e.status=="string")e.then(Un,Un);else{if(t=qt,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=e,t.status="pending",t.then(function(i){if(e.status==="pending"){var l=e;l.status="fulfilled",l.value=i}},function(i){if(e.status==="pending"){var l=e;l.status="rejected",l.reason=i}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Ud(t),t}throw Pa=e,wi}}function Ja(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Pa=n,wi):n}}var Pa=null;function Bd(){if(Pa===null)throw Error(r(459));var t=Pa;return Pa=null,t}function Ud(t){if(t===wi||t===Ul)throw Error(r(483))}var zi=null,xs=0;function Ll(t){var e=xs;return xs+=1,zi===null&&(zi=[]),zd(zi,t,e)}function Es(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Gl(t,e){throw e.$$typeof===_?Error(r(525)):(t=Object.prototype.toString.call(e),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Vd(t){function e(D,A){if(t){var C=D.deletions;C===null?(D.deletions=[A],D.flags|=16):C.push(A)}}function n(D,A){if(!t)return null;for(;A!==null;)e(D,A),A=A.sibling;return null}function i(D){for(var A=new Map;D!==null;)D.key!==null?A.set(D.key,D):A.set(D.index,D),D=D.sibling;return A}function l(D,A){return D=Ln(D,A),D.index=0,D.sibling=null,D}function u(D,A,C){return D.index=C,t?(C=D.alternate,C!==null?(C=C.index,C<A?(D.flags|=67108866,A):C):(D.flags|=67108866,A)):(D.flags|=1048576,A)}function d(D){return t&&D.alternate===null&&(D.flags|=67108866),D}function v(D,A,C,U){return A===null||A.tag!==6?(A=Dr(C,D.mode,U),A.return=D,A):(A=l(A,C),A.return=D,A)}function T(D,A,C,U){var lt=C.type;return lt===w?z(D,A,C.props.children,U,C.key):A!==null&&(A.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===B&&Ja(lt)===A.type)?(A=l(A,C.props),Es(A,C),A.return=D,A):(A=Rl(C.type,C.key,C.props,null,D.mode,U),Es(A,C),A.return=D,A)}function j(D,A,C,U){return A===null||A.tag!==4||A.stateNode.containerInfo!==C.containerInfo||A.stateNode.implementation!==C.implementation?(A=Cr(C,D.mode,U),A.return=D,A):(A=l(A,C.children||[]),A.return=D,A)}function z(D,A,C,U,lt){return A===null||A.tag!==7?(A=Xa(C,D.mode,U,lt),A.return=D,A):(A=l(A,C),A.return=D,A)}function V(D,A,C){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=Dr(""+A,D.mode,C),A.return=D,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case N:return C=Rl(A.type,A.key,A.props,null,D.mode,C),Es(C,A),C.return=D,C;case R:return A=Cr(A,D.mode,C),A.return=D,A;case B:return A=Ja(A),V(D,A,C)}if(Yt(A)||ft(A))return A=Xa(A,D.mode,C,null),A.return=D,A;if(typeof A.then=="function")return V(D,Ll(A),C);if(A.$$typeof===L)return V(D,zl(D,A),C);Gl(D,A)}return null}function M(D,A,C,U){var lt=A!==null?A.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return lt!==null?null:v(D,A,""+C,U);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case N:return C.key===lt?T(D,A,C,U):null;case R:return C.key===lt?j(D,A,C,U):null;case B:return C=Ja(C),M(D,A,C,U)}if(Yt(C)||ft(C))return lt!==null?null:z(D,A,C,U,null);if(typeof C.then=="function")return M(D,A,Ll(C),U);if(C.$$typeof===L)return M(D,A,zl(D,C),U);Gl(D,C)}return null}function O(D,A,C,U,lt){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return D=D.get(C)||null,v(A,D,""+U,lt);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case N:return D=D.get(U.key===null?C:U.key)||null,T(A,D,U,lt);case R:return D=D.get(U.key===null?C:U.key)||null,j(A,D,U,lt);case B:return U=Ja(U),O(D,A,C,U,lt)}if(Yt(U)||ft(U))return D=D.get(C)||null,z(A,D,U,lt,null);if(typeof U.then=="function")return O(D,A,C,Ll(U),lt);if(U.$$typeof===L)return O(D,A,C,zl(A,U),lt);Gl(A,U)}return null}function tt(D,A,C,U){for(var lt=null,jt=null,it=A,vt=A=0,At=null;it!==null&&vt<C.length;vt++){it.index>vt?(At=it,it=null):At=it.sibling;var Mt=M(D,it,C[vt],U);if(Mt===null){it===null&&(it=At);break}t&&it&&Mt.alternate===null&&e(D,it),A=u(Mt,A,vt),jt===null?lt=Mt:jt.sibling=Mt,jt=Mt,it=At}if(vt===C.length)return n(D,it),Nt&&Gn(D,vt),lt;if(it===null){for(;vt<C.length;vt++)it=V(D,C[vt],U),it!==null&&(A=u(it,A,vt),jt===null?lt=it:jt.sibling=it,jt=it);return Nt&&Gn(D,vt),lt}for(it=i(it);vt<C.length;vt++)At=O(it,D,vt,C[vt],U),At!==null&&(t&&At.alternate!==null&&it.delete(At.key===null?vt:At.key),A=u(At,A,vt),jt===null?lt=At:jt.sibling=At,jt=At);return t&&it.forEach(function(Ca){return e(D,Ca)}),Nt&&Gn(D,vt),lt}function rt(D,A,C,U){if(C==null)throw Error(r(151));for(var lt=null,jt=null,it=A,vt=A=0,At=null,Mt=C.next();it!==null&&!Mt.done;vt++,Mt=C.next()){it.index>vt?(At=it,it=null):At=it.sibling;var Ca=M(D,it,Mt.value,U);if(Ca===null){it===null&&(it=At);break}t&&it&&Ca.alternate===null&&e(D,it),A=u(Ca,A,vt),jt===null?lt=Ca:jt.sibling=Ca,jt=Ca,it=At}if(Mt.done)return n(D,it),Nt&&Gn(D,vt),lt;if(it===null){for(;!Mt.done;vt++,Mt=C.next())Mt=V(D,Mt.value,U),Mt!==null&&(A=u(Mt,A,vt),jt===null?lt=Mt:jt.sibling=Mt,jt=Mt);return Nt&&Gn(D,vt),lt}for(it=i(it);!Mt.done;vt++,Mt=C.next())Mt=O(it,D,vt,Mt.value,U),Mt!==null&&(t&&Mt.alternate!==null&&it.delete(Mt.key===null?vt:Mt.key),A=u(Mt,A,vt),jt===null?lt=Mt:jt.sibling=Mt,jt=Mt);return t&&it.forEach(function(Z1){return e(D,Z1)}),Nt&&Gn(D,vt),lt}function Lt(D,A,C,U){if(typeof C=="object"&&C!==null&&C.type===w&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case N:t:{for(var lt=C.key;A!==null;){if(A.key===lt){if(lt=C.type,lt===w){if(A.tag===7){n(D,A.sibling),U=l(A,C.props.children),U.return=D,D=U;break t}}else if(A.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===B&&Ja(lt)===A.type){n(D,A.sibling),U=l(A,C.props),Es(U,C),U.return=D,D=U;break t}n(D,A);break}else e(D,A);A=A.sibling}C.type===w?(U=Xa(C.props.children,D.mode,U,C.key),U.return=D,D=U):(U=Rl(C.type,C.key,C.props,null,D.mode,U),Es(U,C),U.return=D,D=U)}return d(D);case R:t:{for(lt=C.key;A!==null;){if(A.key===lt)if(A.tag===4&&A.stateNode.containerInfo===C.containerInfo&&A.stateNode.implementation===C.implementation){n(D,A.sibling),U=l(A,C.children||[]),U.return=D,D=U;break t}else{n(D,A);break}else e(D,A);A=A.sibling}U=Cr(C,D.mode,U),U.return=D,D=U}return d(D);case B:return C=Ja(C),Lt(D,A,C,U)}if(Yt(C))return tt(D,A,C,U);if(ft(C)){if(lt=ft(C),typeof lt!="function")throw Error(r(150));return C=lt.call(C),rt(D,A,C,U)}if(typeof C.then=="function")return Lt(D,A,Ll(C),U);if(C.$$typeof===L)return Lt(D,A,zl(D,C),U);Gl(D,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,A!==null&&A.tag===6?(n(D,A.sibling),U=l(A,C),U.return=D,D=U):(n(D,A),U=Dr(C,D.mode,U),U.return=D,D=U),d(D)):n(D,A)}return function(D,A,C,U){try{xs=0;var lt=Lt(D,A,C,U);return zi=null,lt}catch(it){if(it===wi||it===Ul)throw it;var jt=Fe(29,it,null,D.mode);return jt.lanes=U,jt.return=D,jt}finally{}}}var Wa=Vd(!0),Ld=Vd(!1),fa=!1;function Gr(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hr(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 da(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ha(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,(Rt&2)!==0){var l=i.pending;return l===null?e.next=e:(e.next=l.next,l.next=e),i.pending=e,e=Ol(t),_d(t,null,n),e}return Ml(t,i,e,n),Ol(t)}function As(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Mf(t,n)}}function qr(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var l=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?l=u=d:u=u.next=d,n=n.next}while(n!==null);u===null?l=u=e:u=u.next=e}else l=u=e;n={baseState:i.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:i.shared,callbacks:i.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var Yr=!1;function Ns(){if(Yr){var t=ki;if(t!==null)throw t}}function Ds(t,e,n,i){Yr=!1;var l=t.updateQueue;fa=!1;var u=l.firstBaseUpdate,d=l.lastBaseUpdate,v=l.shared.pending;if(v!==null){l.shared.pending=null;var T=v,j=T.next;T.next=null,d===null?u=j:d.next=j,d=T;var z=t.alternate;z!==null&&(z=z.updateQueue,v=z.lastBaseUpdate,v!==d&&(v===null?z.firstBaseUpdate=j:v.next=j,z.lastBaseUpdate=T))}if(u!==null){var V=l.baseState;d=0,z=j=T=null,v=u;do{var M=v.lane&-536870913,O=M!==v.lane;if(O?(Et&M)===M:(i&M)===M){M!==0&&M===Ri&&(Yr=!0),z!==null&&(z=z.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});t:{var tt=t,rt=v;M=e;var Lt=n;switch(rt.tag){case 1:if(tt=rt.payload,typeof tt=="function"){V=tt.call(Lt,V,M);break t}V=tt;break t;case 3:tt.flags=tt.flags&-65537|128;case 0:if(tt=rt.payload,M=typeof tt=="function"?tt.call(Lt,V,M):tt,M==null)break t;V=b({},V,M);break t;case 2:fa=!0}}M=v.callback,M!==null&&(t.flags|=64,O&&(t.flags|=8192),O=l.callbacks,O===null?l.callbacks=[M]:O.push(M))}else O={lane:M,tag:v.tag,payload:v.payload,callback:v.callback,next:null},z===null?(j=z=O,T=V):z=z.next=O,d|=M;if(v=v.next,v===null){if(v=l.shared.pending,v===null)break;O=v,v=O.next,O.next=null,l.lastBaseUpdate=O,l.shared.pending=null}}while(!0);z===null&&(T=V),l.baseState=T,l.firstBaseUpdate=j,l.lastBaseUpdate=z,u===null&&(l.shared.lanes=0),ya|=d,t.lanes=d,t.memoizedState=V}}function Gd(t,e){if(typeof t!="function")throw Error(r(191,t));t.call(e)}function Hd(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)Gd(n[t],e)}var Bi=Gt(null),Hl=Gt(0);function qd(t,e){t=Pn,mt(Hl,t),mt(Bi,e),Pn=t|e.baseLanes}function Ir(){mt(Hl,Pn),mt(Bi,Bi.current)}function Xr(){Pn=Hl.current,Ct(Bi),Ct(Hl)}var Je=Gt(null),mn=null;function ma(t){var e=t.alternate;mt(ee,ee.current&1),mt(Je,t),mn===null&&(e===null||Bi.current!==null||e.memoizedState!==null)&&(mn=t)}function Kr(t){mt(ee,ee.current),mt(Je,t),mn===null&&(mn=t)}function Yd(t){t.tag===22?(mt(ee,ee.current),mt(Je,t),mn===null&&(mn=t)):pa()}function pa(){mt(ee,ee.current),mt(Je,Je.current)}function Pe(t){Ct(Je),mn===t&&(mn=null),Ct(ee)}var ee=Gt(0);function ql(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Wu(n)||$u(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 Yn=0,pt=null,Ut=null,le=null,Yl=!1,Ui=!1,$a=!1,Il=0,Cs=0,Vi=null,Uy=0;function Pt(){throw Error(r(321))}function Zr(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Qe(t[n],e[n]))return!1;return!0}function Qr(t,e,n,i,l,u){return Yn=u,pt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,E.H=t===null||t.memoizedState===null?Nh:uu,$a=!1,u=n(i,l),$a=!1,Ui&&(u=Xd(e,n,i,l)),Id(t),u}function Id(t){E.H=Os;var e=Ut!==null&&Ut.next!==null;if(Yn=0,le=Ut=pt=null,Yl=!1,Cs=0,Vi=null,e)throw Error(r(300));t===null||oe||(t=t.dependencies,t!==null&&wl(t)&&(oe=!0))}function Xd(t,e,n,i){pt=t;var l=0;do{if(Ui&&(Vi=null),Cs=0,Ui=!1,25<=l)throw Error(r(301));if(l+=1,le=Ut=null,t.updateQueue!=null){var u=t.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}E.H=Dh,u=e(n,i)}while(Ui);return u}function Vy(){var t=E.H,e=t.useState()[0];return e=typeof e.then=="function"?js(e):e,t=t.useState()[0],(Ut!==null?Ut.memoizedState:null)!==t&&(pt.flags|=1024),e}function Fr(){var t=Il!==0;return Il=0,t}function Jr(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function Pr(t){if(Yl){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Yl=!1}Yn=0,le=Ut=pt=null,Ui=!1,Cs=Il=0,Vi=null}function ze(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return le===null?pt.memoizedState=le=t:le=le.next=t,le}function ne(){if(Ut===null){var t=pt.alternate;t=t!==null?t.memoizedState:null}else t=Ut.next;var e=le===null?pt.memoizedState:le.next;if(e!==null)le=e,Ut=t;else{if(t===null)throw pt.alternate===null?Error(r(467)):Error(r(310));Ut=t,t={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},le===null?pt.memoizedState=le=t:le=le.next=t}return le}function Xl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function js(t){var e=Cs;return Cs+=1,Vi===null&&(Vi=[]),t=zd(Vi,t,e),e=pt,(le===null?e.memoizedState:le.next)===null&&(e=e.alternate,E.H=e===null||e.memoizedState===null?Nh:uu),t}function Kl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return js(t);if(t.$$typeof===L)return Te(t)}throw Error(r(438,String(t)))}function Wr(t){var e=null,n=pt.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var i=pt.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(e={data:i.data.map(function(l){return l.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=Xl(),pt.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),i=0;i<t;i++)n[i]=ct;return e.index++,n}function In(t,e){return typeof e=="function"?e(t):e}function Zl(t){var e=ne();return $r(e,Ut,t)}function $r(t,e,n){var i=t.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=n;var l=t.baseQueue,u=i.pending;if(u!==null){if(l!==null){var d=l.next;l.next=u.next,u.next=d}e.baseQueue=l=u,i.pending=null}if(u=t.baseState,l===null)t.memoizedState=u;else{e=l.next;var v=d=null,T=null,j=e,z=!1;do{var V=j.lane&-536870913;if(V!==j.lane?(Et&V)===V:(Yn&V)===V){var M=j.revertLane;if(M===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),V===Ri&&(z=!0);else if((Yn&M)===M){j=j.next,M===Ri&&(z=!0);continue}else V={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},T===null?(v=T=V,d=u):T=T.next=V,pt.lanes|=M,ya|=M;V=j.action,$a&&n(u,V),u=j.hasEagerState?j.eagerState:n(u,V)}else M={lane:V,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},T===null?(v=T=M,d=u):T=T.next=M,pt.lanes|=V,ya|=V;j=j.next}while(j!==null&&j!==e);if(T===null?d=u:T.next=v,!Qe(u,t.memoizedState)&&(oe=!0,z&&(n=ki,n!==null)))throw n;t.memoizedState=u,t.baseState=d,t.baseQueue=T,i.lastRenderedState=u}return l===null&&(i.lanes=0),[t.memoizedState,i.dispatch]}function tu(t){var e=ne(),n=e.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=t;var i=n.dispatch,l=n.pending,u=e.memoizedState;if(l!==null){n.pending=null;var d=l=l.next;do u=t(u,d.action),d=d.next;while(d!==l);Qe(u,e.memoizedState)||(oe=!0),e.memoizedState=u,e.baseQueue===null&&(e.baseState=u),n.lastRenderedState=u}return[u,i]}function Kd(t,e,n){var i=pt,l=ne(),u=Nt;if(u){if(n===void 0)throw Error(r(407));n=n()}else n=e();var d=!Qe((Ut||l).memoizedState,n);if(d&&(l.memoizedState=n,oe=!0),l=l.queue,au(Fd.bind(null,i,l,t),[t]),l.getSnapshot!==e||d||le!==null&&le.memoizedState.tag&1){if(i.flags|=2048,Li(9,{destroy:void 0},Qd.bind(null,i,l,n,e),null),qt===null)throw Error(r(349));u||(Yn&127)!==0||Zd(i,e,n)}return n}function Zd(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=pt.updateQueue,e===null?(e=Xl(),pt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Qd(t,e,n,i){e.value=n,e.getSnapshot=i,Jd(e)&&Pd(t)}function Fd(t,e,n){return n(function(){Jd(e)&&Pd(t)})}function Jd(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Qe(t,n)}catch{return!0}}function Pd(t){var e=Ia(t,2);e!==null&&qe(e,t,2)}function eu(t){var e=ze();if(typeof t=="function"){var n=t;if(t=n(),$a){Tn(!0);try{n()}finally{Tn(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:t},e}function Wd(t,e,n,i){return t.baseState=n,$r(t,Ut,typeof i=="function"?i:In)}function Ly(t,e,n,i,l){if(Jl(t))throw Error(r(485));if(t=e.action,t!==null){var u={payload:l,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};E.T!==null?n(!0):u.isTransition=!1,i(u),n=e.pending,n===null?(u.next=e.pending=u,$d(e,u)):(u.next=n.next,e.pending=n.next=u)}}function $d(t,e){var n=e.action,i=e.payload,l=t.state;if(e.isTransition){var u=E.T,d={};E.T=d;try{var v=n(l,i),T=E.S;T!==null&&T(d,v),th(t,e,v)}catch(j){nu(t,e,j)}finally{u!==null&&d.types!==null&&(u.types=d.types),E.T=u}}else try{u=n(l,i),th(t,e,u)}catch(j){nu(t,e,j)}}function th(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){eh(t,e,i)},function(i){return nu(t,e,i)}):eh(t,e,n)}function eh(t,e,n){e.status="fulfilled",e.value=n,nh(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,$d(t,n)))}function nu(t,e,n){var i=t.pending;if(t.pending=null,i!==null){i=i.next;do e.status="rejected",e.reason=n,nh(e),e=e.next;while(e!==i)}t.action=null}function nh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function ah(t,e){return e}function ih(t,e){if(Nt){var n=qt.formState;if(n!==null){t:{var i=pt;if(Nt){if(Kt){e:{for(var l=Kt,u=hn;l.nodeType!==8;){if(!u){l=null;break e}if(l=pn(l.nextSibling),l===null){l=null;break e}}u=l.data,l=u==="F!"||u==="F"?l:null}if(l){Kt=pn(l.nextSibling),i=l.data==="F!";break t}}ua(i)}i=!1}i&&(e=n[0])}}return n=ze(),n.memoizedState=n.baseState=e,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ah,lastRenderedState:e},n.queue=i,n=xh.bind(null,pt,i),i.dispatch=n,i=eu(!1),u=ru.bind(null,pt,!1,i.queue),i=ze(),l={state:e,dispatch:null,action:t,pending:null},i.queue=l,n=Ly.bind(null,pt,l,u,n),l.dispatch=n,i.memoizedState=t,[e,n,!1]}function sh(t){var e=ne();return lh(e,Ut,t)}function lh(t,e,n){if(e=$r(t,e,ah)[0],t=Zl(In)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var i=js(e)}catch(d){throw d===wi?Ul:d}else i=e;e=ne();var l=e.queue,u=l.dispatch;return n!==e.memoizedState&&(pt.flags|=2048,Li(9,{destroy:void 0},Gy.bind(null,l,n),null)),[i,u,t]}function Gy(t,e){t.action=e}function oh(t){var e=ne(),n=Ut;if(n!==null)return lh(e,n,t);ne(),e=e.memoizedState,n=ne();var i=n.queue.dispatch;return n.memoizedState=t,[e,i,!1]}function Li(t,e,n,i){return t={tag:t,create:n,deps:i,inst:e,next:null},e=pt.updateQueue,e===null&&(e=Xl(),pt.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(i=n.next,n.next=t,t.next=i,e.lastEffect=t),t}function rh(){return ne().memoizedState}function Ql(t,e,n,i){var l=ze();pt.flags|=t,l.memoizedState=Li(1|e,{destroy:void 0},n,i===void 0?null:i)}function Fl(t,e,n,i){var l=ne();i=i===void 0?null:i;var u=l.memoizedState.inst;Ut!==null&&i!==null&&Zr(i,Ut.memoizedState.deps)?l.memoizedState=Li(e,u,n,i):(pt.flags|=t,l.memoizedState=Li(1|e,u,n,i))}function uh(t,e){Ql(8390656,8,t,e)}function au(t,e){Fl(2048,8,t,e)}function Hy(t){pt.flags|=4;var e=pt.updateQueue;if(e===null)e=Xl(),pt.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function ch(t){var e=ne().memoizedState;return Hy({ref:e,nextImpl:t}),function(){if((Rt&2)!==0)throw Error(r(440));return e.impl.apply(void 0,arguments)}}function fh(t,e){return Fl(4,2,t,e)}function dh(t,e){return Fl(4,4,t,e)}function hh(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 mh(t,e,n){n=n!=null?n.concat([t]):null,Fl(4,4,hh.bind(null,e,t),n)}function iu(){}function ph(t,e){var n=ne();e=e===void 0?null:e;var i=n.memoizedState;return e!==null&&Zr(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function vh(t,e){var n=ne();e=e===void 0?null:e;var i=n.memoizedState;if(e!==null&&Zr(e,i[1]))return i[0];if(i=t(),$a){Tn(!0);try{t()}finally{Tn(!1)}}return n.memoizedState=[i,e],i}function su(t,e,n){return n===void 0||(Yn&1073741824)!==0&&(Et&261930)===0?t.memoizedState=e:(t.memoizedState=n,t=gm(),pt.lanes|=t,ya|=t,n)}function gh(t,e,n,i){return Qe(n,e)?n:Bi.current!==null?(t=su(t,n,i),Qe(t,e)||(oe=!0),t):(Yn&42)===0||(Yn&1073741824)!==0&&(Et&261930)===0?(oe=!0,t.memoizedState=n):(t=gm(),pt.lanes|=t,ya|=t,e)}function yh(t,e,n,i,l){var u=q.p;q.p=u!==0&&8>u?u:8;var d=E.T,v={};E.T=v,ru(t,!1,e,n);try{var T=l(),j=E.S;if(j!==null&&j(v,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var z=By(T,i);Ms(t,e,z,tn(t))}else Ms(t,e,i,tn(t))}catch(V){Ms(t,e,{then:function(){},status:"rejected",reason:V},tn())}finally{q.p=u,d!==null&&v.types!==null&&(d.types=v.types),E.T=d}}function qy(){}function lu(t,e,n,i){if(t.tag!==5)throw Error(r(476));var l=Sh(t).queue;yh(t,l,e,et,n===null?qy:function(){return bh(t),n(i)})}function Sh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:et,baseState:et,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:et},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function bh(t){var e=Sh(t);e.next===null&&(e=t.alternate.memoizedState),Ms(t,e.next.queue,{},tn())}function ou(){return Te(Zs)}function Th(){return ne().memoizedState}function _h(){return ne().memoizedState}function Yy(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=tn();t=da(n);var i=ha(e,t,n);i!==null&&(qe(i,e,n),As(i,e,n)),e={cache:Br()},t.payload=e;return}e=e.return}}function Iy(t,e,n){var i=tn();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Jl(t)?Eh(e,n):(n=Ar(t,e,n,i),n!==null&&(qe(n,t,i),Ah(n,e,i)))}function xh(t,e,n){var i=tn();Ms(t,e,n,i)}function Ms(t,e,n,i){var l={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Jl(t))Eh(e,l);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var d=e.lastRenderedState,v=u(d,n);if(l.hasEagerState=!0,l.eagerState=v,Qe(v,d))return Ml(t,e,l,0),qt===null&&jl(),!1}catch{}finally{}if(n=Ar(t,e,l,i),n!==null)return qe(n,t,i),Ah(n,e,i),!0}return!1}function ru(t,e,n,i){if(i={lane:2,revertLane:Gu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Jl(t)){if(e)throw Error(r(479))}else e=Ar(t,n,i,2),e!==null&&qe(e,t,2)}function Jl(t){var e=t.alternate;return t===pt||e!==null&&e===pt}function Eh(t,e){Ui=Yl=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Ah(t,e,n){if((n&4194048)!==0){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Mf(t,n)}}var Os={readContext:Te,use:Kl,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useLayoutEffect:Pt,useInsertionEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useSyncExternalStore:Pt,useId:Pt,useHostTransitionStatus:Pt,useFormState:Pt,useActionState:Pt,useOptimistic:Pt,useMemoCache:Pt,useCacheRefresh:Pt};Os.useEffectEvent=Pt;var Nh={readContext:Te,use:Kl,useCallback:function(t,e){return ze().memoizedState=[t,e===void 0?null:e],t},useContext:Te,useEffect:uh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Ql(4194308,4,hh.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Ql(4194308,4,t,e)},useInsertionEffect:function(t,e){Ql(4,2,t,e)},useMemo:function(t,e){var n=ze();e=e===void 0?null:e;var i=t();if($a){Tn(!0);try{t()}finally{Tn(!1)}}return n.memoizedState=[i,e],i},useReducer:function(t,e,n){var i=ze();if(n!==void 0){var l=n(e);if($a){Tn(!0);try{n(e)}finally{Tn(!1)}}}else l=e;return i.memoizedState=i.baseState=l,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:l},i.queue=t,t=t.dispatch=Iy.bind(null,pt,t),[i.memoizedState,t]},useRef:function(t){var e=ze();return t={current:t},e.memoizedState=t},useState:function(t){t=eu(t);var e=t.queue,n=xh.bind(null,pt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:iu,useDeferredValue:function(t,e){var n=ze();return su(n,t,e)},useTransition:function(){var t=eu(!1);return t=yh.bind(null,pt,t.queue,!0,!1),ze().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var i=pt,l=ze();if(Nt){if(n===void 0)throw Error(r(407));n=n()}else{if(n=e(),qt===null)throw Error(r(349));(Et&127)!==0||Zd(i,e,n)}l.memoizedState=n;var u={value:n,getSnapshot:e};return l.queue=u,uh(Fd.bind(null,i,u,t),[t]),i.flags|=2048,Li(9,{destroy:void 0},Qd.bind(null,i,u,n,e),null),n},useId:function(){var t=ze(),e=qt.identifierPrefix;if(Nt){var n=Mn,i=jn;n=(i&~(1<<32-je(i)-1)).toString(32)+n,e="_"+e+"R_"+n,n=Il++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=Uy++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:ou,useFormState:ih,useActionState:ih,useOptimistic:function(t){var e=ze();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=ru.bind(null,pt,!0,n),n.dispatch=e,[t,e]},useMemoCache:Wr,useCacheRefresh:function(){return ze().memoizedState=Yy.bind(null,pt)},useEffectEvent:function(t){var e=ze(),n={impl:t};return e.memoizedState=n,function(){if((Rt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},uu={readContext:Te,use:Kl,useCallback:ph,useContext:Te,useEffect:au,useImperativeHandle:mh,useInsertionEffect:fh,useLayoutEffect:dh,useMemo:vh,useReducer:Zl,useRef:rh,useState:function(){return Zl(In)},useDebugValue:iu,useDeferredValue:function(t,e){var n=ne();return gh(n,Ut.memoizedState,t,e)},useTransition:function(){var t=Zl(In)[0],e=ne().memoizedState;return[typeof t=="boolean"?t:js(t),e]},useSyncExternalStore:Kd,useId:Th,useHostTransitionStatus:ou,useFormState:sh,useActionState:sh,useOptimistic:function(t,e){var n=ne();return Wd(n,Ut,t,e)},useMemoCache:Wr,useCacheRefresh:_h};uu.useEffectEvent=ch;var Dh={readContext:Te,use:Kl,useCallback:ph,useContext:Te,useEffect:au,useImperativeHandle:mh,useInsertionEffect:fh,useLayoutEffect:dh,useMemo:vh,useReducer:tu,useRef:rh,useState:function(){return tu(In)},useDebugValue:iu,useDeferredValue:function(t,e){var n=ne();return Ut===null?su(n,t,e):gh(n,Ut.memoizedState,t,e)},useTransition:function(){var t=tu(In)[0],e=ne().memoizedState;return[typeof t=="boolean"?t:js(t),e]},useSyncExternalStore:Kd,useId:Th,useHostTransitionStatus:ou,useFormState:oh,useActionState:oh,useOptimistic:function(t,e){var n=ne();return Ut!==null?Wd(n,Ut,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:Wr,useCacheRefresh:_h};Dh.useEffectEvent=ch;function cu(t,e,n,i){e=t.memoizedState,n=n(i,e),n=n==null?e:b({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var fu={enqueueSetState:function(t,e,n){t=t._reactInternals;var i=tn(),l=da(i);l.payload=e,n!=null&&(l.callback=n),e=ha(t,l,i),e!==null&&(qe(e,t,i),As(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var i=tn(),l=da(i);l.tag=1,l.payload=e,n!=null&&(l.callback=n),e=ha(t,l,i),e!==null&&(qe(e,t,i),As(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=tn(),i=da(n);i.tag=2,e!=null&&(i.callback=e),e=ha(t,i,n),e!==null&&(qe(e,t,n),As(e,t,n))}};function Ch(t,e,n,i,l,u,d){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(i,u,d):e.prototype&&e.prototype.isPureReactComponent?!gs(n,i)||!gs(l,u):!0}function jh(t,e,n,i){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,i),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,i),e.state!==t&&fu.enqueueReplaceState(e,e.state,null)}function ti(t,e){var n=e;if("ref"in e){n={};for(var i in e)i!=="ref"&&(n[i]=e[i])}if(t=t.defaultProps){n===e&&(n=b({},n));for(var l in t)n[l]===void 0&&(n[l]=t[l])}return n}function Mh(t){Cl(t)}function Oh(t){console.error(t)}function Rh(t){Cl(t)}function Pl(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(i){setTimeout(function(){throw i})}}function kh(t,e,n){try{var i=t.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function du(t,e,n){return n=da(n),n.tag=3,n.payload={element:null},n.callback=function(){Pl(t,e)},n}function wh(t){return t=da(t),t.tag=3,t}function zh(t,e,n,i){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var u=i.value;t.payload=function(){return l(u)},t.callback=function(){kh(e,n,i)}}var d=n.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(t.callback=function(){kh(e,n,i),typeof l!="function"&&(Sa===null?Sa=new Set([this]):Sa.add(this));var v=i.stack;this.componentDidCatch(i.value,{componentStack:v!==null?v:""})})}function Xy(t,e,n,i,l){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(e=n.alternate,e!==null&&Oi(e,n,l,!0),n=Je.current,n!==null){switch(n.tag){case 31:case 13:return mn===null?uo():n.alternate===null&&Wt===0&&(Wt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,i===Vl?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([i]):e.add(i),Uu(t,i,l)),!1;case 22:return n.flags|=65536,i===Vl?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([i]):n.add(i)),Uu(t,i,l)),!1}throw Error(r(435,n.tag))}return Uu(t,i,l),uo(),!1}if(Nt)return e=Je.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=l,i!==Or&&(t=Error(r(422),{cause:i}),bs(cn(t,n)))):(i!==Or&&(e=Error(r(423),{cause:i}),bs(cn(e,n))),t=t.current.alternate,t.flags|=65536,l&=-l,t.lanes|=l,i=cn(i,n),l=du(t.stateNode,i,l),qr(t,l),Wt!==4&&(Wt=2)),!1;var u=Error(r(520),{cause:i});if(u=cn(u,n),Ls===null?Ls=[u]:Ls.push(u),Wt!==4&&(Wt=2),e===null)return!0;i=cn(i,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=l&-l,n.lanes|=t,t=du(n.stateNode,i,t),qr(n,t),!1;case 1:if(e=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Sa===null||!Sa.has(u))))return n.flags|=65536,l&=-l,n.lanes|=l,l=wh(l),zh(l,t,n,i),qr(n,l),!1}n=n.return}while(n!==null);return!1}var hu=Error(r(461)),oe=!1;function _e(t,e,n,i){e.child=t===null?Ld(e,null,n,i):Wa(e,t.child,n,i)}function Bh(t,e,n,i,l){n=n.render;var u=e.ref;if("ref"in i){var d={};for(var v in i)v!=="ref"&&(d[v]=i[v])}else d=i;return Qa(e),i=Qr(t,e,n,d,u,l),v=Fr(),t!==null&&!oe?(Jr(t,e,l),Xn(t,e,l)):(Nt&&v&&jr(e),e.flags|=1,_e(t,e,i,l),e.child)}function Uh(t,e,n,i,l){if(t===null){var u=n.type;return typeof u=="function"&&!Nr(u)&&u.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=u,Vh(t,e,u,i,l)):(t=Rl(n.type,null,i,e,e.mode,l),t.ref=e.ref,t.return=e,e.child=t)}if(u=t.child,!Tu(t,l)){var d=u.memoizedProps;if(n=n.compare,n=n!==null?n:gs,n(d,i)&&t.ref===e.ref)return Xn(t,e,l)}return e.flags|=1,t=Ln(u,i),t.ref=e.ref,t.return=e,e.child=t}function Vh(t,e,n,i,l){if(t!==null){var u=t.memoizedProps;if(gs(u,i)&&t.ref===e.ref)if(oe=!1,e.pendingProps=i=u,Tu(t,l))(t.flags&131072)!==0&&(oe=!0);else return e.lanes=t.lanes,Xn(t,e,l)}return mu(t,e,n,i,l)}function Lh(t,e,n,i){var l=i.children,u=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((e.flags&128)!==0){if(u=u!==null?u.baseLanes|n:n,t!==null){for(i=e.child=t.child,l=0;i!==null;)l=l|i.lanes|i.childLanes,i=i.sibling;i=l&~u}else i=0,e.child=null;return Gh(t,e,u,n,i)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Bl(e,u!==null?u.cachePool:null),u!==null?qd(e,u):Ir(),Yd(e);else return i=e.lanes=536870912,Gh(t,e,u!==null?u.baseLanes|n:n,n,i)}else u!==null?(Bl(e,u.cachePool),qd(e,u),pa(),e.memoizedState=null):(t!==null&&Bl(e,null),Ir(),pa());return _e(t,e,l,n),e.child}function Rs(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Gh(t,e,n,i,l){var u=Vr();return u=u===null?null:{parent:se._currentValue,pool:u},e.memoizedState={baseLanes:n,cachePool:u},t!==null&&Bl(e,null),Ir(),Yd(e),t!==null&&Oi(t,e,i,!0),e.childLanes=l,null}function Wl(t,e){return e=to({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Hh(t,e,n){return Wa(e,t.child,null,n),t=Wl(e,e.pendingProps),t.flags|=2,Pe(e),e.memoizedState=null,t}function Ky(t,e,n){var i=e.pendingProps,l=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Nt){if(i.mode==="hidden")return t=Wl(e,i),e.lanes=536870912,Rs(null,t);if(Kr(e),(t=Kt)?(t=$m(t,hn),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:oa!==null?{id:jn,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},n=Ed(t),n.return=e,e.child=n,be=e,Kt=null)):t=null,t===null)throw ua(e);return e.lanes=536870912,null}return Wl(e,i)}var u=t.memoizedState;if(u!==null){var d=u.dehydrated;if(Kr(e),l)if(e.flags&256)e.flags&=-257,e=Hh(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(r(558));else if(oe||Oi(t,e,n,!1),l=(n&t.childLanes)!==0,oe||l){if(i=qt,i!==null&&(d=Of(i,n),d!==0&&d!==u.retryLane))throw u.retryLane=d,Ia(t,d),qe(i,t,d),hu;uo(),e=Hh(t,e,n)}else t=u.treeContext,Kt=pn(d.nextSibling),be=e,Nt=!0,ra=null,hn=!1,t!==null&&Dd(e,t),e=Wl(e,i),e.flags|=4096;return e}return t=Ln(t.child,{mode:i.mode,children:i.children}),t.ref=e.ref,e.child=t,t.return=e,t}function $l(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 mu(t,e,n,i,l){return Qa(e),n=Qr(t,e,n,i,void 0,l),i=Fr(),t!==null&&!oe?(Jr(t,e,l),Xn(t,e,l)):(Nt&&i&&jr(e),e.flags|=1,_e(t,e,n,l),e.child)}function qh(t,e,n,i,l,u){return Qa(e),e.updateQueue=null,n=Xd(e,i,n,l),Id(t),i=Fr(),t!==null&&!oe?(Jr(t,e,u),Xn(t,e,u)):(Nt&&i&&jr(e),e.flags|=1,_e(t,e,n,u),e.child)}function Yh(t,e,n,i,l){if(Qa(e),e.stateNode===null){var u=Di,d=n.contextType;typeof d=="object"&&d!==null&&(u=Te(d)),u=new n(i,u),e.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=fu,e.stateNode=u,u._reactInternals=e,u=e.stateNode,u.props=i,u.state=e.memoizedState,u.refs={},Gr(e),d=n.contextType,u.context=typeof d=="object"&&d!==null?Te(d):Di,u.state=e.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(cu(e,n,d,i),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(d=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),d!==u.state&&fu.enqueueReplaceState(u,u.state,null),Ds(e,i,u,l),Ns(),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308),i=!0}else if(t===null){u=e.stateNode;var v=e.memoizedProps,T=ti(n,v);u.props=T;var j=u.context,z=n.contextType;d=Di,typeof z=="object"&&z!==null&&(d=Te(z));var V=n.getDerivedStateFromProps;z=typeof V=="function"||typeof u.getSnapshotBeforeUpdate=="function",v=e.pendingProps!==v,z||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(v||j!==d)&&jh(e,u,i,d),fa=!1;var M=e.memoizedState;u.state=M,Ds(e,i,u,l),Ns(),j=e.memoizedState,v||M!==j||fa?(typeof V=="function"&&(cu(e,n,V,i),j=e.memoizedState),(T=fa||Ch(e,n,T,i,M,j,d))?(z||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(e.flags|=4194308)):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=j),u.props=i,u.state=j,u.context=d,i=T):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{u=e.stateNode,Hr(t,e),d=e.memoizedProps,z=ti(n,d),u.props=z,V=e.pendingProps,M=u.context,j=n.contextType,T=Di,typeof j=="object"&&j!==null&&(T=Te(j)),v=n.getDerivedStateFromProps,(j=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==V||M!==T)&&jh(e,u,i,T),fa=!1,M=e.memoizedState,u.state=M,Ds(e,i,u,l),Ns();var O=e.memoizedState;d!==V||M!==O||fa||t!==null&&t.dependencies!==null&&wl(t.dependencies)?(typeof v=="function"&&(cu(e,n,v,i),O=e.memoizedState),(z=fa||Ch(e,n,z,i,M,O,T)||t!==null&&t.dependencies!==null&&wl(t.dependencies))?(j||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(i,O,T),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(i,O,T)),typeof u.componentDidUpdate=="function"&&(e.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof u.componentDidUpdate!="function"||d===t.memoizedProps&&M===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===t.memoizedProps&&M===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=O),u.props=i,u.state=O,u.context=T,i=z):(typeof u.componentDidUpdate!="function"||d===t.memoizedProps&&M===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===t.memoizedProps&&M===t.memoizedState||(e.flags|=1024),i=!1)}return u=i,$l(t,e),i=(e.flags&128)!==0,u||i?(u=e.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:u.render(),e.flags|=1,t!==null&&i?(e.child=Wa(e,t.child,null,l),e.child=Wa(e,null,n,l)):_e(t,e,n,l),e.memoizedState=u.state,t=e.child):t=Xn(t,e,l),t}function Ih(t,e,n,i){return Ka(),e.flags|=256,_e(t,e,n,i),e.child}var pu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vu(t){return{baseLanes:t,cachePool:kd()}}function gu(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=$e),t}function Xh(t,e,n){var i=e.pendingProps,l=!1,u=(e.flags&128)!==0,d;if((d=u)||(d=t!==null&&t.memoizedState===null?!1:(ee.current&2)!==0),d&&(l=!0,e.flags&=-129),d=(e.flags&32)!==0,e.flags&=-33,t===null){if(Nt){if(l?ma(e):pa(),(t=Kt)?(t=$m(t,hn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:oa!==null?{id:jn,overflow:Mn}:null,retryLane:536870912,hydrationErrors:null},n=Ed(t),n.return=e,e.child=n,be=e,Kt=null)):t=null,t===null)throw ua(e);return $u(t)?e.lanes=32:e.lanes=536870912,null}var v=i.children;return i=i.fallback,l?(pa(),l=e.mode,v=to({mode:"hidden",children:v},l),i=Xa(i,l,n,null),v.return=e,i.return=e,v.sibling=i,e.child=v,i=e.child,i.memoizedState=vu(n),i.childLanes=gu(t,d,n),e.memoizedState=pu,Rs(null,i)):(ma(e),yu(e,v))}var T=t.memoizedState;if(T!==null&&(v=T.dehydrated,v!==null)){if(u)e.flags&256?(ma(e),e.flags&=-257,e=Su(t,e,n)):e.memoizedState!==null?(pa(),e.child=t.child,e.flags|=128,e=null):(pa(),v=i.fallback,l=e.mode,i=to({mode:"visible",children:i.children},l),v=Xa(v,l,n,null),v.flags|=2,i.return=e,v.return=e,i.sibling=v,e.child=i,Wa(e,t.child,null,n),i=e.child,i.memoizedState=vu(n),i.childLanes=gu(t,d,n),e.memoizedState=pu,e=Rs(null,i));else if(ma(e),$u(v)){if(d=v.nextSibling&&v.nextSibling.dataset,d)var j=d.dgst;d=j,i=Error(r(419)),i.stack="",i.digest=d,bs({value:i,source:null,stack:null}),e=Su(t,e,n)}else if(oe||Oi(t,e,n,!1),d=(n&t.childLanes)!==0,oe||d){if(d=qt,d!==null&&(i=Of(d,n),i!==0&&i!==T.retryLane))throw T.retryLane=i,Ia(t,i),qe(d,t,i),hu;Wu(v)||uo(),e=Su(t,e,n)}else Wu(v)?(e.flags|=192,e.child=t.child,e=null):(t=T.treeContext,Kt=pn(v.nextSibling),be=e,Nt=!0,ra=null,hn=!1,t!==null&&Dd(e,t),e=yu(e,i.children),e.flags|=4096);return e}return l?(pa(),v=i.fallback,l=e.mode,T=t.child,j=T.sibling,i=Ln(T,{mode:"hidden",children:i.children}),i.subtreeFlags=T.subtreeFlags&65011712,j!==null?v=Ln(j,v):(v=Xa(v,l,n,null),v.flags|=2),v.return=e,i.return=e,i.sibling=v,e.child=i,Rs(null,i),i=e.child,v=t.child.memoizedState,v===null?v=vu(n):(l=v.cachePool,l!==null?(T=se._currentValue,l=l.parent!==T?{parent:T,pool:T}:l):l=kd(),v={baseLanes:v.baseLanes|n,cachePool:l}),i.memoizedState=v,i.childLanes=gu(t,d,n),e.memoizedState=pu,Rs(t.child,i)):(ma(e),n=t.child,t=n.sibling,n=Ln(n,{mode:"visible",children:i.children}),n.return=e,n.sibling=null,t!==null&&(d=e.deletions,d===null?(e.deletions=[t],e.flags|=16):d.push(t)),e.child=n,e.memoizedState=null,n)}function yu(t,e){return e=to({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function to(t,e){return t=Fe(22,t,null,e),t.lanes=0,t}function Su(t,e,n){return Wa(e,t.child,null,n),t=yu(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Kh(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),wr(t.return,e,n)}function bu(t,e,n,i,l,u){var d=t.memoizedState;d===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:l,treeForkCount:u}:(d.isBackwards=e,d.rendering=null,d.renderingStartTime=0,d.last=i,d.tail=n,d.tailMode=l,d.treeForkCount=u)}function Zh(t,e,n){var i=e.pendingProps,l=i.revealOrder,u=i.tail;i=i.children;var d=ee.current,v=(d&2)!==0;if(v?(d=d&1|2,e.flags|=128):d&=1,mt(ee,d),_e(t,e,i,n),i=Nt?Ss:0,!v&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Kh(t,n,e);else if(t.tag===19)Kh(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(l){case"forwards":for(n=e.child,l=null;n!==null;)t=n.alternate,t!==null&&ql(t)===null&&(l=n),n=n.sibling;n=l,n===null?(l=e.child,e.child=null):(l=n.sibling,n.sibling=null),bu(e,!1,l,n,u,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=e.child,e.child=null;l!==null;){if(t=l.alternate,t!==null&&ql(t)===null){e.child=l;break}t=l.sibling,l.sibling=n,n=l,l=t}bu(e,!0,n,null,u,i);break;case"together":bu(e,!1,null,null,void 0,i);break;default:e.memoizedState=null}return e.child}function Xn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),ya|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(Oi(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=Ln(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Ln(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Tu(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&wl(t)))}function Zy(t,e,n){switch(e.tag){case 3:sn(e,e.stateNode.containerInfo),ca(e,se,t.memoizedState.cache),Ka();break;case 27:case 5:Sn(e);break;case 4:sn(e,e.stateNode.containerInfo);break;case 10:ca(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,Kr(e),null;break;case 13:var i=e.memoizedState;if(i!==null)return i.dehydrated!==null?(ma(e),e.flags|=128,null):(n&e.child.childLanes)!==0?Xh(t,e,n):(ma(e),t=Xn(t,e,n),t!==null?t.sibling:null);ma(e);break;case 19:var l=(t.flags&128)!==0;if(i=(n&e.childLanes)!==0,i||(Oi(t,e,n,!1),i=(n&e.childLanes)!==0),l){if(i)return Zh(t,e,n);e.flags|=128}if(l=e.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),mt(ee,ee.current),i)break;return null;case 22:return e.lanes=0,Lh(t,e,n,e.pendingProps);case 24:ca(e,se,t.memoizedState.cache)}return Xn(t,e,n)}function Qh(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)oe=!0;else{if(!Tu(t,n)&&(e.flags&128)===0)return oe=!1,Zy(t,e,n);oe=(t.flags&131072)!==0}else oe=!1,Nt&&(e.flags&1048576)!==0&&Nd(e,Ss,e.index);switch(e.lanes=0,e.tag){case 16:t:{var i=e.pendingProps;if(t=Ja(e.elementType),e.type=t,typeof t=="function")Nr(t)?(i=ti(t,i),e.tag=1,e=Yh(null,e,t,i,n)):(e.tag=0,e=mu(null,e,t,i,n));else{if(t!=null){var l=t.$$typeof;if(l===k){e.tag=11,e=Bh(null,e,t,i,n);break t}else if(l===F){e.tag=14,e=Uh(null,e,t,i,n);break t}}throw e=Dt(t)||t,Error(r(306,e,""))}}return e;case 0:return mu(t,e,e.type,e.pendingProps,n);case 1:return i=e.type,l=ti(i,e.pendingProps),Yh(t,e,i,l,n);case 3:t:{if(sn(e,e.stateNode.containerInfo),t===null)throw Error(r(387));i=e.pendingProps;var u=e.memoizedState;l=u.element,Hr(t,e),Ds(e,i,null,n);var d=e.memoizedState;if(i=d.cache,ca(e,se,i),i!==u.cache&&zr(e,[se],n,!0),Ns(),i=d.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:d.cache},e.updateQueue.baseState=u,e.memoizedState=u,e.flags&256){e=Ih(t,e,i,n);break t}else if(i!==l){l=cn(Error(r(424)),e),bs(l),e=Ih(t,e,i,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(Kt=pn(t.firstChild),be=e,Nt=!0,ra=null,hn=!0,n=Ld(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ka(),i===l){e=Xn(t,e,n);break t}_e(t,e,i,n)}e=e.child}return e;case 26:return $l(t,e),t===null?(n=sp(e.type,null,e.pendingProps,null))?e.memoizedState=n:Nt||(n=e.type,t=e.pendingProps,i=go(Ne.current).createElement(n),i[Se]=e,i[Be]=t,xe(i,n,t),pe(i),e.stateNode=i):e.memoizedState=sp(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Sn(e),t===null&&Nt&&(i=e.stateNode=np(e.type,e.pendingProps,Ne.current),be=e,hn=!0,l=Kt,xa(e.type)?(tc=l,Kt=pn(i.firstChild)):Kt=l),_e(t,e,e.pendingProps.children,n),$l(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Nt&&((l=i=Kt)&&(i=x1(i,e.type,e.pendingProps,hn),i!==null?(e.stateNode=i,be=e,Kt=pn(i.firstChild),hn=!1,l=!0):l=!1),l||ua(e)),Sn(e),l=e.type,u=e.pendingProps,d=t!==null?t.memoizedProps:null,i=u.children,Fu(l,u)?i=null:d!==null&&Fu(l,d)&&(e.flags|=32),e.memoizedState!==null&&(l=Qr(t,e,Vy,null,null,n),Zs._currentValue=l),$l(t,e),_e(t,e,i,n),e.child;case 6:return t===null&&Nt&&((t=n=Kt)&&(n=E1(n,e.pendingProps,hn),n!==null?(e.stateNode=n,be=e,Kt=null,t=!0):t=!1),t||ua(e)),null;case 13:return Xh(t,e,n);case 4:return sn(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=Wa(e,null,i,n):_e(t,e,i,n),e.child;case 11:return Bh(t,e,e.type,e.pendingProps,n);case 7:return _e(t,e,e.pendingProps,n),e.child;case 8:return _e(t,e,e.pendingProps.children,n),e.child;case 12:return _e(t,e,e.pendingProps.children,n),e.child;case 10:return i=e.pendingProps,ca(e,e.type,i.value),_e(t,e,i.children,n),e.child;case 9:return l=e.type._context,i=e.pendingProps.children,Qa(e),l=Te(l),i=i(l),e.flags|=1,_e(t,e,i,n),e.child;case 14:return Uh(t,e,e.type,e.pendingProps,n);case 15:return Vh(t,e,e.type,e.pendingProps,n);case 19:return Zh(t,e,n);case 31:return Ky(t,e,n);case 22:return Lh(t,e,n,e.pendingProps);case 24:return Qa(e),i=Te(se),t===null?(l=Vr(),l===null&&(l=qt,u=Br(),l.pooledCache=u,u.refCount++,u!==null&&(l.pooledCacheLanes|=n),l=u),e.memoizedState={parent:i,cache:l},Gr(e),ca(e,se,l)):((t.lanes&n)!==0&&(Hr(t,e),Ds(e,null,null,n),Ns()),l=t.memoizedState,u=e.memoizedState,l.parent!==i?(l={parent:i,cache:i},e.memoizedState=l,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=l),ca(e,se,i)):(i=u.cache,ca(e,se,i),i!==l.cache&&zr(e,[se],n,!0))),_e(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(r(156,e.tag))}function Kn(t){t.flags|=4}function _u(t,e,n,i,l){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(l&335544128)===l)if(t.stateNode.complete)t.flags|=8192;else if(Tm())t.flags|=8192;else throw Pa=Vl,Lr}else t.flags&=-16777217}function Fh(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!cp(e))if(Tm())t.flags|=8192;else throw Pa=Vl,Lr}function eo(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Bt():536870912,t.lanes|=e,Yi|=e)}function ks(t,e){if(!Nt)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 i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function Zt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,i=0;if(e)for(var l=t.child;l!==null;)n|=l.lanes|l.childLanes,i|=l.subtreeFlags&65011712,i|=l.flags&65011712,l.return=t,l=l.sibling;else for(l=t.child;l!==null;)n|=l.lanes|l.childLanes,i|=l.subtreeFlags,i|=l.flags,l.return=t,l=l.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function Qy(t,e,n){var i=e.pendingProps;switch(Mr(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(e),null;case 1:return Zt(e),null;case 3:return n=e.stateNode,i=null,t!==null&&(i=t.memoizedState.cache),e.memoizedState.cache!==i&&(e.flags|=2048),qn(se),ke(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Mi(e)?Kn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Rr())),Zt(e),null;case 26:var l=e.type,u=e.memoizedState;return t===null?(Kn(e),u!==null?(Zt(e),Fh(e,u)):(Zt(e),_u(e,l,null,i,n))):u?u!==t.memoizedState?(Kn(e),Zt(e),Fh(e,u)):(Zt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==i&&Kn(e),Zt(e),_u(e,l,t,i,n)),null;case 27:if(Xe(e),n=Ne.current,l=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==i&&Kn(e);else{if(!i){if(e.stateNode===null)throw Error(r(166));return Zt(e),null}t=Ht.current,Mi(e)?Cd(e):(t=np(l,i,n),e.stateNode=t,Kn(e))}return Zt(e),null;case 5:if(Xe(e),l=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==i&&Kn(e);else{if(!i){if(e.stateNode===null)throw Error(r(166));return Zt(e),null}if(u=Ht.current,Mi(e))Cd(e);else{var d=go(Ne.current);switch(u){case 1:u=d.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:u=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":u=d.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":u=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":u=d.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof i.is=="string"?d.createElement("select",{is:i.is}):d.createElement("select"),i.multiple?u.multiple=!0:i.size&&(u.size=i.size);break;default:u=typeof i.is=="string"?d.createElement(l,{is:i.is}):d.createElement(l)}}u[Se]=e,u[Be]=i;t:for(d=e.child;d!==null;){if(d.tag===5||d.tag===6)u.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break t;for(;d.sibling===null;){if(d.return===null||d.return===e)break t;d=d.return}d.sibling.return=d.return,d=d.sibling}e.stateNode=u;t:switch(xe(u,l,i),l){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break t;case"img":i=!0;break t;default:i=!1}i&&Kn(e)}}return Zt(e),_u(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==i&&Kn(e);else{if(typeof i!="string"&&e.stateNode===null)throw Error(r(166));if(t=Ne.current,Mi(e)){if(t=e.stateNode,n=e.memoizedProps,i=null,l=be,l!==null)switch(l.tag){case 27:case 5:i=l.memoizedProps}t[Se]=e,t=!!(t.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||Xm(t.nodeValue,n)),t||ua(e,!0)}else t=go(t).createTextNode(i),t[Se]=e,e.stateNode=t}return Zt(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(i=Mi(e),n!==null){if(t===null){if(!i)throw Error(r(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[Se]=e}else Ka(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Zt(e),t=!1}else n=Rr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(Pe(e),e):(Pe(e),null);if((e.flags&128)!==0)throw Error(r(558))}return Zt(e),null;case 13:if(i=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(l=Mi(e),i!==null&&i.dehydrated!==null){if(t===null){if(!l)throw Error(r(318));if(l=e.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(317));l[Se]=e}else Ka(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Zt(e),l=!1}else l=Rr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),l=!0;if(!l)return e.flags&256?(Pe(e),e):(Pe(e),null)}return Pe(e),(e.flags&128)!==0?(e.lanes=n,e):(n=i!==null,t=t!==null&&t.memoizedState!==null,n&&(i=e.child,l=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(l=i.alternate.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==l&&(i.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),eo(e,e.updateQueue),Zt(e),null);case 4:return ke(),t===null&&Iu(e.stateNode.containerInfo),Zt(e),null;case 10:return qn(e.type),Zt(e),null;case 19:if(Ct(ee),i=e.memoizedState,i===null)return Zt(e),null;if(l=(e.flags&128)!==0,u=i.rendering,u===null)if(l)ks(i,!1);else{if(Wt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=ql(t),u!==null){for(e.flags|=128,ks(i,!1),t=u.updateQueue,e.updateQueue=t,eo(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)xd(n,t),n=n.sibling;return mt(ee,ee.current&1|2),Nt&&Gn(e,i.treeForkCount),e.child}t=t.sibling}i.tail!==null&&P()>lo&&(e.flags|=128,l=!0,ks(i,!1),e.lanes=4194304)}else{if(!l)if(t=ql(u),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,eo(e,t),ks(i,!0),i.tail===null&&i.tailMode==="hidden"&&!u.alternate&&!Nt)return Zt(e),null}else 2*P()-i.renderingStartTime>lo&&n!==536870912&&(e.flags|=128,l=!0,ks(i,!1),e.lanes=4194304);i.isBackwards?(u.sibling=e.child,e.child=u):(t=i.last,t!==null?t.sibling=u:e.child=u,i.last=u)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=P(),t.sibling=null,n=ee.current,mt(ee,l?n&1|2:n&1),Nt&&Gn(e,i.treeForkCount),t):(Zt(e),null);case 22:case 23:return Pe(e),Xr(),i=e.memoizedState!==null,t!==null?t.memoizedState!==null!==i&&(e.flags|=8192):i&&(e.flags|=8192),i?(n&536870912)!==0&&(e.flags&128)===0&&(Zt(e),e.subtreeFlags&6&&(e.flags|=8192)):Zt(e),n=e.updateQueue,n!==null&&eo(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),i=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),i!==n&&(e.flags|=2048),t!==null&&Ct(Fa),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),qn(se),Zt(e),null;case 25:return null;case 30:return null}throw Error(r(156,e.tag))}function Fy(t,e){switch(Mr(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return qn(se),ke(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Xe(e),null;case 31:if(e.memoizedState!==null){if(Pe(e),e.alternate===null)throw Error(r(340));Ka()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Pe(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(r(340));Ka()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ct(ee),null;case 4:return ke(),null;case 10:return qn(e.type),null;case 22:case 23:return Pe(e),Xr(),t!==null&&Ct(Fa),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return qn(se),null;case 25:return null;default:return null}}function Jh(t,e){switch(Mr(e),e.tag){case 3:qn(se),ke();break;case 26:case 27:case 5:Xe(e);break;case 4:ke();break;case 31:e.memoizedState!==null&&Pe(e);break;case 13:Pe(e);break;case 19:Ct(ee);break;case 10:qn(e.type);break;case 22:case 23:Pe(e),Xr(),t!==null&&Ct(Fa);break;case 24:qn(se)}}function ws(t,e){try{var n=e.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var l=i.next;n=l;do{if((n.tag&t)===t){i=void 0;var u=n.create,d=n.inst;i=u(),d.destroy=i}n=n.next}while(n!==l)}}catch(v){zt(e,e.return,v)}}function va(t,e,n){try{var i=e.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var u=l.next;i=u;do{if((i.tag&t)===t){var d=i.inst,v=d.destroy;if(v!==void 0){d.destroy=void 0,l=e;var T=n,j=v;try{j()}catch(z){zt(l,T,z)}}}i=i.next}while(i!==u)}}catch(z){zt(e,e.return,z)}}function Ph(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{Hd(e,n)}catch(i){zt(t,t.return,i)}}}function Wh(t,e,n){n.props=ti(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(i){zt(t,e,i)}}function zs(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var i=t.stateNode;break;case 30:i=t.stateNode;break;default:i=t.stateNode}typeof n=="function"?t.refCleanup=n(i):n.current=i}}catch(l){zt(t,e,l)}}function On(t,e){var n=t.ref,i=t.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(l){zt(t,e,l)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){zt(t,e,l)}else n.current=null}function $h(t){var e=t.type,n=t.memoizedProps,i=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break t;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(l){zt(t,t.return,l)}}function xu(t,e,n){try{var i=t.stateNode;g1(i,t.type,n,e),i[Be]=e}catch(l){zt(t,t.return,l)}}function tm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&xa(t.type)||t.tag===4}function Eu(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||tm(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&&xa(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 Au(t,e,n){var i=t.tag;if(i===5||i===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=Un));else if(i!==4&&(i===27&&xa(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(Au(t,e,n),t=t.sibling;t!==null;)Au(t,e,n),t=t.sibling}function no(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(i===27&&xa(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(no(t,e,n),t=t.sibling;t!==null;)no(t,e,n),t=t.sibling}function em(t){var e=t.stateNode,n=t.memoizedProps;try{for(var i=t.type,l=e.attributes;l.length;)e.removeAttributeNode(l[0]);xe(e,i,n),e[Se]=t,e[Be]=n}catch(u){zt(t,t.return,u)}}var Zn=!1,re=!1,Nu=!1,nm=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Jy(t,e){if(t=t.containerInfo,Zu=Eo,t=md(t),Sr(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var l=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break t}var d=0,v=-1,T=-1,j=0,z=0,V=t,M=null;e:for(;;){for(var O;V!==n||l!==0&&V.nodeType!==3||(v=d+l),V!==u||i!==0&&V.nodeType!==3||(T=d+i),V.nodeType===3&&(d+=V.nodeValue.length),(O=V.firstChild)!==null;)M=V,V=O;for(;;){if(V===t)break e;if(M===n&&++j===l&&(v=d),M===u&&++z===i&&(T=d),(O=V.nextSibling)!==null)break;V=M,M=V.parentNode}V=O}n=v===-1||T===-1?null:{start:v,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qu={focusedElem:t,selectionRange:n},Eo=!1,ve=e;ve!==null;)if(e=ve,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ve=t;else for(;ve!==null;){switch(e=ve,u=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++)l=t[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&u!==null){t=void 0,n=e,l=u.memoizedProps,u=u.memoizedState,i=n.stateNode;try{var tt=ti(n.type,l);t=i.getSnapshotBeforeUpdate(tt,u),i.__reactInternalSnapshotBeforeUpdate=t}catch(rt){zt(n,n.return,rt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)Pu(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Pu(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,ve=t;break}ve=e.return}}function am(t,e,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:Fn(t,n),i&4&&ws(5,n);break;case 1:if(Fn(t,n),i&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(d){zt(n,n.return,d)}else{var l=ti(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(l,e,t.__reactInternalSnapshotBeforeUpdate)}catch(d){zt(n,n.return,d)}}i&64&&Ph(n),i&512&&zs(n,n.return);break;case 3:if(Fn(t,n),i&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{Hd(t,e)}catch(d){zt(n,n.return,d)}}break;case 27:e===null&&i&4&&em(n);case 26:case 5:Fn(t,n),e===null&&i&4&&$h(n),i&512&&zs(n,n.return);break;case 12:Fn(t,n);break;case 31:Fn(t,n),i&4&&lm(t,n);break;case 13:Fn(t,n),i&4&&om(t,n),i&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=s1.bind(null,n),A1(t,n))));break;case 22:if(i=n.memoizedState!==null||Zn,!i){e=e!==null&&e.memoizedState!==null||re,l=Zn;var u=re;Zn=i,(re=e)&&!u?Jn(t,n,(n.subtreeFlags&8772)!==0):Fn(t,n),Zn=l,re=u}break;case 30:break;default:Fn(t,n)}}function im(t){var e=t.alternate;e!==null&&(t.alternate=null,im(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&nr(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 Ft=null,Ve=!1;function Qn(t,e,n){for(n=n.child;n!==null;)sm(t,e,n),n=n.sibling}function sm(t,e,n){if(Ce&&typeof Ce.onCommitFiberUnmount=="function")try{Ce.onCommitFiberUnmount(Dn,n)}catch{}switch(n.tag){case 26:re||On(n,e),Qn(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:re||On(n,e);var i=Ft,l=Ve;xa(n.type)&&(Ft=n.stateNode,Ve=!1),Qn(t,e,n),Is(n.stateNode),Ft=i,Ve=l;break;case 5:re||On(n,e);case 6:if(i=Ft,l=Ve,Ft=null,Qn(t,e,n),Ft=i,Ve=l,Ft!==null)if(Ve)try{(Ft.nodeType===9?Ft.body:Ft.nodeName==="HTML"?Ft.ownerDocument.body:Ft).removeChild(n.stateNode)}catch(u){zt(n,e,u)}else try{Ft.removeChild(n.stateNode)}catch(u){zt(n,e,u)}break;case 18:Ft!==null&&(Ve?(t=Ft,Pm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),Pi(t)):Pm(Ft,n.stateNode));break;case 4:i=Ft,l=Ve,Ft=n.stateNode.containerInfo,Ve=!0,Qn(t,e,n),Ft=i,Ve=l;break;case 0:case 11:case 14:case 15:va(2,n,e),re||va(4,n,e),Qn(t,e,n);break;case 1:re||(On(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"&&Wh(n,e,i)),Qn(t,e,n);break;case 21:Qn(t,e,n);break;case 22:re=(i=re)||n.memoizedState!==null,Qn(t,e,n),re=i;break;default:Qn(t,e,n)}}function lm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Pi(t)}catch(n){zt(e,e.return,n)}}}function om(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Pi(t)}catch(n){zt(e,e.return,n)}}function Py(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new nm),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new nm),e;default:throw Error(r(435,t.tag))}}function ao(t,e){var n=Py(t);e.forEach(function(i){if(!n.has(i)){n.add(i);var l=l1.bind(null,t,i);i.then(l,l)}})}function Le(t,e){var n=e.deletions;if(n!==null)for(var i=0;i<n.length;i++){var l=n[i],u=t,d=e,v=d;t:for(;v!==null;){switch(v.tag){case 27:if(xa(v.type)){Ft=v.stateNode,Ve=!1;break t}break;case 5:Ft=v.stateNode,Ve=!1;break t;case 3:case 4:Ft=v.stateNode.containerInfo,Ve=!0;break t}v=v.return}if(Ft===null)throw Error(r(160));sm(u,d,l),Ft=null,Ve=!1,u=l.alternate,u!==null&&(u.return=null),l.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)rm(e,t),e=e.sibling}var xn=null;function rm(t,e){var n=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Le(e,t),Ge(t),i&4&&(va(3,t,t.return),ws(3,t),va(5,t,t.return));break;case 1:Le(e,t),Ge(t),i&512&&(re||n===null||On(n,n.return)),i&64&&Zn&&(t=t.updateQueue,t!==null&&(i=t.callbacks,i!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var l=xn;if(Le(e,t),Ge(t),i&512&&(re||n===null||On(n,n.return)),i&4){var u=n!==null?n.memoizedState:null;if(i=t.memoizedState,n===null)if(i===null)if(t.stateNode===null){t:{i=t.type,n=t.memoizedProps,l=l.ownerDocument||l;e:switch(i){case"title":u=l.getElementsByTagName("title")[0],(!u||u[rs]||u[Se]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=l.createElement(i),l.head.insertBefore(u,l.querySelector("head > title"))),xe(u,i,n),u[Se]=t,pe(u),i=u;break t;case"link":var d=rp("link","href",l).get(i+(n.href||""));if(d){for(var v=0;v<d.length;v++)if(u=d[v],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){d.splice(v,1);break e}}u=l.createElement(i),xe(u,i,n),l.head.appendChild(u);break;case"meta":if(d=rp("meta","content",l).get(i+(n.content||""))){for(v=0;v<d.length;v++)if(u=d[v],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){d.splice(v,1);break e}}u=l.createElement(i),xe(u,i,n),l.head.appendChild(u);break;default:throw Error(r(468,i))}u[Se]=t,pe(u),i=u}t.stateNode=i}else up(l,t.type,t.stateNode);else t.stateNode=op(l,i,t.memoizedProps);else u!==i?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,i===null?up(l,t.type,t.stateNode):op(l,i,t.memoizedProps)):i===null&&t.stateNode!==null&&xu(t,t.memoizedProps,n.memoizedProps)}break;case 27:Le(e,t),Ge(t),i&512&&(re||n===null||On(n,n.return)),n!==null&&i&4&&xu(t,t.memoizedProps,n.memoizedProps);break;case 5:if(Le(e,t),Ge(t),i&512&&(re||n===null||On(n,n.return)),t.flags&32){l=t.stateNode;try{bi(l,"")}catch(tt){zt(t,t.return,tt)}}i&4&&t.stateNode!=null&&(l=t.memoizedProps,xu(t,l,n!==null?n.memoizedProps:l)),i&1024&&(Nu=!0);break;case 6:if(Le(e,t),Ge(t),i&4){if(t.stateNode===null)throw Error(r(162));i=t.memoizedProps,n=t.stateNode;try{n.nodeValue=i}catch(tt){zt(t,t.return,tt)}}break;case 3:if(bo=null,l=xn,xn=yo(e.containerInfo),Le(e,t),xn=l,Ge(t),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Pi(e.containerInfo)}catch(tt){zt(t,t.return,tt)}Nu&&(Nu=!1,um(t));break;case 4:i=xn,xn=yo(t.stateNode.containerInfo),Le(e,t),Ge(t),xn=i;break;case 12:Le(e,t),Ge(t);break;case 31:Le(e,t),Ge(t),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,ao(t,i)));break;case 13:Le(e,t),Ge(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(so=P()),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,ao(t,i)));break;case 22:l=t.memoizedState!==null;var T=n!==null&&n.memoizedState!==null,j=Zn,z=re;if(Zn=j||l,re=z||T,Le(e,t),re=z,Zn=j,Ge(t),i&8192)t:for(e=t.stateNode,e._visibility=l?e._visibility&-2:e._visibility|1,l&&(n===null||T||Zn||re||ei(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){T=n=e;try{if(u=T.stateNode,l)d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{v=T.stateNode;var V=T.memoizedProps.style,M=V!=null&&V.hasOwnProperty("display")?V.display:null;v.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(tt){zt(T,T.return,tt)}}}else if(e.tag===6){if(n===null){T=e;try{T.stateNode.nodeValue=l?"":T.memoizedProps}catch(tt){zt(T,T.return,tt)}}}else if(e.tag===18){if(n===null){T=e;try{var O=T.stateNode;l?Wm(O,!0):Wm(T.stateNode,!1)}catch(tt){zt(T,T.return,tt)}}}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}i&4&&(i=t.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,ao(t,n))));break;case 19:Le(e,t),Ge(t),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,ao(t,i)));break;case 30:break;case 21:break;default:Le(e,t),Ge(t)}}function Ge(t){var e=t.flags;if(e&2){try{for(var n,i=t.return;i!==null;){if(tm(i)){n=i;break}i=i.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var l=n.stateNode,u=Eu(t);no(t,u,l);break;case 5:var d=n.stateNode;n.flags&32&&(bi(d,""),n.flags&=-33);var v=Eu(t);no(t,v,d);break;case 3:case 4:var T=n.stateNode.containerInfo,j=Eu(t);Au(t,j,T);break;default:throw Error(r(161))}}catch(z){zt(t,t.return,z)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function um(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;um(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Fn(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)am(t,e.alternate,e),e=e.sibling}function ei(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:va(4,e,e.return),ei(e);break;case 1:On(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&Wh(e,e.return,n),ei(e);break;case 27:Is(e.stateNode);case 26:case 5:On(e,e.return),ei(e);break;case 22:e.memoizedState===null&&ei(e);break;case 30:ei(e);break;default:ei(e)}t=t.sibling}}function Jn(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var i=e.alternate,l=t,u=e,d=u.flags;switch(u.tag){case 0:case 11:case 15:Jn(l,u,n),ws(4,u);break;case 1:if(Jn(l,u,n),i=u,l=i.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(j){zt(i,i.return,j)}if(i=u,l=i.updateQueue,l!==null){var v=i.stateNode;try{var T=l.shared.hiddenCallbacks;if(T!==null)for(l.shared.hiddenCallbacks=null,l=0;l<T.length;l++)Gd(T[l],v)}catch(j){zt(i,i.return,j)}}n&&d&64&&Ph(u),zs(u,u.return);break;case 27:em(u);case 26:case 5:Jn(l,u,n),n&&i===null&&d&4&&$h(u),zs(u,u.return);break;case 12:Jn(l,u,n);break;case 31:Jn(l,u,n),n&&d&4&&lm(l,u);break;case 13:Jn(l,u,n),n&&d&4&&om(l,u);break;case 22:u.memoizedState===null&&Jn(l,u,n),zs(u,u.return);break;case 30:break;default:Jn(l,u,n)}e=e.sibling}}function Du(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&&Ts(n))}function Cu(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Ts(t))}function En(t,e,n,i){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)cm(t,e,n,i),e=e.sibling}function cm(t,e,n,i){var l=e.flags;switch(e.tag){case 0:case 11:case 15:En(t,e,n,i),l&2048&&ws(9,e);break;case 1:En(t,e,n,i);break;case 3:En(t,e,n,i),l&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Ts(t)));break;case 12:if(l&2048){En(t,e,n,i),t=e.stateNode;try{var u=e.memoizedProps,d=u.id,v=u.onPostCommit;typeof v=="function"&&v(d,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(T){zt(e,e.return,T)}}else En(t,e,n,i);break;case 31:En(t,e,n,i);break;case 13:En(t,e,n,i);break;case 23:break;case 22:u=e.stateNode,d=e.alternate,e.memoizedState!==null?u._visibility&2?En(t,e,n,i):Bs(t,e):u._visibility&2?En(t,e,n,i):(u._visibility|=2,Gi(t,e,n,i,(e.subtreeFlags&10256)!==0||!1)),l&2048&&Du(d,e);break;case 24:En(t,e,n,i),l&2048&&Cu(e.alternate,e);break;default:En(t,e,n,i)}}function Gi(t,e,n,i,l){for(l=l&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var u=t,d=e,v=n,T=i,j=d.flags;switch(d.tag){case 0:case 11:case 15:Gi(u,d,v,T,l),ws(8,d);break;case 23:break;case 22:var z=d.stateNode;d.memoizedState!==null?z._visibility&2?Gi(u,d,v,T,l):Bs(u,d):(z._visibility|=2,Gi(u,d,v,T,l)),l&&j&2048&&Du(d.alternate,d);break;case 24:Gi(u,d,v,T,l),l&&j&2048&&Cu(d.alternate,d);break;default:Gi(u,d,v,T,l)}e=e.sibling}}function Bs(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,i=e,l=i.flags;switch(i.tag){case 22:Bs(n,i),l&2048&&Du(i.alternate,i);break;case 24:Bs(n,i),l&2048&&Cu(i.alternate,i);break;default:Bs(n,i)}e=e.sibling}}var Us=8192;function Hi(t,e,n){if(t.subtreeFlags&Us)for(t=t.child;t!==null;)fm(t,e,n),t=t.sibling}function fm(t,e,n){switch(t.tag){case 26:Hi(t,e,n),t.flags&Us&&t.memoizedState!==null&&U1(n,xn,t.memoizedState,t.memoizedProps);break;case 5:Hi(t,e,n);break;case 3:case 4:var i=xn;xn=yo(t.stateNode.containerInfo),Hi(t,e,n),xn=i;break;case 22:t.memoizedState===null&&(i=t.alternate,i!==null&&i.memoizedState!==null?(i=Us,Us=16777216,Hi(t,e,n),Us=i):Hi(t,e,n));break;default:Hi(t,e,n)}}function dm(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 Vs(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var i=e[n];ve=i,mm(i,t)}dm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hm(t),t=t.sibling}function hm(t){switch(t.tag){case 0:case 11:case 15:Vs(t),t.flags&2048&&va(9,t,t.return);break;case 3:Vs(t);break;case 12:Vs(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,io(t)):Vs(t);break;default:Vs(t)}}function io(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var i=e[n];ve=i,mm(i,t)}dm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:va(8,e,e.return),io(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,io(e));break;default:io(e)}t=t.sibling}}function mm(t,e){for(;ve!==null;){var n=ve;switch(n.tag){case 0:case 11:case 15:va(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Ts(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,ve=i;else t:for(n=t;ve!==null;){i=ve;var l=i.sibling,u=i.return;if(im(i),i===n){ve=null;break t}if(l!==null){l.return=u,ve=l;break t}ve=u}}}var Wy={getCacheForType:function(t){var e=Te(se),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return Te(se).controller.signal}},$y=typeof WeakMap=="function"?WeakMap:Map,Rt=0,qt=null,_t=null,Et=0,wt=0,We=null,ga=!1,qi=!1,ju=!1,Pn=0,Wt=0,ya=0,ni=0,Mu=0,$e=0,Yi=0,Ls=null,He=null,Ou=!1,so=0,pm=0,lo=1/0,oo=null,Sa=null,he=0,ba=null,Ii=null,Wn=0,Ru=0,ku=null,vm=null,Gs=0,wu=null;function tn(){return(Rt&2)!==0&&Et!==0?Et&-Et:E.T!==null?Gu():Rf()}function gm(){if($e===0)if((Et&536870912)===0||Nt){var t=Ba;Ba<<=1,(Ba&3932160)===0&&(Ba=262144),$e=t}else $e=536870912;return t=Je.current,t!==null&&(t.flags|=32),$e}function qe(t,e,n){(t===qt&&(wt===2||wt===9)||t.cancelPendingCommit!==null)&&(Xi(t,0),Ta(t,Et,$e,!1)),ye(t,n),((Rt&2)===0||t!==qt)&&(t===qt&&((Rt&2)===0&&(ni|=n),Wt===4&&Ta(t,Et,$e,!1)),Rn(t))}function ym(t,e,n){if((Rt&6)!==0)throw Error(r(327));var i=!n&&(e&127)===0&&(e&t.expiredLanes)===0||ia(t,e),l=i?n1(t,e):Bu(t,e,!0),u=i;do{if(l===0){qi&&!i&&Ta(t,e,0,!1);break}else{if(n=t.current.alternate,u&&!t1(n)){l=Bu(t,e,!1),u=!1;continue}if(l===2){if(u=e,t.errorRecoveryDisabledLanes&u)var d=0;else d=t.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){e=d;t:{var v=t;l=Ls;var T=v.current.memoizedState.isDehydrated;if(T&&(Xi(v,d).flags|=256),d=Bu(v,d,!1),d!==2){if(ju&&!T){v.errorRecoveryDisabledLanes|=u,ni|=u,l=4;break t}u=He,He=l,u!==null&&(He===null?He=u:He.push.apply(He,u))}l=d}if(u=!1,l!==2)continue}}if(l===1){Xi(t,0),Ta(t,e,0,!0);break}t:{switch(i=t,u=l,u){case 0:case 1:throw Error(r(345));case 4:if((e&4194048)!==e)break;case 6:Ta(i,e,$e,!ga);break t;case 2:He=null;break;case 3:case 5:break;default:throw Error(r(329))}if((e&62914560)===e&&(l=so+300-P(),10<l)){if(Ta(i,e,$e,!ga),Va(i,0,!0)!==0)break t;Wn=e,i.timeoutHandle=Fm(Sm.bind(null,i,n,He,oo,Ou,e,$e,ni,Yi,ga,u,"Throttled",-0,0),l);break t}Sm(i,n,He,oo,Ou,e,$e,ni,Yi,ga,u,null,-0,0)}}break}while(!0);Rn(t)}function Sm(t,e,n,i,l,u,d,v,T,j,z,V,M,O){if(t.timeoutHandle=-1,V=e.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Un},fm(e,u,V);var tt=(u&62914560)===u?so-P():(u&4194048)===u?pm-P():0;if(tt=V1(V,tt),tt!==null){Wn=u,t.cancelPendingCommit=tt(Dm.bind(null,t,e,u,n,i,l,d,v,T,z,V,null,M,O)),Ta(t,u,d,!j);return}}Dm(t,e,u,n,i,l,d,v,T)}function t1(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 i=0;i<n.length;i++){var l=n[i],u=l.getSnapshot;l=l.value;try{if(!Qe(u(),l))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 Ta(t,e,n,i){e&=~Mu,e&=~ni,t.suspendedLanes|=e,t.pingedLanes&=~e,i&&(t.warmLanes|=e),i=t.expirationTimes;for(var l=e;0<l;){var u=31-je(l),d=1<<u;i[u]=-1,l&=~d}n!==0&&jf(t,n,e)}function ro(){return(Rt&6)===0?(Hs(0),!1):!0}function zu(){if(_t!==null){if(wt===0)var t=_t.return;else t=_t,Hn=Za=null,Pr(t),zi=null,xs=0,t=_t;for(;t!==null;)Jh(t.alternate,t),t=t.return;_t=null}}function Xi(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,b1(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),Wn=0,zu(),qt=t,_t=n=Ln(t.current,null),Et=e,wt=0,We=null,ga=!1,qi=ia(t,e),ju=!1,Yi=$e=Mu=ni=ya=Wt=0,He=Ls=null,Ou=!1,(e&8)!==0&&(e|=e&32);var i=t.entangledLanes;if(i!==0)for(t=t.entanglements,i&=e;0<i;){var l=31-je(i),u=1<<l;e|=t[l],i&=~u}return Pn=e,jl(),n}function bm(t,e){pt=null,E.H=Os,e===wi||e===Ul?(e=Bd(),wt=3):e===Lr?(e=Bd(),wt=4):wt=e===hu?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,We=e,_t===null&&(Wt=1,Pl(t,cn(e,t.current)))}function Tm(){var t=Je.current;return t===null?!0:(Et&4194048)===Et?mn===null:(Et&62914560)===Et||(Et&536870912)!==0?t===mn:!1}function _m(){var t=E.H;return E.H=Os,t===null?Os:t}function xm(){var t=E.A;return E.A=Wy,t}function uo(){Wt=4,ga||(Et&4194048)!==Et&&Je.current!==null||(qi=!0),(ya&134217727)===0&&(ni&134217727)===0||qt===null||Ta(qt,Et,$e,!1)}function Bu(t,e,n){var i=Rt;Rt|=2;var l=_m(),u=xm();(qt!==t||Et!==e)&&(oo=null,Xi(t,e)),e=!1;var d=Wt;t:do try{if(wt!==0&&_t!==null){var v=_t,T=We;switch(wt){case 8:zu(),d=6;break t;case 3:case 2:case 9:case 6:Je.current===null&&(e=!0);var j=wt;if(wt=0,We=null,Ki(t,v,T,j),n&&qi){d=0;break t}break;default:j=wt,wt=0,We=null,Ki(t,v,T,j)}}e1(),d=Wt;break}catch(z){bm(t,z)}while(!0);return e&&t.shellSuspendCounter++,Hn=Za=null,Rt=i,E.H=l,E.A=u,_t===null&&(qt=null,Et=0,jl()),d}function e1(){for(;_t!==null;)Em(_t)}function n1(t,e){var n=Rt;Rt|=2;var i=_m(),l=xm();qt!==t||Et!==e?(oo=null,lo=P()+500,Xi(t,e)):qi=ia(t,e);t:do try{if(wt!==0&&_t!==null){e=_t;var u=We;e:switch(wt){case 1:wt=0,We=null,Ki(t,e,u,1);break;case 2:case 9:if(wd(u)){wt=0,We=null,Am(e);break}e=function(){wt!==2&&wt!==9||qt!==t||(wt=7),Rn(t)},u.then(e,e);break t;case 3:wt=7;break t;case 4:wt=5;break t;case 7:wd(u)?(wt=0,We=null,Am(e)):(wt=0,We=null,Ki(t,e,u,7));break;case 5:var d=null;switch(_t.tag){case 26:d=_t.memoizedState;case 5:case 27:var v=_t;if(d?cp(d):v.stateNode.complete){wt=0,We=null;var T=v.sibling;if(T!==null)_t=T;else{var j=v.return;j!==null?(_t=j,co(j)):_t=null}break e}}wt=0,We=null,Ki(t,e,u,5);break;case 6:wt=0,We=null,Ki(t,e,u,6);break;case 8:zu(),Wt=6;break t;default:throw Error(r(462))}}a1();break}catch(z){bm(t,z)}while(!0);return Hn=Za=null,E.H=i,E.A=l,Rt=n,_t!==null?0:(qt=null,Et=0,jl(),Wt)}function a1(){for(;_t!==null&&!Ot();)Em(_t)}function Em(t){var e=Qh(t.alternate,t,Pn);t.memoizedProps=t.pendingProps,e===null?co(t):_t=e}function Am(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=qh(n,e,e.pendingProps,e.type,void 0,Et);break;case 11:e=qh(n,e,e.pendingProps,e.type.render,e.ref,Et);break;case 5:Pr(e);default:Jh(n,e),e=_t=xd(e,Pn),e=Qh(n,e,Pn)}t.memoizedProps=t.pendingProps,e===null?co(t):_t=e}function Ki(t,e,n,i){Hn=Za=null,Pr(e),zi=null,xs=0;var l=e.return;try{if(Xy(t,l,e,n,Et)){Wt=1,Pl(t,cn(n,t.current)),_t=null;return}}catch(u){if(l!==null)throw _t=l,u;Wt=1,Pl(t,cn(n,t.current)),_t=null;return}e.flags&32768?(Nt||i===1?t=!0:qi||(Et&536870912)!==0?t=!1:(ga=t=!0,(i===2||i===9||i===3||i===6)&&(i=Je.current,i!==null&&i.tag===13&&(i.flags|=16384))),Nm(e,t)):co(e)}function co(t){var e=t;do{if((e.flags&32768)!==0){Nm(e,ga);return}t=e.return;var n=Qy(e.alternate,e,Pn);if(n!==null){_t=n;return}if(e=e.sibling,e!==null){_t=e;return}_t=e=t}while(e!==null);Wt===0&&(Wt=5)}function Nm(t,e){do{var n=Fy(t.alternate,t);if(n!==null){n.flags&=32767,_t=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){_t=t;return}_t=t=n}while(t!==null);Wt=6,_t=null}function Dm(t,e,n,i,l,u,d,v,T){t.cancelPendingCommit=null;do fo();while(he!==0);if((Rt&6)!==0)throw Error(r(327));if(e!==null){if(e===t.current)throw Error(r(177));if(u=e.lanes|e.childLanes,u|=Er,La(t,n,u,d,v,T),t===qt&&(_t=qt=null,Et=0),Ii=e,ba=t,Wn=n,Ru=u,ku=l,vm=i,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,o1(dt,function(){return Rm(),null})):(t.callbackNode=null,t.callbackPriority=0),i=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||i){i=E.T,E.T=null,l=q.p,q.p=2,d=Rt,Rt|=4;try{Jy(t,e,n)}finally{Rt=d,q.p=l,E.T=i}}he=1,Cm(),jm(),Mm()}}function Cm(){if(he===1){he=0;var t=ba,e=Ii,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=E.T,E.T=null;var i=q.p;q.p=2;var l=Rt;Rt|=4;try{rm(e,t);var u=Qu,d=md(t.containerInfo),v=u.focusedElem,T=u.selectionRange;if(d!==v&&v&&v.ownerDocument&&hd(v.ownerDocument.documentElement,v)){if(T!==null&&Sr(v)){var j=T.start,z=T.end;if(z===void 0&&(z=j),"selectionStart"in v)v.selectionStart=j,v.selectionEnd=Math.min(z,v.value.length);else{var V=v.ownerDocument||document,M=V&&V.defaultView||window;if(M.getSelection){var O=M.getSelection(),tt=v.textContent.length,rt=Math.min(T.start,tt),Lt=T.end===void 0?rt:Math.min(T.end,tt);!O.extend&&rt>Lt&&(d=Lt,Lt=rt,rt=d);var D=dd(v,rt),A=dd(v,Lt);if(D&&A&&(O.rangeCount!==1||O.anchorNode!==D.node||O.anchorOffset!==D.offset||O.focusNode!==A.node||O.focusOffset!==A.offset)){var C=V.createRange();C.setStart(D.node,D.offset),O.removeAllRanges(),rt>Lt?(O.addRange(C),O.extend(A.node,A.offset)):(C.setEnd(A.node,A.offset),O.addRange(C))}}}}for(V=[],O=v;O=O.parentNode;)O.nodeType===1&&V.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<V.length;v++){var U=V[v];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}Eo=!!Zu,Qu=Zu=null}finally{Rt=l,q.p=i,E.T=n}}t.current=e,he=2}}function jm(){if(he===2){he=0;var t=ba,e=Ii,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=E.T,E.T=null;var i=q.p;q.p=2;var l=Rt;Rt|=4;try{am(t,e.alternate,e)}finally{Rt=l,q.p=i,E.T=n}}he=3}}function Mm(){if(he===4||he===3){he=0,H();var t=ba,e=Ii,n=Wn,i=vm;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?he=5:(he=0,Ii=ba=null,Om(t,t.pendingLanes));var l=t.pendingLanes;if(l===0&&(Sa=null),tr(n),e=e.stateNode,Ce&&typeof Ce.onCommitFiberRoot=="function")try{Ce.onCommitFiberRoot(Dn,e,void 0,(e.current.flags&128)===128)}catch{}if(i!==null){e=E.T,l=q.p,q.p=2,E.T=null;try{for(var u=t.onRecoverableError,d=0;d<i.length;d++){var v=i[d];u(v.value,{componentStack:v.stack})}}finally{E.T=e,q.p=l}}(Wn&3)!==0&&fo(),Rn(t),l=t.pendingLanes,(n&261930)!==0&&(l&42)!==0?t===wu?Gs++:(Gs=0,wu=t):Gs=0,Hs(0)}}function Om(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Ts(e)))}function fo(){return Cm(),jm(),Mm(),Rm()}function Rm(){if(he!==5)return!1;var t=ba,e=Ru;Ru=0;var n=tr(Wn),i=E.T,l=q.p;try{q.p=32>n?32:n,E.T=null,n=ku,ku=null;var u=ba,d=Wn;if(he=0,Ii=ba=null,Wn=0,(Rt&6)!==0)throw Error(r(331));var v=Rt;if(Rt|=4,hm(u.current),cm(u,u.current,d,n),Rt=v,Hs(0,!1),Ce&&typeof Ce.onPostCommitFiberRoot=="function")try{Ce.onPostCommitFiberRoot(Dn,u)}catch{}return!0}finally{q.p=l,E.T=i,Om(t,e)}}function km(t,e,n){e=cn(n,e),e=du(t.stateNode,e,2),t=ha(t,e,2),t!==null&&(ye(t,2),Rn(t))}function zt(t,e,n){if(t.tag===3)km(t,t,n);else for(;e!==null;){if(e.tag===3){km(e,t,n);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Sa===null||!Sa.has(i))){t=cn(n,t),n=wh(2),i=ha(e,n,2),i!==null&&(zh(n,i,e,t),ye(i,2),Rn(i));break}}e=e.return}}function Uu(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new $y;var l=new Set;i.set(e,l)}else l=i.get(e),l===void 0&&(l=new Set,i.set(e,l));l.has(n)||(ju=!0,l.add(n),t=i1.bind(null,t,e,n),e.then(t,t))}function i1(t,e,n){var i=t.pingCache;i!==null&&i.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,qt===t&&(Et&n)===n&&(Wt===4||Wt===3&&(Et&62914560)===Et&&300>P()-so?(Rt&2)===0&&Xi(t,0):Mu|=n,Yi===Et&&(Yi=0)),Rn(t)}function wm(t,e){e===0&&(e=Bt()),t=Ia(t,e),t!==null&&(ye(t,e),Rn(t))}function s1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),wm(t,n)}function l1(t,e){var n=0;switch(t.tag){case 31:case 13:var i=t.stateNode,l=t.memoizedState;l!==null&&(n=l.retryLane);break;case 19:i=t.stateNode;break;case 22:i=t.stateNode._retryCache;break;default:throw Error(r(314))}i!==null&&i.delete(e),wm(t,n)}function o1(t,e){return Q(t,e)}var ho=null,Zi=null,Vu=!1,mo=!1,Lu=!1,_a=0;function Rn(t){t!==Zi&&t.next===null&&(Zi===null?ho=Zi=t:Zi=Zi.next=t),mo=!0,Vu||(Vu=!0,u1())}function Hs(t,e){if(!Lu&&mo){Lu=!0;do for(var n=!1,i=ho;i!==null;){if(t!==0){var l=i.pendingLanes;if(l===0)var u=0;else{var d=i.suspendedLanes,v=i.pingedLanes;u=(1<<31-je(42|t)+1)-1,u&=l&~(d&~v),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Vm(i,u))}else u=Et,u=Va(i,i===qt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(u&3)===0||ia(i,u)||(n=!0,Vm(i,u));i=i.next}while(n);Lu=!1}}function r1(){zm()}function zm(){mo=Vu=!1;var t=0;_a!==0&&S1()&&(t=_a);for(var e=P(),n=null,i=ho;i!==null;){var l=i.next,u=Bm(i,e);u===0?(i.next=null,n===null?ho=l:n.next=l,l===null&&(Zi=n)):(n=i,(t!==0||(u&3)!==0)&&(mo=!0)),i=l}he!==0&&he!==5||Hs(t),_a!==0&&(_a=0)}function Bm(t,e){for(var n=t.suspendedLanes,i=t.pingedLanes,l=t.expirationTimes,u=t.pendingLanes&-62914561;0<u;){var d=31-je(u),v=1<<d,T=l[d];T===-1?((v&n)===0||(v&i)!==0)&&(l[d]=ht(v,e)):T<=e&&(t.expiredLanes|=v),u&=~v}if(e=qt,n=Et,n=Va(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),i=t.callbackNode,n===0||t===e&&(wt===2||wt===9)||t.cancelPendingCommit!==null)return i!==null&&i!==null&&bt(i),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||ia(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(i!==null&&bt(i),tr(n)){case 2:case 8:n=kt;break;case 32:n=dt;break;case 268435456:n=ie;break;default:n=dt}return i=Um.bind(null,t),n=Q(n,i),t.callbackPriority=e,t.callbackNode=n,e}return i!==null&&i!==null&&bt(i),t.callbackPriority=2,t.callbackNode=null,2}function Um(t,e){if(he!==0&&he!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(fo()&&t.callbackNode!==n)return null;var i=Et;return i=Va(t,t===qt?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),i===0?null:(ym(t,i,e),Bm(t,P()),t.callbackNode!=null&&t.callbackNode===n?Um.bind(null,t):null)}function Vm(t,e){if(fo())return null;ym(t,e,!0)}function u1(){T1(function(){(Rt&6)!==0?Q(Tt,r1):zm()})}function Gu(){if(_a===0){var t=Ri;t===0&&(t=za,za<<=1,(za&261888)===0&&(za=256)),_a=t}return _a}function Lm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Tl(""+t)}function Gm(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 c1(t,e,n,i,l){if(e==="submit"&&n&&n.stateNode===l){var u=Lm((l[Be]||null).action),d=i.submitter;d&&(e=(e=d[Be]||null)?Lm(e.formAction):d.getAttribute("formAction"),e!==null&&(u=e,d=null));var v=new Al("action","action",null,i,l);t.push({event:v,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(_a!==0){var T=d?Gm(l,d):new FormData(l);lu(n,{pending:!0,data:T,method:l.method,action:u},null,T)}}else typeof u=="function"&&(v.preventDefault(),T=d?Gm(l,d):new FormData(l),lu(n,{pending:!0,data:T,method:l.method,action:u},u,T))},currentTarget:l}]})}}for(var Hu=0;Hu<xr.length;Hu++){var qu=xr[Hu],f1=qu.toLowerCase(),d1=qu[0].toUpperCase()+qu.slice(1);_n(f1,"on"+d1)}_n(gd,"onAnimationEnd"),_n(yd,"onAnimationIteration"),_n(Sd,"onAnimationStart"),_n("dblclick","onDoubleClick"),_n("focusin","onFocus"),_n("focusout","onBlur"),_n(Cy,"onTransitionRun"),_n(jy,"onTransitionStart"),_n(My,"onTransitionCancel"),_n(bd,"onTransitionEnd"),yi("onMouseEnter",["mouseout","mouseover"]),yi("onMouseLeave",["mouseout","mouseover"]),yi("onPointerEnter",["pointerout","pointerover"]),yi("onPointerLeave",["pointerout","pointerover"]),Ga("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ga("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ga("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ga("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ga("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ga("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qs="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(" "),h1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qs));function Hm(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var i=t[n],l=i.event;i=i.listeners;t:{var u=void 0;if(e)for(var d=i.length-1;0<=d;d--){var v=i[d],T=v.instance,j=v.currentTarget;if(v=v.listener,T!==u&&l.isPropagationStopped())break t;u=v,l.currentTarget=j;try{u(l)}catch(z){Cl(z)}l.currentTarget=null,u=T}else for(d=0;d<i.length;d++){if(v=i[d],T=v.instance,j=v.currentTarget,v=v.listener,T!==u&&l.isPropagationStopped())break t;u=v,l.currentTarget=j;try{u(l)}catch(z){Cl(z)}l.currentTarget=null,u=T}}}}function xt(t,e){var n=e[er];n===void 0&&(n=e[er]=new Set);var i=t+"__bubble";n.has(i)||(qm(e,t,2,!1),n.add(i))}function Yu(t,e,n){var i=0;e&&(i|=4),qm(n,t,i,e)}var po="_reactListening"+Math.random().toString(36).slice(2);function Iu(t){if(!t[po]){t[po]=!0,zf.forEach(function(n){n!=="selectionchange"&&(h1.has(n)||Yu(n,!1,t),Yu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[po]||(e[po]=!0,Yu("selectionchange",!1,e))}}function qm(t,e,n,i){switch(gp(e)){case 2:var l=H1;break;case 8:l=q1;break;default:l=sc}n=l.bind(null,e,n,t),l=void 0,!cr||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(l=!0),i?l!==void 0?t.addEventListener(e,n,{capture:!0,passive:l}):t.addEventListener(e,n,!0):l!==void 0?t.addEventListener(e,n,{passive:l}):t.addEventListener(e,n,!1)}function Xu(t,e,n,i,l){var u=i;if((e&1)===0&&(e&2)===0&&i!==null)t:for(;;){if(i===null)return;var d=i.tag;if(d===3||d===4){var v=i.stateNode.containerInfo;if(v===l)break;if(d===4)for(d=i.return;d!==null;){var T=d.tag;if((T===3||T===4)&&d.stateNode.containerInfo===l)return;d=d.return}for(;v!==null;){if(d=pi(v),d===null)return;if(T=d.tag,T===5||T===6||T===26||T===27){i=u=d;continue t}v=v.parentNode}}i=i.return}Zf(function(){var j=u,z=rr(n),V=[];t:{var M=Td.get(t);if(M!==void 0){var O=Al,tt=t;switch(t){case"keypress":if(xl(n)===0)break t;case"keydown":case"keyup":O=ly;break;case"focusin":tt="focus",O=mr;break;case"focusout":tt="blur",O=mr;break;case"beforeblur":case"afterblur":O=mr;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":O=Jf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Qg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=uy;break;case gd:case yd:case Sd:O=Pg;break;case bd:O=fy;break;case"scroll":case"scrollend":O=Kg;break;case"wheel":O=hy;break;case"copy":case"cut":case"paste":O=$g;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Wf;break;case"toggle":case"beforetoggle":O=py}var rt=(e&4)!==0,Lt=!rt&&(t==="scroll"||t==="scrollend"),D=rt?M!==null?M+"Capture":null:M;rt=[];for(var A=j,C;A!==null;){var U=A;if(C=U.stateNode,U=U.tag,U!==5&&U!==26&&U!==27||C===null||D===null||(U=cs(A,D),U!=null&&rt.push(Ys(A,U,C))),Lt)break;A=A.return}0<rt.length&&(M=new O(M,tt,null,n,z),V.push({event:M,listeners:rt}))}}if((e&7)===0){t:{if(M=t==="mouseover"||t==="pointerover",O=t==="mouseout"||t==="pointerout",M&&n!==or&&(tt=n.relatedTarget||n.fromElement)&&(pi(tt)||tt[mi]))break t;if((O||M)&&(M=z.window===z?z:(M=z.ownerDocument)?M.defaultView||M.parentWindow:window,O?(tt=n.relatedTarget||n.toElement,O=j,tt=tt?pi(tt):null,tt!==null&&(Lt=h(tt),rt=tt.tag,tt!==Lt||rt!==5&&rt!==27&&rt!==6)&&(tt=null)):(O=null,tt=j),O!==tt)){if(rt=Jf,U="onMouseLeave",D="onMouseEnter",A="mouse",(t==="pointerout"||t==="pointerover")&&(rt=Wf,U="onPointerLeave",D="onPointerEnter",A="pointer"),Lt=O==null?M:us(O),C=tt==null?M:us(tt),M=new rt(U,A+"leave",O,n,z),M.target=Lt,M.relatedTarget=C,U=null,pi(z)===j&&(rt=new rt(D,A+"enter",tt,n,z),rt.target=C,rt.relatedTarget=Lt,U=rt),Lt=U,O&&tt)e:{for(rt=m1,D=O,A=tt,C=0,U=D;U;U=rt(U))C++;U=0;for(var lt=A;lt;lt=rt(lt))U++;for(;0<C-U;)D=rt(D),C--;for(;0<U-C;)A=rt(A),U--;for(;C--;){if(D===A||A!==null&&D===A.alternate){rt=D;break e}D=rt(D),A=rt(A)}rt=null}else rt=null;O!==null&&Ym(V,M,O,rt,!1),tt!==null&&Lt!==null&&Ym(V,Lt,tt,rt,!0)}}t:{if(M=j?us(j):window,O=M.nodeName&&M.nodeName.toLowerCase(),O==="select"||O==="input"&&M.type==="file")var jt=ld;else if(id(M))if(od)jt=Ay;else{jt=xy;var it=_y}else O=M.nodeName,!O||O.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?j&&lr(j.elementType)&&(jt=ld):jt=Ey;if(jt&&(jt=jt(t,j))){sd(V,jt,n,z);break t}it&&it(t,M,j),t==="focusout"&&j&&M.type==="number"&&j.memoizedProps.value!=null&&sr(M,"number",M.value)}switch(it=j?us(j):window,t){case"focusin":(id(it)||it.contentEditable==="true")&&(Ei=it,br=j,ys=null);break;case"focusout":ys=br=Ei=null;break;case"mousedown":Tr=!0;break;case"contextmenu":case"mouseup":case"dragend":Tr=!1,pd(V,n,z);break;case"selectionchange":if(Dy)break;case"keydown":case"keyup":pd(V,n,z)}var vt;if(vr)t:{switch(t){case"compositionstart":var At="onCompositionStart";break t;case"compositionend":At="onCompositionEnd";break t;case"compositionupdate":At="onCompositionUpdate";break t}At=void 0}else xi?nd(t,n)&&(At="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(At="onCompositionStart");At&&($f&&n.locale!=="ko"&&(xi||At!=="onCompositionStart"?At==="onCompositionEnd"&&xi&&(vt=Qf()):(la=z,fr="value"in la?la.value:la.textContent,xi=!0)),it=vo(j,At),0<it.length&&(At=new Pf(At,t,null,n,z),V.push({event:At,listeners:it}),vt?At.data=vt:(vt=ad(n),vt!==null&&(At.data=vt)))),(vt=gy?yy(t,n):Sy(t,n))&&(At=vo(j,"onBeforeInput"),0<At.length&&(it=new Pf("onBeforeInput","beforeinput",null,n,z),V.push({event:it,listeners:At}),it.data=vt)),c1(V,t,j,n,z)}Hm(V,e)})}function Ys(t,e,n){return{instance:t,listener:e,currentTarget:n}}function vo(t,e){for(var n=e+"Capture",i=[];t!==null;){var l=t,u=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||u===null||(l=cs(t,n),l!=null&&i.unshift(Ys(t,l,u)),l=cs(t,e),l!=null&&i.push(Ys(t,l,u))),t.tag===3)return i;t=t.return}return[]}function m1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Ym(t,e,n,i,l){for(var u=e._reactName,d=[];n!==null&&n!==i;){var v=n,T=v.alternate,j=v.stateNode;if(v=v.tag,T!==null&&T===i)break;v!==5&&v!==26&&v!==27||j===null||(T=j,l?(j=cs(n,u),j!=null&&d.unshift(Ys(n,j,T))):l||(j=cs(n,u),j!=null&&d.push(Ys(n,j,T)))),n=n.return}d.length!==0&&t.push({event:e,listeners:d})}var p1=/\r\n?/g,v1=/\u0000|\uFFFD/g;function Im(t){return(typeof t=="string"?t:""+t).replace(p1,`
|
|
25
|
+
`).replace(v1,"")}function Xm(t,e){return e=Im(e),Im(t)===e}function Vt(t,e,n,i,l,u){switch(n){case"children":typeof i=="string"?e==="body"||e==="textarea"&&i===""||bi(t,i):(typeof i=="number"||typeof i=="bigint")&&e!=="body"&&bi(t,""+i);break;case"className":Sl(t,"class",i);break;case"tabIndex":Sl(t,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Sl(t,n,i);break;case"style":Xf(t,i,u);break;case"data":if(e!=="object"){Sl(t,"data",i);break}case"src":case"href":if(i===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){t.removeAttribute(n);break}i=Tl(""+i),t.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="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 u=="function"&&(n==="formAction"?(e!=="input"&&Vt(t,e,"name",l.name,l,null),Vt(t,e,"formEncType",l.formEncType,l,null),Vt(t,e,"formMethod",l.formMethod,l,null),Vt(t,e,"formTarget",l.formTarget,l,null)):(Vt(t,e,"encType",l.encType,l,null),Vt(t,e,"method",l.method,l,null),Vt(t,e,"target",l.target,l,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){t.removeAttribute(n);break}i=Tl(""+i),t.setAttribute(n,i);break;case"onClick":i!=null&&(t.onclick=Un);break;case"onScroll":i!=null&&xt("scroll",t);break;case"onScrollEnd":i!=null&&xt("scrollend",t);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(r(61));if(n=i.__html,n!=null){if(l.children!=null)throw Error(r(60));t.innerHTML=n}}break;case"multiple":t.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":t.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){t.removeAttribute("xlink:href");break}n=Tl(""+i),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":i!=null&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(n,""+i):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":i&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":i===!0?t.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(n,i):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?t.setAttribute(n,i):t.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?t.removeAttribute(n):t.setAttribute(n,i);break;case"popover":xt("beforetoggle",t),xt("toggle",t),yl(t,"popover",i);break;case"xlinkActuate":Bn(t,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Bn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Bn(t,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Bn(t,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Bn(t,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Bn(t,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Bn(t,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Bn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Bn(t,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":yl(t,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Ig.get(n)||n,yl(t,n,i))}}function Ku(t,e,n,i,l,u){switch(n){case"style":Xf(t,i,u);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(r(61));if(n=i.__html,n!=null){if(l.children!=null)throw Error(r(60));t.innerHTML=n}}break;case"children":typeof i=="string"?bi(t,i):(typeof i=="number"||typeof i=="bigint")&&bi(t,""+i);break;case"onScroll":i!=null&&xt("scroll",t);break;case"onScrollEnd":i!=null&&xt("scrollend",t);break;case"onClick":i!=null&&(t.onclick=Un);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Bf.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),e=n.slice(2,l?n.length-7:void 0),u=t[Be]||null,u=u!=null?u[n]:null,typeof u=="function"&&t.removeEventListener(e,u,l),typeof i=="function")){typeof u!="function"&&u!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,i,l);break t}n in t?t[n]=i:i===!0?t.setAttribute(n,""):yl(t,n,i)}}}function xe(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xt("error",t),xt("load",t);var i=!1,l=!1,u;for(u in n)if(n.hasOwnProperty(u)){var d=n[u];if(d!=null)switch(u){case"src":i=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Vt(t,e,u,d,n,null)}}l&&Vt(t,e,"srcSet",n.srcSet,n,null),i&&Vt(t,e,"src",n.src,n,null);return;case"input":xt("invalid",t);var v=u=d=l=null,T=null,j=null;for(i in n)if(n.hasOwnProperty(i)){var z=n[i];if(z!=null)switch(i){case"name":l=z;break;case"type":d=z;break;case"checked":T=z;break;case"defaultChecked":j=z;break;case"value":u=z;break;case"defaultValue":v=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,e));break;default:Vt(t,e,i,z,n,null)}}Hf(t,u,v,T,j,d,l,!1);return;case"select":xt("invalid",t),i=d=u=null;for(l in n)if(n.hasOwnProperty(l)&&(v=n[l],v!=null))switch(l){case"value":u=v;break;case"defaultValue":d=v;break;case"multiple":i=v;default:Vt(t,e,l,v,n,null)}e=u,n=d,t.multiple=!!i,e!=null?Si(t,!!i,e,!1):n!=null&&Si(t,!!i,n,!0);return;case"textarea":xt("invalid",t),u=l=i=null;for(d in n)if(n.hasOwnProperty(d)&&(v=n[d],v!=null))switch(d){case"value":i=v;break;case"defaultValue":l=v;break;case"children":u=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:Vt(t,e,d,v,n,null)}Yf(t,i,l,u);return;case"option":for(T in n)if(n.hasOwnProperty(T)&&(i=n[T],i!=null))switch(T){case"selected":t.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Vt(t,e,T,i,n,null)}return;case"dialog":xt("beforetoggle",t),xt("toggle",t),xt("cancel",t),xt("close",t);break;case"iframe":case"object":xt("load",t);break;case"video":case"audio":for(i=0;i<qs.length;i++)xt(qs[i],t);break;case"image":xt("error",t),xt("load",t);break;case"details":xt("toggle",t);break;case"embed":case"source":case"link":xt("error",t),xt("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(j in n)if(n.hasOwnProperty(j)&&(i=n[j],i!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Vt(t,e,j,i,n,null)}return;default:if(lr(e)){for(z in n)n.hasOwnProperty(z)&&(i=n[z],i!==void 0&&Ku(t,e,z,i,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(i=n[v],i!=null&&Vt(t,e,v,i,n,null))}function g1(t,e,n,i){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,u=null,d=null,v=null,T=null,j=null,z=null;for(O in n){var V=n[O];if(n.hasOwnProperty(O)&&V!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":T=V;default:i.hasOwnProperty(O)||Vt(t,e,O,null,i,V)}}for(var M in i){var O=i[M];if(V=n[M],i.hasOwnProperty(M)&&(O!=null||V!=null))switch(M){case"type":u=O;break;case"name":l=O;break;case"checked":j=O;break;case"defaultChecked":z=O;break;case"value":d=O;break;case"defaultValue":v=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,e));break;default:O!==V&&Vt(t,e,M,O,i,V)}}ir(t,d,v,T,j,z,u,l);return;case"select":O=d=v=M=null;for(u in n)if(T=n[u],n.hasOwnProperty(u)&&T!=null)switch(u){case"value":break;case"multiple":O=T;default:i.hasOwnProperty(u)||Vt(t,e,u,null,i,T)}for(l in i)if(u=i[l],T=n[l],i.hasOwnProperty(l)&&(u!=null||T!=null))switch(l){case"value":M=u;break;case"defaultValue":v=u;break;case"multiple":d=u;default:u!==T&&Vt(t,e,l,u,i,T)}e=v,n=d,i=O,M!=null?Si(t,!!n,M,!1):!!i!=!!n&&(e!=null?Si(t,!!n,e,!0):Si(t,!!n,n?[]:"",!1));return;case"textarea":O=M=null;for(v in n)if(l=n[v],n.hasOwnProperty(v)&&l!=null&&!i.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Vt(t,e,v,null,i,l)}for(d in i)if(l=i[d],u=n[d],i.hasOwnProperty(d)&&(l!=null||u!=null))switch(d){case"value":M=l;break;case"defaultValue":O=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(r(91));break;default:l!==u&&Vt(t,e,d,l,i,u)}qf(t,M,O);return;case"option":for(var tt in n)if(M=n[tt],n.hasOwnProperty(tt)&&M!=null&&!i.hasOwnProperty(tt))switch(tt){case"selected":t.selected=!1;break;default:Vt(t,e,tt,null,i,M)}for(T in i)if(M=i[T],O=n[T],i.hasOwnProperty(T)&&M!==O&&(M!=null||O!=null))switch(T){case"selected":t.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:Vt(t,e,T,M,i,O)}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 rt in n)M=n[rt],n.hasOwnProperty(rt)&&M!=null&&!i.hasOwnProperty(rt)&&Vt(t,e,rt,null,i,M);for(j in i)if(M=i[j],O=n[j],i.hasOwnProperty(j)&&M!==O&&(M!=null||O!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,e));break;default:Vt(t,e,j,M,i,O)}return;default:if(lr(e)){for(var Lt in n)M=n[Lt],n.hasOwnProperty(Lt)&&M!==void 0&&!i.hasOwnProperty(Lt)&&Ku(t,e,Lt,void 0,i,M);for(z in i)M=i[z],O=n[z],!i.hasOwnProperty(z)||M===O||M===void 0&&O===void 0||Ku(t,e,z,M,i,O);return}}for(var D in n)M=n[D],n.hasOwnProperty(D)&&M!=null&&!i.hasOwnProperty(D)&&Vt(t,e,D,null,i,M);for(V in i)M=i[V],O=n[V],!i.hasOwnProperty(V)||M===O||M==null&&O==null||Vt(t,e,V,M,i,O)}function Km(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function y1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),i=0;i<n.length;i++){var l=n[i],u=l.transferSize,d=l.initiatorType,v=l.duration;if(u&&v&&Km(d)){for(d=0,v=l.responseEnd,i+=1;i<n.length;i++){var T=n[i],j=T.startTime;if(j>v)break;var z=T.transferSize,V=T.initiatorType;z&&Km(V)&&(T=T.responseEnd,d+=z*(T<v?1:(v-j)/(T-j)))}if(--i,e+=8*(u+d)/(l.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 Zu=null,Qu=null;function go(t){return t.nodeType===9?t:t.ownerDocument}function Zm(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 Qm(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 Fu(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 Ju=null;function S1(){var t=window.event;return t&&t.type==="popstate"?t===Ju?!1:(Ju=t,!0):(Ju=null,!1)}var Fm=typeof setTimeout=="function"?setTimeout:void 0,b1=typeof clearTimeout=="function"?clearTimeout:void 0,Jm=typeof Promise=="function"?Promise:void 0,T1=typeof queueMicrotask=="function"?queueMicrotask:typeof Jm<"u"?function(t){return Jm.resolve(null).then(t).catch(_1)}:Fm;function _1(t){setTimeout(function(){throw t})}function xa(t){return t==="head"}function Pm(t,e){var n=e,i=0;do{var l=n.nextSibling;if(t.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(i===0){t.removeChild(l),Pi(e);return}i--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")i++;else if(n==="html")Is(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,Is(n);for(var u=n.firstChild;u;){var d=u.nextSibling,v=u.nodeName;u[rs]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=d}}else n==="body"&&Is(t.ownerDocument.body);n=l}while(n);Pi(e)}function Wm(t,e){var n=t;t=0;do{var i=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||""),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=i}while(n)}function Pu(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":Pu(n),nr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function x1(t,e,n,i){for(;t.nodeType===1;){var l=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!i&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(i){if(!t[rs])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(u=t.getAttribute("rel"),u==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(u!==l.rel||t.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||t.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||t.getAttribute("title")!==(l.title==null?null:l.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(u=t.getAttribute("src"),(u!==(l.src==null?null:l.src)||t.getAttribute("type")!==(l.type==null?null:l.type)||t.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&u&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var u=l.name==null?null:""+l.name;if(l.type==="hidden"&&t.getAttribute("name")===u)return t}else return t;if(t=pn(t.nextSibling),t===null)break}return null}function E1(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=pn(t.nextSibling),t===null))return null;return t}function $m(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=pn(t.nextSibling),t===null))return null;return t}function Wu(t){return t.data==="$?"||t.data==="$~"}function $u(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function A1(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var i=function(){e(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),t._reactRetry=i}}function pn(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 tc=null;function tp(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return pn(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function ep(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 np(t,e,n){switch(e=go(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 Is(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);nr(t)}var vn=new Map,ap=new Set;function yo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var $n=q.d;q.d={f:N1,r:D1,D:C1,C:j1,L:M1,m:O1,X:k1,S:R1,M:w1};function N1(){var t=$n.f(),e=ro();return t||e}function D1(t){var e=vi(t);e!==null&&e.tag===5&&e.type==="form"?bh(e):$n.r(t)}var Qi=typeof document>"u"?null:document;function ip(t,e,n){var i=Qi;if(i&&typeof e=="string"&&e){var l=rn(e);l='link[rel="'+t+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),ap.has(l)||(ap.add(l),t={rel:t,crossOrigin:n,href:e},i.querySelector(l)===null&&(e=i.createElement("link"),xe(e,"link",t),pe(e),i.head.appendChild(e)))}}function C1(t){$n.D(t),ip("dns-prefetch",t,null)}function j1(t,e){$n.C(t,e),ip("preconnect",t,e)}function M1(t,e,n){$n.L(t,e,n);var i=Qi;if(i&&t&&e){var l='link[rel="preload"][as="'+rn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+rn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+rn(n.imageSizes)+'"]')):l+='[href="'+rn(t)+'"]';var u=l;switch(e){case"style":u=Fi(t);break;case"script":u=Ji(t)}vn.has(u)||(t=b({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),vn.set(u,t),i.querySelector(l)!==null||e==="style"&&i.querySelector(Xs(u))||e==="script"&&i.querySelector(Ks(u))||(e=i.createElement("link"),xe(e,"link",t),pe(e),i.head.appendChild(e)))}}function O1(t,e){$n.m(t,e);var n=Qi;if(n&&t){var i=e&&typeof e.as=="string"?e.as:"script",l='link[rel="modulepreload"][as="'+rn(i)+'"][href="'+rn(t)+'"]',u=l;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ji(t)}if(!vn.has(u)&&(t=b({rel:"modulepreload",href:t},e),vn.set(u,t),n.querySelector(l)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ks(u)))return}i=n.createElement("link"),xe(i,"link",t),pe(i),n.head.appendChild(i)}}}function R1(t,e,n){$n.S(t,e,n);var i=Qi;if(i&&t){var l=gi(i).hoistableStyles,u=Fi(t);e=e||"default";var d=l.get(u);if(!d){var v={loading:0,preload:null};if(d=i.querySelector(Xs(u)))v.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":e},n),(n=vn.get(u))&&ec(t,n);var T=d=i.createElement("link");pe(T),xe(T,"link",t),T._p=new Promise(function(j,z){T.onload=j,T.onerror=z}),T.addEventListener("load",function(){v.loading|=1}),T.addEventListener("error",function(){v.loading|=2}),v.loading|=4,So(d,e,i)}d={type:"stylesheet",instance:d,count:1,state:v},l.set(u,d)}}}function k1(t,e){$n.X(t,e);var n=Qi;if(n&&t){var i=gi(n).hoistableScripts,l=Ji(t),u=i.get(l);u||(u=n.querySelector(Ks(l)),u||(t=b({src:t,async:!0},e),(e=vn.get(l))&&nc(t,e),u=n.createElement("script"),pe(u),xe(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(l,u))}}function w1(t,e){$n.M(t,e);var n=Qi;if(n&&t){var i=gi(n).hoistableScripts,l=Ji(t),u=i.get(l);u||(u=n.querySelector(Ks(l)),u||(t=b({src:t,async:!0,type:"module"},e),(e=vn.get(l))&&nc(t,e),u=n.createElement("script"),pe(u),xe(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(l,u))}}function sp(t,e,n,i){var l=(l=Ne.current)?yo(l):null;if(!l)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Fi(n.href),n=gi(l).hoistableStyles,i=n.get(e),i||(i={type:"style",instance:null,count:0,state:null},n.set(e,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Fi(n.href);var u=gi(l).hoistableStyles,d=u.get(t);if(d||(l=l.ownerDocument||l,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,d),(u=l.querySelector(Xs(t)))&&!u._p&&(d.instance=u,d.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),u||z1(l,t,n,d.state))),e&&i===null)throw Error(r(528,""));return d}if(e&&i!==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=Ji(n),n=gi(l).hoistableScripts,i=n.get(e),i||(i={type:"script",instance:null,count:0,state:null},n.set(e,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Fi(t){return'href="'+rn(t)+'"'}function Xs(t){return'link[rel="stylesheet"]['+t+"]"}function lp(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function z1(t,e,n,i){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?i.loading=1:(e=t.createElement("link"),i.preload=e,e.addEventListener("load",function(){return i.loading|=1}),e.addEventListener("error",function(){return i.loading|=2}),xe(e,"link",n),pe(e),t.head.appendChild(e))}function Ji(t){return'[src="'+rn(t)+'"]'}function Ks(t){return"script[async]"+t}function op(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var i=t.querySelector('style[data-href~="'+rn(n.href)+'"]');if(i)return e.instance=i,pe(i),i;var l=b({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(t.ownerDocument||t).createElement("style"),pe(i),xe(i,"style",l),So(i,n.precedence,t),e.instance=i;case"stylesheet":l=Fi(n.href);var u=t.querySelector(Xs(l));if(u)return e.state.loading|=4,e.instance=u,pe(u),u;i=lp(n),(l=vn.get(l))&&ec(i,l),u=(t.ownerDocument||t).createElement("link"),pe(u);var d=u;return d._p=new Promise(function(v,T){d.onload=v,d.onerror=T}),xe(u,"link",i),e.state.loading|=4,So(u,n.precedence,t),e.instance=u;case"script":return u=Ji(n.src),(l=t.querySelector(Ks(u)))?(e.instance=l,pe(l),l):(i=n,(l=vn.get(u))&&(i=b({},n),nc(i,l)),t=t.ownerDocument||t,l=t.createElement("script"),pe(l),xe(l,"link",i),t.head.appendChild(l),e.instance=l);case"void":return null;default:throw Error(r(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(i=e.instance,e.state.loading|=4,So(i,n.precedence,t));return e.instance}function So(t,e,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=i.length?i[i.length-1]:null,u=l,d=0;d<i.length;d++){var v=i[d];if(v.dataset.precedence===e)u=v;else if(u!==l)break}u?u.parentNode.insertBefore(t,u.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function ec(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function nc(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var bo=null;function rp(t,e,n){if(bo===null){var i=new Map,l=bo=new Map;l.set(n,i)}else l=bo,i=l.get(n),i||(i=new Map,l.set(n,i));if(i.has(t))return i;for(i.set(t,null),n=n.getElementsByTagName(t),l=0;l<n.length;l++){var u=n[l];if(!(u[rs]||u[Se]||t==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var d=u.getAttribute(e)||"";d=t+d;var v=i.get(d);v?v.push(u):i.set(d,[u])}}return i}function up(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function B1(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 cp(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function U1(t,e,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=Fi(i.href),u=e.querySelector(Xs(l));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=To.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=u,pe(u);return}u=e.ownerDocument||e,i=lp(i),(l=vn.get(l))&&ec(i,l),u=u.createElement("link"),pe(u);var d=u;d._p=new Promise(function(v,T){d.onload=v,d.onerror=T}),xe(u,"link",i),n.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=To.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var ac=0;function V1(t,e){return t.stylesheets&&t.count===0&&xo(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var i=setTimeout(function(){if(t.stylesheets&&xo(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4+e);0<t.imgBytes&&ac===0&&(ac=62500*y1());var l=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&xo(t,t.stylesheets),t.unsuspend)){var u=t.unsuspend;t.unsuspend=null,u()}},(t.imgBytes>ac?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(i),clearTimeout(l)}}:null}function To(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var _o=null;function xo(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,_o=new Map,e.forEach(L1,t),_o=null,To.call(t))}function L1(t,e){if(!(e.state.loading&4)){var n=_o.get(t);if(n)var i=n.get(null);else{n=new Map,_o.set(t,n);for(var l=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<l.length;u++){var d=l[u];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(n.set(d.dataset.precedence,d),i=d)}i&&n.set(null,i)}l=e.instance,d=l.getAttribute("data-precedence"),u=n.get(d)||i,u===i&&n.set(null,l),n.set(d,l),this.count++,i=To.bind(this),l.addEventListener("load",i),l.addEventListener("error",i),u?u.parentNode.insertBefore(l,u.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(l,t.firstChild)),e.state.loading|=4}}var Zs={$$typeof:L,Provider:null,Consumer:null,_currentValue:et,_currentValue2:et,_threadCount:0};function G1(t,e,n,i,l,u,d,v,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=It(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=It(0),this.hiddenUpdates=It(null),this.identifierPrefix=i,this.onUncaughtError=l,this.onCaughtError=u,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function fp(t,e,n,i,l,u,d,v,T,j,z,V){return t=new G1(t,e,n,d,T,j,z,V,v),e=1,u===!0&&(e|=24),u=Fe(3,null,null,e),t.current=u,u.stateNode=t,e=Br(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:i,isDehydrated:n,cache:e},Gr(u),t}function dp(t){return t?(t=Di,t):Di}function hp(t,e,n,i,l,u){l=dp(l),i.context===null?i.context=l:i.pendingContext=l,i=da(e),i.payload={element:n},u=u===void 0?null:u,u!==null&&(i.callback=u),n=ha(t,i,e),n!==null&&(qe(n,t,e),As(n,t,e))}function mp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function ic(t,e){mp(t,e),(t=t.alternate)&&mp(t,e)}function pp(t){if(t.tag===13||t.tag===31){var e=Ia(t,67108864);e!==null&&qe(e,t,67108864),ic(t,67108864)}}function vp(t){if(t.tag===13||t.tag===31){var e=tn();e=$o(e);var n=Ia(t,e);n!==null&&qe(n,t,e),ic(t,e)}}var Eo=!0;function H1(t,e,n,i){var l=E.T;E.T=null;var u=q.p;try{q.p=2,sc(t,e,n,i)}finally{q.p=u,E.T=l}}function q1(t,e,n,i){var l=E.T;E.T=null;var u=q.p;try{q.p=8,sc(t,e,n,i)}finally{q.p=u,E.T=l}}function sc(t,e,n,i){if(Eo){var l=lc(i);if(l===null)Xu(t,e,i,Ao,n),yp(t,i);else if(I1(l,t,e,n,i))i.stopPropagation();else if(yp(t,i),e&4&&-1<Y1.indexOf(t)){for(;l!==null;){var u=vi(l);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=Cn(u.pendingLanes);if(d!==0){var v=u;for(v.pendingLanes|=2,v.entangledLanes|=2;d;){var T=1<<31-je(d);v.entanglements[1]|=T,d&=~T}Rn(u),(Rt&6)===0&&(lo=P()+500,Hs(0))}}break;case 31:case 13:v=Ia(u,2),v!==null&&qe(v,u,2),ro(),ic(u,2)}if(u=lc(i),u===null&&Xu(t,e,i,Ao,n),u===l)break;l=u}l!==null&&i.stopPropagation()}else Xu(t,e,i,null,n)}}function lc(t){return t=rr(t),oc(t)}var Ao=null;function oc(t){if(Ao=null,t=pi(t),t!==null){var e=h(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=f(e),t!==null)return t;t=null}else if(n===31){if(t=m(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 Ao=t,null}function gp(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(Z()){case Tt:return 2;case kt:return 8;case dt:case De:return 32;case ie:return 268435456;default:return 32}default:return 32}}var rc=!1,Ea=null,Aa=null,Na=null,Qs=new Map,Fs=new Map,Da=[],Y1="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 yp(t,e){switch(t){case"focusin":case"focusout":Ea=null;break;case"dragenter":case"dragleave":Aa=null;break;case"mouseover":case"mouseout":Na=null;break;case"pointerover":case"pointerout":Qs.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fs.delete(e.pointerId)}}function Js(t,e,n,i,l,u){return t===null||t.nativeEvent!==u?(t={blockedOn:e,domEventName:n,eventSystemFlags:i,nativeEvent:u,targetContainers:[l]},e!==null&&(e=vi(e),e!==null&&pp(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,l!==null&&e.indexOf(l)===-1&&e.push(l),t)}function I1(t,e,n,i,l){switch(e){case"focusin":return Ea=Js(Ea,t,e,n,i,l),!0;case"dragenter":return Aa=Js(Aa,t,e,n,i,l),!0;case"mouseover":return Na=Js(Na,t,e,n,i,l),!0;case"pointerover":var u=l.pointerId;return Qs.set(u,Js(Qs.get(u)||null,t,e,n,i,l)),!0;case"gotpointercapture":return u=l.pointerId,Fs.set(u,Js(Fs.get(u)||null,t,e,n,i,l)),!0}return!1}function Sp(t){var e=pi(t.target);if(e!==null){var n=h(e);if(n!==null){if(e=n.tag,e===13){if(e=f(n),e!==null){t.blockedOn=e,kf(t.priority,function(){vp(n)});return}}else if(e===31){if(e=m(n),e!==null){t.blockedOn=e,kf(t.priority,function(){vp(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 No(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=lc(t.nativeEvent);if(n===null){n=t.nativeEvent;var i=new n.constructor(n.type,n);or=i,n.target.dispatchEvent(i),or=null}else return e=vi(n),e!==null&&pp(e),t.blockedOn=n,!1;e.shift()}return!0}function bp(t,e,n){No(t)&&n.delete(e)}function X1(){rc=!1,Ea!==null&&No(Ea)&&(Ea=null),Aa!==null&&No(Aa)&&(Aa=null),Na!==null&&No(Na)&&(Na=null),Qs.forEach(bp),Fs.forEach(bp)}function Do(t,e){t.blockedOn===e&&(t.blockedOn=null,rc||(rc=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,X1)))}var Co=null;function Tp(t){Co!==t&&(Co=t,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Co===t&&(Co=null);for(var e=0;e<t.length;e+=3){var n=t[e],i=t[e+1],l=t[e+2];if(typeof i!="function"){if(oc(i||n)===null)continue;break}var u=vi(n);u!==null&&(t.splice(e,3),e-=3,lu(u,{pending:!0,data:l,method:n.method,action:i},i,l))}}))}function Pi(t){function e(T){return Do(T,t)}Ea!==null&&Do(Ea,t),Aa!==null&&Do(Aa,t),Na!==null&&Do(Na,t),Qs.forEach(e),Fs.forEach(e);for(var n=0;n<Da.length;n++){var i=Da[n];i.blockedOn===t&&(i.blockedOn=null)}for(;0<Da.length&&(n=Da[0],n.blockedOn===null);)Sp(n),n.blockedOn===null&&Da.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var l=n[i],u=n[i+1],d=l[Be]||null;if(typeof u=="function")d||Tp(n);else if(d){var v=null;if(u&&u.hasAttribute("formAction")){if(l=u,d=u[Be]||null)v=d.formAction;else if(oc(l)!==null)continue}else v=d.action;typeof v=="function"?n[i+1]=v:(n.splice(i,3),i-=3),Tp(n)}}}function _p(){function t(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(d){return l=d})},focusReset:"manual",scroll:"manual"})}function e(){l!==null&&(l(),l=null),i||setTimeout(n,20)}function n(){if(!i&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,l=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){i=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),l!==null&&(l(),l=null)}}}function uc(t){this._internalRoot=t}jo.prototype.render=uc.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(r(409));var n=e.current,i=tn();hp(n,i,t,e,null,null)},jo.prototype.unmount=uc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;hp(t.current,2,null,t,null,null),ro(),e[mi]=null}};function jo(t){this._internalRoot=t}jo.prototype.unstable_scheduleHydration=function(t){if(t){var e=Rf();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Da.length&&e!==0&&e<Da[n].priority;n++);Da.splice(n,0,t),n===0&&Sp(t)}};var xp=s.version;if(xp!=="19.2.4")throw Error(r(527,xp,"19.2.4"));q.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=g(e),t=t!==null?S(t):null,t=t===null?null:t.stateNode,t};var K1={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mo.isDisabled&&Mo.supportsFiber)try{Dn=Mo.inject(K1),Ce=Mo}catch{}}return Ps.createRoot=function(t,e){if(!c(t))throw Error(r(299));var n=!1,i="",l=Mh,u=Oh,d=Rh;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(i=e.identifierPrefix),e.onUncaughtError!==void 0&&(l=e.onUncaughtError),e.onCaughtError!==void 0&&(u=e.onCaughtError),e.onRecoverableError!==void 0&&(d=e.onRecoverableError)),e=fp(t,1,!1,null,null,n,i,null,l,u,d,_p),t[mi]=e.current,Iu(t),new uc(e)},Ps.hydrateRoot=function(t,e,n){if(!c(t))throw Error(r(299));var i=!1,l="",u=Mh,d=Oh,v=Rh,T=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(T=n.formState)),e=fp(t,1,!0,e,n??null,i,l,T,u,d,v,_p),e.context=dp(null),n=e.current,i=tn(),i=$o(i),l=da(i),l.callback=null,ha(n,l,i),n=i,e.current.lanes=n,ye(e,n),Rn(e),t[mi]=e.current,Iu(t),new jo(e)},Ps.version="19.2.4",Ps}var Mp;function cS(){if(Mp)return cc.exports;Mp=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(s){console.error(s)}}return a(),cc.exports=uS(),cc.exports}var fS=cS();const dS=3e3,hS=1e4,Op=5e3;function mS(a){const s=typeof window<"u"&&window.__GRACKLE_API_KEY__||"",o=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}?token=${encodeURIComponent(s)}`:"ws://localhost:3000",r=x.useRef(void 0),[c,h]=x.useState(!1),[f,m]=x.useState([]),[p,g]=x.useState([]),[S,b]=x.useState([]),[_,N]=x.useState(void 0),[R,w]=x.useState([]),[X,I]=x.useState([]),[J,L]=x.useState([]),[k,Y]=x.useState([]),[G,F]=x.useState(void 0),[B,nt]=x.useState({}),[ct,st]=x.useState([]),[ft,gt]=x.useState(""),[Dt,Yt]=x.useState(!1),E=x.useCallback(H=>{var P;((P=r.current)==null?void 0:P.readyState)===WebSocket.OPEN&&r.current.send(JSON.stringify(H))},[]);x.useEffect(()=>{let H,P,Z;function Tt(){H=new WebSocket(o),r.current=H,H.onopen=()=>{h(!0),E({type:"list_environments"}),E({type:"list_sessions"}),E({type:"list_projects"}),E({type:"list_tokens"}),E({type:"subscribe_all"}),clearInterval(Z),Z=setInterval(()=>{E({type:"list_environments"})},hS)},H.onmessage=kt=>{var De,ie,di,hi,Dn,Ce,Tn,je,pl,vl,gl,za,Ba,Ua,Cn,Va,ia;const dt=JSON.parse(kt.data);switch(dt.type){case"environments":m(((De=dt.payload)==null?void 0:De.environments)||[]);break;case"sessions":g(((ie=dt.payload)==null?void 0:ie.sessions)||[]);break;case"session_event":{const ht=dt.payload;b(Bt=>{const It=[...Bt,ht];return It.length>Op?It.slice(-Op):It}),ht.eventType==="status"&&g(Bt=>Bt.map(It=>It.id===ht.sessionId?{...It,status:ht.content}:It));break}case"session_events":{const ht=(di=dt.payload)==null?void 0:di.events,Bt=(hi=dt.payload)==null?void 0:hi.sessionId;ht&&Bt&&b(It=>[...It.filter(La=>La.sessionId!==Bt),...ht]);break}case"spawned":{const ht=(Dn=dt.payload)==null?void 0:Dn.sessionId;ht&&N(ht),E({type:"list_sessions"}),E({type:"list_environments"});break}case"projects":w(((Ce=dt.payload)==null?void 0:Ce.projects)||[]);break;case"project_created":E({type:"list_projects"});break;case"project_archived":E({type:"list_projects"});break;case"tasks":{const ht=((Tn=dt.payload)==null?void 0:Tn.tasks)||[],Bt=((je=dt.payload)==null?void 0:je.projectId)||(ht.length>0?ht[0].projectId:"");if(!Bt){I(ht);break}I(It=>[...It.filter(ye=>ye.projectId!==Bt),...ht]);break}case"task_created":{const ht=((pl=dt.payload)==null?void 0:pl.task)||{},Bt=ht.project_id||ht.projectId;Bt&&E({type:"list_tasks",payload:{projectId:Bt}});break}case"task_started":{const ht=dt.payload;ht.sessionId&&E({type:"list_sessions"});const Bt=ht.projectId;Bt?E({type:"list_tasks",payload:{projectId:Bt}}):ht.taskId&&I(It=>{const ye=It.find(La=>La.id===ht.taskId);return ye&&E({type:"list_tasks",payload:{projectId:ye.projectId}}),It});break}case"task_approved":case"task_rejected":case"task_deleted":case"task_updated":{const ht=dt.payload,Bt=ht.projectId;Bt?E({type:"list_tasks",payload:{projectId:Bt}}):ht.taskId&&I(It=>{const ye=It.find(La=>La.id===ht.taskId);return ye&&E({type:"list_tasks",payload:{projectId:ye.projectId}}),It});break}case"findings":L(((vl=dt.payload)==null?void 0:vl.findings)||[]);break;case"finding_posted":(gl=dt.payload)!=null&&gl.projectId&&E({type:"list_findings",payload:{projectId:dt.payload.projectId}});break;case"tokens":Y(((za=dt.payload)==null?void 0:za.tokens)||[]);break;case"token_changed":E({type:"list_tokens"});break;case"task_diff":F(dt.payload);break;case"provision_progress":{const ht=dt.payload;ht.environmentId&&(nt(Bt=>({...Bt,[ht.environmentId]:{stage:ht.stage,message:ht.message,progress:ht.progress}})),ht.stage==="ready"&&setTimeout(()=>{nt(It=>{const ye={...It};return delete ye[ht.environmentId],ye})},5e3),(ht.stage==="ready"||ht.stage==="error")&&E({type:"list_environments"}));break}case"environment_added":break;case"environment_removed":if((Ba=dt.payload)!=null&&Ba.environmentId){const ht=dt.payload.environmentId;nt(Bt=>{const It={...Bt};return delete It[ht],It})}E({type:"list_environments"}),E({type:"list_sessions"});break;case"codespaces_list":{const ht=((Ua=dt.payload)==null?void 0:Ua.codespaces)||[],Bt=((Cn=dt.payload)==null?void 0:Cn.error)||"";st(ht),gt(Bt);break}case"codespace_created":{Yt(!1),E({type:"list_codespaces"});break}case"codespace_create_error":{Yt(!1);const ht=((Va=dt.payload)==null?void 0:Va.message)||"Failed to create codespace";gt(ht);break}case"error":console.error("[ws]",(ia=dt.payload)==null?void 0:ia.message);break}},H.onclose=()=>{h(!1),r.current=void 0,clearInterval(Z),clearTimeout(P),P=setTimeout(Tt,dS)},H.onerror=()=>{H.close()}}return Tt(),()=>{clearInterval(Z),clearTimeout(P),H==null||H.close()}},[o,E]);const q=x.useCallback((H,P,Z,Tt)=>{E({type:"spawn",payload:{environmentId:H,prompt:P,model:Z||"",runtime:Tt||""}})},[E]),et=x.useCallback((H,P)=>{E({type:"send_input",payload:{sessionId:H,text:P}})},[E]),yt=x.useCallback(H=>{E({type:"kill",payload:{sessionId:H}})},[E]),St=x.useCallback(()=>{E({type:"list_environments"}),E({type:"list_sessions"}),E({type:"list_projects"}),E({type:"list_tokens"})},[E]),Gt=x.useCallback(H=>{E({type:"get_session_events",payload:{sessionId:H}})},[E]),Ct=x.useCallback(()=>{b([])},[]),mt=x.useCallback((H,P,Z,Tt)=>{E({type:"create_project",payload:{name:H,description:P||"",repoUrl:Z||"",defaultEnvironmentId:Tt||""}})},[E]),Ht=x.useCallback(H=>{E({type:"archive_project",payload:{projectId:H}})},[E]),de=x.useCallback(H=>{E({type:"list_tasks",payload:{projectId:H}})},[E]),Ne=x.useCallback((H,P,Z,Tt,kt,dt)=>{E({type:"create_task",payload:{projectId:H,title:P,description:Z||"",environmentId:Tt||"",dependsOn:kt||[],parentTaskId:dt||""}})},[E]),Ie=x.useCallback((H,P,Z)=>{E({type:"start_task",payload:{taskId:H,runtime:P||"",model:Z||""}})},[E]),sn=x.useCallback(H=>{E({type:"approve_task",payload:{taskId:H}})},[E]),ke=x.useCallback((H,P)=>{E({type:"reject_task",payload:{taskId:H,reviewNotes:P}})},[E]),Sn=x.useCallback(H=>{E({type:"delete_task",payload:{taskId:H}})},[E]),Xe=x.useCallback(H=>{E({type:"list_findings",payload:{projectId:H}})},[E]),Ke=x.useCallback((H,P,Z,Tt,kt)=>{E({type:"post_finding",payload:{projectId:H,title:P,content:Z,category:Tt||"general",tags:kt||[]}})},[E]),bn=x.useCallback(H=>{F(void 0),E({type:"get_task_diff",payload:{taskId:H}})},[E]),we=x.useCallback(()=>{E({type:"list_tokens"})},[E]),Ze=x.useCallback((H,P,Z,Tt,kt)=>{E({type:"set_token",payload:{name:H,value:P,tokenType:Z,envVar:Tt,filePath:kt}})},[E]),ln=x.useCallback(H=>{E({type:"delete_token",payload:{name:H}})},[E]),K=x.useCallback((H,P,Z,Tt)=>{const kt={displayName:H,adapterType:P,adapterConfig:Z||{}};Tt&&(kt.defaultRuntime=Tt),E({type:"add_environment",payload:kt})},[E]),at=x.useCallback(H=>{E({type:"provision_environment",payload:{environmentId:H}})},[E]),$=x.useCallback(H=>{E({type:"stop_environment",payload:{environmentId:H}})},[E]),Q=x.useCallback(H=>{E({type:"remove_environment",payload:{environmentId:H}})},[E]),bt=x.useCallback(()=>{E({type:"list_codespaces"})},[E]),Ot=x.useCallback(H=>{if(!c){gt("Not connected to server. Please try again once the connection is restored.");return}Yt(!0),gt(""),E({type:"create_codespace",payload:{repo:H}})},[E,c]);return{connected:c,environments:f,sessions:p,events:S,lastSpawnedId:_,projects:R,tasks:X,findings:J,tokens:k,taskDiff:G,spawn:q,sendInput:et,kill:yt,refresh:St,loadSessionEvents:Gt,clearEvents:Ct,createProject:mt,archiveProject:Ht,loadTasks:de,createTask:Ne,startTask:Ie,approveTask:sn,rejectTask:ke,deleteTask:Sn,loadFindings:Xe,postFinding:Ke,loadTaskDiff:bn,addEnvironment:K,loadTokens:we,setToken:Ze,deleteToken:ln,provisionStatus:B,provisionEnvironment:at,stopEnvironment:$,removeEnvironment:Q,codespaces:ct,codespaceError:ft,codespaceCreating:Dt,listCodespaces:bt,createCodespace:Ot}}const Kc=x.createContext(void 0);function pS({children:a}){const s=mS();return y.jsx(Kc.Provider,{value:s,children:a})}function aa(){const a=x.useContext(Kc);if(!a)throw new Error("useGrackle must be used within GrackleProvider");return a}const vS=[{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}],gS=[{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"}],yS=[{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"}],SS=[{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"}],bS=[{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},{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},{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},{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},{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},{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},{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},{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},{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},{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},{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},{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},{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},{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},{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},{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},{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}],Rp=[{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"}],TS=[{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:""}];function me(a){return new Date(Date.now()+a).toISOString()}const kp=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:me(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:me(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:me(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:me(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:me(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:me(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:me(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:me(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:me(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:me(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:me(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:me(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:me(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:me(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:me(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:me(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:me(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:me(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:me(3500),content:"failed"}}]}],hc={taskId:"task-001",branch:"feat/jwt-auth",changedFiles:["src/middleware/auth.ts","src/routes/login.ts","src/routes/protected.ts","package.json","tests/auth.test.ts"],additions:87,deletions:34,diff:`diff --git a/src/middleware/auth.ts b/src/middleware/auth.ts
|
|
68
|
+
index 1a2b3c4..5e6f7g8 100644
|
|
69
|
+
--- a/src/middleware/auth.ts
|
|
70
|
+
+++ b/src/middleware/auth.ts
|
|
71
|
+
@@ -1,18 +1,26 @@
|
|
72
|
+
-import session from "express-session";
|
|
73
|
+
-import type { Request, Response, NextFunction } from "express";
|
|
74
|
+
+import jwt from "jsonwebtoken";
|
|
75
|
+
+import type { Request, Response, NextFunction } from "express";
|
|
76
|
+
+
|
|
77
|
+
+const JWT_SECRET: string = process.env.JWT_SECRET || "change-me";
|
|
78
|
+
+const TOKEN_EXPIRY: string = "24h";
|
|
79
|
+
|
|
80
|
+
-export function requireSession(req: Request, res: Response, next: NextFunction): void {
|
|
81
|
+
- if (!req.session?.userId) {
|
|
82
|
+
- res.status(401).json({ message: "Not authenticated" });
|
|
83
|
+
+export function verifyToken(req: Request, res: Response, next: NextFunction): void {
|
|
84
|
+
+ const header = req.headers.authorization;
|
|
85
|
+
+ if (!header?.startsWith("Bearer ")) {
|
|
86
|
+
+ res.status(401).json({ error: "Missing token", code: "AUTH_MISSING" });
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
- next();
|
|
90
|
+
+ try {
|
|
91
|
+
+ const decoded = jwt.verify(header.slice(7), JWT_SECRET);
|
|
92
|
+
+ req.user = decoded;
|
|
93
|
+
+ next();
|
|
94
|
+
+ } catch {
|
|
95
|
+
+ res.status(403).json({ error: "Invalid token", code: "AUTH_INVALID" });
|
|
96
|
+
+ }
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
diff --git a/src/routes/login.ts b/src/routes/login.ts
|
|
100
|
+
index 2b3c4d5..8f9a0b1 100644
|
|
101
|
+
--- a/src/routes/login.ts
|
|
102
|
+
+++ b/src/routes/login.ts
|
|
103
|
+
@@ -1,12 +1,22 @@
|
|
104
|
+
import { Router } from "express";
|
|
105
|
+
+import jwt from "jsonwebtoken";
|
|
106
|
+
import { findUserByEmail, verifyPassword } from "../services/users.js";
|
|
107
|
+
|
|
108
|
+
+const JWT_SECRET: string = process.env.JWT_SECRET || "change-me";
|
|
109
|
+
+const TOKEN_EXPIRY: string = "24h";
|
|
110
|
+
+
|
|
111
|
+
const router = Router();
|
|
112
|
+
|
|
113
|
+
router.post("/login", async (req, res) => {
|
|
114
|
+
const { email, password } = req.body;
|
|
115
|
+
const user = await findUserByEmail(email);
|
|
116
|
+
- if (!user || !verifyPassword(password, user.passwordHash)) {
|
|
117
|
+
- return res.status(401).json({ message: "Invalid credentials" });
|
|
118
|
+
+ if (!user || !await verifyPassword(password, user.passwordHash)) {
|
|
119
|
+
+ return res.status(401).json({ error: "Invalid credentials", code: "AUTH_FAILED" });
|
|
120
|
+
}
|
|
121
|
+
- req.session.userId = user.id;
|
|
122
|
+
- res.json({ ok: true });
|
|
123
|
+
+ const token = jwt.sign(
|
|
124
|
+
+ { sub: user.id, email: user.email, role: user.role },
|
|
125
|
+
+ JWT_SECRET,
|
|
126
|
+
+ { expiresIn: TOKEN_EXPIRY }
|
|
127
|
+
+ );
|
|
128
|
+
+ res.json({ token, expiresIn: TOKEN_EXPIRY });
|
|
129
|
+
});`},wp=400,_S=600;function xS({children:a}){const[s,o]=x.useState(gS),[r,c]=x.useState(yS),[h,f]=x.useState(void 0),[m,p]=x.useState(SS),[g,S]=x.useState(bS),[b,_]=x.useState(Rp),[N,R]=x.useState(TS),[w,X]=x.useState(hc),I=x.useRef(0),J=x.useRef(0),L=x.useRef(new Set),k=x.useRef(new Map),Y=x.useRef(g);Y.current=g;const G=x.useRef(new Map),F=x.useRef(new Map),B=x.useCallback(K=>(I.current+=1,`mock-${K}-${String(I.current).padStart(3,"0")}`),[]),nt=x.useCallback(()=>{const K=kp[J.current%kp.length];return J.current+=1,K},[]),ct=x.useCallback((K,at,$)=>{const Q=setTimeout(()=>{var bt;L.current.delete(Q),$&&((bt=k.current.get($))==null||bt.delete(Q)),K()},at);L.current.add(Q),$&&(k.current.has($)||k.current.set($,new Set),k.current.get($).add(Q))},[]),st=x.useCallback(K=>{const at=k.current.get(K);at&&(at.forEach($=>{clearTimeout($),L.current.delete($)}),k.current.delete(K))},[]),ft=x.useCallback((K,at)=>{o($=>$.map(Q=>Q.id===K?{...Q,status:at}:Q))},[]),gt=x.useCallback(K=>{c(at=>[...at,K])},[]),Dt=x.useCallback((K,at,$)=>{at.forEach((Q,bt)=>{ct(()=>{const Ot={sessionId:K,...Q.event,timestamp:new Date().toISOString()};gt(Ot),Q.event.eventType==="status"&&ft(K,Q.event.content),bt===at.length-1&&$&&$()},Q.delayMs,K)})},[ct,gt,ft]),Yt=x.useCallback((K,at,$,Q)=>{console.log("[MockGrackle] spawn",{environmentId:K,prompt:at,runtime:Q});const bt=B("sess"),Ot={id:bt,environmentId:K,runtime:Q||"claude-code",status:"running",prompt:at,startedAt:new Date().toISOString()};o(P=>[...P,Ot]),f(bt);const H=nt();if(console.log(`[MockGrackle] Playing scenario: ${H.label}`),H.pauseForInput){const P=H.pauseAfterStep??H.steps.length-1,Z=H.steps.slice(0,P+1),Tt=Z.length>0?Z[Z.length-1].delayMs:0;Dt(bt,Z),ct(()=>{ft(bt,"waiting_input"),gt({sessionId:bt,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},Tt+wp,bt),H.resumeSteps&&G.current.set(bt,H.resumeSteps)}else Dt(bt,H.steps)},[B,nt,Dt,ct,ft,gt]),E=x.useCallback(K=>{console.log("[MockGrackle] kill",K),st(K),G.current.delete(K),ft(K,"killed"),gt({sessionId:K,eventType:"status",timestamp:new Date().toISOString(),content:"killed"}),S(at=>at.map($=>$.sessionId===K&&$.status==="in_progress"?{...$,status:"failed"}:$))},[st,ft,gt]),q=x.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),et=x.useCallback(K=>{console.log("[MockGrackle] loadSessionEvents",K)},[]),yt=x.useCallback(()=>{console.log("[MockGrackle] clearEvents"),c([])},[]),St=x.useCallback((K,at,$,Q)=>{console.log("[MockGrackle] createProject",{name:K,description:at});const bt={id:B("proj"),name:K,description:at||"",repoUrl:$||"",defaultEnvironmentId:Q||"",status:"active",createdAt:new Date().toISOString()};p(Ot=>[...Ot,bt])},[B]),Gt=x.useCallback(K=>{console.log("[MockGrackle] archiveProject",K),p(at=>at.map($=>$.id===K?{...$,status:"archived"}:$))},[]),Ct=x.useCallback(K=>{console.log("[MockGrackle] loadTasks",K)},[]),mt=x.useCallback((K,at,$,Q,bt,Ot)=>{console.log("[MockGrackle] createTask",{projectId:K,title:at,parentTaskId:Ot}),S(H=>{const Z=H.filter(De=>De.projectId===K).reduce((De,ie)=>Math.max(De,ie.sortOrder),0),Tt=Ot?H.find(De=>De.id===Ot):void 0;if(Ot&&!Tt)return console.warn("[MockGrackle] Parent task not found:",Ot),H;if(Tt&&!Tt.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",Ot),H;const kt=Tt?Tt.depth+1:0,dt={id:B("task"),projectId:K,title:at,description:$||"",status:"pending",branch:"",environmentId:Q||"",sessionId:"",dependsOn:bt||[],reviewNotes:"",sortOrder:Z+1,createdAt:new Date().toISOString(),parentTaskId:Ot||"",depth:kt,childTaskIds:[],canDecompose:!Ot};return[...H,dt]})},[B]),Ht=x.useCallback((K,at,$)=>{var Tt;console.log("[MockGrackle] startTask",{taskId:K,runtime:at});const Q=Y.current.find(kt=>kt.id===K),bt=(Q==null?void 0:Q.environmentId)??"",Ot=(Q==null?void 0:Q.title)??"",H=B("sess"),P={id:H,environmentId:bt||"env-local-01",runtime:at||"claude-code",status:"running",prompt:Ot||K,startedAt:new Date().toISOString()};o(kt=>[...kt,P]),S(kt=>kt.map(dt=>dt.id===K?{...dt,status:"in_progress",sessionId:H,branch:`mock/${K.slice(0,8)}`}:dt));const Z=nt();if(console.log(`[MockGrackle] Playing task scenario: ${Z.label}`),Z.pauseForInput){const kt=Z.pauseAfterStep??Z.steps.length-1,dt=Z.steps.slice(0,kt+1),De=dt.length>0?dt[dt.length-1].delayMs:0;if(Dt(H,dt),ct(()=>{ft(H,"waiting_input"),gt({sessionId:H,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},De+wp,H),Z.resumeSteps){const ie=[...Z.resumeSteps];G.current.set(H,ie);const di=ie.reduce((hi,Dn)=>Math.max(hi,Dn.delayMs),0);F.current.set(H,{taskId:K,delayAfterResume:di+200})}}else{const kt=Z.steps.length>0?Z.steps[Z.steps.length-1].delayMs:0;Dt(H,Z.steps);const dt=(Tt=Z.steps[Z.steps.length-1])==null?void 0:Tt.event.content;ct(()=>{dt==="completed"?S(De=>De.map(ie=>ie.id===K&&ie.status==="in_progress"?{...ie,status:"review"}:ie)):dt==="failed"&&S(De=>De.map(ie=>ie.id===K&&ie.status==="in_progress"?{...ie,status:"failed"}:ie))},kt+100,H)}},[B,nt,Dt,ct,ft,gt]),de=x.useCallback((K,at)=>{console.log("[MockGrackle] sendInput",{sessionId:K,text:at}),gt({sessionId:K,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${at}`}),ft(K,"running"),gt({sessionId:K,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const $=G.current.get(K);if($)G.current.delete(K),Dt(K,$);else{const bt=[{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"}}];Dt(K,bt)}const Q=F.current.get(K);Q&&(F.current.delete(K),ct(()=>{S(bt=>bt.map(Ot=>Ot.id===Q.taskId&&Ot.status==="in_progress"?{...Ot,status:"review"}:Ot))},Q.delayAfterResume,K))},[gt,ft,Dt,ct]),Ne=x.useCallback(K=>{console.log("[MockGrackle] approveTask",K),S(at=>at.map($=>$.id===K?{...$,status:"done"}:$))},[]),Ie=x.useCallback((K,at)=>{console.log("[MockGrackle] rejectTask",{taskId:K,reviewNotes:at}),S($=>$.map(Q=>Q.id===K?{...Q,status:"assigned",reviewNotes:at,sessionId:""}:Q))},[]),sn=x.useCallback(K=>{console.log("[MockGrackle] deleteTask",K),S(at=>at.filter($=>$.id!==K))},[]),ke=x.useCallback(K=>{console.log("[MockGrackle] loadFindings",K),_(Rp.filter(at=>at.projectId===K))},[]),Sn=x.useCallback((K,at,$,Q,bt)=>{console.log("[MockGrackle] postFinding",{projectId:K,title:at});const Ot={id:B("find"),projectId:K,taskId:"",sessionId:"",category:Q||"general",title:at,content:$,tags:bt||[],createdAt:new Date().toISOString()};_(H=>[...H,Ot])},[B]),Xe=x.useCallback((K,at,$,Q)=>{console.log("[MockGrackle] addEnvironment",{displayName:K,adapterType:at,adapterConfig:$,defaultRuntime:Q})},[]),Ke=x.useCallback(K=>{console.log("[MockGrackle] loadTaskDiff",K),X(void 0);const at=setTimeout(()=>{L.current.delete(at),hc.taskId===K?X(hc):X({taskId:K,error:"No diff available for this task in mock mode."})},_S);L.current.add(at)},[]),bn=x.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),we=x.useCallback((K,at,$,Q,bt)=>{console.log("[MockGrackle] setToken",{name:K,tokenType:$}),R(Ot=>[...Ot.filter(P=>P.name!==K),{name:K,tokenType:$,envVar:Q,filePath:bt,expiresAt:""}])},[]),Ze=x.useCallback(K=>{console.log("[MockGrackle] deleteToken",K),R(at=>at.filter($=>$.name!==K))},[]);x.useEffect(()=>()=>{L.current.forEach(clearTimeout),L.current.clear()},[]);const ln=x.useMemo(()=>({connected:!0,environments:vS,sessions:s,events:r,lastSpawnedId:h,projects:m,tasks:g,findings:b,tokens:N,taskDiff:w,spawn:Yt,sendInput:de,kill:E,refresh:q,loadSessionEvents:et,clearEvents:yt,createProject:St,archiveProject:Gt,loadTasks:Ct,createTask:mt,startTask:Ht,approveTask:Ne,rejectTask:Ie,deleteTask:sn,loadFindings:ke,postFinding:Sn,loadTaskDiff:Ke,addEnvironment:Xe,loadTokens:bn,setToken:we,deleteToken:Ze,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{}}),[s,r,h,m,g,b,N,w,Yt,de,E,q,et,yt,St,Gt,Ct,mt,Ht,Ne,Ie,sn,ke,Sn,Ke,Xe,bn,we,Ze]);return y.jsx(Kc.Provider,{value:ln,children:a})}const ES="_container_ew76q_1",AS="_brand_ew76q_26",NS="_info_ew76q_34",DS="_connectionDot_ew76q_41",CS="_connected_ew76q_44",jS="_disconnected_ew76q_48",MS="_settingsButton_ew76q_52",ai={container:ES,brand:AS,info:NS,connectionDot:DS,connected:CS,disconnected:jS,settingsButton:MS};function OS({setViewMode:a}){const{connected:s,environments:o,sessions:r}=aa(),c=o.length,h=o.filter(m=>m.status==="connected").length,f=r.filter(m=>["running","waiting_input"].includes(m.status)).length;return y.jsxs("div",{className:ai.container,children:[y.jsx("div",{className:ai.brand,children:"Grackle"}),y.jsxs("div",{className:ai.info,children:[y.jsxs("span",{children:[y.jsx("span",{className:`${ai.connectionDot} ${s?ai.connected:ai.disconnected}`,children:"●"})," ",s?"Connected":"Disconnected"]}),y.jsxs("span",{children:[h,"/",c," env",c!==1?"s":""]}),y.jsxs("span",{children:[f," active"]}),a&&y.jsx("button",{className:ai.settingsButton,onClick:()=>a({kind:"settings"}),title:"Settings",children:"⚙"})]})]})}const RS="_container_14p5s_1",kS="_header_14p5s_5",wS="_addButton_14p5s_17",zS="_emptyState_14p5s_35",BS="_envRow_14p5s_41",US="_targeted_14p5s_55",VS="_expanded_14p5s_58",LS="_statusDot_14p5s_62",GS="_pulse_14p5s_65",HS="_envName_14p5s_69",qS="_envActions_14p5s_73",YS="_idleLabel_14p5s_80",IS="_newChatButton_14p5s_85",XS="_envActionsRow_14p5s_103",KS="_connectButton_14p5s_111",ZS="_stopButton_14p5s_128",QS="_deleteButton_14p5s_145",FS="_provisionMessage_14p5s_163",JS="_errorMessage_14p5s_170",PS="_sessionRow_14p5s_177",WS="_selected_14p5s_195",$S="_sessionDot_14p5s_202",$t={container:RS,header:kS,addButton:wS,emptyState:zS,envRow:BS,targeted:US,expanded:VS,statusDot:LS,pulse:GS,envName:HS,envActions:qS,idleLabel:YS,newChatButton:IS,envActionsRow:XS,connectButton:KS,stopButton:ZS,deleteButton:QS,provisionMessage:FS,errorMessage:JS,sessionRow:PS,selected:WS,sessionDot:$S},tb={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"};function eb({status:a}){const s=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 y.jsx("span",{className:$t.sessionDot,style:{color:s},children:"●"})}function nb({env:a,envSessions:s,selectedSessionId:o,isNewChatTarget:r,expanded:c,onToggleExpand:h,provisionProgress:f,onProvision:m,onStop:p,onRemove:g,setViewMode:S}){const b=tb[a.status]||"var(--text-tertiary)",_=a.status==="connected",N=a.status==="connecting",R=a.status==="disconnected"||a.status==="error";return y.jsxs("div",{children:[y.jsxs("div",{className:`${$t.envRow} ${r?$t.targeted:""} ${c?$t.expanded:""}`,onClick:h,children:[y.jsx("span",{className:`${$t.statusDot} ${_?$t.pulse:""}`,style:{color:b},children:"●"}),y.jsx("span",{className:$t.envName,children:a.displayName||a.id}),y.jsxs("span",{className:$t.envActions,children:[s.length===0&&!r&&!c&&y.jsx("span",{className:$t.idleLabel,children:"(idle)"}),_&&y.jsx("button",{onClick:w=>{w.stopPropagation(),S({kind:"new_chat",environmentId:a.id,runtime:a.defaultRuntime||"claude-code"})},title:"New chat",className:$t.newChatButton,children:"+"})]})]}),c&&y.jsxs("div",{className:$t.envActionsRow,children:[N&&f&&y.jsx("span",{className:$t.provisionMessage,children:f.message}),a.status==="error"&&(f==null?void 0:f.stage)==="error"&&y.jsx("span",{className:$t.errorMessage,children:f.message}),R&&y.jsx("button",{onClick:w=>{w.stopPropagation(),m(a.id)},className:$t.connectButton,children:a.status==="error"?"Retry":"Connect"}),_&&y.jsx("button",{onClick:w=>{w.stopPropagation(),p(a.id)},className:$t.stopButton,children:"Stop"}),!N&&y.jsx("button",{onClick:w=>{w.stopPropagation(),window.confirm(`Delete environment "${a.displayName||a.id}"? This destroys the workspace and removes all data.`)&&g(a.id)},className:$t.deleteButton,children:"Delete"})]}),s.map(w=>y.jsxs("div",{onClick:()=>S({kind:"session",sessionId:w.id}),className:`${$t.sessionRow} ${o===w.id?$t.selected:""}`,children:[y.jsx(eb,{status:w.status})," ",w.prompt.length>24?w.prompt.slice(0,24)+"...":w.prompt]},w.id))]})}function ab({viewMode:a,setViewMode:s}){const{environments:o,sessions:r,provisionStatus:c,provisionEnvironment:h,stopEnvironment:f,removeEnvironment:m}=aa(),[p,g]=x.useState(null),S=a.kind==="session"?a.sessionId:void 0,b=a.kind==="new_chat"?a.environmentId:void 0;return y.jsxs("div",{className:$t.container,children:[y.jsxs("div",{className:$t.header,children:["Environments",y.jsx("button",{className:$t.addButton,onClick:()=>s({kind:"new_environment"}),title:"Add environment","aria-label":"Add environment",children:"+"})]}),o.length===0&&y.jsx("div",{className:$t.emptyState,children:"No environments. Click + to add one."}),o.map(_=>{const N=r.filter(R=>R.environmentId===_.id);return y.jsx(nb,{env:_,envSessions:N,selectedSessionId:S,isNewChatTarget:b===_.id,expanded:p===_.id,onToggleExpand:()=>g(p===_.id?null:_.id),provisionProgress:c[_.id],onProvision:h,onStop:f,onRemove:m,setViewMode:s},_.id)})]})}const Zc=x.createContext({});function Qc(a){const s=x.useRef(null);return s.current===null&&(s.current=a()),s.current}const Zo=x.createContext(null),Fc=x.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});class ib extends x.Component{getSnapshotBeforeUpdate(s){const o=this.props.childRef.current;if(o&&s.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=o.offsetHeight||0,r.width=o.offsetWidth||0,r.top=o.offsetTop,r.left=o.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function sb({children:a,isPresent:s}){const o=x.useId(),r=x.useRef(null),c=x.useRef({width:0,height:0,top:0,left:0}),{nonce:h}=x.useContext(Fc);return x.useInsertionEffect(()=>{const{width:f,height:m,top:p,left:g}=c.current;if(s||!r.current||!f||!m)return;r.current.dataset.motionPopId=o;const S=document.createElement("style");return h&&(S.nonce=h),document.head.appendChild(S),S.sheet&&S.sheet.insertRule(`
|
|
130
|
+
[data-motion-pop-id="${o}"] {
|
|
131
|
+
position: absolute !important;
|
|
132
|
+
width: ${f}px !important;
|
|
133
|
+
height: ${m}px !important;
|
|
134
|
+
top: ${p}px !important;
|
|
135
|
+
left: ${g}px !important;
|
|
136
|
+
}
|
|
137
|
+
`),()=>{document.head.removeChild(S)}},[s]),y.jsx(ib,{isPresent:s,childRef:r,sizeRef:c,children:x.cloneElement(a,{ref:r})})}const lb=({children:a,initial:s,isPresent:o,onExitComplete:r,custom:c,presenceAffectsLayout:h,mode:f})=>{const m=Qc(ob),p=x.useId(),g=x.useCallback(b=>{m.set(b,!0);for(const _ of m.values())if(!_)return;r&&r()},[m,r]),S=x.useMemo(()=>({id:p,initial:s,isPresent:o,custom:c,onExitComplete:g,register:b=>(m.set(b,!1),()=>m.delete(b))}),h?[Math.random(),g]:[o,g]);return x.useMemo(()=>{m.forEach((b,_)=>m.set(_,!1))},[o]),x.useEffect(()=>{!o&&!m.size&&r&&r()},[o]),f==="popLayout"&&(a=y.jsx(sb,{isPresent:o,children:a})),y.jsx(Zo.Provider,{value:S,children:a})};function ob(){return new Map}function av(a=!0){const s=x.useContext(Zo);if(s===null)return[!0,null];const{isPresent:o,onExitComplete:r,register:c}=s,h=x.useId();x.useEffect(()=>{a&&c(h)},[a]);const f=x.useCallback(()=>a&&r&&r(h),[h,r,a]);return!o&&r?[!1,f]:[!0]}const Ro=a=>a.key||"";function zp(a){const s=[];return x.Children.forEach(a,o=>{x.isValidElement(o)&&s.push(o)}),s}const Jc=typeof window<"u",iv=Jc?x.useLayoutEffect:x.useEffect,Pc=({children:a,custom:s,initial:o=!0,onExitComplete:r,presenceAffectsLayout:c=!0,mode:h="sync",propagate:f=!1})=>{const[m,p]=av(f),g=x.useMemo(()=>zp(a),[a]),S=f&&!m?[]:g.map(Ro),b=x.useRef(!0),_=x.useRef(g),N=Qc(()=>new Map),[R,w]=x.useState(g),[X,I]=x.useState(g);iv(()=>{b.current=!1,_.current=g;for(let k=0;k<X.length;k++){const Y=Ro(X[k]);S.includes(Y)?N.delete(Y):N.get(Y)!==!0&&N.set(Y,!1)}},[X,S.length,S.join("-")]);const J=[];if(g!==R){let k=[...g];for(let Y=0;Y<X.length;Y++){const G=X[Y],F=Ro(G);S.includes(F)||(k.splice(Y,0,G),J.push(G))}h==="wait"&&J.length&&(k=J),I(zp(k)),w(g);return}const{forceRender:L}=x.useContext(Zc);return y.jsx(y.Fragment,{children:X.map(k=>{const Y=Ro(k),G=f&&!m?!1:g===X||S.includes(Y),F=()=>{if(N.has(Y))N.set(Y,!0);else return;let B=!0;N.forEach(nt=>{nt||(B=!1)}),B&&(L==null||L(),I(_.current),f&&(p==null||p()),r&&r())};return y.jsx(lb,{isPresent:G,initial:!b.current||o?void 0:!1,custom:G?void 0:s,presenceAffectsLayout:c,mode:h,onExitComplete:G?void 0:F,children:k},Y)})})},nn=a=>a;let sv=nn;const rb={useManualTiming:!1};function ub(a){let s=new Set,o=new Set,r=!1,c=!1;const h=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function m(g){h.has(g)&&(p.schedule(g),a()),g(f)}const p={schedule:(g,S=!1,b=!1)=>{const N=b&&r?s:o;return S&&h.add(g),N.has(g)||N.add(g),g},cancel:g=>{o.delete(g),h.delete(g)},process:g=>{if(f=g,r){c=!0;return}r=!0,[s,o]=[o,s],s.forEach(m),s.clear(),r=!1,c&&(c=!1,p.process(g))}};return p}const ko=["read","resolveKeyframes","update","preRender","render","postRender"],cb=40;function lv(a,s){let o=!1,r=!0;const c={delta:0,timestamp:0,isProcessing:!1},h=()=>o=!0,f=ko.reduce((I,J)=>(I[J]=ub(h),I),{}),{read:m,resolveKeyframes:p,update:g,preRender:S,render:b,postRender:_}=f,N=()=>{const I=performance.now();o=!1,c.delta=r?1e3/60:Math.max(Math.min(I-c.timestamp,cb),1),c.timestamp=I,c.isProcessing=!0,m.process(c),p.process(c),g.process(c),S.process(c),b.process(c),_.process(c),c.isProcessing=!1,o&&s&&(r=!1,a(N))},R=()=>{o=!0,r=!0,c.isProcessing||a(N)};return{schedule:ko.reduce((I,J)=>{const L=f[J];return I[J]=(k,Y=!1,G=!1)=>(o||R(),L.schedule(k,Y,G)),I},{}),cancel:I=>{for(let J=0;J<ko.length;J++)f[ko[J]].cancel(I)},state:c,steps:f}}const{schedule:Qt,cancel:Ra,state:Ae,steps:mc}=lv(typeof requestAnimationFrame<"u"?requestAnimationFrame:nn,!0),ov=x.createContext({strict:!1}),Bp={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"]},as={};for(const a in Bp)as[a]={isEnabled:s=>Bp[a].some(o=>!!s[o])};function fb(a){for(const s in a)as[s]={...as[s],...a[s]}}const db=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 Lo(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||db.has(a)}let rv=a=>!Lo(a);function hb(a){a&&(rv=s=>s.startsWith("on")?!Lo(s):a(s))}try{hb(require("@emotion/is-prop-valid").default)}catch{}function mb(a,s,o){const r={};for(const c in a)c==="values"&&typeof a.values=="object"||(rv(c)||o===!0&&Lo(c)||!s&&!Lo(c)||a.draggable&&c.startsWith("onDrag"))&&(r[c]=a[c]);return r}function pb(a){if(typeof Proxy>"u")return a;const s=new Map,o=(...r)=>a(...r);return new Proxy(o,{get:(r,c)=>c==="create"?a:(s.has(c)||s.set(c,a(c)),s.get(c))})}const Qo=x.createContext({});function ll(a){return typeof a=="string"||Array.isArray(a)}function Fo(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}const Wc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$c=["initial",...Wc];function Jo(a){return Fo(a.animate)||$c.some(s=>ll(a[s]))}function uv(a){return!!(Jo(a)||a.variants)}function vb(a,s){if(Jo(a)){const{initial:o,animate:r}=a;return{initial:o===!1||ll(o)?o:void 0,animate:ll(r)?r:void 0}}return a.inherit!==!1?s:{}}function gb(a){const{initial:s,animate:o}=vb(a,x.useContext(Qo));return x.useMemo(()=>({initial:s,animate:o}),[Up(s),Up(o)])}function Up(a){return Array.isArray(a)?a.join(" "):a}const yb=Symbol.for("motionComponentSymbol");function Wi(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function Sb(a,s,o){return x.useCallback(r=>{r&&a.onMount&&a.onMount(r),s&&(r?s.mount(r):s.unmount()),o&&(typeof o=="function"?o(r):Wi(o)&&(o.current=r))},[s])}const tf=a=>a.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),bb="framerAppearId",cv="data-"+tf(bb),{schedule:ef}=lv(queueMicrotask,!1),fv=x.createContext({});function Tb(a,s,o,r,c){var h,f;const{visualElement:m}=x.useContext(Qo),p=x.useContext(ov),g=x.useContext(Zo),S=x.useContext(Fc).reducedMotion,b=x.useRef(null);r=r||p.renderer,!b.current&&r&&(b.current=r(a,{visualState:s,parent:m,props:o,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:S}));const _=b.current,N=x.useContext(fv);_&&!_.projection&&c&&(_.type==="html"||_.type==="svg")&&_b(b.current,o,c,N);const R=x.useRef(!1);x.useInsertionEffect(()=>{_&&R.current&&_.update(o,g)});const w=o[cv],X=x.useRef(!!w&&!(!((h=window.MotionHandoffIsComplete)===null||h===void 0)&&h.call(window,w))&&((f=window.MotionHasOptimisedAnimation)===null||f===void 0?void 0:f.call(window,w)));return iv(()=>{_&&(R.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),ef.render(_.render),X.current&&_.animationState&&_.animationState.animateChanges())}),x.useEffect(()=>{_&&(!X.current&&_.animationState&&_.animationState.animateChanges(),X.current&&(queueMicrotask(()=>{var I;(I=window.MotionHandoffMarkAsComplete)===null||I===void 0||I.call(window,w)}),X.current=!1))}),_}function _b(a,s,o,r){const{layoutId:c,layout:h,drag:f,dragConstraints:m,layoutScroll:p,layoutRoot:g}=s;a.projection=new o(a.latestValues,s["data-framer-portal-id"]?void 0:dv(a.parent)),a.projection.setOptions({layoutId:c,layout:h,alwaysMeasureLayout:!!f||m&&Wi(m),visualElement:a,animationType:typeof h=="string"?h:"both",initialPromotionConfig:r,layoutScroll:p,layoutRoot:g})}function dv(a){if(a)return a.options.allowProjection!==!1?a.projection:dv(a.parent)}function xb({preloadedFeatures:a,createVisualElement:s,useRender:o,useVisualState:r,Component:c}){var h,f;a&&fb(a);function m(g,S){let b;const _={...x.useContext(Fc),...g,layoutId:Eb(g)},{isStatic:N}=_,R=gb(g),w=r(g,N);if(!N&&Jc){Ab();const X=Nb(_);b=X.MeasureLayout,R.visualElement=Tb(c,w,_,s,X.ProjectionNode)}return y.jsxs(Qo.Provider,{value:R,children:[b&&R.visualElement?y.jsx(b,{visualElement:R.visualElement,..._}):null,o(c,g,Sb(w,R.visualElement,S),w,N,R.visualElement)]})}m.displayName=`motion.${typeof c=="string"?c:`create(${(f=(h=c.displayName)!==null&&h!==void 0?h:c.name)!==null&&f!==void 0?f:""})`}`;const p=x.forwardRef(m);return p[yb]=c,p}function Eb({layoutId:a}){const s=x.useContext(Zc).id;return s&&a!==void 0?s+"-"+a:a}function Ab(a,s){x.useContext(ov).strict}function Nb(a){const{drag:s,layout:o}=as;if(!s&&!o)return{};const r={...s,...o};return{MeasureLayout:s!=null&&s.isEnabled(a)||o!=null&&o.isEnabled(a)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Db=["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 nf(a){return typeof a!="string"||a.includes("-")?!1:!!(Db.indexOf(a)>-1||/[A-Z]/u.test(a))}function Vp(a){const s=[{},{}];return a==null||a.values.forEach((o,r)=>{s[0][r]=o.get(),s[1][r]=o.getVelocity()}),s}function af(a,s,o,r){if(typeof s=="function"){const[c,h]=Vp(r);s=s(o!==void 0?o:a.custom,c,h)}if(typeof s=="string"&&(s=a.variants&&a.variants[s]),typeof s=="function"){const[c,h]=Vp(r);s=s(o!==void 0?o:a.custom,c,h)}return s}const jc=a=>Array.isArray(a),Cb=a=>!!(a&&typeof a=="object"&&a.mix&&a.toValue),jb=a=>jc(a)?a[a.length-1]||0:a,Re=a=>!!(a&&a.getVelocity);function Bo(a){const s=Re(a)?a.get():a;return Cb(s)?s.toValue():s}function Mb({scrapeMotionValuesFromProps:a,createRenderState:s,onUpdate:o},r,c,h){const f={latestValues:Ob(r,c,h,a),renderState:s()};return o&&(f.onMount=m=>o({props:r,current:m,...f}),f.onUpdate=m=>o(m)),f}const hv=a=>(s,o)=>{const r=x.useContext(Qo),c=x.useContext(Zo),h=()=>Mb(a,s,r,c);return o?h():Qc(h)};function Ob(a,s,o,r){const c={},h=r(a,{});for(const _ in h)c[_]=Bo(h[_]);let{initial:f,animate:m}=a;const p=Jo(a),g=uv(a);s&&g&&!p&&a.inherit!==!1&&(f===void 0&&(f=s.initial),m===void 0&&(m=s.animate));let S=o?o.initial===!1:!1;S=S||f===!1;const b=S?m:f;if(b&&typeof b!="boolean"&&!Fo(b)){const _=Array.isArray(b)?b:[b];for(let N=0;N<_.length;N++){const R=af(a,_[N]);if(R){const{transitionEnd:w,transition:X,...I}=R;for(const J in I){let L=I[J];if(Array.isArray(L)){const k=S?L.length-1:0;L=L[k]}L!==null&&(c[J]=L)}for(const J in w)c[J]=w[J]}}}return c}const ls=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fi=new Set(ls),mv=a=>s=>typeof s=="string"&&s.startsWith(a),pv=mv("--"),Rb=mv("var(--"),sf=a=>Rb(a)?kb.test(a.split("/*")[0].trim()):!1,kb=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,vv=(a,s)=>s&&typeof a=="number"?s.transform(a):a,na=(a,s,o)=>o>s?s:o<a?a:o,os={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},ol={...os,transform:a=>na(0,1,a)},wo={...os,default:1},fl=a=>({test:s=>typeof s=="string"&&s.endsWith(a)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${a}`}),ja=fl("deg"),wn=fl("%"),ut=fl("px"),wb=fl("vh"),zb=fl("vw"),Lp={...wn,parse:a=>wn.parse(a)/100,transform:a=>wn.transform(a*100)},Bb={borderWidth:ut,borderTopWidth:ut,borderRightWidth:ut,borderBottomWidth:ut,borderLeftWidth:ut,borderRadius:ut,radius:ut,borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomRightRadius:ut,borderBottomLeftRadius:ut,width:ut,maxWidth:ut,height:ut,maxHeight:ut,top:ut,right:ut,bottom:ut,left:ut,padding:ut,paddingTop:ut,paddingRight:ut,paddingBottom:ut,paddingLeft:ut,margin:ut,marginTop:ut,marginRight:ut,marginBottom:ut,marginLeft:ut,backgroundPositionX:ut,backgroundPositionY:ut},Ub={rotate:ja,rotateX:ja,rotateY:ja,rotateZ:ja,scale:wo,scaleX:wo,scaleY:wo,scaleZ:wo,skew:ja,skewX:ja,skewY:ja,distance:ut,translateX:ut,translateY:ut,translateZ:ut,x:ut,y:ut,z:ut,perspective:ut,transformPerspective:ut,opacity:ol,originX:Lp,originY:Lp,originZ:ut},Gp={...os,transform:Math.round},lf={...Bb,...Ub,zIndex:Gp,size:ut,fillOpacity:ol,strokeOpacity:ol,numOctaves:Gp},Vb={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Lb=ls.length;function Gb(a,s,o){let r="",c=!0;for(let h=0;h<Lb;h++){const f=ls[h],m=a[f];if(m===void 0)continue;let p=!0;if(typeof m=="number"?p=m===(f.startsWith("scale")?1:0):p=parseFloat(m)===0,!p||o){const g=vv(m,lf[f]);if(!p){c=!1;const S=Vb[f]||f;r+=`${S}(${g}) `}o&&(s[f]=g)}}return r=r.trim(),o?r=o(s,c?"":r):c&&(r="none"),r}function of(a,s,o){const{style:r,vars:c,transformOrigin:h}=a;let f=!1,m=!1;for(const p in s){const g=s[p];if(fi.has(p)){f=!0;continue}else if(pv(p)){c[p]=g;continue}else{const S=vv(g,lf[p]);p.startsWith("origin")?(m=!0,h[p]=S):r[p]=S}}if(s.transform||(f||o?r.transform=Gb(s,a.transform,o):r.transform&&(r.transform="none")),m){const{originX:p="50%",originY:g="50%",originZ:S=0}=h;r.transformOrigin=`${p} ${g} ${S}`}}const Hb={offset:"stroke-dashoffset",array:"stroke-dasharray"},qb={offset:"strokeDashoffset",array:"strokeDasharray"};function Yb(a,s,o=1,r=0,c=!0){a.pathLength=1;const h=c?Hb:qb;a[h.offset]=ut.transform(-r);const f=ut.transform(s),m=ut.transform(o);a[h.array]=`${f} ${m}`}function Hp(a,s,o){return typeof a=="string"?a:ut.transform(s+o*a)}function Ib(a,s,o){const r=Hp(s,a.x,a.width),c=Hp(o,a.y,a.height);return`${r} ${c}`}function rf(a,{attrX:s,attrY:o,attrScale:r,originX:c,originY:h,pathLength:f,pathSpacing:m=1,pathOffset:p=0,...g},S,b){if(of(a,g,b),S){a.style.viewBox&&(a.attrs.viewBox=a.style.viewBox);return}a.attrs=a.style,a.style={};const{attrs:_,style:N,dimensions:R}=a;_.transform&&(R&&(N.transform=_.transform),delete _.transform),R&&(c!==void 0||h!==void 0||N.transform)&&(N.transformOrigin=Ib(R,c!==void 0?c:.5,h!==void 0?h:.5)),s!==void 0&&(_.x=s),o!==void 0&&(_.y=o),r!==void 0&&(_.scale=r),f!==void 0&&Yb(_,f,m,p,!1)}const uf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),gv=()=>({...uf(),attrs:{}}),cf=a=>typeof a=="string"&&a.toLowerCase()==="svg";function yv(a,{style:s,vars:o},r,c){Object.assign(a.style,s,c&&c.getProjectionStyles(r));for(const h in o)a.style.setProperty(h,o[h])}const Sv=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 bv(a,s,o,r){yv(a,s,void 0,r);for(const c in s.attrs)a.setAttribute(Sv.has(c)?c:tf(c),s.attrs[c])}const Go={};function Xb(a){Object.assign(Go,a)}function Tv(a,{layout:s,layoutId:o}){return fi.has(a)||a.startsWith("origin")||(s||o!==void 0)&&(!!Go[a]||a==="opacity")}function ff(a,s,o){var r;const{style:c}=a,h={};for(const f in c)(Re(c[f])||s.style&&Re(s.style[f])||Tv(f,a)||((r=o==null?void 0:o.getValue(f))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(h[f]=c[f]);return h}function _v(a,s,o){const r=ff(a,s,o);for(const c in a)if(Re(a[c])||Re(s[c])){const h=ls.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;r[h]=a[c]}return r}function Kb(a,s){try{s.dimensions=typeof a.getBBox=="function"?a.getBBox():a.getBoundingClientRect()}catch{s.dimensions={x:0,y:0,width:0,height:0}}}const qp=["x","y","width","height","cx","cy","r"],Zb={useVisualState:hv({scrapeMotionValuesFromProps:_v,createRenderState:gv,onUpdate:({props:a,prevProps:s,current:o,renderState:r,latestValues:c})=>{if(!o)return;let h=!!a.drag;if(!h){for(const m in c)if(fi.has(m)){h=!0;break}}if(!h)return;let f=!s;if(s)for(let m=0;m<qp.length;m++){const p=qp[m];a[p]!==s[p]&&(f=!0)}f&&Qt.read(()=>{Kb(o,r),Qt.render(()=>{rf(r,c,cf(o.tagName),a.transformTemplate),bv(o,r)})})}})},Qb={useVisualState:hv({scrapeMotionValuesFromProps:ff,createRenderState:uf})};function xv(a,s,o){for(const r in s)!Re(s[r])&&!Tv(r,o)&&(a[r]=s[r])}function Fb({transformTemplate:a},s){return x.useMemo(()=>{const o=uf();return of(o,s,a),Object.assign({},o.vars,o.style)},[s])}function Jb(a,s){const o=a.style||{},r={};return xv(r,o,a),Object.assign(r,Fb(a,s)),r}function Pb(a,s){const o={},r=Jb(a,s);return a.drag&&a.dragListener!==!1&&(o.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)&&(o.tabIndex=0),o.style=r,o}function Wb(a,s,o,r){const c=x.useMemo(()=>{const h=gv();return rf(h,s,cf(r),a.transformTemplate),{...h.attrs,style:{...h.style}}},[s]);if(a.style){const h={};xv(h,a.style,a),c.style={...h,...c.style}}return c}function $b(a=!1){return(o,r,c,{latestValues:h},f)=>{const p=(nf(o)?Wb:Pb)(r,h,f,o),g=mb(r,typeof o=="string",a),S=o!==x.Fragment?{...g,...p,ref:c}:{},{children:b}=r,_=x.useMemo(()=>Re(b)?b.get():b,[b]);return x.createElement(o,{...S,children:_})}}function tT(a,s){return function(r,{forwardMotionProps:c}={forwardMotionProps:!1}){const f={...nf(r)?Zb:Qb,preloadedFeatures:a,useRender:$b(c),createVisualElement:s,Component:r};return xb(f)}}function Ev(a,s){if(!Array.isArray(s))return!1;const o=s.length;if(o!==a.length)return!1;for(let r=0;r<o;r++)if(s[r]!==a[r])return!1;return!0}function Po(a,s,o){const r=a.getProps();return af(r,s,o!==void 0?o:r.custom,a)}function df(a,s){return a?a[s]||a.default||a:void 0}const Av=new Set(["width","height","top","left","right","bottom",...ls]);let Uo;function eT(){Uo=void 0}const zn={now:()=>(Uo===void 0&&zn.set(Ae.isProcessing||rb.useManualTiming?Ae.timestamp:performance.now()),Uo),set:a=>{Uo=a,queueMicrotask(eT)}};function hf(a,s){a.indexOf(s)===-1&&a.push(s)}function mf(a,s){const o=a.indexOf(s);o>-1&&a.splice(o,1)}class pf{constructor(){this.subscriptions=[]}add(s){return hf(this.subscriptions,s),()=>mf(this.subscriptions,s)}notify(s,o,r){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](s,o,r);else for(let h=0;h<c;h++){const f=this.subscriptions[h];f&&f(s,o,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Nv(a,s){return s?a*(1e3/s):0}const Yp=30,nT=a=>!isNaN(parseFloat(a));class aT{constructor(s,o={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,c=!0)=>{const h=zn.now();this.updatedAt!==h&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),c&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(s),this.owner=o.owner}setCurrent(s){this.current=s,this.updatedAt=zn.now(),this.canTrackVelocity===null&&s!==void 0&&(this.canTrackVelocity=nT(this.current))}setPrevFrameValue(s=this.current){this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt}onChange(s){return this.on("change",s)}on(s,o){this.events[s]||(this.events[s]=new pf);const r=this.events[s].add(o);return s==="change"?()=>{r(),Qt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const s in this.events)this.events[s].clear()}attach(s,o){this.passiveEffect=s,this.stopPassiveEffect=o}set(s,o=!0){!o||!this.passiveEffect?this.updateAndNotify(s,o):this.passiveEffect(s,this.updateAndNotify)}setWithVelocity(s,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt-r}jump(s,o=!0){this.updateAndNotify(s),this.prev=s,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const s=zn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||s-this.updatedAt>Yp)return 0;const o=Math.min(this.updatedAt-this.prevUpdatedAt,Yp);return Nv(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(s){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=s(o),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 rl(a,s){return new aT(a,s)}function iT(a,s,o){a.hasValue(s)?a.getValue(s).set(o):a.addValue(s,rl(o))}function sT(a,s){const o=Po(a,s);let{transitionEnd:r={},transition:c={},...h}=o||{};h={...h,...r};for(const f in h){const m=jb(h[f]);iT(a,f,m)}}function lT(a){return!!(Re(a)&&a.add)}function Mc(a,s){const o=a.getValue("willChange");if(lT(o))return o.add(s)}function Dv(a){return a.props[cv]}function vf(a){let s;return()=>(s===void 0&&(s=a()),s)}const oT=vf(()=>window.ScrollTimeline!==void 0);class rT{constructor(s){this.stop=()=>this.runAll("stop"),this.animations=s.filter(Boolean)}get finished(){return Promise.all(this.animations.map(s=>"finished"in s?s.finished:s))}getAll(s){return this.animations[0][s]}setAll(s,o){for(let r=0;r<this.animations.length;r++)this.animations[r][s]=o}attachTimeline(s,o){const r=this.animations.map(c=>{if(oT()&&c.attachTimeline)return c.attachTimeline(s);if(typeof o=="function")return o(c)});return()=>{r.forEach((c,h)=>{c&&c(),this.animations[h].stop()})}}get time(){return this.getAll("time")}set time(s){this.setAll("time",s)}get speed(){return this.getAll("speed")}set speed(s){this.setAll("speed",s)}get startTime(){return this.getAll("startTime")}get duration(){let s=0;for(let o=0;o<this.animations.length;o++)s=Math.max(s,this.animations[o].duration);return s}runAll(s){this.animations.forEach(o=>o[s]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class uT extends rT{then(s,o){return Promise.all(this.animations).then(s).catch(o)}}const ta=a=>a*1e3,ea=a=>a/1e3;function gf(a){return typeof a=="function"}function Ip(a,s){a.timeline=s,a.onfinish=null}const yf=a=>Array.isArray(a)&&typeof a[0]=="number",cT={linearEasing:void 0};function fT(a,s){const o=vf(a);return()=>{var r;return(r=cT[s])!==null&&r!==void 0?r:o()}}const Ho=fT(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),is=(a,s,o)=>{const r=s-a;return r===0?1:(o-a)/r},Cv=(a,s,o=10)=>{let r="";const c=Math.max(Math.round(s/o),2);for(let h=0;h<c;h++)r+=a(is(0,c-1,h))+", ";return`linear(${r.substring(0,r.length-2)})`};function jv(a){return!!(typeof a=="function"&&Ho()||!a||typeof a=="string"&&(a in Oc||Ho())||yf(a)||Array.isArray(a)&&a.every(jv))}const $s=([a,s,o,r])=>`cubic-bezier(${a}, ${s}, ${o}, ${r})`,Oc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$s([0,.65,.55,1]),circOut:$s([.55,0,1,.45]),backIn:$s([.31,.01,.66,-.59]),backOut:$s([.33,1.53,.69,.99])};function Mv(a,s){if(a)return typeof a=="function"&&Ho()?Cv(a,s):yf(a)?$s(a):Array.isArray(a)?a.map(o=>Mv(o,s)||Oc.easeOut):Oc[a]}const Ov=(a,s,o)=>(((1-3*o+3*s)*a+(3*o-6*s))*a+3*s)*a,dT=1e-7,hT=12;function mT(a,s,o,r,c){let h,f,m=0;do f=s+(o-s)/2,h=Ov(f,r,c)-a,h>0?o=f:s=f;while(Math.abs(h)>dT&&++m<hT);return f}function dl(a,s,o,r){if(a===s&&o===r)return nn;const c=h=>mT(h,0,1,a,o);return h=>h===0||h===1?h:Ov(c(h),s,r)}const Rv=a=>s=>s<=.5?a(2*s)/2:(2-a(2*(1-s)))/2,kv=a=>s=>1-a(1-s),wv=dl(.33,1.53,.69,.99),Sf=kv(wv),zv=Rv(Sf),Bv=a=>(a*=2)<1?.5*Sf(a):.5*(2-Math.pow(2,-10*(a-1))),bf=a=>1-Math.sin(Math.acos(a)),Uv=kv(bf),Vv=Rv(bf),Lv=a=>/^0[^.\s]+$/u.test(a);function pT(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||Lv(a):!0}const nl=a=>Math.round(a*1e5)/1e5,Tf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function vT(a){return a==null}const gT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_f=(a,s)=>o=>!!(typeof o=="string"&&gT.test(o)&&o.startsWith(a)||s&&!vT(o)&&Object.prototype.hasOwnProperty.call(o,s)),Gv=(a,s,o)=>r=>{if(typeof r!="string")return r;const[c,h,f,m]=r.match(Tf);return{[a]:parseFloat(c),[s]:parseFloat(h),[o]:parseFloat(f),alpha:m!==void 0?parseFloat(m):1}},yT=a=>na(0,255,a),pc={...os,transform:a=>Math.round(yT(a))},ri={test:_f("rgb","red"),parse:Gv("red","green","blue"),transform:({red:a,green:s,blue:o,alpha:r=1})=>"rgba("+pc.transform(a)+", "+pc.transform(s)+", "+pc.transform(o)+", "+nl(ol.transform(r))+")"};function ST(a){let s="",o="",r="",c="";return a.length>5?(s=a.substring(1,3),o=a.substring(3,5),r=a.substring(5,7),c=a.substring(7,9)):(s=a.substring(1,2),o=a.substring(2,3),r=a.substring(3,4),c=a.substring(4,5),s+=s,o+=o,r+=r,c+=c),{red:parseInt(s,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:c?parseInt(c,16)/255:1}}const Rc={test:_f("#"),parse:ST,transform:ri.transform},$i={test:_f("hsl","hue"),parse:Gv("hue","saturation","lightness"),transform:({hue:a,saturation:s,lightness:o,alpha:r=1})=>"hsla("+Math.round(a)+", "+wn.transform(nl(s))+", "+wn.transform(nl(o))+", "+nl(ol.transform(r))+")"},Me={test:a=>ri.test(a)||Rc.test(a)||$i.test(a),parse:a=>ri.test(a)?ri.parse(a):$i.test(a)?$i.parse(a):Rc.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?ri.transform(a):$i.transform(a)},bT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function TT(a){var s,o;return isNaN(a)&&typeof a=="string"&&(((s=a.match(Tf))===null||s===void 0?void 0:s.length)||0)+(((o=a.match(bT))===null||o===void 0?void 0:o.length)||0)>0}const Hv="number",qv="color",_T="var",xT="var(",Xp="${}",ET=/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 ul(a){const s=a.toString(),o=[],r={color:[],number:[],var:[]},c=[];let h=0;const m=s.replace(ET,p=>(Me.test(p)?(r.color.push(h),c.push(qv),o.push(Me.parse(p))):p.startsWith(xT)?(r.var.push(h),c.push(_T),o.push(p)):(r.number.push(h),c.push(Hv),o.push(parseFloat(p))),++h,Xp)).split(Xp);return{values:o,split:m,indexes:r,types:c}}function Yv(a){return ul(a).values}function Iv(a){const{split:s,types:o}=ul(a),r=s.length;return c=>{let h="";for(let f=0;f<r;f++)if(h+=s[f],c[f]!==void 0){const m=o[f];m===Hv?h+=nl(c[f]):m===qv?h+=Me.transform(c[f]):h+=c[f]}return h}}const AT=a=>typeof a=="number"?0:a;function NT(a){const s=Yv(a);return Iv(a)(s.map(AT))}const ka={test:TT,parse:Yv,createTransformer:Iv,getAnimatableNone:NT},DT=new Set(["brightness","contrast","saturate","opacity"]);function CT(a){const[s,o]=a.slice(0,-1).split("(");if(s==="drop-shadow")return a;const[r]=o.match(Tf)||[];if(!r)return a;const c=o.replace(r,"");let h=DT.has(s)?1:0;return r!==o&&(h*=100),s+"("+h+c+")"}const jT=/\b([a-z-]*)\(.*?\)/gu,kc={...ka,getAnimatableNone:a=>{const s=a.match(jT);return s?s.map(CT).join(" "):a}},MT={...lf,color:Me,backgroundColor:Me,outlineColor:Me,fill:Me,stroke:Me,borderColor:Me,borderTopColor:Me,borderRightColor:Me,borderBottomColor:Me,borderLeftColor:Me,filter:kc,WebkitFilter:kc},xf=a=>MT[a];function Xv(a,s){let o=xf(a);return o!==kc&&(o=ka),o.getAnimatableNone?o.getAnimatableNone(s):void 0}const OT=new Set(["auto","none","0"]);function RT(a,s,o){let r=0,c;for(;r<a.length&&!c;){const h=a[r];typeof h=="string"&&!OT.has(h)&&ul(h).values.length&&(c=a[r]),r++}if(c&&o)for(const h of s)a[h]=Xv(o,c)}const Kp=a=>a===os||a===ut,Zp=(a,s)=>parseFloat(a.split(", ")[s]),Qp=(a,s)=>(o,{transform:r})=>{if(r==="none"||!r)return 0;const c=r.match(/^matrix3d\((.+)\)$/u);if(c)return Zp(c[1],s);{const h=r.match(/^matrix\((.+)\)$/u);return h?Zp(h[1],a):0}},kT=new Set(["x","y","z"]),wT=ls.filter(a=>!kT.has(a));function zT(a){const s=[];return wT.forEach(o=>{const r=a.getValue(o);r!==void 0&&(s.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),s}const ss={width:({x:a},{paddingLeft:s="0",paddingRight:o="0"})=>a.max-a.min-parseFloat(s)-parseFloat(o),height:({y:a},{paddingTop:s="0",paddingBottom:o="0"})=>a.max-a.min-parseFloat(s)-parseFloat(o),top:(a,{top:s})=>parseFloat(s),left:(a,{left:s})=>parseFloat(s),bottom:({y:a},{top:s})=>parseFloat(s)+(a.max-a.min),right:({x:a},{left:s})=>parseFloat(s)+(a.max-a.min),x:Qp(4,13),y:Qp(5,14)};ss.translateX=ss.x;ss.translateY=ss.y;const ci=new Set;let wc=!1,zc=!1;function Kv(){if(zc){const a=Array.from(ci).filter(r=>r.needsMeasurement),s=new Set(a.map(r=>r.element)),o=new Map;s.forEach(r=>{const c=zT(r);c.length&&(o.set(r,c),r.render())}),a.forEach(r=>r.measureInitialState()),s.forEach(r=>{r.render();const c=o.get(r);c&&c.forEach(([h,f])=>{var m;(m=r.getValue(h))===null||m===void 0||m.set(f)})}),a.forEach(r=>r.measureEndState()),a.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}zc=!1,wc=!1,ci.forEach(a=>a.complete()),ci.clear()}function Zv(){ci.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(zc=!0)})}function BT(){Zv(),Kv()}class Ef{constructor(s,o,r,c,h,f=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...s],this.onComplete=o,this.name=r,this.motionValue=c,this.element=h,this.isAsync=f}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ci.add(this),wc||(wc=!0,Qt.read(Zv),Qt.resolveKeyframes(Kv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:s,name:o,element:r,motionValue:c}=this;for(let h=0;h<s.length;h++)if(s[h]===null)if(h===0){const f=c==null?void 0:c.get(),m=s[s.length-1];if(f!==void 0)s[0]=f;else if(r&&o){const p=r.readValue(o,m);p!=null&&(s[0]=p)}s[0]===void 0&&(s[0]=m),c&&f===void 0&&c.set(s[0])}else s[h]=s[h-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ci.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ci.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Qv=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),UT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function VT(a){const s=UT.exec(a);if(!s)return[,];const[,o,r,c]=s;return[`--${o??r}`,c]}function Fv(a,s,o=1){const[r,c]=VT(a);if(!r)return;const h=window.getComputedStyle(s).getPropertyValue(r);if(h){const f=h.trim();return Qv(f)?parseFloat(f):f}return sf(c)?Fv(c,s,o+1):c}const Jv=a=>s=>s.test(a),LT={test:a=>a==="auto",parse:a=>a},Pv=[os,ut,wn,ja,zb,wb,LT],Fp=a=>Pv.find(Jv(a));class Wv extends Ef{constructor(s,o,r,c,h){super(s,o,r,c,h,!0)}readKeyframes(){const{unresolvedKeyframes:s,element:o,name:r}=this;if(!o||!o.current)return;super.readKeyframes();for(let p=0;p<s.length;p++){let g=s[p];if(typeof g=="string"&&(g=g.trim(),sf(g))){const S=Fv(g,o.current);S!==void 0&&(s[p]=S),p===s.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!Av.has(r)||s.length!==2)return;const[c,h]=s,f=Fp(c),m=Fp(h);if(f!==m)if(Kp(f)&&Kp(m))for(let p=0;p<s.length;p++){const g=s[p];typeof g=="string"&&(s[p]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:s,name:o}=this,r=[];for(let c=0;c<s.length;c++)pT(s[c])&&r.push(c);r.length&&RT(s,r,o)}measureInitialState(){const{element:s,unresolvedKeyframes:o,name:r}=this;if(!s||!s.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ss[r](s.measureViewportBox(),window.getComputedStyle(s.current)),o[0]=this.measuredOrigin;const c=o[o.length-1];c!==void 0&&s.getValue(r,c).jump(c,!1)}measureEndState(){var s;const{element:o,name:r,unresolvedKeyframes:c}=this;if(!o||!o.current)return;const h=o.getValue(r);h&&h.jump(this.measuredOrigin,!1);const f=c.length-1,m=c[f];c[f]=ss[r](o.measureViewportBox(),window.getComputedStyle(o.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),!((s=this.removedTransforms)===null||s===void 0)&&s.length&&this.removedTransforms.forEach(([p,g])=>{o.getValue(p).set(g)}),this.resolveNoneKeyframes()}}const Jp=(a,s)=>s==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(ka.test(a)||a==="0")&&!a.startsWith("url("));function GT(a){const s=a[0];if(a.length===1)return!0;for(let o=0;o<a.length;o++)if(a[o]!==s)return!0}function HT(a,s,o,r){const c=a[0];if(c===null)return!1;if(s==="display"||s==="visibility")return!0;const h=a[a.length-1],f=Jp(c,s),m=Jp(h,s);return!f||!m?!1:GT(a)||(o==="spring"||gf(o))&&r}const qT=a=>a!==null;function Wo(a,{repeat:s,repeatType:o="loop"},r){const c=a.filter(qT),h=s&&o!=="loop"&&s%2===1?0:c.length-1;return!h||r===void 0?c[h]:r}const YT=40;class $v{constructor({autoplay:s=!0,delay:o=0,type:r="keyframes",repeat:c=0,repeatDelay:h=0,repeatType:f="loop",...m}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=zn.now(),this.options={autoplay:s,delay:o,type:r,repeat:c,repeatDelay:h,repeatType:f,...m},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>YT?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&BT(),this._resolved}onKeyframesResolved(s,o){this.resolvedAt=zn.now(),this.hasAttemptedResolve=!0;const{name:r,type:c,velocity:h,delay:f,onComplete:m,onUpdate:p,isGenerator:g}=this.options;if(!g&&!HT(s,r,c,h))if(f)this.options.duration=0;else{p&&p(Wo(s,this.options,o)),m&&m(),this.resolveFinishedPromise();return}const S=this.initPlayback(s,o);S!==!1&&(this._resolved={keyframes:s,finalKeyframe:o,...S},this.onPostResolved())}onPostResolved(){}then(s,o){return this.currentFinishedPromise.then(s,o)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(s=>{this.resolveFinishedPromise=s})}}const Bc=2e4;function tg(a){let s=0;const o=50;let r=a.next(s);for(;!r.done&&s<Bc;)s+=o,r=a.next(s);return s>=Bc?1/0:s}const Jt=(a,s,o)=>a+(s-a)*o;function vc(a,s,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?a+(s-a)*6*o:o<1/2?s:o<2/3?a+(s-a)*(2/3-o)*6:a}function IT({hue:a,saturation:s,lightness:o,alpha:r}){a/=360,s/=100,o/=100;let c=0,h=0,f=0;if(!s)c=h=f=o;else{const m=o<.5?o*(1+s):o+s-o*s,p=2*o-m;c=vc(p,m,a+1/3),h=vc(p,m,a),f=vc(p,m,a-1/3)}return{red:Math.round(c*255),green:Math.round(h*255),blue:Math.round(f*255),alpha:r}}function qo(a,s){return o=>o>0?s:a}const gc=(a,s,o)=>{const r=a*a,c=o*(s*s-r)+r;return c<0?0:Math.sqrt(c)},XT=[Rc,ri,$i],KT=a=>XT.find(s=>s.test(a));function Pp(a){const s=KT(a);if(!s)return!1;let o=s.parse(a);return s===$i&&(o=IT(o)),o}const Wp=(a,s)=>{const o=Pp(a),r=Pp(s);if(!o||!r)return qo(a,s);const c={...o};return h=>(c.red=gc(o.red,r.red,h),c.green=gc(o.green,r.green,h),c.blue=gc(o.blue,r.blue,h),c.alpha=Jt(o.alpha,r.alpha,h),ri.transform(c))},ZT=(a,s)=>o=>s(a(o)),hl=(...a)=>a.reduce(ZT),Uc=new Set(["none","hidden"]);function QT(a,s){return Uc.has(a)?o=>o<=0?a:s:o=>o>=1?s:a}function FT(a,s){return o=>Jt(a,s,o)}function Af(a){return typeof a=="number"?FT:typeof a=="string"?sf(a)?qo:Me.test(a)?Wp:WT:Array.isArray(a)?eg:typeof a=="object"?Me.test(a)?Wp:JT:qo}function eg(a,s){const o=[...a],r=o.length,c=a.map((h,f)=>Af(h)(h,s[f]));return h=>{for(let f=0;f<r;f++)o[f]=c[f](h);return o}}function JT(a,s){const o={...a,...s},r={};for(const c in o)a[c]!==void 0&&s[c]!==void 0&&(r[c]=Af(a[c])(a[c],s[c]));return c=>{for(const h in r)o[h]=r[h](c);return o}}function PT(a,s){var o;const r=[],c={color:0,var:0,number:0};for(let h=0;h<s.values.length;h++){const f=s.types[h],m=a.indexes[f][c[f]],p=(o=a.values[m])!==null&&o!==void 0?o:0;r[h]=p,c[f]++}return r}const WT=(a,s)=>{const o=ka.createTransformer(s),r=ul(a),c=ul(s);return r.indexes.var.length===c.indexes.var.length&&r.indexes.color.length===c.indexes.color.length&&r.indexes.number.length>=c.indexes.number.length?Uc.has(a)&&!c.values.length||Uc.has(s)&&!r.values.length?QT(a,s):hl(eg(PT(r,c),c.values),o):qo(a,s)};function ng(a,s,o){return typeof a=="number"&&typeof s=="number"&&typeof o=="number"?Jt(a,s,o):Af(a)(a,s)}const $T=5;function ag(a,s,o){const r=Math.max(s-$T,0);return Nv(o-a(r),s-r)}const te={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},yc=.001;function t_({duration:a=te.duration,bounce:s=te.bounce,velocity:o=te.velocity,mass:r=te.mass}){let c,h,f=1-s;f=na(te.minDamping,te.maxDamping,f),a=na(te.minDuration,te.maxDuration,ea(a)),f<1?(c=g=>{const S=g*f,b=S*a,_=S-o,N=Vc(g,f),R=Math.exp(-b);return yc-_/N*R},h=g=>{const b=g*f*a,_=b*o+o,N=Math.pow(f,2)*Math.pow(g,2)*a,R=Math.exp(-b),w=Vc(Math.pow(g,2),f);return(-c(g)+yc>0?-1:1)*((_-N)*R)/w}):(c=g=>{const S=Math.exp(-g*a),b=(g-o)*a+1;return-yc+S*b},h=g=>{const S=Math.exp(-g*a),b=(o-g)*(a*a);return S*b});const m=5/a,p=n_(c,h,m);if(a=ta(a),isNaN(p))return{stiffness:te.stiffness,damping:te.damping,duration:a};{const g=Math.pow(p,2)*r;return{stiffness:g,damping:f*2*Math.sqrt(r*g),duration:a}}}const e_=12;function n_(a,s,o){let r=o;for(let c=1;c<e_;c++)r=r-a(r)/s(r);return r}function Vc(a,s){return a*Math.sqrt(1-s*s)}const a_=["duration","bounce"],i_=["stiffness","damping","mass"];function $p(a,s){return s.some(o=>a[o]!==void 0)}function s_(a){let s={velocity:te.velocity,stiffness:te.stiffness,damping:te.damping,mass:te.mass,isResolvedFromDuration:!1,...a};if(!$p(a,i_)&&$p(a,a_))if(a.visualDuration){const o=a.visualDuration,r=2*Math.PI/(o*1.2),c=r*r,h=2*na(.05,1,1-(a.bounce||0))*Math.sqrt(c);s={...s,mass:te.mass,stiffness:c,damping:h}}else{const o=t_(a);s={...s,...o,mass:te.mass},s.isResolvedFromDuration=!0}return s}function ig(a=te.visualDuration,s=te.bounce){const o=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:s}:a;let{restSpeed:r,restDelta:c}=o;const h=o.keyframes[0],f=o.keyframes[o.keyframes.length-1],m={done:!1,value:h},{stiffness:p,damping:g,mass:S,duration:b,velocity:_,isResolvedFromDuration:N}=s_({...o,velocity:-ea(o.velocity||0)}),R=_||0,w=g/(2*Math.sqrt(p*S)),X=f-h,I=ea(Math.sqrt(p/S)),J=Math.abs(X)<5;r||(r=J?te.restSpeed.granular:te.restSpeed.default),c||(c=J?te.restDelta.granular:te.restDelta.default);let L;if(w<1){const Y=Vc(I,w);L=G=>{const F=Math.exp(-w*I*G);return f-F*((R+w*I*X)/Y*Math.sin(Y*G)+X*Math.cos(Y*G))}}else if(w===1)L=Y=>f-Math.exp(-I*Y)*(X+(R+I*X)*Y);else{const Y=I*Math.sqrt(w*w-1);L=G=>{const F=Math.exp(-w*I*G),B=Math.min(Y*G,300);return f-F*((R+w*I*X)*Math.sinh(B)+Y*X*Math.cosh(B))/Y}}const k={calculatedDuration:N&&b||null,next:Y=>{const G=L(Y);if(N)m.done=Y>=b;else{let F=0;w<1&&(F=Y===0?ta(R):ag(L,Y,G));const B=Math.abs(F)<=r,nt=Math.abs(f-G)<=c;m.done=B&&nt}return m.value=m.done?f:G,m},toString:()=>{const Y=Math.min(tg(k),Bc),G=Cv(F=>k.next(Y*F).value,Y,30);return Y+"ms "+G}};return k}function t0({keyframes:a,velocity:s=0,power:o=.8,timeConstant:r=325,bounceDamping:c=10,bounceStiffness:h=500,modifyTarget:f,min:m,max:p,restDelta:g=.5,restSpeed:S}){const b=a[0],_={done:!1,value:b},N=B=>m!==void 0&&B<m||p!==void 0&&B>p,R=B=>m===void 0?p:p===void 0||Math.abs(m-B)<Math.abs(p-B)?m:p;let w=o*s;const X=b+w,I=f===void 0?X:f(X);I!==X&&(w=I-b);const J=B=>-w*Math.exp(-B/r),L=B=>I+J(B),k=B=>{const nt=J(B),ct=L(B);_.done=Math.abs(nt)<=g,_.value=_.done?I:ct};let Y,G;const F=B=>{N(_.value)&&(Y=B,G=ig({keyframes:[_.value,R(_.value)],velocity:ag(L,B,_.value),damping:c,stiffness:h,restDelta:g,restSpeed:S}))};return F(0),{calculatedDuration:null,next:B=>{let nt=!1;return!G&&Y===void 0&&(nt=!0,k(B),F(B)),Y!==void 0&&B>=Y?G.next(B-Y):(!nt&&k(B),_)}}}const l_=dl(.42,0,1,1),o_=dl(0,0,.58,1),sg=dl(.42,0,.58,1),r_=a=>Array.isArray(a)&&typeof a[0]!="number",u_={linear:nn,easeIn:l_,easeInOut:sg,easeOut:o_,circIn:bf,circInOut:Vv,circOut:Uv,backIn:Sf,backInOut:zv,backOut:wv,anticipate:Bv},e0=a=>{if(yf(a)){sv(a.length===4);const[s,o,r,c]=a;return dl(s,o,r,c)}else if(typeof a=="string")return u_[a];return a};function c_(a,s,o){const r=[],c=o||ng,h=a.length-1;for(let f=0;f<h;f++){let m=c(a[f],a[f+1]);if(s){const p=Array.isArray(s)?s[f]||nn:s;m=hl(p,m)}r.push(m)}return r}function f_(a,s,{clamp:o=!0,ease:r,mixer:c}={}){const h=a.length;if(sv(h===s.length),h===1)return()=>s[0];if(h===2&&s[0]===s[1])return()=>s[1];const f=a[0]===a[1];a[0]>a[h-1]&&(a=[...a].reverse(),s=[...s].reverse());const m=c_(s,r,c),p=m.length,g=S=>{if(f&&S<a[0])return s[0];let b=0;if(p>1)for(;b<a.length-2&&!(S<a[b+1]);b++);const _=is(a[b],a[b+1],S);return m[b](_)};return o?S=>g(na(a[0],a[h-1],S)):g}function d_(a,s){const o=a[a.length-1];for(let r=1;r<=s;r++){const c=is(0,s,r);a.push(Jt(o,1,c))}}function h_(a){const s=[0];return d_(s,a.length-1),s}function m_(a,s){return a.map(o=>o*s)}function p_(a,s){return a.map(()=>s||sg).splice(0,a.length-1)}function Yo({duration:a=300,keyframes:s,times:o,ease:r="easeInOut"}){const c=r_(r)?r.map(e0):e0(r),h={done:!1,value:s[0]},f=m_(o&&o.length===s.length?o:h_(s),a),m=f_(f,s,{ease:Array.isArray(c)?c:p_(s,c)});return{calculatedDuration:a,next:p=>(h.value=m(p),h.done=p>=a,h)}}const v_=a=>{const s=({timestamp:o})=>a(o);return{start:()=>Qt.update(s,!0),stop:()=>Ra(s),now:()=>Ae.isProcessing?Ae.timestamp:zn.now()}},g_={decay:t0,inertia:t0,tween:Yo,keyframes:Yo,spring:ig},y_=a=>a/100;class Nf extends $v{constructor(s){super(s),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:p}=this.options;p&&p()};const{name:o,motionValue:r,element:c,keyframes:h}=this.options,f=(c==null?void 0:c.KeyframeResolver)||Ef,m=(p,g)=>this.onKeyframesResolved(p,g);this.resolver=new f(h,m,o,r,c),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(s){const{type:o="keyframes",repeat:r=0,repeatDelay:c=0,repeatType:h,velocity:f=0}=this.options,m=gf(o)?o:g_[o]||Yo;let p,g;m!==Yo&&typeof s[0]!="number"&&(p=hl(y_,ng(s[0],s[1])),s=[0,100]);const S=m({...this.options,keyframes:s});h==="mirror"&&(g=m({...this.options,keyframes:[...s].reverse(),velocity:-f})),S.calculatedDuration===null&&(S.calculatedDuration=tg(S));const{calculatedDuration:b}=S,_=b+c,N=_*(r+1)-c;return{generator:S,mirroredGenerator:g,mapPercentToKeyframes:p,calculatedDuration:b,resolvedDuration:_,totalDuration:N}}onPostResolved(){const{autoplay:s=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!s?this.pause():this.state=this.pendingPlayState}tick(s,o=!1){const{resolved:r}=this;if(!r){const{keyframes:B}=this.options;return{done:!0,value:B[B.length-1]}}const{finalKeyframe:c,generator:h,mirroredGenerator:f,mapPercentToKeyframes:m,keyframes:p,calculatedDuration:g,totalDuration:S,resolvedDuration:b}=r;if(this.startTime===null)return h.next(0);const{delay:_,repeat:N,repeatType:R,repeatDelay:w,onUpdate:X}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,s):this.speed<0&&(this.startTime=Math.min(s-S/this.speed,this.startTime)),o?this.currentTime=s:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(s-this.startTime)*this.speed;const I=this.currentTime-_*(this.speed>=0?1:-1),J=this.speed>=0?I<0:I>S;this.currentTime=Math.max(I,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=S);let L=this.currentTime,k=h;if(N){const B=Math.min(this.currentTime,S)/b;let nt=Math.floor(B),ct=B%1;!ct&&B>=1&&(ct=1),ct===1&&nt--,nt=Math.min(nt,N+1),!!(nt%2)&&(R==="reverse"?(ct=1-ct,w&&(ct-=w/b)):R==="mirror"&&(k=f)),L=na(0,1,ct)*b}const Y=J?{done:!1,value:p[0]}:k.next(L);m&&(Y.value=m(Y.value));let{done:G}=Y;!J&&g!==null&&(G=this.speed>=0?this.currentTime>=S:this.currentTime<=0);const F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&G);return F&&c!==void 0&&(Y.value=Wo(p,this.options,c)),X&&X(Y.value),F&&this.finish(),Y}get duration(){const{resolved:s}=this;return s?ea(s.calculatedDuration):0}get time(){return ea(this.currentTime)}set time(s){s=ta(s),this.currentTime=s,this.holdTime!==null||this.speed===0?this.holdTime=s:this.driver&&(this.startTime=this.driver.now()-s/this.speed)}get speed(){return this.playbackSpeed}set speed(s){const o=this.playbackSpeed!==s;this.playbackSpeed=s,o&&(this.time=ea(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:s=v_,onPlay:o,startTime:r}=this.options;this.driver||(this.driver=s(h=>this.tick(h))),o&&o();const c=this.driver.now();this.holdTime!==null?this.startTime=c-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=c):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 s;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(s=this.currentTime)!==null&&s!==void 0?s:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:s}=this.options;s&&s()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(s){return this.startTime=0,this.tick(s,!0)}}const S_=new Set(["opacity","clipPath","filter","transform"]);function b_(a,s,o,{delay:r=0,duration:c=300,repeat:h=0,repeatType:f="loop",ease:m="easeInOut",times:p}={}){const g={[s]:o};p&&(g.offset=p);const S=Mv(m,c);return Array.isArray(S)&&(g.easing=S),a.animate(g,{delay:r,duration:c,easing:Array.isArray(S)?"linear":S,fill:"both",iterations:h+1,direction:f==="reverse"?"alternate":"normal"})}const T_=vf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Io=10,__=2e4;function x_(a){return gf(a.type)||a.type==="spring"||!jv(a.ease)}function E_(a,s){const o=new Nf({...s,keyframes:a,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:a[0]};const c=[];let h=0;for(;!r.done&&h<__;)r=o.sample(h),c.push(r.value),h+=Io;return{times:void 0,keyframes:c,duration:h-Io,ease:"linear"}}const lg={anticipate:Bv,backInOut:zv,circInOut:Vv};function A_(a){return a in lg}class n0 extends $v{constructor(s){super(s);const{name:o,motionValue:r,element:c,keyframes:h}=this.options;this.resolver=new Wv(h,(f,m)=>this.onKeyframesResolved(f,m),o,r,c),this.resolver.scheduleResolve()}initPlayback(s,o){let{duration:r=300,times:c,ease:h,type:f,motionValue:m,name:p,startTime:g}=this.options;if(!m.owner||!m.owner.current)return!1;if(typeof h=="string"&&Ho()&&A_(h)&&(h=lg[h]),x_(this.options)){const{onComplete:b,onUpdate:_,motionValue:N,element:R,...w}=this.options,X=E_(s,w);s=X.keyframes,s.length===1&&(s[1]=s[0]),r=X.duration,c=X.times,h=X.ease,f="keyframes"}const S=b_(m.owner.current,p,s,{...this.options,duration:r,times:c,ease:h});return S.startTime=g??this.calcStartTime(),this.pendingTimeline?(Ip(S,this.pendingTimeline),this.pendingTimeline=void 0):S.onfinish=()=>{const{onComplete:b}=this.options;m.set(Wo(s,this.options,o)),b&&b(),this.cancel(),this.resolveFinishedPromise()},{animation:S,duration:r,times:c,type:f,ease:h,keyframes:s}}get duration(){const{resolved:s}=this;if(!s)return 0;const{duration:o}=s;return ea(o)}get time(){const{resolved:s}=this;if(!s)return 0;const{animation:o}=s;return ea(o.currentTime||0)}set time(s){const{resolved:o}=this;if(!o)return;const{animation:r}=o;r.currentTime=ta(s)}get speed(){const{resolved:s}=this;if(!s)return 1;const{animation:o}=s;return o.playbackRate}set speed(s){const{resolved:o}=this;if(!o)return;const{animation:r}=o;r.playbackRate=s}get state(){const{resolved:s}=this;if(!s)return"idle";const{animation:o}=s;return o.playState}get startTime(){const{resolved:s}=this;if(!s)return null;const{animation:o}=s;return o.startTime}attachTimeline(s){if(!this._resolved)this.pendingTimeline=s;else{const{resolved:o}=this;if(!o)return nn;const{animation:r}=o;Ip(r,s)}return nn}play(){if(this.isStopped)return;const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.playState==="finished"&&this.updateFinishedPromise(),o.play()}pause(){const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:s}=this;if(!s)return;const{animation:o,keyframes:r,duration:c,type:h,ease:f,times:m}=s;if(o.playState==="idle"||o.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:S,onComplete:b,element:_,...N}=this.options,R=new Nf({...N,keyframes:r,duration:c,type:h,ease:f,times:m,isGenerator:!0}),w=ta(this.time);g.setWithVelocity(R.sample(w-Io).value,R.sample(w).value,Io)}const{onStop:p}=this.options;p&&p(),this.cancel()}complete(){const{resolved:s}=this;s&&s.animation.finish()}cancel(){const{resolved:s}=this;s&&s.animation.cancel()}static supports(s){const{motionValue:o,name:r,repeatDelay:c,repeatType:h,damping:f,type:m}=s;if(!o||!o.owner||!(o.owner.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:g}=o.owner.getProps();return T_()&&r&&S_.has(r)&&!p&&!g&&!c&&h!=="mirror"&&f!==0&&m!=="inertia"}}const N_={type:"spring",stiffness:500,damping:25,restSpeed:10},D_=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),C_={type:"keyframes",duration:.8},j_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},M_=(a,{keyframes:s})=>s.length>2?C_:fi.has(a)?a.startsWith("scale")?D_(s[1]):N_:j_;function O_({when:a,delay:s,delayChildren:o,staggerChildren:r,staggerDirection:c,repeat:h,repeatType:f,repeatDelay:m,from:p,elapsed:g,...S}){return!!Object.keys(S).length}const Df=(a,s,o,r={},c,h)=>f=>{const m=df(r,a)||{},p=m.delay||r.delay||0;let{elapsed:g=0}=r;g=g-ta(p);let S={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:s.getVelocity(),...m,delay:-g,onUpdate:_=>{s.set(_),m.onUpdate&&m.onUpdate(_)},onComplete:()=>{f(),m.onComplete&&m.onComplete()},name:a,motionValue:s,element:h?void 0:c};O_(m)||(S={...S,...M_(a,S)}),S.duration&&(S.duration=ta(S.duration)),S.repeatDelay&&(S.repeatDelay=ta(S.repeatDelay)),S.from!==void 0&&(S.keyframes[0]=S.from);let b=!1;if((S.type===!1||S.duration===0&&!S.repeatDelay)&&(S.duration=0,S.delay===0&&(b=!0)),b&&!h&&s.get()!==void 0){const _=Wo(S.keyframes,m);if(_!==void 0)return Qt.update(()=>{S.onUpdate(_),S.onComplete()}),new uT([])}return!h&&n0.supports(S)?new n0(S):new Nf(S)};function R_({protectedKeys:a,needsAnimating:s},o){const r=a.hasOwnProperty(o)&&s[o]!==!0;return s[o]=!1,r}function og(a,s,{delay:o=0,transitionOverride:r,type:c}={}){var h;let{transition:f=a.getDefaultTransition(),transitionEnd:m,...p}=s;r&&(f=r);const g=[],S=c&&a.animationState&&a.animationState.getState()[c];for(const b in p){const _=a.getValue(b,(h=a.latestValues[b])!==null&&h!==void 0?h:null),N=p[b];if(N===void 0||S&&R_(S,b))continue;const R={delay:o,...df(f||{},b)};let w=!1;if(window.MotionHandoffAnimation){const I=Dv(a);if(I){const J=window.MotionHandoffAnimation(I,b,Qt);J!==null&&(R.startTime=J,w=!0)}}Mc(a,b),_.start(Df(b,_,N,a.shouldReduceMotion&&Av.has(b)?{type:!1}:R,a,w));const X=_.animation;X&&g.push(X)}return m&&Promise.all(g).then(()=>{Qt.update(()=>{m&&sT(a,m)})}),g}function Lc(a,s,o={}){var r;const c=Po(a,s,o.type==="exit"?(r=a.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:h=a.getDefaultTransition()||{}}=c||{};o.transitionOverride&&(h=o.transitionOverride);const f=c?()=>Promise.all(og(a,c,o)):()=>Promise.resolve(),m=a.variantChildren&&a.variantChildren.size?(g=0)=>{const{delayChildren:S=0,staggerChildren:b,staggerDirection:_}=h;return k_(a,s,S+g,b,_,o)}:()=>Promise.resolve(),{when:p}=h;if(p){const[g,S]=p==="beforeChildren"?[f,m]:[m,f];return g().then(()=>S())}else return Promise.all([f(),m(o.delay)])}function k_(a,s,o=0,r=0,c=1,h){const f=[],m=(a.variantChildren.size-1)*r,p=c===1?(g=0)=>g*r:(g=0)=>m-g*r;return Array.from(a.variantChildren).sort(w_).forEach((g,S)=>{g.notify("AnimationStart",s),f.push(Lc(g,s,{...h,delay:o+p(S)}).then(()=>g.notify("AnimationComplete",s)))}),Promise.all(f)}function w_(a,s){return a.sortNodePosition(s)}function z_(a,s,o={}){a.notify("AnimationStart",s);let r;if(Array.isArray(s)){const c=s.map(h=>Lc(a,h,o));r=Promise.all(c)}else if(typeof s=="string")r=Lc(a,s,o);else{const c=typeof s=="function"?Po(a,s,o.custom):s;r=Promise.all(og(a,c,o))}return r.then(()=>{a.notify("AnimationComplete",s)})}const B_=$c.length;function rg(a){if(!a)return;if(!a.isControllingVariants){const o=a.parent?rg(a.parent)||{}:{};return a.props.initial!==void 0&&(o.initial=a.props.initial),o}const s={};for(let o=0;o<B_;o++){const r=$c[o],c=a.props[r];(ll(c)||c===!1)&&(s[r]=c)}return s}const U_=[...Wc].reverse(),V_=Wc.length;function L_(a){return s=>Promise.all(s.map(({animation:o,options:r})=>z_(a,o,r)))}function G_(a){let s=L_(a),o=a0(),r=!0;const c=p=>(g,S)=>{var b;const _=Po(a,S,p==="exit"?(b=a.presenceContext)===null||b===void 0?void 0:b.custom:void 0);if(_){const{transition:N,transitionEnd:R,...w}=_;g={...g,...w,...R}}return g};function h(p){s=p(a)}function f(p){const{props:g}=a,S=rg(a.parent)||{},b=[],_=new Set;let N={},R=1/0;for(let X=0;X<V_;X++){const I=U_[X],J=o[I],L=g[I]!==void 0?g[I]:S[I],k=ll(L),Y=I===p?J.isActive:null;Y===!1&&(R=X);let G=L===S[I]&&L!==g[I]&&k;if(G&&r&&a.manuallyAnimateOnMount&&(G=!1),J.protectedKeys={...N},!J.isActive&&Y===null||!L&&!J.prevProp||Fo(L)||typeof L=="boolean")continue;const F=H_(J.prevProp,L);let B=F||I===p&&J.isActive&&!G&&k||X>R&&k,nt=!1;const ct=Array.isArray(L)?L:[L];let st=ct.reduce(c(I),{});Y===!1&&(st={});const{prevResolvedValues:ft={}}=J,gt={...ft,...st},Dt=q=>{B=!0,_.has(q)&&(nt=!0,_.delete(q)),J.needsAnimating[q]=!0;const et=a.getValue(q);et&&(et.liveStyle=!1)};for(const q in gt){const et=st[q],yt=ft[q];if(N.hasOwnProperty(q))continue;let St=!1;jc(et)&&jc(yt)?St=!Ev(et,yt):St=et!==yt,St?et!=null?Dt(q):_.add(q):et!==void 0&&_.has(q)?Dt(q):J.protectedKeys[q]=!0}J.prevProp=L,J.prevResolvedValues=st,J.isActive&&(N={...N,...st}),r&&a.blockInitialAnimation&&(B=!1),B&&(!(G&&F)||nt)&&b.push(...ct.map(q=>({animation:q,options:{type:I}})))}if(_.size){const X={};_.forEach(I=>{const J=a.getBaseTarget(I),L=a.getValue(I);L&&(L.liveStyle=!0),X[I]=J??null}),b.push({animation:X})}let w=!!b.length;return r&&(g.initial===!1||g.initial===g.animate)&&!a.manuallyAnimateOnMount&&(w=!1),r=!1,w?s(b):Promise.resolve()}function m(p,g){var S;if(o[p].isActive===g)return Promise.resolve();(S=a.variantChildren)===null||S===void 0||S.forEach(_=>{var N;return(N=_.animationState)===null||N===void 0?void 0:N.setActive(p,g)}),o[p].isActive=g;const b=f(p);for(const _ in o)o[_].protectedKeys={};return b}return{animateChanges:f,setActive:m,setAnimateFunction:h,getState:()=>o,reset:()=>{o=a0(),r=!0}}}function H_(a,s){return typeof s=="string"?s!==a:Array.isArray(s)?!Ev(s,a):!1}function ii(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function a0(){return{animate:ii(!0),whileInView:ii(),whileHover:ii(),whileTap:ii(),whileDrag:ii(),whileFocus:ii(),exit:ii()}}class wa{constructor(s){this.isMounted=!1,this.node=s}update(){}}class q_ extends wa{constructor(s){super(s),s.animationState||(s.animationState=G_(s))}updateAnimationControlsSubscription(){const{animate:s}=this.node.getProps();Fo(s)&&(this.unmountControls=s.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:s}=this.node.getProps(),{animate:o}=this.node.prevProps||{};s!==o&&this.updateAnimationControlsSubscription()}unmount(){var s;this.node.animationState.reset(),(s=this.unmountControls)===null||s===void 0||s.call(this)}}let Y_=0;class I_ extends wa{constructor(){super(...arguments),this.id=Y_++}update(){if(!this.node.presenceContext)return;const{isPresent:s,onExitComplete:o}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||s===r)return;const c=this.node.animationState.setActive("exit",!s);o&&!s&&c.then(()=>o(this.id))}mount(){const{register:s}=this.node.presenceContext||{};s&&(this.unmount=s(this.id))}unmount(){}}const X_={animation:{Feature:q_},exit:{Feature:I_}},An={x:!1,y:!1};function ug(){return An.x||An.y}function K_(a){return a==="x"||a==="y"?An[a]?null:(An[a]=!0,()=>{An[a]=!1}):An.x||An.y?null:(An.x=An.y=!0,()=>{An.x=An.y=!1})}const Cf=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1;function cl(a,s,o,r={passive:!0}){return a.addEventListener(s,o,r),()=>a.removeEventListener(s,o)}function ml(a){return{point:{x:a.pageX,y:a.pageY}}}const Z_=a=>s=>Cf(s)&&a(s,ml(s));function al(a,s,o,r){return cl(a,s,Z_(o),r)}const i0=(a,s)=>Math.abs(a-s);function Q_(a,s){const o=i0(a.x,s.x),r=i0(a.y,s.y);return Math.sqrt(o**2+r**2)}class cg{constructor(s,o,{transformPagePoint:r,contextWindow:c,dragSnapToOrigin:h=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=bc(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,N=Q_(b.offset,{x:0,y:0})>=3;if(!_&&!N)return;const{point:R}=b,{timestamp:w}=Ae;this.history.push({...R,timestamp:w});const{onStart:X,onMove:I}=this.handlers;_||(X&&X(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),I&&I(this.lastMoveEvent,b)},this.handlePointerMove=(b,_)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Sc(_,this.transformPagePoint),Qt.update(this.updatePoint,!0)},this.handlePointerUp=(b,_)=>{this.end();const{onEnd:N,onSessionEnd:R,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const X=bc(b.type==="pointercancel"?this.lastMoveEventInfo:Sc(_,this.transformPagePoint),this.history);this.startEvent&&N&&N(b,X),R&&R(b,X)},!Cf(s))return;this.dragSnapToOrigin=h,this.handlers=o,this.transformPagePoint=r,this.contextWindow=c||window;const f=ml(s),m=Sc(f,this.transformPagePoint),{point:p}=m,{timestamp:g}=Ae;this.history=[{...p,timestamp:g}];const{onSessionStart:S}=o;S&&S(s,bc(m,this.history)),this.removeListeners=hl(al(this.contextWindow,"pointermove",this.handlePointerMove),al(this.contextWindow,"pointerup",this.handlePointerUp),al(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(s){this.handlers=s}end(){this.removeListeners&&this.removeListeners(),Ra(this.updatePoint)}}function Sc(a,s){return s?{point:s(a.point)}:a}function s0(a,s){return{x:a.x-s.x,y:a.y-s.y}}function bc({point:a},s){return{point:a,delta:s0(a,fg(s)),offset:s0(a,F_(s)),velocity:J_(s,.1)}}function F_(a){return a[0]}function fg(a){return a[a.length-1]}function J_(a,s){if(a.length<2)return{x:0,y:0};let o=a.length-1,r=null;const c=fg(a);for(;o>=0&&(r=a[o],!(c.timestamp-r.timestamp>ta(s)));)o--;if(!r)return{x:0,y:0};const h=ea(c.timestamp-r.timestamp);if(h===0)return{x:0,y:0};const f={x:(c.x-r.x)/h,y:(c.y-r.y)/h};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}const dg=1e-4,P_=1-dg,W_=1+dg,hg=.01,$_=0-hg,tx=0+hg;function an(a){return a.max-a.min}function ex(a,s,o){return Math.abs(a-s)<=o}function l0(a,s,o,r=.5){a.origin=r,a.originPoint=Jt(s.min,s.max,a.origin),a.scale=an(o)/an(s),a.translate=Jt(o.min,o.max,a.origin)-a.originPoint,(a.scale>=P_&&a.scale<=W_||isNaN(a.scale))&&(a.scale=1),(a.translate>=$_&&a.translate<=tx||isNaN(a.translate))&&(a.translate=0)}function il(a,s,o,r){l0(a.x,s.x,o.x,r?r.originX:void 0),l0(a.y,s.y,o.y,r?r.originY:void 0)}function o0(a,s,o){a.min=o.min+s.min,a.max=a.min+an(s)}function nx(a,s,o){o0(a.x,s.x,o.x),o0(a.y,s.y,o.y)}function r0(a,s,o){a.min=s.min-o.min,a.max=a.min+an(s)}function sl(a,s,o){r0(a.x,s.x,o.x),r0(a.y,s.y,o.y)}function ax(a,{min:s,max:o},r){return s!==void 0&&a<s?a=r?Jt(s,a,r.min):Math.max(a,s):o!==void 0&&a>o&&(a=r?Jt(o,a,r.max):Math.min(a,o)),a}function u0(a,s,o){return{min:s!==void 0?a.min+s:void 0,max:o!==void 0?a.max+o-(a.max-a.min):void 0}}function ix(a,{top:s,left:o,bottom:r,right:c}){return{x:u0(a.x,o,c),y:u0(a.y,s,r)}}function c0(a,s){let o=s.min-a.min,r=s.max-a.max;return s.max-s.min<a.max-a.min&&([o,r]=[r,o]),{min:o,max:r}}function sx(a,s){return{x:c0(a.x,s.x),y:c0(a.y,s.y)}}function lx(a,s){let o=.5;const r=an(a),c=an(s);return c>r?o=is(s.min,s.max-r,a.min):r>c&&(o=is(a.min,a.max-c,s.min)),na(0,1,o)}function ox(a,s){const o={};return s.min!==void 0&&(o.min=s.min-a.min),s.max!==void 0&&(o.max=s.max-a.min),o}const Gc=.35;function rx(a=Gc){return a===!1?a=0:a===!0&&(a=Gc),{x:f0(a,"left","right"),y:f0(a,"top","bottom")}}function f0(a,s,o){return{min:d0(a,s),max:d0(a,o)}}function d0(a,s){return typeof a=="number"?a:a[s]||0}const h0=()=>({translate:0,scale:1,origin:0,originPoint:0}),ts=()=>({x:h0(),y:h0()}),m0=()=>({min:0,max:0}),ae=()=>({x:m0(),y:m0()});function yn(a){return[a("x"),a("y")]}function mg({top:a,left:s,right:o,bottom:r}){return{x:{min:s,max:o},y:{min:a,max:r}}}function ux({x:a,y:s}){return{top:s.min,right:a.max,bottom:s.max,left:a.min}}function cx(a,s){if(!s)return a;const o=s({x:a.left,y:a.top}),r=s({x:a.right,y:a.bottom});return{top:o.y,left:o.x,bottom:r.y,right:r.x}}function Tc(a){return a===void 0||a===1}function Hc({scale:a,scaleX:s,scaleY:o}){return!Tc(a)||!Tc(s)||!Tc(o)}function li(a){return Hc(a)||pg(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function pg(a){return p0(a.x)||p0(a.y)}function p0(a){return a&&a!=="0%"}function Xo(a,s,o){const r=a-o,c=s*r;return o+c}function v0(a,s,o,r,c){return c!==void 0&&(a=Xo(a,c,r)),Xo(a,o,r)+s}function qc(a,s=0,o=1,r,c){a.min=v0(a.min,s,o,r,c),a.max=v0(a.max,s,o,r,c)}function vg(a,{x:s,y:o}){qc(a.x,s.translate,s.scale,s.originPoint),qc(a.y,o.translate,o.scale,o.originPoint)}const g0=.999999999999,y0=1.0000000000001;function fx(a,s,o,r=!1){const c=o.length;if(!c)return;s.x=s.y=1;let h,f;for(let m=0;m<c;m++){h=o[m],f=h.projectionDelta;const{visualElement:p}=h.options;p&&p.props.style&&p.props.style.display==="contents"||(r&&h.options.layoutScroll&&h.scroll&&h!==h.root&&ns(a,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),f&&(s.x*=f.x.scale,s.y*=f.y.scale,vg(a,f)),r&&li(h.latestValues)&&ns(a,h.latestValues))}s.x<y0&&s.x>g0&&(s.x=1),s.y<y0&&s.y>g0&&(s.y=1)}function es(a,s){a.min=a.min+s,a.max=a.max+s}function S0(a,s,o,r,c=.5){const h=Jt(a.min,a.max,c);qc(a,s,o,h,r)}function ns(a,s){S0(a.x,s.x,s.scaleX,s.scale,s.originX),S0(a.y,s.y,s.scaleY,s.scale,s.originY)}function gg(a,s){return mg(cx(a.getBoundingClientRect(),s))}function dx(a,s,o){const r=gg(a,o),{scroll:c}=s;return c&&(es(r.x,c.offset.x),es(r.y,c.offset.y)),r}const yg=({current:a})=>a?a.ownerDocument.defaultView:null,hx=new WeakMap;class mx{constructor(s){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ae(),this.visualElement=s}start(s,{snapToCursor:o=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const c=S=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(ml(S).point)},h=(S,b)=>{const{drag:_,dragPropagation:N,onDragStart:R}=this.getProps();if(_&&!N&&(this.openDragLock&&this.openDragLock(),this.openDragLock=K_(_),!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),yn(X=>{let I=this.getAxisMotionValue(X).get()||0;if(wn.test(I)){const{projection:J}=this.visualElement;if(J&&J.layout){const L=J.layout.layoutBox[X];L&&(I=an(L)*(parseFloat(I)/100))}}this.originPoint[X]=I}),R&&Qt.postRender(()=>R(S,b)),Mc(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},f=(S,b)=>{const{dragPropagation:_,dragDirectionLock:N,onDirectionLock:R,onDrag:w}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:X}=b;if(N&&this.currentDirection===null){this.currentDirection=px(X),this.currentDirection!==null&&R&&R(this.currentDirection);return}this.updateAxis("x",b.point,X),this.updateAxis("y",b.point,X),this.visualElement.render(),w&&w(S,b)},m=(S,b)=>this.stop(S,b),p=()=>yn(S=>{var b;return this.getAnimationState(S)==="paused"&&((b=this.getAxisMotionValue(S).animation)===null||b===void 0?void 0:b.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new cg(s,{onSessionStart:c,onStart:h,onMove:f,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:yg(this.visualElement)})}stop(s,o){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:h}=this.getProps();h&&Qt.postRender(()=>h(s,o))}cancel(){this.isDragging=!1;const{projection:s,animationState:o}=this.visualElement;s&&(s.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(s,o,r){const{drag:c}=this.getProps();if(!r||!zo(s,c,this.currentDirection))return;const h=this.getAxisMotionValue(s);let f=this.originPoint[s]+r[s];this.constraints&&this.constraints[s]&&(f=ax(f,this.constraints[s],this.elastic[s])),h.set(f)}resolveConstraints(){var s;const{dragConstraints:o,dragElastic:r}=this.getProps(),c=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)===null||s===void 0?void 0:s.layout,h=this.constraints;o&&Wi(o)?this.constraints||(this.constraints=this.resolveRefConstraints()):o&&c?this.constraints=ix(c.layoutBox,o):this.constraints=!1,this.elastic=rx(r),h!==this.constraints&&c&&this.constraints&&!this.hasMutatedConstraints&&yn(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=ox(c.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:s,onMeasureDragConstraints:o}=this.getProps();if(!s||!Wi(s))return!1;const r=s.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;const h=dx(r,c.root,this.visualElement.getTransformPagePoint());let f=sx(c.layout.layoutBox,h);if(o){const m=o(ux(f));this.hasMutatedConstraints=!!m,m&&(f=mg(m))}return f}startAnimation(s){const{drag:o,dragMomentum:r,dragElastic:c,dragTransition:h,dragSnapToOrigin:f,onDragTransitionEnd:m}=this.getProps(),p=this.constraints||{},g=yn(S=>{if(!zo(S,o,this.currentDirection))return;let b=p&&p[S]||{};f&&(b={min:0,max:0});const _=c?200:1e6,N=c?40:1e7,R={type:"inertia",velocity:r?s[S]:0,bounceStiffness:_,bounceDamping:N,timeConstant:750,restDelta:1,restSpeed:10,...h,...b};return this.startAxisValueAnimation(S,R)});return Promise.all(g).then(m)}startAxisValueAnimation(s,o){const r=this.getAxisMotionValue(s);return Mc(this.visualElement,s),r.start(Df(s,r,0,o,this.visualElement,!1))}stopAnimation(){yn(s=>this.getAxisMotionValue(s).stop())}pauseAnimation(){yn(s=>{var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.pause()})}getAnimationState(s){var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.state}getAxisMotionValue(s){const o=`_drag${s.toUpperCase()}`,r=this.visualElement.getProps(),c=r[o];return c||this.visualElement.getValue(s,(r.initial?r.initial[s]:void 0)||0)}snapToCursor(s){yn(o=>{const{drag:r}=this.getProps();if(!zo(o,r,this.currentDirection))return;const{projection:c}=this.visualElement,h=this.getAxisMotionValue(o);if(c&&c.layout){const{min:f,max:m}=c.layout.layoutBox[o];h.set(s[o]-Jt(f,m,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:s,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!Wi(o)||!r||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};yn(f=>{const m=this.getAxisMotionValue(f);if(m&&this.constraints!==!1){const p=m.get();c[f]=lx({min:p,max:p},this.constraints[f])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),yn(f=>{if(!zo(f,s,null))return;const m=this.getAxisMotionValue(f),{min:p,max:g}=this.constraints[f];m.set(Jt(p,g,c[f]))})}addListeners(){if(!this.visualElement.current)return;hx.set(this.visualElement,this);const s=this.visualElement.current,o=al(s,"pointerdown",p=>{const{drag:g,dragListener:S=!0}=this.getProps();g&&S&&this.start(p)}),r=()=>{const{dragConstraints:p}=this.getProps();Wi(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:c}=this.visualElement,h=c.addEventListener("measure",r);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),Qt.read(r);const f=cl(window,"resize",()=>this.scalePositionWithinConstraints()),m=c.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:g})=>{this.isDragging&&g&&(yn(S=>{const b=this.getAxisMotionValue(S);b&&(this.originPoint[S]+=p[S].translate,b.set(b.get()+p[S].translate))}),this.visualElement.render())}));return()=>{f(),o(),h(),m&&m()}}getProps(){const s=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:r=!1,dragPropagation:c=!1,dragConstraints:h=!1,dragElastic:f=Gc,dragMomentum:m=!0}=s;return{...s,drag:o,dragDirectionLock:r,dragPropagation:c,dragConstraints:h,dragElastic:f,dragMomentum:m}}}function zo(a,s,o){return(s===!0||s===a)&&(o===null||o===a)}function px(a,s=10){let o=null;return Math.abs(a.y)>s?o="y":Math.abs(a.x)>s&&(o="x"),o}class vx extends wa{constructor(s){super(s),this.removeGroupControls=nn,this.removeListeners=nn,this.controls=new mx(s)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nn}unmount(){this.removeGroupControls(),this.removeListeners()}}const b0=a=>(s,o)=>{a&&Qt.postRender(()=>a(s,o))};class gx extends wa{constructor(){super(...arguments),this.removePointerDownListener=nn}onPointerDown(s){this.session=new cg(s,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yg(this.node)})}createPanHandlers(){const{onPanSessionStart:s,onPanStart:o,onPan:r,onPanEnd:c}=this.node.getProps();return{onSessionStart:b0(s),onStart:b0(o),onMove:r,onEnd:(h,f)=>{delete this.session,c&&Qt.postRender(()=>c(h,f))}}}mount(){this.removePointerDownListener=al(this.node.current,"pointerdown",s=>this.onPointerDown(s))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Vo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function T0(a,s){return s.max===s.min?0:a/(s.max-s.min)*100}const Ws={correct:(a,s)=>{if(!s.target)return a;if(typeof a=="string")if(ut.test(a))a=parseFloat(a);else return a;const o=T0(a,s.target.x),r=T0(a,s.target.y);return`${o}% ${r}%`}},yx={correct:(a,{treeScale:s,projectionDelta:o})=>{const r=a,c=ka.parse(a);if(c.length>5)return r;const h=ka.createTransformer(a),f=typeof c[0]!="number"?1:0,m=o.x.scale*s.x,p=o.y.scale*s.y;c[0+f]/=m,c[1+f]/=p;const g=Jt(m,p,.5);return typeof c[2+f]=="number"&&(c[2+f]/=g),typeof c[3+f]=="number"&&(c[3+f]/=g),h(c)}};class Sx extends x.Component{componentDidMount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:r,layoutId:c}=this.props,{projection:h}=s;Xb(bx),h&&(o.group&&o.group.add(h),r&&r.register&&c&&r.register(h),h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,onExitComplete:()=>this.safeToRemove()})),Vo.hasEverUpdated=!0}getSnapshotBeforeUpdate(s){const{layoutDependency:o,visualElement:r,drag:c,isPresent:h}=this.props,f=r.projection;return f&&(f.isPresent=h,c||s.layoutDependency!==o||o===void 0?f.willUpdate():this.safeToRemove(),s.isPresent!==h&&(h?f.promote():f.relegate()||Qt.postRender(()=>{const m=f.getStack();(!m||!m.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:s}=this.props.visualElement;s&&(s.root.didUpdate(),ef.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:c}=s;c&&(c.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(c),r&&r.deregister&&r.deregister(c))}safeToRemove(){const{safeToRemove:s}=this.props;s&&s()}render(){return null}}function Sg(a){const[s,o]=av(),r=x.useContext(Zc);return y.jsx(Sx,{...a,layoutGroup:r,switchLayoutGroup:x.useContext(fv),isPresent:s,safeToRemove:o})}const bx={borderRadius:{...Ws,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ws,borderTopRightRadius:Ws,borderBottomLeftRadius:Ws,borderBottomRightRadius:Ws,boxShadow:yx};function Tx(a,s,o){const r=Re(a)?a:rl(a);return r.start(Df("",r,s,o)),r.animation}function _x(a){return a instanceof SVGElement&&a.tagName!=="svg"}const xx=(a,s)=>a.depth-s.depth;class Ex{constructor(){this.children=[],this.isDirty=!1}add(s){hf(this.children,s),this.isDirty=!0}remove(s){mf(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(xx),this.isDirty=!1,this.children.forEach(s)}}function Ax(a,s){const o=zn.now(),r=({timestamp:c})=>{const h=c-o;h>=s&&(Ra(r),a(h-s))};return Qt.read(r,!0),()=>Ra(r)}const bg=["TopLeft","TopRight","BottomLeft","BottomRight"],Nx=bg.length,_0=a=>typeof a=="string"?parseFloat(a):a,x0=a=>typeof a=="number"||ut.test(a);function Dx(a,s,o,r,c,h){c?(a.opacity=Jt(0,o.opacity!==void 0?o.opacity:1,Cx(r)),a.opacityExit=Jt(s.opacity!==void 0?s.opacity:1,0,jx(r))):h&&(a.opacity=Jt(s.opacity!==void 0?s.opacity:1,o.opacity!==void 0?o.opacity:1,r));for(let f=0;f<Nx;f++){const m=`border${bg[f]}Radius`;let p=E0(s,m),g=E0(o,m);if(p===void 0&&g===void 0)continue;p||(p=0),g||(g=0),p===0||g===0||x0(p)===x0(g)?(a[m]=Math.max(Jt(_0(p),_0(g),r),0),(wn.test(g)||wn.test(p))&&(a[m]+="%")):a[m]=g}(s.rotate||o.rotate)&&(a.rotate=Jt(s.rotate||0,o.rotate||0,r))}function E0(a,s){return a[s]!==void 0?a[s]:a.borderRadius}const Cx=Tg(0,.5,Uv),jx=Tg(.5,.95,nn);function Tg(a,s,o){return r=>r<a?0:r>s?1:o(is(a,s,r))}function A0(a,s){a.min=s.min,a.max=s.max}function gn(a,s){A0(a.x,s.x),A0(a.y,s.y)}function N0(a,s){a.translate=s.translate,a.scale=s.scale,a.originPoint=s.originPoint,a.origin=s.origin}function D0(a,s,o,r,c){return a-=s,a=Xo(a,1/o,r),c!==void 0&&(a=Xo(a,1/c,r)),a}function Mx(a,s=0,o=1,r=.5,c,h=a,f=a){if(wn.test(s)&&(s=parseFloat(s),s=Jt(f.min,f.max,s/100)-f.min),typeof s!="number")return;let m=Jt(h.min,h.max,r);a===h&&(m-=s),a.min=D0(a.min,s,o,m,c),a.max=D0(a.max,s,o,m,c)}function C0(a,s,[o,r,c],h,f){Mx(a,s[o],s[r],s[c],s.scale,h,f)}const Ox=["x","scaleX","originX"],Rx=["y","scaleY","originY"];function j0(a,s,o,r){C0(a.x,s,Ox,o?o.x:void 0,r?r.x:void 0),C0(a.y,s,Rx,o?o.y:void 0,r?r.y:void 0)}function M0(a){return a.translate===0&&a.scale===1}function _g(a){return M0(a.x)&&M0(a.y)}function O0(a,s){return a.min===s.min&&a.max===s.max}function kx(a,s){return O0(a.x,s.x)&&O0(a.y,s.y)}function R0(a,s){return Math.round(a.min)===Math.round(s.min)&&Math.round(a.max)===Math.round(s.max)}function xg(a,s){return R0(a.x,s.x)&&R0(a.y,s.y)}function k0(a){return an(a.x)/an(a.y)}function w0(a,s){return a.translate===s.translate&&a.scale===s.scale&&a.originPoint===s.originPoint}class wx{constructor(){this.members=[]}add(s){hf(this.members,s),s.scheduleRender()}remove(s){if(mf(this.members,s),s===this.prevLead&&(this.prevLead=void 0),s===this.lead){const o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(s){const o=this.members.findIndex(c=>s===c);if(o===0)return!1;let r;for(let c=o;c>=0;c--){const h=this.members[c];if(h.isPresent!==!1){r=h;break}}return r?(this.promote(r),!0):!1}promote(s,o){const r=this.lead;if(s!==r&&(this.prevLead=r,this.lead=s,s.show(),r)){r.instance&&r.scheduleRender(),s.scheduleRender(),s.resumeFrom=r,o&&(s.resumeFrom.preserveOpacity=!0),r.snapshot&&(s.snapshot=r.snapshot,s.snapshot.latestValues=r.animationValues||r.latestValues),s.root&&s.root.isUpdating&&(s.isLayoutDirty=!0);const{crossfade:c}=s.options;c===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(s=>{const{options:o,resumingFrom:r}=s;o.onExitComplete&&o.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(s=>{s.instance&&s.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function zx(a,s,o){let r="";const c=a.x.translate/s.x,h=a.y.translate/s.y,f=(o==null?void 0:o.z)||0;if((c||h||f)&&(r=`translate3d(${c}px, ${h}px, ${f}px) `),(s.x!==1||s.y!==1)&&(r+=`scale(${1/s.x}, ${1/s.y}) `),o){const{transformPerspective:g,rotate:S,rotateX:b,rotateY:_,skewX:N,skewY:R}=o;g&&(r=`perspective(${g}px) ${r}`),S&&(r+=`rotate(${S}deg) `),b&&(r+=`rotateX(${b}deg) `),_&&(r+=`rotateY(${_}deg) `),N&&(r+=`skewX(${N}deg) `),R&&(r+=`skewY(${R}deg) `)}const m=a.x.scale*s.x,p=a.y.scale*s.y;return(m!==1||p!==1)&&(r+=`scale(${m}, ${p})`),r||"none"}const oi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},tl=typeof window<"u"&&window.MotionDebug!==void 0,_c=["","X","Y","Z"],Bx={visibility:"hidden"},z0=1e3;let Ux=0;function xc(a,s,o,r){const{latestValues:c}=s;c[a]&&(o[a]=c[a],s.setStaticValue(a,0),r&&(r[a]=0))}function Eg(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:s}=a.options;if(!s)return;const o=Dv(s);if(window.MotionHasOptimisedAnimation(o,"transform")){const{layout:c,layoutId:h}=a.options;window.MotionCancelOptimisedAnimation(o,"transform",Qt,!(c||h))}const{parent:r}=a;r&&!r.hasCheckedOptimisedAppear&&Eg(r)}function Ag({attachResizeListener:a,defaultParent:s,measureScroll:o,checkIsScrollRoot:r,resetTransform:c}){return class{constructor(f={},m=s==null?void 0:s()){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,tl&&(oi.totalNodes=oi.resolvedTargetDeltas=oi.recalculatedProjection=0),this.nodes.forEach(Gx),this.nodes.forEach(Xx),this.nodes.forEach(Kx),this.nodes.forEach(Hx),tl&&window.MotionDebug.record(oi)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=m?m.root||m:this,this.path=m?[...m.path,m]:[],this.parent=m,this.depth=m?m.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ex)}addEventListener(f,m){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new pf),this.eventHandlers.get(f).add(m)}notifyListeners(f,...m){const p=this.eventHandlers.get(f);p&&p.notify(...m)}hasListeners(f){return this.eventHandlers.has(f)}mount(f,m=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_x(f),this.instance=f;const{layoutId:p,layout:g,visualElement:S}=this.options;if(S&&!S.current&&S.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),m&&(g||p)&&(this.isLayoutDirty=!0),a){let b;const _=()=>this.root.updateBlockedByResize=!1;a(f,()=>{this.root.updateBlockedByResize=!0,b&&b(),b=Ax(_,250),Vo.hasAnimatedSinceResize&&(Vo.hasAnimatedSinceResize=!1,this.nodes.forEach(U0))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&S&&(p||g)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:_,hasRelativeTargetChanged:N,layout:R})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||S.getDefaultTransition()||Px,{onLayoutAnimationStart:X,onLayoutAnimationComplete:I}=S.getProps(),J=!this.targetLayout||!xg(this.targetLayout,R)||N,L=!_&&N;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||L||_&&(J||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(b,L);const k={...df(w,"layout"),onPlay:X,onComplete:I};(S.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else _||U0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=R})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ra(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(Zx),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Eg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let S=0;S<this.path.length;S++){const b=this.path[S];b.shouldResetTransform=!0,b.updateScroll("snapshot"),b.options.layoutRoot&&b.willUpdate(!1)}const{layoutId:m,layout:p}=this.options;if(m===void 0&&!p)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(B0);return}this.isUpdating||this.nodes.forEach(Yx),this.isUpdating=!1,this.nodes.forEach(Ix),this.nodes.forEach(Vx),this.nodes.forEach(Lx),this.clearAllSnapshots();const m=zn.now();Ae.delta=na(0,1e3/60,m-Ae.timestamp),Ae.timestamp=m,Ae.isProcessing=!0,mc.update.process(Ae),mc.preRender.process(Ae),mc.render.process(Ae),Ae.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ef.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qx),this.sharedNodes.forEach(Qx)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let p=0;p<this.path.length;p++)this.path[p].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ae(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:m}=this.options;m&&m.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let m=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(m=!1),m){const p=r(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:p,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!c)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,m=this.projectionDelta&&!_g(this.projectionDelta),p=this.getTransformTemplate(),g=p?p(this.latestValues,""):void 0,S=g!==this.prevTransformTemplateValue;f&&(m||li(this.latestValues)||S)&&(c(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const m=this.measurePageBox();let p=this.removeElementScroll(m);return f&&(p=this.removeTransform(p)),Wx(p),{animationId:this.root.animationId,measuredBox:m,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:m}=this.options;if(!m)return ae();const p=m.measureViewportBox();if(!(((f=this.scroll)===null||f===void 0?void 0:f.wasRoot)||this.path.some($x))){const{scroll:S}=this.root;S&&(es(p.x,S.offset.x),es(p.y,S.offset.y))}return p}removeElementScroll(f){var m;const p=ae();if(gn(p,f),!((m=this.scroll)===null||m===void 0)&&m.wasRoot)return p;for(let g=0;g<this.path.length;g++){const S=this.path[g],{scroll:b,options:_}=S;S!==this.root&&b&&_.layoutScroll&&(b.wasRoot&&gn(p,f),es(p.x,b.offset.x),es(p.y,b.offset.y))}return p}applyTransform(f,m=!1){const p=ae();gn(p,f);for(let g=0;g<this.path.length;g++){const S=this.path[g];!m&&S.options.layoutScroll&&S.scroll&&S!==S.root&&ns(p,{x:-S.scroll.offset.x,y:-S.scroll.offset.y}),li(S.latestValues)&&ns(p,S.latestValues)}return li(this.latestValues)&&ns(p,this.latestValues),p}removeTransform(f){const m=ae();gn(m,f);for(let p=0;p<this.path.length;p++){const g=this.path[p];if(!g.instance||!li(g.latestValues))continue;Hc(g.latestValues)&&g.updateSnapshot();const S=ae(),b=g.measurePageBox();gn(S,b),j0(m,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,S)}return li(this.latestValues)&&j0(m,this.latestValues),m}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ae.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){var m;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==p;if(!(f||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((m=this.parent)===null||m===void 0)&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:_}=this.options;if(!(!this.layout||!(b||_))){if(this.resolvedRelativeTargetAt=Ae.timestamp,!this.targetDelta&&!this.relativeTarget){const N=this.getClosestProjectingParent();N&&N.layout&&this.animationProgress!==1?(this.relativeParent=N,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ae(),this.relativeTargetOrigin=ae(),sl(this.relativeTargetOrigin,this.layout.layoutBox,N.layout.layoutBox),gn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ae(),this.targetWithTransforms=ae()),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):gn(this.target,this.layout.layoutBox),vg(this.target,this.targetDelta)):gn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const N=this.getClosestProjectingParent();N&&!!N.resumingFrom==!!this.resumingFrom&&!N.options.layoutScroll&&N.target&&this.animationProgress!==1?(this.relativeParent=N,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ae(),this.relativeTargetOrigin=ae(),sl(this.relativeTargetOrigin,this.target,N.target),gn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}tl&&oi.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Hc(this.parent.latestValues)||pg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var f;const m=this.getLead(),p=!!this.resumingFrom||this!==m;let g=!0;if((this.isProjectionDirty||!((f=this.parent)===null||f===void 0)&&f.isProjectionDirty)&&(g=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Ae.timestamp&&(g=!1),g)return;const{layout:S,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(S||b))return;gn(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,N=this.treeScale.y;fx(this.layoutCorrected,this.treeScale,this.path,p),m.layout&&!m.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(m.target=m.layout.layoutBox,m.targetWithTransforms=ae());const{target:R}=m;if(!R){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(N0(this.prevProjectionDelta.x,this.projectionDelta.x),N0(this.prevProjectionDelta.y,this.projectionDelta.y)),il(this.projectionDelta,this.layoutCorrected,R,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==N||!w0(this.projectionDelta.x,this.prevProjectionDelta.x)||!w0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",R)),tl&&oi.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var m;if((m=this.options.visualElement)===null||m===void 0||m.scheduleRender(),f){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ts(),this.projectionDelta=ts(),this.projectionDeltaWithTransform=ts()}setAnimationOrigin(f,m=!1){const p=this.snapshot,g=p?p.latestValues:{},S={...this.latestValues},b=ts();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!m;const _=ae(),N=p?p.source:void 0,R=this.layout?this.layout.source:void 0,w=N!==R,X=this.getStack(),I=!X||X.members.length<=1,J=!!(w&&!I&&this.options.crossfade===!0&&!this.path.some(Jx));this.animationProgress=0;let L;this.mixTargetDelta=k=>{const Y=k/1e3;V0(b.x,f.x,Y),V0(b.y,f.y,Y),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(sl(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Fx(this.relativeTarget,this.relativeTargetOrigin,_,Y),L&&kx(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=ae()),gn(L,this.relativeTarget)),w&&(this.animationValues=S,Dx(S,g,this.latestValues,Y,J,I)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ra(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qt.update(()=>{Vo.hasAnimatedSinceResize=!0,this.currentAnimation=Tx(0,z0,{...f,onUpdate:m=>{this.mixTargetDelta(m),f.onUpdate&&f.onUpdate(m)},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(z0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:m,target:p,layout:g,latestValues:S}=f;if(!(!m||!p||!g)){if(this!==f&&this.layout&&g&&Ng(this.options.animationType,this.layout.layoutBox,g.layoutBox)){p=this.target||ae();const b=an(this.layout.layoutBox.x);p.x.min=f.target.x.min,p.x.max=p.x.min+b;const _=an(this.layout.layoutBox.y);p.y.min=f.target.y.min,p.y.max=p.y.min+_}gn(m,p),ns(m,S),il(this.projectionDeltaWithTransform,this.layoutCorrected,m,S)}}registerSharedNode(f,m){this.sharedNodes.has(f)||this.sharedNodes.set(f,new wx),this.sharedNodes.get(f).add(m);const g=m.options.initialPromotionConfig;m.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(m):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var f;const{layoutId:m}=this.options;return m?((f=this.getStack())===null||f===void 0?void 0:f.lead)||this:this}getPrevLead(){var f;const{layoutId:m}=this.options;return m?(f=this.getStack())===null||f===void 0?void 0:f.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:m,preserveFollowOpacity:p}={}){const g=this.getStack();g&&g.promote(this,p),f&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let m=!1;const{latestValues:p}=f;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(m=!0),!m)return;const g={};p.z&&xc("z",f,g,this.animationValues);for(let S=0;S<_c.length;S++)xc(`rotate${_c[S]}`,f,g,this.animationValues),xc(`skew${_c[S]}`,f,g,this.animationValues);f.render();for(const S in g)f.setStaticValue(S,g[S]),this.animationValues&&(this.animationValues[S]=g[S]);f.scheduleRender()}getProjectionStyles(f){var m,p;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Bx;const g={visibility:""},S=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Bo(f==null?void 0:f.pointerEvents)||"",g.transform=S?S(this.latestValues,""):"none",g;const b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){const w={};return this.options.layoutId&&(w.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,w.pointerEvents=Bo(f==null?void 0:f.pointerEvents)||""),this.hasProjected&&!li(this.latestValues)&&(w.transform=S?S({},""):"none",this.hasProjected=!1),w}const _=b.animationValues||b.latestValues;this.applyTransformsToTarget(),g.transform=zx(this.projectionDeltaWithTransform,this.treeScale,_),S&&(g.transform=S(_,g.transform));const{x:N,y:R}=this.projectionDelta;g.transformOrigin=`${N.origin*100}% ${R.origin*100}% 0`,b.animationValues?g.opacity=b===this?(p=(m=_.opacity)!==null&&m!==void 0?m:this.latestValues.opacity)!==null&&p!==void 0?p:1:this.preserveOpacity?this.latestValues.opacity:_.opacityExit:g.opacity=b===this?_.opacity!==void 0?_.opacity:"":_.opacityExit!==void 0?_.opacityExit:0;for(const w in Go){if(_[w]===void 0)continue;const{correct:X,applyTo:I}=Go[w],J=g.transform==="none"?_[w]:X(_[w],b);if(I){const L=I.length;for(let k=0;k<L;k++)g[I[k]]=J}else g[w]=J}return this.options.layoutId&&(g.pointerEvents=b===this?Bo(f==null?void 0:f.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var m;return(m=f.currentAnimation)===null||m===void 0?void 0:m.stop()}),this.root.nodes.forEach(B0),this.root.sharedNodes.clear()}}}function Vx(a){a.updateLayout()}function Lx(a){var s;const o=((s=a.resumeFrom)===null||s===void 0?void 0:s.snapshot)||a.snapshot;if(a.isLead()&&a.layout&&o&&a.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:c}=a.layout,{animationType:h}=a.options,f=o.source!==a.layout.source;h==="size"?yn(b=>{const _=f?o.measuredBox[b]:o.layoutBox[b],N=an(_);_.min=r[b].min,_.max=_.min+N}):Ng(h,o.layoutBox,r)&&yn(b=>{const _=f?o.measuredBox[b]:o.layoutBox[b],N=an(r[b]);_.max=_.min+N,a.relativeTarget&&!a.currentAnimation&&(a.isProjectionDirty=!0,a.relativeTarget[b].max=a.relativeTarget[b].min+N)});const m=ts();il(m,r,o.layoutBox);const p=ts();f?il(p,a.applyTransform(c,!0),o.measuredBox):il(p,r,o.layoutBox);const g=!_g(m);let S=!1;if(!a.resumeFrom){const b=a.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:_,layout:N}=b;if(_&&N){const R=ae();sl(R,o.layoutBox,_.layoutBox);const w=ae();sl(w,r,N.layoutBox),xg(R,w)||(S=!0),b.options.layoutRoot&&(a.relativeTarget=w,a.relativeTargetOrigin=R,a.relativeParent=b)}}}a.notifyListeners("didUpdate",{layout:r,snapshot:o,delta:p,layoutDelta:m,hasLayoutChanged:g,hasRelativeTargetChanged:S})}else if(a.isLead()){const{onExitComplete:r}=a.options;r&&r()}a.options.transition=void 0}function Gx(a){tl&&oi.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 Hx(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function qx(a){a.clearSnapshot()}function B0(a){a.clearMeasurements()}function Yx(a){a.isLayoutDirty=!1}function Ix(a){const{visualElement:s}=a.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),a.resetTransform()}function U0(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function Xx(a){a.resolveTargetDelta()}function Kx(a){a.calcProjection()}function Zx(a){a.resetSkewAndRotation()}function Qx(a){a.removeLeadSnapshot()}function V0(a,s,o){a.translate=Jt(s.translate,0,o),a.scale=Jt(s.scale,1,o),a.origin=s.origin,a.originPoint=s.originPoint}function L0(a,s,o,r){a.min=Jt(s.min,o.min,r),a.max=Jt(s.max,o.max,r)}function Fx(a,s,o,r){L0(a.x,s.x,o.x,r),L0(a.y,s.y,o.y,r)}function Jx(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const Px={duration:.45,ease:[.4,0,.1,1]},G0=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),H0=G0("applewebkit/")&&!G0("chrome/")?Math.round:nn;function q0(a){a.min=H0(a.min),a.max=H0(a.max)}function Wx(a){q0(a.x),q0(a.y)}function Ng(a,s,o){return a==="position"||a==="preserve-aspect"&&!ex(k0(s),k0(o),.2)}function $x(a){var s;return a!==a.root&&((s=a.scroll)===null||s===void 0?void 0:s.wasRoot)}const t2=Ag({attachResizeListener:(a,s)=>cl(a,"resize",s),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ec={current:void 0},Dg=Ag({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Ec.current){const a=new t2({});a.mount(window),a.setOptions({layoutScroll:!0}),Ec.current=a}return Ec.current},resetTransform:(a,s)=>{a.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),e2={pan:{Feature:gx},drag:{Feature:vx,ProjectionNode:Dg,MeasureLayout:Sg}};function n2(a,s,o){var r;if(a instanceof Element)return[a];if(typeof a=="string"){let c=document;const h=(r=void 0)!==null&&r!==void 0?r:c.querySelectorAll(a);return h?Array.from(h):[]}return Array.from(a)}function Cg(a,s){const o=n2(a),r=new AbortController,c={passive:!0,...s,signal:r.signal};return[o,c,()=>r.abort()]}function Y0(a){return s=>{s.pointerType==="touch"||ug()||a(s)}}function a2(a,s,o={}){const[r,c,h]=Cg(a,o),f=Y0(m=>{const{target:p}=m,g=s(m);if(typeof g!="function"||!p)return;const S=Y0(b=>{g(b),p.removeEventListener("pointerleave",S)});p.addEventListener("pointerleave",S,c)});return r.forEach(m=>{m.addEventListener("pointerenter",f,c)}),h}function I0(a,s,o){const{props:r}=a;a.animationState&&r.whileHover&&a.animationState.setActive("whileHover",o==="Start");const c="onHover"+o,h=r[c];h&&Qt.postRender(()=>h(s,ml(s)))}class i2 extends wa{mount(){const{current:s}=this.node;s&&(this.unmount=a2(s,o=>(I0(this.node,o,"Start"),r=>I0(this.node,r,"End"))))}unmount(){}}class s2 extends wa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let s=!1;try{s=this.node.current.matches(":focus-visible")}catch{s=!0}!s||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=hl(cl(this.node.current,"focus",()=>this.onFocus()),cl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const jg=(a,s)=>s?a===s?!0:jg(a,s.parentElement):!1,l2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function o2(a){return l2.has(a.tagName)||a.tabIndex!==-1}const el=new WeakSet;function X0(a){return s=>{s.key==="Enter"&&a(s)}}function Ac(a,s){a.dispatchEvent(new PointerEvent("pointer"+s,{isPrimary:!0,bubbles:!0}))}const r2=(a,s)=>{const o=a.currentTarget;if(!o)return;const r=X0(()=>{if(el.has(o))return;Ac(o,"down");const c=X0(()=>{Ac(o,"up")}),h=()=>Ac(o,"cancel");o.addEventListener("keyup",c,s),o.addEventListener("blur",h,s)});o.addEventListener("keydown",r,s),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),s)};function K0(a){return Cf(a)&&!ug()}function u2(a,s,o={}){const[r,c,h]=Cg(a,o),f=m=>{const p=m.currentTarget;if(!K0(m)||el.has(p))return;el.add(p);const g=s(m),S=(N,R)=>{window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",_),!(!K0(N)||!el.has(p))&&(el.delete(p),typeof g=="function"&&g(N,{success:R}))},b=N=>{S(N,o.useGlobalTarget||jg(p,N.target))},_=N=>{S(N,!1)};window.addEventListener("pointerup",b,c),window.addEventListener("pointercancel",_,c)};return r.forEach(m=>{!o2(m)&&m.getAttribute("tabindex")===null&&(m.tabIndex=0),(o.useGlobalTarget?window:m).addEventListener("pointerdown",f,c),m.addEventListener("focus",g=>r2(g,c),c)}),h}function Z0(a,s,o){const{props:r}=a;a.animationState&&r.whileTap&&a.animationState.setActive("whileTap",o==="Start");const c="onTap"+(o==="End"?"":o),h=r[c];h&&Qt.postRender(()=>h(s,ml(s)))}class c2 extends wa{mount(){const{current:s}=this.node;s&&(this.unmount=u2(s,o=>(Z0(this.node,o,"Start"),(r,{success:c})=>Z0(this.node,r,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Yc=new WeakMap,Nc=new WeakMap,f2=a=>{const s=Yc.get(a.target);s&&s(a)},d2=a=>{a.forEach(f2)};function h2({root:a,...s}){const o=a||document;Nc.has(o)||Nc.set(o,{});const r=Nc.get(o),c=JSON.stringify(s);return r[c]||(r[c]=new IntersectionObserver(d2,{root:a,...s})),r[c]}function m2(a,s,o){const r=h2(s);return Yc.set(a,o),r.observe(a),()=>{Yc.delete(a),r.unobserve(a)}}const p2={some:0,all:1};class v2 extends wa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:s={}}=this.node.getProps(),{root:o,margin:r,amount:c="some",once:h}=s,f={root:o?o.current:void 0,rootMargin:r,threshold:typeof c=="number"?c:p2[c]},m=p=>{const{isIntersecting:g}=p;if(this.isInView===g||(this.isInView=g,h&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:S,onViewportLeave:b}=this.node.getProps(),_=g?S:b;_&&_(p)};return m2(this.node.current,f,m)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:s,prevProps:o}=this.node;["amount","margin","root"].some(g2(s,o))&&this.startObserver()}unmount(){}}function g2({viewport:a={}},{viewport:s={}}={}){return o=>a[o]!==s[o]}const y2={inView:{Feature:v2},tap:{Feature:c2},focus:{Feature:s2},hover:{Feature:i2}},S2={layout:{ProjectionNode:Dg,MeasureLayout:Sg}},Ic={current:null},Mg={current:!1};function b2(){if(Mg.current=!0,!!Jc)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),s=()=>Ic.current=a.matches;a.addListener(s),s()}else Ic.current=!1}const T2=[...Pv,Me,ka],_2=a=>T2.find(Jv(a)),Q0=new WeakMap;function x2(a,s,o){for(const r in s){const c=s[r],h=o[r];if(Re(c))a.addValue(r,c);else if(Re(h))a.addValue(r,rl(c,{owner:a}));else if(h!==c)if(a.hasValue(r)){const f=a.getValue(r);f.liveStyle===!0?f.jump(c):f.hasAnimated||f.set(c)}else{const f=a.getStaticValue(r);a.addValue(r,rl(f!==void 0?f:c,{owner:a}))}}for(const r in o)s[r]===void 0&&a.removeValue(r);return s}const F0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class E2{scrapeMotionValuesFromProps(s,o,r){return{}}constructor({parent:s,props:o,presenceContext:r,reducedMotionConfig:c,blockInitialAnimation:h,visualState:f},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ef,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 N=zn.now();this.renderScheduledAt<N&&(this.renderScheduledAt=N,Qt.render(this.render,!1,!0))};const{latestValues:p,renderState:g,onUpdate:S}=f;this.onUpdate=S,this.latestValues=p,this.baseTarget={...p},this.initialValues=o.initial?{...p}:{},this.renderState=g,this.parent=s,this.props=o,this.presenceContext=r,this.depth=s?s.depth+1:0,this.reducedMotionConfig=c,this.options=m,this.blockInitialAnimation=!!h,this.isControllingVariants=Jo(o),this.isVariantNode=uv(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(s&&s.current);const{willChange:b,..._}=this.scrapeMotionValuesFromProps(o,{},this);for(const N in _){const R=_[N];p[N]!==void 0&&Re(R)&&R.set(p[N],!1)}}mount(s){this.current=s,Q0.set(s,this),this.projection&&!this.projection.instance&&this.projection.mount(s),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,r)=>this.bindToMotionValue(r,o)),Mg.current||b2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ic.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Q0.delete(this.current),this.projection&&this.projection.unmount(),Ra(this.notifyUpdate),Ra(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const o=this.features[s];o&&(o.unmount(),o.isMounted=!1)}this.current=null}bindToMotionValue(s,o){this.valueSubscriptions.has(s)&&this.valueSubscriptions.get(s)();const r=fi.has(s),c=o.on("change",m=>{this.latestValues[s]=m,this.props.onUpdate&&Qt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),h=o.on("renderRequest",this.scheduleRender);let f;window.MotionCheckAppearSync&&(f=window.MotionCheckAppearSync(this,s,o)),this.valueSubscriptions.set(s,()=>{c(),h(),f&&f(),o.owner&&o.stop()})}sortNodePosition(s){return!this.current||!this.sortInstanceNodePosition||this.type!==s.type?0:this.sortInstanceNodePosition(this.current,s.current)}updateFeatures(){let s="animation";for(s in as){const o=as[s];if(!o)continue;const{isEnabled:r,Feature:c}=o;if(!this.features[s]&&c&&r(this.props)&&(this.features[s]=new c(this)),this.features[s]){const h=this.features[s];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ae()}getStaticValue(s){return this.latestValues[s]}setStaticValue(s,o){this.latestValues[s]=o}update(s,o){(s.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=s,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let r=0;r<F0.length;r++){const c=F0[r];this.propEventSubscriptions[c]&&(this.propEventSubscriptions[c](),delete this.propEventSubscriptions[c]);const h="on"+c,f=s[h];f&&(this.propEventSubscriptions[c]=this.on(c,f))}this.prevMotionValues=x2(this,this.scrapeMotionValuesFromProps(s,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(s){return this.props.variants?this.props.variants[s]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(s){const o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(s),()=>o.variantChildren.delete(s)}addValue(s,o){const r=this.values.get(s);o!==r&&(r&&this.removeValue(s),this.bindToMotionValue(s,o),this.values.set(s,o),this.latestValues[s]=o.get())}removeValue(s){this.values.delete(s);const o=this.valueSubscriptions.get(s);o&&(o(),this.valueSubscriptions.delete(s)),delete this.latestValues[s],this.removeValueFromRenderState(s,this.renderState)}hasValue(s){return this.values.has(s)}getValue(s,o){if(this.props.values&&this.props.values[s])return this.props.values[s];let r=this.values.get(s);return r===void 0&&o!==void 0&&(r=rl(o===null?void 0:o,{owner:this}),this.addValue(s,r)),r}readValue(s,o){var r;let c=this.latestValues[s]!==void 0||!this.current?this.latestValues[s]:(r=this.getBaseTargetFromProps(this.props,s))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,s,this.options);return c!=null&&(typeof c=="string"&&(Qv(c)||Lv(c))?c=parseFloat(c):!_2(c)&&ka.test(o)&&(c=Xv(s,o)),this.setBaseTarget(s,Re(c)?c.get():c)),Re(c)?c.get():c}setBaseTarget(s,o){this.baseTarget[s]=o}getBaseTarget(s){var o;const{initial:r}=this.props;let c;if(typeof r=="string"||typeof r=="object"){const f=af(this.props,r,(o=this.presenceContext)===null||o===void 0?void 0:o.custom);f&&(c=f[s])}if(r&&c!==void 0)return c;const h=this.getBaseTargetFromProps(this.props,s);return h!==void 0&&!Re(h)?h:this.initialValues[s]!==void 0&&c===void 0?void 0:this.baseTarget[s]}on(s,o){return this.events[s]||(this.events[s]=new pf),this.events[s].add(o)}notify(s,...o){this.events[s]&&this.events[s].notify(...o)}}class Og extends E2{constructor(){super(...arguments),this.KeyframeResolver=Wv}sortInstanceNodePosition(s,o){return s.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(s,o){return s.style?s.style[o]:void 0}removeValueFromRenderState(s,{vars:o,style:r}){delete o[s],delete r[s]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:s}=this.props;Re(s)&&(this.childSubscription=s.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}}function A2(a){return window.getComputedStyle(a)}class N2 extends Og{constructor(){super(...arguments),this.type="html",this.renderInstance=yv}readValueFromInstance(s,o){if(fi.has(o)){const r=xf(o);return r&&r.default||0}else{const r=A2(s),c=(pv(o)?r.getPropertyValue(o):r[o])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(s,{transformPagePoint:o}){return gg(s,o)}build(s,o,r){of(s,o,r.transformTemplate)}scrapeMotionValuesFromProps(s,o,r){return ff(s,o,r)}}class D2 extends Og{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ae}getBaseTargetFromProps(s,o){return s[o]}readValueFromInstance(s,o){if(fi.has(o)){const r=xf(o);return r&&r.default||0}return o=Sv.has(o)?o:tf(o),s.getAttribute(o)}scrapeMotionValuesFromProps(s,o,r){return _v(s,o,r)}build(s,o,r){rf(s,o,this.isSVGTag,r.transformTemplate)}renderInstance(s,o,r,c){bv(s,o,r,c)}mount(s){this.isSVGTag=cf(s.tagName),super.mount(s)}}const C2=(a,s)=>nf(a)?new D2(s):new N2(s,{allowProjection:a!==x.Fragment}),j2=tT({...X_,...y2,...e2,...S2},C2),ui=pb(j2);var Ye;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.DISCONNECTED=1]="DISCONNECTED",a[a.CONNECTING=2]="CONNECTING",a[a.CONNECTED=3]="CONNECTED",a[a.SLEEPING=4]="SLEEPING",a[a.ERROR=5]="ERROR"})(Ye||(Ye={}));var ge;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.PENDING=1]="PENDING",a[a.RUNNING=2]="RUNNING",a[a.WAITING_INPUT=3]="WAITING_INPUT",a[a.SUSPENDED=4]="SUSPENDED",a[a.COMPLETED=5]="COMPLETED",a[a.FAILED=6]="FAILED",a[a.KILLED=7]="KILLED"})(ge||(ge={}));var ce;(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"})(ce||(ce={}));var Oe;(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"})(Oe||(Oe={}));var Ma;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.ACTIVE=1]="ACTIVE",a[a.ARCHIVED=2]="ARCHIVED"})(Ma||(Ma={}));var Oa;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.ENV_VAR=1]="ENV_VAR",a[a.FILE=2]="FILE"})(Oa||(Oa={}));var fe;(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"})(fe||(fe={}));const M2=8;Object.assign(Object.create(null),{"":Ye.UNSPECIFIED,disconnected:Ye.DISCONNECTED,connecting:Ye.CONNECTING,connected:Ye.CONNECTED,sleeping:Ye.SLEEPING,error:Ye.ERROR});Ye.UNSPECIFIED+"",Ye.DISCONNECTED+"",Ye.CONNECTING+"",Ye.CONNECTED+"",Ye.SLEEPING+"",Ye.ERROR+"";Object.assign(Object.create(null),{"":ge.UNSPECIFIED,pending:ge.PENDING,running:ge.RUNNING,waiting_input:ge.WAITING_INPUT,suspended:ge.SUSPENDED,completed:ge.COMPLETED,failed:ge.FAILED,killed:ge.KILLED});ge.UNSPECIFIED+"",ge.PENDING+"",ge.RUNNING+"",ge.WAITING_INPUT+"",ge.SUSPENDED+"",ge.COMPLETED+"",ge.FAILED+"",ge.KILLED+"";Object.assign(Object.create(null),{"":ce.UNSPECIFIED,text:ce.TEXT,tool_use:ce.TOOL_USE,tool_result:ce.TOOL_RESULT,error:ce.ERROR,status:ce.STATUS,system:ce.SYSTEM,finding:ce.FINDING,subtask_create:ce.SUBTASK_CREATE});ce.UNSPECIFIED+"",ce.TEXT+"",ce.TOOL_USE+"",ce.TOOL_RESULT+"",ce.ERROR+"",ce.STATUS+"",ce.SYSTEM+"",ce.FINDING+"",ce.SUBTASK_CREATE+"";Object.assign(Object.create(null),{"":fe.UNSPECIFIED,text:fe.TEXT,tool_use:fe.TOOL_USE,tool_result:fe.TOOL_RESULT,error:fe.ERROR,status:fe.STATUS,system:fe.SYSTEM,finding:fe.FINDING,subtask_create:fe.SUBTASK_CREATE});fe.UNSPECIFIED+"",fe.TEXT+"",fe.TOOL_USE+"",fe.TOOL_RESULT+"",fe.ERROR+"",fe.STATUS+"",fe.SYSTEM+"",fe.FINDING+"",fe.SUBTASK_CREATE+"";Object.assign(Object.create(null),{"":Oa.UNSPECIFIED,env_var:Oa.ENV_VAR,file:Oa.FILE});Oa.UNSPECIFIED+"",Oa.ENV_VAR+"",Oa.FILE+"";Object.assign(Object.create(null),{"":Oe.UNSPECIFIED,pending:Oe.PENDING,assigned:Oe.ASSIGNED,in_progress:Oe.IN_PROGRESS,review:Oe.REVIEW,done:Oe.DONE,failed:Oe.FAILED});Oe.UNSPECIFIED+"",Oe.PENDING+"",Oe.ASSIGNED+"",Oe.IN_PROGRESS+"",Oe.REVIEW+"",Oe.DONE+"",Oe.FAILED+"";Object.assign(Object.create(null),{"":Ma.UNSPECIFIED,active:Ma.ACTIVE,archived:Ma.ARCHIVED});Ma.UNSPECIFIED+"",Ma.ACTIVE+"",Ma.ARCHIVED+"";const O2="_container_33dc5_1",R2="_header_33dc5_5",k2="_addButton_33dc5_17",w2="_createForm_33dc5_35",z2="_createInput_33dc5_41",B2="_createButton_33dc5_71",U2="_emptyState_33dc5_101",V2="_projectRow_33dc5_107",L2="_selected_33dc5_127",G2="_expandArrow_33dc5_134",H2="_expanded_33dc5_141",q2="_projectName_33dc5_145",Y2="_taskCount_33dc5_149",I2="_newTaskButton_33dc5_155",X2="_taskRow_33dc5_173",K2="_taskStatusIcon_33dc5_202",Z2="_taskTitle_33dc5_206",Q2="_dependencyBadge_33dc5_213",F2="_blockedBadge_33dc5_225",J2="_leafSpacer_33dc5_230",P2="_childCountBadge_33dc5_235",W2="_addChildButton_33dc5_248",$2="_emptyTasks_33dc5_277",Xt={container:O2,header:R2,addButton:k2,createForm:w2,createInput:z2,createButton:B2,emptyState:U2,projectRow:V2,selected:L2,expandArrow:G2,expanded:H2,projectName:q2,taskCount:Y2,newTaskButton:I2,taskRow:X2,taskStatusIcon:K2,taskTitle:Z2,dependencyBadge:Q2,blockedBadge:F2,leafSpacer:J2,childCountBadge:P2,addChildButton:W2,emptyTasks:$2},J0={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:{color:"var(--accent-purple, #a78bfa)",icon:"⧖"}};function tE(a){const s=new Map(a.map(r=>[r.id,{...r,children:[]}])),o=[];for(const r of s.values())r.parentTaskId&&s.has(r.parentTaskId)?s.get(r.parentTaskId).children.push(r):o.push(r);for(const r of s.values())r.children.sort((c,h)=>c.sortOrder-h.sortOrder);return o.sort((r,c)=>r.sortOrder-c.sortOrder)}const eE=34,nE=16;function Rg({node:a,depth:s,expandedTasks:o,toggleTask:r,selectedTaskId:c,setViewMode:h,projectId:f,taskStatusById:m}){const p=J0[a.status]||J0.pending,g=a.dependsOn.length>0&&a.dependsOn.some(R=>m.get(R)!=="done"),S=o.has(a.id),b=a.children.length>0,_=c===a.id,N=eE+s*nE;return y.jsxs(y.Fragment,{children:[y.jsxs("div",{onClick:()=>h({kind:"task",taskId:a.id}),className:`${Xt.taskRow} ${_?Xt.selected:""}`,style:{paddingLeft:N},"data-task-id":a.id,children:[b&&y.jsx("span",{className:`${Xt.expandArrow} ${S?Xt.expanded:""}`,role:"button",tabIndex:0,"aria-label":S?"Collapse task":"Expand task",onClick:R=>{R.stopPropagation(),r(a.id)},onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),R.stopPropagation(),r(a.id))},children:"▸"}),!b&&y.jsx("span",{className:Xt.leafSpacer}),y.jsx("span",{className:Xt.taskStatusIcon,style:{color:p.color},children:p.icon}),y.jsx("span",{className:Xt.taskTitle,children:a.title}),b&&y.jsxs("span",{className:Xt.childCountBadge,children:[a.children.filter(R=>R.status==="done").length,"/",a.children.length]}),a.dependsOn.length>0&&y.jsx("span",{className:`${Xt.dependencyBadge} ${g?Xt.blockedBadge:""}`,title:`Depends on: ${a.dependsOn.join(", ")}`,children:g?"blocked":"dep"}),s<M2&&y.jsx("button",{onClick:R=>{R.stopPropagation(),h({kind:"new_task",projectId:f,parentTaskId:a.id})},title:"Add child task","aria-label":"Add child task",className:Xt.addChildButton,children:"+"})]}),y.jsx(Pc,{children:b&&S&&y.jsx(ui.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(R=>y.jsx(Rg,{node:R,depth:s+1,expandedTasks:o,toggleTask:r,selectedTaskId:c,setViewMode:h,projectId:f,taskStatusById:m},R.id))})})]})}function aE({viewMode:a,setViewMode:s}){const{projects:o,tasks:r,loadTasks:c,createProject:h}=aa(),[f,m]=x.useState(new Set),[p,g]=x.useState(new Set),[S,b]=x.useState(new Set),[_,N]=x.useState(!1),[R,w]=x.useState(""),X=a.kind==="project"?a.projectId:void 0,I=a.kind==="task"?a.taskId:void 0,J=x.useMemo(()=>new Map(r.map(G=>[G.id,G.status])),[r]),L=G=>{m(F=>{const B=new Set(F);return B.has(G)?B.delete(G):(B.add(G),c(G)),B})},k=G=>{g(F=>{const B=new Set(F);return B.has(G)?(B.delete(G),b(nt=>new Set(nt).add(G))):(B.add(G),b(nt=>{const ct=new Set(nt);return ct.delete(G),ct})),B})};x.useEffect(()=>{const G=new Set(r.filter(F=>F.parentTaskId).map(F=>F.parentTaskId));G.size>0&&g(F=>{const B=new Set(F);for(const nt of G)S.has(nt)||B.add(nt);return B})},[r,S]),x.useEffect(()=>{X&&!f.has(X)&&(m(G=>new Set(G).add(X)),c(X))},[X,f,c]);const Y=()=>{R.trim()&&(h(R.trim()),w(""),N(!1))};return y.jsxs("div",{className:Xt.container,children:[y.jsxs("div",{className:Xt.header,children:[y.jsx("span",{children:"Projects"}),y.jsx("button",{className:Xt.addButton,onClick:()=>N(!_),"aria-label":"Create project",title:"Create project",children:"+"})]}),_&&y.jsxs("div",{className:Xt.createForm,children:[y.jsx("input",{type:"text",value:R,onChange:G=>w(G.target.value),onKeyDown:G=>G.key==="Enter"&&Y(),placeholder:"Project name...",autoFocus:!0,className:Xt.createInput}),y.jsx("button",{onClick:Y,className:Xt.createButton,children:"OK"})]}),o.length===0&&!_&&y.jsx("div",{className:Xt.emptyState,children:"No projects. Click + to create one."}),o.map(G=>{const F=f.has(G.id),B=r.filter(st=>st.projectId===G.id),nt=X===G.id,ct=F?tE(B):[];return y.jsxs("div",{children:[y.jsxs("div",{onClick:()=>{L(G.id),s({kind:"project",projectId:G.id})},className:`${Xt.projectRow} ${nt?Xt.selected:""}`,children:[y.jsx("span",{className:`${Xt.expandArrow} ${F?Xt.expanded:""}`,children:"▸"}),y.jsx("span",{className:Xt.projectName,children:G.name}),y.jsx("span",{className:Xt.taskCount,children:B.length>0&&`${B.filter(st=>st.status==="done").length}/${B.length}`}),y.jsx("button",{onClick:st=>{st.stopPropagation(),s({kind:"new_task",projectId:G.id})},title:"New task",className:Xt.newTaskButton,children:"+"})]}),y.jsx(Pc,{children:F&&y.jsxs(ui.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:[ct.map(st=>y.jsx(Rg,{node:st,depth:0,expandedTasks:p,toggleTask:k,selectedTaskId:I,setViewMode:s,projectId:G.id,taskStatusById:J},st.id)),B.length===0&&y.jsx("div",{className:Xt.emptyTasks,children:"No tasks yet"})]})})]},G.id)})]})}const iE="_container_v2rs3_1",sE="_tabBar_v2rs3_28",lE="_tab_v2rs3_28",oE="_active_v2rs3_54",rE="_content_v2rs3_60",si={container:iE,tabBar:sE,tab:lE,active:oE,content:rE},uE=260,kg=180,wg=500,zg="grackle-sidebar-width";function cE(){try{const a=localStorage.getItem(zg);if(a!==null){const s=Number(a);if(Number.isFinite(s)&&s>=kg&&s<=wg)return s}}catch{}return uE}function fE(a){try{localStorage.setItem(zg,String(a))}catch{}}function dE({viewMode:a,setViewMode:s}){const[o,r]=x.useState("projects"),[c]=x.useState(cE),h=x.useRef(null);return x.useEffect(()=>{const f=h.current;if(!f)return;const m=new ResizeObserver(p=>{for(const g of p){const S=g.borderBoxSize[0];if(S){const b=Math.round(S.inlineSize);b>=kg&&b<=wg&&fE(b)}}});return m.observe(f),()=>{m.disconnect()}},[]),y.jsxs("div",{className:si.container,ref:h,"data-testid":"sidebar",style:{width:c},children:[y.jsxs("div",{className:si.tabBar,children:[y.jsx("button",{className:`${si.tab} ${o==="projects"?si.active:""}`,onClick:()=>r("projects"),children:"Projects"}),y.jsx("button",{className:`${si.tab} ${o==="environments"?si.active:""}`,onClick:()=>r("environments"),children:"Environments"})]}),y.jsx("div",{className:si.content,children:o==="projects"?y.jsx(aE,{viewMode:a,setViewMode:s}):y.jsx(ab,{viewMode:a,setViewMode:s})})]})}const hE="_bar_yszm0_1",mE="_barColumn_yszm0_25",pE="_barRow_yszm0_50",vE="_input_yszm0_56",gE="_inputSmall_yszm0_84",yE="_textarea_yszm0_113",SE="_select_yszm0_145",bE="_btnPrimary_yszm0_174",TE="_btnDanger_yszm0_200",_E="_btnGhost_yszm0_232",xE="_badge_yszm0_245",EE="_statusText_yszm0_255",AE="_statusCompleted_yszm0_260",NE="_statusFailed_yszm0_264",DE="_statusBlocked_yszm0_268",CE="_hintText_yszm0_273",jE="_creatingHint_yszm0_278",ME="_errorHint_yszm0_284",W={bar:hE,barColumn:mE,barRow:pE,input:vE,inputSmall:gE,textarea:yE,select:SE,btnPrimary:bE,btnDanger:TE,btnGhost:_E,badge:xE,statusText:EE,statusCompleted:AE,statusFailed:NE,statusBlocked:DE,hintText:CE,creatingHint:jE,errorHint:ME};function P0({value:a,onChange:s}){return y.jsxs("select",{value:a,onChange:o=>s(o.target.value),className:W.select,children:[y.jsx("option",{value:"claude-code",children:"claude-code"}),y.jsx("option",{value:"codex",children:"codex"}),y.jsx("option",{value:"copilot",children:"copilot"}),y.jsx("option",{value:"stub",children:"stub"})]})}function OE({viewMode:a,setViewMode:s}){const{spawn:o,sendInput:r,kill:c,sessions:h,tasks:f,environments:m,createTask:p,startTask:g,approveTask:S,rejectTask:b,deleteTask:_,addEnvironment:N,codespaces:R,codespaceError:w,codespaceCreating:X,listCodespaces:I,createCodespace:J}=aa(),[L,k]=x.useState(""),[Y,G]=x.useState(a.kind==="new_chat"?a.runtime:"claude-code"),[F,B]=x.useState(""),[nt,ct]=x.useState(""),[st,ft]=x.useState(""),[gt,Dt]=x.useState(""),[Yt,E]=x.useState(""),[q,et]=x.useState("local"),[yt,St]=x.useState("claude-code"),[Gt,Ct]=x.useState(""),[mt,Ht]=x.useState(""),[de,Ne]=x.useState(""),[Ie,sn]=x.useState(""),[ke,Sn]=x.useState(""),[Xe,Ke]=x.useState(""),[bn,we]=x.useState(""),[Ze,ln]=x.useState(""),[K,at]=x.useState("pick");x.useEffect(()=>{a.kind==="new_chat"&&G(a.runtime)},[a]);const $=a.kind==="session"?h.find(H=>H.id===a.sessionId):void 0,Q=a.kind==="task"?f.find(H=>H.id===a.taskId):void 0,bt=Q!=null&&Q.sessionId?h.find(H=>H.id===Q.sessionId):void 0,Ot=Q?Q.dependsOn.some(H=>{const P=f.find(Z=>Z.id===H);return P&&P.status!=="done"}):!1;if(a.kind==="empty")return y.jsx("div",{className:W.bar,children:y.jsx("span",{className:W.hintText,children:"Select a session or click + to start"})});if(a.kind==="new_environment"){const H=()=>!(!Yt.trim()||q==="ssh"&&!Gt.trim()||q==="codespace"&&!Xe.trim()),P=()=>{if(!H())return;const Z={};if(q==="local"){if(Gt.trim()&&(Z.host=Gt.trim()),mt.trim()){const Tt=parseInt(mt,10);Number.isFinite(Tt)&&(Z.port=Tt)}}else if(q==="ssh"){if(Z.host=Gt.trim(),de.trim()&&(Z.user=de.trim()),mt.trim()){const Tt=parseInt(mt,10);Number.isFinite(Tt)&&(Z.sshPort=Tt)}bn.trim()&&(Z.identityFile=bn.trim())}else q==="docker"?(Ie.trim()&&(Z.image=Ie.trim()),ke.trim()&&(Z.repo=ke.trim())):q==="codespace"&&(Z.codespaceName=Xe.trim());N(Yt.trim(),q,Z,yt),E(""),et("local"),St("claude-code"),Ct(""),Ht(""),Ne(""),sn(""),Sn(""),Ke(""),we(""),ln(""),at("pick"),s({kind:"empty"})};return y.jsxs("div",{className:W.barColumn,children:[y.jsxs("div",{className:W.barRow,children:[y.jsx("span",{className:W.badge,children:"new env"}),y.jsx("input",{type:"text",value:Yt,onChange:Z=>E(Z.target.value),placeholder:"Environment name...",autoFocus:!0,className:W.input}),y.jsxs("select",{value:q,onChange:Z=>{et(Z.target.value),Z.target.value==="codespace"&&(I(),at("pick"),Ke(""))},className:W.select,children:[y.jsx("option",{value:"local",children:"local"}),y.jsx("option",{value:"ssh",children:"ssh"}),y.jsx("option",{value:"docker",children:"docker"}),y.jsx("option",{value:"codespace",children:"codespace"})]}),y.jsx(P0,{value:yt,onChange:St}),y.jsx("button",{onClick:P,disabled:!H(),className:W.btnPrimary,children:"Add"})]}),y.jsxs("div",{className:W.barRow,children:[q==="local"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Gt,onChange:Z=>Ct(Z.target.value),placeholder:"Host (optional)...",className:W.inputSmall}),y.jsx("input",{type:"text",value:mt,onChange:Z=>Ht(Z.target.value),placeholder:"Port (optional)...",className:W.inputSmall})]}),q==="ssh"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Gt,onChange:Z=>Ct(Z.target.value),placeholder:"Host (required)...",className:W.inputSmall}),y.jsx("input",{type:"text",value:de,onChange:Z=>Ne(Z.target.value),placeholder:"User (optional)...",className:W.inputSmall}),y.jsx("input",{type:"text",value:mt,onChange:Z=>Ht(Z.target.value),placeholder:"SSH port (optional)...",className:W.inputSmall}),y.jsx("input",{type:"text",value:bn,onChange:Z=>we(Z.target.value),placeholder:"Identity file (optional)...",className:W.inputSmall})]}),q==="docker"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Ie,onChange:Z=>sn(Z.target.value),placeholder:"Image (optional)...",className:W.inputSmall}),y.jsx("input",{type:"text",value:ke,onChange:Z=>Sn(Z.target.value),placeholder:"Repo (optional)...",className:W.inputSmall})]}),q==="codespace"&&K==="pick"&&y.jsxs(y.Fragment,{children:[y.jsxs("select",{value:Xe,onChange:Z=>{Z.target.value==="__create__"?(at("create"),Ke("")):(Ke(Z.target.value),Z.target.value&&!Yt.trim()&&E(Z.target.value))},disabled:X,className:W.select,children:[y.jsx("option",{value:"",children:"Select a codespace..."}),R.map(Z=>y.jsxs("option",{value:Z.name,children:[Z.name," (",Z.repository,") — ",Z.state]},Z.name)),y.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),X&&y.jsx("span",{className:W.creatingHint,children:"Creating codespace..."}),w&&y.jsx("span",{className:W.errorHint,children:w})]}),q==="codespace"&&K==="create"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Ze,onChange:Z=>ln(Z.target.value),placeholder:"owner/repo",className:W.inputSmall}),y.jsx("button",{onClick:()=>{Ze.trim()&&(J(Ze.trim()),at("pick"),ln(""))},disabled:!Ze.trim(),className:W.btnPrimary,children:"Create"}),y.jsx("button",{onClick:()=>{at("pick"),ln("")},className:W.btnGhost,children:"Cancel"})]})]})]})}if(a.kind==="project")return y.jsx("div",{className:W.bar,children:y.jsx("span",{className:W.hintText,children:"Select a task or click + to create one"})});if(a.kind==="new_task"){const H=P=>{F.trim()&&(p(a.projectId,F.trim(),nt,st,void 0,a.parentTaskId),B(""),ct(""),ft(""),s({kind:"project",projectId:a.projectId}))};return y.jsxs("div",{className:W.barColumn,children:[y.jsxs("div",{className:W.barRow,children:[y.jsx("span",{className:W.badge,children:a.parentTaskId?"child task":"new task"}),y.jsx("input",{type:"text",value:F,onChange:P=>B(P.target.value),placeholder:"Task title...",autoFocus:!0,className:W.input}),y.jsxs("select",{value:st,onChange:P=>ft(P.target.value),className:W.select,children:[y.jsx("option",{value:"",children:"Default env"}),m.map(P=>y.jsx("option",{value:P.id,children:P.displayName},P.id))]}),y.jsx("button",{onClick:()=>H(),disabled:!F.trim(),className:W.btnPrimary,children:"Create"})]}),y.jsx("textarea",{value:nt,onChange:P=>ct(P.target.value),placeholder:"Description (optional)...",className:W.textarea,rows:3})]})}if(a.kind==="task"&&Q){if(Q.status==="pending"&&Ot){const H=Q.dependsOn.map(P=>f.find(Z=>Z.id===P)).filter(P=>P&&P.status!=="done").map(P=>P.title);return y.jsxs("div",{className:W.bar,children:[y.jsxs("span",{className:W.statusBlocked,children:["Blocked by: ",H.join(", ")]}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${Q.title}"?`)&&(_(Q.id),s({kind:"project",projectId:Q.projectId}))},className:W.btnDanger,children:"Delete"})]})}if(Q.status==="pending"||Q.status==="assigned")return y.jsxs("div",{className:W.bar,children:[y.jsx("button",{onClick:()=>g(Q.id),className:W.btnPrimary,children:"Start Task"}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${Q.title}"?`)&&(_(Q.id),s({kind:"project",projectId:Q.projectId}))},className:W.btnDanger,children:"Delete"})]});if(Q.status==="in_progress"){if((bt==null?void 0:bt.status)==="waiting_input"){const P=Z=>{Z.preventDefault(),!(!L.trim()||!Q.sessionId)&&(r(Q.sessionId,L),k(""))};return y.jsxs("form",{onSubmit:P,className:W.bar,children:[y.jsx("input",{type:"text",value:L,onChange:Z=>k(Z.target.value),placeholder:"Type a message...",autoFocus:!0,className:W.input}),y.jsx("button",{type:"submit",disabled:!L.trim(),className:W.btnPrimary,children:"Send"}),y.jsx("button",{type:"button",onClick:()=>Q.sessionId&&c(Q.sessionId),className:W.btnDanger,children:"Stop"})]})}return y.jsxs("div",{className:W.bar,children:[y.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:W.input}),y.jsx("button",{onClick:()=>Q.sessionId&&c(Q.sessionId),className:W.btnDanger,children:"Stop"})]})}if(Q.status==="review")return y.jsxs("div",{className:W.bar,children:[y.jsx("input",{type:"text",value:gt,onChange:H=>Dt(H.target.value),placeholder:"Rejection notes (optional)...",className:W.input}),y.jsx("button",{onClick:()=>{S(Q.id)},className:W.btnPrimary,children:"Approve"}),y.jsx("button",{onClick:()=>{b(Q.id,gt),Dt("")},className:W.btnDanger,children:"Reject"})]});if(Q.status==="done")return y.jsxs("div",{className:W.bar,children:[y.jsx("span",{className:`${W.statusText} ${W.statusCompleted}`,children:"Task completed"}),y.jsx("button",{onClick:()=>s({kind:"new_task",projectId:Q.projectId}),className:W.btnPrimary,children:"+ New Task"}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${Q.title}"?`)&&(_(Q.id),s({kind:"project",projectId:Q.projectId}))},className:W.btnDanger,children:"Delete"})]});if(Q.status==="failed")return y.jsxs("div",{className:W.bar,children:[y.jsx("span",{className:`${W.statusText} ${W.statusFailed}`,children:"Task failed"}),y.jsx("button",{onClick:()=>g(Q.id),className:W.btnPrimary,children:"Retry"}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${Q.title}"?`)&&(_(Q.id),s({kind:"project",projectId:Q.projectId}))},className:W.btnDanger,children:"Delete"})]})}if(a.kind==="new_chat"){const H=P=>{P.preventDefault(),L.trim()&&(o(a.environmentId,L,void 0,Y),k(""))};return y.jsxs("form",{onSubmit:H,className:W.bar,children:[y.jsx("span",{className:W.badge,children:"new chat"}),y.jsx("input",{type:"text",value:L,onChange:P=>k(P.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:W.input}),y.jsx(P0,{value:Y,onChange:G}),y.jsx("button",{type:"submit",disabled:!L.trim(),className:W.btnPrimary,children:"Go"})]})}if(a.kind==="session"){const H=($==null?void 0:$.status)==="running",P=($==null?void 0:$.status)==="waiting_input",Z=$!==void 0&&["completed","failed","killed"].includes($.status);if(H)return y.jsxs("div",{className:W.bar,children:[y.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:W.input}),y.jsx("button",{onClick:()=>c(a.sessionId),className:W.btnDanger,title:"Stop session",children:"Stop"})]});if(P){const Tt=kt=>{kt.preventDefault(),L.trim()&&(r(a.sessionId,L),k(""))};return y.jsxs("form",{onSubmit:Tt,className:W.bar,children:[y.jsx("input",{type:"text",value:L,onChange:kt=>k(kt.target.value),placeholder:"Type a message...",autoFocus:!0,className:W.input}),y.jsx("button",{type:"submit",disabled:!L.trim(),className:W.btnPrimary,children:"Send"}),y.jsx("button",{type:"button",onClick:()=>c(a.sessionId),className:W.btnDanger,title:"Stop session",children:"Stop"})]})}if(Z&&$)return y.jsxs("div",{className:W.bar,children:[y.jsxs("span",{className:`${W.statusText} ${W.hintText}`,children:["Session ",$.status]}),y.jsx("button",{onClick:()=>s({kind:"new_chat",environmentId:$.environmentId,runtime:$.runtime}),className:W.btnPrimary,children:"+ New Chat"})]})}return y.jsx("div",{className:W.bar,children:y.jsx("span",{className:W.hintText,children:"Loading..."})})}function Xc(){Xc=function(c,h){return new o(c,void 0,h)};var a=RegExp.prototype,s=new WeakMap;function o(c,h,f){var m=new RegExp(c,h);return s.set(m,f||s.get(c)),Ko(m,o.prototype)}function r(c,h){var f=s.get(h);return Object.keys(f).reduce(function(m,p){var g=f[p];if(typeof g=="number")m[p]=c[g];else{for(var S=0;c[g[S]]===void 0&&S+1<g.length;)S++;m[p]=c[g[S]]}return m},Object.create(null))}return(function(c,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(h&&h.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),h&&Ko(c,h)})(o,RegExp),o.prototype.exec=function(c){var h=a.exec.call(this,c);if(h){h.groups=r(h,this);var f=h.indices;f&&(f.groups=r(f,this))}return h},o.prototype[Symbol.replace]=function(c,h){if(typeof h=="string"){var f=s.get(this);return a[Symbol.replace].call(this,c,h.replace(/\$<([^>]+)>/g,function(p,g){var S=f[g];return"$"+(Array.isArray(S)?S.join("$"):S)}))}if(typeof h=="function"){var m=this;return a[Symbol.replace].call(this,c,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(r(p,m)),h.apply(this,p)})}return a[Symbol.replace].call(this,c,h)},Xc.apply(this,arguments)}function Ko(a,s){return Ko=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},Ko(a,s)}function W0(a,s){(s==null||s>a.length)&&(s=a.length);for(var o=0,r=new Array(s);o<s;o++)r[o]=a[o];return r}function Dc(a,s){var o=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(o)return(o=o.call(a)).next.bind(o);if(Array.isArray(a)||(o=(function(c,h){if(c){if(typeof c=="string")return W0(c,h);var f=Object.prototype.toString.call(c).slice(8,-1);return f==="Object"&&c.constructor&&(f=c.constructor.name),f==="Map"||f==="Set"?Array.from(c):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?W0(c,h):void 0}})(a))||s){o&&(a=o);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.
|
|
138
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var RE=(function(a){return function(s){return s===void 0&&(s={}),(function(r,c){if(c&&!r.registered(c))throw new Error('The default language "'+c+'" is not registered with refractor.')})(a,s.defaultLanguage),function(r){F1(r,"element",o)};function o(r,c,h){var f,m;if(h&&h.tagName==="pre"&&r.tagName==="code"){var p=(r==null||(f=r.data)==null?void 0:f.meta)||(r==null||(m=r.properties)==null?void 0:m.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 g,S,b=(function(Y){for(var G,F=Dc(Y.properties.className);!(G=F()).done;){var B=G.value;if(B.slice(0,9)==="language-")return B.slice(9).toLowerCase()}return null})(r);if(!b&&s.defaultLanguage&&r.properties.className.push("language-"+(b=s.defaultLanguage)),r.properties.className.push("code-highlight"),b)try{var _,N;N=(_=b)!=null&&_.includes("diff-")?b.split("-")[1]:b,g=a.highlight(Oo(r),N),h.properties.className=(h.properties.className||[]).concat("language-"+N)}catch(Y){if(!s.ignoreMissing||!/Unknown language/.test(Y.message))throw Y;g=r}else g=r;g.children=(S=1,function Y(G){return G.reduce(function(F,B){if(B.type==="text"){var nt=B.value,ct=(nt.match(/\n/g)||"").length;if(ct===0)B.position={start:{line:S,column:1},end:{line:S,column:1}},F.push(B);else for(var st,ft=nt.split(`
|
|
139
|
+
`),gt=Dc(ft.entries());!(st=gt()).done;){var Dt=st.value,Yt=Dt[0],E=Dt[1];F.push({type:"text",value:Yt===ft.length-1?E:E+`
|
|
140
|
+
`,position:{start:{line:S+Yt,column:1},end:{line:S+Yt,column:1}}})}return S+=ct,F}if(Object.prototype.hasOwnProperty.call(B,"children")){var q=S;return B.children=Y(B.children),F.push(B),B.position={start:{line:q,column:1},end:{line:S,column:1}},F}return F.push(B),F},[])})(g.children),g.position=g.children.length>0?{start:{line:g.children[0].position.start.line,column:0},end:{line:g.children[g.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var R,w=(function(Y){var G=/{([\d,-]+)}/,F=Y.split(",").map(function(ct){return ct.trim()}).join();if(G.test(F)){var B=G.exec(F)[1],nt=P1(B);return function(ct){return nt.includes(ct+1)}}return function(){return!1}})(p),X=(function(Y){var G=Xc(/showLineNumbers=(\d+)/i,{lines:1});if(G.test(Y)){var F=G.exec(Y);return Number(F.groups.lines)}return 1})(p),I=(function(Y){for(var G=new Array(Y),F=0;F<Y;F++)G[F]={type:"element",tagName:"span",properties:{className:[]},children:[]};return G})(g.position.end.line),J=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],L=function(){var Y,G,F=R.value,B=F[0],nt=F[1];nt.properties.className=["code-line"];var ct=W1(g,function(st){return st.position.start.line<=B+1&&st.position.end.line>=B+1});nt.children=ct.children,(p.toLowerCase().includes("showLineNumbers".toLowerCase())||s.showLineNumbers===!0||typeof s.showLineNumbers=="object"&&s.showLineNumbers.includes(b))&&!J.some(function(st){return p.toLowerCase().includes(st)})&&(nt.properties.line=[(B+X).toString()],nt.properties.className.push("line-number")),w(B)&&nt.properties.className.push("highlight-line"),(b==="diff"||(Y=b)!=null&&Y.includes("diff-"))&&Oo(nt).substring(0,1)==="-"?nt.properties.className.push("deleted"):(b==="diff"||(G=b)!=null&&G.includes("diff-"))&&Oo(nt).substring(0,1)==="+"&&nt.properties.className.push("inserted")},k=Dc(I.entries());!(R=k()).done;)L();I.length>0&&Oo(I[I.length-1]).trim()===""&&I.pop(),r.children=I}}}})(J1);const kE="_systemEvent_1ftop_1",wE="_systemTimestamp_1ftop_9",zE="_textEvent_1ftop_13",BE="_toolUseEvent_1ftop_100",UE="_toolUsePrefix_1ftop_116",VE="_toolResultEvent_1ftop_120",LE="_toolResultSummary_1ftop_126",GE="_toolResultPre_1ftop_140",HE="_errorEvent_1ftop_154",qE="_statusEvent_1ftop_163",YE="_defaultEvent_1ftop_173",Nn={systemEvent:kE,systemTimestamp:wE,textEvent:zE,toolUseEvent:BE,toolUsePrefix:UE,toolResultEvent:VE,toolResultSummary:LE,toolResultPre:GE,errorEvent:HE,statusEvent:qE,defaultEvent:YE};function IE({time:a,content:s}){return y.jsxs("div",{className:Nn.systemEvent,children:[y.jsxs("span",{className:Nn.systemTimestamp,children:["[",a,"]"]})," ",s]})}function XE({content:a}){return y.jsx("div",{className:Nn.textEvent,children:y.jsx($1,{remarkPlugins:[tS],rehypePlugins:[RE],children:a})})}function KE({content:a}){let s=a;try{const o=JSON.parse(a);s=`${o.tool}: ${JSON.stringify(o.args,null,2)}`}catch{}return y.jsxs("div",{className:Nn.toolUseEvent,children:[y.jsx("span",{className:Nn.toolUsePrefix,children:">"})," ",s]})}function ZE({content:a}){return y.jsxs("details",{className:Nn.toolResultEvent,children:[y.jsx("summary",{className:Nn.toolResultSummary,children:"Tool output"}),y.jsx("pre",{className:Nn.toolResultPre,children:a})]})}function QE({content:a}){return y.jsxs("div",{className:Nn.errorEvent,children:["Error: ",a]})}function FE({content:a}){return y.jsxs("div",{className:Nn.statusEvent,children:["--- ",a," ---"]})}function JE({content:a}){return y.jsx("div",{className:Nn.defaultEvent,children:a})}function Bg({event:a}){const s=new Date(a.timestamp).toLocaleTimeString();switch(a.eventType){case"system":return y.jsx(IE,{time:s,content:a.content});case"text":case"output":return y.jsx(XE,{content:a.content});case"tool_use":return y.jsx(KE,{content:a.content});case"tool_result":return y.jsx(ZE,{content:a.content});case"error":return y.jsx(QE,{content:a.content});case"status":return y.jsx(FE,{content:a.content});default:return y.jsx(JE,{content:a.content})}}const PE="_container_1e9es_1",WE="_emptyState_1e9es_7",$E="_errorState_1e9es_13",tA="_statsBar_1e9es_19",eA="_branchName_1e9es_45",nA="_additions_1e9es_50",aA="_deletions_1e9es_54",iA="_fileList_1e9es_58",sA="_fileName_1e9es_68",lA="_diffContent_1e9es_85",oA="_diffLine_1e9es_103",rA="_added_1e9es_112",uA="_removed_1e9es_116",cA="_hunk_1e9es_120",fA="_meta_1e9es_123",dA="_context_1e9es_126",Ee={container:PE,emptyState:WE,errorState:$E,statsBar:tA,branchName:eA,additions:nA,deletions:aA,fileList:iA,fileName:sA,diffContent:lA,diffLine:oA,added:rA,removed:uA,hunk:cA,meta:fA,context:dA};function hA(a){return a.startsWith("+")&&!a.startsWith("+++")?Ee.added:a.startsWith("-")&&!a.startsWith("---")?Ee.removed:a.startsWith("@@")?Ee.hunk:a.startsWith("diff ")||a.startsWith("index ")?Ee.meta:Ee.context}function mA({diff:a}){var o;if(!a)return y.jsx("div",{className:Ee.emptyState,children:"Loading diff..."});if(a.error)return y.jsx("div",{className:Ee.errorState,children:a.error});if(!a.diff||a.diff.trim()==="")return y.jsxs("div",{className:Ee.emptyState,children:["No changes on branch ",a.branch]});const s=a.diff.split(`
|
|
141
|
+
`);return y.jsxs("div",{className:Ee.container,children:[y.jsxs("div",{className:Ee.statsBar,children:[y.jsxs("span",{children:["Branch: ",y.jsx("b",{className:Ee.branchName,children:a.branch})]}),y.jsxs("span",{children:["Files: ",y.jsx("b",{children:((o=a.changedFiles)==null?void 0:o.length)||0})]}),y.jsxs("span",{className:Ee.additions,children:["+",a.additions||0]}),y.jsxs("span",{className:Ee.deletions,children:["-",a.deletions||0]})]}),a.changedFiles&&a.changedFiles.length>0&&y.jsx("div",{className:Ee.fileList,children:a.changedFiles.map(r=>y.jsx("span",{className:Ee.fileName,children:r},r))}),y.jsx("div",{className:Ee.diffContent,children:s.map((r,c)=>y.jsx("div",{className:`${Ee.diffLine} ${hA(r)}`,children:r},c))})]})}const pA="_container_twqwx_1",vA="_emptyState_twqwx_8",gA="_card_twqwx_14",yA="_cardHeader_twqwx_34",SA="_categoryBadge_twqwx_41",bA="_findingTitle_twqwx_49",TA="_findingDate_twqwx_55",_A="_findingContent_twqwx_61",xA="_tags_twqwx_67",EA="_tag_twqwx_67",kn={container:pA,emptyState:vA,card:gA,cardHeader:yA,categoryBadge:SA,findingTitle:bA,findingDate:TA,findingContent:_A,tags:xA,tag:EA},AA={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)"}},NA={text:"var(--text-secondary)",bg:"var(--bg-elevated)"};function DA({projectId:a}){const{findings:s}=aa(),o=s.filter(r=>r.projectId===a);return o.length===0?y.jsx("div",{className:kn.emptyState,children:"No findings yet. Agents will post discoveries here."}):y.jsx("div",{className:kn.container,children:o.map((r,c)=>{const h=AA[r.category]||NA;return y.jsxs(ui.div,{className:kn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:c*.05,duration:.2},children:[y.jsxs("div",{className:kn.cardHeader,children:[y.jsx("span",{className:kn.categoryBadge,style:{background:h.bg,color:h.text},children:r.category}),y.jsx("span",{className:kn.findingTitle,children:r.title}),y.jsx("span",{className:kn.findingDate,children:r.createdAt})]}),y.jsx("div",{className:kn.findingContent,children:r.content.length>300?r.content.slice(0,300)+"...":r.content}),r.tags.length>0&&y.jsx("div",{className:kn.tags,children:r.tags.map(f=>y.jsx("span",{className:kn.tag,style:{color:h.text,textShadow:`0 0 8px ${h.text}`},children:f},f))})]},r.id)})})}const CA="_container_1vhtg_1",jA="_heading_1vhtg_7",MA="_section_1vhtg_14",OA="_sectionTitle_1vhtg_25",RA="_sectionDescription_1vhtg_34",kA="_emptyState_1vhtg_40",wA="_tokenList_1vhtg_47",zA="_tokenRow_1vhtg_54",BA="_tokenBadge_1vhtg_67",UA="_tokenName_1vhtg_82",VA="_tokenTarget_1vhtg_89",LA="_deleteButton_1vhtg_98",GA="_addForm_1vhtg_112",HA="_formRow_1vhtg_118",qA="_input_1vhtg_124",YA="_select_1vhtg_153",IA="_addButton_1vhtg_184",ue={container:CA,heading:jA,section:MA,sectionTitle:OA,sectionDescription:RA,emptyState:kA,tokenList:wA,tokenRow:zA,tokenBadge:BA,tokenName:UA,tokenTarget:VA,deleteButton:LA,addForm:GA,formRow:HA,input:qA,select:YA,addButton:IA},XA=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function KA(){const{tokens:a,setToken:s,deleteToken:o}=aa(),[r,c]=x.useState(""),[h,f]=x.useState(""),[m,p]=x.useState("env_var"),[g,S]=x.useState(""),b=N=>{if(N.preventDefault(),!r||!h)return;const R=m==="env_var"?g||r.toUpperCase()+"_TOKEN":"";s(r,h,m,R,m==="file"?g:""),c(""),f(""),S("")},_=N=>{window.confirm(`Delete token "${N}"?`)&&o(N)};return y.jsxs("div",{className:ue.container,children:[y.jsx("h2",{className:ue.heading,children:"Settings"}),y.jsxs("section",{className:ue.section,children:[y.jsx("h3",{className:ue.sectionTitle,children:"Tokens"}),y.jsx("p",{className:ue.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),a.length===0?y.jsx("div",{className:ue.emptyState,children:"No tokens configured"}):y.jsx("div",{className:ue.tokenList,children:a.map(N=>y.jsxs("div",{className:ue.tokenRow,children:[y.jsx("span",{className:ue.tokenBadge,children:N.tokenType}),y.jsx("span",{className:ue.tokenName,children:N.name}),y.jsx("span",{className:ue.tokenTarget,children:N.tokenType==="env_var"?N.envVar:N.filePath}),y.jsx("button",{className:ue.deleteButton,onClick:()=>_(N.name),title:`Delete ${N.name}`,children:"×"})]},N.name))}),y.jsxs("form",{className:ue.addForm,onSubmit:b,children:[y.jsxs("div",{className:ue.formRow,children:[y.jsx("input",{className:ue.input,type:"text",placeholder:"Token name",value:r,onChange:N=>c(N.target.value)}),y.jsx("input",{className:ue.input,type:"password",placeholder:"Value",value:h,onChange:N=>f(N.target.value)})]}),y.jsxs("div",{className:ue.formRow,children:[y.jsx("select",{className:ue.select,value:m,onChange:N=>p(N.target.value),children:XA.map(N=>y.jsx("option",{value:N.value,children:N.label},N.value))}),y.jsx("input",{className:ue.input,type:"text",placeholder:m==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:g,onChange:N=>S(N.target.value)}),y.jsx("button",{className:ue.addButton,type:"submit",children:"Add Token"})]})]})]})]})}const $0=220,tv=70,ZA=40,QA=60,FA="hierarchy",JA="dependency";function PA(a){return x.useMemo(()=>{if(a.length===0)return{nodes:[],edges:[]};const s=new Ep.graphlib.Graph({multigraph:!0});s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:"TB",nodesep:ZA,ranksep:QA});const o=new Map(a.map(f=>[f.id,f])),r=new Map;for(const f of a)if(f.parentTaskId&&o.has(f.parentTaskId)){const m=r.get(f.parentTaskId)||[];m.push(f),r.set(f.parentTaskId,m)}for(const f of a)s.setNode(f.id,{width:$0,height:tv});const c=[];for(const f of a){if(f.parentTaskId&&o.has(f.parentTaskId)){const m=`hierarchy-${f.parentTaskId}-${f.id}`;s.setEdge(f.parentTaskId,f.id,{},m),c.push({id:m,source:f.parentTaskId,target:f.id,type:"smoothstep",data:{edgeType:FA},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const m of f.dependsOn)if(o.has(m)){const p=`dependency-${m}-${f.id}`;s.setEdge(m,f.id,{},p),c.push({id:p,source:m,target:f.id,type:"smoothstep",data:{edgeType:JA},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return Ep.layout(s),{nodes:a.map(f=>{const m=s.node(f.id),p=r.get(f.id)||[];return{id:f.id,type:"task",position:{x:m.x-$0/2,y:m.y-tv/2},data:{task:f,childCount:p.length,doneChildCount:p.filter(g=>g.status==="done").length,hasDependencies:f.dependsOn.length>0}}}),edges:c}},[a])}const WA="_dagContainer_1c7ip_1",$A="_emptyDag_1c7ip_18",tN="_taskNode_1c7ip_26",eN="_taskNodeBorder_1c7ip_48",nN="_taskNodeContent_1c7ip_54",aN="_taskNodeHeader_1c7ip_64",iN="_taskNodeIcon_1c7ip_71",sN="_taskNodeTitle_1c7ip_76",lN="_taskNodeBadges_1c7ip_84",oN="_childBadge_1c7ip_89",rN="_depBadge_1c7ip_101",uN="_handle_1c7ip_113",en={dagContainer:WA,emptyDag:$A,taskNode:tN,taskNodeBorder:eN,taskNodeContent:nN,taskNodeHeader:aN,taskNodeIcon:iN,taskNodeTitle:sN,taskNodeBadges:lN,childBadge:oN,depBadge:rN,handle:uN},ev={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:{color:"var(--accent-purple, #a78bfa)",icon:"⧖"}};function cN({data:a}){const{task:s,childCount:o,doneChildCount:r,hasDependencies:c}=a,h=ev[s.status]||ev.pending;return y.jsxs("div",{className:en.taskNode,"data-task-id":s.id,"data-task-title":s.title,children:[y.jsx(Ap,{type:"target",position:Np.Top,className:en.handle}),y.jsx("div",{className:en.taskNodeBorder,style:{backgroundColor:h.color}}),y.jsxs("div",{className:en.taskNodeContent,children:[y.jsxs("div",{className:en.taskNodeHeader,children:[y.jsx("span",{className:en.taskNodeIcon,style:{color:h.color},children:h.icon}),y.jsx("span",{className:en.taskNodeTitle,children:s.title})]}),y.jsxs("div",{className:en.taskNodeBadges,children:[o>0&&y.jsxs("span",{className:en.childBadge,children:[r,"/",o]}),c&&y.jsx("span",{className:en.depBadge,children:"dep"})]})]}),y.jsx(Ap,{type:"source",position:Np.Bottom,className:en.handle})]})}const nv={pending:"#6b7a8d",assigned:"#70a1ff",in_progress:"#4ecca3",review:"#f0c040",done:"#4ecca3",failed:"#e94560",waiting:"#a78bfa"},fN={task:cN};function dN({projectId:a,setViewMode:s}){const{tasks:o}=aa(),r=x.useMemo(()=>o.filter(p=>p.projectId===a),[o,a]),{nodes:c,edges:h}=PA(r),f=x.useCallback((p,g)=>{s({kind:"task",taskId:g.id})},[s]),m=x.useCallback(p=>{const g=p.data;return nv[g.task.status]||nv.pending},[]);return r.length===0?y.jsx("div",{className:en.emptyDag,children:"No tasks to visualize. Create tasks to see the dependency graph."}):y.jsx("div",{className:en.dagContainer,children:y.jsxs(nS,{nodes:c,edges:h,nodeTypes:fN,onNodeClick:f,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[y.jsx(aS,{variant:iS.Dots,gap:20,size:1,color:"rgba(255,255,255,0.05)"}),y.jsx(sS,{showInteractive:!1}),y.jsx(lS,{nodeColor:m,maskColor:"rgba(10, 12, 20, 0.7)",style:{background:"var(--bg-inset)"}})]})})}const hN="_panelContainer_m2c7m_1",mN="_emptyState_m2c7m_8",pN="_projectSummary_m2c7m_17",vN="_projectSummaryTitle_m2c7m_28",gN="_projectSummarySubtitle_m2c7m_32",yN="_header_m2c7m_36",SN="_headerInfo_m2c7m_62",bN="_killButton_m2c7m_68",TN="_tabBar_m2c7m_89",_N="_tab_m2c7m_89",xN="_active_m2c7m_112",EN="_eventScroll_m2c7m_117",AN="_tabContent_m2c7m_123",NN="_noContext_m2c7m_128",DN="_overviewContent_m2c7m_134",CN="_overviewSection_m2c7m_143",jN="_overviewLabel_m2c7m_149",MN="_overviewDescription_m2c7m_156",ON="_depList_m2c7m_162",RN="_depItem_m2c7m_168",kN="_depBlocked_m2c7m_175",wN="_depDone_m2c7m_179",zN="_waitingMessage_m2c7m_183",BN="_errorMessage_m2c7m_187",ot={panelContainer:hN,emptyState:mN,projectSummary:pN,projectSummaryTitle:vN,projectSummarySubtitle:gN,header:yN,headerInfo:SN,killButton:bN,tabBar:TN,tab:_N,active:xN,eventScroll:EN,tabContent:AN,noContext:NN,overviewContent:DN,overviewSection:CN,overviewLabel:jN,overviewDescription:MN,depList:ON,depItem:RN,depBlocked:kN,depDone:wN,waitingMessage:zN,errorMessage:BN};function UN({sessionId:a,session:s,isActive:o,onKill:r}){return y.jsxs("div",{className:ot.header,children:[y.jsxs("span",{children:["Session: ",a.slice(0,8),s&&` | ${s.runtime} | ${s.status}`]}),y.jsxs("span",{className:ot.headerInfo,children:[s&&y.jsx("span",{children:s.prompt.length>60?s.prompt.slice(0,60)+"...":s.prompt}),o&&y.jsx("button",{onClick:()=>r(a),title:"Stop session",className:ot.killButton,children:"×"})]})]})}function VN({sessionEvents:a,session:s,scrollRef:o}){const r=s&&["completed","failed","killed"].includes(s.status),c=r?`Session ${s.status} with no events recorded.`:"Waiting for events...";return y.jsxs("div",{ref:o,className:ot.eventScroll,children:[a.length===0&&y.jsx("div",{className:r?ot.errorMessage:ot.waitingMessage,children:c}),a.map((h,f)=>y.jsx(Bg,{event:h},`${h.sessionId}-${h.timestamp}-${f}`))]})}function LN(a){const s=[];for(const o of a){const r=s[s.length-1];o.eventType==="text"&&(r==null?void 0:r.eventType)==="text"?s[s.length-1]={...r,content:r.content+o.content}:s.push(o)}return s}function GN({viewMode:a,setViewMode:s}){var ct;const{events:o,sessions:r,tasks:c,environments:h,taskDiff:f,loadSessionEvents:m,loadFindings:p,loadTaskDiff:g,kill:S}=aa(),b=x.useRef(null),_=x.useRef(void 0),[N,R]=x.useState("overview"),[w,X]=x.useState("tasks"),I=x.useRef(void 0),J=x.useRef(void 0);let L,k,Y;if(a.kind==="session"?L=a.sessionId:a.kind==="task"&&(k=c.find(st=>st.id===a.taskId),L=(k==null?void 0:k.sessionId)||void 0,Y=(k==null?void 0:k.projectId)||void 0),a.kind==="task"&&(k==null?void 0:k.id)!==I.current&&(I.current=k==null?void 0:k.id,N!=="overview"&&R("overview")),(k==null?void 0:k.status)!==J.current){J.current=k==null?void 0:k.status;const st=(k==null?void 0:k.status)==="pending"||(k==null?void 0:k.status)==="assigned"?"overview":(k==null?void 0:k.status)==="in_progress"?"stream":(k==null?void 0:k.status)==="review"?"diff":(k==null?void 0:k.status)==="done"?"findings":void 0;st&&st!==N&&R(st)}const G=x.useMemo(()=>{const st=L?o.filter(ft=>ft.sessionId===L):[];return LN(st)},[o,L]),F=x.useMemo(()=>new Map(c.map(st=>[st.id,st])),[c]),B=L?r.find(st=>st.id===L)??void 0:void 0;if(x.useEffect(()=>{L&&L!==_.current&&(_.current=L,m(L))},[L,m]),x.useEffect(()=>{N==="findings"&&Y&&p(Y),N==="diff"&&(k!=null&&k.id)&&g(k.id)},[N,Y,k==null?void 0:k.id,p,g]),x.useEffect(()=>{b.current&&N==="stream"&&(b.current.scrollTop=b.current.scrollHeight)},[G.length,N]),a.kind==="settings")return y.jsx(KA,{});if(a.kind==="empty")return y.jsx("div",{className:ot.emptyState,children:"Select a session, project, or task to get started"});if(a.kind==="new_chat")return y.jsx("div",{className:ot.emptyState,children:"Enter a prompt below to start a new session"});if(a.kind==="project"){const st=c.filter(Dt=>Dt.projectId===a.projectId),ft=st.filter(Dt=>Dt.status==="done").length,gt=st.length;return y.jsxs("div",{className:ot.panelContainer,children:[y.jsxs("div",{className:ot.tabBar,role:"tablist","aria-label":"Project view",children:[y.jsx("button",{role:"tab","aria-selected":w==="graph",className:`${ot.tab} ${w==="graph"?ot.active:""}`,onClick:()=>X("graph"),children:"Graph"}),y.jsx("button",{role:"tab","aria-selected":w==="tasks",className:`${ot.tab} ${w==="tasks"?ot.active:""}`,onClick:()=>X("tasks"),children:"Tasks"})]}),w==="tasks"&&y.jsxs("div",{className:ot.projectSummary,children:[y.jsx("span",{className:ot.projectSummaryTitle,children:gt>0?`${ft}/${gt} tasks complete`:"No tasks yet"}),y.jsx("span",{className:ot.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),w==="graph"&&y.jsx(dN,{projectId:a.projectId,setViewMode:s})]})}if(a.kind==="new_environment")return y.jsx("div",{className:ot.emptyState,children:"Configure the new environment below"});if(a.kind==="new_task")return y.jsx("div",{className:ot.emptyState,children:"Fill in the task details below"});if(a.kind==="task"){const st=(B==null?void 0:B.status)==="running"||(B==null?void 0:B.status)==="waiting_input";return y.jsxs("div",{className:ot.panelContainer,children:[y.jsxs("div",{className:ot.header,children:[y.jsxs("span",{children:["Task: ",(k==null?void 0:k.title)||a.taskId,k&&` | ${k.status}`,(k==null?void 0:k.branch)&&` | ${k.branch}`]}),st&&y.jsx("button",{onClick:()=>L&&S(L),title:"Stop session",className:ot.killButton,children:"×"})]}),y.jsxs("div",{className:ot.tabBar,role:"tablist","aria-label":"Task view",children:[y.jsx("button",{role:"tab","aria-selected":N==="overview",className:`${ot.tab} ${N==="overview"?ot.active:""}`,onClick:()=>R("overview"),children:"Overview"}),y.jsx("button",{role:"tab","aria-selected":N==="stream",className:`${ot.tab} ${N==="stream"?ot.active:""}`,onClick:()=>R("stream"),children:"Stream"}),y.jsx("button",{role:"tab","aria-selected":N==="diff",className:`${ot.tab} ${N==="diff"?ot.active:""}`,onClick:()=>R("diff"),children:"Diff"}),y.jsx("button",{role:"tab","aria-selected":N==="findings",className:`${ot.tab} ${N==="findings"?ot.active:""}`,onClick:()=>R("findings"),children:"Findings"})]}),y.jsxs(Pc,{mode:"wait",children:[N==="overview"&&y.jsxs(ui.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:ot.overviewContent,children:[(k==null?void 0:k.description)&&y.jsxs("div",{className:ot.overviewSection,children:[y.jsx("div",{className:ot.overviewLabel,children:"Description"}),y.jsx("div",{className:ot.overviewDescription,children:k.description})]}),(k==null?void 0:k.environmentId)&&y.jsxs("div",{className:ot.overviewSection,children:[y.jsx("div",{className:ot.overviewLabel,children:"Environment"}),y.jsx("div",{className:ot.overviewDescription,children:((ct=h.find(ft=>ft.id===k.environmentId))==null?void 0:ct.displayName)??k.environmentId})]}),k&&k.dependsOn.length>0&&y.jsxs("div",{className:ot.overviewSection,children:[y.jsx("div",{className:ot.overviewLabel,children:"Dependencies"}),y.jsx("div",{className:ot.depList,children:k.dependsOn.map(ft=>{const gt=F.get(ft),Dt=(gt==null?void 0:gt.status)==="done";return y.jsxs("div",{className:`${ot.depItem} ${Dt?ot.depDone:ot.depBlocked}`,children:[y.jsx("span",{children:Dt?"✓":"○"}),y.jsx("span",{children:(gt==null?void 0:gt.title)??ft})]},ft)})})]}),k&&k.dependsOn.length===0&&!k.description&&y.jsx("div",{className:ot.waitingMessage,children:"No additional details"})]},"overview"),N==="stream"&&y.jsxs(ui.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},ref:b,className:ot.eventScroll,children:[!L&&y.jsx("div",{className:ot.waitingMessage,children:"Task has not been started yet"}),L&&G.length===0&&y.jsx("div",{className:ot.waitingMessage,children:"Waiting for events..."}),G.map((ft,gt)=>y.jsx(Bg,{event:ft},`${ft.sessionId}-${ft.timestamp}-${gt}`))]},"stream"),N==="diff"&&y.jsx(ui.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:ot.tabContent,children:y.jsx(mA,{diff:f})},"diff"),N==="findings"&&y.jsx(ui.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:ot.tabContent,children:Y?y.jsx(DA,{projectId:Y}):y.jsx("div",{className:ot.noContext,children:"No project context"})},"findings")]})]})}if(!L)return y.jsx("div",{className:ot.emptyState,children:"No session selected"});const nt=(B==null?void 0:B.status)==="running"||(B==null?void 0:B.status)==="waiting_input";return y.jsxs("div",{className:ot.panelContainer,children:[y.jsx(UN,{sessionId:L,session:B,isActive:nt,onKill:S}),y.jsx(VN,{sessionEvents:G,session:B,scrollRef:b})]})}const HN="_root_cdda9_1",qN="_body_cdda9_7",YN="_main_cdda9_13",Cc={root:HN,body:qN,main:YN},IN=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function XN(){const[a,s]=x.useState({kind:"empty"}),{lastSpawnedId:o}=aa();return x.useEffect(()=>{o&&s({kind:"session",sessionId:o})},[o]),y.jsxs("div",{className:Cc.root,children:[y.jsx(OS,{setViewMode:s}),y.jsxs("div",{className:Cc.body,children:[y.jsx(dE,{viewMode:a,setViewMode:s}),y.jsxs("div",{className:Cc.main,children:[y.jsx(GN,{viewMode:a,setViewMode:s},a.kind==="task"?a.taskId:a.kind==="session"?a.sessionId:a.kind),y.jsx(OE,{viewMode:a,setViewMode:s})]})]})]})}function KN(){const a=IN?xS:pS;return y.jsx(a,{children:y.jsx(XN,{})})}fS.createRoot(document.getElementById("root")).render(y.jsx(x.StrictMode,{children:y.jsx(KN,{})}));
|