@grackle-ai/web 0.14.6 → 0.14.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import{r as F1,a as x,j as y,v as J1,b as P1,t as Ro,i as W1,f as $1,M as tS,c as eS}from"./markdown-gcy1Jmzi.js";import{r as nS,d as Ap,H as Np,P as Dp,i as aS,B as iS,a as sS,C as lS,M as oS}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 fc={exports:{}},Ws={},dc={exports:{}},hc={};/**
|
|
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 Cp;function rS(){return Cp||(Cp=1,(function(a){function s(E,H){var et=E.length;E.push(H);t:for(;0<et;){var bt=et-1>>>1,Tt=E[bt];if(0<c(Tt,H))E[bt]=H,E[et]=Tt,et=bt;else break t}}function o(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var H=E[0],et=E.pop();if(et!==H){E[0]=et;t:for(var bt=0,Tt=E.length,Gt=Tt>>>1;bt<Gt;){var jt=2*(bt+1)-1,pt=E[jt],Ht=jt+1,de=E[Ht];if(0>c(pt,et))Ht<Tt&&0>c(de,pt)?(E[bt]=de,E[Ht]=et,bt=Ht):(E[bt]=pt,E[jt]=et,bt=jt);else if(Ht<Tt&&0>c(de,et))E[bt]=de,E[Ht]=et,bt=Ht;else break t}}return H}function c(E,H){var et=E.sortIndex-H.sortIndex;return et!==0?et:E.id-H.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,P=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function k(E){for(var H=o(g);H!==null;){if(H.callback===null)r(g);else if(H.startTime<=E)r(g),H.sortIndex=H.expirationTime,s(p,H);else break;H=o(g)}}function Y(E){if(w=!1,k(E),!R)if(o(p)!==null)R=!0,G||(G=!0,dt());else{var H=o(g);H!==null&&Yt(Y,H.startTime-E)}}var G=!1,Q=-1,B=5,nt=-1;function ft(){return X?!0:!(a.unstable_now()-nt<B)}function st(){if(X=!1,G){var E=a.unstable_now();nt=E;var H=!0;try{t:{R=!1,w&&(w=!1,P(Q),Q=-1),N=!0;var et=_;try{e:{for(k(E),b=o(p);b!==null&&!(b.expirationTime>E&&ft());){var bt=b.callback;if(typeof bt=="function"){b.callback=null,_=b.priorityLevel;var Tt=bt(b.expirationTime<=E);if(E=a.unstable_now(),typeof Tt=="function"){b.callback=Tt,k(E),H=!0;break e}b===o(p)&&r(p),k(E)}else r(p);b=o(p)}if(b!==null)H=!0;else{var Gt=o(g);Gt!==null&&Yt(Y,Gt.startTime-E),H=!1}}break t}finally{b=null,_=et,N=!1}H=void 0}}finally{H?dt():G=!1}}}var dt;if(typeof L=="function")dt=function(){L(st)};else if(typeof MessageChannel<"u"){var yt=new MessageChannel,Ct=yt.port2;yt.port1.onmessage=st,dt=function(){Ct.postMessage(null)}}else dt=function(){I(st,0)};function Yt(E,H){Q=I(function(){E(a.unstable_now())},H)}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 H=3;break;default:H=_}var et=_;_=H;try{return E()}finally{_=et}},a.unstable_requestPaint=function(){X=!0},a.unstable_runWithPriority=function(E,H){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var et=_;_=E;try{return H()}finally{_=et}},a.unstable_scheduleCallback=function(E,H,et){var bt=a.unstable_now();switch(typeof et=="object"&&et!==null?(et=et.delay,et=typeof et=="number"&&0<et?bt+et:bt):et=bt,E){case 1:var Tt=-1;break;case 2:Tt=250;break;case 5:Tt=1073741823;break;case 4:Tt=1e4;break;default:Tt=5e3}return Tt=et+Tt,E={id:S++,callback:H,priorityLevel:E,startTime:et,expirationTime:Tt,sortIndex:-1},et>bt?(E.sortIndex=et,s(g,E),o(p)===null&&E===o(g)&&(w?(P(Q),Q=-1):w=!0,Yt(Y,et-bt))):(E.sortIndex=Tt,s(p,E),R||N||(R=!0,G||(G=!0,dt()))),E},a.unstable_shouldYield=ft,a.unstable_wrapCallback=function(E){var H=_;return function(){var et=_;_=H;try{return E.apply(this,arguments)}finally{_=et}}}})(hc)),hc}var jp;function uS(){return jp||(jp=1,dc.exports=rS()),dc.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 Mp;function cS(){if(Mp)return Ws;Mp=1;var a=uS(),s=F1(),o=nS();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"),P=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"),Q=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),nt=Symbol.for("react.activity"),ft=Symbol.for("react.memo_cache_sentinel"),st=Symbol.iterator;function dt(t){return t===null||typeof t!="object"?null:(t=st&&t[st]||t["@@iterator"],typeof t=="function"?t:null)}var yt=Symbol.for("react.client.reference");function Ct(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===yt?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 P: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 Q:return e=t.displayName||null,e!==null?e:Ct(t.type)||"Memo";case B:e=t._payload,t=t._init;try{return Ct(t(e))}catch{}}return null}var Yt=Array.isArray,E=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,et={pending:!1,data:null,method:null,action:null},bt=[],Tt=-1;function Gt(t){return{current:t}}function jt(t){0>Tt||(t.current=bt[Tt],bt[Tt]=null,Tt--)}function pt(t,e){Tt++,bt[Tt]=t.current,t.current=e}var Ht=Gt(null),de=Gt(null),Ne=Gt(null),Ie=Gt(null);function sn(t,e){switch(pt(Ne,e),pt(de,t),pt(Ht,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Qm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Qm(e),t=Fm(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}jt(Ht),pt(Ht,t)}function ke(){jt(Ht),jt(de),jt(Ne)}function Sn(t){t.memoizedState!==null&&pt(Ie,t);var e=Ht.current,n=Fm(e,t.type);e!==n&&(pt(de,t),pt(Ht,n))}function Xe(t){de.current===t&&(jt(Ht),jt(de)),Ie.current===t&&(jt(Ie),Qs._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,Z=a.unstable_scheduleCallback,_t=a.unstable_cancelCallback,Rt=a.unstable_shouldYield,q=a.unstable_requestPaint,F=a.unstable_now,ot=a.unstable_getCurrentPriorityLevel,J=a.unstable_ImmediatePriority,St=a.unstable_UserBlockingPriority,ht=a.unstable_NormalPriority,De=a.unstable_LowPriority,ie=a.unstable_IdlePriority,hi=a.log,mi=a.unstable_setDisableYieldValue,Dn=null,Ce=null;function Tn(t){if(typeof hi=="function"&&mi(t),Ce&&typeof Ce.setStrictMode=="function")try{Ce.setStrictMode(Dn,t)}catch{}}var je=Math.clz32?Math.clz32:yl,vl=Math.log,gl=Math.LN2;function yl(t){return t>>>=0,t===0?32:31-(vl(t)/gl|0)|0}var Ba=256,Ua=262144,Va=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 La(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 mt(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=Va;return Va<<=1,(Va&62914560)===0&&(Va=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 Ga(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&&Mf(t,i,0),u!==0&&l===0&&t.tag!==0&&(t.suspendedLanes|=u&~(d&~e))}function Mf(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 Of(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 Rf(t,e){var n=e&-e;return n=(n&42)!==0?1:tr(n),(n&(t.suspendedLanes|e))!==0?0:n}function tr(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 er(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function kf(){var t=H.p;return t!==0?t:(t=window.event,t===void 0?32:yp(t.type))}function wf(t,e){var n=H.p;try{return H.p=t,e()}finally{H.p=n}}var sa=Math.random().toString(36).slice(2),Se="__reactFiber$"+sa,Be="__reactProps$"+sa,pi="__reactContainer$"+sa,nr="__reactEvents$"+sa,Vg="__reactListeners$"+sa,Lg="__reactHandles$"+sa,zf="__reactResources$"+sa,us="__reactMarker$"+sa;function ar(t){delete t[Se],delete t[Be],delete t[nr],delete t[Vg],delete t[Lg]}function vi(t){var e=t[Se];if(e)return e;for(var n=t.parentNode;n;){if(e=n[pi]||n[Se]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=np(t);t!==null;){if(n=t[Se])return n;t=np(t)}return e}t=n,n=t.parentNode}return null}function gi(t){if(t=t[Se]||t[pi]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function cs(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(r(33))}function yi(t){var e=t[zf];return e||(e=t[zf]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function pe(t){t[us]=!0}var Bf=new Set,Uf={};function Ha(t,e){Si(t,e),Si(t+"Capture",e)}function Si(t,e){for(Uf[t]=e,t=0;t<e.length;t++)Bf.add(e[t])}var Gg=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]*$"),Vf={},Lf={};function Hg(t){return $.call(Lf,t)?!0:$.call(Vf,t)?!1:Gg.test(t)?Lf[t]=!0:(Vf[t]=!0,!1)}function Sl(t,e,n){if(Hg(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 bl(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function 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 Gf(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function qg(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 ir(t){if(!t._valueTracker){var e=Gf(t)?"checked":"value";t._valueTracker=qg(t,e,""+t[e])}}function Hf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=Gf(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function Tl(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 Yg=/[\n"\\]/g;function rn(t){return t.replace(Yg,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function sr(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?lr(t,d,on(e)):n!=null?lr(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 qf(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)){ir(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),ir(t)}function lr(t,e,n){e==="number"&&Tl(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function bi(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 Yf(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 If(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),ir(t)}function Ti(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ig=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 Xf(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||Ig.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function Kf(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&&Xf(t,l,i)}else for(var u in e)e.hasOwnProperty(u)&&Xf(t,u,e[u])}function or(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 Xg=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"]]),Kg=/^[\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 _l(t){return Kg.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Un(){}var rr=null;function ur(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var _i=null,xi=null;function Zf(t){var e=gi(t);if(e&&(t=e.stateNode)){var n=t[Be]||null;t:switch(t=e.stateNode,e.type){case"input":if(sr(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));sr(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&&Hf(i)}break t;case"textarea":Yf(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&bi(t,!!n.multiple,e,!1)}}}var cr=!1;function Qf(t,e,n){if(cr)return t(e,n);cr=!0;try{var i=t(e);return i}finally{if(cr=!1,(_i!==null||xi!==null)&&(uo(),_i&&(e=_i,t=xi,xi=_i=null,Zf(e),t)))for(e=0;e<t.length;e++)Zf(t[e])}}function fs(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"),fr=!1;if(Vn)try{var ds={};Object.defineProperty(ds,"passive",{get:function(){fr=!0}}),window.addEventListener("test",ds,ds),window.removeEventListener("test",ds,ds)}catch{fr=!1}var la=null,dr=null,xl=null;function Ff(){if(xl)return xl;var t,e=dr,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 xl=l.slice(t,1<i?1-i:void 0)}function El(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 Al(){return!0}function Jf(){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)?Al:Jf,this.isPropagationStopped=Jf,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=Al)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Al)},persist:function(){},isPersistent:Al}),e}var qa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nl=Ue(qa),hs=b({},qa,{view:0,detail:0}),Zg=Ue(hs),hr,mr,ms,Dl=b({},hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vr,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!==ms&&(ms&&t.type==="mousemove"?(hr=t.screenX-ms.screenX,mr=t.screenY-ms.screenY):mr=hr=0,ms=t),hr)},movementY:function(t){return"movementY"in t?t.movementY:mr}}),Pf=Ue(Dl),Qg=b({},Dl,{dataTransfer:0}),Fg=Ue(Qg),Jg=b({},hs,{relatedTarget:0}),pr=Ue(Jg),Pg=b({},qa,{animationName:0,elapsedTime:0,pseudoElement:0}),Wg=Ue(Pg),$g=b({},qa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ty=Ue($g),ey=b({},qa,{data:0}),Wf=Ue(ey),ny={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ay={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"},iy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sy(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=iy[t])?!!e[t]:!1}function vr(){return sy}var ly=b({},hs,{key:function(t){if(t.key){var e=ny[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=El(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?ay[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vr,charCode:function(t){return t.type==="keypress"?El(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?El(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),oy=Ue(ly),ry=b({},Dl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$f=Ue(ry),uy=b({},hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vr}),cy=Ue(uy),fy=b({},qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),dy=Ue(fy),hy=b({},Dl,{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}),my=Ue(hy),py=b({},qa,{newState:0,oldState:0}),vy=Ue(py),gy=[9,13,27,32],gr=Vn&&"CompositionEvent"in window,ps=null;Vn&&"documentMode"in document&&(ps=document.documentMode);var yy=Vn&&"TextEvent"in window&&!ps,td=Vn&&(!gr||ps&&8<ps&&11>=ps),ed=" ",nd=!1;function ad(t,e){switch(t){case"keyup":return gy.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function id(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ei=!1;function Sy(t,e){switch(t){case"compositionend":return id(e);case"keypress":return e.which!==32?null:(nd=!0,ed);case"textInput":return t=e.data,t===ed&&nd?null:t;default:return null}}function by(t,e){if(Ei)return t==="compositionend"||!gr&&ad(t,e)?(t=Ff(),xl=dr=la=null,Ei=!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 td&&e.locale!=="ko"?null:e.data;default:return null}}var Ty={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 sd(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Ty[t.type]:e==="textarea"}function ld(t,e,n,i){_i?xi?xi.push(i):xi=[i]:_i=i,e=go(e,"onChange"),0<e.length&&(n=new Nl("onChange","change",null,n,i),t.push({event:n,listeners:e}))}var vs=null,gs=null;function _y(t){qm(t,0)}function Cl(t){var e=cs(t);if(Hf(e))return t}function od(t,e){if(t==="change")return e}var rd=!1;if(Vn){var yr;if(Vn){var Sr="oninput"in document;if(!Sr){var ud=document.createElement("div");ud.setAttribute("oninput","return;"),Sr=typeof ud.oninput=="function"}yr=Sr}else yr=!1;rd=yr&&(!document.documentMode||9<document.documentMode)}function cd(){vs&&(vs.detachEvent("onpropertychange",fd),gs=vs=null)}function fd(t){if(t.propertyName==="value"&&Cl(gs)){var e=[];ld(e,gs,t,ur(t)),Qf(_y,e)}}function xy(t,e,n){t==="focusin"?(cd(),vs=e,gs=n,vs.attachEvent("onpropertychange",fd)):t==="focusout"&&cd()}function Ey(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Cl(gs)}function Ay(t,e){if(t==="click")return Cl(e)}function Ny(t,e){if(t==="input"||t==="change")return Cl(e)}function Dy(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Qe=typeof Object.is=="function"?Object.is:Dy;function ys(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 dd(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function hd(t,e){var n=dd(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=dd(n)}}function md(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?md(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function pd(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Tl(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=Tl(t.document)}return e}function br(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 Cy=Vn&&"documentMode"in document&&11>=document.documentMode,Ai=null,Tr=null,Ss=null,_r=!1;function vd(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_r||Ai==null||Ai!==Tl(i)||(i=Ai,"selectionStart"in i&&br(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}),Ss&&ys(Ss,i)||(Ss=i,i=go(Tr,"onSelect"),0<i.length&&(e=new Nl("onSelect","select",null,e,n),t.push({event:e,listeners:i}),e.target=Ai)))}function Ya(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Ni={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionrun:Ya("Transition","TransitionRun"),transitionstart:Ya("Transition","TransitionStart"),transitioncancel:Ya("Transition","TransitionCancel"),transitionend:Ya("Transition","TransitionEnd")},xr={},gd={};Vn&&(gd=document.createElement("div").style,"AnimationEvent"in window||(delete Ni.animationend.animation,delete Ni.animationiteration.animation,delete Ni.animationstart.animation),"TransitionEvent"in window||delete Ni.transitionend.transition);function Ia(t){if(xr[t])return xr[t];if(!Ni[t])return t;var e=Ni[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in gd)return xr[t]=e[n];return t}var yd=Ia("animationend"),Sd=Ia("animationiteration"),bd=Ia("animationstart"),jy=Ia("transitionrun"),My=Ia("transitionstart"),Oy=Ia("transitioncancel"),Td=Ia("transitionend"),_d=new Map,Er="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(" ");Er.push("scrollEnd");function _n(t,e){_d.set(t,e),Ha(e,[t])}var jl=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=[],Di=0,Ar=0;function Ml(){for(var t=Di,e=Ar=Di=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&&xd(n,l,u)}}function Ol(t,e,n,i){un[Di++]=t,un[Di++]=e,un[Di++]=n,un[Di++]=i,Ar|=i,t.lanes|=i,t=t.alternate,t!==null&&(t.lanes|=i)}function Nr(t,e,n,i){return Ol(t,e,n,i),Rl(t)}function Xa(t,e){return Ol(t,null,null,e),Rl(t)}function xd(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 Rl(t){if(50<Hs)throw Hs=0,zu=null,Error(r(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Ci={};function Ry(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 Ry(t,e,n,i)}function Dr(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 Ed(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 kl(t,e,n,i,l,u){var d=0;if(i=t,typeof t=="function")Dr(t)&&(d=1);else if(typeof t=="string")d=U1(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 Ka(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 P:d=9;break t;case k:d=11;break t;case Q: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 Ka(t,e,n,i){return t=Fe(7,t,i,e),t.lanes=n,t}function Cr(t,e,n){return t=Fe(6,t,null,e),t.lanes=n,t}function Ad(t){var e=Fe(18,null,null,0);return e.stateNode=t,e}function jr(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 Nd=new WeakMap;function cn(t,e){if(typeof t=="object"&&t!==null){var n=Nd.get(t);return n!==void 0?n:(e={value:t,source:e,stack:at(e)},Nd.set(t,e),e)}return{value:t,source:e,stack:at(e)}}var ji=[],Mi=0,wl=null,bs=0,fn=[],dn=0,oa=null,jn=1,Mn="";function Gn(t,e){ji[Mi++]=bs,ji[Mi++]=wl,wl=t,bs=e}function Dd(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 Mr(t){t.return!==null&&(Gn(t,1),Dd(t,1,0))}function Or(t){for(;t===wl;)wl=ji[--Mi],ji[Mi]=null,bs=ji[--Mi],ji[Mi]=null;for(;t===oa;)oa=fn[--dn],fn[dn]=null,Mn=fn[--dn],fn[dn]=null,jn=fn[--dn],fn[dn]=null}function Cd(t,e){fn[dn++]=jn,fn[dn++]=Mn,fn[dn++]=oa,jn=e.id,Mn=e.overflow,oa=t}var be=null,Kt=null,Dt=!1,ra=null,hn=!1,Rr=Error(r(519));function ua(t){var e=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ts(cn(e,t)),Rr}function jd(t){var e=t.stateNode,n=t.type,i=t.memoizedProps;switch(e[Se]=t,e[Be]=i,n){case"dialog":Et("cancel",e),Et("close",e);break;case"iframe":case"object":case"embed":Et("load",e);break;case"video":case"audio":for(n=0;n<Ys.length;n++)Et(Ys[n],e);break;case"source":Et("error",e);break;case"img":case"image":case"link":Et("error",e),Et("load",e);break;case"details":Et("toggle",e);break;case"input":Et("invalid",e),qf(e,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Et("invalid",e);break;case"textarea":Et("invalid",e),If(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||Km(e.textContent,n)?(i.popover!=null&&(Et("beforetoggle",e),Et("toggle",e)),i.onScroll!=null&&Et("scroll",e),i.onScrollEnd!=null&&Et("scrollend",e),i.onClick!=null&&(e.onclick=Un),e=!0):e=!1,e||ua(t,!0)}function Md(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 Oi(t){if(t!==be)return!1;if(!Dt)return Md(t),Dt=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||Ju(t.type,t.memoizedProps)),n=!n),n&&Kt&&ua(t),Md(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Kt=ep(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Kt=ep(t)}else e===27?(e=Kt,xa(t.type)?(t=ec,ec=null,Kt=t):Kt=e):Kt=be?pn(t.stateNode.nextSibling):null;return!0}function Za(){Kt=be=null,Dt=!1}function kr(){var t=ra;return t!==null&&(He===null?He=t:He.push.apply(He,t),ra=null),t}function Ts(t){ra===null?ra=[t]:ra.push(t)}var wr=Gt(null),Qa=null,Hn=null;function ca(t,e,n){pt(wr,e._currentValue),e._currentValue=n}function qn(t){t._currentValue=wr.current,jt(wr)}function zr(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 Br(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),zr(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),zr(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 Ri(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(Qs):t=[Qs])}l=l.return}t!==null&&Br(e,t,n,i),e.flags|=262144}function zl(t){for(t=t.firstContext;t!==null;){if(!Qe(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Fa(t){Qa=t,Hn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Te(t){return Od(Qa,t)}function Bl(t,e){return Qa===null&&Fa(t),Od(t,e)}function Od(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 ky=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()})}},wy=a.unstable_scheduleCallback,zy=a.unstable_NormalPriority,se={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ur(){return{controller:new ky,data:new Map,refCount:0}}function _s(t){t.refCount--,t.refCount===0&&wy(zy,function(){t.controller.abort()})}var xs=null,Vr=0,ki=0,wi=null;function By(t,e){if(xs===null){var n=xs=[];Vr=0,ki=Hu(),wi={status:"pending",value:void 0,then:function(i){n.push(i)}}}return Vr++,e.then(Rd,Rd),e}function Rd(){if(--Vr===0&&xs!==null){wi!==null&&(wi.status="fulfilled");var t=xs;xs=null,ki=0,wi=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Uy(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 kd=E.S;E.S=function(t,e){vm=F(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&By(t,e),kd!==null&&kd(t,e)};var Ja=Gt(null);function Lr(){var t=Ja.current;return t!==null?t:qt.pooledCache}function Ul(t,e){e===null?pt(Ja,Ja.current):pt(Ja,e.pool)}function wd(){var t=Lr();return t===null?null:{parent:se._currentValue,pool:t}}var zi=Error(r(460)),Gr=Error(r(474)),Vl=Error(r(542)),Ll={then:function(){}};function zd(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Bd(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,Vd(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,Vd(t),t}throw Wa=e,zi}}function Pa(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Wa=n,zi):n}}var Wa=null;function Ud(){if(Wa===null)throw Error(r(459));var t=Wa;return Wa=null,t}function Vd(t){if(t===zi||t===Vl)throw Error(r(483))}var Bi=null,Es=0;function Gl(t){var e=Es;return Es+=1,Bi===null&&(Bi=[]),Bd(Bi,t,e)}function As(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Hl(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 Ld(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=Cr(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&&Pa(lt)===A.type)?(A=l(A,C.props),As(A,C),A.return=D,A):(A=kl(C.type,C.key,C.props,null,D.mode,U),As(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=jr(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=Ka(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=Cr(""+A,D.mode,C),A.return=D,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case N:return C=kl(A.type,A.key,A.props,null,D.mode,C),As(C,A),C.return=D,C;case R:return A=jr(A,D.mode,C),A.return=D,A;case B:return A=Pa(A),V(D,A,C)}if(Yt(A)||dt(A))return A=Ka(A,D.mode,C,null),A.return=D,A;if(typeof A.then=="function")return V(D,Gl(A),C);if(A.$$typeof===L)return V(D,Bl(D,A),C);Hl(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=Pa(C),M(D,A,C,U)}if(Yt(C)||dt(C))return lt!==null?null:z(D,A,C,U,null);if(typeof C.then=="function")return M(D,A,Gl(C),U);if(C.$$typeof===L)return M(D,A,Bl(D,C),U);Hl(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=Pa(U),O(D,A,C,U,lt)}if(Yt(U)||dt(U))return D=D.get(C)||null,z(A,D,U,lt,null);if(typeof U.then=="function")return O(D,A,C,Gl(U),lt);if(U.$$typeof===L)return O(D,A,C,Bl(A,U),lt);Hl(A,U)}return null}function tt(D,A,C,U){for(var lt=null,Mt=null,it=A,gt=A=0,Nt=null;it!==null&><C.length;gt++){it.index>gt?(Nt=it,it=null):Nt=it.sibling;var Ot=M(D,it,C[gt],U);if(Ot===null){it===null&&(it=Nt);break}t&&it&&Ot.alternate===null&&e(D,it),A=u(Ot,A,gt),Mt===null?lt=Ot:Mt.sibling=Ot,Mt=Ot,it=Nt}if(gt===C.length)return n(D,it),Dt&&Gn(D,gt),lt;if(it===null){for(;gt<C.length;gt++)it=V(D,C[gt],U),it!==null&&(A=u(it,A,gt),Mt===null?lt=it:Mt.sibling=it,Mt=it);return Dt&&Gn(D,gt),lt}for(it=i(it);gt<C.length;gt++)Nt=O(it,D,gt,C[gt],U),Nt!==null&&(t&&Nt.alternate!==null&&it.delete(Nt.key===null?gt:Nt.key),A=u(Nt,A,gt),Mt===null?lt=Nt:Mt.sibling=Nt,Mt=Nt);return t&&it.forEach(function(Ca){return e(D,Ca)}),Dt&&Gn(D,gt),lt}function ut(D,A,C,U){if(C==null)throw Error(r(151));for(var lt=null,Mt=null,it=A,gt=A=0,Nt=null,Ot=C.next();it!==null&&!Ot.done;gt++,Ot=C.next()){it.index>gt?(Nt=it,it=null):Nt=it.sibling;var Ca=M(D,it,Ot.value,U);if(Ca===null){it===null&&(it=Nt);break}t&&it&&Ca.alternate===null&&e(D,it),A=u(Ca,A,gt),Mt===null?lt=Ca:Mt.sibling=Ca,Mt=Ca,it=Nt}if(Ot.done)return n(D,it),Dt&&Gn(D,gt),lt;if(it===null){for(;!Ot.done;gt++,Ot=C.next())Ot=V(D,Ot.value,U),Ot!==null&&(A=u(Ot,A,gt),Mt===null?lt=Ot:Mt.sibling=Ot,Mt=Ot);return Dt&&Gn(D,gt),lt}for(it=i(it);!Ot.done;gt++,Ot=C.next())Ot=O(it,D,gt,Ot.value,U),Ot!==null&&(t&&Ot.alternate!==null&&it.delete(Ot.key===null?gt:Ot.key),A=u(Ot,A,gt),Mt===null?lt=Ot:Mt.sibling=Ot,Mt=Ot);return t&&it.forEach(function(Q1){return e(D,Q1)}),Dt&&Gn(D,gt),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&&Pa(lt)===A.type){n(D,A.sibling),U=l(A,C.props),As(U,C),U.return=D,D=U;break t}n(D,A);break}else e(D,A);A=A.sibling}C.type===w?(U=Ka(C.props.children,D.mode,U,C.key),U.return=D,D=U):(U=kl(C.type,C.key,C.props,null,D.mode,U),As(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=jr(C,D.mode,U),U.return=D,D=U}return d(D);case B:return C=Pa(C),Lt(D,A,C,U)}if(Yt(C))return tt(D,A,C,U);if(dt(C)){if(lt=dt(C),typeof lt!="function")throw Error(r(150));return C=lt.call(C),ut(D,A,C,U)}if(typeof C.then=="function")return Lt(D,A,Gl(C),U);if(C.$$typeof===L)return Lt(D,A,Bl(D,C),U);Hl(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=Cr(C,D.mode,U),U.return=D,D=U),d(D)):n(D,A)}return function(D,A,C,U){try{Es=0;var lt=Lt(D,A,C,U);return Bi=null,lt}catch(it){if(it===zi||it===Vl)throw it;var Mt=Fe(29,it,null,D.mode);return Mt.lanes=U,Mt.return=D,Mt}finally{}}}var $a=Ld(!0),Gd=Ld(!1),fa=!1;function Hr(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qr(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,(kt&2)!==0){var l=i.pending;return l===null?e.next=e:(e.next=l.next,l.next=e),i.pending=e,e=Rl(t),xd(t,null,n),e}return Ol(t,i,e,n),Rl(t)}function Ns(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,Of(t,n)}}function Yr(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 Ir=!1;function Ds(){if(Ir){var t=wi;if(t!==null)throw t}}function Cs(t,e,n,i){Ir=!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?(At&M)===M:(i&M)===M){M!==0&&M===ki&&(Ir=!0),z!==null&&(z=z.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});t:{var tt=t,ut=v;M=e;var Lt=n;switch(ut.tag){case 1:if(tt=ut.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=ut.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 Hd(t,e){if(typeof t!="function")throw Error(r(191,t));t.call(e)}function qd(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)Hd(n[t],e)}var Ui=Gt(null),ql=Gt(0);function Yd(t,e){t=Pn,pt(ql,t),pt(Ui,e),Pn=t|e.baseLanes}function Xr(){pt(ql,Pn),pt(Ui,Ui.current)}function Kr(){Pn=ql.current,jt(Ui),jt(ql)}var Je=Gt(null),mn=null;function ma(t){var e=t.alternate;pt(ee,ee.current&1),pt(Je,t),mn===null&&(e===null||Ui.current!==null||e.memoizedState!==null)&&(mn=t)}function Zr(t){pt(ee,ee.current),pt(Je,t),mn===null&&(mn=t)}function Id(t){t.tag===22?(pt(ee,ee.current),pt(Je,t),mn===null&&(mn=t)):pa()}function pa(){pt(ee,ee.current),pt(Je,Je.current)}function Pe(t){jt(Je),mn===t&&(mn=null),jt(ee)}var ee=Gt(0);function Yl(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||$u(n)||tc(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,vt=null,Ut=null,le=null,Il=!1,Vi=!1,ti=!1,Xl=0,js=0,Li=null,Vy=0;function Pt(){throw Error(r(321))}function Qr(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 Fr(t,e,n,i,l,u){return Yn=u,vt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,E.H=t===null||t.memoizedState===null?Dh:cu,ti=!1,u=n(i,l),ti=!1,Vi&&(u=Kd(e,n,i,l)),Xd(t),u}function Xd(t){E.H=Rs;var e=Ut!==null&&Ut.next!==null;if(Yn=0,le=Ut=vt=null,Il=!1,js=0,Li=null,e)throw Error(r(300));t===null||oe||(t=t.dependencies,t!==null&&zl(t)&&(oe=!0))}function Kd(t,e,n,i){vt=t;var l=0;do{if(Vi&&(Li=null),js=0,Vi=!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=Ch,u=e(n,i)}while(Vi);return u}function Ly(){var t=E.H,e=t.useState()[0];return e=typeof e.then=="function"?Ms(e):e,t=t.useState()[0],(Ut!==null?Ut.memoizedState:null)!==t&&(vt.flags|=1024),e}function Jr(){var t=Xl!==0;return Xl=0,t}function Pr(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function Wr(t){if(Il){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Il=!1}Yn=0,le=Ut=vt=null,Vi=!1,js=Xl=0,Li=null}function ze(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return le===null?vt.memoizedState=le=t:le=le.next=t,le}function ne(){if(Ut===null){var t=vt.alternate;t=t!==null?t.memoizedState:null}else t=Ut.next;var e=le===null?vt.memoizedState:le.next;if(e!==null)le=e,Ut=t;else{if(t===null)throw vt.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?vt.memoizedState=le=t:le=le.next=t}return le}function Kl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ms(t){var e=js;return js+=1,Li===null&&(Li=[]),t=Bd(Li,t,e),e=vt,(le===null?e.memoizedState:le.next)===null&&(e=e.alternate,E.H=e===null||e.memoizedState===null?Dh:cu),t}function Zl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ms(t);if(t.$$typeof===L)return Te(t)}throw Error(r(438,String(t)))}function $r(t){var e=null,n=vt.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var i=vt.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=Kl(),vt.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]=ft;return e.index++,n}function In(t,e){return typeof e=="function"?e(t):e}function Ql(t){var e=ne();return tu(e,Ut,t)}function tu(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?(At&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===ki&&(z=!0);else if((Yn&M)===M){j=j.next,M===ki&&(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,vt.lanes|=M,ya|=M;V=j.action,ti&&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,vt.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=wi,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 eu(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 Zd(t,e,n){var i=vt,l=ne(),u=Dt;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,iu(Jd.bind(null,i,l,t),[t]),l.getSnapshot!==e||d||le!==null&&le.memoizedState.tag&1){if(i.flags|=2048,Gi(9,{destroy:void 0},Fd.bind(null,i,l,n,e),null),qt===null)throw Error(r(349));u||(Yn&127)!==0||Qd(i,e,n)}return n}function Qd(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=vt.updateQueue,e===null?(e=Kl(),vt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Fd(t,e,n,i){e.value=n,e.getSnapshot=i,Pd(e)&&Wd(t)}function Jd(t,e,n){return n(function(){Pd(e)&&Wd(t)})}function Pd(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Qe(t,n)}catch{return!0}}function Wd(t){var e=Xa(t,2);e!==null&&qe(e,t,2)}function nu(t){var e=ze();if(typeof t=="function"){var n=t;if(t=n(),ti){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 $d(t,e,n,i){return t.baseState=n,tu(t,Ut,typeof i=="function"?i:In)}function Gy(t,e,n,i,l){if(Pl(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,th(e,u)):(u.next=n.next,e.pending=n.next=u)}}function th(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),eh(t,e,v)}catch(j){au(t,e,j)}finally{u!==null&&d.types!==null&&(u.types=d.types),E.T=u}}else try{u=n(l,i),eh(t,e,u)}catch(j){au(t,e,j)}}function eh(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){nh(t,e,i)},function(i){return au(t,e,i)}):nh(t,e,n)}function nh(t,e,n){e.status="fulfilled",e.value=n,ah(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,th(t,n)))}function au(t,e,n){var i=t.pending;if(t.pending=null,i!==null){i=i.next;do e.status="rejected",e.reason=n,ah(e),e=e.next;while(e!==i)}t.action=null}function ah(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function ih(t,e){return e}function sh(t,e){if(Dt){var n=qt.formState;if(n!==null){t:{var i=vt;if(Dt){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:ih,lastRenderedState:e},n.queue=i,n=Eh.bind(null,vt,i),i.dispatch=n,i=nu(!1),u=uu.bind(null,vt,!1,i.queue),i=ze(),l={state:e,dispatch:null,action:t,pending:null},i.queue=l,n=Gy.bind(null,vt,l,u,n),l.dispatch=n,i.memoizedState=t,[e,n,!1]}function lh(t){var e=ne();return oh(e,Ut,t)}function oh(t,e,n){if(e=tu(t,e,ih)[0],t=Ql(In)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var i=Ms(e)}catch(d){throw d===zi?Vl:d}else i=e;e=ne();var l=e.queue,u=l.dispatch;return n!==e.memoizedState&&(vt.flags|=2048,Gi(9,{destroy:void 0},Hy.bind(null,l,n),null)),[i,u,t]}function Hy(t,e){t.action=e}function rh(t){var e=ne(),n=Ut;if(n!==null)return oh(e,n,t);ne(),e=e.memoizedState,n=ne();var i=n.queue.dispatch;return n.memoizedState=t,[e,i,!1]}function Gi(t,e,n,i){return t={tag:t,create:n,deps:i,inst:e,next:null},e=vt.updateQueue,e===null&&(e=Kl(),vt.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 uh(){return ne().memoizedState}function Fl(t,e,n,i){var l=ze();vt.flags|=t,l.memoizedState=Gi(1|e,{destroy:void 0},n,i===void 0?null:i)}function Jl(t,e,n,i){var l=ne();i=i===void 0?null:i;var u=l.memoizedState.inst;Ut!==null&&i!==null&&Qr(i,Ut.memoizedState.deps)?l.memoizedState=Gi(e,u,n,i):(vt.flags|=t,l.memoizedState=Gi(1|e,u,n,i))}function ch(t,e){Fl(8390656,8,t,e)}function iu(t,e){Jl(2048,8,t,e)}function qy(t){vt.flags|=4;var e=vt.updateQueue;if(e===null)e=Kl(),vt.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function fh(t){var e=ne().memoizedState;return qy({ref:e,nextImpl:t}),function(){if((kt&2)!==0)throw Error(r(440));return e.impl.apply(void 0,arguments)}}function dh(t,e){return Jl(4,2,t,e)}function hh(t,e){return Jl(4,4,t,e)}function mh(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 ph(t,e,n){n=n!=null?n.concat([t]):null,Jl(4,4,mh.bind(null,e,t),n)}function su(){}function vh(t,e){var n=ne();e=e===void 0?null:e;var i=n.memoizedState;return e!==null&&Qr(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function gh(t,e){var n=ne();e=e===void 0?null:e;var i=n.memoizedState;if(e!==null&&Qr(e,i[1]))return i[0];if(i=t(),ti){Tn(!0);try{t()}finally{Tn(!1)}}return n.memoizedState=[i,e],i}function lu(t,e,n){return n===void 0||(Yn&1073741824)!==0&&(At&261930)===0?t.memoizedState=e:(t.memoizedState=n,t=ym(),vt.lanes|=t,ya|=t,n)}function yh(t,e,n,i){return Qe(n,e)?n:Ui.current!==null?(t=lu(t,n,i),Qe(t,e)||(oe=!0),t):(Yn&42)===0||(Yn&1073741824)!==0&&(At&261930)===0?(oe=!0,t.memoizedState=n):(t=ym(),vt.lanes|=t,ya|=t,e)}function Sh(t,e,n,i,l){var u=H.p;H.p=u!==0&&8>u?u:8;var d=E.T,v={};E.T=v,uu(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=Uy(T,i);Os(t,e,z,tn(t))}else Os(t,e,i,tn(t))}catch(V){Os(t,e,{then:function(){},status:"rejected",reason:V},tn())}finally{H.p=u,d!==null&&v.types!==null&&(d.types=v.types),E.T=d}}function Yy(){}function ou(t,e,n,i){if(t.tag!==5)throw Error(r(476));var l=bh(t).queue;Sh(t,l,e,et,n===null?Yy:function(){return Th(t),n(i)})}function bh(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 Th(t){var e=bh(t);e.next===null&&(e=t.alternate.memoizedState),Os(t,e.next.queue,{},tn())}function ru(){return Te(Qs)}function _h(){return ne().memoizedState}function xh(){return ne().memoizedState}function Iy(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),Ns(i,e,n)),e={cache:Ur()},t.payload=e;return}e=e.return}}function Xy(t,e,n){var i=tn();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Pl(t)?Ah(e,n):(n=Nr(t,e,n,i),n!==null&&(qe(n,t,i),Nh(n,e,i)))}function Eh(t,e,n){var i=tn();Os(t,e,n,i)}function Os(t,e,n,i){var l={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Pl(t))Ah(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 Ol(t,e,l,0),qt===null&&Ml(),!1}catch{}finally{}if(n=Nr(t,e,l,i),n!==null)return qe(n,t,i),Nh(n,e,i),!0}return!1}function uu(t,e,n,i){if(i={lane:2,revertLane:Hu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Pl(t)){if(e)throw Error(r(479))}else e=Nr(t,n,i,2),e!==null&&qe(e,t,2)}function Pl(t){var e=t.alternate;return t===vt||e!==null&&e===vt}function Ah(t,e){Vi=Il=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Nh(t,e,n){if((n&4194048)!==0){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Of(t,n)}}var Rs={readContext:Te,use:Zl,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};Rs.useEffectEvent=Pt;var Dh={readContext:Te,use:Zl,useCallback:function(t,e){return ze().memoizedState=[t,e===void 0?null:e],t},useContext:Te,useEffect:ch,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Fl(4194308,4,mh.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Fl(4194308,4,t,e)},useInsertionEffect:function(t,e){Fl(4,2,t,e)},useMemo:function(t,e){var n=ze();e=e===void 0?null:e;var i=t();if(ti){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(ti){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=Xy.bind(null,vt,t),[i.memoizedState,t]},useRef:function(t){var e=ze();return t={current:t},e.memoizedState=t},useState:function(t){t=nu(t);var e=t.queue,n=Eh.bind(null,vt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:su,useDeferredValue:function(t,e){var n=ze();return lu(n,t,e)},useTransition:function(){var t=nu(!1);return t=Sh.bind(null,vt,t.queue,!0,!1),ze().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var i=vt,l=ze();if(Dt){if(n===void 0)throw Error(r(407));n=n()}else{if(n=e(),qt===null)throw Error(r(349));(At&127)!==0||Qd(i,e,n)}l.memoizedState=n;var u={value:n,getSnapshot:e};return l.queue=u,ch(Jd.bind(null,i,u,t),[t]),i.flags|=2048,Gi(9,{destroy:void 0},Fd.bind(null,i,u,n,e),null),n},useId:function(){var t=ze(),e=qt.identifierPrefix;if(Dt){var n=Mn,i=jn;n=(i&~(1<<32-je(i)-1)).toString(32)+n,e="_"+e+"R_"+n,n=Xl++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=Vy++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:ru,useFormState:sh,useActionState:sh,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=uu.bind(null,vt,!0,n),n.dispatch=e,[t,e]},useMemoCache:$r,useCacheRefresh:function(){return ze().memoizedState=Iy.bind(null,vt)},useEffectEvent:function(t){var e=ze(),n={impl:t};return e.memoizedState=n,function(){if((kt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},cu={readContext:Te,use:Zl,useCallback:vh,useContext:Te,useEffect:iu,useImperativeHandle:ph,useInsertionEffect:dh,useLayoutEffect:hh,useMemo:gh,useReducer:Ql,useRef:uh,useState:function(){return Ql(In)},useDebugValue:su,useDeferredValue:function(t,e){var n=ne();return yh(n,Ut.memoizedState,t,e)},useTransition:function(){var t=Ql(In)[0],e=ne().memoizedState;return[typeof t=="boolean"?t:Ms(t),e]},useSyncExternalStore:Zd,useId:_h,useHostTransitionStatus:ru,useFormState:lh,useActionState:lh,useOptimistic:function(t,e){var n=ne();return $d(n,Ut,t,e)},useMemoCache:$r,useCacheRefresh:xh};cu.useEffectEvent=fh;var Ch={readContext:Te,use:Zl,useCallback:vh,useContext:Te,useEffect:iu,useImperativeHandle:ph,useInsertionEffect:dh,useLayoutEffect:hh,useMemo:gh,useReducer:eu,useRef:uh,useState:function(){return eu(In)},useDebugValue:su,useDeferredValue:function(t,e){var n=ne();return Ut===null?lu(n,t,e):yh(n,Ut.memoizedState,t,e)},useTransition:function(){var t=eu(In)[0],e=ne().memoizedState;return[typeof t=="boolean"?t:Ms(t),e]},useSyncExternalStore:Zd,useId:_h,useHostTransitionStatus:ru,useFormState:rh,useActionState:rh,useOptimistic:function(t,e){var n=ne();return Ut!==null?$d(n,Ut,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:$r,useCacheRefresh:xh};Ch.useEffectEvent=fh;function fu(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 du={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),Ns(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),Ns(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),Ns(e,t,n))}};function jh(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?!ys(n,i)||!ys(l,u):!0}function Mh(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&&du.enqueueReplaceState(e,e.state,null)}function ei(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 Oh(t){jl(t)}function Rh(t){console.error(t)}function kh(t){jl(t)}function Wl(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(i){setTimeout(function(){throw i})}}function wh(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 hu(t,e,n){return n=da(n),n.tag=3,n.payload={element:null},n.callback=function(){Wl(t,e)},n}function zh(t){return t=da(t),t.tag=3,t}function Bh(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(){wh(e,n,i)}}var d=n.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(t.callback=function(){wh(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 Ky(t,e,n,i,l){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(e=n.alternate,e!==null&&Ri(e,n,l,!0),n=Je.current,n!==null){switch(n.tag){case 31:case 13:return mn===null?co():n.alternate===null&&Wt===0&&(Wt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,i===Ll?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([i]):e.add(i),Vu(t,i,l)),!1;case 22:return n.flags|=65536,i===Ll?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)),Vu(t,i,l)),!1}throw Error(r(435,n.tag))}return Vu(t,i,l),co(),!1}if(Dt)return e=Je.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=l,i!==Rr&&(t=Error(r(422),{cause:i}),Ts(cn(t,n)))):(i!==Rr&&(e=Error(r(423),{cause:i}),Ts(cn(e,n))),t=t.current.alternate,t.flags|=65536,l&=-l,t.lanes|=l,i=cn(i,n),l=hu(t.stateNode,i,l),Yr(t,l),Wt!==4&&(Wt=2)),!1;var u=Error(r(520),{cause:i});if(u=cn(u,n),Gs===null?Gs=[u]:Gs.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=hu(n.stateNode,i,t),Yr(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=zh(l),Bh(l,t,n,i),Yr(n,l),!1}n=n.return}while(n!==null);return!1}var mu=Error(r(461)),oe=!1;function _e(t,e,n,i){e.child=t===null?Gd(e,null,n,i):$a(e,t.child,n,i)}function Uh(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 Fa(e),i=Fr(t,e,n,d,u,l),v=Jr(),t!==null&&!oe?(Pr(t,e,l),Xn(t,e,l)):(Dt&&v&&Mr(e),e.flags|=1,_e(t,e,i,l),e.child)}function Vh(t,e,n,i,l){if(t===null){var u=n.type;return typeof u=="function"&&!Dr(u)&&u.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=u,Lh(t,e,u,i,l)):(t=kl(n.type,null,i,e,e.mode,l),t.ref=e.ref,t.return=e,e.child=t)}if(u=t.child,!_u(t,l)){var d=u.memoizedProps;if(n=n.compare,n=n!==null?n:ys,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 Lh(t,e,n,i,l){if(t!==null){var u=t.memoizedProps;if(ys(u,i)&&t.ref===e.ref)if(oe=!1,e.pendingProps=i=u,_u(t,l))(t.flags&131072)!==0&&(oe=!0);else return e.lanes=t.lanes,Xn(t,e,l)}return pu(t,e,n,i,l)}function Gh(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 Hh(t,e,u,n,i)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ul(e,u!==null?u.cachePool:null),u!==null?Yd(e,u):Xr(),Id(e);else return i=e.lanes=536870912,Hh(t,e,u!==null?u.baseLanes|n:n,n,i)}else u!==null?(Ul(e,u.cachePool),Yd(e,u),pa(),e.memoizedState=null):(t!==null&&Ul(e,null),Xr(),pa());return _e(t,e,l,n),e.child}function ks(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Hh(t,e,n,i,l){var u=Lr();return u=u===null?null:{parent:se._currentValue,pool:u},e.memoizedState={baseLanes:n,cachePool:u},t!==null&&Ul(e,null),Xr(),Id(e),t!==null&&Ri(t,e,i,!0),e.childLanes=l,null}function $l(t,e){return e=eo({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function qh(t,e,n){return $a(e,t.child,null,n),t=$l(e,e.pendingProps),t.flags|=2,Pe(e),e.memoizedState=null,t}function Zy(t,e,n){var i=e.pendingProps,l=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Dt){if(i.mode==="hidden")return t=$l(e,i),e.lanes=536870912,ks(null,t);if(Zr(e),(t=Kt)?(t=tp(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=Ad(t),n.return=e,e.child=n,be=e,Kt=null)):t=null,t===null)throw ua(e);return e.lanes=536870912,null}return $l(e,i)}var u=t.memoizedState;if(u!==null){var d=u.dehydrated;if(Zr(e),l)if(e.flags&256)e.flags&=-257,e=qh(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||Ri(t,e,n,!1),l=(n&t.childLanes)!==0,oe||l){if(i=qt,i!==null&&(d=Rf(i,n),d!==0&&d!==u.retryLane))throw u.retryLane=d,Xa(t,d),qe(i,t,d),mu;co(),e=qh(t,e,n)}else t=u.treeContext,Kt=pn(d.nextSibling),be=e,Dt=!0,ra=null,hn=!1,t!==null&&Cd(e,t),e=$l(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 to(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 pu(t,e,n,i,l){return Fa(e),n=Fr(t,e,n,i,void 0,l),i=Jr(),t!==null&&!oe?(Pr(t,e,l),Xn(t,e,l)):(Dt&&i&&Mr(e),e.flags|=1,_e(t,e,n,l),e.child)}function Yh(t,e,n,i,l,u){return Fa(e),e.updateQueue=null,n=Kd(e,i,n,l),Xd(t),i=Jr(),t!==null&&!oe?(Pr(t,e,u),Xn(t,e,u)):(Dt&&i&&Mr(e),e.flags|=1,_e(t,e,n,u),e.child)}function Ih(t,e,n,i,l){if(Fa(e),e.stateNode===null){var u=Ci,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=du,e.stateNode=u,u._reactInternals=e,u=e.stateNode,u.props=i,u.state=e.memoizedState,u.refs={},Hr(e),d=n.contextType,u.context=typeof d=="object"&&d!==null?Te(d):Ci,u.state=e.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(fu(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&&du.enqueueReplaceState(u,u.state,null),Cs(e,i,u,l),Ds(),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=ei(n,v);u.props=T;var j=u.context,z=n.contextType;d=Ci,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)&&Mh(e,u,i,d),fa=!1;var M=e.memoizedState;u.state=M,Cs(e,i,u,l),Ds(),j=e.memoizedState,v||M!==j||fa?(typeof V=="function"&&(fu(e,n,V,i),j=e.memoizedState),(T=fa||jh(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,qr(t,e),d=e.memoizedProps,z=ei(n,d),u.props=z,V=e.pendingProps,M=u.context,j=n.contextType,T=Ci,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)&&Mh(e,u,i,T),fa=!1,M=e.memoizedState,u.state=M,Cs(e,i,u,l),Ds();var O=e.memoizedState;d!==V||M!==O||fa||t!==null&&t.dependencies!==null&&zl(t.dependencies)?(typeof v=="function"&&(fu(e,n,v,i),O=e.memoizedState),(z=fa||jh(e,n,z,i,M,O,T)||t!==null&&t.dependencies!==null&&zl(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,to(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=$a(e,t.child,null,l),e.child=$a(e,null,n,l)):_e(t,e,n,l),e.memoizedState=u.state,t=e.child):t=Xn(t,e,l),t}function Xh(t,e,n,i){return Za(),e.flags|=256,_e(t,e,n,i),e.child}var vu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gu(t){return{baseLanes:t,cachePool:wd()}}function yu(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=$e),t}function Kh(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(Dt){if(l?ma(e):pa(),(t=Kt)?(t=tp(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=Ad(t),n.return=e,e.child=n,be=e,Kt=null)):t=null,t===null)throw ua(e);return tc(t)?e.lanes=32:e.lanes=536870912,null}var v=i.children;return i=i.fallback,l?(pa(),l=e.mode,v=eo({mode:"hidden",children:v},l),i=Ka(i,l,n,null),v.return=e,i.return=e,v.sibling=i,e.child=v,i=e.child,i.memoizedState=gu(n),i.childLanes=yu(t,d,n),e.memoizedState=vu,ks(null,i)):(ma(e),Su(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=bu(t,e,n)):e.memoizedState!==null?(pa(),e.child=t.child,e.flags|=128,e=null):(pa(),v=i.fallback,l=e.mode,i=eo({mode:"visible",children:i.children},l),v=Ka(v,l,n,null),v.flags|=2,i.return=e,v.return=e,i.sibling=v,e.child=i,$a(e,t.child,null,n),i=e.child,i.memoizedState=gu(n),i.childLanes=yu(t,d,n),e.memoizedState=vu,e=ks(null,i));else if(ma(e),tc(v)){if(d=v.nextSibling&&v.nextSibling.dataset,d)var j=d.dgst;d=j,i=Error(r(419)),i.stack="",i.digest=d,Ts({value:i,source:null,stack:null}),e=bu(t,e,n)}else if(oe||Ri(t,e,n,!1),d=(n&t.childLanes)!==0,oe||d){if(d=qt,d!==null&&(i=Rf(d,n),i!==0&&i!==T.retryLane))throw T.retryLane=i,Xa(t,i),qe(d,t,i),mu;$u(v)||co(),e=bu(t,e,n)}else $u(v)?(e.flags|=192,e.child=t.child,e=null):(t=T.treeContext,Kt=pn(v.nextSibling),be=e,Dt=!0,ra=null,hn=!1,t!==null&&Cd(e,t),e=Su(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=Ka(v,l,n,null),v.flags|=2),v.return=e,i.return=e,i.sibling=v,e.child=i,ks(null,i),i=e.child,v=t.child.memoizedState,v===null?v=gu(n):(l=v.cachePool,l!==null?(T=se._currentValue,l=l.parent!==T?{parent:T,pool:T}:l):l=wd(),v={baseLanes:v.baseLanes|n,cachePool:l}),i.memoizedState=v,i.childLanes=yu(t,d,n),e.memoizedState=vu,ks(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 Su(t,e){return e=eo({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function eo(t,e){return t=Fe(22,t,null,e),t.lanes=0,t}function bu(t,e,n){return $a(e,t.child,null,n),t=Su(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Zh(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),zr(t.return,e,n)}function Tu(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 Qh(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,pt(ee,d),_e(t,e,i,n),i=Dt?bs:0,!v&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Zh(t,n,e);else if(t.tag===19)Zh(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&&Yl(t)===null&&(l=n),n=n.sibling;n=l,n===null?(l=e.child,e.child=null):(l=n.sibling,n.sibling=null),Tu(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&&Yl(t)===null){e.child=l;break}t=l.sibling,l.sibling=n,n=l,l=t}Tu(e,!0,n,null,u,i);break;case"together":Tu(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(Ri(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 _u(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&zl(t)))}function Qy(t,e,n){switch(e.tag){case 3:sn(e,e.stateNode.containerInfo),ca(e,se,t.memoizedState.cache),Za();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,Zr(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?Kh(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||(Ri(t,e,n,!1),i=(n&e.childLanes)!==0),l){if(i)return Qh(t,e,n);e.flags|=128}if(l=e.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),pt(ee,ee.current),i)break;return null;case 22:return e.lanes=0,Gh(t,e,n,e.pendingProps);case 24:ca(e,se,t.memoizedState.cache)}return Xn(t,e,n)}function Fh(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)oe=!0;else{if(!_u(t,n)&&(e.flags&128)===0)return oe=!1,Qy(t,e,n);oe=(t.flags&131072)!==0}else oe=!1,Dt&&(e.flags&1048576)!==0&&Dd(e,bs,e.index);switch(e.lanes=0,e.tag){case 16:t:{var i=e.pendingProps;if(t=Pa(e.elementType),e.type=t,typeof t=="function")Dr(t)?(i=ei(t,i),e.tag=1,e=Ih(null,e,t,i,n)):(e.tag=0,e=pu(null,e,t,i,n));else{if(t!=null){var l=t.$$typeof;if(l===k){e.tag=11,e=Uh(null,e,t,i,n);break t}else if(l===Q){e.tag=14,e=Vh(null,e,t,i,n);break t}}throw e=Ct(t)||t,Error(r(306,e,""))}}return e;case 0:return pu(t,e,e.type,e.pendingProps,n);case 1:return i=e.type,l=ei(i,e.pendingProps),Ih(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,qr(t,e),Cs(e,i,null,n);var d=e.memoizedState;if(i=d.cache,ca(e,se,i),i!==u.cache&&Br(e,[se],n,!0),Ds(),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=Xh(t,e,i,n);break t}else if(i!==l){l=cn(Error(r(424)),e),Ts(l),e=Xh(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,Dt=!0,ra=null,hn=!0,n=Gd(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Za(),i===l){e=Xn(t,e,n);break t}_e(t,e,i,n)}e=e.child}return e;case 26:return to(t,e),t===null?(n=lp(e.type,null,e.pendingProps,null))?e.memoizedState=n:Dt||(n=e.type,t=e.pendingProps,i=yo(Ne.current).createElement(n),i[Se]=e,i[Be]=t,xe(i,n,t),pe(i),e.stateNode=i):e.memoizedState=lp(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Sn(e),t===null&&Dt&&(i=e.stateNode=ap(e.type,e.pendingProps,Ne.current),be=e,hn=!0,l=Kt,xa(e.type)?(ec=l,Kt=pn(i.firstChild)):Kt=l),_e(t,e,e.pendingProps.children,n),to(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Dt&&((l=i=Kt)&&(i=E1(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,Ju(l,u)?i=null:d!==null&&Ju(l,d)&&(e.flags|=32),e.memoizedState!==null&&(l=Fr(t,e,Ly,null,null,n),Qs._currentValue=l),to(t,e),_e(t,e,i,n),e.child;case 6:return t===null&&Dt&&((t=n=Kt)&&(n=A1(n,e.pendingProps,hn),n!==null?(e.stateNode=n,be=e,Kt=null,t=!0):t=!1),t||ua(e)),null;case 13:return Kh(t,e,n);case 4:return sn(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=$a(e,null,i,n):_e(t,e,i,n),e.child;case 11:return Uh(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,Fa(e),l=Te(l),i=i(l),e.flags|=1,_e(t,e,i,n),e.child;case 14:return Vh(t,e,e.type,e.pendingProps,n);case 15:return Lh(t,e,e.type,e.pendingProps,n);case 19:return Qh(t,e,n);case 31:return Zy(t,e,n);case 22:return Gh(t,e,n,e.pendingProps);case 24:return Fa(e),i=Te(se),t===null?(l=Lr(),l===null&&(l=qt,u=Ur(),l.pooledCache=u,u.refCount++,u!==null&&(l.pooledCacheLanes|=n),l=u),e.memoizedState={parent:i,cache:l},Hr(e),ca(e,se,l)):((t.lanes&n)!==0&&(qr(t,e),Cs(e,null,null,n),Ds()),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&&Br(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 xu(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(_m())t.flags|=8192;else throw Wa=Ll,Gr}else t.flags&=-16777217}function Jh(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!fp(e))if(_m())t.flags|=8192;else throw Wa=Ll,Gr}function no(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Bt():536870912,t.lanes|=e,Ii|=e)}function ws(t,e){if(!Dt)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 Fy(t,e,n){var i=e.pendingProps;switch(Or(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)&&(Oi(e)?Kn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,kr())),Zt(e),null;case 26:var l=e.type,u=e.memoizedState;return t===null?(Kn(e),u!==null?(Zt(e),Jh(e,u)):(Zt(e),xu(e,l,null,i,n))):u?u!==t.memoizedState?(Kn(e),Zt(e),Jh(e,u)):(Zt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==i&&Kn(e),Zt(e),xu(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,Oi(e)?jd(e):(t=ap(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,Oi(e))jd(e);else{var d=yo(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),xu(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,Oi(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||Km(t.nodeValue,n)),t||ua(e,!0)}else t=yo(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=Oi(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 Za(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Zt(e),t=!1}else n=kr(),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=Oi(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 Za(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Zt(e),l=!1}else l=kr(),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),no(e,e.updateQueue),Zt(e),null);case 4:return ke(),t===null&&Xu(e.stateNode.containerInfo),Zt(e),null;case 10:return qn(e.type),Zt(e),null;case 19:if(jt(ee),i=e.memoizedState,i===null)return Zt(e),null;if(l=(e.flags&128)!==0,u=i.rendering,u===null)if(l)ws(i,!1);else{if(Wt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=Yl(t),u!==null){for(e.flags|=128,ws(i,!1),t=u.updateQueue,e.updateQueue=t,no(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)Ed(n,t),n=n.sibling;return pt(ee,ee.current&1|2),Dt&&Gn(e,i.treeForkCount),e.child}t=t.sibling}i.tail!==null&&F()>oo&&(e.flags|=128,l=!0,ws(i,!1),e.lanes=4194304)}else{if(!l)if(t=Yl(u),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,no(e,t),ws(i,!0),i.tail===null&&i.tailMode==="hidden"&&!u.alternate&&!Dt)return Zt(e),null}else 2*F()-i.renderingStartTime>oo&&n!==536870912&&(e.flags|=128,l=!0,ws(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=F(),t.sibling=null,n=ee.current,pt(ee,l?n&1|2:n&1),Dt&&Gn(e,i.treeForkCount),t):(Zt(e),null);case 22:case 23:return Pe(e),Kr(),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&&no(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&&jt(Ja),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 Jy(t,e){switch(Or(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));Za()}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));Za()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return jt(ee),null;case 4:return ke(),null;case 10:return qn(e.type),null;case 22:case 23:return Pe(e),Kr(),t!==null&&jt(Ja),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 Ph(t,e){switch(Or(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:jt(ee);break;case 10:qn(e.type);break;case 22:case 23:Pe(e),Kr(),t!==null&&jt(Ja);break;case 24:qn(se)}}function zs(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 Wh(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{qd(e,n)}catch(i){zt(t,t.return,i)}}}function $h(t,e,n){n.props=ei(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(i){zt(t,e,i)}}function Bs(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 tm(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 Eu(t,e,n){try{var i=t.stateNode;y1(i,t.type,n,e),i[Be]=e}catch(l){zt(t,t.return,l)}}function em(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&xa(t.type)||t.tag===4}function Au(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||em(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 Nu(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(Nu(t,e,n),t=t.sibling;t!==null;)Nu(t,e,n),t=t.sibling}function ao(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(ao(t,e,n),t=t.sibling;t!==null;)ao(t,e,n),t=t.sibling}function nm(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,Du=!1,am=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Py(t,e){if(t=t.containerInfo,Qu=Ao,t=pd(t),br(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(Fu={focusedElem:t,selectionRange:n},Ao=!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=ei(n.type,l);t=i.getSnapshotBeforeUpdate(tt,u),i.__reactInternalSnapshotBeforeUpdate=t}catch(ut){zt(n,n.return,ut)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)Wu(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Wu(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 im(t,e,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:Fn(t,n),i&4&&zs(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=ei(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(l,e,t.__reactInternalSnapshotBeforeUpdate)}catch(d){zt(n,n.return,d)}}i&64&&Wh(n),i&512&&Bs(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{qd(t,e)}catch(d){zt(n,n.return,d)}}break;case 27:e===null&&i&4&&nm(n);case 26:case 5:Fn(t,n),e===null&&i&4&&tm(n),i&512&&Bs(n,n.return);break;case 12:Fn(t,n);break;case 31:Fn(t,n),i&4&&om(t,n);break;case 13:Fn(t,n),i&4&&rm(t,n),i&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=l1.bind(null,n),N1(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 sm(t){var e=t.alternate;e!==null&&(t.alternate=null,sm(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&ar(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;)lm(t,e,n),n=n.sibling}function lm(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),Xs(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,Wm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),Wi(t)):Wm(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"&&$h(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 om(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Wi(t)}catch(n){zt(e,e.return,n)}}}function rm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Wi(t)}catch(n){zt(e,e.return,n)}}function Wy(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new am),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new am),e;default:throw Error(r(435,t.tag))}}function io(t,e){var n=Wy(t);e.forEach(function(i){if(!n.has(i)){n.add(i);var l=o1.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));lm(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;)um(e,t),e=e.sibling}var xn=null;function um(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),zs(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[us]||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=up("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=up("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 cp(l,t.type,t.stateNode);else t.stateNode=rp(l,i,t.memoizedProps);else u!==i?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,i===null?cp(l,t.type,t.stateNode):rp(l,i,t.memoizedProps)):i===null&&t.stateNode!==null&&Eu(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&&Eu(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{Ti(l,"")}catch(tt){zt(t,t.return,tt)}}i&4&&t.stateNode!=null&&(l=t.memoizedProps,Eu(t,l,n!==null?n.memoizedProps:l)),i&1024&&(Du=!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(To=null,l=xn,xn=So(e.containerInfo),Le(e,t),xn=l,Ge(t),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Wi(e.containerInfo)}catch(tt){zt(t,t.return,tt)}Du&&(Du=!1,cm(t));break;case 4:i=xn,xn=So(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,io(t,i)));break;case 13:Le(e,t),Ge(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(lo=F()),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,io(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||ni(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?$m(O,!0):$m(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,io(t,n))));break;case 19:Le(e,t),Ge(t),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,io(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(em(i)){n=i;break}i=i.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var l=n.stateNode,u=Au(t);ao(t,u,l);break;case 5:var d=n.stateNode;n.flags&32&&(Ti(d,""),n.flags&=-33);var v=Au(t);ao(t,v,d);break;case 3:case 4:var T=n.stateNode.containerInfo,j=Au(t);Nu(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 cm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;cm(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;)im(t,e.alternate,e),e=e.sibling}function ni(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),ni(e);break;case 1:On(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&$h(e,e.return,n),ni(e);break;case 27:Xs(e.stateNode);case 26:case 5:On(e,e.return),ni(e);break;case 22:e.memoizedState===null&&ni(e);break;case 30:ni(e);break;default:ni(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),zs(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++)Hd(T[l],v)}catch(j){zt(i,i.return,j)}}n&&d&64&&Wh(u),Bs(u,u.return);break;case 27:nm(u);case 26:case 5:Jn(l,u,n),n&&i===null&&d&4&&tm(u),Bs(u,u.return);break;case 12:Jn(l,u,n);break;case 31:Jn(l,u,n),n&&d&4&&om(l,u);break;case 13:Jn(l,u,n),n&&d&4&&rm(l,u);break;case 22:u.memoizedState===null&&Jn(l,u,n),Bs(u,u.return);break;case 30:break;default:Jn(l,u,n)}e=e.sibling}}function Cu(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&&_s(n))}function ju(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&_s(t))}function En(t,e,n,i){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)fm(t,e,n,i),e=e.sibling}function fm(t,e,n,i){var l=e.flags;switch(e.tag){case 0:case 11:case 15:En(t,e,n,i),l&2048&&zs(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&&_s(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):Us(t,e):u._visibility&2?En(t,e,n,i):(u._visibility|=2,Hi(t,e,n,i,(e.subtreeFlags&10256)!==0||!1)),l&2048&&Cu(d,e);break;case 24:En(t,e,n,i),l&2048&&ju(e.alternate,e);break;default:En(t,e,n,i)}}function Hi(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:Hi(u,d,v,T,l),zs(8,d);break;case 23:break;case 22:var z=d.stateNode;d.memoizedState!==null?z._visibility&2?Hi(u,d,v,T,l):Us(u,d):(z._visibility|=2,Hi(u,d,v,T,l)),l&&j&2048&&Cu(d.alternate,d);break;case 24:Hi(u,d,v,T,l),l&&j&2048&&ju(d.alternate,d);break;default:Hi(u,d,v,T,l)}e=e.sibling}}function Us(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:Us(n,i),l&2048&&Cu(i.alternate,i);break;case 24:Us(n,i),l&2048&&ju(i.alternate,i);break;default:Us(n,i)}e=e.sibling}}var Vs=8192;function qi(t,e,n){if(t.subtreeFlags&Vs)for(t=t.child;t!==null;)dm(t,e,n),t=t.sibling}function dm(t,e,n){switch(t.tag){case 26:qi(t,e,n),t.flags&Vs&&t.memoizedState!==null&&V1(n,xn,t.memoizedState,t.memoizedProps);break;case 5:qi(t,e,n);break;case 3:case 4:var i=xn;xn=So(t.stateNode.containerInfo),qi(t,e,n),xn=i;break;case 22:t.memoizedState===null&&(i=t.alternate,i!==null&&i.memoizedState!==null?(i=Vs,Vs=16777216,qi(t,e,n),Vs=i):qi(t,e,n));break;default:qi(t,e,n)}}function hm(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 Ls(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,pm(i,t)}hm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)mm(t),t=t.sibling}function mm(t){switch(t.tag){case 0:case 11:case 15:Ls(t),t.flags&2048&&va(9,t,t.return);break;case 3:Ls(t);break;case 12:Ls(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,so(t)):Ls(t);break;default:Ls(t)}}function so(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,pm(i,t)}hm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:va(8,e,e.return),so(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,so(e));break;default:so(e)}t=t.sibling}}function pm(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:_s(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(sm(i),i===n){ve=null;break t}if(l!==null){l.return=u,ve=l;break t}ve=u}}}var $y={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}},t1=typeof WeakMap=="function"?WeakMap:Map,kt=0,qt=null,xt=null,At=0,wt=0,We=null,ga=!1,Yi=!1,Mu=!1,Pn=0,Wt=0,ya=0,ai=0,Ou=0,$e=0,Ii=0,Gs=null,He=null,Ru=!1,lo=0,vm=0,oo=1/0,ro=null,Sa=null,he=0,ba=null,Xi=null,Wn=0,ku=0,wu=null,gm=null,Hs=0,zu=null;function tn(){return(kt&2)!==0&&At!==0?At&-At:E.T!==null?Hu():kf()}function ym(){if($e===0)if((At&536870912)===0||Dt){var t=Ua;Ua<<=1,(Ua&3932160)===0&&(Ua=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)&&(Ki(t,0),Ta(t,At,$e,!1)),ye(t,n),((kt&2)===0||t!==qt)&&(t===qt&&((kt&2)===0&&(ai|=n),Wt===4&&Ta(t,At,$e,!1)),Rn(t))}function Sm(t,e,n){if((kt&6)!==0)throw Error(r(327));var i=!n&&(e&127)===0&&(e&t.expiredLanes)===0||ia(t,e),l=i?a1(t,e):Uu(t,e,!0),u=i;do{if(l===0){Yi&&!i&&Ta(t,e,0,!1);break}else{if(n=t.current.alternate,u&&!e1(n)){l=Uu(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=Gs;var T=v.current.memoizedState.isDehydrated;if(T&&(Ki(v,d).flags|=256),d=Uu(v,d,!1),d!==2){if(Mu&&!T){v.errorRecoveryDisabledLanes|=u,ai|=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){Ki(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=lo+300-F(),10<l)){if(Ta(i,e,$e,!ga),La(i,0,!0)!==0)break t;Wn=e,i.timeoutHandle=Jm(bm.bind(null,i,n,He,ro,Ru,e,$e,ai,Ii,ga,u,"Throttled",-0,0),l);break t}bm(i,n,He,ro,Ru,e,$e,ai,Ii,ga,u,null,-0,0)}}break}while(!0);Rn(t)}function bm(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},dm(e,u,V);var tt=(u&62914560)===u?lo-F():(u&4194048)===u?vm-F():0;if(tt=L1(V,tt),tt!==null){Wn=u,t.cancelPendingCommit=tt(Cm.bind(null,t,e,u,n,i,l,d,v,T,z,V,null,M,O)),Ta(t,u,d,!j);return}}Cm(t,e,u,n,i,l,d,v,T)}function e1(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&=~Ou,e&=~ai,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&&Mf(t,n,e)}function uo(){return(kt&6)===0?(qs(0),!1):!0}function Bu(){if(xt!==null){if(wt===0)var t=xt.return;else t=xt,Hn=Qa=null,Wr(t),Bi=null,Es=0,t=xt;for(;t!==null;)Ph(t.alternate,t),t=t.return;xt=null}}function Ki(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,T1(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),Wn=0,Bu(),qt=t,xt=n=Ln(t.current,null),At=e,wt=0,We=null,ga=!1,Yi=ia(t,e),Mu=!1,Ii=$e=Ou=ai=ya=Wt=0,He=Gs=null,Ru=!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,Ml(),n}function Tm(t,e){vt=null,E.H=Rs,e===zi||e===Vl?(e=Ud(),wt=3):e===Gr?(e=Ud(),wt=4):wt=e===mu?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,We=e,xt===null&&(Wt=1,Wl(t,cn(e,t.current)))}function _m(){var t=Je.current;return t===null?!0:(At&4194048)===At?mn===null:(At&62914560)===At||(At&536870912)!==0?t===mn:!1}function xm(){var t=E.H;return E.H=Rs,t===null?Rs:t}function Em(){var t=E.A;return E.A=$y,t}function co(){Wt=4,ga||(At&4194048)!==At&&Je.current!==null||(Yi=!0),(ya&134217727)===0&&(ai&134217727)===0||qt===null||Ta(qt,At,$e,!1)}function Uu(t,e,n){var i=kt;kt|=2;var l=xm(),u=Em();(qt!==t||At!==e)&&(ro=null,Ki(t,e)),e=!1;var d=Wt;t:do try{if(wt!==0&&xt!==null){var v=xt,T=We;switch(wt){case 8:Bu(),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,Zi(t,v,T,j),n&&Yi){d=0;break t}break;default:j=wt,wt=0,We=null,Zi(t,v,T,j)}}n1(),d=Wt;break}catch(z){Tm(t,z)}while(!0);return e&&t.shellSuspendCounter++,Hn=Qa=null,kt=i,E.H=l,E.A=u,xt===null&&(qt=null,At=0,Ml()),d}function n1(){for(;xt!==null;)Am(xt)}function a1(t,e){var n=kt;kt|=2;var i=xm(),l=Em();qt!==t||At!==e?(ro=null,oo=F()+500,Ki(t,e)):Yi=ia(t,e);t:do try{if(wt!==0&&xt!==null){e=xt;var u=We;e:switch(wt){case 1:wt=0,We=null,Zi(t,e,u,1);break;case 2:case 9:if(zd(u)){wt=0,We=null,Nm(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:zd(u)?(wt=0,We=null,Nm(e)):(wt=0,We=null,Zi(t,e,u,7));break;case 5:var d=null;switch(xt.tag){case 26:d=xt.memoizedState;case 5:case 27:var v=xt;if(d?fp(d):v.stateNode.complete){wt=0,We=null;var T=v.sibling;if(T!==null)xt=T;else{var j=v.return;j!==null?(xt=j,fo(j)):xt=null}break e}}wt=0,We=null,Zi(t,e,u,5);break;case 6:wt=0,We=null,Zi(t,e,u,6);break;case 8:Bu(),Wt=6;break t;default:throw Error(r(462))}}i1();break}catch(z){Tm(t,z)}while(!0);return Hn=Qa=null,E.H=i,E.A=l,kt=n,xt!==null?0:(qt=null,At=0,Ml(),Wt)}function i1(){for(;xt!==null&&!Rt();)Am(xt)}function Am(t){var e=Fh(t.alternate,t,Pn);t.memoizedProps=t.pendingProps,e===null?fo(t):xt=e}function Nm(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=Yh(n,e,e.pendingProps,e.type,void 0,At);break;case 11:e=Yh(n,e,e.pendingProps,e.type.render,e.ref,At);break;case 5:Wr(e);default:Ph(n,e),e=xt=Ed(e,Pn),e=Fh(n,e,Pn)}t.memoizedProps=t.pendingProps,e===null?fo(t):xt=e}function Zi(t,e,n,i){Hn=Qa=null,Wr(e),Bi=null,Es=0;var l=e.return;try{if(Ky(t,l,e,n,At)){Wt=1,Wl(t,cn(n,t.current)),xt=null;return}}catch(u){if(l!==null)throw xt=l,u;Wt=1,Wl(t,cn(n,t.current)),xt=null;return}e.flags&32768?(Dt||i===1?t=!0:Yi||(At&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))),Dm(e,t)):fo(e)}function fo(t){var e=t;do{if((e.flags&32768)!==0){Dm(e,ga);return}t=e.return;var n=Fy(e.alternate,e,Pn);if(n!==null){xt=n;return}if(e=e.sibling,e!==null){xt=e;return}xt=e=t}while(e!==null);Wt===0&&(Wt=5)}function Dm(t,e){do{var n=Jy(t.alternate,t);if(n!==null){n.flags&=32767,xt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){xt=t;return}xt=t=n}while(t!==null);Wt=6,xt=null}function Cm(t,e,n,i,l,u,d,v,T){t.cancelPendingCommit=null;do ho();while(he!==0);if((kt&6)!==0)throw Error(r(327));if(e!==null){if(e===t.current)throw Error(r(177));if(u=e.lanes|e.childLanes,u|=Ar,Ga(t,n,u,d,v,T),t===qt&&(xt=qt=null,At=0),Xi=e,ba=t,Wn=n,ku=u,wu=l,gm=i,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,r1(ht,function(){return km(),null})):(t.callbackNode=null,t.callbackPriority=0),i=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||i){i=E.T,E.T=null,l=H.p,H.p=2,d=kt,kt|=4;try{Py(t,e,n)}finally{kt=d,H.p=l,E.T=i}}he=1,jm(),Mm(),Om()}}function jm(){if(he===1){he=0;var t=ba,e=Xi,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=E.T,E.T=null;var i=H.p;H.p=2;var l=kt;kt|=4;try{um(e,t);var u=Fu,d=pd(t.containerInfo),v=u.focusedElem,T=u.selectionRange;if(d!==v&&v&&v.ownerDocument&&md(v.ownerDocument.documentElement,v)){if(T!==null&&br(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,ut=Math.min(T.start,tt),Lt=T.end===void 0?ut:Math.min(T.end,tt);!O.extend&&ut>Lt&&(d=Lt,Lt=ut,ut=d);var D=hd(v,ut),A=hd(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(),ut>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}}Ao=!!Qu,Fu=Qu=null}finally{kt=l,H.p=i,E.T=n}}t.current=e,he=2}}function Mm(){if(he===2){he=0;var t=ba,e=Xi,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=E.T,E.T=null;var i=H.p;H.p=2;var l=kt;kt|=4;try{im(t,e.alternate,e)}finally{kt=l,H.p=i,E.T=n}}he=3}}function Om(){if(he===4||he===3){he=0,q();var t=ba,e=Xi,n=Wn,i=gm;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?he=5:(he=0,Xi=ba=null,Rm(t,t.pendingLanes));var l=t.pendingLanes;if(l===0&&(Sa=null),er(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=H.p,H.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,H.p=l}}(Wn&3)!==0&&ho(),Rn(t),l=t.pendingLanes,(n&261930)!==0&&(l&42)!==0?t===zu?Hs++:(Hs=0,zu=t):Hs=0,qs(0)}}function Rm(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,_s(e)))}function ho(){return jm(),Mm(),Om(),km()}function km(){if(he!==5)return!1;var t=ba,e=ku;ku=0;var n=er(Wn),i=E.T,l=H.p;try{H.p=32>n?32:n,E.T=null,n=wu,wu=null;var u=ba,d=Wn;if(he=0,Xi=ba=null,Wn=0,(kt&6)!==0)throw Error(r(331));var v=kt;if(kt|=4,mm(u.current),fm(u,u.current,d,n),kt=v,qs(0,!1),Ce&&typeof Ce.onPostCommitFiberRoot=="function")try{Ce.onPostCommitFiberRoot(Dn,u)}catch{}return!0}finally{H.p=l,E.T=i,Rm(t,e)}}function wm(t,e,n){e=cn(n,e),e=hu(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)wm(t,t,n);else for(;e!==null;){if(e.tag===3){wm(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=zh(2),i=ha(e,n,2),i!==null&&(Bh(n,i,e,t),ye(i,2),Rn(i));break}}e=e.return}}function Vu(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new t1;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)||(Mu=!0,l.add(n),t=s1.bind(null,t,e,n),e.then(t,t))}function s1(t,e,n){var i=t.pingCache;i!==null&&i.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,qt===t&&(At&n)===n&&(Wt===4||Wt===3&&(At&62914560)===At&&300>F()-lo?(kt&2)===0&&Ki(t,0):Ou|=n,Ii===At&&(Ii=0)),Rn(t)}function zm(t,e){e===0&&(e=Bt()),t=Xa(t,e),t!==null&&(ye(t,e),Rn(t))}function l1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),zm(t,n)}function o1(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),zm(t,n)}function r1(t,e){return Z(t,e)}var mo=null,Qi=null,Lu=!1,po=!1,Gu=!1,_a=0;function Rn(t){t!==Qi&&t.next===null&&(Qi===null?mo=Qi=t:Qi=Qi.next=t),po=!0,Lu||(Lu=!0,c1())}function qs(t,e){if(!Gu&&po){Gu=!0;do for(var n=!1,i=mo;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,Lm(i,u))}else u=At,u=La(i,i===qt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(u&3)===0||ia(i,u)||(n=!0,Lm(i,u));i=i.next}while(n);Gu=!1}}function u1(){Bm()}function Bm(){po=Lu=!1;var t=0;_a!==0&&b1()&&(t=_a);for(var e=F(),n=null,i=mo;i!==null;){var l=i.next,u=Um(i,e);u===0?(i.next=null,n===null?mo=l:n.next=l,l===null&&(Qi=n)):(n=i,(t!==0||(u&3)!==0)&&(po=!0)),i=l}he!==0&&he!==5||qs(t),_a!==0&&(_a=0)}function Um(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]=mt(v,e)):T<=e&&(t.expiredLanes|=v),u&=~v}if(e=qt,n=At,n=La(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&&_t(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&&_t(i),er(n)){case 2:case 8:n=St;break;case 32:n=ht;break;case 268435456:n=ie;break;default:n=ht}return i=Vm.bind(null,t),n=Z(n,i),t.callbackPriority=e,t.callbackNode=n,e}return i!==null&&i!==null&&_t(i),t.callbackPriority=2,t.callbackNode=null,2}function Vm(t,e){if(he!==0&&he!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(ho()&&t.callbackNode!==n)return null;var i=At;return i=La(t,t===qt?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),i===0?null:(Sm(t,i,e),Um(t,F()),t.callbackNode!=null&&t.callbackNode===n?Vm.bind(null,t):null)}function Lm(t,e){if(ho())return null;Sm(t,e,!0)}function c1(){_1(function(){(kt&6)!==0?Z(J,u1):Bm()})}function Hu(){if(_a===0){var t=ki;t===0&&(t=Ba,Ba<<=1,(Ba&261888)===0&&(Ba=256)),_a=t}return _a}function Gm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:_l(""+t)}function Hm(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 f1(t,e,n,i,l){if(e==="submit"&&n&&n.stateNode===l){var u=Gm((l[Be]||null).action),d=i.submitter;d&&(e=(e=d[Be]||null)?Gm(e.formAction):d.getAttribute("formAction"),e!==null&&(u=e,d=null));var v=new Nl("action","action",null,i,l);t.push({event:v,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(_a!==0){var T=d?Hm(l,d):new FormData(l);ou(n,{pending:!0,data:T,method:l.method,action:u},null,T)}}else typeof u=="function"&&(v.preventDefault(),T=d?Hm(l,d):new FormData(l),ou(n,{pending:!0,data:T,method:l.method,action:u},u,T))},currentTarget:l}]})}}for(var qu=0;qu<Er.length;qu++){var Yu=Er[qu],d1=Yu.toLowerCase(),h1=Yu[0].toUpperCase()+Yu.slice(1);_n(d1,"on"+h1)}_n(yd,"onAnimationEnd"),_n(Sd,"onAnimationIteration"),_n(bd,"onAnimationStart"),_n("dblclick","onDoubleClick"),_n("focusin","onFocus"),_n("focusout","onBlur"),_n(jy,"onTransitionRun"),_n(My,"onTransitionStart"),_n(Oy,"onTransitionCancel"),_n(Td,"onTransitionEnd"),Si("onMouseEnter",["mouseout","mouseover"]),Si("onMouseLeave",["mouseout","mouseover"]),Si("onPointerEnter",["pointerout","pointerover"]),Si("onPointerLeave",["pointerout","pointerover"]),Ha("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ha("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ha("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ha("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ha("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ha("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),m1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ys));function qm(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){jl(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){jl(z)}l.currentTarget=null,u=T}}}}function Et(t,e){var n=e[nr];n===void 0&&(n=e[nr]=new Set);var i=t+"__bubble";n.has(i)||(Ym(e,t,2,!1),n.add(i))}function Iu(t,e,n){var i=0;e&&(i|=4),Ym(n,t,i,e)}var vo="_reactListening"+Math.random().toString(36).slice(2);function Xu(t){if(!t[vo]){t[vo]=!0,Bf.forEach(function(n){n!=="selectionchange"&&(m1.has(n)||Iu(n,!1,t),Iu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[vo]||(e[vo]=!0,Iu("selectionchange",!1,e))}}function Ym(t,e,n,i){switch(yp(e)){case 2:var l=q1;break;case 8:l=Y1;break;default:l=lc}n=l.bind(null,e,n,t),l=void 0,!fr||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 Ku(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=vi(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}Qf(function(){var j=u,z=ur(n),V=[];t:{var M=_d.get(t);if(M!==void 0){var O=Nl,tt=t;switch(t){case"keypress":if(El(n)===0)break t;case"keydown":case"keyup":O=oy;break;case"focusin":tt="focus",O=pr;break;case"focusout":tt="blur",O=pr;break;case"beforeblur":case"afterblur":O=pr;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=Pf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Fg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=cy;break;case yd:case Sd:case bd:O=Wg;break;case Td:O=dy;break;case"scroll":case"scrollend":O=Zg;break;case"wheel":O=my;break;case"copy":case"cut":case"paste":O=ty;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=$f;break;case"toggle":case"beforetoggle":O=vy}var ut=(e&4)!==0,Lt=!ut&&(t==="scroll"||t==="scrollend"),D=ut?M!==null?M+"Capture":null:M;ut=[];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=fs(A,D),U!=null&&ut.push(Is(A,U,C))),Lt)break;A=A.return}0<ut.length&&(M=new O(M,tt,null,n,z),V.push({event:M,listeners:ut}))}}if((e&7)===0){t:{if(M=t==="mouseover"||t==="pointerover",O=t==="mouseout"||t==="pointerout",M&&n!==rr&&(tt=n.relatedTarget||n.fromElement)&&(vi(tt)||tt[pi]))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?vi(tt):null,tt!==null&&(Lt=h(tt),ut=tt.tag,tt!==Lt||ut!==5&&ut!==27&&ut!==6)&&(tt=null)):(O=null,tt=j),O!==tt)){if(ut=Pf,U="onMouseLeave",D="onMouseEnter",A="mouse",(t==="pointerout"||t==="pointerover")&&(ut=$f,U="onPointerLeave",D="onPointerEnter",A="pointer"),Lt=O==null?M:cs(O),C=tt==null?M:cs(tt),M=new ut(U,A+"leave",O,n,z),M.target=Lt,M.relatedTarget=C,U=null,vi(z)===j&&(ut=new ut(D,A+"enter",tt,n,z),ut.target=C,ut.relatedTarget=Lt,U=ut),Lt=U,O&&tt)e:{for(ut=p1,D=O,A=tt,C=0,U=D;U;U=ut(U))C++;U=0;for(var lt=A;lt;lt=ut(lt))U++;for(;0<C-U;)D=ut(D),C--;for(;0<U-C;)A=ut(A),U--;for(;C--;){if(D===A||A!==null&&D===A.alternate){ut=D;break e}D=ut(D),A=ut(A)}ut=null}else ut=null;O!==null&&Im(V,M,O,ut,!1),tt!==null&&Lt!==null&&Im(V,Lt,tt,ut,!0)}}t:{if(M=j?cs(j):window,O=M.nodeName&&M.nodeName.toLowerCase(),O==="select"||O==="input"&&M.type==="file")var Mt=od;else if(sd(M))if(rd)Mt=Ny;else{Mt=Ey;var it=xy}else O=M.nodeName,!O||O.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?j&&or(j.elementType)&&(Mt=od):Mt=Ay;if(Mt&&(Mt=Mt(t,j))){ld(V,Mt,n,z);break t}it&&it(t,M,j),t==="focusout"&&j&&M.type==="number"&&j.memoizedProps.value!=null&&lr(M,"number",M.value)}switch(it=j?cs(j):window,t){case"focusin":(sd(it)||it.contentEditable==="true")&&(Ai=it,Tr=j,Ss=null);break;case"focusout":Ss=Tr=Ai=null;break;case"mousedown":_r=!0;break;case"contextmenu":case"mouseup":case"dragend":_r=!1,vd(V,n,z);break;case"selectionchange":if(Cy)break;case"keydown":case"keyup":vd(V,n,z)}var gt;if(gr)t:{switch(t){case"compositionstart":var Nt="onCompositionStart";break t;case"compositionend":Nt="onCompositionEnd";break t;case"compositionupdate":Nt="onCompositionUpdate";break t}Nt=void 0}else Ei?ad(t,n)&&(Nt="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(Nt="onCompositionStart");Nt&&(td&&n.locale!=="ko"&&(Ei||Nt!=="onCompositionStart"?Nt==="onCompositionEnd"&&Ei&&(gt=Ff()):(la=z,dr="value"in la?la.value:la.textContent,Ei=!0)),it=go(j,Nt),0<it.length&&(Nt=new Wf(Nt,t,null,n,z),V.push({event:Nt,listeners:it}),gt?Nt.data=gt:(gt=id(n),gt!==null&&(Nt.data=gt)))),(gt=yy?Sy(t,n):by(t,n))&&(Nt=go(j,"onBeforeInput"),0<Nt.length&&(it=new Wf("onBeforeInput","beforeinput",null,n,z),V.push({event:it,listeners:Nt}),it.data=gt)),f1(V,t,j,n,z)}qm(V,e)})}function Is(t,e,n){return{instance:t,listener:e,currentTarget:n}}function go(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=fs(t,n),l!=null&&i.unshift(Is(t,l,u)),l=fs(t,e),l!=null&&i.push(Is(t,l,u))),t.tag===3)return i;t=t.return}return[]}function p1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Im(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=fs(n,u),j!=null&&d.unshift(Is(n,j,T))):l||(j=fs(n,u),j!=null&&d.push(Is(n,j,T)))),n=n.return}d.length!==0&&t.push({event:e,listeners:d})}var v1=/\r\n?/g,g1=/\u0000|\uFFFD/g;function Xm(t){return(typeof t=="string"?t:""+t).replace(v1,`
|
|
25
|
-
`).replace(g1,"")}function Km(t,e){return e=Xm(e),Xm(t)===e}function Vt(t,e,n,i,l,u){switch(n){case"children":typeof i=="string"?e==="body"||e==="textarea"&&i===""||Ti(t,i):(typeof i=="number"||typeof i=="bigint")&&e!=="body"&&Ti(t,""+i);break;case"className":bl(t,"class",i);break;case"tabIndex":bl(t,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":bl(t,n,i);break;case"style":Kf(t,i,u);break;case"data":if(e!=="object"){bl(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=_l(""+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=_l(""+i),t.setAttribute(n,i);break;case"onClick":i!=null&&(t.onclick=Un);break;case"onScroll":i!=null&&Et("scroll",t);break;case"onScrollEnd":i!=null&&Et("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=_l(""+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":Et("beforetoggle",t),Et("toggle",t),Sl(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":Sl(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=Xg.get(n)||n,Sl(t,n,i))}}function Zu(t,e,n,i,l,u){switch(n){case"style":Kf(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"?Ti(t,i):(typeof i=="number"||typeof i=="bigint")&&Ti(t,""+i);break;case"onScroll":i!=null&&Et("scroll",t);break;case"onScrollEnd":i!=null&&Et("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(!Uf.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,""):Sl(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":Et("error",t),Et("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":Et("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)}}qf(t,u,v,T,j,d,l,!1);return;case"select":Et("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?bi(t,!!i,e,!1):n!=null&&bi(t,!!i,n,!0);return;case"textarea":Et("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)}If(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":Et("beforetoggle",t),Et("toggle",t),Et("cancel",t),Et("close",t);break;case"iframe":case"object":Et("load",t);break;case"video":case"audio":for(i=0;i<Ys.length;i++)Et(Ys[i],t);break;case"image":Et("error",t),Et("load",t);break;case"details":Et("toggle",t);break;case"embed":case"source":case"link":Et("error",t),Et("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(or(e)){for(z in n)n.hasOwnProperty(z)&&(i=n[z],i!==void 0&&Zu(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 y1(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)}}sr(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?bi(t,!!n,M,!1):!!i!=!!n&&(e!=null?bi(t,!!n,e,!0):bi(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)}Yf(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 ut in n)M=n[ut],n.hasOwnProperty(ut)&&M!=null&&!i.hasOwnProperty(ut)&&Vt(t,e,ut,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(or(e)){for(var Lt in n)M=n[Lt],n.hasOwnProperty(Lt)&&M!==void 0&&!i.hasOwnProperty(Lt)&&Zu(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||Zu(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 Zm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function S1(){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&&Zm(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&&Zm(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 Qu=null,Fu=null;function yo(t){return t.nodeType===9?t:t.ownerDocument}function Qm(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 Fm(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 Ju(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 Pu=null;function b1(){var t=window.event;return t&&t.type==="popstate"?t===Pu?!1:(Pu=t,!0):(Pu=null,!1)}var Jm=typeof setTimeout=="function"?setTimeout:void 0,T1=typeof clearTimeout=="function"?clearTimeout:void 0,Pm=typeof Promise=="function"?Promise:void 0,_1=typeof queueMicrotask=="function"?queueMicrotask:typeof Pm<"u"?function(t){return Pm.resolve(null).then(t).catch(x1)}:Jm;function x1(t){setTimeout(function(){throw t})}function xa(t){return t==="head"}function Wm(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),Wi(e);return}i--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")i++;else if(n==="html")Xs(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,Xs(n);for(var u=n.firstChild;u;){var d=u.nextSibling,v=u.nodeName;u[us]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=d}}else n==="body"&&Xs(t.ownerDocument.body);n=l}while(n);Wi(e)}function $m(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 Wu(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":Wu(n),ar(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function E1(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[us])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 A1(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 tp(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 $u(t){return t.data==="$?"||t.data==="$~"}function tc(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function N1(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 ec=null;function ep(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 np(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 ap(t,e,n){switch(e=yo(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 Xs(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);ar(t)}var vn=new Map,ip=new Set;function So(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var $n=H.d;H.d={f:D1,r:C1,D:j1,C:M1,L:O1,m:R1,X:w1,S:k1,M:z1};function D1(){var t=$n.f(),e=uo();return t||e}function C1(t){var e=gi(t);e!==null&&e.tag===5&&e.type==="form"?Th(e):$n.r(t)}var Fi=typeof document>"u"?null:document;function sp(t,e,n){var i=Fi;if(i&&typeof e=="string"&&e){var l=rn(e);l='link[rel="'+t+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),ip.has(l)||(ip.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 j1(t){$n.D(t),sp("dns-prefetch",t,null)}function M1(t,e){$n.C(t,e),sp("preconnect",t,e)}function O1(t,e,n){$n.L(t,e,n);var i=Fi;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=Ji(t);break;case"script":u=Pi(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(Ks(u))||e==="script"&&i.querySelector(Zs(u))||(e=i.createElement("link"),xe(e,"link",t),pe(e),i.head.appendChild(e)))}}function R1(t,e){$n.m(t,e);var n=Fi;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=Pi(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(Zs(u)))return}i=n.createElement("link"),xe(i,"link",t),pe(i),n.head.appendChild(i)}}}function k1(t,e,n){$n.S(t,e,n);var i=Fi;if(i&&t){var l=yi(i).hoistableStyles,u=Ji(t);e=e||"default";var d=l.get(u);if(!d){var v={loading:0,preload:null};if(d=i.querySelector(Ks(u)))v.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":e},n),(n=vn.get(u))&&nc(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,bo(d,e,i)}d={type:"stylesheet",instance:d,count:1,state:v},l.set(u,d)}}}function w1(t,e){$n.X(t,e);var n=Fi;if(n&&t){var i=yi(n).hoistableScripts,l=Pi(t),u=i.get(l);u||(u=n.querySelector(Zs(l)),u||(t=b({src:t,async:!0},e),(e=vn.get(l))&&ac(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 z1(t,e){$n.M(t,e);var n=Fi;if(n&&t){var i=yi(n).hoistableScripts,l=Pi(t),u=i.get(l);u||(u=n.querySelector(Zs(l)),u||(t=b({src:t,async:!0,type:"module"},e),(e=vn.get(l))&&ac(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 lp(t,e,n,i){var l=(l=Ne.current)?So(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=Ji(n.href),n=yi(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=Ji(n.href);var u=yi(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(Ks(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||B1(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=Pi(n),n=yi(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 Ji(t){return'href="'+rn(t)+'"'}function Ks(t){return'link[rel="stylesheet"]['+t+"]"}function op(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function B1(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 Pi(t){return'[src="'+rn(t)+'"]'}function Zs(t){return"script[async]"+t}function rp(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),bo(i,n.precedence,t),e.instance=i;case"stylesheet":l=Ji(n.href);var u=t.querySelector(Ks(l));if(u)return e.state.loading|=4,e.instance=u,pe(u),u;i=op(n),(l=vn.get(l))&&nc(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,bo(u,n.precedence,t),e.instance=u;case"script":return u=Pi(n.src),(l=t.querySelector(Zs(u)))?(e.instance=l,pe(l),l):(i=n,(l=vn.get(u))&&(i=b({},n),ac(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,bo(i,n.precedence,t));return e.instance}function bo(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 nc(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function ac(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var To=null;function up(t,e,n){if(To===null){var i=new Map,l=To=new Map;l.set(n,i)}else l=To,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[us]||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 cp(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function U1(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 fp(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function V1(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=Ji(i.href),u=e.querySelector(Ks(l));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=_o.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=u,pe(u);return}u=e.ownerDocument||e,i=op(i),(l=vn.get(l))&&nc(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=_o.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var ic=0;function L1(t,e){return t.stylesheets&&t.count===0&&Eo(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var i=setTimeout(function(){if(t.stylesheets&&Eo(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4+e);0<t.imgBytes&&ic===0&&(ic=62500*S1());var l=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Eo(t,t.stylesheets),t.unsuspend)){var u=t.unsuspend;t.unsuspend=null,u()}},(t.imgBytes>ic?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(i),clearTimeout(l)}}:null}function _o(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Eo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var xo=null;function Eo(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,xo=new Map,e.forEach(G1,t),xo=null,_o.call(t))}function G1(t,e){if(!(e.state.loading&4)){var n=xo.get(t);if(n)var i=n.get(null);else{n=new Map,xo.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=_o.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 Qs={$$typeof:L,Provider:null,Consumer:null,_currentValue:et,_currentValue2:et,_threadCount:0};function H1(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 dp(t,e,n,i,l,u,d,v,T,j,z,V){return t=new H1(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=Ur(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:i,isDehydrated:n,cache:e},Hr(u),t}function hp(t){return t?(t=Ci,t):Ci}function mp(t,e,n,i,l,u){l=hp(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),Ns(n,t,e))}function pp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function sc(t,e){pp(t,e),(t=t.alternate)&&pp(t,e)}function vp(t){if(t.tag===13||t.tag===31){var e=Xa(t,67108864);e!==null&&qe(e,t,67108864),sc(t,67108864)}}function gp(t){if(t.tag===13||t.tag===31){var e=tn();e=tr(e);var n=Xa(t,e);n!==null&&qe(n,t,e),sc(t,e)}}var Ao=!0;function q1(t,e,n,i){var l=E.T;E.T=null;var u=H.p;try{H.p=2,lc(t,e,n,i)}finally{H.p=u,E.T=l}}function Y1(t,e,n,i){var l=E.T;E.T=null;var u=H.p;try{H.p=8,lc(t,e,n,i)}finally{H.p=u,E.T=l}}function lc(t,e,n,i){if(Ao){var l=oc(i);if(l===null)Ku(t,e,i,No,n),Sp(t,i);else if(X1(l,t,e,n,i))i.stopPropagation();else if(Sp(t,i),e&4&&-1<I1.indexOf(t)){for(;l!==null;){var u=gi(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),(kt&6)===0&&(oo=F()+500,qs(0))}}break;case 31:case 13:v=Xa(u,2),v!==null&&qe(v,u,2),uo(),sc(u,2)}if(u=oc(i),u===null&&Ku(t,e,i,No,n),u===l)break;l=u}l!==null&&i.stopPropagation()}else Ku(t,e,i,null,n)}}function oc(t){return t=ur(t),rc(t)}var No=null;function rc(t){if(No=null,t=vi(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 No=t,null}function yp(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(ot()){case J:return 2;case St:return 8;case ht:case De:return 32;case ie:return 268435456;default:return 32}default:return 32}}var uc=!1,Ea=null,Aa=null,Na=null,Fs=new Map,Js=new Map,Da=[],I1="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 Sp(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":Fs.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Js.delete(e.pointerId)}}function Ps(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=gi(e),e!==null&&vp(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,l!==null&&e.indexOf(l)===-1&&e.push(l),t)}function X1(t,e,n,i,l){switch(e){case"focusin":return Ea=Ps(Ea,t,e,n,i,l),!0;case"dragenter":return Aa=Ps(Aa,t,e,n,i,l),!0;case"mouseover":return Na=Ps(Na,t,e,n,i,l),!0;case"pointerover":var u=l.pointerId;return Fs.set(u,Ps(Fs.get(u)||null,t,e,n,i,l)),!0;case"gotpointercapture":return u=l.pointerId,Js.set(u,Ps(Js.get(u)||null,t,e,n,i,l)),!0}return!1}function bp(t){var e=vi(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,wf(t.priority,function(){gp(n)});return}}else if(e===31){if(e=m(n),e!==null){t.blockedOn=e,wf(t.priority,function(){gp(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 Do(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=oc(t.nativeEvent);if(n===null){n=t.nativeEvent;var i=new n.constructor(n.type,n);rr=i,n.target.dispatchEvent(i),rr=null}else return e=gi(n),e!==null&&vp(e),t.blockedOn=n,!1;e.shift()}return!0}function Tp(t,e,n){Do(t)&&n.delete(e)}function K1(){uc=!1,Ea!==null&&Do(Ea)&&(Ea=null),Aa!==null&&Do(Aa)&&(Aa=null),Na!==null&&Do(Na)&&(Na=null),Fs.forEach(Tp),Js.forEach(Tp)}function Co(t,e){t.blockedOn===e&&(t.blockedOn=null,uc||(uc=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,K1)))}var jo=null;function _p(t){jo!==t&&(jo=t,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){jo===t&&(jo=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(rc(i||n)===null)continue;break}var u=gi(n);u!==null&&(t.splice(e,3),e-=3,ou(u,{pending:!0,data:l,method:n.method,action:i},i,l))}}))}function Wi(t){function e(T){return Co(T,t)}Ea!==null&&Co(Ea,t),Aa!==null&&Co(Aa,t),Na!==null&&Co(Na,t),Fs.forEach(e),Js.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);)bp(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||_p(n);else if(d){var v=null;if(u&&u.hasAttribute("formAction")){if(l=u,d=u[Be]||null)v=d.formAction;else if(rc(l)!==null)continue}else v=d.action;typeof v=="function"?n[i+1]=v:(n.splice(i,3),i-=3),_p(n)}}}function xp(){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 cc(t){this._internalRoot=t}Mo.prototype.render=cc.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(r(409));var n=e.current,i=tn();mp(n,i,t,e,null,null)},Mo.prototype.unmount=cc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;mp(t.current,2,null,t,null,null),uo(),e[pi]=null}};function Mo(t){this._internalRoot=t}Mo.prototype.unstable_scheduleHydration=function(t){if(t){var e=kf();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&&bp(t)}};var Ep=s.version;if(Ep!=="19.2.4")throw Error(r(527,Ep,"19.2.4"));H.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 Z1={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Oo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oo.isDisabled&&Oo.supportsFiber)try{Dn=Oo.inject(Z1),Ce=Oo}catch{}}return Ws.createRoot=function(t,e){if(!c(t))throw Error(r(299));var n=!1,i="",l=Oh,u=Rh,d=kh;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=dp(t,1,!1,null,null,n,i,null,l,u,d,xp),t[pi]=e.current,Xu(t),new cc(e)},Ws.hydrateRoot=function(t,e,n){if(!c(t))throw Error(r(299));var i=!1,l="",u=Oh,d=Rh,v=kh,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=dp(t,1,!0,e,n??null,i,l,T,u,d,v,xp),e.context=hp(null),n=e.current,i=tn(),i=tr(i),l=da(i),l.callback=null,ha(n,l,i),n=i,e.current.lanes=n,ye(e,n),Rn(e),t[pi]=e.current,Xu(t),new Mo(e)},Ws.version="19.2.4",Ws}var Op;function fS(){if(Op)return fc.exports;Op=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(),fc.exports=cS(),fc.exports}var dS=fS();const hS=3e3,mS=1e4,Rp=5e3;function pS(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([]),[P,L]=x.useState([]),[k,Y]=x.useState([]),[G,Q]=x.useState(void 0),[B,nt]=x.useState({}),[ft,st]=x.useState([]),[dt,yt]=x.useState(""),[Ct,Yt]=x.useState(!1),E=x.useCallback(q=>{var F;((F=r.current)==null?void 0:F.readyState)===WebSocket.OPEN&&r.current.send(JSON.stringify(q))},[]);x.useEffect(()=>{let q,F,ot;function J(){q=new WebSocket(o),r.current=q,q.onopen=()=>{h(!0),E({type:"list_environments"}),E({type:"list_sessions"}),E({type:"list_projects"}),E({type:"list_tokens"}),E({type:"subscribe_all"}),clearInterval(ot),ot=setInterval(()=>{E({type:"list_environments"})},mS)},q.onmessage=St=>{var De,ie,hi,mi,Dn,Ce,Tn,je,vl,gl,yl,Ba,Ua,Va,Cn,La,ia;const ht=JSON.parse(St.data);switch(ht.type){case"environments":m(((De=ht.payload)==null?void 0:De.environments)||[]);break;case"sessions":g(((ie=ht.payload)==null?void 0:ie.sessions)||[]);break;case"session_event":{const mt=ht.payload;b(Bt=>{const It=[...Bt,mt];return It.length>Rp?It.slice(-Rp):It}),mt.eventType==="status"&&g(Bt=>Bt.map(It=>It.id===mt.sessionId?{...It,status:mt.content}:It));break}case"session_events":{const mt=(hi=ht.payload)==null?void 0:hi.events,Bt=(mi=ht.payload)==null?void 0:mi.sessionId;mt&&Bt&&b(It=>[...It.filter(Ga=>Ga.sessionId!==Bt),...mt]);break}case"spawned":{const mt=(Dn=ht.payload)==null?void 0:Dn.sessionId;mt&&N(mt),E({type:"list_sessions"}),E({type:"list_environments"});break}case"projects":w(((Ce=ht.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 mt=((Tn=ht.payload)==null?void 0:Tn.tasks)||[],Bt=((je=ht.payload)==null?void 0:je.projectId)||(mt.length>0?mt[0].projectId:"");if(!Bt){I(mt);break}I(It=>[...It.filter(ye=>ye.projectId!==Bt),...mt]);break}case"task_created":{const mt=((vl=ht.payload)==null?void 0:vl.task)||{},Bt=mt.project_id||mt.projectId;Bt&&E({type:"list_tasks",payload:{projectId:Bt}});break}case"task_started":{const mt=ht.payload;mt.sessionId&&E({type:"list_sessions"});const Bt=mt.projectId;Bt?E({type:"list_tasks",payload:{projectId:Bt}}):mt.taskId&&I(It=>{const ye=It.find(Ga=>Ga.id===mt.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 mt=ht.payload,Bt=mt.projectId;Bt?E({type:"list_tasks",payload:{projectId:Bt}}):mt.taskId&&I(It=>{const ye=It.find(Ga=>Ga.id===mt.taskId);return ye&&E({type:"list_tasks",payload:{projectId:ye.projectId}}),It});break}case"findings":L(((gl=ht.payload)==null?void 0:gl.findings)||[]);break;case"finding_posted":(yl=ht.payload)!=null&&yl.projectId&&E({type:"list_findings",payload:{projectId:ht.payload.projectId}});break;case"tokens":Y(((Ba=ht.payload)==null?void 0:Ba.tokens)||[]);break;case"token_changed":E({type:"list_tokens"});break;case"task_diff":Q(ht.payload);break;case"provision_progress":{const mt=ht.payload;mt.environmentId&&(nt(Bt=>({...Bt,[mt.environmentId]:{stage:mt.stage,message:mt.message,progress:mt.progress}})),mt.stage==="ready"&&setTimeout(()=>{nt(It=>{const ye={...It};return delete ye[mt.environmentId],ye})},5e3),(mt.stage==="ready"||mt.stage==="error")&&E({type:"list_environments"}));break}case"environment_added":break;case"environment_removed":if((Ua=ht.payload)!=null&&Ua.environmentId){const mt=ht.payload.environmentId;nt(Bt=>{const It={...Bt};return delete It[mt],It})}E({type:"list_environments"}),E({type:"list_sessions"});break;case"codespaces_list":{const mt=((Va=ht.payload)==null?void 0:Va.codespaces)||[],Bt=((Cn=ht.payload)==null?void 0:Cn.error)||"";st(mt),yt(Bt);break}case"codespace_created":{Yt(!1),E({type:"list_codespaces"});break}case"codespace_create_error":{Yt(!1);const mt=((La=ht.payload)==null?void 0:La.message)||"Failed to create codespace";yt(mt);break}case"error":console.error("[ws]",(ia=ht.payload)==null?void 0:ia.message);break}},q.onclose=()=>{h(!1),r.current=void 0,clearInterval(ot),clearTimeout(F),F=setTimeout(J,hS)},q.onerror=()=>{q.close()}}return J(),()=>{clearInterval(ot),clearTimeout(F),q==null||q.close()}},[o,E]);const H=x.useCallback((q,F,ot,J)=>{E({type:"spawn",payload:{environmentId:q,prompt:F,model:ot||"",runtime:J||""}})},[E]),et=x.useCallback((q,F)=>{E({type:"send_input",payload:{sessionId:q,text:F}})},[E]),bt=x.useCallback(q=>{E({type:"kill",payload:{sessionId:q}})},[E]),Tt=x.useCallback(()=>{E({type:"list_environments"}),E({type:"list_sessions"}),E({type:"list_projects"}),E({type:"list_tokens"})},[E]),Gt=x.useCallback(q=>{E({type:"get_session_events",payload:{sessionId:q}})},[E]),jt=x.useCallback(()=>{b([])},[]),pt=x.useCallback((q,F,ot,J)=>{E({type:"create_project",payload:{name:q,description:F||"",repoUrl:ot||"",defaultEnvironmentId:J||""}})},[E]),Ht=x.useCallback(q=>{E({type:"archive_project",payload:{projectId:q}})},[E]),de=x.useCallback(q=>{E({type:"list_tasks",payload:{projectId:q}})},[E]),Ne=x.useCallback((q,F,ot,J,St,ht)=>{E({type:"create_task",payload:{projectId:q,title:F,description:ot||"",environmentId:J||"",dependsOn:St||[],parentTaskId:ht||""}})},[E]),Ie=x.useCallback((q,F,ot)=>{E({type:"start_task",payload:{taskId:q,runtime:F||"",model:ot||""}})},[E]),sn=x.useCallback(q=>{E({type:"approve_task",payload:{taskId:q}})},[E]),ke=x.useCallback((q,F)=>{E({type:"reject_task",payload:{taskId:q,reviewNotes:F}})},[E]),Sn=x.useCallback(q=>{E({type:"delete_task",payload:{taskId:q}})},[E]),Xe=x.useCallback(q=>{E({type:"list_findings",payload:{projectId:q}})},[E]),Ke=x.useCallback((q,F,ot,J,St)=>{E({type:"post_finding",payload:{projectId:q,title:F,content:ot,category:J||"general",tags:St||[]}})},[E]),bn=x.useCallback(q=>{Q(void 0),E({type:"get_task_diff",payload:{taskId:q}})},[E]),we=x.useCallback(()=>{E({type:"list_tokens"})},[E]),Ze=x.useCallback((q,F,ot,J,St)=>{E({type:"set_token",payload:{name:q,value:F,tokenType:ot,envVar:J,filePath:St}})},[E]),ln=x.useCallback(q=>{E({type:"delete_token",payload:{name:q}})},[E]),K=x.useCallback((q,F,ot,J)=>{const St={displayName:q,adapterType:F,adapterConfig:ot||{}};J&&(St.defaultRuntime=J),E({type:"add_environment",payload:St})},[E]),at=x.useCallback(q=>{E({type:"provision_environment",payload:{environmentId:q}})},[E]),$=x.useCallback(q=>{E({type:"stop_environment",payload:{environmentId:q}})},[E]),Z=x.useCallback(q=>{E({type:"remove_environment",payload:{environmentId:q}})},[E]),_t=x.useCallback(()=>{E({type:"list_codespaces"})},[E]),Rt=x.useCallback(q=>{if(!c){yt("Not connected to server. Please try again once the connection is restored.");return}Yt(!0),yt(""),E({type:"create_codespace",payload:{repo:q}})},[E,c]);return{connected:c,environments:f,sessions:p,events:S,lastSpawnedId:_,projects:R,tasks:X,findings:P,tokens:k,taskDiff:G,spawn:H,sendInput:et,kill:bt,refresh:Tt,loadSessionEvents:Gt,clearEvents:jt,createProject:pt,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:Z,codespaces:ft,codespaceError:dt,codespaceCreating:Ct,listCodespaces:_t,createCodespace:Rt}}const Zc=x.createContext(void 0);function vS({children:a}){const s=pS();return y.jsx(Zc.Provider,{value:s,children:a})}function aa(){const a=x.useContext(Zc);if(!a)throw new Error("useGrackle must be used within GrackleProvider");return a}const gS=[{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}],yS=[{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"}],SS=[{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"}],bS=[{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"}],TS=[{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}],kp=[{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"}],_S=[{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 wp=[{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"}}]}],mc={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
|
-
});`},zp=400,xS=600;function ES({children:a}){const[s,o]=x.useState(yS),[r,c]=x.useState(SS),[h,f]=x.useState(void 0),[m,p]=x.useState(bS),[g,S]=x.useState(TS),[b,_]=x.useState(kp),[N,R]=x.useState(_S),[w,X]=x.useState(mc),I=x.useRef(0),P=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),Q=x.useRef(new Map),B=x.useCallback(K=>(I.current+=1,`mock-${K}-${String(I.current).padStart(3,"0")}`),[]),nt=x.useCallback(()=>{const K=wp[P.current%wp.length];return P.current+=1,K},[]),ft=x.useCallback((K,at,$)=>{const Z=setTimeout(()=>{var _t;L.current.delete(Z),$&&((_t=k.current.get($))==null||_t.delete(Z)),K()},at);L.current.add(Z),$&&(k.current.has($)||k.current.set($,new Set),k.current.get($).add(Z))},[]),st=x.useCallback(K=>{const at=k.current.get(K);at&&(at.forEach($=>{clearTimeout($),L.current.delete($)}),k.current.delete(K))},[]),dt=x.useCallback((K,at)=>{o($=>$.map(Z=>Z.id===K?{...Z,status:at}:Z))},[]),yt=x.useCallback(K=>{c(at=>[...at,K])},[]),Ct=x.useCallback((K,at,$)=>{at.forEach((Z,_t)=>{ft(()=>{const Rt={sessionId:K,...Z.event,timestamp:new Date().toISOString()};yt(Rt),Z.event.eventType==="status"&&dt(K,Z.event.content),_t===at.length-1&&$&&$()},Z.delayMs,K)})},[ft,yt,dt]),Yt=x.useCallback((K,at,$,Z)=>{console.log("[MockGrackle] spawn",{environmentId:K,prompt:at,runtime:Z});const _t=B("sess"),Rt={id:_t,environmentId:K,runtime:Z||"claude-code",status:"running",prompt:at,startedAt:new Date().toISOString()};o(F=>[...F,Rt]),f(_t);const q=nt();if(console.log(`[MockGrackle] Playing scenario: ${q.label}`),q.pauseForInput){const F=q.pauseAfterStep??q.steps.length-1,ot=q.steps.slice(0,F+1),J=ot.length>0?ot[ot.length-1].delayMs:0;Ct(_t,ot),ft(()=>{dt(_t,"waiting_input"),yt({sessionId:_t,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},J+zp,_t),q.resumeSteps&&G.current.set(_t,q.resumeSteps)}else Ct(_t,q.steps)},[B,nt,Ct,ft,dt,yt]),E=x.useCallback(K=>{console.log("[MockGrackle] kill",K),st(K),G.current.delete(K),dt(K,"killed"),yt({sessionId:K,eventType:"status",timestamp:new Date().toISOString(),content:"killed"}),S(at=>at.map($=>$.sessionId===K&&$.status==="in_progress"?{...$,status:"failed"}:$))},[st,dt,yt]),H=x.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),et=x.useCallback(K=>{console.log("[MockGrackle] loadSessionEvents",K)},[]),bt=x.useCallback(()=>{console.log("[MockGrackle] clearEvents"),c([])},[]),Tt=x.useCallback((K,at,$,Z)=>{console.log("[MockGrackle] createProject",{name:K,description:at});const _t={id:B("proj"),name:K,description:at||"",repoUrl:$||"",defaultEnvironmentId:Z||"",status:"active",createdAt:new Date().toISOString()};p(Rt=>[...Rt,_t])},[B]),Gt=x.useCallback(K=>{console.log("[MockGrackle] archiveProject",K),p(at=>at.map($=>$.id===K?{...$,status:"archived"}:$))},[]),jt=x.useCallback(K=>{console.log("[MockGrackle] loadTasks",K)},[]),pt=x.useCallback((K,at,$,Z,_t,Rt)=>{console.log("[MockGrackle] createTask",{projectId:K,title:at,parentTaskId:Rt}),S(q=>{const ot=q.filter(De=>De.projectId===K).reduce((De,ie)=>Math.max(De,ie.sortOrder),0),J=Rt?q.find(De=>De.id===Rt):void 0;if(Rt&&!J)return console.warn("[MockGrackle] Parent task not found:",Rt),q;if(J&&!J.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",Rt),q;const St=J?J.depth+1:0,ht={id:B("task"),projectId:K,title:at,description:$||"",status:"pending",branch:"",environmentId:Z||"",sessionId:"",dependsOn:_t||[],reviewNotes:"",sortOrder:ot+1,createdAt:new Date().toISOString(),parentTaskId:Rt||"",depth:St,childTaskIds:[],canDecompose:!Rt};return[...q,ht]})},[B]),Ht=x.useCallback((K,at,$)=>{var J;console.log("[MockGrackle] startTask",{taskId:K,runtime:at});const Z=Y.current.find(St=>St.id===K),_t=(Z==null?void 0:Z.environmentId)??"",Rt=(Z==null?void 0:Z.title)??"",q=B("sess"),F={id:q,environmentId:_t||"env-local-01",runtime:at||"claude-code",status:"running",prompt:Rt||K,startedAt:new Date().toISOString()};o(St=>[...St,F]),S(St=>St.map(ht=>ht.id===K?{...ht,status:"in_progress",sessionId:q,branch:`mock/${K.slice(0,8)}`}:ht));const ot=nt();if(console.log(`[MockGrackle] Playing task scenario: ${ot.label}`),ot.pauseForInput){const St=ot.pauseAfterStep??ot.steps.length-1,ht=ot.steps.slice(0,St+1),De=ht.length>0?ht[ht.length-1].delayMs:0;if(Ct(q,ht),ft(()=>{dt(q,"waiting_input"),yt({sessionId:q,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},De+zp,q),ot.resumeSteps){const ie=[...ot.resumeSteps];G.current.set(q,ie);const hi=ie.reduce((mi,Dn)=>Math.max(mi,Dn.delayMs),0);Q.current.set(q,{taskId:K,delayAfterResume:hi+200})}}else{const St=ot.steps.length>0?ot.steps[ot.steps.length-1].delayMs:0;Ct(q,ot.steps);const ht=(J=ot.steps[ot.steps.length-1])==null?void 0:J.event.content;ft(()=>{ht==="completed"?S(De=>De.map(ie=>ie.id===K&&ie.status==="in_progress"?{...ie,status:"review"}:ie)):ht==="failed"&&S(De=>De.map(ie=>ie.id===K&&ie.status==="in_progress"?{...ie,status:"failed"}:ie))},St+100,q)}},[B,nt,Ct,ft,dt,yt]),de=x.useCallback((K,at)=>{console.log("[MockGrackle] sendInput",{sessionId:K,text:at}),yt({sessionId:K,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${at}`}),dt(K,"running"),yt({sessionId:K,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const $=G.current.get(K);if($)G.current.delete(K),Ct(K,$);else{const _t=[{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"}}];Ct(K,_t)}const Z=Q.current.get(K);Z&&(Q.current.delete(K),ft(()=>{S(_t=>_t.map(Rt=>Rt.id===Z.taskId&&Rt.status==="in_progress"?{...Rt,status:"review"}:Rt))},Z.delayAfterResume,K))},[yt,dt,Ct,ft]),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(Z=>Z.id===K?{...Z,status:"assigned",reviewNotes:at,sessionId:""}:Z))},[]),sn=x.useCallback(K=>{console.log("[MockGrackle] deleteTask",K),S(at=>at.filter($=>$.id!==K))},[]),ke=x.useCallback(K=>{console.log("[MockGrackle] loadFindings",K),_(kp.filter(at=>at.projectId===K))},[]),Sn=x.useCallback((K,at,$,Z,_t)=>{console.log("[MockGrackle] postFinding",{projectId:K,title:at});const Rt={id:B("find"),projectId:K,taskId:"",sessionId:"",category:Z||"general",title:at,content:$,tags:_t||[],createdAt:new Date().toISOString()};_(q=>[...q,Rt])},[B]),Xe=x.useCallback((K,at,$,Z)=>{console.log("[MockGrackle] addEnvironment",{displayName:K,adapterType:at,adapterConfig:$,defaultRuntime:Z})},[]),Ke=x.useCallback(K=>{console.log("[MockGrackle] loadTaskDiff",K),X(void 0);const at=setTimeout(()=>{L.current.delete(at),mc.taskId===K?X(mc):X({taskId:K,error:"No diff available for this task in mock mode."})},xS);L.current.add(at)},[]),bn=x.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),we=x.useCallback((K,at,$,Z,_t)=>{console.log("[MockGrackle] setToken",{name:K,tokenType:$}),R(Rt=>[...Rt.filter(F=>F.name!==K),{name:K,tokenType:$,envVar:Z,filePath:_t,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:gS,sessions:s,events:r,lastSpawnedId:h,projects:m,tasks:g,findings:b,tokens:N,taskDiff:w,spawn:Yt,sendInput:de,kill:E,refresh:H,loadSessionEvents:et,clearEvents:bt,createProject:Tt,archiveProject:Gt,loadTasks:jt,createTask:pt,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,H,et,bt,Tt,Gt,jt,pt,Ht,Ne,Ie,sn,ke,Sn,Ke,Xe,bn,we,Ze]);return y.jsx(Zc.Provider,{value:ln,children:a})}const AS="_container_ew76q_1",NS="_brand_ew76q_26",DS="_info_ew76q_34",CS="_connectionDot_ew76q_41",jS="_connected_ew76q_44",MS="_disconnected_ew76q_48",OS="_settingsButton_ew76q_52",ii={container:AS,brand:NS,info:DS,connectionDot:CS,connected:jS,disconnected:MS,settingsButton:OS};function RS({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:ii.container,children:[y.jsx("div",{className:ii.brand,children:"Grackle"}),y.jsxs("div",{className:ii.info,children:[y.jsxs("span",{children:[y.jsx("span",{className:`${ii.connectionDot} ${s?ii.connected:ii.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:ii.settingsButton,onClick:()=>a({kind:"settings"}),title:"Settings",children:"⚙"})]})]})}const kS="_container_14p5s_1",wS="_header_14p5s_5",zS="_addButton_14p5s_17",BS="_emptyState_14p5s_35",US="_envRow_14p5s_41",VS="_targeted_14p5s_55",LS="_expanded_14p5s_58",GS="_statusDot_14p5s_62",HS="_pulse_14p5s_65",qS="_envName_14p5s_69",YS="_envActions_14p5s_73",IS="_idleLabel_14p5s_80",XS="_newChatButton_14p5s_85",KS="_envActionsRow_14p5s_103",ZS="_connectButton_14p5s_111",QS="_stopButton_14p5s_128",FS="_deleteButton_14p5s_145",JS="_provisionMessage_14p5s_163",PS="_errorMessage_14p5s_170",WS="_sessionRow_14p5s_177",$S="_selected_14p5s_195",tb="_sessionDot_14p5s_202",$t={container:kS,header:wS,addButton:zS,emptyState:BS,envRow:US,targeted:VS,expanded:LS,statusDot:GS,pulse:HS,envName:qS,envActions:YS,idleLabel:IS,newChatButton:XS,envActionsRow:KS,connectButton:ZS,stopButton:QS,deleteButton:FS,provisionMessage:JS,errorMessage:PS,sessionRow:WS,selected:$S,sessionDot:tb},eb={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"};function nb({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 ab({env:a,envSessions:s,selectedSessionId:o,isNewChatTarget:r,expanded:c,onToggleExpand:h,provisionProgress:f,onProvision:m,onStop:p,onRemove:g,setViewMode:S}){const b=eb[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(nb,{status:w.status})," ",w.prompt.length>24?w.prompt.slice(0,24)+"...":w.prompt]},w.id))]})}function ib({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(ab,{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 Qc=x.createContext({});function Fc(a){const s=x.useRef(null);return s.current===null&&(s.current=a()),s.current}const Qo=x.createContext(null),Jc=x.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});class sb 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 lb({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(Jc);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(sb,{isPresent:s,childRef:r,sizeRef:c,children:x.cloneElement(a,{ref:r})})}const ob=({children:a,initial:s,isPresent:o,onExitComplete:r,custom:c,presenceAffectsLayout:h,mode:f})=>{const m=Fc(rb),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(lb,{isPresent:o,children:a})),y.jsx(Qo.Provider,{value:S,children:a})};function rb(){return new Map}function iv(a=!0){const s=x.useContext(Qo);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 ko=a=>a.key||"";function Bp(a){const s=[];return x.Children.forEach(a,o=>{x.isValidElement(o)&&s.push(o)}),s}const Pc=typeof window<"u",sv=Pc?x.useLayoutEffect:x.useEffect,Wc=({children:a,custom:s,initial:o=!0,onExitComplete:r,presenceAffectsLayout:c=!0,mode:h="sync",propagate:f=!1})=>{const[m,p]=iv(f),g=x.useMemo(()=>Bp(a),[a]),S=f&&!m?[]:g.map(ko),b=x.useRef(!0),_=x.useRef(g),N=Fc(()=>new Map),[R,w]=x.useState(g),[X,I]=x.useState(g);sv(()=>{b.current=!1,_.current=g;for(let k=0;k<X.length;k++){const Y=ko(X[k]);S.includes(Y)?N.delete(Y):N.get(Y)!==!0&&N.set(Y,!1)}},[X,S.length,S.join("-")]);const P=[];if(g!==R){let k=[...g];for(let Y=0;Y<X.length;Y++){const G=X[Y],Q=ko(G);S.includes(Q)||(k.splice(Y,0,G),P.push(G))}h==="wait"&&P.length&&(k=P),I(Bp(k)),w(g);return}const{forceRender:L}=x.useContext(Qc);return y.jsx(y.Fragment,{children:X.map(k=>{const Y=ko(k),G=f&&!m?!1:g===X||S.includes(Y),Q=()=>{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(ob,{isPresent:G,initial:!b.current||o?void 0:!1,custom:G?void 0:s,presenceAffectsLayout:c,mode:h,onExitComplete:G?void 0:Q,children:k},Y)})})},nn=a=>a;let lv=nn;const ub={useManualTiming:!1};function cb(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 wo=["read","resolveKeyframes","update","preRender","render","postRender"],fb=40;function ov(a,s){let o=!1,r=!0;const c={delta:0,timestamp:0,isProcessing:!1},h=()=>o=!0,f=wo.reduce((I,P)=>(I[P]=cb(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,fb),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:wo.reduce((I,P)=>{const L=f[P];return I[P]=(k,Y=!1,G=!1)=>(o||R(),L.schedule(k,Y,G)),I},{}),cancel:I=>{for(let P=0;P<wo.length;P++)f[wo[P]].cancel(I)},state:c,steps:f}}const{schedule:Qt,cancel:ka,state:Ae,steps:pc}=ov(typeof requestAnimationFrame<"u"?requestAnimationFrame:nn,!0),rv=x.createContext({strict:!1}),Up={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"]},is={};for(const a in Up)is[a]={isEnabled:s=>Up[a].some(o=>!!s[o])};function db(a){for(const s in a)is[s]={...is[s],...a[s]}}const hb=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 Go(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||hb.has(a)}let uv=a=>!Go(a);function mb(a){a&&(uv=s=>s.startsWith("on")?!Go(s):a(s))}try{mb(require("@emotion/is-prop-valid").default)}catch{}function pb(a,s,o){const r={};for(const c in a)c==="values"&&typeof a.values=="object"||(uv(c)||o===!0&&Go(c)||!s&&!Go(c)||a.draggable&&c.startsWith("onDrag"))&&(r[c]=a[c]);return r}function vb(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 Fo=x.createContext({});function ol(a){return typeof a=="string"||Array.isArray(a)}function Jo(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}const $c=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tf=["initial",...$c];function Po(a){return Jo(a.animate)||tf.some(s=>ol(a[s]))}function cv(a){return!!(Po(a)||a.variants)}function gb(a,s){if(Po(a)){const{initial:o,animate:r}=a;return{initial:o===!1||ol(o)?o:void 0,animate:ol(r)?r:void 0}}return a.inherit!==!1?s:{}}function yb(a){const{initial:s,animate:o}=gb(a,x.useContext(Fo));return x.useMemo(()=>({initial:s,animate:o}),[Vp(s),Vp(o)])}function Vp(a){return Array.isArray(a)?a.join(" "):a}const Sb=Symbol.for("motionComponentSymbol");function $i(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function bb(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):$i(o)&&(o.current=r))},[s])}const ef=a=>a.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Tb="framerAppearId",fv="data-"+ef(Tb),{schedule:nf}=ov(queueMicrotask,!1),dv=x.createContext({});function _b(a,s,o,r,c){var h,f;const{visualElement:m}=x.useContext(Fo),p=x.useContext(rv),g=x.useContext(Qo),S=x.useContext(Jc).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(dv);_&&!_.projection&&c&&(_.type==="html"||_.type==="svg")&&xb(b.current,o,c,N);const R=x.useRef(!1);x.useInsertionEffect(()=>{_&&R.current&&_.update(o,g)});const w=o[fv],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 sv(()=>{_&&(R.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),nf.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 xb(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:hv(a.parent)),a.projection.setOptions({layoutId:c,layout:h,alwaysMeasureLayout:!!f||m&&$i(m),visualElement:a,animationType:typeof h=="string"?h:"both",initialPromotionConfig:r,layoutScroll:p,layoutRoot:g})}function hv(a){if(a)return a.options.allowProjection!==!1?a.projection:hv(a.parent)}function Eb({preloadedFeatures:a,createVisualElement:s,useRender:o,useVisualState:r,Component:c}){var h,f;a&&db(a);function m(g,S){let b;const _={...x.useContext(Jc),...g,layoutId:Ab(g)},{isStatic:N}=_,R=yb(g),w=r(g,N);if(!N&&Pc){Nb();const X=Db(_);b=X.MeasureLayout,R.visualElement=_b(c,w,_,s,X.ProjectionNode)}return y.jsxs(Fo.Provider,{value:R,children:[b&&R.visualElement?y.jsx(b,{visualElement:R.visualElement,..._}):null,o(c,g,bb(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[Sb]=c,p}function Ab({layoutId:a}){const s=x.useContext(Qc).id;return s&&a!==void 0?s+"-"+a:a}function Nb(a,s){x.useContext(rv).strict}function Db(a){const{drag:s,layout:o}=is;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 Cb=["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 af(a){return typeof a!="string"||a.includes("-")?!1:!!(Cb.indexOf(a)>-1||/[A-Z]/u.test(a))}function Lp(a){const s=[{},{}];return a==null||a.values.forEach((o,r)=>{s[0][r]=o.get(),s[1][r]=o.getVelocity()}),s}function sf(a,s,o,r){if(typeof s=="function"){const[c,h]=Lp(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]=Lp(r);s=s(o!==void 0?o:a.custom,c,h)}return s}const Mc=a=>Array.isArray(a),jb=a=>!!(a&&typeof a=="object"&&a.mix&&a.toValue),Mb=a=>Mc(a)?a[a.length-1]||0:a,Re=a=>!!(a&&a.getVelocity);function Uo(a){const s=Re(a)?a.get():a;return jb(s)?s.toValue():s}function Ob({scrapeMotionValuesFromProps:a,createRenderState:s,onUpdate:o},r,c,h){const f={latestValues:Rb(r,c,h,a),renderState:s()};return o&&(f.onMount=m=>o({props:r,current:m,...f}),f.onUpdate=m=>o(m)),f}const mv=a=>(s,o)=>{const r=x.useContext(Fo),c=x.useContext(Qo),h=()=>Ob(a,s,r,c);return o?h():Fc(h)};function Rb(a,s,o,r){const c={},h=r(a,{});for(const _ in h)c[_]=Uo(h[_]);let{initial:f,animate:m}=a;const p=Po(a),g=cv(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"&&!Jo(b)){const _=Array.isArray(b)?b:[b];for(let N=0;N<_.length;N++){const R=sf(a,_[N]);if(R){const{transitionEnd:w,transition:X,...I}=R;for(const P in I){let L=I[P];if(Array.isArray(L)){const k=S?L.length-1:0;L=L[k]}L!==null&&(c[P]=L)}for(const P in w)c[P]=w[P]}}}return c}const os=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],di=new Set(os),pv=a=>s=>typeof s=="string"&&s.startsWith(a),vv=pv("--"),kb=pv("var(--"),lf=a=>kb(a)?wb.test(a.split("/*")[0].trim()):!1,wb=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,gv=(a,s)=>s&&typeof a=="number"?s.transform(a):a,na=(a,s,o)=>o>s?s:o<a?a:o,rs={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},rl={...rs,transform:a=>na(0,1,a)},zo={...rs,default:1},dl=a=>({test:s=>typeof s=="string"&&s.endsWith(a)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${a}`}),ja=dl("deg"),wn=dl("%"),ct=dl("px"),zb=dl("vh"),Bb=dl("vw"),Gp={...wn,parse:a=>wn.parse(a)/100,transform:a=>wn.transform(a*100)},Ub={borderWidth:ct,borderTopWidth:ct,borderRightWidth:ct,borderBottomWidth:ct,borderLeftWidth:ct,borderRadius:ct,radius:ct,borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomRightRadius:ct,borderBottomLeftRadius:ct,width:ct,maxWidth:ct,height:ct,maxHeight:ct,top:ct,right:ct,bottom:ct,left:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,backgroundPositionX:ct,backgroundPositionY:ct},Vb={rotate:ja,rotateX:ja,rotateY:ja,rotateZ:ja,scale:zo,scaleX:zo,scaleY:zo,scaleZ:zo,skew:ja,skewX:ja,skewY:ja,distance:ct,translateX:ct,translateY:ct,translateZ:ct,x:ct,y:ct,z:ct,perspective:ct,transformPerspective:ct,opacity:rl,originX:Gp,originY:Gp,originZ:ct},Hp={...rs,transform:Math.round},of={...Ub,...Vb,zIndex:Hp,size:ct,fillOpacity:rl,strokeOpacity:rl,numOctaves:Hp},Lb={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gb=os.length;function Hb(a,s,o){let r="",c=!0;for(let h=0;h<Gb;h++){const f=os[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=gv(m,of[f]);if(!p){c=!1;const S=Lb[f]||f;r+=`${S}(${g}) `}o&&(s[f]=g)}}return r=r.trim(),o?r=o(s,c?"":r):c&&(r="none"),r}function rf(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(di.has(p)){f=!0;continue}else if(vv(p)){c[p]=g;continue}else{const S=gv(g,of[p]);p.startsWith("origin")?(m=!0,h[p]=S):r[p]=S}}if(s.transform||(f||o?r.transform=Hb(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 qb={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yb={offset:"strokeDashoffset",array:"strokeDasharray"};function Ib(a,s,o=1,r=0,c=!0){a.pathLength=1;const h=c?qb:Yb;a[h.offset]=ct.transform(-r);const f=ct.transform(s),m=ct.transform(o);a[h.array]=`${f} ${m}`}function qp(a,s,o){return typeof a=="string"?a:ct.transform(s+o*a)}function Xb(a,s,o){const r=qp(s,a.x,a.width),c=qp(o,a.y,a.height);return`${r} ${c}`}function uf(a,{attrX:s,attrY:o,attrScale:r,originX:c,originY:h,pathLength:f,pathSpacing:m=1,pathOffset:p=0,...g},S,b){if(rf(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=Xb(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&&Ib(_,f,m,p,!1)}const cf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),yv=()=>({...cf(),attrs:{}}),ff=a=>typeof a=="string"&&a.toLowerCase()==="svg";function Sv(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 bv=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 Tv(a,s,o,r){Sv(a,s,void 0,r);for(const c in s.attrs)a.setAttribute(bv.has(c)?c:ef(c),s.attrs[c])}const Ho={};function Kb(a){Object.assign(Ho,a)}function _v(a,{layout:s,layoutId:o}){return di.has(a)||a.startsWith("origin")||(s||o!==void 0)&&(!!Ho[a]||a==="opacity")}function df(a,s,o){var r;const{style:c}=a,h={};for(const f in c)(Re(c[f])||s.style&&Re(s.style[f])||_v(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 xv(a,s,o){const r=df(a,s,o);for(const c in a)if(Re(a[c])||Re(s[c])){const h=os.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;r[h]=a[c]}return r}function Zb(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 Yp=["x","y","width","height","cx","cy","r"],Qb={useVisualState:mv({scrapeMotionValuesFromProps:xv,createRenderState:yv,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(di.has(m)){h=!0;break}}if(!h)return;let f=!s;if(s)for(let m=0;m<Yp.length;m++){const p=Yp[m];a[p]!==s[p]&&(f=!0)}f&&Qt.read(()=>{Zb(o,r),Qt.render(()=>{uf(r,c,ff(o.tagName),a.transformTemplate),Tv(o,r)})})}})},Fb={useVisualState:mv({scrapeMotionValuesFromProps:df,createRenderState:cf})};function Ev(a,s,o){for(const r in s)!Re(s[r])&&!_v(r,o)&&(a[r]=s[r])}function Jb({transformTemplate:a},s){return x.useMemo(()=>{const o=cf();return rf(o,s,a),Object.assign({},o.vars,o.style)},[s])}function Pb(a,s){const o=a.style||{},r={};return Ev(r,o,a),Object.assign(r,Jb(a,s)),r}function Wb(a,s){const o={},r=Pb(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 $b(a,s,o,r){const c=x.useMemo(()=>{const h=yv();return uf(h,s,ff(r),a.transformTemplate),{...h.attrs,style:{...h.style}}},[s]);if(a.style){const h={};Ev(h,a.style,a),c.style={...h,...c.style}}return c}function tT(a=!1){return(o,r,c,{latestValues:h},f)=>{const p=(af(o)?$b:Wb)(r,h,f,o),g=pb(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 eT(a,s){return function(r,{forwardMotionProps:c}={forwardMotionProps:!1}){const f={...af(r)?Qb:Fb,preloadedFeatures:a,useRender:tT(c),createVisualElement:s,Component:r};return Eb(f)}}function Av(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 Wo(a,s,o){const r=a.getProps();return sf(r,s,o!==void 0?o:r.custom,a)}function hf(a,s){return a?a[s]||a.default||a:void 0}const Nv=new Set(["width","height","top","left","right","bottom",...os]);let Vo;function nT(){Vo=void 0}const zn={now:()=>(Vo===void 0&&zn.set(Ae.isProcessing||ub.useManualTiming?Ae.timestamp:performance.now()),Vo),set:a=>{Vo=a,queueMicrotask(nT)}};function mf(a,s){a.indexOf(s)===-1&&a.push(s)}function pf(a,s){const o=a.indexOf(s);o>-1&&a.splice(o,1)}class vf{constructor(){this.subscriptions=[]}add(s){return mf(this.subscriptions,s),()=>pf(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 Dv(a,s){return s?a*(1e3/s):0}const Ip=30,aT=a=>!isNaN(parseFloat(a));class iT{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=aT(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 vf);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>Ip)return 0;const o=Math.min(this.updatedAt-this.prevUpdatedAt,Ip);return Dv(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 ul(a,s){return new iT(a,s)}function sT(a,s,o){a.hasValue(s)?a.getValue(s).set(o):a.addValue(s,ul(o))}function lT(a,s){const o=Wo(a,s);let{transitionEnd:r={},transition:c={},...h}=o||{};h={...h,...r};for(const f in h){const m=Mb(h[f]);sT(a,f,m)}}function oT(a){return!!(Re(a)&&a.add)}function Oc(a,s){const o=a.getValue("willChange");if(oT(o))return o.add(s)}function Cv(a){return a.props[fv]}function gf(a){let s;return()=>(s===void 0&&(s=a()),s)}const rT=gf(()=>window.ScrollTimeline!==void 0);class uT{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(rT()&&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 cT extends uT{then(s,o){return Promise.all(this.animations).then(s).catch(o)}}const ta=a=>a*1e3,ea=a=>a/1e3;function yf(a){return typeof a=="function"}function Xp(a,s){a.timeline=s,a.onfinish=null}const Sf=a=>Array.isArray(a)&&typeof a[0]=="number",fT={linearEasing:void 0};function dT(a,s){const o=gf(a);return()=>{var r;return(r=fT[s])!==null&&r!==void 0?r:o()}}const qo=dT(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ss=(a,s,o)=>{const r=s-a;return r===0?1:(o-a)/r},jv=(a,s,o=10)=>{let r="";const c=Math.max(Math.round(s/o),2);for(let h=0;h<c;h++)r+=a(ss(0,c-1,h))+", ";return`linear(${r.substring(0,r.length-2)})`};function Mv(a){return!!(typeof a=="function"&&qo()||!a||typeof a=="string"&&(a in Rc||qo())||Sf(a)||Array.isArray(a)&&a.every(Mv))}const tl=([a,s,o,r])=>`cubic-bezier(${a}, ${s}, ${o}, ${r})`,Rc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tl([0,.65,.55,1]),circOut:tl([.55,0,1,.45]),backIn:tl([.31,.01,.66,-.59]),backOut:tl([.33,1.53,.69,.99])};function Ov(a,s){if(a)return typeof a=="function"&&qo()?jv(a,s):Sf(a)?tl(a):Array.isArray(a)?a.map(o=>Ov(o,s)||Rc.easeOut):Rc[a]}const Rv=(a,s,o)=>(((1-3*o+3*s)*a+(3*o-6*s))*a+3*s)*a,hT=1e-7,mT=12;function pT(a,s,o,r,c){let h,f,m=0;do f=s+(o-s)/2,h=Rv(f,r,c)-a,h>0?o=f:s=f;while(Math.abs(h)>hT&&++m<mT);return f}function hl(a,s,o,r){if(a===s&&o===r)return nn;const c=h=>pT(h,0,1,a,o);return h=>h===0||h===1?h:Rv(c(h),s,r)}const kv=a=>s=>s<=.5?a(2*s)/2:(2-a(2*(1-s)))/2,wv=a=>s=>1-a(1-s),zv=hl(.33,1.53,.69,.99),bf=wv(zv),Bv=kv(bf),Uv=a=>(a*=2)<1?.5*bf(a):.5*(2-Math.pow(2,-10*(a-1))),Tf=a=>1-Math.sin(Math.acos(a)),Vv=wv(Tf),Lv=kv(Tf),Gv=a=>/^0[^.\s]+$/u.test(a);function vT(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||Gv(a):!0}const al=a=>Math.round(a*1e5)/1e5,_f=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gT(a){return a==null}const yT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xf=(a,s)=>o=>!!(typeof o=="string"&&yT.test(o)&&o.startsWith(a)||s&&!gT(o)&&Object.prototype.hasOwnProperty.call(o,s)),Hv=(a,s,o)=>r=>{if(typeof r!="string")return r;const[c,h,f,m]=r.match(_f);return{[a]:parseFloat(c),[s]:parseFloat(h),[o]:parseFloat(f),alpha:m!==void 0?parseFloat(m):1}},ST=a=>na(0,255,a),vc={...rs,transform:a=>Math.round(ST(a))},ui={test:xf("rgb","red"),parse:Hv("red","green","blue"),transform:({red:a,green:s,blue:o,alpha:r=1})=>"rgba("+vc.transform(a)+", "+vc.transform(s)+", "+vc.transform(o)+", "+al(rl.transform(r))+")"};function bT(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 kc={test:xf("#"),parse:bT,transform:ui.transform},ts={test:xf("hsl","hue"),parse:Hv("hue","saturation","lightness"),transform:({hue:a,saturation:s,lightness:o,alpha:r=1})=>"hsla("+Math.round(a)+", "+wn.transform(al(s))+", "+wn.transform(al(o))+", "+al(rl.transform(r))+")"},Me={test:a=>ui.test(a)||kc.test(a)||ts.test(a),parse:a=>ui.test(a)?ui.parse(a):ts.test(a)?ts.parse(a):kc.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?ui.transform(a):ts.transform(a)},TT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _T(a){var s,o;return isNaN(a)&&typeof a=="string"&&(((s=a.match(_f))===null||s===void 0?void 0:s.length)||0)+(((o=a.match(TT))===null||o===void 0?void 0:o.length)||0)>0}const qv="number",Yv="color",xT="var",ET="var(",Kp="${}",AT=/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 cl(a){const s=a.toString(),o=[],r={color:[],number:[],var:[]},c=[];let h=0;const m=s.replace(AT,p=>(Me.test(p)?(r.color.push(h),c.push(Yv),o.push(Me.parse(p))):p.startsWith(ET)?(r.var.push(h),c.push(xT),o.push(p)):(r.number.push(h),c.push(qv),o.push(parseFloat(p))),++h,Kp)).split(Kp);return{values:o,split:m,indexes:r,types:c}}function Iv(a){return cl(a).values}function Xv(a){const{split:s,types:o}=cl(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===qv?h+=al(c[f]):m===Yv?h+=Me.transform(c[f]):h+=c[f]}return h}}const NT=a=>typeof a=="number"?0:a;function DT(a){const s=Iv(a);return Xv(a)(s.map(NT))}const wa={test:_T,parse:Iv,createTransformer:Xv,getAnimatableNone:DT},CT=new Set(["brightness","contrast","saturate","opacity"]);function jT(a){const[s,o]=a.slice(0,-1).split("(");if(s==="drop-shadow")return a;const[r]=o.match(_f)||[];if(!r)return a;const c=o.replace(r,"");let h=CT.has(s)?1:0;return r!==o&&(h*=100),s+"("+h+c+")"}const MT=/\b([a-z-]*)\(.*?\)/gu,wc={...wa,getAnimatableNone:a=>{const s=a.match(MT);return s?s.map(jT).join(" "):a}},OT={...of,color:Me,backgroundColor:Me,outlineColor:Me,fill:Me,stroke:Me,borderColor:Me,borderTopColor:Me,borderRightColor:Me,borderBottomColor:Me,borderLeftColor:Me,filter:wc,WebkitFilter:wc},Ef=a=>OT[a];function Kv(a,s){let o=Ef(a);return o!==wc&&(o=wa),o.getAnimatableNone?o.getAnimatableNone(s):void 0}const RT=new Set(["auto","none","0"]);function kT(a,s,o){let r=0,c;for(;r<a.length&&!c;){const h=a[r];typeof h=="string"&&!RT.has(h)&&cl(h).values.length&&(c=a[r]),r++}if(c&&o)for(const h of s)a[h]=Kv(o,c)}const Zp=a=>a===rs||a===ct,Qp=(a,s)=>parseFloat(a.split(", ")[s]),Fp=(a,s)=>(o,{transform:r})=>{if(r==="none"||!r)return 0;const c=r.match(/^matrix3d\((.+)\)$/u);if(c)return Qp(c[1],s);{const h=r.match(/^matrix\((.+)\)$/u);return h?Qp(h[1],a):0}},wT=new Set(["x","y","z"]),zT=os.filter(a=>!wT.has(a));function BT(a){const s=[];return zT.forEach(o=>{const r=a.getValue(o);r!==void 0&&(s.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),s}const ls={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:Fp(4,13),y:Fp(5,14)};ls.translateX=ls.x;ls.translateY=ls.y;const fi=new Set;let zc=!1,Bc=!1;function Zv(){if(Bc){const a=Array.from(fi).filter(r=>r.needsMeasurement),s=new Set(a.map(r=>r.element)),o=new Map;s.forEach(r=>{const c=BT(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)})}Bc=!1,zc=!1,fi.forEach(a=>a.complete()),fi.clear()}function Qv(){fi.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(Bc=!0)})}function UT(){Qv(),Zv()}class Af{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?(fi.add(this),zc||(zc=!0,Qt.read(Qv),Qt.resolveKeyframes(Zv))):(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),fi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,fi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Fv=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),VT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function LT(a){const s=VT.exec(a);if(!s)return[,];const[,o,r,c]=s;return[`--${o??r}`,c]}function Jv(a,s,o=1){const[r,c]=LT(a);if(!r)return;const h=window.getComputedStyle(s).getPropertyValue(r);if(h){const f=h.trim();return Fv(f)?parseFloat(f):f}return lf(c)?Jv(c,s,o+1):c}const Pv=a=>s=>s.test(a),GT={test:a=>a==="auto",parse:a=>a},Wv=[rs,ct,wn,ja,Bb,zb,GT],Jp=a=>Wv.find(Pv(a));class $v extends Af{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(),lf(g))){const S=Jv(g,o.current);S!==void 0&&(s[p]=S),p===s.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!Nv.has(r)||s.length!==2)return;const[c,h]=s,f=Jp(c),m=Jp(h);if(f!==m)if(Zp(f)&&Zp(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++)vT(s[c])&&r.push(c);r.length&&kT(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=ls[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]=ls[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 Pp=(a,s)=>s==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(wa.test(a)||a==="0")&&!a.startsWith("url("));function HT(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 qT(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=Pp(c,s),m=Pp(h,s);return!f||!m?!1:HT(a)||(o==="spring"||yf(o))&&r}const YT=a=>a!==null;function $o(a,{repeat:s,repeatType:o="loop"},r){const c=a.filter(YT),h=s&&o!=="loop"&&s%2===1?0:c.length-1;return!h||r===void 0?c[h]:r}const IT=40;class tg{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>IT?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&UT(),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&&!qT(s,r,c,h))if(f)this.options.duration=0;else{p&&p($o(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 Uc=2e4;function eg(a){let s=0;const o=50;let r=a.next(s);for(;!r.done&&s<Uc;)s+=o,r=a.next(s);return s>=Uc?1/0:s}const Jt=(a,s,o)=>a+(s-a)*o;function gc(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 XT({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=gc(p,m,a+1/3),h=gc(p,m,a),f=gc(p,m,a-1/3)}return{red:Math.round(c*255),green:Math.round(h*255),blue:Math.round(f*255),alpha:r}}function Yo(a,s){return o=>o>0?s:a}const yc=(a,s,o)=>{const r=a*a,c=o*(s*s-r)+r;return c<0?0:Math.sqrt(c)},KT=[kc,ui,ts],ZT=a=>KT.find(s=>s.test(a));function Wp(a){const s=ZT(a);if(!s)return!1;let o=s.parse(a);return s===ts&&(o=XT(o)),o}const $p=(a,s)=>{const o=Wp(a),r=Wp(s);if(!o||!r)return Yo(a,s);const c={...o};return h=>(c.red=yc(o.red,r.red,h),c.green=yc(o.green,r.green,h),c.blue=yc(o.blue,r.blue,h),c.alpha=Jt(o.alpha,r.alpha,h),ui.transform(c))},QT=(a,s)=>o=>s(a(o)),ml=(...a)=>a.reduce(QT),Vc=new Set(["none","hidden"]);function FT(a,s){return Vc.has(a)?o=>o<=0?a:s:o=>o>=1?s:a}function JT(a,s){return o=>Jt(a,s,o)}function Nf(a){return typeof a=="number"?JT:typeof a=="string"?lf(a)?Yo:Me.test(a)?$p:$T:Array.isArray(a)?ng:typeof a=="object"?Me.test(a)?$p:PT:Yo}function ng(a,s){const o=[...a],r=o.length,c=a.map((h,f)=>Nf(h)(h,s[f]));return h=>{for(let f=0;f<r;f++)o[f]=c[f](h);return o}}function PT(a,s){const o={...a,...s},r={};for(const c in o)a[c]!==void 0&&s[c]!==void 0&&(r[c]=Nf(a[c])(a[c],s[c]));return c=>{for(const h in r)o[h]=r[h](c);return o}}function WT(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 $T=(a,s)=>{const o=wa.createTransformer(s),r=cl(a),c=cl(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?Vc.has(a)&&!c.values.length||Vc.has(s)&&!r.values.length?FT(a,s):ml(ng(WT(r,c),c.values),o):Yo(a,s)};function ag(a,s,o){return typeof a=="number"&&typeof s=="number"&&typeof o=="number"?Jt(a,s,o):Nf(a)(a,s)}const t_=5;function ig(a,s,o){const r=Math.max(s-t_,0);return Dv(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},Sc=.001;function e_({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=Lc(g,f),R=Math.exp(-b);return Sc-_/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=Lc(Math.pow(g,2),f);return(-c(g)+Sc>0?-1:1)*((_-N)*R)/w}):(c=g=>{const S=Math.exp(-g*a),b=(g-o)*a+1;return-Sc+S*b},h=g=>{const S=Math.exp(-g*a),b=(o-g)*(a*a);return S*b});const m=5/a,p=a_(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 n_=12;function a_(a,s,o){let r=o;for(let c=1;c<n_;c++)r=r-a(r)/s(r);return r}function Lc(a,s){return a*Math.sqrt(1-s*s)}const i_=["duration","bounce"],s_=["stiffness","damping","mass"];function t0(a,s){return s.some(o=>a[o]!==void 0)}function l_(a){let s={velocity:te.velocity,stiffness:te.stiffness,damping:te.damping,mass:te.mass,isResolvedFromDuration:!1,...a};if(!t0(a,s_)&&t0(a,i_))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=e_(a);s={...s,...o,mass:te.mass},s.isResolvedFromDuration=!0}return s}function sg(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}=l_({...o,velocity:-ea(o.velocity||0)}),R=_||0,w=g/(2*Math.sqrt(p*S)),X=f-h,I=ea(Math.sqrt(p/S)),P=Math.abs(X)<5;r||(r=P?te.restSpeed.granular:te.restSpeed.default),c||(c=P?te.restDelta.granular:te.restDelta.default);let L;if(w<1){const Y=Lc(I,w);L=G=>{const Q=Math.exp(-w*I*G);return f-Q*((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 Q=Math.exp(-w*I*G),B=Math.min(Y*G,300);return f-Q*((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 Q=0;w<1&&(Q=Y===0?ta(R):ig(L,Y,G));const B=Math.abs(Q)<=r,nt=Math.abs(f-G)<=c;m.done=B&&nt}return m.value=m.done?f:G,m},toString:()=>{const Y=Math.min(eg(k),Uc),G=jv(Q=>k.next(Y*Q).value,Y,30);return Y+"ms "+G}};return k}function e0({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 P=B=>-w*Math.exp(-B/r),L=B=>I+P(B),k=B=>{const nt=P(B),ft=L(B);_.done=Math.abs(nt)<=g,_.value=_.done?I:ft};let Y,G;const Q=B=>{N(_.value)&&(Y=B,G=sg({keyframes:[_.value,R(_.value)],velocity:ig(L,B,_.value),damping:c,stiffness:h,restDelta:g,restSpeed:S}))};return Q(0),{calculatedDuration:null,next:B=>{let nt=!1;return!G&&Y===void 0&&(nt=!0,k(B),Q(B)),Y!==void 0&&B>=Y?G.next(B-Y):(!nt&&k(B),_)}}}const o_=hl(.42,0,1,1),r_=hl(0,0,.58,1),lg=hl(.42,0,.58,1),u_=a=>Array.isArray(a)&&typeof a[0]!="number",c_={linear:nn,easeIn:o_,easeInOut:lg,easeOut:r_,circIn:Tf,circInOut:Lv,circOut:Vv,backIn:bf,backInOut:Bv,backOut:zv,anticipate:Uv},n0=a=>{if(Sf(a)){lv(a.length===4);const[s,o,r,c]=a;return hl(s,o,r,c)}else if(typeof a=="string")return c_[a];return a};function f_(a,s,o){const r=[],c=o||ag,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=ml(p,m)}r.push(m)}return r}function d_(a,s,{clamp:o=!0,ease:r,mixer:c}={}){const h=a.length;if(lv(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=f_(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 _=ss(a[b],a[b+1],S);return m[b](_)};return o?S=>g(na(a[0],a[h-1],S)):g}function h_(a,s){const o=a[a.length-1];for(let r=1;r<=s;r++){const c=ss(0,s,r);a.push(Jt(o,1,c))}}function m_(a){const s=[0];return h_(s,a.length-1),s}function p_(a,s){return a.map(o=>o*s)}function v_(a,s){return a.map(()=>s||lg).splice(0,a.length-1)}function Io({duration:a=300,keyframes:s,times:o,ease:r="easeInOut"}){const c=u_(r)?r.map(n0):n0(r),h={done:!1,value:s[0]},f=p_(o&&o.length===s.length?o:m_(s),a),m=d_(f,s,{ease:Array.isArray(c)?c:v_(s,c)});return{calculatedDuration:a,next:p=>(h.value=m(p),h.done=p>=a,h)}}const g_=a=>{const s=({timestamp:o})=>a(o);return{start:()=>Qt.update(s,!0),stop:()=>ka(s),now:()=>Ae.isProcessing?Ae.timestamp:zn.now()}},y_={decay:e0,inertia:e0,tween:Io,keyframes:Io,spring:sg},S_=a=>a/100;class Df extends tg{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)||Af,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=yf(o)?o:y_[o]||Io;let p,g;m!==Io&&typeof s[0]!="number"&&(p=ml(S_,ag(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=eg(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),P=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),ft=B%1;!ft&&B>=1&&(ft=1),ft===1&&nt--,nt=Math.min(nt,N+1),!!(nt%2)&&(R==="reverse"?(ft=1-ft,w&&(ft-=w/b)):R==="mirror"&&(k=f)),L=na(0,1,ft)*b}const Y=P?{done:!1,value:p[0]}:k.next(L);m&&(Y.value=m(Y.value));let{done:G}=Y;!P&&g!==null&&(G=this.speed>=0?this.currentTime>=S:this.currentTime<=0);const Q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&G);return Q&&c!==void 0&&(Y.value=$o(p,this.options,c)),X&&X(Y.value),Q&&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=g_,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 b_=new Set(["opacity","clipPath","filter","transform"]);function T_(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=Ov(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 __=gf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Xo=10,x_=2e4;function E_(a){return yf(a.type)||a.type==="spring"||!Mv(a.ease)}function A_(a,s){const o=new Df({...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<x_;)r=o.sample(h),c.push(r.value),h+=Xo;return{times:void 0,keyframes:c,duration:h-Xo,ease:"linear"}}const og={anticipate:Uv,backInOut:Bv,circInOut:Lv};function N_(a){return a in og}class a0 extends tg{constructor(s){super(s);const{name:o,motionValue:r,element:c,keyframes:h}=this.options;this.resolver=new $v(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"&&qo()&&N_(h)&&(h=og[h]),E_(this.options)){const{onComplete:b,onUpdate:_,motionValue:N,element:R,...w}=this.options,X=A_(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=T_(m.owner.current,p,s,{...this.options,duration:r,times:c,ease:h});return S.startTime=g??this.calcStartTime(),this.pendingTimeline?(Xp(S,this.pendingTimeline),this.pendingTimeline=void 0):S.onfinish=()=>{const{onComplete:b}=this.options;m.set($o(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;Xp(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 Df({...N,keyframes:r,duration:c,type:h,ease:f,times:m,isGenerator:!0}),w=ta(this.time);g.setWithVelocity(R.sample(w-Xo).value,R.sample(w).value,Xo)}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 __()&&r&&b_.has(r)&&!p&&!g&&!c&&h!=="mirror"&&f!==0&&m!=="inertia"}}const D_={type:"spring",stiffness:500,damping:25,restSpeed:10},C_=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),j_={type:"keyframes",duration:.8},M_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},O_=(a,{keyframes:s})=>s.length>2?j_:di.has(a)?a.startsWith("scale")?C_(s[1]):D_:M_;function R_({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 Cf=(a,s,o,r={},c,h)=>f=>{const m=hf(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};R_(m)||(S={...S,...O_(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 _=$o(S.keyframes,m);if(_!==void 0)return Qt.update(()=>{S.onUpdate(_),S.onComplete()}),new cT([])}return!h&&a0.supports(S)?new a0(S):new Df(S)};function k_({protectedKeys:a,needsAnimating:s},o){const r=a.hasOwnProperty(o)&&s[o]!==!0;return s[o]=!1,r}function rg(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&&k_(S,b))continue;const R={delay:o,...hf(f||{},b)};let w=!1;if(window.MotionHandoffAnimation){const I=Cv(a);if(I){const P=window.MotionHandoffAnimation(I,b,Qt);P!==null&&(R.startTime=P,w=!0)}}Oc(a,b),_.start(Cf(b,_,N,a.shouldReduceMotion&&Nv.has(b)?{type:!1}:R,a,w));const X=_.animation;X&&g.push(X)}return m&&Promise.all(g).then(()=>{Qt.update(()=>{m&&lT(a,m)})}),g}function Gc(a,s,o={}){var r;const c=Wo(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(rg(a,c,o)):()=>Promise.resolve(),m=a.variantChildren&&a.variantChildren.size?(g=0)=>{const{delayChildren:S=0,staggerChildren:b,staggerDirection:_}=h;return w_(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 w_(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(z_).forEach((g,S)=>{g.notify("AnimationStart",s),f.push(Gc(g,s,{...h,delay:o+p(S)}).then(()=>g.notify("AnimationComplete",s)))}),Promise.all(f)}function z_(a,s){return a.sortNodePosition(s)}function B_(a,s,o={}){a.notify("AnimationStart",s);let r;if(Array.isArray(s)){const c=s.map(h=>Gc(a,h,o));r=Promise.all(c)}else if(typeof s=="string")r=Gc(a,s,o);else{const c=typeof s=="function"?Wo(a,s,o.custom):s;r=Promise.all(rg(a,c,o))}return r.then(()=>{a.notify("AnimationComplete",s)})}const U_=tf.length;function ug(a){if(!a)return;if(!a.isControllingVariants){const o=a.parent?ug(a.parent)||{}:{};return a.props.initial!==void 0&&(o.initial=a.props.initial),o}const s={};for(let o=0;o<U_;o++){const r=tf[o],c=a.props[r];(ol(c)||c===!1)&&(s[r]=c)}return s}const V_=[...$c].reverse(),L_=$c.length;function G_(a){return s=>Promise.all(s.map(({animation:o,options:r})=>B_(a,o,r)))}function H_(a){let s=G_(a),o=i0(),r=!0;const c=p=>(g,S)=>{var b;const _=Wo(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=ug(a.parent)||{},b=[],_=new Set;let N={},R=1/0;for(let X=0;X<L_;X++){const I=V_[X],P=o[I],L=g[I]!==void 0?g[I]:S[I],k=ol(L),Y=I===p?P.isActive:null;Y===!1&&(R=X);let G=L===S[I]&&L!==g[I]&&k;if(G&&r&&a.manuallyAnimateOnMount&&(G=!1),P.protectedKeys={...N},!P.isActive&&Y===null||!L&&!P.prevProp||Jo(L)||typeof L=="boolean")continue;const Q=q_(P.prevProp,L);let B=Q||I===p&&P.isActive&&!G&&k||X>R&&k,nt=!1;const ft=Array.isArray(L)?L:[L];let st=ft.reduce(c(I),{});Y===!1&&(st={});const{prevResolvedValues:dt={}}=P,yt={...dt,...st},Ct=H=>{B=!0,_.has(H)&&(nt=!0,_.delete(H)),P.needsAnimating[H]=!0;const et=a.getValue(H);et&&(et.liveStyle=!1)};for(const H in yt){const et=st[H],bt=dt[H];if(N.hasOwnProperty(H))continue;let Tt=!1;Mc(et)&&Mc(bt)?Tt=!Av(et,bt):Tt=et!==bt,Tt?et!=null?Ct(H):_.add(H):et!==void 0&&_.has(H)?Ct(H):P.protectedKeys[H]=!0}P.prevProp=L,P.prevResolvedValues=st,P.isActive&&(N={...N,...st}),r&&a.blockInitialAnimation&&(B=!1),B&&(!(G&&Q)||nt)&&b.push(...ft.map(H=>({animation:H,options:{type:I}})))}if(_.size){const X={};_.forEach(I=>{const P=a.getBaseTarget(I),L=a.getValue(I);L&&(L.liveStyle=!0),X[I]=P??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=i0(),r=!0}}}function q_(a,s){return typeof s=="string"?s!==a:Array.isArray(s)?!Av(s,a):!1}function si(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function i0(){return{animate:si(!0),whileInView:si(),whileHover:si(),whileTap:si(),whileDrag:si(),whileFocus:si(),exit:si()}}class za{constructor(s){this.isMounted=!1,this.node=s}update(){}}class Y_ extends za{constructor(s){super(s),s.animationState||(s.animationState=H_(s))}updateAnimationControlsSubscription(){const{animate:s}=this.node.getProps();Jo(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 I_=0;class X_ extends za{constructor(){super(...arguments),this.id=I_++}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 K_={animation:{Feature:Y_},exit:{Feature:X_}},An={x:!1,y:!1};function cg(){return An.x||An.y}function Z_(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 jf=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1;function fl(a,s,o,r={passive:!0}){return a.addEventListener(s,o,r),()=>a.removeEventListener(s,o)}function pl(a){return{point:{x:a.pageX,y:a.pageY}}}const Q_=a=>s=>jf(s)&&a(s,pl(s));function il(a,s,o,r){return fl(a,s,Q_(o),r)}const s0=(a,s)=>Math.abs(a-s);function F_(a,s){const o=s0(a.x,s.x),r=s0(a.y,s.y);return Math.sqrt(o**2+r**2)}class fg{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=Tc(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,N=F_(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=bc(_,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=Tc(b.type==="pointercancel"?this.lastMoveEventInfo:bc(_,this.transformPagePoint),this.history);this.startEvent&&N&&N(b,X),R&&R(b,X)},!jf(s))return;this.dragSnapToOrigin=h,this.handlers=o,this.transformPagePoint=r,this.contextWindow=c||window;const f=pl(s),m=bc(f,this.transformPagePoint),{point:p}=m,{timestamp:g}=Ae;this.history=[{...p,timestamp:g}];const{onSessionStart:S}=o;S&&S(s,Tc(m,this.history)),this.removeListeners=ml(il(this.contextWindow,"pointermove",this.handlePointerMove),il(this.contextWindow,"pointerup",this.handlePointerUp),il(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(s){this.handlers=s}end(){this.removeListeners&&this.removeListeners(),ka(this.updatePoint)}}function bc(a,s){return s?{point:s(a.point)}:a}function l0(a,s){return{x:a.x-s.x,y:a.y-s.y}}function Tc({point:a},s){return{point:a,delta:l0(a,dg(s)),offset:l0(a,J_(s)),velocity:P_(s,.1)}}function J_(a){return a[0]}function dg(a){return a[a.length-1]}function P_(a,s){if(a.length<2)return{x:0,y:0};let o=a.length-1,r=null;const c=dg(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 hg=1e-4,W_=1-hg,$_=1+hg,mg=.01,tx=0-mg,ex=0+mg;function an(a){return a.max-a.min}function nx(a,s,o){return Math.abs(a-s)<=o}function o0(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>=W_&&a.scale<=$_||isNaN(a.scale))&&(a.scale=1),(a.translate>=tx&&a.translate<=ex||isNaN(a.translate))&&(a.translate=0)}function sl(a,s,o,r){o0(a.x,s.x,o.x,r?r.originX:void 0),o0(a.y,s.y,o.y,r?r.originY:void 0)}function r0(a,s,o){a.min=o.min+s.min,a.max=a.min+an(s)}function ax(a,s,o){r0(a.x,s.x,o.x),r0(a.y,s.y,o.y)}function u0(a,s,o){a.min=s.min-o.min,a.max=a.min+an(s)}function ll(a,s,o){u0(a.x,s.x,o.x),u0(a.y,s.y,o.y)}function ix(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 c0(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 sx(a,{top:s,left:o,bottom:r,right:c}){return{x:c0(a.x,o,c),y:c0(a.y,s,r)}}function f0(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 lx(a,s){return{x:f0(a.x,s.x),y:f0(a.y,s.y)}}function ox(a,s){let o=.5;const r=an(a),c=an(s);return c>r?o=ss(s.min,s.max-r,a.min):r>c&&(o=ss(a.min,a.max-c,s.min)),na(0,1,o)}function rx(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 Hc=.35;function ux(a=Hc){return a===!1?a=0:a===!0&&(a=Hc),{x:d0(a,"left","right"),y:d0(a,"top","bottom")}}function d0(a,s,o){return{min:h0(a,s),max:h0(a,o)}}function h0(a,s){return typeof a=="number"?a:a[s]||0}const m0=()=>({translate:0,scale:1,origin:0,originPoint:0}),es=()=>({x:m0(),y:m0()}),p0=()=>({min:0,max:0}),ae=()=>({x:p0(),y:p0()});function yn(a){return[a("x"),a("y")]}function pg({top:a,left:s,right:o,bottom:r}){return{x:{min:s,max:o},y:{min:a,max:r}}}function cx({x:a,y:s}){return{top:s.min,right:a.max,bottom:s.max,left:a.min}}function fx(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 _c(a){return a===void 0||a===1}function qc({scale:a,scaleX:s,scaleY:o}){return!_c(a)||!_c(s)||!_c(o)}function oi(a){return qc(a)||vg(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function vg(a){return v0(a.x)||v0(a.y)}function v0(a){return a&&a!=="0%"}function Ko(a,s,o){const r=a-o,c=s*r;return o+c}function g0(a,s,o,r,c){return c!==void 0&&(a=Ko(a,c,r)),Ko(a,o,r)+s}function Yc(a,s=0,o=1,r,c){a.min=g0(a.min,s,o,r,c),a.max=g0(a.max,s,o,r,c)}function gg(a,{x:s,y:o}){Yc(a.x,s.translate,s.scale,s.originPoint),Yc(a.y,o.translate,o.scale,o.originPoint)}const y0=.999999999999,S0=1.0000000000001;function dx(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&&as(a,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),f&&(s.x*=f.x.scale,s.y*=f.y.scale,gg(a,f)),r&&oi(h.latestValues)&&as(a,h.latestValues))}s.x<S0&&s.x>y0&&(s.x=1),s.y<S0&&s.y>y0&&(s.y=1)}function ns(a,s){a.min=a.min+s,a.max=a.max+s}function b0(a,s,o,r,c=.5){const h=Jt(a.min,a.max,c);Yc(a,s,o,h,r)}function as(a,s){b0(a.x,s.x,s.scaleX,s.scale,s.originX),b0(a.y,s.y,s.scaleY,s.scale,s.originY)}function yg(a,s){return pg(fx(a.getBoundingClientRect(),s))}function hx(a,s,o){const r=yg(a,o),{scroll:c}=s;return c&&(ns(r.x,c.offset.x),ns(r.y,c.offset.y)),r}const Sg=({current:a})=>a?a.ownerDocument.defaultView:null,mx=new WeakMap;class px{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(pl(S).point)},h=(S,b)=>{const{drag:_,dragPropagation:N,onDragStart:R}=this.getProps();if(_&&!N&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Z_(_),!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:P}=this.visualElement;if(P&&P.layout){const L=P.layout.layoutBox[X];L&&(I=an(L)*(parseFloat(I)/100))}}this.originPoint[X]=I}),R&&Qt.postRender(()=>R(S,b)),Oc(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=vx(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 fg(s,{onSessionStart:c,onStart:h,onMove:f,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:Sg(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||!Bo(s,c,this.currentDirection))return;const h=this.getAxisMotionValue(s);let f=this.originPoint[s]+r[s];this.constraints&&this.constraints[s]&&(f=ix(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&&$i(o)?this.constraints||(this.constraints=this.resolveRefConstraints()):o&&c?this.constraints=sx(c.layoutBox,o):this.constraints=!1,this.elastic=ux(r),h!==this.constraints&&c&&this.constraints&&!this.hasMutatedConstraints&&yn(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=rx(c.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:s,onMeasureDragConstraints:o}=this.getProps();if(!s||!$i(s))return!1;const r=s.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;const h=hx(r,c.root,this.visualElement.getTransformPagePoint());let f=lx(c.layout.layoutBox,h);if(o){const m=o(cx(f));this.hasMutatedConstraints=!!m,m&&(f=pg(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(!Bo(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 Oc(this.visualElement,s),r.start(Cf(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(!Bo(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(!$i(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]=ox({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(!Bo(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;mx.set(this.visualElement,this);const s=this.visualElement.current,o=il(s,"pointerdown",p=>{const{drag:g,dragListener:S=!0}=this.getProps();g&&S&&this.start(p)}),r=()=>{const{dragConstraints:p}=this.getProps();$i(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=fl(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=Hc,dragMomentum:m=!0}=s;return{...s,drag:o,dragDirectionLock:r,dragPropagation:c,dragConstraints:h,dragElastic:f,dragMomentum:m}}}function Bo(a,s,o){return(s===!0||s===a)&&(o===null||o===a)}function vx(a,s=10){let o=null;return Math.abs(a.y)>s?o="y":Math.abs(a.x)>s&&(o="x"),o}class gx extends za{constructor(s){super(s),this.removeGroupControls=nn,this.removeListeners=nn,this.controls=new px(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 T0=a=>(s,o)=>{a&&Qt.postRender(()=>a(s,o))};class yx extends za{constructor(){super(...arguments),this.removePointerDownListener=nn}onPointerDown(s){this.session=new fg(s,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sg(this.node)})}createPanHandlers(){const{onPanSessionStart:s,onPanStart:o,onPan:r,onPanEnd:c}=this.node.getProps();return{onSessionStart:T0(s),onStart:T0(o),onMove:r,onEnd:(h,f)=>{delete this.session,c&&Qt.postRender(()=>c(h,f))}}}mount(){this.removePointerDownListener=il(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 Lo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _0(a,s){return s.max===s.min?0:a/(s.max-s.min)*100}const $s={correct:(a,s)=>{if(!s.target)return a;if(typeof a=="string")if(ct.test(a))a=parseFloat(a);else return a;const o=_0(a,s.target.x),r=_0(a,s.target.y);return`${o}% ${r}%`}},Sx={correct:(a,{treeScale:s,projectionDelta:o})=>{const r=a,c=wa.parse(a);if(c.length>5)return r;const h=wa.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 bx extends x.Component{componentDidMount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:r,layoutId:c}=this.props,{projection:h}=s;Kb(Tx),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()})),Lo.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(),nf.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 bg(a){const[s,o]=iv(),r=x.useContext(Qc);return y.jsx(bx,{...a,layoutGroup:r,switchLayoutGroup:x.useContext(dv),isPresent:s,safeToRemove:o})}const Tx={borderRadius:{...$s,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$s,borderTopRightRadius:$s,borderBottomLeftRadius:$s,borderBottomRightRadius:$s,boxShadow:Sx};function _x(a,s,o){const r=Re(a)?a:ul(a);return r.start(Cf("",r,s,o)),r.animation}function xx(a){return a instanceof SVGElement&&a.tagName!=="svg"}const Ex=(a,s)=>a.depth-s.depth;class Ax{constructor(){this.children=[],this.isDirty=!1}add(s){mf(this.children,s),this.isDirty=!0}remove(s){pf(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(Ex),this.isDirty=!1,this.children.forEach(s)}}function Nx(a,s){const o=zn.now(),r=({timestamp:c})=>{const h=c-o;h>=s&&(ka(r),a(h-s))};return Qt.read(r,!0),()=>ka(r)}const Tg=["TopLeft","TopRight","BottomLeft","BottomRight"],Dx=Tg.length,x0=a=>typeof a=="string"?parseFloat(a):a,E0=a=>typeof a=="number"||ct.test(a);function Cx(a,s,o,r,c,h){c?(a.opacity=Jt(0,o.opacity!==void 0?o.opacity:1,jx(r)),a.opacityExit=Jt(s.opacity!==void 0?s.opacity:1,0,Mx(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<Dx;f++){const m=`border${Tg[f]}Radius`;let p=A0(s,m),g=A0(o,m);if(p===void 0&&g===void 0)continue;p||(p=0),g||(g=0),p===0||g===0||E0(p)===E0(g)?(a[m]=Math.max(Jt(x0(p),x0(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 A0(a,s){return a[s]!==void 0?a[s]:a.borderRadius}const jx=_g(0,.5,Vv),Mx=_g(.5,.95,nn);function _g(a,s,o){return r=>r<a?0:r>s?1:o(ss(a,s,r))}function N0(a,s){a.min=s.min,a.max=s.max}function gn(a,s){N0(a.x,s.x),N0(a.y,s.y)}function D0(a,s){a.translate=s.translate,a.scale=s.scale,a.originPoint=s.originPoint,a.origin=s.origin}function C0(a,s,o,r,c){return a-=s,a=Ko(a,1/o,r),c!==void 0&&(a=Ko(a,1/c,r)),a}function Ox(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=C0(a.min,s,o,m,c),a.max=C0(a.max,s,o,m,c)}function j0(a,s,[o,r,c],h,f){Ox(a,s[o],s[r],s[c],s.scale,h,f)}const Rx=["x","scaleX","originX"],kx=["y","scaleY","originY"];function M0(a,s,o,r){j0(a.x,s,Rx,o?o.x:void 0,r?r.x:void 0),j0(a.y,s,kx,o?o.y:void 0,r?r.y:void 0)}function O0(a){return a.translate===0&&a.scale===1}function xg(a){return O0(a.x)&&O0(a.y)}function R0(a,s){return a.min===s.min&&a.max===s.max}function wx(a,s){return R0(a.x,s.x)&&R0(a.y,s.y)}function k0(a,s){return Math.round(a.min)===Math.round(s.min)&&Math.round(a.max)===Math.round(s.max)}function Eg(a,s){return k0(a.x,s.x)&&k0(a.y,s.y)}function w0(a){return an(a.x)/an(a.y)}function z0(a,s){return a.translate===s.translate&&a.scale===s.scale&&a.originPoint===s.originPoint}class zx{constructor(){this.members=[]}add(s){mf(this.members,s),s.scheduleRender()}remove(s){if(pf(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 Bx(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 ri={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},el=typeof window<"u"&&window.MotionDebug!==void 0,xc=["","X","Y","Z"],Ux={visibility:"hidden"},B0=1e3;let Vx=0;function Ec(a,s,o,r){const{latestValues:c}=s;c[a]&&(o[a]=c[a],s.setStaticValue(a,0),r&&(r[a]=0))}function Ag(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:s}=a.options;if(!s)return;const o=Cv(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&&Ag(r)}function Ng({attachResizeListener:a,defaultParent:s,measureScroll:o,checkIsScrollRoot:r,resetTransform:c}){return class{constructor(f={},m=s==null?void 0:s()){this.id=Vx++,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,el&&(ri.totalNodes=ri.resolvedTargetDeltas=ri.recalculatedProjection=0),this.nodes.forEach(Hx),this.nodes.forEach(Kx),this.nodes.forEach(Zx),this.nodes.forEach(qx),el&&window.MotionDebug.record(ri)},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 Ax)}addEventListener(f,m){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new vf),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=xx(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=Nx(_,250),Lo.hasAnimatedSinceResize&&(Lo.hasAnimatedSinceResize=!1,this.nodes.forEach(V0))})}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()||Wx,{onLayoutAnimationStart:X,onLayoutAnimationComplete:I}=S.getProps(),P=!this.targetLayout||!Eg(this.targetLayout,R)||N,L=!_&&N;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||L||_&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(b,L);const k={...hf(w,"layout"),onPlay:X,onComplete:I};(S.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else _||V0(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,ka(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(Qx),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&&Ag(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(U0);return}this.isUpdating||this.nodes.forEach(Ix),this.isUpdating=!1,this.nodes.forEach(Xx),this.nodes.forEach(Lx),this.nodes.forEach(Gx),this.clearAllSnapshots();const m=zn.now();Ae.delta=na(0,1e3/60,m-Ae.timestamp),Ae.timestamp=m,Ae.isProcessing=!0,pc.update.process(Ae),pc.preRender.process(Ae),pc.render.process(Ae),Ae.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Yx),this.sharedNodes.forEach(Fx)}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&&!xg(this.projectionDelta),p=this.getTransformTemplate(),g=p?p(this.latestValues,""):void 0,S=g!==this.prevTransformTemplateValue;f&&(m||oi(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)),$x(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(t2))){const{scroll:S}=this.root;S&&(ns(p.x,S.offset.x),ns(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),ns(p.x,b.offset.x),ns(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&&as(p,{x:-S.scroll.offset.x,y:-S.scroll.offset.y}),oi(S.latestValues)&&as(p,S.latestValues)}return oi(this.latestValues)&&as(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||!oi(g.latestValues))continue;qc(g.latestValues)&&g.updateSnapshot();const S=ae(),b=g.measurePageBox();gn(S,b),M0(m,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,S)}return oi(this.latestValues)&&M0(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(),ll(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(),ax(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):gn(this.target,this.layout.layoutBox),gg(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(),ll(this.relativeTargetOrigin,this.target,N.target),gn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}el&&ri.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||qc(this.parent.latestValues)||vg(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;dx(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():(D0(this.prevProjectionDelta.x,this.projectionDelta.x),D0(this.prevProjectionDelta.y,this.projectionDelta.y)),sl(this.projectionDelta,this.layoutCorrected,R,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==N||!z0(this.projectionDelta.x,this.prevProjectionDelta.x)||!z0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",R)),el&&ri.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=es(),this.projectionDelta=es(),this.projectionDeltaWithTransform=es()}setAnimationOrigin(f,m=!1){const p=this.snapshot,g=p?p.latestValues:{},S={...this.latestValues},b=es();(!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,P=!!(w&&!I&&this.options.crossfade===!0&&!this.path.some(Px));this.animationProgress=0;let L;this.mixTargetDelta=k=>{const Y=k/1e3;L0(b.x,f.x,Y),L0(b.y,f.y,Y),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ll(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Jx(this.relativeTarget,this.relativeTargetOrigin,_,Y),L&&wx(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=ae()),gn(L,this.relativeTarget)),w&&(this.animationValues=S,Cx(S,g,this.latestValues,Y,P,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&&(ka(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qt.update(()=>{Lo.hasAnimatedSinceResize=!0,this.currentAnimation=_x(0,B0,{...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(B0),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&&Dg(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),as(m,S),sl(this.projectionDeltaWithTransform,this.layoutCorrected,m,S)}}registerSharedNode(f,m){this.sharedNodes.has(f)||this.sharedNodes.set(f,new zx),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&&Ec("z",f,g,this.animationValues);for(let S=0;S<xc.length;S++)Ec(`rotate${xc[S]}`,f,g,this.animationValues),Ec(`skew${xc[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 Ux;const g={visibility:""},S=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Uo(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=Uo(f==null?void 0:f.pointerEvents)||""),this.hasProjected&&!oi(this.latestValues)&&(w.transform=S?S({},""):"none",this.hasProjected=!1),w}const _=b.animationValues||b.latestValues;this.applyTransformsToTarget(),g.transform=Bx(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 Ho){if(_[w]===void 0)continue;const{correct:X,applyTo:I}=Ho[w],P=g.transform==="none"?_[w]:X(_[w],b);if(I){const L=I.length;for(let k=0;k<L;k++)g[I[k]]=P}else g[w]=P}return this.options.layoutId&&(g.pointerEvents=b===this?Uo(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(U0),this.root.sharedNodes.clear()}}}function Lx(a){a.updateLayout()}function Gx(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}):Dg(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=es();sl(m,r,o.layoutBox);const p=es();f?sl(p,a.applyTransform(c,!0),o.measuredBox):sl(p,r,o.layoutBox);const g=!xg(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();ll(R,o.layoutBox,_.layoutBox);const w=ae();ll(w,r,N.layoutBox),Eg(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 Hx(a){el&&ri.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 qx(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function Yx(a){a.clearSnapshot()}function U0(a){a.clearMeasurements()}function Ix(a){a.isLayoutDirty=!1}function Xx(a){const{visualElement:s}=a.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),a.resetTransform()}function V0(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function Kx(a){a.resolveTargetDelta()}function Zx(a){a.calcProjection()}function Qx(a){a.resetSkewAndRotation()}function Fx(a){a.removeLeadSnapshot()}function L0(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 G0(a,s,o,r){a.min=Jt(s.min,o.min,r),a.max=Jt(s.max,o.max,r)}function Jx(a,s,o,r){G0(a.x,s.x,o.x,r),G0(a.y,s.y,o.y,r)}function Px(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const Wx={duration:.45,ease:[.4,0,.1,1]},H0=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),q0=H0("applewebkit/")&&!H0("chrome/")?Math.round:nn;function Y0(a){a.min=q0(a.min),a.max=q0(a.max)}function $x(a){Y0(a.x),Y0(a.y)}function Dg(a,s,o){return a==="position"||a==="preserve-aspect"&&!nx(w0(s),w0(o),.2)}function t2(a){var s;return a!==a.root&&((s=a.scroll)===null||s===void 0?void 0:s.wasRoot)}const e2=Ng({attachResizeListener:(a,s)=>fl(a,"resize",s),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ac={current:void 0},Cg=Ng({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Ac.current){const a=new e2({});a.mount(window),a.setOptions({layoutScroll:!0}),Ac.current=a}return Ac.current},resetTransform:(a,s)=>{a.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),n2={pan:{Feature:yx},drag:{Feature:gx,ProjectionNode:Cg,MeasureLayout:bg}};function a2(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 jg(a,s){const o=a2(a),r=new AbortController,c={passive:!0,...s,signal:r.signal};return[o,c,()=>r.abort()]}function I0(a){return s=>{s.pointerType==="touch"||cg()||a(s)}}function i2(a,s,o={}){const[r,c,h]=jg(a,o),f=I0(m=>{const{target:p}=m,g=s(m);if(typeof g!="function"||!p)return;const S=I0(b=>{g(b),p.removeEventListener("pointerleave",S)});p.addEventListener("pointerleave",S,c)});return r.forEach(m=>{m.addEventListener("pointerenter",f,c)}),h}function X0(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,pl(s)))}class s2 extends za{mount(){const{current:s}=this.node;s&&(this.unmount=i2(s,o=>(X0(this.node,o,"Start"),r=>X0(this.node,r,"End"))))}unmount(){}}class l2 extends za{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=ml(fl(this.node.current,"focus",()=>this.onFocus()),fl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Mg=(a,s)=>s?a===s?!0:Mg(a,s.parentElement):!1,o2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function r2(a){return o2.has(a.tagName)||a.tabIndex!==-1}const nl=new WeakSet;function K0(a){return s=>{s.key==="Enter"&&a(s)}}function Nc(a,s){a.dispatchEvent(new PointerEvent("pointer"+s,{isPrimary:!0,bubbles:!0}))}const u2=(a,s)=>{const o=a.currentTarget;if(!o)return;const r=K0(()=>{if(nl.has(o))return;Nc(o,"down");const c=K0(()=>{Nc(o,"up")}),h=()=>Nc(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 Z0(a){return jf(a)&&!cg()}function c2(a,s,o={}){const[r,c,h]=jg(a,o),f=m=>{const p=m.currentTarget;if(!Z0(m)||nl.has(p))return;nl.add(p);const g=s(m),S=(N,R)=>{window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",_),!(!Z0(N)||!nl.has(p))&&(nl.delete(p),typeof g=="function"&&g(N,{success:R}))},b=N=>{S(N,o.useGlobalTarget||Mg(p,N.target))},_=N=>{S(N,!1)};window.addEventListener("pointerup",b,c),window.addEventListener("pointercancel",_,c)};return r.forEach(m=>{!r2(m)&&m.getAttribute("tabindex")===null&&(m.tabIndex=0),(o.useGlobalTarget?window:m).addEventListener("pointerdown",f,c),m.addEventListener("focus",g=>u2(g,c),c)}),h}function Q0(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,pl(s)))}class f2 extends za{mount(){const{current:s}=this.node;s&&(this.unmount=c2(s,o=>(Q0(this.node,o,"Start"),(r,{success:c})=>Q0(this.node,r,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ic=new WeakMap,Dc=new WeakMap,d2=a=>{const s=Ic.get(a.target);s&&s(a)},h2=a=>{a.forEach(d2)};function m2({root:a,...s}){const o=a||document;Dc.has(o)||Dc.set(o,{});const r=Dc.get(o),c=JSON.stringify(s);return r[c]||(r[c]=new IntersectionObserver(h2,{root:a,...s})),r[c]}function p2(a,s,o){const r=m2(s);return Ic.set(a,o),r.observe(a),()=>{Ic.delete(a),r.unobserve(a)}}const v2={some:0,all:1};class g2 extends za{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:v2[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 p2(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(y2(s,o))&&this.startObserver()}unmount(){}}function y2({viewport:a={}},{viewport:s={}}={}){return o=>a[o]!==s[o]}const S2={inView:{Feature:g2},tap:{Feature:f2},focus:{Feature:l2},hover:{Feature:s2}},b2={layout:{ProjectionNode:Cg,MeasureLayout:bg}},Xc={current:null},Og={current:!1};function T2(){if(Og.current=!0,!!Pc)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),s=()=>Xc.current=a.matches;a.addListener(s),s()}else Xc.current=!1}const _2=[...Wv,Me,wa],x2=a=>_2.find(Pv(a)),F0=new WeakMap;function E2(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,ul(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,ul(f!==void 0?f:c,{owner:a}))}}for(const r in o)s[r]===void 0&&a.removeValue(r);return s}const J0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class A2{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=Af,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=Po(o),this.isVariantNode=cv(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,F0.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)),Og.current||T2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){F0.delete(this.current),this.projection&&this.projection.unmount(),ka(this.notifyUpdate),ka(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=di.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 is){const o=is[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<J0.length;r++){const c=J0[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=E2(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=ul(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"&&(Fv(c)||Gv(c))?c=parseFloat(c):!x2(c)&&wa.test(o)&&(c=Kv(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=sf(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 vf),this.events[s].add(o)}notify(s,...o){this.events[s]&&this.events[s].notify(...o)}}class Rg extends A2{constructor(){super(...arguments),this.KeyframeResolver=$v}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 N2(a){return window.getComputedStyle(a)}class D2 extends Rg{constructor(){super(...arguments),this.type="html",this.renderInstance=Sv}readValueFromInstance(s,o){if(di.has(o)){const r=Ef(o);return r&&r.default||0}else{const r=N2(s),c=(vv(o)?r.getPropertyValue(o):r[o])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(s,{transformPagePoint:o}){return yg(s,o)}build(s,o,r){rf(s,o,r.transformTemplate)}scrapeMotionValuesFromProps(s,o,r){return df(s,o,r)}}class C2 extends Rg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ae}getBaseTargetFromProps(s,o){return s[o]}readValueFromInstance(s,o){if(di.has(o)){const r=Ef(o);return r&&r.default||0}return o=bv.has(o)?o:ef(o),s.getAttribute(o)}scrapeMotionValuesFromProps(s,o,r){return xv(s,o,r)}build(s,o,r){uf(s,o,this.isSVGTag,r.transformTemplate)}renderInstance(s,o,r,c){Tv(s,o,r,c)}mount(s){this.isSVGTag=ff(s.tagName),super.mount(s)}}const j2=(a,s)=>af(a)?new C2(s):new D2(s,{allowProjection:a!==x.Fragment}),M2=eT({...K_,...S2,...n2,...b2},j2),ci=vb(M2);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.OPEN=1]="OPEN",a[a.CLOSED=2]="CLOSED"})(Oa||(Oa={}));var Ra;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.ENV_VAR=1]="ENV_VAR",a[a.FILE=2]="FILE"})(Ra||(Ra={}));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 O2=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),{"":Ra.UNSPECIFIED,env_var:Ra.ENV_VAR,file:Ra.FILE});Ra.UNSPECIFIED+"",Ra.ENV_VAR+"",Ra.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+"";Object.assign(Object.create(null),{"":Oa.UNSPECIFIED,open:Oa.OPEN,closed:Oa.CLOSED});Oa.UNSPECIFIED+"",Oa.OPEN+"",Oa.CLOSED+"";const R2="_container_33dc5_1",k2="_header_33dc5_5",w2="_addButton_33dc5_17",z2="_createForm_33dc5_35",B2="_createInput_33dc5_41",U2="_createButton_33dc5_71",V2="_emptyState_33dc5_101",L2="_projectRow_33dc5_107",G2="_selected_33dc5_127",H2="_expandArrow_33dc5_134",q2="_expanded_33dc5_141",Y2="_projectName_33dc5_145",I2="_taskCount_33dc5_149",X2="_newTaskButton_33dc5_155",K2="_taskRow_33dc5_173",Z2="_taskStatusIcon_33dc5_202",Q2="_taskTitle_33dc5_206",F2="_dependencyBadge_33dc5_213",J2="_blockedBadge_33dc5_225",P2="_leafSpacer_33dc5_230",W2="_childCountBadge_33dc5_235",$2="_addChildButton_33dc5_248",tE="_emptyTasks_33dc5_277",Xt={container:R2,header:k2,addButton:w2,createForm:z2,createInput:B2,createButton:U2,emptyState:V2,projectRow:L2,selected:G2,expandArrow:H2,expanded:q2,projectName:Y2,taskCount:I2,newTaskButton:X2,taskRow:K2,taskStatusIcon:Z2,taskTitle:Q2,dependencyBadge:F2,blockedBadge:J2,leafSpacer:P2,childCountBadge:W2,addChildButton:$2,emptyTasks:tE},P0={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting:{color:"var(--accent-purple, #a78bfa)",icon:"⧖"}};function eE(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 nE=34,aE=16;function kg({node:a,depth:s,expandedTasks:o,toggleTask:r,selectedTaskId:c,setViewMode:h,projectId:f,taskStatusById:m}){const p=P0[a.status]||P0.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=nE+s*aE;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<O2&&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(Wc,{children:b&&S&&y.jsx(ci.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(kg,{node:R,depth:s+1,expandedTasks:o,toggleTask:r,selectedTaskId:c,setViewMode:h,projectId:f,taskStatusById:m},R.id))})})]})}function iE({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,P=x.useMemo(()=>new Map(r.map(G=>[G.id,G.status])),[r]),L=G=>{m(Q=>{const B=new Set(Q);return B.has(G)?B.delete(G):(B.add(G),c(G)),B})},k=G=>{g(Q=>{const B=new Set(Q);return B.has(G)?(B.delete(G),b(nt=>new Set(nt).add(G))):(B.add(G),b(nt=>{const ft=new Set(nt);return ft.delete(G),ft})),B})};x.useEffect(()=>{const G=new Set(r.filter(Q=>Q.parentTaskId).map(Q=>Q.parentTaskId));G.size>0&&g(Q=>{const B=new Set(Q);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 Q=f.has(G.id),B=r.filter(st=>st.projectId===G.id),nt=X===G.id,ft=Q?eE(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} ${Q?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(Wc,{children:Q&&y.jsxs(ci.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:[ft.map(st=>y.jsx(kg,{node:st,depth:0,expandedTasks:p,toggleTask:k,selectedTaskId:I,setViewMode:s,projectId:G.id,taskStatusById:P},st.id)),B.length===0&&y.jsx("div",{className:Xt.emptyTasks,children:"No tasks yet"})]})})]},G.id)})]})}const sE="_container_v2rs3_1",lE="_tabBar_v2rs3_28",oE="_tab_v2rs3_28",rE="_active_v2rs3_54",uE="_content_v2rs3_60",li={container:sE,tabBar:lE,tab:oE,active:rE,content:uE},cE=260,wg=180,zg=500,Bg="grackle-sidebar-width";function fE(){try{const a=localStorage.getItem(Bg);if(a!==null){const s=Number(a);if(Number.isFinite(s)&&s>=wg&&s<=zg)return s}}catch{}return cE}function dE(a){try{localStorage.setItem(Bg,String(a))}catch{}}function hE({viewMode:a,setViewMode:s}){const[o,r]=x.useState("projects"),[c]=x.useState(fE),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>=wg&&b<=zg&&dE(b)}}});return m.observe(f),()=>{m.disconnect()}},[]),y.jsxs("div",{className:li.container,ref:h,"data-testid":"sidebar",style:{width:c},children:[y.jsxs("div",{className:li.tabBar,children:[y.jsx("button",{className:`${li.tab} ${o==="projects"?li.active:""}`,onClick:()=>r("projects"),children:"Projects"}),y.jsx("button",{className:`${li.tab} ${o==="environments"?li.active:""}`,onClick:()=>r("environments"),children:"Environments"})]}),y.jsx("div",{className:li.content,children:o==="projects"?y.jsx(iE,{viewMode:a,setViewMode:s}):y.jsx(ib,{viewMode:a,setViewMode:s})})]})}const mE="_bar_yszm0_1",pE="_barColumn_yszm0_25",vE="_barRow_yszm0_50",gE="_input_yszm0_56",yE="_inputSmall_yszm0_84",SE="_textarea_yszm0_113",bE="_select_yszm0_145",TE="_btnPrimary_yszm0_174",_E="_btnDanger_yszm0_200",xE="_btnGhost_yszm0_232",EE="_badge_yszm0_245",AE="_statusText_yszm0_255",NE="_statusCompleted_yszm0_260",DE="_statusFailed_yszm0_264",CE="_statusBlocked_yszm0_268",jE="_hintText_yszm0_273",ME="_creatingHint_yszm0_278",OE="_errorHint_yszm0_284",W={bar:mE,barColumn:pE,barRow:vE,input:gE,inputSmall:yE,textarea:SE,select:bE,btnPrimary:TE,btnDanger:_E,btnGhost:xE,badge:EE,statusText:AE,statusCompleted:NE,statusFailed:DE,statusBlocked:CE,hintText:jE,creatingHint:ME,errorHint:OE};function W0({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 RE({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:P}=aa(),[L,k]=x.useState(""),[Y,G]=x.useState(a.kind==="new_chat"?a.runtime:"claude-code"),[Q,B]=x.useState(""),[nt,ft]=x.useState(""),[st,dt]=x.useState(""),[yt,Ct]=x.useState(""),[Yt,E]=x.useState(""),[H,et]=x.useState("local"),[bt,Tt]=x.useState("claude-code"),[Gt,jt]=x.useState(""),[pt,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(q=>q.id===a.sessionId):void 0,Z=a.kind==="task"?f.find(q=>q.id===a.taskId):void 0,_t=Z!=null&&Z.sessionId?h.find(q=>q.id===Z.sessionId):void 0,Rt=Z?Z.dependsOn.some(q=>{const F=f.find(ot=>ot.id===q);return F&&F.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 q=J=>{if(!J.trim())return!0;const St=Number(J);return Number.isInteger(St)&&St>=1&&St<=65535},F=()=>!(!Yt.trim()||H==="ssh"&&!Gt.trim()||H==="codespace"&&!Xe.trim()||(H==="local"||H==="ssh")&&!q(pt)),ot=()=>{if(!F())return;const J={};if(H==="local"){if(Gt.trim()&&(J.host=Gt.trim()),pt.trim()){const St=Number(pt);Number.isInteger(St)&&(J.port=St)}}else if(H==="ssh"){if(J.host=Gt.trim(),de.trim()&&(J.user=de.trim()),pt.trim()){const St=Number(pt);Number.isInteger(St)&&(J.sshPort=St)}bn.trim()&&(J.identityFile=bn.trim())}else H==="docker"?(Ie.trim()&&(J.image=Ie.trim()),ke.trim()&&(J.repo=ke.trim())):H==="codespace"&&(J.codespaceName=Xe.trim());N(Yt.trim(),H,J,bt),E(""),et("local"),Tt("claude-code"),jt(""),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:J=>E(J.target.value),placeholder:"Environment name...",autoFocus:!0,className:W.input}),y.jsxs("select",{value:H,onChange:J=>{et(J.target.value),J.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(W0,{value:bt,onChange:Tt}),y.jsx("button",{onClick:ot,disabled:!F(),className:W.btnPrimary,children:"Add"})]}),y.jsxs("div",{className:W.barRow,children:[H==="local"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Gt,onChange:J=>jt(J.target.value),placeholder:"Host (optional)...",className:W.inputSmall}),y.jsx("input",{type:"number",min:1,max:65535,value:pt,onChange:J=>Ht(J.target.value),placeholder:"Port (optional)...",className:W.inputSmall})]}),H==="ssh"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Gt,onChange:J=>jt(J.target.value),placeholder:"Host (required)...",className:W.inputSmall}),y.jsx("input",{type:"text",value:de,onChange:J=>Ne(J.target.value),placeholder:"User (optional)...",className:W.inputSmall}),y.jsx("input",{type:"number",min:1,max:65535,value:pt,onChange:J=>Ht(J.target.value),placeholder:"SSH port (optional)...",className:W.inputSmall}),y.jsx("input",{type:"text",value:bn,onChange:J=>we(J.target.value),placeholder:"Identity file (optional)...",className:W.inputSmall})]}),H==="docker"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Ie,onChange:J=>sn(J.target.value),placeholder:"Image (optional)...",className:W.inputSmall}),y.jsx("input",{type:"text",value:ke,onChange:J=>Sn(J.target.value),placeholder:"Repo (optional)...",className:W.inputSmall})]}),H==="codespace"&&K==="pick"&&y.jsxs(y.Fragment,{children:[y.jsxs("select",{value:Xe,onChange:J=>{J.target.value==="__create__"?(at("create"),Ke("")):(Ke(J.target.value),J.target.value&&!Yt.trim()&&E(J.target.value))},disabled:X,className:W.select,children:[y.jsx("option",{value:"",children:"Select a codespace..."}),R.map(J=>y.jsxs("option",{value:J.name,children:[J.name," (",J.repository,") — ",J.state]},J.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})]}),H==="codespace"&&K==="create"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Ze,onChange:J=>ln(J.target.value),placeholder:"owner/repo",className:W.inputSmall}),y.jsx("button",{onClick:()=>{Ze.trim()&&(P(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 q=F=>{Q.trim()&&(p(a.projectId,Q.trim(),nt,st,void 0,a.parentTaskId),B(""),ft(""),dt(""),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:Q,onChange:F=>B(F.target.value),placeholder:"Task title...",autoFocus:!0,className:W.input}),y.jsxs("select",{value:st,onChange:F=>dt(F.target.value),className:W.select,children:[y.jsx("option",{value:"",children:"Default env"}),m.map(F=>y.jsx("option",{value:F.id,children:F.displayName},F.id))]}),y.jsx("button",{onClick:()=>q(),disabled:!Q.trim(),className:W.btnPrimary,children:"Create"})]}),y.jsx("textarea",{value:nt,onChange:F=>ft(F.target.value),placeholder:"Description (optional)...",className:W.textarea,rows:3})]})}if(a.kind==="task"&&Z){if(Z.status==="pending"&&Rt){const q=Z.dependsOn.map(F=>f.find(ot=>ot.id===F)).filter(F=>F&&F.status!=="done").map(F=>F.title);return y.jsxs("div",{className:W.bar,children:[y.jsxs("span",{className:W.statusBlocked,children:["Blocked by: ",q.join(", ")]}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${Z.title}"?`)&&(_(Z.id),s({kind:"project",projectId:Z.projectId}))},className:W.btnDanger,children:"Delete"})]})}if(Z.status==="pending"||Z.status==="assigned")return y.jsxs("div",{className:W.bar,children:[y.jsx("button",{onClick:()=>g(Z.id),className:W.btnPrimary,children:"Start Task"}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${Z.title}"?`)&&(_(Z.id),s({kind:"project",projectId:Z.projectId}))},className:W.btnDanger,children:"Delete"})]});if(Z.status==="in_progress"){if((_t==null?void 0:_t.status)==="waiting_input"){const F=ot=>{ot.preventDefault(),!(!L.trim()||!Z.sessionId)&&(r(Z.sessionId,L),k(""))};return y.jsxs("form",{onSubmit:F,className:W.bar,children:[y.jsx("input",{type:"text",value:L,onChange:ot=>k(ot.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:()=>Z.sessionId&&c(Z.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:()=>Z.sessionId&&c(Z.sessionId),className:W.btnDanger,children:"Stop"})]})}if(Z.status==="review")return y.jsxs("div",{className:W.bar,children:[y.jsx("input",{type:"text",value:yt,onChange:q=>Ct(q.target.value),placeholder:"Rejection notes (optional)...",className:W.input}),y.jsx("button",{onClick:()=>{S(Z.id)},className:W.btnPrimary,children:"Approve"}),y.jsx("button",{onClick:()=>{b(Z.id,yt),Ct("")},className:W.btnDanger,children:"Reject"})]});if(Z.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:Z.projectId}),className:W.btnPrimary,children:"+ New Task"}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${Z.title}"?`)&&(_(Z.id),s({kind:"project",projectId:Z.projectId}))},className:W.btnDanger,children:"Delete"})]});if(Z.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(Z.id),className:W.btnPrimary,children:"Retry"}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${Z.title}"?`)&&(_(Z.id),s({kind:"project",projectId:Z.projectId}))},className:W.btnDanger,children:"Delete"})]})}if(a.kind==="new_chat"){const q=F=>{F.preventDefault(),L.trim()&&(o(a.environmentId,L,void 0,Y),k(""))};return y.jsxs("form",{onSubmit:q,className:W.bar,children:[y.jsx("span",{className:W.badge,children:"new chat"}),y.jsx("input",{type:"text",value:L,onChange:F=>k(F.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:W.input}),y.jsx(W0,{value:Y,onChange:G}),y.jsx("button",{type:"submit",disabled:!L.trim(),className:W.btnPrimary,children:"Go"})]})}if(a.kind==="session"){const q=($==null?void 0:$.status)==="running",F=($==null?void 0:$.status)==="waiting_input",ot=$!==void 0&&["completed","failed","killed"].includes($.status);if(q)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(F){const J=St=>{St.preventDefault(),L.trim()&&(r(a.sessionId,L),k(""))};return y.jsxs("form",{onSubmit:J,className:W.bar,children:[y.jsx("input",{type:"text",value:L,onChange:St=>k(St.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(ot&&$)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 Kc(){Kc=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)),Zo(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&&Zo(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)},Kc.apply(this,arguments)}function Zo(a,s){return Zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},Zo(a,s)}function $0(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 Cc(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 $0(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)?$0(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 kE=(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){J1(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,Q=Cc(Y.properties.className);!(G=Q()).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(Ro(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(Q,B){if(B.type==="text"){var nt=B.value,ft=(nt.match(/\n/g)||"").length;if(ft===0)B.position={start:{line:S,column:1},end:{line:S,column:1}},Q.push(B);else for(var st,dt=nt.split(`
|
|
139
|
-
`),yt=Cc(dt.entries());!(st=yt()).done;){var Ct=st.value,Yt=Ct[0],E=Ct[1];Q.push({type:"text",value:Yt===dt.length-1?E:E+`
|
|
140
|
-
`,position:{start:{line:S+Yt,column:1},end:{line:S+Yt,column:1}}})}return S+=ft,Q}if(Object.prototype.hasOwnProperty.call(B,"children")){var H=S;return B.children=Y(B.children),Q.push(B),B.position={start:{line:H,column:1},end:{line:S,column:1}},Q}return Q.push(B),Q},[])})(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,-]+)}/,Q=Y.split(",").map(function(ft){return ft.trim()}).join();if(G.test(Q)){var B=G.exec(Q)[1],nt=W1(B);return function(ft){return nt.includes(ft+1)}}return function(){return!1}})(p),X=(function(Y){var G=Kc(/showLineNumbers=(\d+)/i,{lines:1});if(G.test(Y)){var Q=G.exec(Y);return Number(Q.groups.lines)}return 1})(p),I=(function(Y){for(var G=new Array(Y),Q=0;Q<Y;Q++)G[Q]={type:"element",tagName:"span",properties:{className:[]},children:[]};return G})(g.position.end.line),P=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],L=function(){var Y,G,Q=R.value,B=Q[0],nt=Q[1];nt.properties.className=["code-line"];var ft=$1(g,function(st){return st.position.start.line<=B+1&&st.position.end.line>=B+1});nt.children=ft.children,(p.toLowerCase().includes("showLineNumbers".toLowerCase())||s.showLineNumbers===!0||typeof s.showLineNumbers=="object"&&s.showLineNumbers.includes(b))&&!P.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-"))&&Ro(nt).substring(0,1)==="-"?nt.properties.className.push("deleted"):(b==="diff"||(G=b)!=null&&G.includes("diff-"))&&Ro(nt).substring(0,1)==="+"&&nt.properties.className.push("inserted")},k=Cc(I.entries());!(R=k()).done;)L();I.length>0&&Ro(I[I.length-1]).trim()===""&&I.pop(),r.children=I}}}})(P1);const wE="_systemEvent_1ftop_1",zE="_systemTimestamp_1ftop_9",BE="_textEvent_1ftop_13",UE="_toolUseEvent_1ftop_100",VE="_toolUsePrefix_1ftop_116",LE="_toolResultEvent_1ftop_120",GE="_toolResultSummary_1ftop_126",HE="_toolResultPre_1ftop_140",qE="_errorEvent_1ftop_154",YE="_statusEvent_1ftop_163",IE="_defaultEvent_1ftop_173",Nn={systemEvent:wE,systemTimestamp:zE,textEvent:BE,toolUseEvent:UE,toolUsePrefix:VE,toolResultEvent:LE,toolResultSummary:GE,toolResultPre:HE,errorEvent:qE,statusEvent:YE,defaultEvent:IE};function XE({time:a,content:s}){return y.jsxs("div",{className:Nn.systemEvent,children:[y.jsxs("span",{className:Nn.systemTimestamp,children:["[",a,"]"]})," ",s]})}function KE({content:a}){return y.jsx("div",{className:Nn.textEvent,children:y.jsx(tS,{remarkPlugins:[eS],rehypePlugins:[kE],children:a})})}function ZE({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 QE({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 FE({content:a}){return y.jsxs("div",{className:Nn.errorEvent,children:["Error: ",a]})}function JE({content:a}){return y.jsxs("div",{className:Nn.statusEvent,children:["--- ",a," ---"]})}function PE({content:a}){return y.jsx("div",{className:Nn.defaultEvent,children:a})}function Ug({event:a}){const s=new Date(a.timestamp).toLocaleTimeString();switch(a.eventType){case"system":return y.jsx(XE,{time:s,content:a.content});case"text":case"output":return y.jsx(KE,{content:a.content});case"tool_use":return y.jsx(ZE,{content:a.content});case"tool_result":return y.jsx(QE,{content:a.content});case"error":return y.jsx(FE,{content:a.content});case"status":return y.jsx(JE,{content:a.content});default:return y.jsx(PE,{content:a.content})}}const WE="_container_1e9es_1",$E="_emptyState_1e9es_7",tA="_errorState_1e9es_13",eA="_statsBar_1e9es_19",nA="_branchName_1e9es_45",aA="_additions_1e9es_50",iA="_deletions_1e9es_54",sA="_fileList_1e9es_58",lA="_fileName_1e9es_68",oA="_diffContent_1e9es_85",rA="_diffLine_1e9es_103",uA="_added_1e9es_112",cA="_removed_1e9es_116",fA="_hunk_1e9es_120",dA="_meta_1e9es_123",hA="_context_1e9es_126",Ee={container:WE,emptyState:$E,errorState:tA,statsBar:eA,branchName:nA,additions:aA,deletions:iA,fileList:sA,fileName:lA,diffContent:oA,diffLine:rA,added:uA,removed:cA,hunk:fA,meta:dA,context:hA};function mA(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 pA({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} ${mA(r)}`,children:r},c))})]})}const vA="_container_twqwx_1",gA="_emptyState_twqwx_8",yA="_card_twqwx_14",SA="_cardHeader_twqwx_34",bA="_categoryBadge_twqwx_41",TA="_findingTitle_twqwx_49",_A="_findingDate_twqwx_55",xA="_findingContent_twqwx_61",EA="_tags_twqwx_67",AA="_tag_twqwx_67",kn={container:vA,emptyState:gA,card:yA,cardHeader:SA,categoryBadge:bA,findingTitle:TA,findingDate:_A,findingContent:xA,tags:EA,tag:AA},NA={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)"}},DA={text:"var(--text-secondary)",bg:"var(--bg-elevated)"};function CA({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=NA[r.category]||DA;return y.jsxs(ci.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 jA="_container_1vhtg_1",MA="_heading_1vhtg_7",OA="_section_1vhtg_14",RA="_sectionTitle_1vhtg_25",kA="_sectionDescription_1vhtg_34",wA="_emptyState_1vhtg_40",zA="_tokenList_1vhtg_47",BA="_tokenRow_1vhtg_54",UA="_tokenBadge_1vhtg_67",VA="_tokenName_1vhtg_82",LA="_tokenTarget_1vhtg_89",GA="_deleteButton_1vhtg_98",HA="_addForm_1vhtg_112",qA="_formRow_1vhtg_118",YA="_input_1vhtg_124",IA="_select_1vhtg_153",XA="_addButton_1vhtg_184",ue={container:jA,heading:MA,section:OA,sectionTitle:RA,sectionDescription:kA,emptyState:wA,tokenList:zA,tokenRow:BA,tokenBadge:UA,tokenName:VA,tokenTarget:LA,deleteButton:GA,addForm:HA,formRow:qA,input:YA,select:IA,addButton:XA},KA=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function ZA(){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:KA.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 tv=220,ev=70,QA=40,FA=60,JA="hierarchy",PA="dependency";function WA(a){return x.useMemo(()=>{if(a.length===0)return{nodes:[],edges:[]};const s=new Ap.graphlib.Graph({multigraph:!0});s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:"TB",nodesep:QA,ranksep:FA});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:tv,height:ev});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:JA},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:PA},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return Ap.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-tv/2,y:m.y-ev/2},data:{task:f,childCount:p.length,doneChildCount:p.filter(g=>g.status==="done").length,hasDependencies:f.dependsOn.length>0}}}),edges:c}},[a])}const $A="_dagContainer_1c7ip_1",tN="_emptyDag_1c7ip_18",eN="_taskNode_1c7ip_26",nN="_taskNodeBorder_1c7ip_48",aN="_taskNodeContent_1c7ip_54",iN="_taskNodeHeader_1c7ip_64",sN="_taskNodeIcon_1c7ip_71",lN="_taskNodeTitle_1c7ip_76",oN="_taskNodeBadges_1c7ip_84",rN="_childBadge_1c7ip_89",uN="_depBadge_1c7ip_101",cN="_handle_1c7ip_113",en={dagContainer:$A,emptyDag:tN,taskNode:eN,taskNodeBorder:nN,taskNodeContent:aN,taskNodeHeader:iN,taskNodeIcon:sN,taskNodeTitle:lN,taskNodeBadges:oN,childBadge:rN,depBadge:uN,handle:cN},nv={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 fN({data:a}){const{task:s,childCount:o,doneChildCount:r,hasDependencies:c}=a,h=nv[s.status]||nv.pending;return y.jsxs("div",{className:en.taskNode,"data-task-id":s.id,"data-task-title":s.title,children:[y.jsx(Np,{type:"target",position:Dp.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(Np,{type:"source",position:Dp.Bottom,className:en.handle})]})}const av={pending:"#6b7a8d",assigned:"#70a1ff",in_progress:"#4ecca3",review:"#f0c040",done:"#4ecca3",failed:"#e94560",waiting:"#a78bfa"},dN={task:fN};function hN({projectId:a,setViewMode:s}){const{tasks:o}=aa(),r=x.useMemo(()=>o.filter(p=>p.projectId===a),[o,a]),{nodes:c,edges:h}=WA(r),f=x.useCallback((p,g)=>{s({kind:"task",taskId:g.id})},[s]),m=x.useCallback(p=>{const g=p.data;return av[g.task.status]||av.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(aS,{nodes:c,edges:h,nodeTypes:dN,onNodeClick:f,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[y.jsx(iS,{variant:sS.Dots,gap:20,size:1,color:"rgba(255,255,255,0.05)"}),y.jsx(lS,{showInteractive:!1}),y.jsx(oS,{nodeColor:m,maskColor:"rgba(10, 12, 20, 0.7)",style:{background:"var(--bg-inset)"}})]})})}const mN="_panelContainer_m2c7m_1",pN="_emptyState_m2c7m_8",vN="_projectSummary_m2c7m_17",gN="_projectSummaryTitle_m2c7m_28",yN="_projectSummarySubtitle_m2c7m_32",SN="_header_m2c7m_36",bN="_headerInfo_m2c7m_62",TN="_killButton_m2c7m_68",_N="_tabBar_m2c7m_89",xN="_tab_m2c7m_89",EN="_active_m2c7m_112",AN="_eventScroll_m2c7m_117",NN="_tabContent_m2c7m_123",DN="_noContext_m2c7m_128",CN="_overviewContent_m2c7m_134",jN="_overviewSection_m2c7m_143",MN="_overviewLabel_m2c7m_149",ON="_overviewDescription_m2c7m_156",RN="_depList_m2c7m_162",kN="_depItem_m2c7m_168",wN="_depBlocked_m2c7m_175",zN="_depDone_m2c7m_179",BN="_waitingMessage_m2c7m_183",UN="_errorMessage_m2c7m_187",rt={panelContainer:mN,emptyState:pN,projectSummary:vN,projectSummaryTitle:gN,projectSummarySubtitle:yN,header:SN,headerInfo:bN,killButton:TN,tabBar:_N,tab:xN,active:EN,eventScroll:AN,tabContent:NN,noContext:DN,overviewContent:CN,overviewSection:jN,overviewLabel:MN,overviewDescription:ON,depList:RN,depItem:kN,depBlocked:wN,depDone:zN,waitingMessage:BN,errorMessage:UN};function VN({sessionId:a,session:s,isActive:o,onKill:r}){return y.jsxs("div",{className:rt.header,children:[y.jsxs("span",{children:["Session: ",a.slice(0,8),s&&` | ${s.runtime} | ${s.status}`]}),y.jsxs("span",{className:rt.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:rt.killButton,children:"×"})]})]})}function LN({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:rt.eventScroll,children:[a.length===0&&y.jsx("div",{className:r?rt.errorMessage:rt.waitingMessage,children:c}),a.map((h,f)=>y.jsx(Ug,{event:h},`${h.sessionId}-${h.timestamp}-${f}`))]})}function GN(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 HN({viewMode:a,setViewMode:s}){var ft;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),P=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)!==P.current){P.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(dt=>dt.sessionId===L):[];return GN(st)},[o,L]),Q=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(ZA,{});if(a.kind==="empty")return y.jsx("div",{className:rt.emptyState,children:"Select a session, project, or task to get started"});if(a.kind==="new_chat")return y.jsx("div",{className:rt.emptyState,children:"Enter a prompt below to start a new session"});if(a.kind==="project"){const st=c.filter(Ct=>Ct.projectId===a.projectId),dt=st.filter(Ct=>Ct.status==="done").length,yt=st.length;return y.jsxs("div",{className:rt.panelContainer,children:[y.jsxs("div",{className:rt.tabBar,role:"tablist","aria-label":"Project view",children:[y.jsx("button",{role:"tab","aria-selected":w==="graph",className:`${rt.tab} ${w==="graph"?rt.active:""}`,onClick:()=>X("graph"),children:"Graph"}),y.jsx("button",{role:"tab","aria-selected":w==="tasks",className:`${rt.tab} ${w==="tasks"?rt.active:""}`,onClick:()=>X("tasks"),children:"Tasks"})]}),w==="tasks"&&y.jsxs("div",{className:rt.projectSummary,children:[y.jsx("span",{className:rt.projectSummaryTitle,children:yt>0?`${dt}/${yt} tasks complete`:"No tasks yet"}),y.jsx("span",{className:rt.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),w==="graph"&&y.jsx(hN,{projectId:a.projectId,setViewMode:s})]})}if(a.kind==="new_environment")return y.jsx("div",{className:rt.emptyState,children:"Configure the new environment below"});if(a.kind==="new_task")return y.jsx("div",{className:rt.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:rt.panelContainer,children:[y.jsxs("div",{className:rt.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:rt.killButton,children:"×"})]}),y.jsxs("div",{className:rt.tabBar,role:"tablist","aria-label":"Task view",children:[y.jsx("button",{role:"tab","aria-selected":N==="overview",className:`${rt.tab} ${N==="overview"?rt.active:""}`,onClick:()=>R("overview"),children:"Overview"}),y.jsx("button",{role:"tab","aria-selected":N==="stream",className:`${rt.tab} ${N==="stream"?rt.active:""}`,onClick:()=>R("stream"),children:"Stream"}),y.jsx("button",{role:"tab","aria-selected":N==="diff",className:`${rt.tab} ${N==="diff"?rt.active:""}`,onClick:()=>R("diff"),children:"Diff"}),y.jsx("button",{role:"tab","aria-selected":N==="findings",className:`${rt.tab} ${N==="findings"?rt.active:""}`,onClick:()=>R("findings"),children:"Findings"})]}),y.jsxs(Wc,{mode:"wait",children:[N==="overview"&&y.jsxs(ci.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:rt.overviewContent,children:[(k==null?void 0:k.description)&&y.jsxs("div",{className:rt.overviewSection,children:[y.jsx("div",{className:rt.overviewLabel,children:"Description"}),y.jsx("div",{className:rt.overviewDescription,children:k.description})]}),(k==null?void 0:k.environmentId)&&y.jsxs("div",{className:rt.overviewSection,children:[y.jsx("div",{className:rt.overviewLabel,children:"Environment"}),y.jsx("div",{className:rt.overviewDescription,children:((ft=h.find(dt=>dt.id===k.environmentId))==null?void 0:ft.displayName)??k.environmentId})]}),k&&k.dependsOn.length>0&&y.jsxs("div",{className:rt.overviewSection,children:[y.jsx("div",{className:rt.overviewLabel,children:"Dependencies"}),y.jsx("div",{className:rt.depList,children:k.dependsOn.map(dt=>{const yt=Q.get(dt),Ct=(yt==null?void 0:yt.status)==="done";return y.jsxs("div",{className:`${rt.depItem} ${Ct?rt.depDone:rt.depBlocked}`,children:[y.jsx("span",{children:Ct?"✓":"○"}),y.jsx("span",{children:(yt==null?void 0:yt.title)??dt})]},dt)})})]}),k&&k.dependsOn.length===0&&!k.description&&y.jsx("div",{className:rt.waitingMessage,children:"No additional details"})]},"overview"),N==="stream"&&y.jsxs(ci.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},ref:b,className:rt.eventScroll,children:[!L&&y.jsx("div",{className:rt.waitingMessage,children:"Task has not been started yet"}),L&&G.length===0&&y.jsx("div",{className:rt.waitingMessage,children:"Waiting for events..."}),G.map((dt,yt)=>y.jsx(Ug,{event:dt},`${dt.sessionId}-${dt.timestamp}-${yt}`))]},"stream"),N==="diff"&&y.jsx(ci.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:rt.tabContent,children:y.jsx(pA,{diff:f})},"diff"),N==="findings"&&y.jsx(ci.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:rt.tabContent,children:Y?y.jsx(CA,{projectId:Y}):y.jsx("div",{className:rt.noContext,children:"No project context"})},"findings")]})]})}if(!L)return y.jsx("div",{className:rt.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:rt.panelContainer,children:[y.jsx(VN,{sessionId:L,session:B,isActive:nt,onKill:S}),y.jsx(LN,{sessionEvents:G,session:B,scrollRef:b})]})}const qN="_root_cdda9_1",YN="_body_cdda9_7",IN="_main_cdda9_13",jc={root:qN,body:YN,main:IN},XN=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function KN(){const[a,s]=x.useState({kind:"empty"}),{lastSpawnedId:o}=aa();return x.useEffect(()=>{o&&s({kind:"session",sessionId:o})},[o]),y.jsxs("div",{className:jc.root,children:[y.jsx(RS,{setViewMode:s}),y.jsxs("div",{className:jc.body,children:[y.jsx(hE,{viewMode:a,setViewMode:s}),y.jsxs("div",{className:jc.main,children:[y.jsx(HN,{viewMode:a,setViewMode:s},a.kind==="task"?a.taskId:a.kind==="session"?a.sessionId:a.kind),y.jsx(RE,{viewMode:a,setViewMode:s})]})]})]})}function ZN(){const a=XN?ES:vS;return y.jsx(a,{children:y.jsx(KN,{})})}dS.createRoot(document.getElementById("root")).render(y.jsx(x.StrictMode,{children:y.jsx(ZN,{})}));
|