@grackle-ai/web 0.47.0 → 0.47.1

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,98 +0,0 @@
1
- import{r as r_,a as S,j as h,v as c_,b as u_,t as Tr,i as d_,f as f_,M as wf,c as Nf}from"./markdown-gcy1Jmzi.js";import{r as h_,d as by,H as Sy,P as xy,i as p_,B as m_,a as g_,C as y_,M as v_}from"./dagview-EHk2VaeR.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const d of r)if(d.type==="childList")for(const u of d.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&o(u)}).observe(document,{childList:!0,subtree:!0});function i(r){const d={};return r.integrity&&(d.integrity=r.integrity),r.referrerPolicy&&(d.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?d.credentials="include":r.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(r){if(r.ep)return;r.ep=!0;const d=i(r);fetch(r.href,d)}})();var _d={exports:{}},Ml={},Td={exports:{}},Ed={};/**
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 _y;function b_(){return _y||(_y=1,(function(n){function a(G,Y){var Z=G.length;G.push(Y);e:for(;0<Z;){var he=Z-1>>>1,W=G[he];if(0<r(W,Y))G[he]=Y,G[Z]=W,Z=he;else break e}}function i(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var Y=G[0],Z=G.pop();if(Z!==Y){G[0]=Z;e:for(var he=0,W=G.length,Fe=W>>>1;he<Fe;){var we=2*(he+1)-1,pe=G[we],Be=we+1,Te=G[Be];if(0>r(pe,Z))Be<W&&0>r(Te,pe)?(G[he]=Te,G[Be]=Z,he=Be):(G[he]=pe,G[we]=Z,he=we);else if(Be<W&&0>r(Te,Z))G[he]=Te,G[Be]=Z,he=Be;else break e}}return Y}function r(G,Y){var Z=G.sortIndex-Y.sortIndex;return Z!==0?Z:G.id-Y.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var u=Date,p=u.now();n.unstable_now=function(){return u.now()-p}}var m=[],g=[],v=1,y=null,x=3,T=!1,C=!1,k=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function V(G){for(var Y=i(g);Y!==null;){if(Y.callback===null)o(g);else if(Y.startTime<=G)o(g),Y.sortIndex=Y.expirationTime,a(m,Y);else break;Y=i(g)}}function O(G){if(k=!1,V(G),!C)if(i(m)!==null)C=!0,F||(F=!0,ae());else{var Y=i(g);Y!==null&&se(O,Y.startTime-G)}}var F=!1,H=-1,D=5,U=-1;function ee(){return w?!0:!(n.unstable_now()-U<D)}function ne(){if(w=!1,F){var G=n.unstable_now();U=G;var Y=!0;try{e:{C=!1,k&&(k=!1,A(H),H=-1),T=!0;var Z=x;try{t:{for(V(G),y=i(m);y!==null&&!(y.expirationTime>G&&ee());){var he=y.callback;if(typeof he=="function"){y.callback=null,x=y.priorityLevel;var W=he(y.expirationTime<=G);if(G=n.unstable_now(),typeof W=="function"){y.callback=W,V(G),Y=!0;break t}y===i(m)&&o(m),V(G)}else o(m);y=i(m)}if(y!==null)Y=!0;else{var Fe=i(g);Fe!==null&&se(O,Fe.startTime-G),Y=!1}}break e}finally{y=null,x=Z,T=!1}Y=void 0}}finally{Y?ae():F=!1}}}var ae;if(typeof j=="function")ae=function(){j(ne)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,q=ie.port2;ie.port1.onmessage=ne,ae=function(){q.postMessage(null)}}else ae=function(){E(ne,0)};function se(G,Y){H=E(function(){G(n.unstable_now())},Y)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(G){G.callback=null},n.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<G?Math.floor(1e3/G):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(G){switch(x){case 1:case 2:case 3:var Y=3;break;default:Y=x}var Z=x;x=Y;try{return G()}finally{x=Z}},n.unstable_requestPaint=function(){w=!0},n.unstable_runWithPriority=function(G,Y){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var Z=x;x=G;try{return Y()}finally{x=Z}},n.unstable_scheduleCallback=function(G,Y,Z){var he=n.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?he+Z:he):Z=he,G){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=Z+W,G={id:v++,callback:Y,priorityLevel:G,startTime:Z,expirationTime:W,sortIndex:-1},Z>he?(G.sortIndex=Z,a(g,G),i(m)===null&&G===i(g)&&(k?(A(H),H=-1):k=!0,se(O,Z-he))):(G.sortIndex=W,a(m,G),C||T||(C=!0,F||(F=!0,ae()))),G},n.unstable_shouldYield=ee,n.unstable_wrapCallback=function(G){var Y=x;return function(){var Z=x;x=Y;try{return G.apply(this,arguments)}finally{x=Z}}}})(Ed)),Ed}var Ty;function S_(){return Ty||(Ty=1,Td.exports=b_()),Td.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 Ey;function x_(){if(Ey)return Ml;Ey=1;var n=S_(),a=r_(),i=h_();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(d(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var s=e,l=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){s=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return m(c),e;if(f===l)return m(c),t;f=f.sibling}throw Error(o(188))}if(s.return!==l.return)s=c,l=f;else{for(var b=!1,_=c.child;_;){if(_===s){b=!0,s=c,l=f;break}if(_===l){b=!0,l=c,s=f;break}_=_.sibling}if(!b){for(_=f.child;_;){if(_===s){b=!0,s=f,l=c;break}if(_===l){b=!0,l=f,s=c;break}_=_.sibling}if(!b)throw Error(o(189))}}if(s.alternate!==l)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),j=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function q(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case E:return"Profiler";case w:return"StrictMode";case O:return"Suspense";case F:return"SuspenseList";case U:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case j:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case V:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:q(e.type)||"Memo";case D:t=e._payload,e=e._init;try{return q(e(t))}catch{}}return null}var se=Array.isArray,G=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},he=[],W=-1;function Fe(e){return{current:e}}function we(e){0>W||(e.current=he[W],he[W]=null,W--)}function pe(e,t){W++,he[W]=e.current,e.current=t}var Be=Fe(null),Te=Fe(null),te=Fe(null),ze=Fe(null);function Ne(e,t){switch(pe(te,t),pe(Te,e),pe(Be,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gg(t),e=Pg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}we(Be),pe(Be,e)}function _e(){we(Be),we(Te),we(te)}function yt(e){e.memoizedState!==null&&pe(ze,e);var t=Be.current,s=Pg(t,e.type);t!==s&&(pe(Te,e),pe(Be,s))}function ht(e){Te.current===e&&(we(Be),we(Te)),ze.current===e&&(we(ze),wl._currentValue=Z)}var Ut,Mt;function Ke(e){if(Ut===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Ut=t&&t[1]||"",Mt=-1<s.stack.indexOf(`
18
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+Ut+e+Mt}var Me=!1;function On(e,t){if(!e||Me)return"";Me=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(P){var z=P}Reflect.construct(e,[],Q)}else{try{Q.call()}catch(P){z=P}e.call(Q.prototype)}}else{try{throw Error()}catch(P){z=P}(Q=e())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(P){if(P&&z&&typeof P.stack=="string")return[P.stack,z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),b=f[0],_=f[1];if(b&&_){var N=b.split(`
20
- `),I=_.split(`
21
- `);for(c=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;c<I.length&&!I[c].includes("DetermineComponentFrameRoot");)c++;if(l===N.length||c===I.length)for(l=N.length-1,c=I.length-1;1<=l&&0<=c&&N[l]!==I[c];)c--;for(;1<=l&&0<=c;l--,c--)if(N[l]!==I[c]){if(l!==1||c!==1)do if(l--,c--,0>c||N[l]!==I[c]){var $=`
22
- `+N[l].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=l&&0<=c);break}}}finally{Me=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Ke(s):""}function Aa(e,t){switch(e.tag){case 26:case 27:case 5:return Ke(e.type);case 16:return Ke("Lazy");case 13:return e.child!==t&&t!==null?Ke("Suspense Fallback"):Ke("Suspense");case 19:return Ke("SuspenseList");case 0:case 15:return On(e.type,!1);case 11:return On(e.type.render,!1);case 1:return On(e.type,!0);case 31:return Ke("Activity");default:return""}}function ka(e){try{var t="",s=null;do t+=Aa(e,s),s=e,e=e.return;while(e);return t}catch(l){return`
23
- Error generating stack: `+l.message+`
24
- `+l.stack}}var Hn=Object.prototype.hasOwnProperty,Jn=n.unstable_scheduleCallback,Bn=n.unstable_cancelCallback,ea=n.unstable_shouldYield,X=n.unstable_requestPaint,J=n.unstable_now,oe=n.unstable_getCurrentPriorityLevel,ve=n.unstable_ImmediatePriority,ge=n.unstable_UserBlockingPriority,Le=n.unstable_NormalPriority,Ce=n.unstable_LowPriority,ct=n.unstable_IdlePriority,ke=n.log,$e=n.unstable_setDisableYieldValue,ut=null,Ve=null;function pt(e){if(typeof ke=="function"&&$e(e),Ve&&typeof Ve.setStrictMode=="function")try{Ve.setStrictMode(ut,e)}catch{}}var xe=Math.clz32?Math.clz32:le,Ue=Math.log,dt=Math.LN2;function le(e){return e>>>=0,e===0?32:31-(Ue(e)/dt|0)|0}var At=256,Ln=262144,ro=4194304;function rs(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function co(e,t,s){var l=e.pendingLanes;if(l===0)return 0;var c=0,f=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var _=l&134217727;return _!==0?(l=_&~f,l!==0?c=rs(l):(b&=_,b!==0?c=rs(b):s||(s=_&~e,s!==0&&(c=rs(s))))):(_=l&~f,_!==0?c=rs(_):b!==0?c=rs(b):s||(s=l&~e,s!==0&&(c=rs(s)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,s=t&-t,f>=s||f===32&&(s&4194048)!==0)?t:c}function Hi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Z1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Th(){var e=ro;return ro<<=1,(ro&62914560)===0&&(ro=4194304),e}function uc(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Gi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function X1(e,t,s,l,c,f){var b=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var _=e.entanglements,N=e.expirationTimes,I=e.hiddenUpdates;for(s=b&~s;0<s;){var $=31-xe(s),Q=1<<$;_[$]=0,N[$]=-1;var z=I[$];if(z!==null)for(I[$]=null,$=0;$<z.length;$++){var P=z[$];P!==null&&(P.lane&=-536870913)}s&=~Q}l!==0&&Eh(e,l,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(b&~t))}function Eh(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-xe(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|s&261930}function Ch(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var l=31-xe(s),c=1<<l;c&t|e[l]&t&&(e[l]|=t),s&=~c}}function Ah(e,t){var s=t&-t;return s=(s&42)!==0?1:dc(s),(s&(e.suspendedLanes|t))!==0?0:s}function dc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function fc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function kh(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:fy(e.type))}function wh(e,t){var s=Y.p;try{return Y.p=e,t()}finally{Y.p=s}}var wa=Math.random().toString(36).slice(2),zt="__reactFiber$"+wa,Wt="__reactProps$"+wa,Us="__reactContainer$"+wa,hc="__reactEvents$"+wa,Q1="__reactListeners$"+wa,W1="__reactHandles$"+wa,Nh="__reactResources$"+wa,Pi="__reactMarker$"+wa;function pc(e){delete e[zt],delete e[Wt],delete e[hc],delete e[Q1],delete e[W1]}function zs(e){var t=e[zt];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Us]||s[zt]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Xg(e);e!==null;){if(s=e[zt])return s;e=Xg(e)}return t}e=s,s=e.parentNode}return null}function Vs(e){if(e=e[zt]||e[Us]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Fi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Hs(e){var t=e[Nh];return t||(t=e[Nh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Lt(e){e[Pi]=!0}var jh=new Set,Dh={};function cs(e,t){Gs(e,t),Gs(e+"Capture",t)}function Gs(e,t){for(Dh[e]=t,e=0;e<t.length;e++)jh.add(t[e])}var J1=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]*$"),Mh={},Rh={};function eS(e){return Hn.call(Rh,e)?!0:Hn.call(Mh,e)?!1:J1.test(e)?Rh[e]=!0:(Mh[e]=!0,!1)}function uo(e,t,s){if(eS(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function fo(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function ta(e,t,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+l)}}function yn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Oh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tS(e,t,s){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,f=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(b){s=""+b,f.call(this,b)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(b){s=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function mc(e){if(!e._valueTracker){var t=Oh(e)?"checked":"value";e._valueTracker=tS(e,t,""+e[t])}}function Bh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),l="";return e&&(l=Oh(e)?e.checked?"true":"false":e.value),e=l,e!==s?(t.setValue(e),!0):!1}function ho(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var nS=/[\n"\\]/g;function vn(e){return e.replace(nS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function gc(e,t,s,l,c,f,b,_){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+yn(t)):e.value!==""+yn(t)&&(e.value=""+yn(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?yc(e,b,yn(t)):s!=null?yc(e,b,yn(s)):l!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+yn(_):e.removeAttribute("name")}function Lh(e,t,s,l,c,f,b,_){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){mc(e);return}s=s!=null?""+yn(s):"",t=t!=null?""+yn(t):s,_||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=_?e.checked:!!l,e.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),mc(e)}function yc(e,t,s){t==="number"&&ho(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Ps(e,t,s,l){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&l&&(e[s].defaultSelected=!0)}else{for(s=""+yn(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Ih(e,t,s){if(t!=null&&(t=""+yn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+yn(s):""}function Uh(e,t,s,l){if(t==null){if(l!=null){if(s!=null)throw Error(o(92));if(se(l)){if(1<l.length)throw Error(o(93));l=l[0]}s=l}s==null&&(s=""),t=s}s=yn(t),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l),mc(e)}function Fs(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var aS=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 zh(e,t,s){var l=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,s):typeof s!="number"||s===0||aS.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function Vh(e,t,s){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&s[c]!==l&&zh(e,c,l)}else for(var f in t)t.hasOwnProperty(f)&&zh(e,f,t[f])}function vc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sS=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"]]),iS=/^[\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 po(e){return iS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function na(){}var bc=null;function Sc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $s=null,qs=null;function Hh(e){var t=Vs(e);if(t&&(e=t.stateNode)){var s=e[Wt]||null;e:switch(e=t.stateNode,t.type){case"input":if(gc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+vn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var l=s[t];if(l!==e&&l.form===e.form){var c=l[Wt]||null;if(!c)throw Error(o(90));gc(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<s.length;t++)l=s[t],l.form===e.form&&Bh(l)}break e;case"textarea":Ih(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&Ps(e,!!s.multiple,t,!1)}}}var xc=!1;function Gh(e,t,s){if(xc)return e(t,s);xc=!0;try{var l=e(t);return l}finally{if(xc=!1,($s!==null||qs!==null)&&(tr(),$s&&(t=$s,e=qs,qs=$s=null,Hh(t),e)))for(t=0;t<e.length;t++)Hh(e[t])}}function $i(e,t){var s=e.stateNode;if(s===null)return null;var l=s[Wt]||null;if(l===null)return null;s=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,t,typeof s));return s}var aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_c=!1;if(aa)try{var qi={};Object.defineProperty(qi,"passive",{get:function(){_c=!0}}),window.addEventListener("test",qi,qi),window.removeEventListener("test",qi,qi)}catch{_c=!1}var Na=null,Tc=null,mo=null;function Ph(){if(mo)return mo;var e,t=Tc,s=t.length,l,c="value"in Na?Na.value:Na.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var b=s-e;for(l=1;l<=b&&t[s-l]===c[f-l];l++);return mo=c.slice(e,1<l?1-l:void 0)}function go(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yo(){return!0}function Fh(){return!1}function Jt(e){function t(s,l,c,f,b){this._reactName=s,this._targetInst=c,this.type=l,this.nativeEvent=f,this.target=b,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(s=e[_],this[_]=s?s(f):f[_]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?yo:Fh,this.isPropagationStopped=Fh,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=yo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=yo)},persist:function(){},isPersistent:yo}),t}var us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vo=Jt(us),Yi=y({},us,{view:0,detail:0}),lS=Jt(Yi),Ec,Cc,Ki,bo=y({},Yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ki&&(Ki&&e.type==="mousemove"?(Ec=e.screenX-Ki.screenX,Cc=e.screenY-Ki.screenY):Cc=Ec=0,Ki=e),Ec)},movementY:function(e){return"movementY"in e?e.movementY:Cc}}),$h=Jt(bo),oS=y({},bo,{dataTransfer:0}),rS=Jt(oS),cS=y({},Yi,{relatedTarget:0}),Ac=Jt(cS),uS=y({},us,{animationName:0,elapsedTime:0,pseudoElement:0}),dS=Jt(uS),fS=y({},us,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hS=Jt(fS),pS=y({},us,{data:0}),qh=Jt(pS),mS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gS={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"},yS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yS[e])?!!t[e]:!1}function kc(){return vS}var bS=y({},Yi,{key:function(e){if(e.key){var t=mS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=go(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kc,charCode:function(e){return e.type==="keypress"?go(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?go(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),SS=Jt(bS),xS=y({},bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yh=Jt(xS),_S=y({},Yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kc}),TS=Jt(_S),ES=y({},us,{propertyName:0,elapsedTime:0,pseudoElement:0}),CS=Jt(ES),AS=y({},bo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),kS=Jt(AS),wS=y({},us,{newState:0,oldState:0}),NS=Jt(wS),jS=[9,13,27,32],wc=aa&&"CompositionEvent"in window,Zi=null;aa&&"documentMode"in document&&(Zi=document.documentMode);var DS=aa&&"TextEvent"in window&&!Zi,Kh=aa&&(!wc||Zi&&8<Zi&&11>=Zi),Zh=" ",Xh=!1;function Qh(e,t){switch(e){case"keyup":return jS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ys=!1;function MS(e,t){switch(e){case"compositionend":return Wh(t);case"keypress":return t.which!==32?null:(Xh=!0,Zh);case"textInput":return e=t.data,e===Zh&&Xh?null:e;default:return null}}function RS(e,t){if(Ys)return e==="compositionend"||!wc&&Qh(e,t)?(e=Ph(),mo=Tc=Na=null,Ys=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Kh&&t.locale!=="ko"?null:t.data;default:return null}}var OS={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 Jh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!OS[e.type]:t==="textarea"}function ep(e,t,s,l){$s?qs?qs.push(l):qs=[l]:$s=l,t=rr(t,"onChange"),0<t.length&&(s=new vo("onChange","change",null,s,l),e.push({event:s,listeners:t}))}var Xi=null,Qi=null;function BS(e){Lg(e,0)}function So(e){var t=Fi(e);if(Bh(t))return e}function tp(e,t){if(e==="change")return t}var np=!1;if(aa){var Nc;if(aa){var jc="oninput"in document;if(!jc){var ap=document.createElement("div");ap.setAttribute("oninput","return;"),jc=typeof ap.oninput=="function"}Nc=jc}else Nc=!1;np=Nc&&(!document.documentMode||9<document.documentMode)}function sp(){Xi&&(Xi.detachEvent("onpropertychange",ip),Qi=Xi=null)}function ip(e){if(e.propertyName==="value"&&So(Qi)){var t=[];ep(t,Qi,e,Sc(e)),Gh(BS,t)}}function LS(e,t,s){e==="focusin"?(sp(),Xi=t,Qi=s,Xi.attachEvent("onpropertychange",ip)):e==="focusout"&&sp()}function IS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return So(Qi)}function US(e,t){if(e==="click")return So(t)}function zS(e,t){if(e==="input"||e==="change")return So(t)}function VS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ln=typeof Object.is=="function"?Object.is:VS;function Wi(e,t){if(ln(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var c=s[l];if(!Hn.call(t,c)||!ln(e[c],t[c]))return!1}return!0}function lp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function op(e,t){var s=lp(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=t&&l>=t)return{node:s,offset:t-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=lp(s)}}function rp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?rp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ho(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=ho(e.document)}return t}function Dc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var HS=aa&&"documentMode"in document&&11>=document.documentMode,Ks=null,Mc=null,Ji=null,Rc=!1;function up(e,t,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Rc||Ks==null||Ks!==ho(l)||(l=Ks,"selectionStart"in l&&Dc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ji&&Wi(Ji,l)||(Ji=l,l=rr(Mc,"onSelect"),0<l.length&&(t=new vo("onSelect","select",null,t,s),e.push({event:t,listeners:l}),t.target=Ks)))}function ds(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Zs={animationend:ds("Animation","AnimationEnd"),animationiteration:ds("Animation","AnimationIteration"),animationstart:ds("Animation","AnimationStart"),transitionrun:ds("Transition","TransitionRun"),transitionstart:ds("Transition","TransitionStart"),transitioncancel:ds("Transition","TransitionCancel"),transitionend:ds("Transition","TransitionEnd")},Oc={},dp={};aa&&(dp=document.createElement("div").style,"AnimationEvent"in window||(delete Zs.animationend.animation,delete Zs.animationiteration.animation,delete Zs.animationstart.animation),"TransitionEvent"in window||delete Zs.transitionend.transition);function fs(e){if(Oc[e])return Oc[e];if(!Zs[e])return e;var t=Zs[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in dp)return Oc[e]=t[s];return e}var fp=fs("animationend"),hp=fs("animationiteration"),pp=fs("animationstart"),GS=fs("transitionrun"),PS=fs("transitionstart"),FS=fs("transitioncancel"),mp=fs("transitionend"),gp=new Map,Bc="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(" ");Bc.push("scrollEnd");function In(e,t){gp.set(e,t),cs(t,[e])}var xo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},bn=[],Xs=0,Lc=0;function _o(){for(var e=Xs,t=Lc=Xs=0;t<e;){var s=bn[t];bn[t++]=null;var l=bn[t];bn[t++]=null;var c=bn[t];bn[t++]=null;var f=bn[t];if(bn[t++]=null,l!==null&&c!==null){var b=l.pending;b===null?c.next=c:(c.next=b.next,b.next=c),l.pending=c}f!==0&&yp(s,c,f)}}function To(e,t,s,l){bn[Xs++]=e,bn[Xs++]=t,bn[Xs++]=s,bn[Xs++]=l,Lc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ic(e,t,s,l){return To(e,t,s,l),Eo(e)}function hs(e,t){return To(e,null,null,t),Eo(e)}function yp(e,t,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var c=!1,f=e.return;f!==null;)f.childLanes|=s,l=f.alternate,l!==null&&(l.childLanes|=s),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-xe(s),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=s|536870912),f):null}function Eo(e){if(50<xl)throw xl=0,qu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qs={};function $S(e,t,s,l){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,s,l){return new $S(e,t,s,l)}function Uc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sa(e,t){var s=e.alternate;return s===null?(s=on(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function vp(e,t){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Co(e,t,s,l,c,f){var b=0;if(l=e,typeof e=="function")Uc(e)&&(b=1);else if(typeof e=="string")b=Xx(e,s,Be.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case U:return e=on(31,s,t,c),e.elementType=U,e.lanes=f,e;case k:return ps(s.children,c,f,t);case w:b=8,c|=24;break;case E:return e=on(12,s,t,c|2),e.elementType=E,e.lanes=f,e;case O:return e=on(13,s,t,c),e.elementType=O,e.lanes=f,e;case F:return e=on(19,s,t,c),e.elementType=F,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j:b=10;break e;case A:b=9;break e;case V:b=11;break e;case H:b=14;break e;case D:b=16,l=null;break e}b=29,s=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=on(b,s,t,c),t.elementType=e,t.type=l,t.lanes=f,t}function ps(e,t,s,l){return e=on(7,e,l,t),e.lanes=s,e}function zc(e,t,s){return e=on(6,e,null,t),e.lanes=s,e}function bp(e){var t=on(18,null,null,0);return t.stateNode=e,t}function Vc(e,t,s){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Sp=new WeakMap;function Sn(e,t){if(typeof e=="object"&&e!==null){var s=Sp.get(e);return s!==void 0?s:(t={value:e,source:t,stack:ka(t)},Sp.set(e,t),t)}return{value:e,source:t,stack:ka(t)}}var Ws=[],Js=0,Ao=null,el=0,xn=[],_n=0,ja=null,Gn=1,Pn="";function ia(e,t){Ws[Js++]=el,Ws[Js++]=Ao,Ao=e,el=t}function xp(e,t,s){xn[_n++]=Gn,xn[_n++]=Pn,xn[_n++]=ja,ja=e;var l=Gn;e=Pn;var c=32-xe(l)-1;l&=~(1<<c),s+=1;var f=32-xe(t)+c;if(30<f){var b=c-c%5;f=(l&(1<<b)-1).toString(32),l>>=b,c-=b,Gn=1<<32-xe(t)+c|s<<c|l,Pn=f+e}else Gn=1<<f|s<<c|l,Pn=e}function Hc(e){e.return!==null&&(ia(e,1),xp(e,1,0))}function Gc(e){for(;e===Ao;)Ao=Ws[--Js],Ws[Js]=null,el=Ws[--Js],Ws[Js]=null;for(;e===ja;)ja=xn[--_n],xn[_n]=null,Pn=xn[--_n],xn[_n]=null,Gn=xn[--_n],xn[_n]=null}function _p(e,t){xn[_n++]=Gn,xn[_n++]=Pn,xn[_n++]=ja,Gn=t.id,Pn=t.overflow,ja=e}var Vt=null,it=null,Ie=!1,Da=null,Tn=!1,Pc=Error(o(519));function Ma(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tl(Sn(t,e)),Pc}function Tp(e){var t=e.stateNode,s=e.type,l=e.memoizedProps;switch(t[zt]=e,t[Wt]=l,s){case"dialog":De("cancel",t),De("close",t);break;case"iframe":case"object":case"embed":De("load",t);break;case"video":case"audio":for(s=0;s<Tl.length;s++)De(Tl[s],t);break;case"source":De("error",t);break;case"img":case"image":case"link":De("error",t),De("load",t);break;case"details":De("toggle",t);break;case"input":De("invalid",t),Lh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":De("invalid",t);break;case"textarea":De("invalid",t),Uh(t,l.value,l.defaultValue,l.children)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||l.suppressHydrationWarning===!0||Vg(t.textContent,s)?(l.popover!=null&&(De("beforetoggle",t),De("toggle",t)),l.onScroll!=null&&De("scroll",t),l.onScrollEnd!=null&&De("scrollend",t),l.onClick!=null&&(t.onclick=na),t=!0):t=!1,t||Ma(e,!0)}function Ep(e){for(Vt=e.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:Tn=!1;return;case 27:case 3:Tn=!0;return;default:Vt=Vt.return}}function ei(e){if(e!==Vt)return!1;if(!Ie)return Ep(e),Ie=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||od(e.type,e.memoizedProps)),s=!s),s&&it&&Ma(e),Ep(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));it=Zg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));it=Zg(e)}else t===27?(t=it,qa(e.type)?(e=fd,fd=null,it=e):it=t):it=Vt?Cn(e.stateNode.nextSibling):null;return!0}function ms(){it=Vt=null,Ie=!1}function Fc(){var e=Da;return e!==null&&(an===null?an=e:an.push.apply(an,e),Da=null),e}function tl(e){Da===null?Da=[e]:Da.push(e)}var $c=Fe(null),gs=null,la=null;function Ra(e,t,s){pe($c,t._currentValue),t._currentValue=s}function oa(e){e._currentValue=$c.current,we($c)}function qc(e,t,s){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===s)break;e=e.return}}function Yc(e,t,s,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var b=c.child;f=f.firstContext;e:for(;f!==null;){var _=f;f=c;for(var N=0;N<t.length;N++)if(_.context===t[N]){f.lanes|=s,_=f.alternate,_!==null&&(_.lanes|=s),qc(f.return,s,e),l||(b=null);break e}f=_.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(o(341));b.lanes|=s,f=b.alternate,f!==null&&(f.lanes|=s),qc(b,s,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function ti(e,t,s,l){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(o(387));if(b=b.memoizedProps,b!==null){var _=c.type;ln(c.pendingProps.value,b.value)||(e!==null?e.push(_):e=[_])}}else if(c===ze.current){if(b=c.alternate,b===null)throw Error(o(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(wl):e=[wl])}c=c.return}e!==null&&Yc(t,e,s,l),t.flags|=262144}function ko(e){for(e=e.firstContext;e!==null;){if(!ln(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ys(e){gs=e,la=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return Cp(gs,e)}function wo(e,t){return gs===null&&ys(e),Cp(e,t)}function Cp(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},la===null){if(e===null)throw Error(o(308));la=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else la=la.next=t;return s}var qS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},YS=n.unstable_scheduleCallback,KS=n.unstable_NormalPriority,kt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kc(){return{controller:new qS,data:new Map,refCount:0}}function nl(e){e.refCount--,e.refCount===0&&YS(KS,function(){e.controller.abort()})}var al=null,Zc=0,ni=0,ai=null;function ZS(e,t){if(al===null){var s=al=[];Zc=0,ni=Wu(),ai={status:"pending",value:void 0,then:function(l){s.push(l)}}}return Zc++,t.then(Ap,Ap),t}function Ap(){if(--Zc===0&&al!==null){ai!==null&&(ai.status="fulfilled");var e=al;al=null,ni=0,ai=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function XS(e,t){var s=[],l={status:"pending",value:null,reason:null,then:function(c){s.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<s.length;c++)(0,s[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<s.length;c++)(0,s[c])(void 0)}),l}var kp=G.S;G.S=function(e,t){ug=J(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ZS(e,t),kp!==null&&kp(e,t)};var vs=Fe(null);function Xc(){var e=vs.current;return e!==null?e:at.pooledCache}function No(e,t){t===null?pe(vs,vs.current):pe(vs,t.pool)}function wp(){var e=Xc();return e===null?null:{parent:kt._currentValue,pool:e}}var si=Error(o(460)),Qc=Error(o(474)),jo=Error(o(542)),Do={then:function(){}};function Np(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jp(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(na,na),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mp(e),e;default:if(typeof t.status=="string")t.then(na,na);else{if(e=at,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mp(e),e}throw Ss=t,si}}function bs(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ss=s,si):s}}var Ss=null;function Dp(){if(Ss===null)throw Error(o(459));var e=Ss;return Ss=null,e}function Mp(e){if(e===si||e===jo)throw Error(o(483))}var ii=null,sl=0;function Mo(e){var t=sl;return sl+=1,ii===null&&(ii=[]),jp(ii,e,t)}function il(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ro(e,t){throw t.$$typeof===x?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Rp(e){function t(R,M){if(e){var L=R.deletions;L===null?(R.deletions=[M],R.flags|=16):L.push(M)}}function s(R,M){if(!e)return null;for(;M!==null;)t(R,M),M=M.sibling;return null}function l(R){for(var M=new Map;R!==null;)R.key!==null?M.set(R.key,R):M.set(R.index,R),R=R.sibling;return M}function c(R,M){return R=sa(R,M),R.index=0,R.sibling=null,R}function f(R,M,L){return R.index=L,e?(L=R.alternate,L!==null?(L=L.index,L<M?(R.flags|=67108866,M):L):(R.flags|=67108866,M)):(R.flags|=1048576,M)}function b(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function _(R,M,L,K){return M===null||M.tag!==6?(M=zc(L,R.mode,K),M.return=R,M):(M=c(M,L),M.return=R,M)}function N(R,M,L,K){var fe=L.type;return fe===k?$(R,M,L.props.children,K,L.key):M!==null&&(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===D&&bs(fe)===M.type)?(M=c(M,L.props),il(M,L),M.return=R,M):(M=Co(L.type,L.key,L.props,null,R.mode,K),il(M,L),M.return=R,M)}function I(R,M,L,K){return M===null||M.tag!==4||M.stateNode.containerInfo!==L.containerInfo||M.stateNode.implementation!==L.implementation?(M=Vc(L,R.mode,K),M.return=R,M):(M=c(M,L.children||[]),M.return=R,M)}function $(R,M,L,K,fe){return M===null||M.tag!==7?(M=ps(L,R.mode,K,fe),M.return=R,M):(M=c(M,L),M.return=R,M)}function Q(R,M,L){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=zc(""+M,R.mode,L),M.return=R,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case T:return L=Co(M.type,M.key,M.props,null,R.mode,L),il(L,M),L.return=R,L;case C:return M=Vc(M,R.mode,L),M.return=R,M;case D:return M=bs(M),Q(R,M,L)}if(se(M)||ae(M))return M=ps(M,R.mode,L,null),M.return=R,M;if(typeof M.then=="function")return Q(R,Mo(M),L);if(M.$$typeof===j)return Q(R,wo(R,M),L);Ro(R,M)}return null}function z(R,M,L,K){var fe=M!==null?M.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return fe!==null?null:_(R,M,""+L,K);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case T:return L.key===fe?N(R,M,L,K):null;case C:return L.key===fe?I(R,M,L,K):null;case D:return L=bs(L),z(R,M,L,K)}if(se(L)||ae(L))return fe!==null?null:$(R,M,L,K,null);if(typeof L.then=="function")return z(R,M,Mo(L),K);if(L.$$typeof===j)return z(R,M,wo(R,L),K);Ro(R,L)}return null}function P(R,M,L,K,fe){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return R=R.get(L)||null,_(M,R,""+K,fe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case T:return R=R.get(K.key===null?L:K.key)||null,N(M,R,K,fe);case C:return R=R.get(K.key===null?L:K.key)||null,I(M,R,K,fe);case D:return K=bs(K),P(R,M,L,K,fe)}if(se(K)||ae(K))return R=R.get(L)||null,$(M,R,K,fe,null);if(typeof K.then=="function")return P(R,M,L,Mo(K),fe);if(K.$$typeof===j)return P(R,M,L,wo(M,K),fe);Ro(M,K)}return null}function re(R,M,L,K){for(var fe=null,He=null,de=M,Ae=M=0,Oe=null;de!==null&&Ae<L.length;Ae++){de.index>Ae?(Oe=de,de=null):Oe=de.sibling;var Ge=z(R,de,L[Ae],K);if(Ge===null){de===null&&(de=Oe);break}e&&de&&Ge.alternate===null&&t(R,de),M=f(Ge,M,Ae),He===null?fe=Ge:He.sibling=Ge,He=Ge,de=Oe}if(Ae===L.length)return s(R,de),Ie&&ia(R,Ae),fe;if(de===null){for(;Ae<L.length;Ae++)de=Q(R,L[Ae],K),de!==null&&(M=f(de,M,Ae),He===null?fe=de:He.sibling=de,He=de);return Ie&&ia(R,Ae),fe}for(de=l(de);Ae<L.length;Ae++)Oe=P(de,R,Ae,L[Ae],K),Oe!==null&&(e&&Oe.alternate!==null&&de.delete(Oe.key===null?Ae:Oe.key),M=f(Oe,M,Ae),He===null?fe=Oe:He.sibling=Oe,He=Oe);return e&&de.forEach(function(Qa){return t(R,Qa)}),Ie&&ia(R,Ae),fe}function me(R,M,L,K){if(L==null)throw Error(o(151));for(var fe=null,He=null,de=M,Ae=M=0,Oe=null,Ge=L.next();de!==null&&!Ge.done;Ae++,Ge=L.next()){de.index>Ae?(Oe=de,de=null):Oe=de.sibling;var Qa=z(R,de,Ge.value,K);if(Qa===null){de===null&&(de=Oe);break}e&&de&&Qa.alternate===null&&t(R,de),M=f(Qa,M,Ae),He===null?fe=Qa:He.sibling=Qa,He=Qa,de=Oe}if(Ge.done)return s(R,de),Ie&&ia(R,Ae),fe;if(de===null){for(;!Ge.done;Ae++,Ge=L.next())Ge=Q(R,Ge.value,K),Ge!==null&&(M=f(Ge,M,Ae),He===null?fe=Ge:He.sibling=Ge,He=Ge);return Ie&&ia(R,Ae),fe}for(de=l(de);!Ge.done;Ae++,Ge=L.next())Ge=P(de,R,Ae,Ge.value,K),Ge!==null&&(e&&Ge.alternate!==null&&de.delete(Ge.key===null?Ae:Ge.key),M=f(Ge,M,Ae),He===null?fe=Ge:He.sibling=Ge,He=Ge);return e&&de.forEach(function(o_){return t(R,o_)}),Ie&&ia(R,Ae),fe}function nt(R,M,L,K){if(typeof L=="object"&&L!==null&&L.type===k&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case T:e:{for(var fe=L.key;M!==null;){if(M.key===fe){if(fe=L.type,fe===k){if(M.tag===7){s(R,M.sibling),K=c(M,L.props.children),K.return=R,R=K;break e}}else if(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===D&&bs(fe)===M.type){s(R,M.sibling),K=c(M,L.props),il(K,L),K.return=R,R=K;break e}s(R,M);break}else t(R,M);M=M.sibling}L.type===k?(K=ps(L.props.children,R.mode,K,L.key),K.return=R,R=K):(K=Co(L.type,L.key,L.props,null,R.mode,K),il(K,L),K.return=R,R=K)}return b(R);case C:e:{for(fe=L.key;M!==null;){if(M.key===fe)if(M.tag===4&&M.stateNode.containerInfo===L.containerInfo&&M.stateNode.implementation===L.implementation){s(R,M.sibling),K=c(M,L.children||[]),K.return=R,R=K;break e}else{s(R,M);break}else t(R,M);M=M.sibling}K=Vc(L,R.mode,K),K.return=R,R=K}return b(R);case D:return L=bs(L),nt(R,M,L,K)}if(se(L))return re(R,M,L,K);if(ae(L)){if(fe=ae(L),typeof fe!="function")throw Error(o(150));return L=fe.call(L),me(R,M,L,K)}if(typeof L.then=="function")return nt(R,M,Mo(L),K);if(L.$$typeof===j)return nt(R,M,wo(R,L),K);Ro(R,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,M!==null&&M.tag===6?(s(R,M.sibling),K=c(M,L),K.return=R,R=K):(s(R,M),K=zc(L,R.mode,K),K.return=R,R=K),b(R)):s(R,M)}return function(R,M,L,K){try{sl=0;var fe=nt(R,M,L,K);return ii=null,fe}catch(de){if(de===si||de===jo)throw de;var He=on(29,de,null,R.mode);return He.lanes=K,He.return=R,He}finally{}}}var xs=Rp(!0),Op=Rp(!1),Oa=!1;function Wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(qe&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Eo(e),yp(e,null,s),t}return To(e,l,t,s),Eo(e)}function ll(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,Ch(e,s)}}function eu(e,t){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var b={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?c=f=b:f=f.next=b,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var tu=!1;function ol(){if(tu){var e=ai;if(e!==null)throw e}}function rl(e,t,s,l){tu=!1;var c=e.updateQueue;Oa=!1;var f=c.firstBaseUpdate,b=c.lastBaseUpdate,_=c.shared.pending;if(_!==null){c.shared.pending=null;var N=_,I=N.next;N.next=null,b===null?f=I:b.next=I,b=N;var $=e.alternate;$!==null&&($=$.updateQueue,_=$.lastBaseUpdate,_!==b&&(_===null?$.firstBaseUpdate=I:_.next=I,$.lastBaseUpdate=N))}if(f!==null){var Q=c.baseState;b=0,$=I=N=null,_=f;do{var z=_.lane&-536870913,P=z!==_.lane;if(P?(Re&z)===z:(l&z)===z){z!==0&&z===ni&&(tu=!0),$!==null&&($=$.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var re=e,me=_;z=t;var nt=s;switch(me.tag){case 1:if(re=me.payload,typeof re=="function"){Q=re.call(nt,Q,z);break e}Q=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=me.payload,z=typeof re=="function"?re.call(nt,Q,z):re,z==null)break e;Q=y({},Q,z);break e;case 2:Oa=!0}}z=_.callback,z!==null&&(e.flags|=64,P&&(e.flags|=8192),P=c.callbacks,P===null?c.callbacks=[z]:P.push(z))}else P={lane:z,tag:_.tag,payload:_.payload,callback:_.callback,next:null},$===null?(I=$=P,N=Q):$=$.next=P,b|=z;if(_=_.next,_===null){if(_=c.shared.pending,_===null)break;P=_,_=P.next,P.next=null,c.lastBaseUpdate=P,c.shared.pending=null}}while(!0);$===null&&(N=Q),c.baseState=N,c.firstBaseUpdate=I,c.lastBaseUpdate=$,f===null&&(c.shared.lanes=0),Ha|=b,e.lanes=b,e.memoizedState=Q}}function Bp(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Lp(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Bp(s[e],t)}var li=Fe(null),Oo=Fe(0);function Ip(e,t){e=ga,pe(Oo,e),pe(li,t),ga=e|t.baseLanes}function nu(){pe(Oo,ga),pe(li,li.current)}function au(){ga=Oo.current,we(li),we(Oo)}var rn=Fe(null),En=null;function Ia(e){var t=e.alternate;pe(Tt,Tt.current&1),pe(rn,e),En===null&&(t===null||li.current!==null||t.memoizedState!==null)&&(En=e)}function su(e){pe(Tt,Tt.current),pe(rn,e),En===null&&(En=e)}function Up(e){e.tag===22?(pe(Tt,Tt.current),pe(rn,e),En===null&&(En=e)):Ua()}function Ua(){pe(Tt,Tt.current),pe(rn,rn.current)}function cn(e){we(rn),En===e&&(En=null),we(Tt)}var Tt=Fe(0);function Bo(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||ud(s)||dd(s)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ra=0,Ee=null,et=null,wt=null,Lo=!1,oi=!1,_s=!1,Io=0,cl=0,ri=null,QS=0;function vt(){throw Error(o(321))}function iu(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!ln(e[s],t[s]))return!1;return!0}function lu(e,t,s,l,c,f){return ra=f,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?xm:xu,_s=!1,f=s(l,c),_s=!1,oi&&(f=Vp(t,s,l,c)),zp(e),f}function zp(e){G.H=fl;var t=et!==null&&et.next!==null;if(ra=0,wt=et=Ee=null,Lo=!1,cl=0,ri=null,t)throw Error(o(300));e===null||Nt||(e=e.dependencies,e!==null&&ko(e)&&(Nt=!0))}function Vp(e,t,s,l){Ee=e;var c=0;do{if(oi&&(ri=null),cl=0,oi=!1,25<=c)throw Error(o(301));if(c+=1,wt=et=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}G.H=_m,f=t(s,l)}while(oi);return f}function WS(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?ul(t):t,e=e.useState()[0],(et!==null?et.memoizedState:null)!==e&&(Ee.flags|=1024),t}function ou(){var e=Io!==0;return Io=0,e}function ru(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function cu(e){if(Lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lo=!1}ra=0,wt=et=Ee=null,oi=!1,cl=Io=0,ri=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Ee.memoizedState=wt=e:wt=wt.next=e,wt}function Et(){if(et===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=et.next;var t=wt===null?Ee.memoizedState:wt.next;if(t!==null)wt=t,et=e;else{if(e===null)throw Ee.alternate===null?Error(o(467)):Error(o(310));et=e,e={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},wt===null?Ee.memoizedState=wt=e:wt=wt.next=e}return wt}function Uo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ul(e){var t=cl;return cl+=1,ri===null&&(ri=[]),e=jp(ri,e,t),t=Ee,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?xm:xu),e}function zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ul(e);if(e.$$typeof===j)return Ht(e)}throw Error(o(438,String(e)))}function uu(e){var t=null,s=Ee.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var l=Ee.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=Uo(),Ee.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),l=0;l<e;l++)s[l]=ee;return t.index++,s}function ca(e,t){return typeof t=="function"?t(e):t}function Vo(e){var t=Et();return du(t,et,e)}function du(e,t,s){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=s;var c=e.baseQueue,f=l.pending;if(f!==null){if(c!==null){var b=c.next;c.next=f.next,f.next=b}t.baseQueue=c=f,l.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var _=b=null,N=null,I=t,$=!1;do{var Q=I.lane&-536870913;if(Q!==I.lane?(Re&Q)===Q:(ra&Q)===Q){var z=I.revertLane;if(z===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),Q===ni&&($=!0);else if((ra&z)===z){I=I.next,z===ni&&($=!0);continue}else Q={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},N===null?(_=N=Q,b=f):N=N.next=Q,Ee.lanes|=z,Ha|=z;Q=I.action,_s&&s(f,Q),f=I.hasEagerState?I.eagerState:s(f,Q)}else z={lane:Q,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},N===null?(_=N=z,b=f):N=N.next=z,Ee.lanes|=Q,Ha|=Q;I=I.next}while(I!==null&&I!==t);if(N===null?b=f:N.next=_,!ln(f,e.memoizedState)&&(Nt=!0,$&&(s=ai,s!==null)))throw s;e.memoizedState=f,e.baseState=b,e.baseQueue=N,l.lastRenderedState=f}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function fu(e){var t=Et(),s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var l=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var b=c=c.next;do f=e(f,b.action),b=b.next;while(b!==c);ln(f,t.memoizedState)||(Nt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,l]}function Hp(e,t,s){var l=Ee,c=Et(),f=Ie;if(f){if(s===void 0)throw Error(o(407));s=s()}else s=t();var b=!ln((et||c).memoizedState,s);if(b&&(c.memoizedState=s,Nt=!0),c=c.queue,mu(Fp.bind(null,l,c,e),[e]),c.getSnapshot!==t||b||wt!==null&&wt.memoizedState.tag&1){if(l.flags|=2048,ci(9,{destroy:void 0},Pp.bind(null,l,c,s,t),null),at===null)throw Error(o(349));f||(ra&127)!==0||Gp(l,t,s)}return s}function Gp(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ee.updateQueue,t===null?(t=Uo(),Ee.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Pp(e,t,s,l){t.value=s,t.getSnapshot=l,$p(t)&&qp(e)}function Fp(e,t,s){return s(function(){$p(t)&&qp(e)})}function $p(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!ln(e,s)}catch{return!0}}function qp(e){var t=hs(e,2);t!==null&&sn(t,e,2)}function hu(e){var t=Kt();if(typeof e=="function"){var s=e;if(e=s(),_s){pt(!0);try{s()}finally{pt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e},t}function Yp(e,t,s,l){return e.baseState=s,du(e,et,typeof l=="function"?l:ca)}function JS(e,t,s,l,c){if(Po(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};G.T!==null?s(!0):f.isTransition=!1,l(f),s=t.pending,s===null?(f.next=t.pending=f,Kp(t,f)):(f.next=s.next,t.pending=s.next=f)}}function Kp(e,t){var s=t.action,l=t.payload,c=e.state;if(t.isTransition){var f=G.T,b={};G.T=b;try{var _=s(c,l),N=G.S;N!==null&&N(b,_),Zp(e,t,_)}catch(I){pu(e,t,I)}finally{f!==null&&b.types!==null&&(f.types=b.types),G.T=f}}else try{f=s(c,l),Zp(e,t,f)}catch(I){pu(e,t,I)}}function Zp(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){Xp(e,t,l)},function(l){return pu(e,t,l)}):Xp(e,t,s)}function Xp(e,t,s){t.status="fulfilled",t.value=s,Qp(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Kp(e,s)))}function pu(e,t,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=s,Qp(t),t=t.next;while(t!==l)}e.action=null}function Qp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Wp(e,t){return t}function Jp(e,t){if(Ie){var s=at.formState;if(s!==null){e:{var l=Ee;if(Ie){if(it){t:{for(var c=it,f=Tn;c.nodeType!==8;){if(!f){c=null;break t}if(c=Cn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){it=Cn(c.nextSibling),l=c.data==="F!";break e}}Ma(l)}l=!1}l&&(t=s[0])}}return s=Kt(),s.memoizedState=s.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wp,lastRenderedState:t},s.queue=l,s=vm.bind(null,Ee,l),l.dispatch=s,l=hu(!1),f=Su.bind(null,Ee,!1,l.queue),l=Kt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,s=JS.bind(null,Ee,c,f,s),c.dispatch=s,l.memoizedState=e,[t,s,!1]}function em(e){var t=Et();return tm(t,et,e)}function tm(e,t,s){if(t=du(e,t,Wp)[0],e=Vo(ca)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ul(t)}catch(b){throw b===si?jo:b}else l=t;t=Et();var c=t.queue,f=c.dispatch;return s!==t.memoizedState&&(Ee.flags|=2048,ci(9,{destroy:void 0},ex.bind(null,c,s),null)),[l,f,e]}function ex(e,t){e.action=t}function nm(e){var t=Et(),s=et;if(s!==null)return tm(t,s,e);Et(),t=t.memoizedState,s=Et();var l=s.queue.dispatch;return s.memoizedState=e,[t,l,!1]}function ci(e,t,s,l){return e={tag:e,create:s,deps:l,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=Uo(),Ee.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,t.lastEffect=e),e}function am(){return Et().memoizedState}function Ho(e,t,s,l){var c=Kt();Ee.flags|=e,c.memoizedState=ci(1|t,{destroy:void 0},s,l===void 0?null:l)}function Go(e,t,s,l){var c=Et();l=l===void 0?null:l;var f=c.memoizedState.inst;et!==null&&l!==null&&iu(l,et.memoizedState.deps)?c.memoizedState=ci(t,f,s,l):(Ee.flags|=e,c.memoizedState=ci(1|t,f,s,l))}function sm(e,t){Ho(8390656,8,e,t)}function mu(e,t){Go(2048,8,e,t)}function tx(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=Uo(),Ee.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function im(e){var t=Et().memoizedState;return tx({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function lm(e,t){return Go(4,2,e,t)}function om(e,t){return Go(4,4,e,t)}function rm(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cm(e,t,s){s=s!=null?s.concat([e]):null,Go(4,4,rm.bind(null,t,e),s)}function gu(){}function um(e,t){var s=Et();t=t===void 0?null:t;var l=s.memoizedState;return t!==null&&iu(t,l[1])?l[0]:(s.memoizedState=[e,t],e)}function dm(e,t){var s=Et();t=t===void 0?null:t;var l=s.memoizedState;if(t!==null&&iu(t,l[1]))return l[0];if(l=e(),_s){pt(!0);try{e()}finally{pt(!1)}}return s.memoizedState=[l,t],l}function yu(e,t,s){return s===void 0||(ra&1073741824)!==0&&(Re&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=fg(),Ee.lanes|=e,Ha|=e,s)}function fm(e,t,s,l){return ln(s,t)?s:li.current!==null?(e=yu(e,s,l),ln(e,t)||(Nt=!0),e):(ra&42)===0||(ra&1073741824)!==0&&(Re&261930)===0?(Nt=!0,e.memoizedState=s):(e=fg(),Ee.lanes|=e,Ha|=e,t)}function hm(e,t,s,l,c){var f=Y.p;Y.p=f!==0&&8>f?f:8;var b=G.T,_={};G.T=_,Su(e,!1,t,s);try{var N=c(),I=G.S;if(I!==null&&I(_,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var $=XS(N,l);dl(e,t,$,fn(e))}else dl(e,t,l,fn(e))}catch(Q){dl(e,t,{then:function(){},status:"rejected",reason:Q},fn())}finally{Y.p=f,b!==null&&_.types!==null&&(b.types=_.types),G.T=b}}function nx(){}function vu(e,t,s,l){if(e.tag!==5)throw Error(o(476));var c=pm(e).queue;hm(e,c,t,Z,s===null?nx:function(){return mm(e),s(l)})}function pm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:Z},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function mm(e){var t=pm(e);t.next===null&&(t=e.alternate.memoizedState),dl(e,t.next.queue,{},fn())}function bu(){return Ht(wl)}function gm(){return Et().memoizedState}function ym(){return Et().memoizedState}function ax(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=fn();e=Ba(s);var l=La(t,e,s);l!==null&&(sn(l,t,s),ll(l,t,s)),t={cache:Kc()},e.payload=t;return}t=t.return}}function sx(e,t,s){var l=fn();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Po(e)?bm(t,s):(s=Ic(e,t,s,l),s!==null&&(sn(s,e,l),Sm(s,t,l)))}function vm(e,t,s){var l=fn();dl(e,t,s,l)}function dl(e,t,s,l){var c={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Po(e))bm(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var b=t.lastRenderedState,_=f(b,s);if(c.hasEagerState=!0,c.eagerState=_,ln(_,b))return To(e,t,c,0),at===null&&_o(),!1}catch{}finally{}if(s=Ic(e,t,c,l),s!==null)return sn(s,e,l),Sm(s,t,l),!0}return!1}function Su(e,t,s,l){if(l={lane:2,revertLane:Wu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Po(e)){if(t)throw Error(o(479))}else t=Ic(e,s,l,2),t!==null&&sn(t,e,2)}function Po(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function bm(e,t){oi=Lo=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Sm(e,t,s){if((s&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,Ch(e,s)}}var fl={readContext:Ht,use:zo,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useLayoutEffect:vt,useInsertionEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useSyncExternalStore:vt,useId:vt,useHostTransitionStatus:vt,useFormState:vt,useActionState:vt,useOptimistic:vt,useMemoCache:vt,useCacheRefresh:vt};fl.useEffectEvent=vt;var xm={readContext:Ht,use:zo,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:sm,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Ho(4194308,4,rm.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Ho(4194308,4,e,t)},useInsertionEffect:function(e,t){Ho(4,2,e,t)},useMemo:function(e,t){var s=Kt();t=t===void 0?null:t;var l=e();if(_s){pt(!0);try{e()}finally{pt(!1)}}return s.memoizedState=[l,t],l},useReducer:function(e,t,s){var l=Kt();if(s!==void 0){var c=s(t);if(_s){pt(!0);try{s(t)}finally{pt(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=sx.bind(null,Ee,e),[l.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:function(e){e=hu(e);var t=e.queue,s=vm.bind(null,Ee,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:gu,useDeferredValue:function(e,t){var s=Kt();return yu(s,e,t)},useTransition:function(){var e=hu(!1);return e=hm.bind(null,Ee,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var l=Ee,c=Kt();if(Ie){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),at===null)throw Error(o(349));(Re&127)!==0||Gp(l,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,sm(Fp.bind(null,l,f,e),[e]),l.flags|=2048,ci(9,{destroy:void 0},Pp.bind(null,l,f,s,t),null),s},useId:function(){var e=Kt(),t=at.identifierPrefix;if(Ie){var s=Pn,l=Gn;s=(l&~(1<<32-xe(l)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Io++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=QS++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:bu,useFormState:Jp,useActionState:Jp,useOptimistic:function(e){var t=Kt();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=Su.bind(null,Ee,!0,s),s.dispatch=t,[e,t]},useMemoCache:uu,useCacheRefresh:function(){return Kt().memoizedState=ax.bind(null,Ee)},useEffectEvent:function(e){var t=Kt(),s={impl:e};return t.memoizedState=s,function(){if((qe&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},xu={readContext:Ht,use:zo,useCallback:um,useContext:Ht,useEffect:mu,useImperativeHandle:cm,useInsertionEffect:lm,useLayoutEffect:om,useMemo:dm,useReducer:Vo,useRef:am,useState:function(){return Vo(ca)},useDebugValue:gu,useDeferredValue:function(e,t){var s=Et();return fm(s,et.memoizedState,e,t)},useTransition:function(){var e=Vo(ca)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:ul(e),t]},useSyncExternalStore:Hp,useId:gm,useHostTransitionStatus:bu,useFormState:em,useActionState:em,useOptimistic:function(e,t){var s=Et();return Yp(s,et,e,t)},useMemoCache:uu,useCacheRefresh:ym};xu.useEffectEvent=im;var _m={readContext:Ht,use:zo,useCallback:um,useContext:Ht,useEffect:mu,useImperativeHandle:cm,useInsertionEffect:lm,useLayoutEffect:om,useMemo:dm,useReducer:fu,useRef:am,useState:function(){return fu(ca)},useDebugValue:gu,useDeferredValue:function(e,t){var s=Et();return et===null?yu(s,e,t):fm(s,et.memoizedState,e,t)},useTransition:function(){var e=fu(ca)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:ul(e),t]},useSyncExternalStore:Hp,useId:gm,useHostTransitionStatus:bu,useFormState:nm,useActionState:nm,useOptimistic:function(e,t){var s=Et();return et!==null?Yp(s,et,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:uu,useCacheRefresh:ym};_m.useEffectEvent=im;function _u(e,t,s,l){t=e.memoizedState,s=s(l,t),s=s==null?t:y({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Tu={enqueueSetState:function(e,t,s){e=e._reactInternals;var l=fn(),c=Ba(l);c.payload=t,s!=null&&(c.callback=s),t=La(e,c,l),t!==null&&(sn(t,e,l),ll(t,e,l))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var l=fn(),c=Ba(l);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=La(e,c,l),t!==null&&(sn(t,e,l),ll(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=fn(),l=Ba(s);l.tag=2,t!=null&&(l.callback=t),t=La(e,l,s),t!==null&&(sn(t,e,s),ll(t,e,s))}};function Tm(e,t,s,l,c,f,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,b):t.prototype&&t.prototype.isPureReactComponent?!Wi(s,l)||!Wi(c,f):!0}function Em(e,t,s,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,l),t.state!==e&&Tu.enqueueReplaceState(t,t.state,null)}function Ts(e,t){var s=t;if("ref"in t){s={};for(var l in t)l!=="ref"&&(s[l]=t[l])}if(e=e.defaultProps){s===t&&(s=y({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}function Cm(e){xo(e)}function Am(e){console.error(e)}function km(e){xo(e)}function Fo(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function wm(e,t,s){try{var l=e.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Eu(e,t,s){return s=Ba(s),s.tag=3,s.payload={element:null},s.callback=function(){Fo(e,t)},s}function Nm(e){return e=Ba(e),e.tag=3,e}function jm(e,t,s,l){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;e.payload=function(){return c(f)},e.callback=function(){wm(t,s,l)}}var b=s.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){wm(t,s,l),typeof c!="function"&&(Ga===null?Ga=new Set([this]):Ga.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}function ix(e,t,s,l,c){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=s.alternate,t!==null&&ti(t,s,c,!0),s=rn.current,s!==null){switch(s.tag){case 31:case 13:return En===null?nr():s.alternate===null&&bt===0&&(bt=3),s.flags&=-257,s.flags|=65536,s.lanes=c,l===Do?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([l]):t.add(l),Zu(e,l,c)),!1;case 22:return s.flags|=65536,l===Do?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([l]):s.add(l)),Zu(e,l,c)),!1}throw Error(o(435,s.tag))}return Zu(e,l,c),nr(),!1}if(Ie)return t=rn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Pc&&(e=Error(o(422),{cause:l}),tl(Sn(e,s)))):(l!==Pc&&(t=Error(o(423),{cause:l}),tl(Sn(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=Sn(l,s),c=Eu(e.stateNode,l,c),eu(e,c),bt!==4&&(bt=2)),!1;var f=Error(o(520),{cause:l});if(f=Sn(f,s),Sl===null?Sl=[f]:Sl.push(f),bt!==4&&(bt=2),t===null)return!0;l=Sn(l,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=Eu(s.stateNode,l,e),eu(s,e),!1;case 1:if(t=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Ga===null||!Ga.has(f))))return s.flags|=65536,c&=-c,s.lanes|=c,c=Nm(c),jm(c,e,s,l),eu(s,c),!1}s=s.return}while(s!==null);return!1}var Cu=Error(o(461)),Nt=!1;function Gt(e,t,s,l){t.child=e===null?Op(t,null,s,l):xs(t,e.child,s,l)}function Dm(e,t,s,l,c){s=s.render;var f=t.ref;if("ref"in l){var b={};for(var _ in l)_!=="ref"&&(b[_]=l[_])}else b=l;return ys(t),l=lu(e,t,s,b,f,c),_=ou(),e!==null&&!Nt?(ru(e,t,c),ua(e,t,c)):(Ie&&_&&Hc(t),t.flags|=1,Gt(e,t,l,c),t.child)}function Mm(e,t,s,l,c){if(e===null){var f=s.type;return typeof f=="function"&&!Uc(f)&&f.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=f,Rm(e,t,f,l,c)):(e=Co(s.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Ru(e,c)){var b=f.memoizedProps;if(s=s.compare,s=s!==null?s:Wi,s(b,l)&&e.ref===t.ref)return ua(e,t,c)}return t.flags|=1,e=sa(f,l),e.ref=t.ref,e.return=t,t.child=e}function Rm(e,t,s,l,c){if(e!==null){var f=e.memoizedProps;if(Wi(f,l)&&e.ref===t.ref)if(Nt=!1,t.pendingProps=l=f,Ru(e,c))(e.flags&131072)!==0&&(Nt=!0);else return t.lanes=e.lanes,ua(e,t,c)}return Au(e,t,s,l,c)}function Om(e,t,s,l){var c=l.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|s:s,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~f}else l=0,t.child=null;return Bm(e,t,f,s,l)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&No(t,f!==null?f.cachePool:null),f!==null?Ip(t,f):nu(),Up(t);else return l=t.lanes=536870912,Bm(e,t,f!==null?f.baseLanes|s:s,s,l)}else f!==null?(No(t,f.cachePool),Ip(t,f),Ua(),t.memoizedState=null):(e!==null&&No(t,null),nu(),Ua());return Gt(e,t,c,s),t.child}function hl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bm(e,t,s,l,c){var f=Xc();return f=f===null?null:{parent:kt._currentValue,pool:f},t.memoizedState={baseLanes:s,cachePool:f},e!==null&&No(t,null),nu(),Up(t),e!==null&&ti(e,t,l,!0),t.childLanes=c,null}function $o(e,t){return t=Yo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Lm(e,t,s){return xs(t,e.child,null,s),e=$o(t,t.pendingProps),e.flags|=2,cn(t),t.memoizedState=null,e}function lx(e,t,s){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ie){if(l.mode==="hidden")return e=$o(t,l),t.lanes=536870912,hl(null,e);if(su(t),(e=it)?(e=Kg(e,Tn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Gn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},s=bp(e),s.return=t,t.child=s,Vt=t,it=null)):e=null,e===null)throw Ma(t);return t.lanes=536870912,null}return $o(t,l)}var f=e.memoizedState;if(f!==null){var b=f.dehydrated;if(su(t),c)if(t.flags&256)t.flags&=-257,t=Lm(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Nt||ti(e,t,s,!1),c=(s&e.childLanes)!==0,Nt||c){if(l=at,l!==null&&(b=Ah(l,s),b!==0&&b!==f.retryLane))throw f.retryLane=b,hs(e,b),sn(l,e,b),Cu;nr(),t=Lm(e,t,s)}else e=f.treeContext,it=Cn(b.nextSibling),Vt=t,Ie=!0,Da=null,Tn=!1,e!==null&&_p(t,e),t=$o(t,l),t.flags|=4096;return t}return e=sa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qo(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function Au(e,t,s,l,c){return ys(t),s=lu(e,t,s,l,void 0,c),l=ou(),e!==null&&!Nt?(ru(e,t,c),ua(e,t,c)):(Ie&&l&&Hc(t),t.flags|=1,Gt(e,t,s,c),t.child)}function Im(e,t,s,l,c,f){return ys(t),t.updateQueue=null,s=Vp(t,l,s,c),zp(e),l=ou(),e!==null&&!Nt?(ru(e,t,f),ua(e,t,f)):(Ie&&l&&Hc(t),t.flags|=1,Gt(e,t,s,f),t.child)}function Um(e,t,s,l,c){if(ys(t),t.stateNode===null){var f=Qs,b=s.contextType;typeof b=="object"&&b!==null&&(f=Ht(b)),f=new s(l,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Tu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},Wc(t),b=s.contextType,f.context=typeof b=="object"&&b!==null?Ht(b):Qs,f.state=t.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(_u(t,s,b,l),f.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(b=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),b!==f.state&&Tu.enqueueReplaceState(f,f.state,null),rl(t,l,f,c),ol(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){f=t.stateNode;var _=t.memoizedProps,N=Ts(s,_);f.props=N;var I=f.context,$=s.contextType;b=Qs,typeof $=="object"&&$!==null&&(b=Ht($));var Q=s.getDerivedStateFromProps;$=typeof Q=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=t.pendingProps!==_,$||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||I!==b)&&Em(t,f,l,b),Oa=!1;var z=t.memoizedState;f.state=z,rl(t,l,f,c),ol(),I=t.memoizedState,_||z!==I||Oa?(typeof Q=="function"&&(_u(t,s,Q,l),I=t.memoizedState),(N=Oa||Tm(t,s,N,l,z,I,b))?($||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=I),f.props=l,f.state=I,f.context=b,l=N):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,Jc(e,t),b=t.memoizedProps,$=Ts(s,b),f.props=$,Q=t.pendingProps,z=f.context,I=s.contextType,N=Qs,typeof I=="object"&&I!==null&&(N=Ht(I)),_=s.getDerivedStateFromProps,(I=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==Q||z!==N)&&Em(t,f,l,N),Oa=!1,z=t.memoizedState,f.state=z,rl(t,l,f,c),ol();var P=t.memoizedState;b!==Q||z!==P||Oa||e!==null&&e.dependencies!==null&&ko(e.dependencies)?(typeof _=="function"&&(_u(t,s,_,l),P=t.memoizedState),($=Oa||Tm(t,s,$,l,z,P,N)||e!==null&&e.dependencies!==null&&ko(e.dependencies))?(I||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,P,N),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,P,N)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=P),f.props=l,f.state=P,f.context=N,l=$):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),l=!1)}return f=l,qo(e,t),l=(t.flags&128)!==0,f||l?(f=t.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&l?(t.child=xs(t,e.child,null,c),t.child=xs(t,null,s,c)):Gt(e,t,s,c),t.memoizedState=f.state,e=t.child):e=ua(e,t,c),e}function zm(e,t,s,l){return ms(),t.flags|=256,Gt(e,t,s,l),t.child}var ku={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wu(e){return{baseLanes:e,cachePool:wp()}}function Nu(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=dn),e}function Vm(e,t,s){var l=t.pendingProps,c=!1,f=(t.flags&128)!==0,b;if((b=f)||(b=e!==null&&e.memoizedState===null?!1:(Tt.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ie){if(c?Ia(t):Ua(),(e=it)?(e=Kg(e,Tn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Gn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},s=bp(e),s.return=t,t.child=s,Vt=t,it=null)):e=null,e===null)throw Ma(t);return dd(e)?t.lanes=32:t.lanes=536870912,null}var _=l.children;return l=l.fallback,c?(Ua(),c=t.mode,_=Yo({mode:"hidden",children:_},c),l=ps(l,c,s,null),_.return=t,l.return=t,_.sibling=l,t.child=_,l=t.child,l.memoizedState=wu(s),l.childLanes=Nu(e,b,s),t.memoizedState=ku,hl(null,l)):(Ia(t),ju(t,_))}var N=e.memoizedState;if(N!==null&&(_=N.dehydrated,_!==null)){if(f)t.flags&256?(Ia(t),t.flags&=-257,t=Du(e,t,s)):t.memoizedState!==null?(Ua(),t.child=e.child,t.flags|=128,t=null):(Ua(),_=l.fallback,c=t.mode,l=Yo({mode:"visible",children:l.children},c),_=ps(_,c,s,null),_.flags|=2,l.return=t,_.return=t,l.sibling=_,t.child=l,xs(t,e.child,null,s),l=t.child,l.memoizedState=wu(s),l.childLanes=Nu(e,b,s),t.memoizedState=ku,t=hl(null,l));else if(Ia(t),dd(_)){if(b=_.nextSibling&&_.nextSibling.dataset,b)var I=b.dgst;b=I,l=Error(o(419)),l.stack="",l.digest=b,tl({value:l,source:null,stack:null}),t=Du(e,t,s)}else if(Nt||ti(e,t,s,!1),b=(s&e.childLanes)!==0,Nt||b){if(b=at,b!==null&&(l=Ah(b,s),l!==0&&l!==N.retryLane))throw N.retryLane=l,hs(e,l),sn(b,e,l),Cu;ud(_)||nr(),t=Du(e,t,s)}else ud(_)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,it=Cn(_.nextSibling),Vt=t,Ie=!0,Da=null,Tn=!1,e!==null&&_p(t,e),t=ju(t,l.children),t.flags|=4096);return t}return c?(Ua(),_=l.fallback,c=t.mode,N=e.child,I=N.sibling,l=sa(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,I!==null?_=sa(I,_):(_=ps(_,c,s,null),_.flags|=2),_.return=t,l.return=t,l.sibling=_,t.child=l,hl(null,l),l=t.child,_=e.child.memoizedState,_===null?_=wu(s):(c=_.cachePool,c!==null?(N=kt._currentValue,c=c.parent!==N?{parent:N,pool:N}:c):c=wp(),_={baseLanes:_.baseLanes|s,cachePool:c}),l.memoizedState=_,l.childLanes=Nu(e,b,s),t.memoizedState=ku,hl(e.child,l)):(Ia(t),s=e.child,e=s.sibling,s=sa(s,{mode:"visible",children:l.children}),s.return=t,s.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=s,t.memoizedState=null,s)}function ju(e,t){return t=Yo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Yo(e,t){return e=on(22,e,null,t),e.lanes=0,e}function Du(e,t,s){return xs(t,e.child,null,s),e=ju(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Hm(e,t,s){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),qc(e.return,t,s)}function Mu(e,t,s,l,c,f){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:c,treeForkCount:f}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=s,b.tailMode=c,b.treeForkCount=f)}function Gm(e,t,s){var l=t.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var b=Tt.current,_=(b&2)!==0;if(_?(b=b&1|2,t.flags|=128):b&=1,pe(Tt,b),Gt(e,t,l,s),l=Ie?el:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hm(e,s,t);else if(e.tag===19)Hm(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&Bo(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),Mu(t,!1,c,s,f,l);break;case"backwards":case"unstable_legacy-backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Bo(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}Mu(t,!0,s,null,f,l);break;case"together":Mu(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ua(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Ha|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(ti(e,t,s,!1),(s&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,s=sa(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=sa(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Ru(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ko(e)))}function ox(e,t,s){switch(t.tag){case 3:Ne(t,t.stateNode.containerInfo),Ra(t,kt,e.memoizedState.cache),ms();break;case 27:case 5:yt(t);break;case 4:Ne(t,t.stateNode.containerInfo);break;case 10:Ra(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,su(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ia(t),t.flags|=128,null):(s&t.child.childLanes)!==0?Vm(e,t,s):(Ia(t),e=ua(e,t,s),e!==null?e.sibling:null);Ia(t);break;case 19:var c=(e.flags&128)!==0;if(l=(s&t.childLanes)!==0,l||(ti(e,t,s,!1),l=(s&t.childLanes)!==0),c){if(l)return Gm(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),pe(Tt,Tt.current),l)break;return null;case 22:return t.lanes=0,Om(e,t,s,t.pendingProps);case 24:Ra(t,kt,e.memoizedState.cache)}return ua(e,t,s)}function Pm(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)Nt=!0;else{if(!Ru(e,s)&&(t.flags&128)===0)return Nt=!1,ox(e,t,s);Nt=(e.flags&131072)!==0}else Nt=!1,Ie&&(t.flags&1048576)!==0&&xp(t,el,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=bs(t.elementType),t.type=e,typeof e=="function")Uc(e)?(l=Ts(e,l),t.tag=1,t=Um(null,t,e,l,s)):(t.tag=0,t=Au(null,t,e,l,s));else{if(e!=null){var c=e.$$typeof;if(c===V){t.tag=11,t=Dm(null,t,e,l,s);break e}else if(c===H){t.tag=14,t=Mm(null,t,e,l,s);break e}}throw t=q(e)||e,Error(o(306,t,""))}}return t;case 0:return Au(e,t,t.type,t.pendingProps,s);case 1:return l=t.type,c=Ts(l,t.pendingProps),Um(e,t,l,c,s);case 3:e:{if(Ne(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var f=t.memoizedState;c=f.element,Jc(e,t),rl(t,l,null,s);var b=t.memoizedState;if(l=b.cache,Ra(t,kt,l),l!==f.cache&&Yc(t,[kt],s,!0),ol(),l=b.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=zm(e,t,l,s);break e}else if(l!==c){c=Sn(Error(o(424)),t),tl(c),t=zm(e,t,l,s);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(it=Cn(e.firstChild),Vt=t,Ie=!0,Da=null,Tn=!0,s=Op(t,null,l,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(ms(),l===c){t=ua(e,t,s);break e}Gt(e,t,l,s)}t=t.child}return t;case 26:return qo(e,t),e===null?(s=ey(t.type,null,t.pendingProps,null))?t.memoizedState=s:Ie||(s=t.type,e=t.pendingProps,l=cr(te.current).createElement(s),l[zt]=t,l[Wt]=e,Pt(l,s,e),Lt(l),t.stateNode=l):t.memoizedState=ey(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return yt(t),e===null&&Ie&&(l=t.stateNode=Qg(t.type,t.pendingProps,te.current),Vt=t,Tn=!0,c=it,qa(t.type)?(fd=c,it=Cn(l.firstChild)):it=c),Gt(e,t,t.pendingProps.children,s),qo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ie&&((c=l=it)&&(l=Ix(l,t.type,t.pendingProps,Tn),l!==null?(t.stateNode=l,Vt=t,it=Cn(l.firstChild),Tn=!1,c=!0):c=!1),c||Ma(t)),yt(t),c=t.type,f=t.pendingProps,b=e!==null?e.memoizedProps:null,l=f.children,od(c,f)?l=null:b!==null&&od(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=lu(e,t,WS,null,null,s),wl._currentValue=c),qo(e,t),Gt(e,t,l,s),t.child;case 6:return e===null&&Ie&&((e=s=it)&&(s=Ux(s,t.pendingProps,Tn),s!==null?(t.stateNode=s,Vt=t,it=null,e=!0):e=!1),e||Ma(t)),null;case 13:return Vm(e,t,s);case 4:return Ne(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=xs(t,null,l,s):Gt(e,t,l,s),t.child;case 11:return Dm(e,t,t.type,t.pendingProps,s);case 7:return Gt(e,t,t.pendingProps,s),t.child;case 8:return Gt(e,t,t.pendingProps.children,s),t.child;case 12:return Gt(e,t,t.pendingProps.children,s),t.child;case 10:return l=t.pendingProps,Ra(t,t.type,l.value),Gt(e,t,l.children,s),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,ys(t),c=Ht(c),l=l(c),t.flags|=1,Gt(e,t,l,s),t.child;case 14:return Mm(e,t,t.type,t.pendingProps,s);case 15:return Rm(e,t,t.type,t.pendingProps,s);case 19:return Gm(e,t,s);case 31:return lx(e,t,s);case 22:return Om(e,t,s,t.pendingProps);case 24:return ys(t),l=Ht(kt),e===null?(c=Xc(),c===null&&(c=at,f=Kc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=s),c=f),t.memoizedState={parent:l,cache:c},Wc(t),Ra(t,kt,c)):((e.lanes&s)!==0&&(Jc(e,t),rl(t,null,null,s),ol()),c=e.memoizedState,f=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ra(t,kt,l)):(l=f.cache,Ra(t,kt,l),l!==c.cache&&Yc(t,[kt],s,!0))),Gt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function da(e){e.flags|=4}function Ou(e,t,s,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(gg())e.flags|=8192;else throw Ss=Do,Qc}else e.flags&=-16777217}function Fm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!iy(t))if(gg())e.flags|=8192;else throw Ss=Do,Qc}function Ko(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Th():536870912,e.lanes|=t,hi|=t)}function pl(e,t){if(!Ie)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=s,t}function rx(e,t,s){var l=t.pendingProps;switch(Gc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return lt(t),null;case 3:return s=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),oa(kt),_e(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ei(t)?da(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Fc())),lt(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(da(t),f!==null?(lt(t),Fm(t,f)):(lt(t),Ou(t,c,null,l,s))):f?f!==e.memoizedState?(da(t),lt(t),Fm(t,f)):(lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&da(t),lt(t),Ou(t,c,e,l,s)),null;case 27:if(ht(t),s=te.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&da(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return lt(t),null}e=Be.current,ei(t)?Tp(t):(e=Qg(c,l,s),t.stateNode=e,da(t))}return lt(t),null;case 5:if(ht(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&da(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return lt(t),null}if(f=Be.current,ei(t))Tp(t);else{var b=cr(te.current);switch(f){case 1:f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=b.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?b.createElement(c,{is:l.is}):b.createElement(c)}}f[zt]=t,f[Wt]=l;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=f;e:switch(Pt(f,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&da(t)}}return lt(t),Ou(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&da(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=te.current,ei(t)){if(e=t.stateNode,s=t.memoizedProps,l=null,c=Vt,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[zt]=t,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||Vg(e.nodeValue,s)),e||Ma(t,!0)}else e=cr(e).createTextNode(l),e[zt]=t,t.stateNode=e}return lt(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(l=ei(t),s!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[zt]=t}else ms(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),e=!1}else s=Fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(cn(t),t):(cn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return lt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ei(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[zt]=t}else ms(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),c=!1}else c=Fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(cn(t),t):(cn(t),null)}return cn(t),(t.flags&128)!==0?(t.lanes=s,t):(s=l!==null,e=e!==null&&e.memoizedState!==null,s&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==c&&(l.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),Ko(t,t.updateQueue),lt(t),null);case 4:return _e(),e===null&&nd(t.stateNode.containerInfo),lt(t),null;case 10:return oa(t.type),lt(t),null;case 19:if(we(Tt),l=t.memoizedState,l===null)return lt(t),null;if(c=(t.flags&128)!==0,f=l.rendering,f===null)if(c)pl(l,!1);else{if(bt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Bo(e),f!==null){for(t.flags|=128,pl(l,!1),e=f.updateQueue,t.updateQueue=e,Ko(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)vp(s,e),s=s.sibling;return pe(Tt,Tt.current&1|2),Ie&&ia(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&J()>Jo&&(t.flags|=128,c=!0,pl(l,!1),t.lanes=4194304)}else{if(!c)if(e=Bo(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Ko(t,e),pl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Ie)return lt(t),null}else 2*J()-l.renderingStartTime>Jo&&s!==536870912&&(t.flags|=128,c=!0,pl(l,!1),t.lanes=4194304);l.isBackwards?(f.sibling=t.child,t.child=f):(e=l.last,e!==null?e.sibling=f:t.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=J(),e.sibling=null,s=Tt.current,pe(Tt,c?s&1|2:s&1),Ie&&ia(t,l.treeForkCount),e):(lt(t),null);case 22:case 23:return cn(t),au(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(s&536870912)!==0&&(t.flags&128)===0&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),s=t.updateQueue,s!==null&&Ko(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==s&&(t.flags|=2048),e!==null&&we(vs),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),oa(kt),lt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function cx(e,t){switch(Gc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(kt),_e(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ht(t),null;case 31:if(t.memoizedState!==null){if(cn(t),t.alternate===null)throw Error(o(340));ms()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(cn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ms()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Tt),null;case 4:return _e(),null;case 10:return oa(t.type),null;case 22:case 23:return cn(t),au(),e!==null&&we(vs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(kt),null;case 25:return null;default:return null}}function $m(e,t){switch(Gc(t),t.tag){case 3:oa(kt),_e();break;case 26:case 27:case 5:ht(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&cn(t);break;case 13:cn(t);break;case 19:we(Tt);break;case 10:oa(t.type);break;case 22:case 23:cn(t),au(),e!==null&&we(vs);break;case 24:oa(kt)}}function ml(e,t){try{var s=t.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var c=l.next;s=c;do{if((s.tag&e)===e){l=void 0;var f=s.create,b=s.inst;l=f(),b.destroy=l}s=s.next}while(s!==c)}}catch(_){We(t,t.return,_)}}function za(e,t,s){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){var b=l.inst,_=b.destroy;if(_!==void 0){b.destroy=void 0,c=t;var N=s,I=_;try{I()}catch($){We(c,N,$)}}}l=l.next}while(l!==f)}}catch($){We(t,t.return,$)}}function qm(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{Lp(t,s)}catch(l){We(e,e.return,l)}}}function Ym(e,t,s){s.props=Ts(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){We(e,t,l)}}function gl(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof s=="function"?e.refCleanup=s(l):s.current=l}}catch(c){We(e,t,c)}}function Fn(e,t){var s=e.ref,l=e.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(c){We(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){We(e,t,c)}else s.current=null}function Km(e){var t=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(c){We(e,e.return,c)}}function Bu(e,t,s){try{var l=e.stateNode;Dx(l,e.type,s,t),l[Wt]=t}catch(c){We(e,e.return,c)}}function Zm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qa(e.type)||e.tag===4}function Lu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&qa(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Iu(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=na));else if(l!==4&&(l===27&&qa(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Iu(e,t,s),e=e.sibling;e!==null;)Iu(e,t,s),e=e.sibling}function Zo(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(l!==4&&(l===27&&qa(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Zo(e,t,s),e=e.sibling;e!==null;)Zo(e,t,s),e=e.sibling}function Xm(e){var t=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Pt(t,l,s),t[zt]=e,t[Wt]=s}catch(f){We(e,e.return,f)}}var fa=!1,jt=!1,Uu=!1,Qm=typeof WeakSet=="function"?WeakSet:Set,It=null;function ux(e,t){if(e=e.containerInfo,id=gr,e=cp(e),Dc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var b=0,_=-1,N=-1,I=0,$=0,Q=e,z=null;t:for(;;){for(var P;Q!==s||c!==0&&Q.nodeType!==3||(_=b+c),Q!==f||l!==0&&Q.nodeType!==3||(N=b+l),Q.nodeType===3&&(b+=Q.nodeValue.length),(P=Q.firstChild)!==null;)z=Q,Q=P;for(;;){if(Q===e)break t;if(z===s&&++I===c&&(_=b),z===f&&++$===l&&(N=b),(P=Q.nextSibling)!==null)break;Q=z,z=Q.parentNode}Q=P}s=_===-1||N===-1?null:{start:_,end:N}}else s=null}s=s||{start:0,end:0}}else s=null;for(ld={focusedElem:e,selectionRange:s},gr=!1,It=t;It!==null;)if(t=It,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,It=e;else for(;It!==null;){switch(t=It,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)c=e[s],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,s=t,c=f.memoizedProps,f=f.memoizedState,l=s.stateNode;try{var re=Ts(s.type,c);e=l.getSnapshotBeforeUpdate(re,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(me){We(s,s.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)cd(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,It=e;break}It=t.return}}function Wm(e,t,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:pa(e,s),l&4&&ml(5,s);break;case 1:if(pa(e,s),l&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(b){We(s,s.return,b)}else{var c=Ts(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){We(s,s.return,b)}}l&64&&qm(s),l&512&&gl(s,s.return);break;case 3:if(pa(e,s),l&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{Lp(e,t)}catch(b){We(s,s.return,b)}}break;case 27:t===null&&l&4&&Xm(s);case 26:case 5:pa(e,s),t===null&&l&4&&Km(s),l&512&&gl(s,s.return);break;case 12:pa(e,s);break;case 31:pa(e,s),l&4&&tg(e,s);break;case 13:pa(e,s),l&4&&ng(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=bx.bind(null,s),zx(e,s))));break;case 22:if(l=s.memoizedState!==null||fa,!l){t=t!==null&&t.memoizedState!==null||jt,c=fa;var f=jt;fa=l,(jt=t)&&!f?ma(e,s,(s.subtreeFlags&8772)!==0):pa(e,s),fa=c,jt=f}break;case 30:break;default:pa(e,s)}}function Jm(e){var t=e.alternate;t!==null&&(e.alternate=null,Jm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ft=null,en=!1;function ha(e,t,s){for(s=s.child;s!==null;)eg(e,t,s),s=s.sibling}function eg(e,t,s){if(Ve&&typeof Ve.onCommitFiberUnmount=="function")try{Ve.onCommitFiberUnmount(ut,s)}catch{}switch(s.tag){case 26:jt||Fn(s,t),ha(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:jt||Fn(s,t);var l=ft,c=en;qa(s.type)&&(ft=s.stateNode,en=!1),ha(e,t,s),Cl(s.stateNode),ft=l,en=c;break;case 5:jt||Fn(s,t);case 6:if(l=ft,c=en,ft=null,ha(e,t,s),ft=l,en=c,ft!==null)if(en)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(s.stateNode)}catch(f){We(s,t,f)}else try{ft.removeChild(s.stateNode)}catch(f){We(s,t,f)}break;case 18:ft!==null&&(en?(e=ft,qg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),xi(e)):qg(ft,s.stateNode));break;case 4:l=ft,c=en,ft=s.stateNode.containerInfo,en=!0,ha(e,t,s),ft=l,en=c;break;case 0:case 11:case 14:case 15:za(2,s,t),jt||za(4,s,t),ha(e,t,s);break;case 1:jt||(Fn(s,t),l=s.stateNode,typeof l.componentWillUnmount=="function"&&Ym(s,t,l)),ha(e,t,s);break;case 21:ha(e,t,s);break;case 22:jt=(l=jt)||s.memoizedState!==null,ha(e,t,s),jt=l;break;default:ha(e,t,s)}}function tg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{xi(e)}catch(s){We(t,t.return,s)}}}function ng(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{xi(e)}catch(s){We(t,t.return,s)}}function dx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Qm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Qm),t;default:throw Error(o(435,e.tag))}}function Xo(e,t){var s=dx(e);t.forEach(function(l){if(!s.has(l)){s.add(l);var c=Sx.bind(null,e,l);l.then(c,c)}})}function tn(e,t){var s=t.deletions;if(s!==null)for(var l=0;l<s.length;l++){var c=s[l],f=e,b=t,_=b;e:for(;_!==null;){switch(_.tag){case 27:if(qa(_.type)){ft=_.stateNode,en=!1;break e}break;case 5:ft=_.stateNode,en=!1;break e;case 3:case 4:ft=_.stateNode.containerInfo,en=!0;break e}_=_.return}if(ft===null)throw Error(o(160));eg(f,b,c),ft=null,en=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ag(t,e),t=t.sibling}var Un=null;function ag(e,t){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),l&4&&(za(3,e,e.return),ml(3,e),za(5,e,e.return));break;case 1:tn(t,e),nn(e),l&512&&(jt||s===null||Fn(s,s.return)),l&64&&fa&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var c=Un;if(tn(t,e),nn(e),l&512&&(jt||s===null||Fn(s,s.return)),l&4){var f=s!==null?s.memoizedState:null;if(l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null){e:{l=e.type,s=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Pi]||f[zt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),Pt(f,l,s),f[zt]=e,Lt(f),l=f;break e;case"link":var b=ay("link","href",c).get(l+(s.href||""));if(b){for(var _=0;_<b.length;_++)if(f=b[_],f.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&f.getAttribute("rel")===(s.rel==null?null:s.rel)&&f.getAttribute("title")===(s.title==null?null:s.title)&&f.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){b.splice(_,1);break t}}f=c.createElement(l),Pt(f,l,s),c.head.appendChild(f);break;case"meta":if(b=ay("meta","content",c).get(l+(s.content||""))){for(_=0;_<b.length;_++)if(f=b[_],f.getAttribute("content")===(s.content==null?null:""+s.content)&&f.getAttribute("name")===(s.name==null?null:s.name)&&f.getAttribute("property")===(s.property==null?null:s.property)&&f.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&f.getAttribute("charset")===(s.charSet==null?null:s.charSet)){b.splice(_,1);break t}}f=c.createElement(l),Pt(f,l,s),c.head.appendChild(f);break;default:throw Error(o(468,l))}f[zt]=e,Lt(f),l=f}e.stateNode=l}else sy(c,e.type,e.stateNode);else e.stateNode=ny(c,l,e.memoizedProps);else f!==l?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,l===null?sy(c,e.type,e.stateNode):ny(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Bu(e,e.memoizedProps,s.memoizedProps)}break;case 27:tn(t,e),nn(e),l&512&&(jt||s===null||Fn(s,s.return)),s!==null&&l&4&&Bu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(tn(t,e),nn(e),l&512&&(jt||s===null||Fn(s,s.return)),e.flags&32){c=e.stateNode;try{Fs(c,"")}catch(re){We(e,e.return,re)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Bu(e,c,s!==null?s.memoizedProps:c)),l&1024&&(Uu=!0);break;case 6:if(tn(t,e),nn(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(re){We(e,e.return,re)}}break;case 3:if(fr=null,c=Un,Un=ur(t.containerInfo),tn(t,e),Un=c,nn(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{xi(t.containerInfo)}catch(re){We(e,e.return,re)}Uu&&(Uu=!1,sg(e));break;case 4:l=Un,Un=ur(e.stateNode.containerInfo),tn(t,e),nn(e),Un=l;break;case 12:tn(t,e),nn(e);break;case 31:tn(t,e),nn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xo(e,l)));break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Wo=J()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xo(e,l)));break;case 22:c=e.memoizedState!==null;var N=s!==null&&s.memoizedState!==null,I=fa,$=jt;if(fa=I||c,jt=$||N,tn(t,e),jt=$,fa=I,nn(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||N||fa||jt||Es(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){N=s=t;try{if(f=N.stateNode,c)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{_=N.stateNode;var Q=N.memoizedProps.style,z=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;_.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(re){We(N,N.return,re)}}}else if(t.tag===6){if(s===null){N=t;try{N.stateNode.nodeValue=c?"":N.memoizedProps}catch(re){We(N,N.return,re)}}}else if(t.tag===18){if(s===null){N=t;try{var P=N.stateNode;c?Yg(P,!0):Yg(N.stateNode,!1)}catch(re){We(N,N.return,re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,Xo(e,s))));break;case 19:tn(t,e),nn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xo(e,l)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var s,l=e.return;l!==null;){if(Zm(l)){s=l;break}l=l.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var c=s.stateNode,f=Lu(e);Zo(e,f,c);break;case 5:var b=s.stateNode;s.flags&32&&(Fs(b,""),s.flags&=-33);var _=Lu(e);Zo(e,_,b);break;case 3:case 4:var N=s.stateNode.containerInfo,I=Lu(e);Iu(e,I,N);break;default:throw Error(o(161))}}catch($){We(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wm(e,t.alternate,t),t=t.sibling}function Es(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:za(4,t,t.return),Es(t);break;case 1:Fn(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&Ym(t,t.return,s),Es(t);break;case 27:Cl(t.stateNode);case 26:case 5:Fn(t,t.return),Es(t);break;case 22:t.memoizedState===null&&Es(t);break;case 30:Es(t);break;default:Es(t)}e=e.sibling}}function ma(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,f=t,b=f.flags;switch(f.tag){case 0:case 11:case 15:ma(c,f,s),ml(4,f);break;case 1:if(ma(c,f,s),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(I){We(l,l.return,I)}if(l=f,c=l.updateQueue,c!==null){var _=l.stateNode;try{var N=c.shared.hiddenCallbacks;if(N!==null)for(c.shared.hiddenCallbacks=null,c=0;c<N.length;c++)Bp(N[c],_)}catch(I){We(l,l.return,I)}}s&&b&64&&qm(f),gl(f,f.return);break;case 27:Xm(f);case 26:case 5:ma(c,f,s),s&&l===null&&b&4&&Km(f),gl(f,f.return);break;case 12:ma(c,f,s);break;case 31:ma(c,f,s),s&&b&4&&tg(c,f);break;case 13:ma(c,f,s),s&&b&4&&ng(c,f);break;case 22:f.memoizedState===null&&ma(c,f,s),gl(f,f.return);break;case 30:break;default:ma(c,f,s)}t=t.sibling}}function zu(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&nl(s))}function Vu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nl(e))}function zn(e,t,s,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ig(e,t,s,l),t=t.sibling}function ig(e,t,s,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:zn(e,t,s,l),c&2048&&ml(9,t);break;case 1:zn(e,t,s,l);break;case 3:zn(e,t,s,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nl(e)));break;case 12:if(c&2048){zn(e,t,s,l),e=t.stateNode;try{var f=t.memoizedProps,b=f.id,_=f.onPostCommit;typeof _=="function"&&_(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){We(t,t.return,N)}}else zn(e,t,s,l);break;case 31:zn(e,t,s,l);break;case 13:zn(e,t,s,l);break;case 23:break;case 22:f=t.stateNode,b=t.alternate,t.memoizedState!==null?f._visibility&2?zn(e,t,s,l):yl(e,t):f._visibility&2?zn(e,t,s,l):(f._visibility|=2,ui(e,t,s,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&zu(b,t);break;case 24:zn(e,t,s,l),c&2048&&Vu(t.alternate,t);break;default:zn(e,t,s,l)}}function ui(e,t,s,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,b=t,_=s,N=l,I=b.flags;switch(b.tag){case 0:case 11:case 15:ui(f,b,_,N,c),ml(8,b);break;case 23:break;case 22:var $=b.stateNode;b.memoizedState!==null?$._visibility&2?ui(f,b,_,N,c):yl(f,b):($._visibility|=2,ui(f,b,_,N,c)),c&&I&2048&&zu(b.alternate,b);break;case 24:ui(f,b,_,N,c),c&&I&2048&&Vu(b.alternate,b);break;default:ui(f,b,_,N,c)}t=t.sibling}}function yl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,l=t,c=l.flags;switch(l.tag){case 22:yl(s,l),c&2048&&zu(l.alternate,l);break;case 24:yl(s,l),c&2048&&Vu(l.alternate,l);break;default:yl(s,l)}t=t.sibling}}var vl=8192;function di(e,t,s){if(e.subtreeFlags&vl)for(e=e.child;e!==null;)lg(e,t,s),e=e.sibling}function lg(e,t,s){switch(e.tag){case 26:di(e,t,s),e.flags&vl&&e.memoizedState!==null&&Qx(s,Un,e.memoizedState,e.memoizedProps);break;case 5:di(e,t,s);break;case 3:case 4:var l=Un;Un=ur(e.stateNode.containerInfo),di(e,t,s),Un=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=vl,vl=16777216,di(e,t,s),vl=l):di(e,t,s));break;default:di(e,t,s)}}function og(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function bl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];It=l,cg(l,e)}og(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)rg(e),e=e.sibling}function rg(e){switch(e.tag){case 0:case 11:case 15:bl(e),e.flags&2048&&za(9,e,e.return);break;case 3:bl(e);break;case 12:bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qo(e)):bl(e);break;default:bl(e)}}function Qo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];It=l,cg(l,e)}og(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:za(8,t,t.return),Qo(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,Qo(t));break;default:Qo(t)}e=e.sibling}}function cg(e,t){for(;It!==null;){var s=It;switch(s.tag){case 0:case 11:case 15:za(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:nl(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,It=l;else e:for(s=e;It!==null;){l=It;var c=l.sibling,f=l.return;if(Jm(l),l===s){It=null;break e}if(c!==null){c.return=f,It=c;break e}It=f}}}var fx={getCacheForType:function(e){var t=Ht(kt),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return Ht(kt).controller.signal}},hx=typeof WeakMap=="function"?WeakMap:Map,qe=0,at=null,je=null,Re=0,Qe=0,un=null,Va=!1,fi=!1,Hu=!1,ga=0,bt=0,Ha=0,Cs=0,Gu=0,dn=0,hi=0,Sl=null,an=null,Pu=!1,Wo=0,ug=0,Jo=1/0,er=null,Ga=null,Rt=0,Pa=null,pi=null,ya=0,Fu=0,$u=null,dg=null,xl=0,qu=null;function fn(){return(qe&2)!==0&&Re!==0?Re&-Re:G.T!==null?Wu():kh()}function fg(){if(dn===0)if((Re&536870912)===0||Ie){var e=Ln;Ln<<=1,(Ln&3932160)===0&&(Ln=262144),dn=e}else dn=536870912;return e=rn.current,e!==null&&(e.flags|=32),dn}function sn(e,t,s){(e===at&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)&&(mi(e,0),Fa(e,Re,dn,!1)),Gi(e,s),((qe&2)===0||e!==at)&&(e===at&&((qe&2)===0&&(Cs|=s),bt===4&&Fa(e,Re,dn,!1)),$n(e))}function hg(e,t,s){if((qe&6)!==0)throw Error(o(327));var l=!s&&(t&127)===0&&(t&e.expiredLanes)===0||Hi(e,t),c=l?gx(e,t):Ku(e,t,!0),f=l;do{if(c===0){fi&&!l&&Fa(e,t,0,!1);break}else{if(s=e.current.alternate,f&&!px(s)){c=Ku(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var _=e;c=Sl;var N=_.current.memoizedState.isDehydrated;if(N&&(mi(_,b).flags|=256),b=Ku(_,b,!1),b!==2){if(Hu&&!N){_.errorRecoveryDisabledLanes|=f,Cs|=f,c=4;break e}f=an,an=c,f!==null&&(an===null?an=f:an.push.apply(an,f))}c=b}if(f=!1,c!==2)continue}}if(c===1){mi(e,0),Fa(e,t,0,!0);break}e:{switch(l=e,f=c,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Fa(l,t,dn,!Va);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=Wo+300-J(),10<c)){if(Fa(l,t,dn,!Va),co(l,0,!0)!==0)break e;ya=t,l.timeoutHandle=Fg(pg.bind(null,l,s,an,er,Pu,t,dn,Cs,hi,Va,f,"Throttled",-0,0),c);break e}pg(l,s,an,er,Pu,t,dn,Cs,hi,Va,f,null,-0,0)}}break}while(!0);$n(e)}function pg(e,t,s,l,c,f,b,_,N,I,$,Q,z,P){if(e.timeoutHandle=-1,Q=t.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:na},lg(t,f,Q);var re=(f&62914560)===f?Wo-J():(f&4194048)===f?ug-J():0;if(re=Wx(Q,re),re!==null){ya=f,e.cancelPendingCommit=re(_g.bind(null,e,t,f,s,l,c,b,_,N,$,Q,null,z,P)),Fa(e,f,b,!I);return}}_g(e,t,f,s,l,c,b,_,N)}function px(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var c=s[l],f=c.getSnapshot;c=c.value;try{if(!ln(f(),c))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Fa(e,t,s,l){t&=~Gu,t&=~Cs,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var f=31-xe(c),b=1<<f;l[f]=-1,c&=~b}s!==0&&Eh(e,s,t)}function tr(){return(qe&6)===0?(_l(0),!1):!0}function Yu(){if(je!==null){if(Qe===0)var e=je.return;else e=je,la=gs=null,cu(e),ii=null,sl=0,e=je;for(;e!==null;)$m(e.alternate,e),e=e.return;je=null}}function mi(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,Ox(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),ya=0,Yu(),at=e,je=s=sa(e.current,null),Re=t,Qe=0,un=null,Va=!1,fi=Hi(e,t),Hu=!1,hi=dn=Gu=Cs=Ha=bt=0,an=Sl=null,Pu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-xe(l),f=1<<c;t|=e[c],l&=~f}return ga=t,_o(),s}function mg(e,t){Ee=null,G.H=fl,t===si||t===jo?(t=Dp(),Qe=3):t===Qc?(t=Dp(),Qe=4):Qe=t===Cu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,un=t,je===null&&(bt=1,Fo(e,Sn(t,e.current)))}function gg(){var e=rn.current;return e===null?!0:(Re&4194048)===Re?En===null:(Re&62914560)===Re||(Re&536870912)!==0?e===En:!1}function yg(){var e=G.H;return G.H=fl,e===null?fl:e}function vg(){var e=G.A;return G.A=fx,e}function nr(){bt=4,Va||(Re&4194048)!==Re&&rn.current!==null||(fi=!0),(Ha&134217727)===0&&(Cs&134217727)===0||at===null||Fa(at,Re,dn,!1)}function Ku(e,t,s){var l=qe;qe|=2;var c=yg(),f=vg();(at!==e||Re!==t)&&(er=null,mi(e,t)),t=!1;var b=bt;e:do try{if(Qe!==0&&je!==null){var _=je,N=un;switch(Qe){case 8:Yu(),b=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(t=!0);var I=Qe;if(Qe=0,un=null,gi(e,_,N,I),s&&fi){b=0;break e}break;default:I=Qe,Qe=0,un=null,gi(e,_,N,I)}}mx(),b=bt;break}catch($){mg(e,$)}while(!0);return t&&e.shellSuspendCounter++,la=gs=null,qe=l,G.H=c,G.A=f,je===null&&(at=null,Re=0,_o()),b}function mx(){for(;je!==null;)bg(je)}function gx(e,t){var s=qe;qe|=2;var l=yg(),c=vg();at!==e||Re!==t?(er=null,Jo=J()+500,mi(e,t)):fi=Hi(e,t);e:do try{if(Qe!==0&&je!==null){t=je;var f=un;t:switch(Qe){case 1:Qe=0,un=null,gi(e,t,f,1);break;case 2:case 9:if(Np(f)){Qe=0,un=null,Sg(t);break}t=function(){Qe!==2&&Qe!==9||at!==e||(Qe=7),$n(e)},f.then(t,t);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:Np(f)?(Qe=0,un=null,Sg(t)):(Qe=0,un=null,gi(e,t,f,7));break;case 5:var b=null;switch(je.tag){case 26:b=je.memoizedState;case 5:case 27:var _=je;if(b?iy(b):_.stateNode.complete){Qe=0,un=null;var N=_.sibling;if(N!==null)je=N;else{var I=_.return;I!==null?(je=I,ar(I)):je=null}break t}}Qe=0,un=null,gi(e,t,f,5);break;case 6:Qe=0,un=null,gi(e,t,f,6);break;case 8:Yu(),bt=6;break e;default:throw Error(o(462))}}yx();break}catch($){mg(e,$)}while(!0);return la=gs=null,G.H=l,G.A=c,qe=s,je!==null?0:(at=null,Re=0,_o(),bt)}function yx(){for(;je!==null&&!ea();)bg(je)}function bg(e){var t=Pm(e.alternate,e,ga);e.memoizedProps=e.pendingProps,t===null?ar(e):je=t}function Sg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=Im(s,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=Im(s,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:cu(t);default:$m(s,t),t=je=vp(t,ga),t=Pm(s,t,ga)}e.memoizedProps=e.pendingProps,t===null?ar(e):je=t}function gi(e,t,s,l){la=gs=null,cu(t),ii=null,sl=0;var c=t.return;try{if(ix(e,c,t,s,Re)){bt=1,Fo(e,Sn(s,e.current)),je=null;return}}catch(f){if(c!==null)throw je=c,f;bt=1,Fo(e,Sn(s,e.current)),je=null;return}t.flags&32768?(Ie||l===1?e=!0:fi||(Re&536870912)!==0?e=!1:(Va=e=!0,(l===2||l===9||l===3||l===6)&&(l=rn.current,l!==null&&l.tag===13&&(l.flags|=16384))),xg(t,e)):ar(t)}function ar(e){var t=e;do{if((t.flags&32768)!==0){xg(t,Va);return}e=t.return;var s=rx(t.alternate,t,ga);if(s!==null){je=s;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);bt===0&&(bt=5)}function xg(e,t){do{var s=cx(e.alternate,e);if(s!==null){s.flags&=32767,je=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=s}while(e!==null);bt=6,je=null}function _g(e,t,s,l,c,f,b,_,N){e.cancelPendingCommit=null;do sr();while(Rt!==0);if((qe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(f=t.lanes|t.childLanes,f|=Lc,X1(e,s,f,b,_,N),e===at&&(je=at=null,Re=0),pi=t,Pa=e,ya=s,Fu=f,$u=c,dg=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,xx(Le,function(){return kg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=G.T,G.T=null,c=Y.p,Y.p=2,b=qe,qe|=4;try{ux(e,t,s)}finally{qe=b,Y.p=c,G.T=l}}Rt=1,Tg(),Eg(),Cg()}}function Tg(){if(Rt===1){Rt=0;var e=Pa,t=pi,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=G.T,G.T=null;var l=Y.p;Y.p=2;var c=qe;qe|=4;try{ag(t,e);var f=ld,b=cp(e.containerInfo),_=f.focusedElem,N=f.selectionRange;if(b!==_&&_&&_.ownerDocument&&rp(_.ownerDocument.documentElement,_)){if(N!==null&&Dc(_)){var I=N.start,$=N.end;if($===void 0&&($=I),"selectionStart"in _)_.selectionStart=I,_.selectionEnd=Math.min($,_.value.length);else{var Q=_.ownerDocument||document,z=Q&&Q.defaultView||window;if(z.getSelection){var P=z.getSelection(),re=_.textContent.length,me=Math.min(N.start,re),nt=N.end===void 0?me:Math.min(N.end,re);!P.extend&&me>nt&&(b=nt,nt=me,me=b);var R=op(_,me),M=op(_,nt);if(R&&M&&(P.rangeCount!==1||P.anchorNode!==R.node||P.anchorOffset!==R.offset||P.focusNode!==M.node||P.focusOffset!==M.offset)){var L=Q.createRange();L.setStart(R.node,R.offset),P.removeAllRanges(),me>nt?(P.addRange(L),P.extend(M.node,M.offset)):(L.setEnd(M.node,M.offset),P.addRange(L))}}}}for(Q=[],P=_;P=P.parentNode;)P.nodeType===1&&Q.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<Q.length;_++){var K=Q[_];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}gr=!!id,ld=id=null}finally{qe=c,Y.p=l,G.T=s}}e.current=t,Rt=2}}function Eg(){if(Rt===2){Rt=0;var e=Pa,t=pi,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=G.T,G.T=null;var l=Y.p;Y.p=2;var c=qe;qe|=4;try{Wm(e,t.alternate,t)}finally{qe=c,Y.p=l,G.T=s}}Rt=3}}function Cg(){if(Rt===4||Rt===3){Rt=0,X();var e=Pa,t=pi,s=ya,l=dg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Rt=5:(Rt=0,pi=Pa=null,Ag(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ga=null),fc(s),t=t.stateNode,Ve&&typeof Ve.onCommitFiberRoot=="function")try{Ve.onCommitFiberRoot(ut,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=G.T,c=Y.p,Y.p=2,G.T=null;try{for(var f=e.onRecoverableError,b=0;b<l.length;b++){var _=l[b];f(_.value,{componentStack:_.stack})}}finally{G.T=t,Y.p=c}}(ya&3)!==0&&sr(),$n(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===qu?xl++:(xl=0,qu=e):xl=0,_l(0)}}function Ag(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,nl(t)))}function sr(){return Tg(),Eg(),Cg(),kg()}function kg(){if(Rt!==5)return!1;var e=Pa,t=Fu;Fu=0;var s=fc(ya),l=G.T,c=Y.p;try{Y.p=32>s?32:s,G.T=null,s=$u,$u=null;var f=Pa,b=ya;if(Rt=0,pi=Pa=null,ya=0,(qe&6)!==0)throw Error(o(331));var _=qe;if(qe|=4,rg(f.current),ig(f,f.current,b,s),qe=_,_l(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot=="function")try{Ve.onPostCommitFiberRoot(ut,f)}catch{}return!0}finally{Y.p=c,G.T=l,Ag(e,t)}}function wg(e,t,s){t=Sn(s,t),t=Eu(e.stateNode,t,2),e=La(e,t,2),e!==null&&(Gi(e,2),$n(e))}function We(e,t,s){if(e.tag===3)wg(e,e,s);else for(;t!==null;){if(t.tag===3){wg(t,e,s);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ga===null||!Ga.has(l))){e=Sn(s,e),s=Nm(2),l=La(t,s,2),l!==null&&(jm(s,l,t,e),Gi(l,2),$n(l));break}}t=t.return}}function Zu(e,t,s){var l=e.pingCache;if(l===null){l=e.pingCache=new hx;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(s)||(Hu=!0,c.add(s),e=vx.bind(null,e,t,s),t.then(e,e))}function vx(e,t,s){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,at===e&&(Re&s)===s&&(bt===4||bt===3&&(Re&62914560)===Re&&300>J()-Wo?(qe&2)===0&&mi(e,0):Gu|=s,hi===Re&&(hi=0)),$n(e)}function Ng(e,t){t===0&&(t=Th()),e=hs(e,t),e!==null&&(Gi(e,t),$n(e))}function bx(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Ng(e,s)}function Sx(e,t){var s=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),Ng(e,s)}function xx(e,t){return Jn(e,t)}var ir=null,yi=null,Xu=!1,lr=!1,Qu=!1,$a=0;function $n(e){e!==yi&&e.next===null&&(yi===null?ir=yi=e:yi=yi.next=e),lr=!0,Xu||(Xu=!0,Tx())}function _l(e,t){if(!Qu&&lr){Qu=!0;do for(var s=!1,l=ir;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var b=l.suspendedLanes,_=l.pingedLanes;f=(1<<31-xe(42|e)+1)-1,f&=c&~(b&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,Rg(l,f))}else f=Re,f=co(l,l===at?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||Hi(l,f)||(s=!0,Rg(l,f));l=l.next}while(s);Qu=!1}}function _x(){jg()}function jg(){lr=Xu=!1;var e=0;$a!==0&&Rx()&&(e=$a);for(var t=J(),s=null,l=ir;l!==null;){var c=l.next,f=Dg(l,t);f===0?(l.next=null,s===null?ir=c:s.next=c,c===null&&(yi=s)):(s=l,(e!==0||(f&3)!==0)&&(lr=!0)),l=c}Rt!==0&&Rt!==5||_l(e),$a!==0&&($a=0)}function Dg(e,t){for(var s=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var b=31-xe(f),_=1<<b,N=c[b];N===-1?((_&s)===0||(_&l)!==0)&&(c[b]=Z1(_,t)):N<=t&&(e.expiredLanes|=_),f&=~_}if(t=at,s=Re,s=co(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===t&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Bn(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Hi(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(l!==null&&Bn(l),fc(s)){case 2:case 8:s=ge;break;case 32:s=Le;break;case 268435456:s=ct;break;default:s=Le}return l=Mg.bind(null,e),s=Jn(s,l),e.callbackPriority=t,e.callbackNode=s,t}return l!==null&&l!==null&&Bn(l),e.callbackPriority=2,e.callbackNode=null,2}function Mg(e,t){if(Rt!==0&&Rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(sr()&&e.callbackNode!==s)return null;var l=Re;return l=co(e,e===at?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(hg(e,l,t),Dg(e,J()),e.callbackNode!=null&&e.callbackNode===s?Mg.bind(null,e):null)}function Rg(e,t){if(sr())return null;hg(e,t,!0)}function Tx(){Bx(function(){(qe&6)!==0?Jn(ve,_x):jg()})}function Wu(){if($a===0){var e=ni;e===0&&(e=At,At<<=1,(At&261888)===0&&(At=256)),$a=e}return $a}function Og(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:po(""+e)}function Bg(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function Ex(e,t,s,l,c){if(t==="submit"&&s&&s.stateNode===c){var f=Og((c[Wt]||null).action),b=l.submitter;b&&(t=(t=b[Wt]||null)?Og(t.formAction):b.getAttribute("formAction"),t!==null&&(f=t,b=null));var _=new vo("action","action",null,l,c);e.push({event:_,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if($a!==0){var N=b?Bg(c,b):new FormData(c);vu(s,{pending:!0,data:N,method:c.method,action:f},null,N)}}else typeof f=="function"&&(_.preventDefault(),N=b?Bg(c,b):new FormData(c),vu(s,{pending:!0,data:N,method:c.method,action:f},f,N))},currentTarget:c}]})}}for(var Ju=0;Ju<Bc.length;Ju++){var ed=Bc[Ju],Cx=ed.toLowerCase(),Ax=ed[0].toUpperCase()+ed.slice(1);In(Cx,"on"+Ax)}In(fp,"onAnimationEnd"),In(hp,"onAnimationIteration"),In(pp,"onAnimationStart"),In("dblclick","onDoubleClick"),In("focusin","onFocus"),In("focusout","onBlur"),In(GS,"onTransitionRun"),In(PS,"onTransitionStart"),In(FS,"onTransitionCancel"),In(mp,"onTransitionEnd"),Gs("onMouseEnter",["mouseout","mouseover"]),Gs("onMouseLeave",["mouseout","mouseover"]),Gs("onPointerEnter",["pointerout","pointerover"]),Gs("onPointerLeave",["pointerout","pointerover"]),cs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),cs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),cs("onBeforeInput",["compositionend","keypress","textInput","paste"]),cs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),cs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),cs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tl="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(" "),kx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Tl));function Lg(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],c=l.event;l=l.listeners;e:{var f=void 0;if(t)for(var b=l.length-1;0<=b;b--){var _=l[b],N=_.instance,I=_.currentTarget;if(_=_.listener,N!==f&&c.isPropagationStopped())break e;f=_,c.currentTarget=I;try{f(c)}catch($){xo($)}c.currentTarget=null,f=N}else for(b=0;b<l.length;b++){if(_=l[b],N=_.instance,I=_.currentTarget,_=_.listener,N!==f&&c.isPropagationStopped())break e;f=_,c.currentTarget=I;try{f(c)}catch($){xo($)}c.currentTarget=null,f=N}}}}function De(e,t){var s=t[hc];s===void 0&&(s=t[hc]=new Set);var l=e+"__bubble";s.has(l)||(Ig(t,e,2,!1),s.add(l))}function td(e,t,s){var l=0;t&&(l|=4),Ig(s,e,l,t)}var or="_reactListening"+Math.random().toString(36).slice(2);function nd(e){if(!e[or]){e[or]=!0,jh.forEach(function(s){s!=="selectionchange"&&(kx.has(s)||td(s,!1,e),td(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[or]||(t[or]=!0,td("selectionchange",!1,t))}}function Ig(e,t,s,l){switch(fy(t)){case 2:var c=t_;break;case 8:c=n_;break;default:c=yd}s=c.bind(null,t,s,e),c=void 0,!_c||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function ad(e,t,s,l,c){var f=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var _=l.stateNode.containerInfo;if(_===c)break;if(b===4)for(b=l.return;b!==null;){var N=b.tag;if((N===3||N===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;_!==null;){if(b=zs(_),b===null)return;if(N=b.tag,N===5||N===6||N===26||N===27){l=f=b;continue e}_=_.parentNode}}l=l.return}Gh(function(){var I=f,$=Sc(s),Q=[];e:{var z=gp.get(e);if(z!==void 0){var P=vo,re=e;switch(e){case"keypress":if(go(s)===0)break e;case"keydown":case"keyup":P=SS;break;case"focusin":re="focus",P=Ac;break;case"focusout":re="blur",P=Ac;break;case"beforeblur":case"afterblur":P=Ac;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=$h;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=rS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=TS;break;case fp:case hp:case pp:P=dS;break;case mp:P=CS;break;case"scroll":case"scrollend":P=lS;break;case"wheel":P=kS;break;case"copy":case"cut":case"paste":P=hS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Yh;break;case"toggle":case"beforetoggle":P=NS}var me=(t&4)!==0,nt=!me&&(e==="scroll"||e==="scrollend"),R=me?z!==null?z+"Capture":null:z;me=[];for(var M=I,L;M!==null;){var K=M;if(L=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||L===null||R===null||(K=$i(M,R),K!=null&&me.push(El(M,K,L))),nt)break;M=M.return}0<me.length&&(z=new P(z,re,null,s,$),Q.push({event:z,listeners:me}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",z&&s!==bc&&(re=s.relatedTarget||s.fromElement)&&(zs(re)||re[Us]))break e;if((P||z)&&(z=$.window===$?$:(z=$.ownerDocument)?z.defaultView||z.parentWindow:window,P?(re=s.relatedTarget||s.toElement,P=I,re=re?zs(re):null,re!==null&&(nt=d(re),me=re.tag,re!==nt||me!==5&&me!==27&&me!==6)&&(re=null)):(P=null,re=I),P!==re)){if(me=$h,K="onMouseLeave",R="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(me=Yh,K="onPointerLeave",R="onPointerEnter",M="pointer"),nt=P==null?z:Fi(P),L=re==null?z:Fi(re),z=new me(K,M+"leave",P,s,$),z.target=nt,z.relatedTarget=L,K=null,zs($)===I&&(me=new me(R,M+"enter",re,s,$),me.target=L,me.relatedTarget=nt,K=me),nt=K,P&&re)t:{for(me=wx,R=P,M=re,L=0,K=R;K;K=me(K))L++;K=0;for(var fe=M;fe;fe=me(fe))K++;for(;0<L-K;)R=me(R),L--;for(;0<K-L;)M=me(M),K--;for(;L--;){if(R===M||M!==null&&R===M.alternate){me=R;break t}R=me(R),M=me(M)}me=null}else me=null;P!==null&&Ug(Q,z,P,me,!1),re!==null&&nt!==null&&Ug(Q,nt,re,me,!0)}}e:{if(z=I?Fi(I):window,P=z.nodeName&&z.nodeName.toLowerCase(),P==="select"||P==="input"&&z.type==="file")var He=tp;else if(Jh(z))if(np)He=zS;else{He=IS;var de=LS}else P=z.nodeName,!P||P.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?I&&vc(I.elementType)&&(He=tp):He=US;if(He&&(He=He(e,I))){ep(Q,He,s,$);break e}de&&de(e,z,I),e==="focusout"&&I&&z.type==="number"&&I.memoizedProps.value!=null&&yc(z,"number",z.value)}switch(de=I?Fi(I):window,e){case"focusin":(Jh(de)||de.contentEditable==="true")&&(Ks=de,Mc=I,Ji=null);break;case"focusout":Ji=Mc=Ks=null;break;case"mousedown":Rc=!0;break;case"contextmenu":case"mouseup":case"dragend":Rc=!1,up(Q,s,$);break;case"selectionchange":if(HS)break;case"keydown":case"keyup":up(Q,s,$)}var Ae;if(wc)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Ys?Qh(e,s)&&(Oe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Oe="onCompositionStart");Oe&&(Kh&&s.locale!=="ko"&&(Ys||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Ys&&(Ae=Ph()):(Na=$,Tc="value"in Na?Na.value:Na.textContent,Ys=!0)),de=rr(I,Oe),0<de.length&&(Oe=new qh(Oe,e,null,s,$),Q.push({event:Oe,listeners:de}),Ae?Oe.data=Ae:(Ae=Wh(s),Ae!==null&&(Oe.data=Ae)))),(Ae=DS?MS(e,s):RS(e,s))&&(Oe=rr(I,"onBeforeInput"),0<Oe.length&&(de=new qh("onBeforeInput","beforeinput",null,s,$),Q.push({event:de,listeners:Oe}),de.data=Ae)),Ex(Q,e,I,s,$)}Lg(Q,t)})}function El(e,t,s){return{instance:e,listener:t,currentTarget:s}}function rr(e,t){for(var s=t+"Capture",l=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=$i(e,s),c!=null&&l.unshift(El(e,c,f)),c=$i(e,t),c!=null&&l.push(El(e,c,f))),e.tag===3)return l;e=e.return}return[]}function wx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ug(e,t,s,l,c){for(var f=t._reactName,b=[];s!==null&&s!==l;){var _=s,N=_.alternate,I=_.stateNode;if(_=_.tag,N!==null&&N===l)break;_!==5&&_!==26&&_!==27||I===null||(N=I,c?(I=$i(s,f),I!=null&&b.unshift(El(s,I,N))):c||(I=$i(s,f),I!=null&&b.push(El(s,I,N)))),s=s.return}b.length!==0&&e.push({event:t,listeners:b})}var Nx=/\r\n?/g,jx=/\u0000|\uFFFD/g;function zg(e){return(typeof e=="string"?e:""+e).replace(Nx,`
25
- `).replace(jx,"")}function Vg(e,t){return t=zg(t),zg(e)===t}function tt(e,t,s,l,c,f){switch(s){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Fs(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Fs(e,""+l);break;case"className":fo(e,"class",l);break;case"tabIndex":fo(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":fo(e,s,l);break;case"style":Vh(e,l,f);break;case"data":if(t!=="object"){fo(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=po(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(s==="formAction"?(t!=="input"&&tt(e,t,"name",c.name,c,null),tt(e,t,"formEncType",c.formEncType,c,null),tt(e,t,"formMethod",c.formMethod,c,null),tt(e,t,"formTarget",c.formTarget,c,null)):(tt(e,t,"encType",c.encType,c,null),tt(e,t,"method",c.method,c,null),tt(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=po(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=na);break;case"onScroll":l!=null&&De("scroll",e);break;case"onScrollEnd":l!=null&&De("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}s=po(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""+l):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":De("beforetoggle",e),De("toggle",e),uo(e,"popover",l);break;case"xlinkActuate":ta(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ta(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":ta(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ta(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ta(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ta(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ta(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ta(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ta(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":uo(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=sS.get(s)||s,uo(e,s,l))}}function sd(e,t,s,l,c,f){switch(s){case"style":Vh(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"children":typeof l=="string"?Fs(e,l):(typeof l=="number"||typeof l=="bigint")&&Fs(e,""+l);break;case"onScroll":l!=null&&De("scroll",e);break;case"onScrollEnd":l!=null&&De("scrollend",e);break;case"onClick":l!=null&&(e.onclick=na);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Dh.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),t=s.slice(2,c?s.length-7:void 0),f=e[Wt]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,l,c);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):uo(e,s,l)}}}function Pt(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("load",e);var l=!1,c=!1,f;for(f in s)if(s.hasOwnProperty(f)){var b=s[f];if(b!=null)switch(f){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:tt(e,t,f,b,s,null)}}c&&tt(e,t,"srcSet",s.srcSet,s,null),l&&tt(e,t,"src",s.src,s,null);return;case"input":De("invalid",e);var _=f=b=c=null,N=null,I=null;for(l in s)if(s.hasOwnProperty(l)){var $=s[l];if($!=null)switch(l){case"name":c=$;break;case"type":b=$;break;case"checked":N=$;break;case"defaultChecked":I=$;break;case"value":f=$;break;case"defaultValue":_=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(o(137,t));break;default:tt(e,t,l,$,s,null)}}Lh(e,f,_,N,I,b,c,!1);return;case"select":De("invalid",e),l=b=f=null;for(c in s)if(s.hasOwnProperty(c)&&(_=s[c],_!=null))switch(c){case"value":f=_;break;case"defaultValue":b=_;break;case"multiple":l=_;default:tt(e,t,c,_,s,null)}t=f,s=b,e.multiple=!!l,t!=null?Ps(e,!!l,t,!1):s!=null&&Ps(e,!!l,s,!0);return;case"textarea":De("invalid",e),f=c=l=null;for(b in s)if(s.hasOwnProperty(b)&&(_=s[b],_!=null))switch(b){case"value":l=_;break;case"defaultValue":c=_;break;case"children":f=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(91));break;default:tt(e,t,b,_,s,null)}Uh(e,l,c,f);return;case"option":for(N in s)if(s.hasOwnProperty(N)&&(l=s[N],l!=null))switch(N){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:tt(e,t,N,l,s,null)}return;case"dialog":De("beforetoggle",e),De("toggle",e),De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(l=0;l<Tl.length;l++)De(Tl[l],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in s)if(s.hasOwnProperty(I)&&(l=s[I],l!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:tt(e,t,I,l,s,null)}return;default:if(vc(t)){for($ in s)s.hasOwnProperty($)&&(l=s[$],l!==void 0&&sd(e,t,$,l,s,void 0));return}}for(_ in s)s.hasOwnProperty(_)&&(l=s[_],l!=null&&tt(e,t,_,l,s,null))}function Dx(e,t,s,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,b=null,_=null,N=null,I=null,$=null;for(P in s){var Q=s[P];if(s.hasOwnProperty(P)&&Q!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":N=Q;default:l.hasOwnProperty(P)||tt(e,t,P,null,l,Q)}}for(var z in l){var P=l[z];if(Q=s[z],l.hasOwnProperty(z)&&(P!=null||Q!=null))switch(z){case"type":f=P;break;case"name":c=P;break;case"checked":I=P;break;case"defaultChecked":$=P;break;case"value":b=P;break;case"defaultValue":_=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:P!==Q&&tt(e,t,z,P,l,Q)}}gc(e,b,_,N,I,$,f,c);return;case"select":P=b=_=z=null;for(f in s)if(N=s[f],s.hasOwnProperty(f)&&N!=null)switch(f){case"value":break;case"multiple":P=N;default:l.hasOwnProperty(f)||tt(e,t,f,null,l,N)}for(c in l)if(f=l[c],N=s[c],l.hasOwnProperty(c)&&(f!=null||N!=null))switch(c){case"value":z=f;break;case"defaultValue":_=f;break;case"multiple":b=f;default:f!==N&&tt(e,t,c,f,l,N)}t=_,s=b,l=P,z!=null?Ps(e,!!s,z,!1):!!l!=!!s&&(t!=null?Ps(e,!!s,t,!0):Ps(e,!!s,s?[]:"",!1));return;case"textarea":P=z=null;for(_ in s)if(c=s[_],s.hasOwnProperty(_)&&c!=null&&!l.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:tt(e,t,_,null,l,c)}for(b in l)if(c=l[b],f=s[b],l.hasOwnProperty(b)&&(c!=null||f!=null))switch(b){case"value":z=c;break;case"defaultValue":P=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==f&&tt(e,t,b,c,l,f)}Ih(e,z,P);return;case"option":for(var re in s)if(z=s[re],s.hasOwnProperty(re)&&z!=null&&!l.hasOwnProperty(re))switch(re){case"selected":e.selected=!1;break;default:tt(e,t,re,null,l,z)}for(N in l)if(z=l[N],P=s[N],l.hasOwnProperty(N)&&z!==P&&(z!=null||P!=null))switch(N){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:tt(e,t,N,z,l,P)}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 me in s)z=s[me],s.hasOwnProperty(me)&&z!=null&&!l.hasOwnProperty(me)&&tt(e,t,me,null,l,z);for(I in l)if(z=l[I],P=s[I],l.hasOwnProperty(I)&&z!==P&&(z!=null||P!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:tt(e,t,I,z,l,P)}return;default:if(vc(t)){for(var nt in s)z=s[nt],s.hasOwnProperty(nt)&&z!==void 0&&!l.hasOwnProperty(nt)&&sd(e,t,nt,void 0,l,z);for($ in l)z=l[$],P=s[$],!l.hasOwnProperty($)||z===P||z===void 0&&P===void 0||sd(e,t,$,z,l,P);return}}for(var R in s)z=s[R],s.hasOwnProperty(R)&&z!=null&&!l.hasOwnProperty(R)&&tt(e,t,R,null,l,z);for(Q in l)z=l[Q],P=s[Q],!l.hasOwnProperty(Q)||z===P||z==null&&P==null||tt(e,t,Q,z,l,P)}function Hg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Mx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),l=0;l<s.length;l++){var c=s[l],f=c.transferSize,b=c.initiatorType,_=c.duration;if(f&&_&&Hg(b)){for(b=0,_=c.responseEnd,l+=1;l<s.length;l++){var N=s[l],I=N.startTime;if(I>_)break;var $=N.transferSize,Q=N.initiatorType;$&&Hg(Q)&&(N=N.responseEnd,b+=$*(N<_?1:(_-I)/(N-I)))}if(--l,t+=8*(f+b)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var id=null,ld=null;function cr(e){return e.nodeType===9?e:e.ownerDocument}function Gg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Pg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function od(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var rd=null;function Rx(){var e=window.event;return e&&e.type==="popstate"?e===rd?!1:(rd=e,!0):(rd=null,!1)}var Fg=typeof setTimeout=="function"?setTimeout:void 0,Ox=typeof clearTimeout=="function"?clearTimeout:void 0,$g=typeof Promise=="function"?Promise:void 0,Bx=typeof queueMicrotask=="function"?queueMicrotask:typeof $g<"u"?function(e){return $g.resolve(null).then(e).catch(Lx)}:Fg;function Lx(e){setTimeout(function(){throw e})}function qa(e){return e==="head"}function qg(e,t){var s=t,l=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"||s==="/&"){if(l===0){e.removeChild(c),xi(t);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")Cl(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Cl(s);for(var f=s.firstChild;f;){var b=f.nextSibling,_=f.nodeName;f[Pi]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=b}}else s==="body"&&Cl(e.ownerDocument.body);s=c}while(s);xi(t)}function Yg(e,t){var s=e;e=0;do{var l=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),l&&l.nodeType===8)if(s=l.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=l}while(s)}function cd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":cd(s),pc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function Ix(e,t,s,l){for(;e.nodeType===1;){var c=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Pi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Cn(e.nextSibling),e===null)break}return null}function Ux(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Cn(e.nextSibling),e===null))return null;return e}function Kg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Cn(e.nextSibling),e===null))return null;return e}function ud(e){return e.data==="$?"||e.data==="$~"}function dd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function zx(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var l=function(){t(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Cn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var fd=null;function Zg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return Cn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function Xg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function Qg(e,t,s){switch(t=cr(s),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Cl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pc(e)}var An=new Map,Wg=new Set;function ur(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var va=Y.d;Y.d={f:Vx,r:Hx,D:Gx,C:Px,L:Fx,m:$x,X:Yx,S:qx,M:Kx};function Vx(){var e=va.f(),t=tr();return e||t}function Hx(e){var t=Vs(e);t!==null&&t.tag===5&&t.type==="form"?mm(t):va.r(e)}var vi=typeof document>"u"?null:document;function Jg(e,t,s){var l=vi;if(l&&typeof t=="string"&&t){var c=vn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),Wg.has(c)||(Wg.add(c),e={rel:e,crossOrigin:s,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),Pt(t,"link",e),Lt(t),l.head.appendChild(t)))}}function Gx(e){va.D(e),Jg("dns-prefetch",e,null)}function Px(e,t){va.C(e,t),Jg("preconnect",e,t)}function Fx(e,t,s){va.L(e,t,s);var l=vi;if(l&&e&&t){var c='link[rel="preload"][as="'+vn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+vn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+vn(s.imageSizes)+'"]')):c+='[href="'+vn(e)+'"]';var f=c;switch(t){case"style":f=bi(e);break;case"script":f=Si(e)}An.has(f)||(e=y({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),An.set(f,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Al(f))||t==="script"&&l.querySelector(kl(f))||(t=l.createElement("link"),Pt(t,"link",e),Lt(t),l.head.appendChild(t)))}}function $x(e,t){va.m(e,t);var s=vi;if(s&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+vn(l)+'"][href="'+vn(e)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Si(e)}if(!An.has(f)&&(e=y({rel:"modulepreload",href:e},t),An.set(f,e),s.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(kl(f)))return}l=s.createElement("link"),Pt(l,"link",e),Lt(l),s.head.appendChild(l)}}}function qx(e,t,s){va.S(e,t,s);var l=vi;if(l&&e){var c=Hs(l).hoistableStyles,f=bi(e);t=t||"default";var b=c.get(f);if(!b){var _={loading:0,preload:null};if(b=l.querySelector(Al(f)))_.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},s),(s=An.get(f))&&hd(e,s);var N=b=l.createElement("link");Lt(N),Pt(N,"link",e),N._p=new Promise(function(I,$){N.onload=I,N.onerror=$}),N.addEventListener("load",function(){_.loading|=1}),N.addEventListener("error",function(){_.loading|=2}),_.loading|=4,dr(b,t,l)}b={type:"stylesheet",instance:b,count:1,state:_},c.set(f,b)}}}function Yx(e,t){va.X(e,t);var s=vi;if(s&&e){var l=Hs(s).hoistableScripts,c=Si(e),f=l.get(c);f||(f=s.querySelector(kl(c)),f||(e=y({src:e,async:!0},t),(t=An.get(c))&&pd(e,t),f=s.createElement("script"),Lt(f),Pt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Kx(e,t){va.M(e,t);var s=vi;if(s&&e){var l=Hs(s).hoistableScripts,c=Si(e),f=l.get(c);f||(f=s.querySelector(kl(c)),f||(e=y({src:e,async:!0,type:"module"},t),(t=An.get(c))&&pd(e,t),f=s.createElement("script"),Lt(f),Pt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function ey(e,t,s,l){var c=(c=te.current)?ur(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=bi(s.href),s=Hs(c).hoistableStyles,l=s.get(t),l||(l={type:"style",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=bi(s.href);var f=Hs(c).hoistableStyles,b=f.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,b),(f=c.querySelector(Al(e)))&&!f._p&&(b.instance=f,b.state.loading=5),An.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},An.set(e,s),f||Zx(c,e,s,b.state))),t&&l===null)throw Error(o(528,""));return b}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Si(s),s=Hs(c).hoistableScripts,l=s.get(t),l||(l={type:"script",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function bi(e){return'href="'+vn(e)+'"'}function Al(e){return'link[rel="stylesheet"]['+e+"]"}function ty(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Zx(e,t,s,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Pt(t,"link",s),Lt(t),e.head.appendChild(t))}function Si(e){return'[src="'+vn(e)+'"]'}function kl(e){return"script[async]"+e}function ny(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+vn(s.href)+'"]');if(l)return t.instance=l,Lt(l),l;var c=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Lt(l),Pt(l,"style",c),dr(l,s.precedence,e),t.instance=l;case"stylesheet":c=bi(s.href);var f=e.querySelector(Al(c));if(f)return t.state.loading|=4,t.instance=f,Lt(f),f;l=ty(s),(c=An.get(c))&&hd(l,c),f=(e.ownerDocument||e).createElement("link"),Lt(f);var b=f;return b._p=new Promise(function(_,N){b.onload=_,b.onerror=N}),Pt(f,"link",l),t.state.loading|=4,dr(f,s.precedence,e),t.instance=f;case"script":return f=Si(s.src),(c=e.querySelector(kl(f)))?(t.instance=c,Lt(c),c):(l=s,(c=An.get(f))&&(l=y({},s),pd(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Lt(c),Pt(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,dr(l,s.precedence,e));return t.instance}function dr(e,t,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,f=c,b=0;b<l.length;b++){var _=l[b];if(_.dataset.precedence===t)f=_;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function hd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function pd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var fr=null;function ay(e,t,s){if(fr===null){var l=new Map,c=fr=new Map;c.set(s,l)}else c=fr,l=c.get(s),l||(l=new Map,c.set(s,l));if(l.has(e))return l;for(l.set(e,null),s=s.getElementsByTagName(e),c=0;c<s.length;c++){var f=s[c];if(!(f[Pi]||f[zt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(t)||"";b=e+b;var _=l.get(b);_?_.push(f):l.set(b,[f])}}return l}function sy(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function Xx(e,t,s){if(s===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function iy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Qx(e,t,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var c=bi(l.href),f=t.querySelector(Al(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=hr.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=f,Lt(f);return}f=t.ownerDocument||t,l=ty(l),(c=An.get(c))&&hd(l,c),f=f.createElement("link"),Lt(f);var b=f;b._p=new Promise(function(_,N){b.onload=_,b.onerror=N}),Pt(f,"link",l),s.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=hr.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var md=0;function Wx(e,t){return e.stylesheets&&e.count===0&&mr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var l=setTimeout(function(){if(e.stylesheets&&mr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&md===0&&(md=62500*Mx());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&mr(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>md?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function hr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pr=null;function mr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pr=new Map,t.forEach(Jx,e),pr=null,hr.call(e))}function Jx(e,t){if(!(t.state.loading&4)){var s=pr.get(e);if(s)var l=s.get(null);else{s=new Map,pr.set(e,s);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var b=c[f];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(s.set(b.dataset.precedence,b),l=b)}l&&s.set(null,l)}c=t.instance,b=c.getAttribute("data-precedence"),f=s.get(b)||l,f===l&&s.set(null,c),s.set(b,c),this.count++,l=hr.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var wl={$$typeof:j,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function e_(e,t,s,l,c,f,b,_,N){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=uc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uc(0),this.hiddenUpdates=uc(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function ly(e,t,s,l,c,f,b,_,N,I,$,Q){return e=new e_(e,t,s,b,N,I,$,Q,_),t=1,f===!0&&(t|=24),f=on(3,null,null,t),e.current=f,f.stateNode=e,t=Kc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:s,cache:t},Wc(f),e}function oy(e){return e?(e=Qs,e):Qs}function ry(e,t,s,l,c,f){c=oy(c),l.context===null?l.context=c:l.pendingContext=c,l=Ba(t),l.payload={element:s},f=f===void 0?null:f,f!==null&&(l.callback=f),s=La(e,l,t),s!==null&&(sn(s,e,t),ll(s,e,t))}function cy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function gd(e,t){cy(e,t),(e=e.alternate)&&cy(e,t)}function uy(e){if(e.tag===13||e.tag===31){var t=hs(e,67108864);t!==null&&sn(t,e,67108864),gd(e,67108864)}}function dy(e){if(e.tag===13||e.tag===31){var t=fn();t=dc(t);var s=hs(e,t);s!==null&&sn(s,e,t),gd(e,t)}}var gr=!0;function t_(e,t,s,l){var c=G.T;G.T=null;var f=Y.p;try{Y.p=2,yd(e,t,s,l)}finally{Y.p=f,G.T=c}}function n_(e,t,s,l){var c=G.T;G.T=null;var f=Y.p;try{Y.p=8,yd(e,t,s,l)}finally{Y.p=f,G.T=c}}function yd(e,t,s,l){if(gr){var c=vd(l);if(c===null)ad(e,t,l,yr,s),hy(e,l);else if(s_(c,e,t,s,l))l.stopPropagation();else if(hy(e,l),t&4&&-1<a_.indexOf(e)){for(;c!==null;){var f=Vs(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=rs(f.pendingLanes);if(b!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;b;){var N=1<<31-xe(b);_.entanglements[1]|=N,b&=~N}$n(f),(qe&6)===0&&(Jo=J()+500,_l(0))}}break;case 31:case 13:_=hs(f,2),_!==null&&sn(_,f,2),tr(),gd(f,2)}if(f=vd(l),f===null&&ad(e,t,l,yr,s),f===c)break;c=f}c!==null&&l.stopPropagation()}else ad(e,t,l,null,s)}}function vd(e){return e=Sc(e),bd(e)}var yr=null;function bd(e){if(yr=null,e=zs(e),e!==null){var t=d(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=u(t),e!==null)return e;e=null}else if(s===31){if(e=p(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yr=e,null}function fy(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(oe()){case ve:return 2;case ge:return 8;case Le:case Ce:return 32;case ct:return 268435456;default:return 32}default:return 32}}var Sd=!1,Ya=null,Ka=null,Za=null,Nl=new Map,jl=new Map,Xa=[],a_="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 hy(e,t){switch(e){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":Ka=null;break;case"mouseover":case"mouseout":Za=null;break;case"pointerover":case"pointerout":Nl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jl.delete(t.pointerId)}}function Dl(e,t,s,l,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Vs(t),t!==null&&uy(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function s_(e,t,s,l,c){switch(t){case"focusin":return Ya=Dl(Ya,e,t,s,l,c),!0;case"dragenter":return Ka=Dl(Ka,e,t,s,l,c),!0;case"mouseover":return Za=Dl(Za,e,t,s,l,c),!0;case"pointerover":var f=c.pointerId;return Nl.set(f,Dl(Nl.get(f)||null,e,t,s,l,c)),!0;case"gotpointercapture":return f=c.pointerId,jl.set(f,Dl(jl.get(f)||null,e,t,s,l,c)),!0}return!1}function py(e){var t=zs(e.target);if(t!==null){var s=d(t);if(s!==null){if(t=s.tag,t===13){if(t=u(s),t!==null){e.blockedOn=t,wh(e.priority,function(){dy(s)});return}}else if(t===31){if(t=p(s),t!==null){e.blockedOn=t,wh(e.priority,function(){dy(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function vr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=vd(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);bc=l,s.target.dispatchEvent(l),bc=null}else return t=Vs(s),t!==null&&uy(t),e.blockedOn=s,!1;t.shift()}return!0}function my(e,t,s){vr(e)&&s.delete(t)}function i_(){Sd=!1,Ya!==null&&vr(Ya)&&(Ya=null),Ka!==null&&vr(Ka)&&(Ka=null),Za!==null&&vr(Za)&&(Za=null),Nl.forEach(my),jl.forEach(my)}function br(e,t){e.blockedOn===t&&(e.blockedOn=null,Sd||(Sd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,i_)))}var Sr=null;function gy(e){Sr!==e&&(Sr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Sr===e&&(Sr=null);for(var t=0;t<e.length;t+=3){var s=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(bd(l||s)===null)continue;break}var f=Vs(s);f!==null&&(e.splice(t,3),t-=3,vu(f,{pending:!0,data:c,method:s.method,action:l},l,c))}}))}function xi(e){function t(N){return br(N,e)}Ya!==null&&br(Ya,e),Ka!==null&&br(Ka,e),Za!==null&&br(Za,e),Nl.forEach(t),jl.forEach(t);for(var s=0;s<Xa.length;s++){var l=Xa[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Xa.length&&(s=Xa[0],s.blockedOn===null);)py(s),s.blockedOn===null&&Xa.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var c=s[l],f=s[l+1],b=c[Wt]||null;if(typeof f=="function")b||gy(s);else if(b){var _=null;if(f&&f.hasAttribute("formAction")){if(c=f,b=f[Wt]||null)_=b.formAction;else if(bd(c)!==null)continue}else _=b.action;typeof _=="function"?s[l+1]=_:(s.splice(l,3),l-=3),gy(s)}}}function yy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(s,20)}function s(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function xd(e){this._internalRoot=e}xr.prototype.render=xd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,l=fn();ry(s,l,e,t,null,null)},xr.prototype.unmount=xd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ry(e.current,2,null,e,null,null),tr(),t[Us]=null}};function xr(e){this._internalRoot=e}xr.prototype.unstable_scheduleHydration=function(e){if(e){var t=kh();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Xa.length&&t!==0&&t<Xa[s].priority;s++);Xa.splice(s,0,e),s===0&&py(e)}};var vy=a.version;if(vy!=="19.2.4")throw Error(o(527,vy,"19.2.4"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var l_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_r.isDisabled&&_r.supportsFiber)try{ut=_r.inject(l_),Ve=_r}catch{}}return Ml.createRoot=function(e,t){if(!r(e))throw Error(o(299));var s=!1,l="",c=Cm,f=Am,b=km;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=ly(e,1,!1,null,null,s,l,null,c,f,b,yy),e[Us]=t.current,nd(e),new xd(t)},Ml.hydrateRoot=function(e,t,s){if(!r(e))throw Error(o(299));var l=!1,c="",f=Cm,b=Am,_=km,N=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(_=s.onRecoverableError),s.formState!==void 0&&(N=s.formState)),t=ly(e,1,!0,t,s??null,l,c,N,f,b,_,yy),t.context=oy(null),s=t.current,l=fn(),l=dc(l),c=Ba(l),c.callback=null,La(s,c,l),s=l,t.current.lanes=s,Gi(t,s),$n(t),e[Us]=t.current,nd(e),new xr(t)},Ml.version="19.2.4",Ml}var Cy;function __(){if(Cy)return _d.exports;Cy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),_d.exports=x_(),_d.exports}var T_=__();/**
26
- * react-router v7.13.1
27
- *
28
- * Copyright (c) Remix Software Inc.
29
- *
30
- * This source code is licensed under the MIT license found in the
31
- * LICENSE.md file in the root directory of this source tree.
32
- *
33
- * @license MIT
34
- */var Ay="popstate";function ky(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function E_(n={}){function a(o,r){var g;let d=(g=r.state)==null?void 0:g.masked,{pathname:u,search:p,hash:m}=d||o.location;return Qd("",{pathname:u,search:p,hash:m},r.state&&r.state.usr||null,r.state&&r.state.key||"default",d?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function i(o,r){return typeof r=="string"?r:ql(r)}return A_(a,i,null,n)}function ot(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Nn(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function C_(){return Math.random().toString(36).substring(2,10)}function wy(n,a){return{usr:n.state,key:n.key,idx:a,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Qd(n,a,i=null,o,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Bi(a):a,state:i,key:a&&a.key||o||C_(),unstable_mask:r}}function ql({pathname:n="/",search:a="",hash:i=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function Bi(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substring(i),n=n.substring(0,i));let o=n.indexOf("?");o>=0&&(a.search=n.substring(o),n=n.substring(0,o)),n&&(a.pathname=n)}return a}function A_(n,a,i,o={}){let{window:r=document.defaultView,v5Compat:d=!1}=o,u=r.history,p="POP",m=null,g=v();g==null&&(g=0,u.replaceState({...u.state,idx:g},""));function v(){return(u.state||{idx:null}).idx}function y(){p="POP";let w=v(),E=w==null?null:w-g;g=w,m&&m({action:p,location:k.location,delta:E})}function x(w,E){p="PUSH";let A=ky(w)?w:Qd(k.location,w,E);g=v()+1;let j=wy(A,g),V=k.createHref(A.unstable_mask||A);try{u.pushState(j,"",V)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;r.location.assign(V)}d&&m&&m({action:p,location:k.location,delta:1})}function T(w,E){p="REPLACE";let A=ky(w)?w:Qd(k.location,w,E);g=v();let j=wy(A,g),V=k.createHref(A.unstable_mask||A);u.replaceState(j,"",V),d&&m&&m({action:p,location:k.location,delta:0})}function C(w){return k_(w)}let k={get action(){return p},get location(){return n(r,u)},listen(w){if(m)throw new Error("A history only accepts one active listener");return r.addEventListener(Ay,y),m=w,()=>{r.removeEventListener(Ay,y),m=null}},createHref(w){return a(r,w)},createURL:C,encodeLocation(w){let E=C(w);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:x,replace:T,go(w){return u.go(w)}};return k}function k_(n,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),ot(i,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:ql(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=i+o),new URL(o,i)}function E0(n,a,i="/"){return w_(n,a,i,!1)}function w_(n,a,i,o){let r=typeof a=="string"?Bi(a):a,d=Ta(r.pathname||"/",i);if(d==null)return null;let u=C0(n);N_(u);let p=null;for(let m=0;p==null&&m<u.length;++m){let g=k0(d);p=U_(u[m],g,o)}return p}function C0(n,a=[],i=[],o="",r=!1){let d=(u,p,m=r,g)=>{let v={relativePath:g===void 0?u.path||"":g,caseSensitive:u.caseSensitive===!0,childrenIndex:p,route:u};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(o)&&m)return;ot(v.relativePath.startsWith(o),`Absolute route path "${v.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(o.length)}let y=Zn([o,v.relativePath]),x=i.concat(v);u.children&&u.children.length>0&&(ot(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),C0(u.children,a,x,y,m)),!(u.path==null&&!u.index)&&a.push({path:y,score:L_(y,u.index),routesMeta:x})};return n.forEach((u,p)=>{var m;if(u.path===""||!((m=u.path)!=null&&m.includes("?")))d(u,p);else for(let g of A0(u.path))d(u,p,!0,g)}),a}function A0(n){let a=n.split("/");if(a.length===0)return[];let[i,...o]=a,r=i.endsWith("?"),d=i.replace(/\?$/,"");if(o.length===0)return r?[d,""]:[d];let u=A0(o.join("/")),p=[];return p.push(...u.map(m=>m===""?d:[d,m].join("/"))),r&&p.push(...u),p.map(m=>n.startsWith("/")&&m===""?"/":m)}function N_(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:I_(a.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}var j_=/^:[\w-]+$/,D_=3,M_=2,R_=1,O_=10,B_=-2,Ny=n=>n==="*";function L_(n,a){let i=n.split("/"),o=i.length;return i.some(Ny)&&(o+=B_),a&&(o+=M_),i.filter(r=>!Ny(r)).reduce((r,d)=>r+(j_.test(d)?D_:d===""?R_:O_),o)}function I_(n,a){return n.length===a.length&&n.slice(0,-1).every((o,r)=>o===a[r])?n[n.length-1]-a[a.length-1]:0}function U_(n,a,i=!1){let{routesMeta:o}=n,r={},d="/",u=[];for(let p=0;p<o.length;++p){let m=o[p],g=p===o.length-1,v=d==="/"?a:a.slice(d.length)||"/",y=Yl({path:m.relativePath,caseSensitive:m.caseSensitive,end:g},v),x=m.route;if(!y&&g&&i&&!o[o.length-1].route.index&&(y=Yl({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},v)),!y)return null;Object.assign(r,y.params),u.push({params:r,pathname:Zn([d,y.pathname]),pathnameBase:P_(Zn([d,y.pathnameBase])),route:x}),y.pathnameBase!=="/"&&(d=Zn([d,y.pathnameBase]))}return u}function Yl(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,o]=z_(n.path,n.caseSensitive,n.end),r=a.match(i);if(!r)return null;let d=r[0],u=d.replace(/(.)\/+$/,"$1"),p=r.slice(1);return{params:o.reduce((g,{paramName:v,isOptional:y},x)=>{if(v==="*"){let C=p[x]||"";u=d.slice(0,d.length-C.length).replace(/(.)\/+$/,"$1")}const T=p[x];return y&&!T?g[v]=void 0:g[v]=(T||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:u,pattern:n}}function z_(n,a=!1,i=!0){Nn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,p,m,g,v)=>{if(o.push({paramName:p,isOptional:m!=null}),m){let y=v.charAt(g+u.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,a?void 0:"i"),o]}function k0(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Nn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function Ta(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,o=n.charAt(i);return o&&o!=="/"?null:n.slice(i)||"/"}var V_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function H_(n,a="/"){let{pathname:i,search:o="",hash:r=""}=typeof n=="string"?Bi(n):n,d;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?d=jy(i.substring(1),"/"):d=jy(i,a)):d=a,{pathname:d,search:F_(o),hash:$_(r)}}function jy(n,a){let i=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?i.length>1&&i.pop():r!=="."&&i.push(r)}),i.length>1?i.join("/"):"/"}function Cd(n,a,i,o){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function G_(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function jf(n){let a=G_(n);return a.map((i,o)=>o===a.length-1?i.pathname:i.pathnameBase)}function Qr(n,a,i,o=!1){let r;typeof n=="string"?r=Bi(n):(r={...n},ot(!r.pathname||!r.pathname.includes("?"),Cd("?","pathname","search",r)),ot(!r.pathname||!r.pathname.includes("#"),Cd("#","pathname","hash",r)),ot(!r.search||!r.search.includes("#"),Cd("#","search","hash",r)));let d=n===""||r.pathname==="",u=d?"/":r.pathname,p;if(u==null)p=i;else{let y=a.length-1;if(!o&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),y-=1;r.pathname=x.join("/")}p=y>=0?a[y]:"/"}let m=H_(r,p),g=u&&u!=="/"&&u.endsWith("/"),v=(d||u===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(g||v)&&(m.pathname+="/"),m}var Zn=n=>n.join("/").replace(/\/\/+/g,"/"),P_=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),F_=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,$_=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,q_=class{constructor(n,a,i,o=!1){this.status=n,this.statusText=a||"",this.internal=o,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Y_(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function K_(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var w0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function N0(n,a){let i=n;if(typeof i!="string"||!V_.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let o=i,r=!1;if(w0)try{let d=new URL(window.location.href),u=i.startsWith("//")?new URL(d.protocol+i):new URL(i),p=Ta(u.pathname,a);u.origin===d.origin&&p!=null?i=p+u.search+u.hash:r=!0}catch{Nn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:r,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var j0=["POST","PUT","PATCH","DELETE"];new Set(j0);var Z_=["GET",...j0];new Set(Z_);var Li=S.createContext(null);Li.displayName="DataRouter";var Wr=S.createContext(null);Wr.displayName="DataRouterState";var X_=S.createContext(!1),D0=S.createContext({isTransitioning:!1});D0.displayName="ViewTransition";var Q_=S.createContext(new Map);Q_.displayName="Fetchers";var W_=S.createContext(null);W_.displayName="Await";var gn=S.createContext(null);gn.displayName="Navigation";var to=S.createContext(null);to.displayName="Location";var Mn=S.createContext({outlet:null,matches:[],isDataRoute:!1});Mn.displayName="Route";var Df=S.createContext(null);Df.displayName="RouteError";var M0="REACT_ROUTER_ERROR",J_="REDIRECT",eT="ROUTE_ERROR_RESPONSE";function tT(n){if(n.startsWith(`${M0}:${J_}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function nT(n){if(n.startsWith(`${M0}:${eT}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new q_(a.status,a.statusText,a.data)}catch{}}function aT(n,{relative:a}={}){ot(Ls(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:o}=S.useContext(gn),{hash:r,pathname:d,search:u}=no(n,{relative:a}),p=d;return i!=="/"&&(p=d==="/"?i:Zn([i,d])),o.createHref({pathname:p,search:u,hash:r})}function Ls(){return S.useContext(to)!=null}function Qt(){return ot(Ls(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(to).location}function Zt(n){ot(Ls(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:a}=Qt();return S.useMemo(()=>Yl(n,k0(a)),[a,n])}var R0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function O0(n){S.useContext(gn).static||S.useLayoutEffect(n)}function Jr(){let{isDataRoute:n}=S.useContext(Mn);return n?vT():sT()}function sT(){ot(Ls(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Li),{basename:a,navigator:i}=S.useContext(gn),{matches:o}=S.useContext(Mn),{pathname:r}=Qt(),d=JSON.stringify(jf(o)),u=S.useRef(!1);return O0(()=>{u.current=!0}),S.useCallback((m,g={})=>{if(Nn(u.current,R0),!u.current)return;if(typeof m=="number"){i.go(m);return}let v=Qr(m,JSON.parse(d),r,g.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:Zn([a,v.pathname])),(g.replace?i.replace:i.push)(v,g.state,g)},[a,i,d,r,n])}var iT=S.createContext(null);function lT(n){let a=S.useContext(Mn).outlet;return S.useMemo(()=>a&&S.createElement(iT.Provider,{value:n},a),[a,n])}function ec(){let{matches:n}=S.useContext(Mn),a=n[n.length-1];return a?a.params:{}}function no(n,{relative:a}={}){let{matches:i}=S.useContext(Mn),{pathname:o}=Qt(),r=JSON.stringify(jf(i));return S.useMemo(()=>Qr(n,JSON.parse(r),o,a==="path"),[n,r,o,a])}function oT(n,a){return B0(n,a)}function B0(n,a,i){var w;ot(Ls(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(gn),{matches:r}=S.useContext(Mn),d=r[r.length-1],u=d?d.params:{},p=d?d.pathname:"/",m=d?d.pathnameBase:"/",g=d&&d.route;{let E=g&&g.path||"";I0(p,!g||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
35
-
36
- Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let v=Qt(),y;if(a){let E=typeof a=="string"?Bi(a):a;ot(m==="/"||((w=E.pathname)==null?void 0:w.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${E.pathname}" was given in the \`location\` prop.`),y=E}else y=v;let x=y.pathname||"/",T=x;if(m!=="/"){let E=m.replace(/^\//,"").split("/");T="/"+x.replace(/^\//,"").split("/").slice(E.length).join("/")}let C=E0(n,{pathname:T});Nn(g||C!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Nn(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=fT(C&&C.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:Zn([m,o.encodeLocation?o.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?m:Zn([m,o.encodeLocation?o.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),r,i);return a&&k?S.createElement(to.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},k):k}function rT(){let n=yT(),a=Y_(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:o},d={padding:"2px 4px",backgroundColor:o},u=null;return console.error("Error handled by React Router default ErrorBoundary:",n),u=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:d},"ErrorBoundary")," or"," ",S.createElement("code",{style:d},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:r},i):null,u)}var cT=S.createElement(rT,null),L0=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=nT(n.digest);i&&(n=i)}let a=n!==void 0?S.createElement(Mn.Provider,{value:this.props.routeContext},S.createElement(Df.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(uT,{error:n},a):a}};L0.contextType=X_;var Ad=new WeakMap;function uT({children:n,error:a}){let{basename:i}=S.useContext(gn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=tT(a.digest);if(o){let r=Ad.get(a);if(r)throw r;let d=N0(o.location,i);if(w0&&!Ad.get(a))if(d.isExternal||o.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:o.replace}));throw Ad.set(a,u),u}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function dT({routeContext:n,match:a,children:i}){let o=S.useContext(Li);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(Mn.Provider,{value:n},i)}function fT(n,a=[],i){let o=i==null?void 0:i.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(a.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let r=n,d=o==null?void 0:o.errors;if(d!=null){let v=r.findIndex(y=>y.route.id&&(d==null?void 0:d[y.route.id])!==void 0);ot(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),r=r.slice(0,Math.min(r.length,v+1))}let u=!1,p=-1;if(i&&o){u=o.renderFallback;for(let v=0;v<r.length;v++){let y=r[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(p=v),y.route.id){let{loaderData:x,errors:T}=o,C=y.route.loader&&!x.hasOwnProperty(y.route.id)&&(!T||T[y.route.id]===void 0);if(y.route.lazy||C){i.isStatic&&(u=!0),p>=0?r=r.slice(0,p+1):r=[r[0]];break}}}}let m=i==null?void 0:i.onError,g=o&&m?(v,y)=>{var x,T;m(v,{location:o.location,params:((T=(x=o.matches)==null?void 0:x[0])==null?void 0:T.params)??{},unstable_pattern:K_(o.matches),errorInfo:y})}:void 0;return r.reduceRight((v,y,x)=>{let T,C=!1,k=null,w=null;o&&(T=d&&y.route.id?d[y.route.id]:void 0,k=y.route.errorElement||cT,u&&(p<0&&x===0?(I0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,w=null):p===x&&(C=!0,w=y.route.hydrateFallbackElement||null)));let E=a.concat(r.slice(0,x+1)),A=()=>{let j;return T?j=k:C?j=w:y.route.Component?j=S.createElement(y.route.Component,null):y.route.element?j=y.route.element:j=v,S.createElement(dT,{match:y,routeContext:{outlet:v,matches:E,isDataRoute:o!=null},children:j})};return o&&(y.route.ErrorBoundary||y.route.errorElement||x===0)?S.createElement(L0,{location:o.location,revalidation:o.revalidation,component:k,error:T,children:A(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:g}):A()},null)}function Mf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hT(n){let a=S.useContext(Li);return ot(a,Mf(n)),a}function pT(n){let a=S.useContext(Wr);return ot(a,Mf(n)),a}function mT(n){let a=S.useContext(Mn);return ot(a,Mf(n)),a}function Rf(n){let a=mT(n),i=a.matches[a.matches.length-1];return ot(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function gT(){return Rf("useRouteId")}function yT(){var o;let n=S.useContext(Df),a=pT("useRouteError"),i=Rf("useRouteError");return n!==void 0?n:(o=a.errors)==null?void 0:o[i]}function vT(){let{router:n}=hT("useNavigate"),a=Rf("useNavigate"),i=S.useRef(!1);return O0(()=>{i.current=!0}),S.useCallback(async(r,d={})=>{Nn(i.current,R0),i.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...d}))},[n,a])}var Dy={};function I0(n,a,i){!a&&!Dy[n]&&(Dy[n]=!0,Nn(!1,i))}S.memo(bT);function bT({routes:n,future:a,state:i,isStatic:o,onError:r}){return B0(n,void 0,{state:i,isStatic:o,onError:r})}function ji({to:n,replace:a,state:i,relative:o}){ot(Ls(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(gn);Nn(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=S.useContext(Mn),{pathname:u}=Qt(),p=Jr(),m=Qr(n,jf(d),u,o==="path"),g=JSON.stringify(m);return S.useEffect(()=>{p(JSON.parse(g),{replace:a,state:i,relative:o})},[p,g,o,a,i]),null}function U0(n){return lT(n.context)}function St(n){ot(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ST({basename:n="/",children:a=null,location:i,navigationType:o="POP",navigator:r,static:d=!1,unstable_useTransitions:u}){ot(!Ls(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=n.replace(/^\/*/,"/"),m=S.useMemo(()=>({basename:p,navigator:r,static:d,unstable_useTransitions:u,future:{}}),[p,r,d,u]);typeof i=="string"&&(i=Bi(i));let{pathname:g="/",search:v="",hash:y="",state:x=null,key:T="default",unstable_mask:C}=i,k=S.useMemo(()=>{let w=Ta(g,p);return w==null?null:{location:{pathname:w,search:v,hash:y,state:x,key:T,unstable_mask:C},navigationType:o}},[p,g,v,y,x,T,o,C]);return Nn(k!=null,`<Router basename="${p}"> is not able to match the URL "${g}${v}${y}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:S.createElement(gn.Provider,{value:m},S.createElement(to.Provider,{children:a,value:k}))}function xT({children:n,location:a}){return oT(Wd(n),a)}function Wd(n,a=[]){let i=[];return S.Children.forEach(n,(o,r)=>{if(!S.isValidElement(o))return;let d=[...a,r];if(o.type===S.Fragment){i.push.apply(i,Wd(o.props.children,d));return}ot(o.type===St,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ot(!o.props.index||!o.props.children,"An index route cannot have child routes.");let u={id:o.props.id||d.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(u.children=Wd(o.props.children,d)),i.push(u)}),i}var Mr="get",Rr="application/x-www-form-urlencoded";function tc(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function _T(n){return tc(n)&&n.tagName.toLowerCase()==="button"}function TT(n){return tc(n)&&n.tagName.toLowerCase()==="form"}function ET(n){return tc(n)&&n.tagName.toLowerCase()==="input"}function CT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function AT(n,a){return n.button===0&&(!a||a==="_self")&&!CT(n)}function Jd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((a,i)=>{let o=n[i];return a.concat(Array.isArray(o)?o.map(r=>[i,r]):[[i,o]])},[]))}function kT(n,a){let i=Jd(n);return a&&a.forEach((o,r)=>{i.has(r)||a.getAll(r).forEach(d=>{i.append(r,d)})}),i}var Er=null;function wT(){if(Er===null)try{new FormData(document.createElement("form"),0),Er=!1}catch{Er=!0}return Er}var NT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kd(n){return n!=null&&!NT.has(n)?(Nn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Rr}"`),null):n}function jT(n,a){let i,o,r,d,u;if(TT(n)){let p=n.getAttribute("action");o=p?Ta(p,a):null,i=n.getAttribute("method")||Mr,r=kd(n.getAttribute("enctype"))||Rr,d=new FormData(n)}else if(_T(n)||ET(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=n.getAttribute("formaction")||p.getAttribute("action");if(o=m?Ta(m,a):null,i=n.getAttribute("formmethod")||p.getAttribute("method")||Mr,r=kd(n.getAttribute("formenctype"))||kd(p.getAttribute("enctype"))||Rr,d=new FormData(p,n),!wT()){let{name:g,type:v,value:y}=n;if(v==="image"){let x=g?`${g}.`:"";d.append(`${x}x`,"0"),d.append(`${x}y`,"0")}else g&&d.append(g,y)}}else{if(tc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Mr,o=null,r=Rr,u=n}return d&&r==="text/plain"&&(u=d,d=void 0),{action:o,method:i.toLowerCase(),encType:r,formData:d,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Of(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function DT(n,a,i,o){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${o}`:r.pathname=`${r.pathname}.${o}`:r.pathname==="/"?r.pathname=`_root.${o}`:a&&Ta(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${o}`,r}async function MT(n,a){if(n.id in a)return a[n.id];try{let i=await import(n.module);return a[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function RT(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function OT(n,a,i){let o=await Promise.all(n.map(async r=>{let d=a.routes[r.route.id];if(d){let u=await MT(d,i);return u.links?u.links():[]}return[]}));return UT(o.flat(1).filter(RT).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function My(n,a,i,o,r,d){let u=(m,g)=>i[g]?m.route.id!==i[g].route.id:!0,p=(m,g)=>{var v;return i[g].pathname!==m.pathname||((v=i[g].route.path)==null?void 0:v.endsWith("*"))&&i[g].params["*"]!==m.params["*"]};return d==="assets"?a.filter((m,g)=>u(m,g)||p(m,g)):d==="data"?a.filter((m,g)=>{var y;let v=o.routes[m.route.id];if(!v||!v.hasLoader)return!1;if(u(m,g)||p(m,g))return!0;if(m.route.shouldRevalidate){let x=m.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((y=i[0])==null?void 0:y.params)||{},nextUrl:new URL(n,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function BT(n,a,{includeHydrateFallback:i}={}){return LT(n.map(o=>{let r=a.routes[o.route.id];if(!r)return[];let d=[r.module];return r.clientActionModule&&(d=d.concat(r.clientActionModule)),r.clientLoaderModule&&(d=d.concat(r.clientLoaderModule)),i&&r.hydrateFallbackModule&&(d=d.concat(r.hydrateFallbackModule)),r.imports&&(d=d.concat(r.imports)),d}).flat(1))}function LT(n){return[...new Set(n)]}function IT(n){let a={},i=Object.keys(n).sort();for(let o of i)a[o]=n[o];return a}function UT(n,a){let i=new Set;return new Set(a),n.reduce((o,r)=>{let d=JSON.stringify(IT(r));return i.has(d)||(i.add(d),o.push({key:d,link:r})),o},[])}function z0(){let n=S.useContext(Li);return Of(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function zT(){let n=S.useContext(Wr);return Of(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Bf=S.createContext(void 0);Bf.displayName="FrameworkContext";function V0(){let n=S.useContext(Bf);return Of(n,"You must render this element inside a <HydratedRouter> element"),n}function VT(n,a){let i=S.useContext(Bf),[o,r]=S.useState(!1),[d,u]=S.useState(!1),{onFocus:p,onBlur:m,onMouseEnter:g,onMouseLeave:v,onTouchStart:y}=a,x=S.useRef(null);S.useEffect(()=>{if(n==="render"&&u(!0),n==="viewport"){let k=E=>{E.forEach(A=>{u(A.isIntersecting)})},w=new IntersectionObserver(k,{threshold:.5});return x.current&&w.observe(x.current),()=>{w.disconnect()}}},[n]),S.useEffect(()=>{if(o){let k=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(k)}}},[o]);let T=()=>{r(!0)},C=()=>{r(!1),u(!1)};return i?n!=="intent"?[d,x,{}]:[d,x,{onFocus:Rl(p,T),onBlur:Rl(m,C),onMouseEnter:Rl(g,T),onMouseLeave:Rl(v,C),onTouchStart:Rl(y,T)}]:[!1,x,{}]}function Rl(n,a){return i=>{n&&n(i),i.defaultPrevented||a(i)}}function HT({page:n,...a}){let{router:i}=z0(),o=S.useMemo(()=>E0(i.routes,n,i.basename),[i.routes,n,i.basename]);return o?S.createElement(PT,{page:n,matches:o,...a}):null}function GT(n){let{manifest:a,routeModules:i}=V0(),[o,r]=S.useState([]);return S.useEffect(()=>{let d=!1;return OT(n,a,i).then(u=>{d||r(u)}),()=>{d=!0}},[n,a,i]),o}function PT({page:n,matches:a,...i}){let o=Qt(),{future:r,manifest:d,routeModules:u}=V0(),{basename:p}=z0(),{loaderData:m,matches:g}=zT(),v=S.useMemo(()=>My(n,a,g,d,o,"data"),[n,a,g,d,o]),y=S.useMemo(()=>My(n,a,g,d,o,"assets"),[n,a,g,d,o]),x=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let k=new Set,w=!1;if(a.forEach(A=>{var V;let j=d.routes[A.route.id];!j||!j.hasLoader||(!v.some(O=>O.route.id===A.route.id)&&A.route.id in m&&((V=u[A.route.id])!=null&&V.shouldRevalidate)||j.hasClientLoader?w=!0:k.add(A.route.id))}),k.size===0)return[];let E=DT(n,p,r.unstable_trailingSlashAwareDataRequests,"data");return w&&k.size>0&&E.searchParams.set("_routes",a.filter(A=>k.has(A.route.id)).map(A=>A.route.id).join(",")),[E.pathname+E.search]},[p,r.unstable_trailingSlashAwareDataRequests,m,o,d,v,a,n,u]),T=S.useMemo(()=>BT(y,d),[y,d]),C=GT(y);return S.createElement(S.Fragment,null,x.map(k=>S.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...i})),T.map(k=>S.createElement("link",{key:k,rel:"modulepreload",href:k,...i})),C.map(({key:k,link:w})=>S.createElement("link",{key:k,nonce:i.nonce,...w,crossOrigin:w.crossOrigin??i.crossOrigin})))}function FT(...n){return a=>{n.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var $T=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{$T&&(window.__reactRouterVersion="7.13.1")}catch{}function qT({basename:n,children:a,unstable_useTransitions:i,window:o}){let r=S.useRef();r.current==null&&(r.current=E_({window:o,v5Compat:!0}));let d=r.current,[u,p]=S.useState({action:d.action,location:d.location}),m=S.useCallback(g=>{i===!1?p(g):S.startTransition(()=>p(g))},[i]);return S.useLayoutEffect(()=>d.listen(m),[d,m]),S.createElement(ST,{basename:n,children:a,location:u.location,navigationType:u.action,navigator:d,unstable_useTransitions:i})}var H0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lf=S.forwardRef(function({onClick:a,discover:i="render",prefetch:o="none",relative:r,reloadDocument:d,replace:u,unstable_mask:p,state:m,target:g,to:v,preventScrollReset:y,viewTransition:x,unstable_defaultShouldRevalidate:T,...C},k){let{basename:w,navigator:E,unstable_useTransitions:A}=S.useContext(gn),j=typeof v=="string"&&H0.test(v),V=N0(v,w);v=V.to;let O=aT(v,{relative:r}),F=Qt(),H=null;if(p){let se=Qr(p,[],F.unstable_mask?F.unstable_mask.pathname:"/",!0);w!=="/"&&(se.pathname=se.pathname==="/"?w:Zn([w,se.pathname])),H=E.createHref(se)}let[D,U,ee]=VT(o,C),ne=XT(v,{replace:u,unstable_mask:p,state:m,target:g,preventScrollReset:y,relative:r,viewTransition:x,unstable_defaultShouldRevalidate:T,unstable_useTransitions:A});function ae(se){a&&a(se),se.defaultPrevented||ne(se)}let ie=!(V.isExternal||d),q=S.createElement("a",{...C,...ee,href:(ie?H:void 0)||V.absoluteURL||O,onClick:ie?ae:a,ref:FT(k,U),target:g,"data-discover":!j&&i==="render"?"true":void 0});return D&&!j?S.createElement(S.Fragment,null,q,S.createElement(HT,{page:O})):q});Lf.displayName="Link";var YT=S.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:o="",end:r=!1,style:d,to:u,viewTransition:p,children:m,...g},v){let y=no(u,{relative:g.relative}),x=Qt(),T=S.useContext(Wr),{navigator:C,basename:k}=S.useContext(gn),w=T!=null&&tE(y)&&p===!0,E=C.encodeLocation?C.encodeLocation(y).pathname:y.pathname,A=x.pathname,j=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;i||(A=A.toLowerCase(),j=j?j.toLowerCase():null,E=E.toLowerCase()),j&&k&&(j=Ta(j,k)||j);const V=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let O=A===E||!r&&A.startsWith(E)&&A.charAt(V)==="/",F=j!=null&&(j===E||!r&&j.startsWith(E)&&j.charAt(E.length)==="/"),H={isActive:O,isPending:F,isTransitioning:w},D=O?a:void 0,U;typeof o=="function"?U=o(H):U=[o,O?"active":null,F?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let ee=typeof d=="function"?d(H):d;return S.createElement(Lf,{...g,"aria-current":D,className:U,ref:v,style:ee,to:u,viewTransition:p},typeof m=="function"?m(H):m)});YT.displayName="NavLink";var KT=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:i,reloadDocument:o,replace:r,state:d,method:u=Mr,action:p,onSubmit:m,relative:g,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:x,...T},C)=>{let{unstable_useTransitions:k}=S.useContext(gn),w=JT(),E=eE(p,{relative:g}),A=u.toLowerCase()==="get"?"get":"post",j=typeof p=="string"&&H0.test(p),V=O=>{if(m&&m(O),O.defaultPrevented)return;O.preventDefault();let F=O.nativeEvent.submitter,H=(F==null?void 0:F.getAttribute("formmethod"))||u,D=()=>w(F||O.currentTarget,{fetcherKey:a,method:H,navigate:i,replace:r,state:d,relative:g,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:x});k&&i!==!1?S.startTransition(()=>D()):D()};return S.createElement("form",{ref:C,method:A,action:E,onSubmit:o?m:V,...T,"data-discover":!j&&n==="render"?"true":void 0})});KT.displayName="Form";function ZT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function G0(n){let a=S.useContext(Li);return ot(a,ZT(n)),a}function XT(n,{target:a,replace:i,unstable_mask:o,state:r,preventScrollReset:d,relative:u,viewTransition:p,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let v=Jr(),y=Qt(),x=no(n,{relative:u});return S.useCallback(T=>{if(AT(T,a)){T.preventDefault();let C=i!==void 0?i:ql(y)===ql(x),k=()=>v(n,{replace:C,unstable_mask:o,state:r,preventScrollReset:d,relative:u,viewTransition:p,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>k()):k()}},[y,v,x,i,o,r,a,n,d,u,p,m,g])}function If(n){Nn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let a=S.useRef(Jd(n)),i=S.useRef(!1),o=Qt(),r=S.useMemo(()=>kT(o.search,i.current?null:a.current),[o.search]),d=Jr(),u=S.useCallback((p,m)=>{const g=Jd(typeof p=="function"?p(new URLSearchParams(r)):p);i.current=!0,d("?"+g,m)},[d,r]);return[r,u]}var QT=0,WT=()=>`__${String(++QT)}__`;function JT(){let{router:n}=G0("useSubmit"),{basename:a}=S.useContext(gn),i=gT(),o=n.fetch,r=n.navigate;return S.useCallback(async(d,u={})=>{let{action:p,method:m,encType:g,formData:v,body:y}=jT(d,a);if(u.navigate===!1){let x=u.fetcherKey||WT();await o(x,i,u.action||p,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:v,body:y,formMethod:u.method||m,formEncType:u.encType||g,flushSync:u.flushSync})}else await r(u.action||p,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:v,body:y,formMethod:u.method||m,formEncType:u.encType||g,replace:u.replace,state:u.state,fromRouteId:i,flushSync:u.flushSync,viewTransition:u.viewTransition})},[o,r,a,i])}function eE(n,{relative:a}={}){let{basename:i}=S.useContext(gn),o=S.useContext(Mn);ot(o,"useFormAction must be used inside a RouteContext");let[r]=o.matches.slice(-1),d={...no(n||".",{relative:a})},u=Qt();if(n==null){d.search=u.search;let p=new URLSearchParams(d.search),m=p.getAll("index");if(m.some(v=>v==="")){p.delete("index"),m.filter(y=>y).forEach(y=>p.append("index",y));let v=p.toString();d.search=v?`?${v}`:""}}return(!n||n===".")&&r.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(d.pathname=d.pathname==="/"?i:Zn([i,d.pathname])),ql(d)}function tE(n,{relative:a}={}){let i=S.useContext(D0);ot(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=G0("useViewTransitionState"),r=no(n,{relative:a});if(!i.isTransitioning)return!1;let d=Ta(i.currentLocation.pathname,o)||i.currentLocation.pathname,u=Ta(i.nextLocation.pathname,o)||i.nextLocation.pathname;return Yl(r.pathname,u)!=null||Yl(r.pathname,d)!=null}function Rn(){const n=Jr();return S.useCallback((a,i)=>{typeof a=="number"?n(a):n(a,i)},[n])}function P0(n){return`/sessions/${encodeURIComponent(n)}`}function Kl(n){return`/workspaces/${encodeURIComponent(n)}`}function ns(n,a){const i=`/tasks/${encodeURIComponent(n)}`;return a?`${i}/${a}`:i}function nE(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Os(n,a){const i=new URLSearchParams({workspace:n});return a&&i.set("parent",a),`/tasks/new?${i.toString()}`}function F0(n){return`/sessions/new?${new URLSearchParams({env:n}).toString()}`}const Ry="/environments/new",Di="/settings",aE="/pair";function jn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Zl(n,a){return console.warn(`[ws] Malformed "${n}" message: ${a}`),!1}function sE(n){return jn(n)&&typeof n.id=="string"&&typeof n.displayName=="string"&&typeof n.adapterType=="string"&&typeof n.status=="string"&&typeof n.bootstrapped=="boolean"}function Oy(n){return jn(n)&&typeof n.id=="string"&&typeof n.environmentId=="string"&&typeof n.runtime=="string"&&typeof n.status=="string"&&typeof n.prompt=="string"&&typeof n.startedAt=="string"&&(n.endedAt===void 0||typeof n.endedAt=="string")&&(n.error===void 0||typeof n.error=="string")}function By(n){return jn(n)&&typeof n.sessionId=="string"&&typeof n.eventType=="string"&&typeof n.timestamp=="string"&&typeof n.content=="string"&&(n.raw===void 0||typeof n.raw=="string")}function iE(n){return jn(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.repoUrl=="string"&&typeof n.defaultEnvironmentId=="string"&&typeof n.status=="string"&&typeof n.worktreeBasePath=="string"&&typeof n.useWorktrees=="boolean"&&(n.defaultPersonaId===void 0||typeof n.defaultPersonaId=="string")&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function lE(n){return jn(n)&&typeof n.id=="string"&&typeof n.workspaceId=="string"&&typeof n.title=="string"&&typeof n.status=="string"&&typeof n.branch=="string"&&typeof n.sortOrder=="number"&&typeof n.depth=="number"&&(n.defaultPersonaId===void 0||typeof n.defaultPersonaId=="string")&&Array.isArray(n.dependsOn)&&Array.isArray(n.childTaskIds)}function oE(n){return jn(n)&&typeof n.id=="string"&&typeof n.workspaceId=="string"&&typeof n.taskId=="string"&&typeof n.sessionId=="string"&&typeof n.category=="string"&&typeof n.title=="string"&&typeof n.content=="string"&&Array.isArray(n.tags)&&typeof n.createdAt=="string"}function rE(n){return jn(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const cE=new Set(["off","subscription","api_key"]),wd=new Set(["off","on"]);function Ly(n){return jn(n)&&cE.has(n.claude)&&wd.has(n.github)&&wd.has(n.copilot)&&wd.has(n.codex)}function uE(n){return jn(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function dE(n){return jn(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.systemPrompt=="string"&&typeof n.toolConfig=="string"&&typeof n.runtime=="string"&&typeof n.model=="string"&&typeof n.maxTurns=="number"&&typeof n.mcpServers=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"&&typeof n.type=="string"&&typeof n.script=="string"}function Xn(n,a,i,o){return Array.isArray(n)?n.filter((r,d)=>a(r)?!0:(Zl(i,`item at index ${d} in "${o}" has unexpected shape`),!1)):(Zl(i,`expected "${o}" to be an array, got ${typeof n}`),[])}function fE(n){let a;try{a=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!jn(a)||typeof a.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",a);return}const i={type:a.type,payload:jn(a.payload)?a.payload:void 0};return typeof a.id=="string"&&(i.id=a.id),typeof a.timestamp=="string"&&(i.timestamp=a.timestamp),i}function hE(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const pE=3e3,_i=5e3,mE=4001;function gE(n,a){const i=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`:"ws://localhost:3000",o=S.useRef(void 0),[r,d]=S.useState(!1),u=S.useRef(a.onMessage);u.current=a.onMessage;const p=S.useRef(a.onConnect);p.current=a.onConnect;const m=S.useRef(a.onDisconnect);m.current=a.onDisconnect;const g=S.useCallback(v=>{var y;((y=o.current)==null?void 0:y.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(v))},[]);return S.useEffect(()=>{let v,y;function x(){v=new WebSocket(i),o.current=v,v.onopen=()=>{d(!0),p.current(g)},v.onmessage=T=>{if(typeof T.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const C=fE(T.data);C&&u.current(C)},v.onclose=T=>{var C;if(d(!1),o.current=void 0,(C=m.current)==null||C.call(m),clearTimeout(y),T.code===mE){window.location.href=aE;return}y=setTimeout(x,pE)},v.onerror=()=>{v.close()}}return x(),()=>{clearTimeout(y),v==null||v.close()}},[i,g]),{connected:r,send:g}}const yE=5e3;function vE(n){const[a,i]=S.useState([]),[o,r]=S.useState({}),d=S.useCallback(y=>{switch(y.type){case"environment.added":return!0;case"environment.removed":{const x=y.payload.environmentId;return x&&(i(T=>T.filter(C=>C.id!==x)),r(T=>{const C={...T};return delete C[x],C})),n({type:"list_sessions"}),!0}case"environment.changed":return n({type:"list_environments"}),!0;case"environment.provision_progress":{const x=y.payload;if(typeof x.environmentId!="string"||typeof x.stage!="string"||typeof x.message!="string"||typeof x.progress!="number")return Zl("environment.provision_progress","invalid payload"),!0;if(r(T=>({...T,[x.environmentId]:{stage:x.stage,message:x.message,progress:x.progress}})),x.stage==="ready"){const T=x.environmentId;setTimeout(()=>{r(C=>{const k={...C};return delete k[T],k})},yE)}return!0}default:return!1}},[n]),u=S.useCallback(y=>{var x;switch(y.type){case"environments":return i(Xn((x=y.payload)==null?void 0:x.environments,sE,"environments","environments")),!0;default:return!1}},[]),p=S.useCallback((y,x,T)=>{n({type:"add_environment",payload:{displayName:y,adapterType:x,adapterConfig:T||{}}})},[n]),m=S.useCallback(y=>{n({type:"provision_environment",payload:{environmentId:y}})},[n]),g=S.useCallback(y=>{n({type:"stop_environment",payload:{environmentId:y}})},[n]),v=S.useCallback(y=>{n({type:"remove_environment",payload:{environmentId:y}})},[n]);return{environments:a,provisionStatus:o,addEnvironment:p,provisionEnvironment:m,stopEnvironment:g,removeEnvironment:v,handleMessage:u,handleEvent:d}}const Nd=new Set(["pending","running","idle"]),bE=new Set(["completed","failed","interrupted"]),Iy=["pending","running","idle"];function SE(n){const[a,i]=S.useState([]),[o,r]=S.useState([]),[d,u]=S.useState(0),[p,m]=S.useState(void 0),[g,v]=S.useState({}),y=S.useCallback(A=>{var j,V,O,F,H;switch(A.type){case"sessions":return i(D=>{var ne;const U=Xn((ne=A.payload)==null?void 0:ne.sessions,Oy,"sessions","sessions"),ee=new Map(D.map(ae=>[ae.id,ae.status]));return U.map(ae=>{const ie=ee.get(ae.id);return!ie||ie===ae.status?ae:bE.has(ie)&&Nd.has(ae.status)?{...ae,status:ie}:Nd.has(ie)&&Nd.has(ae.status)&&Iy.indexOf(ie)>Iy.indexOf(ae.status)?{...ae,status:ie}:ae})}),!0;case"session_event":{if(!By(A.payload))return Zl("session_event","payload is not a valid SessionEvent"),!0;const D=A.payload;let U=0;if(r(ee=>{const ne=[...ee,D];return ne.length>_i?(U=ne.length-_i,ne.slice(-_i)):ne}),U>0&&u(ee=>ee+U),D.eventType==="status"){const ee=hE(D.content);i(ne=>ne.some(ie=>ie.id===D.sessionId)?ne.map(ie=>ie.id===D.sessionId?{...ie,status:ee}:ie):[...ne,{id:D.sessionId,environmentId:"",runtime:"",status:ee,prompt:"",startedAt:D.timestamp}])}return!0}case"session_events":{const D=Xn((j=A.payload)==null?void 0:j.events,By,"session_events","events"),U=(V=A.payload)==null?void 0:V.sessionId;if(typeof U!="string")return Zl("session_events","missing or non-string sessionId"),!0;if(D.length>0){let ee=0;r(ne=>{const ae=new Set;for(const se of ne)se.sessionId===U&&ae.add(`${se.timestamp}|${se.eventType}`);const ie=D.filter(se=>!ae.has(`${se.timestamp}|${se.eventType}`)),q=[...ne,...ie].sort((se,G)=>se.sessionId!==G.sessionId?0:se.timestamp.localeCompare(G.timestamp));return q.length>_i?(ee=q.length-_i,q.slice(-_i)):q}),ee>0&&u(ne=>ne+ee)}return!0}case"spawned":{const D=(O=A.payload)==null?void 0:O.sessionId;return typeof D=="string"&&D&&m(D),n({type:"list_sessions"}),!0}case"task_sessions":{const D=(F=A.payload)==null?void 0:F.taskId;if(typeof D!="string"||!D)return!0;const U=Xn((H=A.payload)==null?void 0:H.sessions,Oy,"task_sessions","sessions");return v(ee=>({...ee,[D]:U})),!0}default:return!1}},[n]),x=S.useCallback((A,j,V,O)=>{n({type:"spawn",payload:{environmentId:A,prompt:j,personaId:V||"",worktreeBasePath:O||""}})},[n]),T=S.useCallback((A,j)=>{n({type:"send_input",payload:{sessionId:A,text:j}})},[n]),C=S.useCallback(A=>{n({type:"kill",payload:{sessionId:A}})},[n]),k=S.useCallback(A=>{n({type:"get_session_events",payload:{sessionId:A}})},[n]),w=S.useCallback(()=>{r([]),u(0)},[]),E=S.useCallback(A=>{n({type:"get_task_sessions",payload:{taskId:A}})},[n]);return{sessions:a,events:o,eventsDropped:d,lastSpawnedId:p,taskSessions:g,spawn:x,sendInput:T,kill:C,loadSessionEvents:k,clearEvents:w,loadTaskSessions:E,handleMessage:y}}function xE(n){const[a,i]=S.useState([]),[o,r]=S.useState(!1),d=S.useCallback(y=>{switch(y.type){case"workspace.created":return r(!1),n({type:"list_workspaces"}),!0;case"workspace.archived":case"workspace.updated":return n({type:"list_workspaces"}),!0;default:return!1}},[n]),u=S.useCallback(y=>{var x;switch(y.type){case"workspaces":return i(Xn((x=y.payload)==null?void 0:x.workspaces,iE,"workspaces","workspaces")),!0;default:return!1}},[]),p=S.useCallback(()=>{r(!1)},[]),m=S.useCallback((y,x,T,C,k)=>{r(!0),n({type:"create_workspace",payload:{name:y,description:x||"",repoUrl:T||"",defaultEnvironmentId:C||"",defaultPersonaId:k||""}})},[n]),g=S.useCallback(y=>{n({type:"archive_workspace",payload:{workspaceId:y}})},[n]),v=S.useCallback((y,x)=>{n({type:"update_workspace",payload:{workspaceId:y,...x}})},[n]);return{workspaces:a,workspaceCreating:o,createWorkspace:m,archiveWorkspace:g,updateWorkspace:v,handleMessage:u,handleEvent:d,onDisconnect:p}}const _E=15e3;function TE(n){const[a,i]=S.useState([]),[o,r]=S.useState(void 0),d=S.useRef(new Map),u=S.useCallback(E=>{const A=E.payload;switch(E.type){case"task.created":{const j=typeof A.requestId=="string"?A.requestId:"";if(j){const O=d.current.get(j);O&&(clearTimeout(O.timer),d.current.delete(j),O.onSuccess())}const V=typeof A.workspaceId=="string"?A.workspaceId:"";return V&&n({type:"list_tasks",payload:{workspaceId:V}}),!0}case"task.started":{const j=typeof A.taskId=="string"?A.taskId:"",V=typeof A.sessionId=="string"?A.sessionId:"",O=typeof A.workspaceId=="string"?A.workspaceId:"";return r(F=>j&&F===j?void 0:F),V&&(n({type:"list_sessions"}),j&&i(F=>F.map(H=>H.id===j?{...H,latestSessionId:V}:H))),O?n({type:"list_tasks",payload:{workspaceId:O}}):j&&i(F=>{const H=F.find(D=>D.id===j);return H&&n({type:"list_tasks",payload:{workspaceId:H.workspaceId}}),F}),!0}case"task.completed":case"task.deleted":case"task.updated":{const j=typeof A.workspaceId=="string"?A.workspaceId:"",V=typeof A.taskId=="string"?A.taskId:"";return j?n({type:"list_tasks",payload:{workspaceId:j}}):V&&i(O=>{const F=O.find(H=>H.id===V);return F&&n({type:"list_tasks",payload:{workspaceId:F.workspaceId}}),O}),!0}default:return!1}},[n]),p=S.useCallback(E=>{var A,j,V,O;switch(E.type){case"tasks":{const F=Xn((A=E.payload)==null?void 0:A.tasks,lE,"tasks","tasks"),H=(typeof((j=E.payload)==null?void 0:j.workspaceId)=="string"?E.payload.workspaceId:"")||(F.length>0?F[0].workspaceId:"");return H?(i(D=>[...D.filter(U=>U.workspaceId!==H),...F]),!0):(i(F),!0)}case"create_task_error":{const F=typeof((V=E.payload)==null?void 0:V.requestId)=="string"?E.payload.requestId:"",H=typeof((O=E.payload)==null?void 0:O.message)=="string"?E.payload.message:"Failed to create task";if(F){const D=d.current.get(F);D?(clearTimeout(D.timer),d.current.delete(F),D.onError(H)):console.error("[useTasks] create_task_error with unknown requestId:",H)}else console.error("[useTasks] create_task_error:",H);return!0}default:return!1}},[]),m=S.useCallback(()=>{r(void 0);for(const[,E]of d.current)clearTimeout(E.timer),E.onError("Disconnected");d.current.clear()},[]),g=S.useCallback(E=>{n({type:"list_tasks",payload:{workspaceId:E}})},[n]),v=S.useCallback((E,A,j,V,O,F,H,D,U)=>{const ee={workspaceId:E,title:A,description:j||"",dependsOn:V||[],parentTaskId:O||"",defaultPersonaId:F||"",canDecompose:H||!1};if(D||U){const ne=crypto.randomUUID();ee.requestId=ne;const ae=U??(()=>{}),ie=setTimeout(()=>{d.current.delete(ne)&&ae("Request timed out")},_E);d.current.set(ne,{onSuccess:D??(()=>{}),onError:ae,timer:ie})}n({type:"create_task",payload:ee})},[n]),y=S.useCallback((E,A,j,V)=>{r(E),n({type:"start_task",payload:{taskId:E,personaId:A||"",environmentId:j||"",notes:V||""}})},[n]),x=S.useCallback(E=>{n({type:"stop_task",payload:{taskId:E}})},[n]),T=S.useCallback(E=>{n({type:"complete_task",payload:{taskId:E}})},[n]),C=S.useCallback(E=>{n({type:"resume_task",payload:{taskId:E}})},[n]),k=S.useCallback((E,A,j,V,O)=>{const F={taskId:E,title:A,description:j,dependsOn:V};O!==void 0&&(F.defaultPersonaId=O),n({type:"update_task",payload:F})},[n]),w=S.useCallback(E=>{n({type:"delete_task",payload:{taskId:E}})},[n]);return{tasks:a,taskStartingId:o,loadTasks:g,createTask:v,startTask:y,stopTask:x,completeTask:T,resumeTask:C,updateTask:k,deleteTask:w,handleMessage:p,handleEvent:u,onDisconnect:m}}function EE(n){const[a,i]=S.useState([]),o=S.useCallback(p=>{if(p.type==="finding.posted"){const m=typeof p.payload.workspaceId=="string"?p.payload.workspaceId:"";return m&&n({type:"list_findings",payload:{workspaceId:m}}),!0}return!1},[n]),r=S.useCallback(p=>{var m;switch(p.type){case"findings":return i(Xn((m=p.payload)==null?void 0:m.findings,oE,"findings","findings")),!0;default:return!1}},[]),d=S.useCallback(p=>{n({type:"list_findings",payload:{workspaceId:p}})},[n]),u=S.useCallback((p,m,g,v,y)=>{n({type:"post_finding",payload:{workspaceId:p,title:m,content:g,category:v||"general",tags:y||[]}})},[n]);return{findings:a,loadFindings:d,postFinding:u,handleMessage:r,handleEvent:o}}function CE(n){const[a,i]=S.useState([]),o=S.useCallback(m=>m.type==="token.changed"?(n({type:"list_tokens"}),!0):!1,[n]),r=S.useCallback(m=>{var g;switch(m.type){case"tokens":return i(Xn((g=m.payload)==null?void 0:g.tokens,rE,"tokens","tokens")),!0;default:return!1}},[]),d=S.useCallback(()=>{n({type:"list_tokens"})},[n]),u=S.useCallback((m,g,v,y,x)=>{n({type:"set_token",payload:{name:m,value:g,tokenType:v,envVar:y,filePath:x}})},[n]),p=S.useCallback(m=>{n({type:"delete_token",payload:{name:m}})},[n]);return{tokens:a,loadTokens:d,setToken:u,deleteToken:p,handleMessage:r,handleEvent:o}}function AE(n){const[a,i]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),o=S.useCallback(u=>u.type==="credential.providers_changed"?(Ly(u.payload)&&i(u.payload),!0):!1,[]),r=S.useCallback(u=>{switch(u.type){case"credential_providers":return Ly(u.payload)&&i(u.payload),!0;default:return!1}},[]),d=S.useCallback(u=>{n({type:"set_credential_providers",payload:u})},[n]);return{credentialProviders:a,updateCredentialProviders:d,handleMessage:r,handleEvent:o}}function kE(n,a){const[i,o]=S.useState([]),[r,d]=S.useState(""),[u,p]=S.useState(""),[m,g]=S.useState(!1),v=S.useCallback(T=>{var C,k,w;switch(T.type){case"codespaces_list":{const E=Xn((C=T.payload)==null?void 0:C.codespaces,uE,"codespaces_list","codespaces"),A=typeof((k=T.payload)==null?void 0:k.error)=="string"?T.payload.error:"";return o(E),p(A),!0}case"codespace_created":return g(!1),n({type:"list_codespaces"}),!0;case"codespace_create_error":{g(!1);const E=typeof((w=T.payload)==null?void 0:w.message)=="string"?T.payload.message:"Failed to create codespace";return d(E),!0}default:return!1}},[n]),y=S.useCallback(()=>{n({type:"list_codespaces"})},[n]),x=S.useCallback((T,C)=>{if(!a){d("Not connected to server. Please try again once the connection is restored.");return}g(!0),d("");const k={repo:T};C&&(k.machine=C),n({type:"create_codespace",payload:k})},[n,a]);return{codespaces:i,codespaceError:r,codespaceListError:u,codespaceCreating:m,listCodespaces:y,createCodespace:x,handleMessage:v}}function wE(n){const[a,i]=S.useState([]),o=S.useCallback(m=>{switch(m.type){case"persona.created":case"persona.updated":case"persona.deleted":return n({type:"list_personas"}),!0;default:return!1}},[n]),r=S.useCallback(m=>{var g;switch(m.type){case"personas":{const v=Xn((g=m.payload)==null?void 0:g.personas,dE,"personas","personas");return i(v),!0}default:return!1}},[]),d=S.useCallback((m,g,v,y,x,T,C,k)=>{n({type:"create_persona",payload:{name:m,description:g,systemPrompt:v,runtime:y||"",model:x||"",maxTurns:T||0,type:C||"agent",script:k||""}})},[n]),u=S.useCallback((m,g,v,y,x,T,C,k,w)=>{const E={personaId:m};g!==void 0&&(E.name=g),v!==void 0&&(E.description=v),y!==void 0&&(E.systemPrompt=y),x!==void 0&&(E.runtime=x),T!==void 0&&(E.model=T),C!==void 0&&(E.maxTurns=C),k!==void 0&&(E.type=k),w!==void 0&&(E.script=w),n({type:"update_persona",payload:E})},[n]),p=S.useCallback(m=>{n({type:"delete_persona",payload:{personaId:m}})},[n]);return{personas:a,createPersona:d,updatePersona:u,deletePersona:p,handleMessage:r,handleEvent:o}}function NE(n){const[a,i]=S.useState(""),[o,r]=S.useState(void 0),{connected:d,send:u}=gE(n,{onMessage:O,onConnect:F,onDisconnect:H}),p=vE(u),m=SE(u),g=xE(u),v=TE(u),y=EE(u),x=CE(u),T=AE(u),C=kE(u,d),k=wE(u),w="default_persona_id",E="onboarding_completed",A=S.useCallback(U=>{i(U),u({type:"set_setting",payload:{key:w,value:U}})},[u]),j=S.useCallback(()=>{r(!0),u({type:"set_setting",payload:{key:E,value:"true"}})},[u]);function V(U){const ee=U.payload.key,ne=U.payload.value;if(U.type==="setting.changed"){ee===w&&i(ne??""),ee===E&&r(ne==="true");return}p.handleEvent(U)||g.handleEvent(U)||v.handleEvent(U)||y.handleEvent(U)||x.handleEvent(U)||T.handleEvent(U)||k.handleEvent(U)}function O(U){var ee,ne,ae;if(typeof U.type=="string"&&U.type.includes(".")){const ie=U,q={id:ie.id??"",type:U.type,timestamp:ie.timestamp??"",payload:U.payload??{}};V(q);return}if(U.type==="setting"){const ie=(ee=U.payload)==null?void 0:ee.key,q=(ne=U.payload)==null?void 0:ne.value;ie===w&&i(q??""),ie===E&&r(q==="true");return}if(!p.handleMessage(U)&&!m.handleMessage(U)&&!g.handleMessage(U)&&!v.handleMessage(U)&&!y.handleMessage(U)&&!x.handleMessage(U)&&!T.handleMessage(U)&&!C.handleMessage(U)&&!k.handleMessage(U)&&U.type==="error"){console.error("[ws]",(ae=U.payload)==null?void 0:ae.message);return}}function F(U){U({type:"list_environments"}),U({type:"list_sessions"}),U({type:"list_workspaces"}),U({type:"list_tokens"}),U({type:"get_credential_providers"}),U({type:"list_personas"}),U({type:"get_setting",payload:{key:w}}),U({type:"get_setting",payload:{key:E}}),U({type:"subscribe_all"})}function H(){g.onDisconnect(),v.onDisconnect()}const D=S.useCallback(()=>{u({type:"list_environments"}),u({type:"list_sessions"}),u({type:"list_workspaces"}),u({type:"list_tokens"})},[u]);return{connected:d,environments:p.environments,sessions:m.sessions,events:m.events,eventsDropped:m.eventsDropped,lastSpawnedId:m.lastSpawnedId,workspaces:g.workspaces,tasks:v.tasks,findings:y.findings,tokens:x.tokens,spawn:m.spawn,sendInput:m.sendInput,kill:m.kill,refresh:D,loadSessionEvents:m.loadSessionEvents,clearEvents:m.clearEvents,createWorkspace:g.createWorkspace,archiveWorkspace:g.archiveWorkspace,updateWorkspace:g.updateWorkspace,loadTasks:v.loadTasks,createTask:v.createTask,startTask:v.startTask,stopTask:v.stopTask,completeTask:v.completeTask,resumeTask:v.resumeTask,updateTask:v.updateTask,deleteTask:v.deleteTask,loadFindings:y.loadFindings,postFinding:y.postFinding,addEnvironment:p.addEnvironment,loadTokens:x.loadTokens,setToken:x.setToken,deleteToken:x.deleteToken,credentialProviders:T.credentialProviders,updateCredentialProviders:T.updateCredentialProviders,provisionStatus:p.provisionStatus,provisionEnvironment:p.provisionEnvironment,stopEnvironment:p.stopEnvironment,removeEnvironment:p.removeEnvironment,codespaces:C.codespaces,codespaceError:C.codespaceError,codespaceListError:C.codespaceListError,codespaceCreating:C.codespaceCreating,listCodespaces:C.listCodespaces,createCodespace:C.createCodespace,workspaceCreating:g.workspaceCreating,taskStartingId:v.taskStartingId,personas:k.personas,createPersona:k.createPersona,updatePersona:k.updatePersona,deletePersona:k.deletePersona,taskSessions:m.taskSessions,loadTaskSessions:m.loadTaskSessions,appDefaultPersonaId:a,setAppDefaultPersonaId:A,onboardingCompleted:o,completeOnboarding:j}}const Uf=S.createContext(void 0);function jE({children:n}){const a=NE();return h.jsx(Uf.Provider,{value:a,children:n})}function Bt(){const n=S.useContext(Uf);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const DE=[{id:"env-local-01",displayName:"Local Dev",adapterType:"local",status:"connected",bootstrapped:!0},{id:"env-docker-01",displayName:"Docker Sandbox",adapterType:"docker",status:"connected",bootstrapped:!0},{id:"env-cs-01",displayName:"GitHub Codespace",adapterType:"codespace",status:"connected",bootstrapped:!0},{id:"env-remote-01",displayName:"Staging (SSH)",adapterType:"ssh",status:"disconnected",bootstrapped:!1}],ME=[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z",endedAt:"2026-02-26T15:12:00Z",error:"Context window exceeded before completing implementation"},{id:"sess-001",environmentId:"env-local-01",runtime:"node",status:"running",prompt:"Refactor the authentication middleware to use JWT tokens",startedAt:"2026-02-27T08:15:00Z"},{id:"sess-002",environmentId:"env-docker-01",runtime:"python",status:"completed",prompt:"Write unit tests for the user registration endpoint",startedAt:"2026-02-27T07:30:00Z"},{id:"sess-003",environmentId:"env-local-01",runtime:"node",status:"failed",prompt:"Migrate database schema to add audit_log table",startedAt:"2026-02-26T22:45:00Z"},{id:"sess-004",environmentId:"env-docker-01",runtime:"python",status:"running",prompt:"Implement rate limiting for the public API",startedAt:"2026-02-27T09:00:00Z"}],RE=[{sessionId:"sess-001-prev",eventType:"status",timestamp:"2026-02-26T14:00:01Z",content:"running"},{sessionId:"sess-001-prev",eventType:"output",timestamp:"2026-02-26T14:00:05Z",content:"Reading src/middleware/auth.ts to understand the current authentication flow..."},{sessionId:"sess-001-prev",eventType:"error",timestamp:"2026-02-26T15:12:00Z",content:"Context window exceeded before completing implementation"},{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
37
- - src/middleware/auth.ts
38
- - src/routes/login.ts
39
- - src/routes/protected.ts`},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:07Z",content:"Installing jsonwebtoken and @types/jsonwebtoken..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:12Z",content:`Rewriting auth middleware:
40
- \`\`\`typescript
41
- import jwt from "jsonwebtoken";
42
- import type { Request, Response, NextFunction } from "express";
43
-
44
- const JWT_SECRET = process.env.JWT_SECRET || "change-me";
45
-
46
- export function verifyToken(req: Request, res: Response, next: NextFunction): void {
47
- const header = req.headers.authorization;
48
- if (!header?.startsWith("Bearer ")) {
49
- res.status(401).json({ error: "Missing token" });
50
- return;
51
- }
52
- try {
53
- const decoded = jwt.verify(header.slice(7), JWT_SECRET);
54
- req.user = decoded;
55
- next();
56
- } catch {
57
- res.status(403).json({ error: "Invalid token" });
58
- }
59
- }
60
- \`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],OE=[{id:"proj-alpha",name:"Workspace Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],BE=[{id:"task-001",workspaceId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"working",branch:"feat/jwt-auth",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0,defaultPersonaId:""},{id:"task-001a",workspaceId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"complete",branch:"feat/jwt-auth/design-token-schema",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-001b",workspaceId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"working",branch:"feat/jwt-auth/implement-auth-middleware",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-001c",workspaceId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-002",workspaceId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-003",workspaceId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"paused",branch:"feat/openapi-docs",latestSessionId:"sess-002",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-004",workspaceId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"complete",branch:"feat/db-pool",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-005",workspaceId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"not_started",branch:"fix/user-list-n1",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006",workspaceId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"working",branch:"feat/parquet-export",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0,defaultPersonaId:""},{id:"task-006a",workspaceId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"complete",branch:"feat/parquet-export/define-parquet-schema-mapping",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006b",workspaceId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"complete",branch:"feat/parquet-export/implement-row-group-writer",latestSessionId:"",dependsOn:["task-006a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006c",workspaceId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"working",branch:"feat/parquet-export/add-compression-options",latestSessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006d",workspaceId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-006c"],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-007",workspaceId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"working",branch:"feat/incremental",latestSessionId:"sess-004",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0,defaultPersonaId:""},{id:"task-007a",workspaceId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"complete",branch:"feat/incremental/design-watermark-storage",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-007b",workspaceId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",latestSessionId:"",dependsOn:["task-007a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-008",workspaceId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"paused",branch:"feat/monitoring",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""}],Uy=[{id:"find-001",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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"}],LE=[{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:""}],IE=[{id:"persona-arch",name:"Software Architect",description:"Designs system architecture, defines interfaces, and decomposes large features into implementable tasks.",systemPrompt:"You are a senior software architect. Focus on clean interfaces, separation of concerns, and scalable patterns. When decomposing work, create concrete subtasks with clear acceptance criteria.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:50,mcpServers:"[]",createdAt:"2026-02-20T10:00:00Z",updatedAt:"2026-02-20T10:00:00Z",type:"agent",script:""},{id:"persona-fe",name:"Frontend Engineer",description:"React specialist — builds UI components, writes CSS, implements routing, and creates Playwright tests.",systemPrompt:"You are a frontend engineer specializing in React, TypeScript, and modern CSS. Follow component composition patterns, use semantic HTML, and write accessible markup.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:100,mcpServers:"[]",createdAt:"2026-02-20T10:05:00Z",updatedAt:"2026-02-20T10:05:00Z",type:"agent",script:""},{id:"persona-reviewer",name:"Code Reviewer",description:"Reviews diffs for correctness, security, and style. Posts findings for issues discovered.",systemPrompt:"You are a meticulous code reviewer. Check for security vulnerabilities, performance issues, and style consistency. Post findings for anything noteworthy.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:30,mcpServers:"[]",createdAt:"2026-02-20T10:10:00Z",updatedAt:"2026-02-20T10:10:00Z",type:"agent",script:""},{id:"persona-tester",name:"QA Engineer",description:"Writes comprehensive test suites — unit tests, integration tests, and E2E Playwright specs.",systemPrompt:"You are a QA engineer focused on test coverage. Write tests that cover happy paths, edge cases, error scenarios, and accessibility. Use Playwright for E2E tests.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:80,mcpServers:"[]",createdAt:"2026-02-20T10:15:00Z",updatedAt:"2026-02-20T10:15:00Z",type:"agent",script:""}],UE={"task-001b":[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z"},{id:"sess-001",environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:"Implement auth middleware",startedAt:"2026-02-27T08:15:00Z"}],"task-006c":[{id:"sess-004",environmentId:"env-docker-01",runtime:"claude-code",status:"running",prompt:"Add compression options",startedAt:"2026-02-27T09:00:00Z"}]};function Ot(n){return new Date(Date.now()+n).toISOString()}const zy=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ot(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Ot(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Ot(1600),content:`Found 5 endpoints that need refactoring:
61
- - GET /api/users
62
- - POST /api/users
63
- - GET /api/users/:id
64
- - PUT /api/users/:id
65
- - DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:Ot(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:Ot(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Ot(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ot(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Ot(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Ot(1400),content:`Found tables to modify:
66
- - users (add column: last_login_at)
67
- - sessions (add index on expires_at)
68
- - audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:Ot(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
69
- The table has 50,000+ rows — this may lock the table briefly.
70
-
71
- Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:Ot(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Ot(1e3),content:`Migration 001_add_last_login.sql applied successfully.
72
- Migration 002_sessions_index.sql applied successfully.
73
- Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:Ot(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Ot(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ot(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Ot(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Ot(1800),content:`Writing test cases:
74
- - should calculate monthly total
75
- - should apply discount codes
76
- - should handle currency conversion
77
- - should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:Ot(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
78
- The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:Ot(3500),content:"failed"}}]}],Vy=400;function zE({children:n}){const[a,i]=S.useState(ME),[o,r]=S.useState(RE),[d,u]=S.useState(void 0),[p,m]=S.useState(OE),[g,v]=S.useState(BE),[y,x]=S.useState(Uy),[T,C]=S.useState(LE),[k,w]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[E,A]=S.useState(IE),[j]=S.useState(UE),[V,O]=S.useState(""),F=S.useRef(0),H=S.useRef(0),D=S.useRef(new Set),U=S.useRef(new Map),ee=S.useRef(g);ee.current=g;const ne=S.useRef(new Map),ae=S.useRef(new Map),ie=S.useCallback(X=>(F.current+=1,`mock-${X}-${String(F.current).padStart(3,"0")}`),[]),q=S.useCallback(()=>{const X=zy[H.current%zy.length];return H.current+=1,X},[]),se=S.useCallback((X,J,oe)=>{const ve=setTimeout(()=>{var ge;D.current.delete(ve),oe&&((ge=U.current.get(oe))==null||ge.delete(ve)),X()},J);D.current.add(ve),oe&&(U.current.has(oe)||U.current.set(oe,new Set),U.current.get(oe).add(ve))},[]),G=S.useCallback(X=>{const J=U.current.get(X);J&&(J.forEach(oe=>{clearTimeout(oe),D.current.delete(oe)}),U.current.delete(X))},[]),Y=S.useCallback((X,J)=>{i(oe=>oe.map(ve=>ve.id===X?{...ve,status:J}:ve))},[]),Z=S.useCallback(X=>{r(J=>[...J,X])},[]),he=S.useCallback((X,J,oe)=>{J.forEach((ve,ge)=>{se(()=>{const Le={sessionId:X,...ve.event,timestamp:new Date().toISOString()};Z(Le),ve.event.eventType==="status"&&Y(X,ve.event.content),ge===J.length-1&&oe&&oe()},ve.delayMs,X)})},[se,Z,Y]),W=S.useCallback((X,J,oe,ve)=>{console.log("[MockGrackle] spawn",{environmentId:X,prompt:J,runtime:ve});const ge=ie("sess"),Le={id:ge,environmentId:X,runtime:ve||"claude-code",status:"running",prompt:J,startedAt:new Date().toISOString()};i(ct=>[...ct,Le]),u(ge);const Ce=q();if(console.log(`[MockGrackle] Playing scenario: ${Ce.label}`),Ce.pauseForInput){const ct=Ce.pauseAfterStep??Ce.steps.length-1,ke=Ce.steps.slice(0,ct+1),$e=ke.length>0?ke[ke.length-1].delayMs:0;he(ge,ke),se(()=>{Y(ge,"idle"),Z({sessionId:ge,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},$e+Vy,ge),Ce.resumeSteps&&ne.current.set(ge,Ce.resumeSteps)}else he(ge,Ce.steps)},[ie,q,he,se,Y,Z]),Fe=S.useCallback(X=>{console.log("[MockGrackle] kill",X),G(X),ne.current.delete(X),Y(X,"interrupted"),Z({sessionId:X,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),v(J=>J.map(oe=>oe.latestSessionId===X&&oe.status==="working"?{...oe,status:"not_started"}:oe))},[G,Y,Z]),we=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),pe=S.useCallback(X=>{console.log("[MockGrackle] loadSessionEvents",X)},[]),Be=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),r([])},[]),Te=S.useCallback((X,J,oe,ve,ge)=>{console.log("[MockGrackle] createWorkspace",{name:X,description:J});const Le={id:ie("proj"),name:X,description:J||"",repoUrl:oe||"",defaultEnvironmentId:ve||"",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:ge||"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};m(Ce=>[...Ce,Le])},[ie]),te=S.useCallback(X=>{console.log("[MockGrackle] archiveWorkspace",X),m(J=>J.map(oe=>oe.id===X?{...oe,status:"archived"}:oe))},[]),ze=S.useCallback(X=>{console.log("[MockGrackle] loadTasks",X)},[]),Ne=S.useCallback((X,J,oe,ve,ge,Le,Ce,ct,ke)=>{console.log("[MockGrackle] createTask",{workspaceId:X,title:J,parentTaskId:ge}),v($e=>{const Ve=$e.filter(dt=>dt.workspaceId===X).reduce((dt,le)=>Math.max(dt,le.sortOrder),0),pt=ge?$e.find(dt=>dt.id===ge):void 0;if(ge&&!pt)return console.warn("[MockGrackle] Parent task not found:",ge),$e;if(pt&&!pt.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",ge),$e;const xe=pt?pt.depth+1:0,Ue={id:ie("task"),workspaceId:X,title:J,description:oe||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:ve||[],reviewNotes:void 0,sortOrder:Ve+1,createdAt:new Date().toISOString(),parentTaskId:ge||"",depth:xe,childTaskIds:[],canDecompose:Ce??!ge,defaultPersonaId:Le||""};return[...$e,Ue]}),ct&&ct()},[ie]),_e=S.useCallback((X,J,oe,ve)=>{var $e;console.log("[MockGrackle] startTask",{taskId:X});const ge=ee.current.find(ut=>ut.id===X),Le=(ge==null?void 0:ge.title)??"",Ce=ie("sess"),ct={id:Ce,environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:Le||X,startedAt:new Date().toISOString()};i(ut=>[...ut,ct]),v(ut=>ut.map(Ve=>Ve.id===X?{...Ve,status:"working",latestSessionId:Ce,branch:`mock/${X.slice(0,8)}`}:Ve));const ke=q();if(console.log(`[MockGrackle] Playing task scenario: ${ke.label}`),ke.pauseForInput){const ut=ke.pauseAfterStep??ke.steps.length-1,Ve=ke.steps.slice(0,ut+1),pt=Ve.length>0?Ve[Ve.length-1].delayMs:0;if(he(Ce,Ve),se(()=>{Y(Ce,"idle"),Z({sessionId:Ce,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},pt+Vy,Ce),ke.resumeSteps){const xe=[...ke.resumeSteps];ne.current.set(Ce,xe);const Ue=xe.reduce((dt,le)=>Math.max(dt,le.delayMs),0);ae.current.set(Ce,{taskId:X,delayAfterResume:Ue+200})}}else{const ut=ke.steps.length>0?ke.steps[ke.steps.length-1].delayMs:0;he(Ce,ke.steps);const Ve=($e=ke.steps[ke.steps.length-1])==null?void 0:$e.event.content;se(()=>{Ve==="completed"?v(pt=>pt.map(xe=>xe.id===X&&xe.status==="working"?{...xe,status:"paused"}:xe)):Ve==="failed"&&v(pt=>pt.map(xe=>xe.id===X&&xe.status==="working"?{...xe,status:"failed"}:xe))},ut+100,Ce)}},[ie,q,he,se,Y,Z]),yt=S.useCallback((X,J)=>{console.log("[MockGrackle] sendInput",{sessionId:X,text:J}),Z({sessionId:X,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${J}`}),Y(X,"running"),Z({sessionId:X,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const oe=ne.current.get(X);if(oe)ne.current.delete(X),he(X,oe);else{const ge=[{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"}}];he(X,ge)}const ve=ae.current.get(X);ve&&(ae.current.delete(X),se(()=>{v(ge=>ge.map(Le=>Le.id===ve.taskId&&Le.status==="working"?{...Le,status:"paused"}:Le))},ve.delayAfterResume,X))},[Z,Y,he,se]),ht=S.useCallback(X=>{console.log("[MockGrackle] completeTask",X),v(J=>J.map(oe=>oe.id===X?{...oe,status:"complete"}:oe))},[]),Ut=S.useCallback(X=>{console.log("[MockGrackle] resumeTask",X)},[]),Mt=S.useCallback((X,J,oe,ve,ge)=>{console.log("[MockGrackle] updateTask",{taskId:X,title:J}),v(Le=>Le.map(Ce=>Ce.id===X?{...Ce,title:J.trim()||Ce.title,description:oe,dependsOn:ve,...ge!==void 0?{defaultPersonaId:ge}:{}}:Ce))},[]),Ke=S.useCallback(X=>{console.log("[MockGrackle] deleteTask",X),v(J=>J.filter(oe=>oe.id!==X))},[]),Me=S.useCallback(X=>{console.log("[MockGrackle] loadFindings",X),x(Uy.filter(J=>J.workspaceId===X))},[]),On=S.useCallback((X,J,oe,ve,ge)=>{console.log("[MockGrackle] postFinding",{workspaceId:X,title:J});const Le={id:ie("find"),workspaceId:X,taskId:"",sessionId:"",category:ve||"general",title:J,content:oe,tags:ge||[],createdAt:new Date().toISOString()};x(Ce=>[...Ce,Le])},[ie]),Aa=S.useCallback((X,J,oe)=>{console.log("[MockGrackle] addEnvironment",{displayName:X,adapterType:J,adapterConfig:oe})},[]),ka=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),Hn=S.useCallback((X,J,oe,ve,ge)=>{console.log("[MockGrackle] setToken",{name:X,tokenType:oe}),C(Le=>[...Le.filter(ct=>ct.name!==X),{name:X,tokenType:oe,envVar:ve,filePath:ge,expiresAt:""}])},[]),Jn=S.useCallback(X=>{console.log("[MockGrackle] deleteToken",X),C(J=>J.filter(oe=>oe.name!==X))},[]),Bn=S.useCallback(X=>{console.log("[MockGrackle] updateCredentialProviders",X),w(X)},[]);S.useEffect(()=>()=>{D.current.forEach(clearTimeout),D.current.clear()},[]);const ea=S.useMemo(()=>({connected:!0,environments:DE,sessions:a,events:o,eventsDropped:0,lastSpawnedId:d,workspaces:p,tasks:g,findings:y,tokens:T,credentialProviders:k,spawn:W,sendInput:yt,kill:Fe,refresh:we,loadSessionEvents:pe,clearEvents:Be,createWorkspace:Te,archiveWorkspace:te,updateWorkspace:(X,J)=>{console.log("[MockGrackle] updateWorkspace",{workspaceId:X,...J}),m(oe=>oe.map(ve=>ve.id!==X?ve:{...ve,...J.name!==void 0?{name:J.name}:{},...J.description!==void 0?{description:J.description}:{},...J.repoUrl!==void 0?{repoUrl:J.repoUrl}:{},...J.defaultEnvironmentId!==void 0?{defaultEnvironmentId:J.defaultEnvironmentId}:{},...J.worktreeBasePath!==void 0?{worktreeBasePath:J.worktreeBasePath}:{},...J.useWorktrees!==void 0?{useWorktrees:J.useWorktrees}:{},...J.defaultPersonaId!==void 0?{defaultPersonaId:J.defaultPersonaId}:{},updatedAt:new Date().toISOString()}))},loadTasks:ze,createTask:Ne,startTask:_e,stopTask:X=>{console.log("[MockGrackle] stopTask",{taskId:X}),ht(X)},completeTask:ht,resumeTask:Ut,updateTask:Mt,deleteTask:Ke,loadFindings:Me,postFinding:On,addEnvironment:Aa,loadTokens:ka,setToken:Hn,deleteToken:Jn,updateCredentialProviders:Bn,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},workspaceCreating:!1,taskStartingId:void 0,personas:E,createPersona:(X,J,oe,ve,ge,Le,Ce,ct)=>{console.log("[MockGrackle] createPersona",{name:X});const ke={id:`mock-persona-${Date.now()}`,name:X,description:J,systemPrompt:oe,toolConfig:"{}",runtime:ve??"claude-code",model:ge||"",maxTurns:Le||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),type:Ce||"agent",script:ct||""};A($e=>[...$e,ke])},updatePersona:(X,J,oe,ve,ge,Le,Ce,ct,ke)=>{console.log("[MockGrackle] updatePersona",{personaId:X,name:J}),A($e=>$e.map(ut=>ut.id!==X?ut:{...ut,...J!==void 0?{name:J}:{},...oe!==void 0?{description:oe}:{},...ve!==void 0?{systemPrompt:ve}:{},...ge!==void 0?{runtime:ge}:{},...Le!==void 0?{model:Le}:{},...Ce!==void 0?{maxTurns:Ce}:{},...ct!==void 0?{type:ct}:{},...ke!==void 0?{script:ke}:{},updatedAt:new Date().toISOString()}))},deletePersona:X=>{console.log("[MockGrackle] deletePersona",X),A(J=>J.filter(oe=>oe.id!==X))},taskSessions:j,loadTaskSessions:X=>{console.log("[MockGrackle] loadTaskSessions",X)},appDefaultPersonaId:V,setAppDefaultPersonaId:X=>{console.log("[MockGrackle] setAppDefaultPersonaId",X),O(X)},onboardingCompleted:!0,completeOnboarding:()=>{console.log("[MockGrackle] completeOnboarding")}}),[a,o,d,p,g,y,T,k,E,j,V,W,yt,Fe,we,pe,Be,Te,te,ze,Ne,_e,ht,Ut,Mt,Ke,Me,On,Aa,ka,Hn,Jn,Bn]);return h.jsx(Uf.Provider,{value:ea,children:n})}const $0=S.createContext(void 0),VE=4e3;function HE({children:n}){const[a,i]=S.useState([]),o=S.useRef(0),r=S.useCallback(u=>{i(p=>p.filter(m=>m.id!==u))},[]),d=S.useCallback((u,p="info",m=VE)=>{const g=`toast-${++o.current}`;i(v=>[...v,{id:g,message:u,variant:p,duration:m}])},[]);return h.jsx($0.Provider,{value:{toasts:a,showToast:d,dismissToast:r},children:n})}function ao(){const n=S.useContext($0);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const nc=[{id:"grackle",label:"Grackle",description:"The default Grackle theme — iridescent purple on clean dark.",swatches:["#0e1218","#8b5cf6","#60a5fa","#e5e7eb","#34d399"],variantLightId:"grackle-light",variantDarkId:"grackle-dark"},{id:"grackle-light",label:"Grackle Light",description:"Light Grackle variant.",hidden:!0},{id:"grackle-dark",label:"Grackle Dark",description:"Dark Grackle variant.",hidden:!0},{id:"glass",label:"Glassmorphism",description:"Dark frosted-glass aesthetic with backdrop blur effects.",swatches:["#0a0c14","#4ecca3","#70a1ff","#e2e8f0","#a855f7"]},{id:"matrix",label:"Matrix",description:"Phosphor-green CRT terminal with scanlines and glow.",swatches:["#050505","#00ff41","#00bfff","#33ff77","#ffb000"]},{id:"brutalist",label:"Neubrutalism",description:"Thick borders, raw colors, bold type — ugly on purpose.",swatches:["#f5f0e8","#ff5757","#5ce1e6","#1a1a1a","#ffde59"],variantLightId:"brutalist-light",variantDarkId:"brutalist-dark"},{id:"brutalist-light",label:"Neubrutalism Light",description:"Light neubrutalism variant.",hidden:!0},{id:"brutalist-dark",label:"Neubrutalism Dark",description:"Dark neubrutalism variant.",hidden:!0},{id:"monokai",label:"Monokai",description:"Classic warm editor palette — pink, green, and purple.",swatches:["#272822","#f92672","#a6e22e","#f8f8f2","#ae81ff"],variantLightId:"monokai-light",variantDarkId:"monokai-dark"},{id:"monokai-dark",label:"Monokai Dark",description:"Dark Monokai variant.",hidden:!0},{id:"monokai-light",label:"Monokai Light",description:"Light Monokai variant.",hidden:!0},{id:"ubuntu",label:"Ubuntu",description:"Aubergine terminal with the GNOME Tango palette.",swatches:["#300a24","#8ae234","#ef2929","#eeeeec","#fce94f"]},{id:"sandstone",label:"Sandstone",description:"Warm terracotta accent on dark brown, in the style of Claude Code.",swatches:["#1a1815","#C15F3C","#6b8afd","#e8e6e3","#a78bfa"]},{id:"verdigris",label:"Verdigris",description:"Teal accent on charcoal, in the style of ChatGPT.",swatches:["#141414","#00a67e","#3b82f6","#ececec","#ab68ff"]},{id:"primer",label:"Primer",description:"Blue accent on ink-dark grey, in the style of GitHub.",swatches:["#0d1117","#58a6ff","#3fb950","#c9d1d9","#bc8cff"]}],q0=new Set(nc.map(n=>n.id)),Hy="grackle";function ef(n){return nc.find(a=>a.id===n)}const tf="grackle-theme",Y0="grackle-prefer-system",K0="(prefers-color-scheme: dark)";let Il=[],Or;function jd(){Or=void 0;for(const n of Il)n()}function nf(){return typeof window>"u"?!1:window.matchMedia(K0).matches}function Hl(){if(typeof localStorage>"u")return Hy;try{const n=localStorage.getItem(tf);if(n!==null&&q0.has(n))return n}catch{}return Hy}function Ur(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(Y0)==="true"}catch{return!1}}function af(n){return nc.find(a=>a.variantLightId===n||a.variantDarkId===n)}function Z0(n,a){const i=ef(n);if(i!=null&&i.variantDarkId)return a&&i.variantLightId?nf()?i.variantDarkId:i.variantLightId:i.variantDarkId;if(i!=null&&i.hidden&&a){const o=af(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return nf()?o.variantDarkId:o.variantLightId}return n}function Ei(n,a,i=!1){i&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=Z0(n,a),i&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Ei(Hl(),Ur());function GE(){return Or===void 0&&(Or={themeId:Hl(),systemDark:nf(),preferSystem:Ur()}),Or}function PE(n){return Il=[...Il,n],()=>{Il=Il.filter(a=>a!==n)}}function FE(){const n=S.useSyncExternalStore(PE,GE),{themeId:a,preferSystem:i}=n,o=Z0(a,i),r=S.useCallback(u=>{if(q0.has(u)){try{localStorage.setItem(tf,u)}catch{}Ei(u,Ur(),!0),jd()}},[]),d=S.useCallback(u=>{try{localStorage.setItem(Y0,u?"true":"false")}catch{}if(u){const p=Hl(),m=ef(p);if(m!=null&&m.hidden){const g=af(p);if(g)try{localStorage.setItem(tf,g.id)}catch{}}}Ei(Hl(),u,!0),jd()},[]);return S.useEffect(()=>{Ei(a,i)},[a,i]),S.useEffect(()=>{if(typeof window>"u")return;const u=window.matchMedia(K0),p=()=>{const m=Hl(),g=Ur();if(g){const v=ef(m);if(v!=null&&v.variantDarkId&&v.variantLightId&&Ei(m,g),v!=null&&v.hidden){const y=af(m);y!=null&&y.variantDarkId&&y.variantLightId&&Ei(m,g)}}jd()};return u.addEventListener("change",p),()=>{u.removeEventListener("change",p)}},[]),{themeId:a,setTheme:r,resolvedThemeId:o,preferSystem:i,setPreferSystem:d}}const X0=S.createContext(void 0);function $E({children:n}){const a=FE();return h.jsx(X0.Provider,{value:a,children:n})}function Q0(){const n=S.useContext(X0);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}const qE="_container_eix8p_1",YE="_hamburger_eix8p_33",KE="_brand_eix8p_49",ZE="_info_eix8p_65",XE="_connectionLabel_eix8p_80",QE="_connectionDot_eix8p_93",WE="_connected_eix8p_96",JE="_disconnected_eix8p_100",eC="_settingsButton_eix8p_104",ba={container:qE,hamburger:YE,brand:KE,info:ZE,connectionLabel:XE,connectionDot:QE,connected:WE,disconnected:JE,settingsButton:eC};function tC({onToggleSidebar:n,sidebarOpen:a}){const{connected:i,environments:o,sessions:r}=Bt(),d=Rn(),u=o.length,p=o.filter(g=>g.status==="connected").length,m=r.filter(g=>["running","idle"].includes(g.status)).length;return h.jsxs("div",{className:ba.container,children:[n&&h.jsx("button",{type:"button",className:ba.hamburger,onClick:n,"aria-label":"Toggle sidebar","aria-expanded":a,children:"☰"}),h.jsx("button",{type:"button",className:ba.brand,onClick:()=>d("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:ba.info,children:[h.jsxs("span",{"aria-label":i?"Connected":"Disconnected",children:[h.jsx("span",{className:`${ba.connectionDot} ${i?ba.connected:ba.disconnected}`,"aria-hidden":"true",children:"●"})," ",h.jsx("span",{className:ba.connectionLabel,"aria-hidden":"true",children:i?"Connected":"Disconnected"})]}),h.jsxs("span",{children:[p,"/",u," env",u!==1?"s":""]}),h.jsxs("span",{children:[m," active"]}),h.jsx("button",{className:ba.settingsButton,onClick:()=>d(Di),title:"Settings",children:"⚙"})]})]})}const zf=S.createContext({});function Vf(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const ac=S.createContext(null),Hf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class nC extends S.Component{getSnapshotBeforeUpdate(a){const i=this.props.childRef.current;if(i&&a.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=i.offsetHeight||0,o.width=i.offsetWidth||0,o.top=i.offsetTop,o.left=i.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function aC({children:n,isPresent:a}){const i=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0}),{nonce:d}=S.useContext(Hf);return S.useInsertionEffect(()=>{const{width:u,height:p,top:m,left:g}=r.current;if(a||!o.current||!u||!p)return;o.current.dataset.motionPopId=i;const v=document.createElement("style");return d&&(v.nonce=d),document.head.appendChild(v),v.sheet&&v.sheet.insertRule(`
79
- [data-motion-pop-id="${i}"] {
80
- position: absolute !important;
81
- width: ${u}px !important;
82
- height: ${p}px !important;
83
- top: ${m}px !important;
84
- left: ${g}px !important;
85
- }
86
- `),()=>{document.head.removeChild(v)}},[a]),h.jsx(nC,{isPresent:a,childRef:o,sizeRef:r,children:S.cloneElement(n,{ref:o})})}const sC=({children:n,initial:a,isPresent:i,onExitComplete:o,custom:r,presenceAffectsLayout:d,mode:u})=>{const p=Vf(iC),m=S.useId(),g=S.useCallback(y=>{p.set(y,!0);for(const x of p.values())if(!x)return;o&&o()},[p,o]),v=S.useMemo(()=>({id:m,initial:a,isPresent:i,custom:r,onExitComplete:g,register:y=>(p.set(y,!1),()=>p.delete(y))}),d?[Math.random(),g]:[i,g]);return S.useMemo(()=>{p.forEach((y,x)=>p.set(x,!1))},[i]),S.useEffect(()=>{!i&&!p.size&&o&&o()},[i]),u==="popLayout"&&(n=h.jsx(aC,{isPresent:i,children:n})),h.jsx(ac.Provider,{value:v,children:n})};function iC(){return new Map}function W0(n=!0){const a=S.useContext(ac);if(a===null)return[!0,null];const{isPresent:i,onExitComplete:o,register:r}=a,d=S.useId();S.useEffect(()=>{n&&r(d)},[n]);const u=S.useCallback(()=>n&&o&&o(d),[d,o,n]);return!i&&o?[!1,u]:[!0]}const Cr=n=>n.key||"";function Gy(n){const a=[];return S.Children.forEach(n,i=>{S.isValidElement(i)&&a.push(i)}),a}const Gf=typeof window<"u",J0=Gf?S.useLayoutEffect:S.useEffect,Dn=({children:n,custom:a,initial:i=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:d="sync",propagate:u=!1})=>{const[p,m]=W0(u),g=S.useMemo(()=>Gy(n),[n]),v=u&&!p?[]:g.map(Cr),y=S.useRef(!0),x=S.useRef(g),T=Vf(()=>new Map),[C,k]=S.useState(g),[w,E]=S.useState(g);J0(()=>{y.current=!1,x.current=g;for(let V=0;V<w.length;V++){const O=Cr(w[V]);v.includes(O)?T.delete(O):T.get(O)!==!0&&T.set(O,!1)}},[w,v.length,v.join("-")]);const A=[];if(g!==C){let V=[...g];for(let O=0;O<w.length;O++){const F=w[O],H=Cr(F);v.includes(H)||(V.splice(O,0,F),A.push(F))}d==="wait"&&A.length&&(V=A),E(Gy(V)),k(g);return}const{forceRender:j}=S.useContext(zf);return h.jsx(h.Fragment,{children:w.map(V=>{const O=Cr(V),F=u&&!p?!1:g===w||v.includes(O),H=()=>{if(T.has(O))T.set(O,!0);else return;let D=!0;T.forEach(U=>{U||(D=!1)}),D&&(j==null||j(),E(x.current),u&&(m==null||m()),o&&o())};return h.jsx(sC,{isPresent:F,initial:!y.current||i?void 0:!1,custom:F?void 0:a,presenceAffectsLayout:r,mode:d,onExitComplete:F?void 0:H,children:V},O)})})},pn=n=>n;let eb=pn;const lC={useManualTiming:!1};function oC(n){let a=new Set,i=new Set,o=!1,r=!1;const d=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function p(g){d.has(g)&&(m.schedule(g),n()),g(u)}const m={schedule:(g,v=!1,y=!1)=>{const T=y&&o?a:i;return v&&d.add(g),T.has(g)||T.add(g),g},cancel:g=>{i.delete(g),d.delete(g)},process:g=>{if(u=g,o){r=!0;return}o=!0,[a,i]=[i,a],a.forEach(p),a.clear(),o=!1,r&&(r=!1,m.process(g))}};return m}const Ar=["read","resolveKeyframes","update","preRender","render","postRender"],rC=40;function tb(n,a){let i=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},d=()=>i=!0,u=Ar.reduce((E,A)=>(E[A]=oC(d),E),{}),{read:p,resolveKeyframes:m,update:g,preRender:v,render:y,postRender:x}=u,T=()=>{const E=performance.now();i=!1,r.delta=o?1e3/60:Math.max(Math.min(E-r.timestamp,rC),1),r.timestamp=E,r.isProcessing=!0,p.process(r),m.process(r),g.process(r),v.process(r),y.process(r),x.process(r),r.isProcessing=!1,i&&a&&(o=!1,n(T))},C=()=>{i=!0,o=!0,r.isProcessing||n(T)};return{schedule:Ar.reduce((E,A)=>{const j=u[A];return E[A]=(V,O=!1,F=!1)=>(i||C(),j.schedule(V,O,F)),E},{}),cancel:E=>{for(let A=0;A<Ar.length;A++)u[Ar[A]].cancel(E)},state:r,steps:u}}const{schedule:rt,cancel:as,state:Ft,steps:Dd}=tb(typeof requestAnimationFrame<"u"?requestAnimationFrame:pn,!0),nb=S.createContext({strict:!1}),Py={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"]},Mi={};for(const n in Py)Mi[n]={isEnabled:a=>Py[n].some(i=>!!a[i])};function cC(n){for(const a in n)Mi[a]={...Mi[a],...n[a]}}const uC=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function zr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||uC.has(n)}let ab=n=>!zr(n);function dC(n){n&&(ab=a=>a.startsWith("on")?!zr(a):n(a))}try{dC(require("@emotion/is-prop-valid").default)}catch{}function fC(n,a,i){const o={};for(const r in n)r==="values"&&typeof n.values=="object"||(ab(r)||i===!0&&zr(r)||!a&&!zr(r)||n.draggable&&r.startsWith("onDrag"))&&(o[r]=n[r]);return o}function hC(n){if(typeof Proxy>"u")return n;const a=new Map,i=(...o)=>n(...o);return new Proxy(i,{get:(o,r)=>r==="create"?n:(a.has(r)||a.set(r,n(r)),a.get(r))})}const sc=S.createContext({});function Xl(n){return typeof n=="string"||Array.isArray(n)}function ic(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const Pf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ff=["initial",...Pf];function lc(n){return ic(n.animate)||Ff.some(a=>Xl(n[a]))}function sb(n){return!!(lc(n)||n.variants)}function pC(n,a){if(lc(n)){const{initial:i,animate:o}=n;return{initial:i===!1||Xl(i)?i:void 0,animate:Xl(o)?o:void 0}}return n.inherit!==!1?a:{}}function mC(n){const{initial:a,animate:i}=pC(n,S.useContext(sc));return S.useMemo(()=>({initial:a,animate:i}),[Fy(a),Fy(i)])}function Fy(n){return Array.isArray(n)?n.join(" "):n}const gC=Symbol.for("motionComponentSymbol");function Ci(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function yC(n,a,i){return S.useCallback(o=>{o&&n.onMount&&n.onMount(o),a&&(o?a.mount(o):a.unmount()),i&&(typeof i=="function"?i(o):Ci(i)&&(i.current=o))},[a])}const $f=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vC="framerAppearId",ib="data-"+$f(vC),{schedule:qf}=tb(queueMicrotask,!1),lb=S.createContext({});function bC(n,a,i,o,r){var d,u;const{visualElement:p}=S.useContext(sc),m=S.useContext(nb),g=S.useContext(ac),v=S.useContext(Hf).reducedMotion,y=S.useRef(null);o=o||m.renderer,!y.current&&o&&(y.current=o(n,{visualState:a,parent:p,props:i,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:v}));const x=y.current,T=S.useContext(lb);x&&!x.projection&&r&&(x.type==="html"||x.type==="svg")&&SC(y.current,i,r,T);const C=S.useRef(!1);S.useInsertionEffect(()=>{x&&C.current&&x.update(i,g)});const k=i[ib],w=S.useRef(!!k&&!(!((d=window.MotionHandoffIsComplete)===null||d===void 0)&&d.call(window,k))&&((u=window.MotionHasOptimisedAnimation)===null||u===void 0?void 0:u.call(window,k)));return J0(()=>{x&&(C.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),qf.render(x.render),w.current&&x.animationState&&x.animationState.animateChanges())}),S.useEffect(()=>{x&&(!w.current&&x.animationState&&x.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)===null||E===void 0||E.call(window,k)}),w.current=!1))}),x}function SC(n,a,i,o){const{layoutId:r,layout:d,drag:u,dragConstraints:p,layoutScroll:m,layoutRoot:g}=a;n.projection=new i(n.latestValues,a["data-framer-portal-id"]?void 0:ob(n.parent)),n.projection.setOptions({layoutId:r,layout:d,alwaysMeasureLayout:!!u||p&&Ci(p),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:g})}function ob(n){if(n)return n.options.allowProjection!==!1?n.projection:ob(n.parent)}function xC({preloadedFeatures:n,createVisualElement:a,useRender:i,useVisualState:o,Component:r}){var d,u;n&&cC(n);function p(g,v){let y;const x={...S.useContext(Hf),...g,layoutId:_C(g)},{isStatic:T}=x,C=mC(g),k=o(g,T);if(!T&&Gf){TC();const w=EC(x);y=w.MeasureLayout,C.visualElement=bC(r,k,x,a,w.ProjectionNode)}return h.jsxs(sc.Provider,{value:C,children:[y&&C.visualElement?h.jsx(y,{visualElement:C.visualElement,...x}):null,i(r,g,yC(k,C.visualElement,v),k,T,C.visualElement)]})}p.displayName=`motion.${typeof r=="string"?r:`create(${(u=(d=r.displayName)!==null&&d!==void 0?d:r.name)!==null&&u!==void 0?u:""})`}`;const m=S.forwardRef(p);return m[gC]=r,m}function _C({layoutId:n}){const a=S.useContext(zf).id;return a&&n!==void 0?a+"-"+n:n}function TC(n,a){S.useContext(nb).strict}function EC(n){const{drag:a,layout:i}=Mi;if(!a&&!i)return{};const o={...a,...i};return{MeasureLayout:a!=null&&a.isEnabled(n)||i!=null&&i.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const CC=["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 Yf(n){return typeof n!="string"||n.includes("-")?!1:!!(CC.indexOf(n)>-1||/[A-Z]/u.test(n))}function $y(n){const a=[{},{}];return n==null||n.values.forEach((i,o)=>{a[0][o]=i.get(),a[1][o]=i.getVelocity()}),a}function Kf(n,a,i,o){if(typeof a=="function"){const[r,d]=$y(o);a=a(i!==void 0?i:n.custom,r,d)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[r,d]=$y(o);a=a(i!==void 0?i:n.custom,r,d)}return a}const sf=n=>Array.isArray(n),AC=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),kC=n=>sf(n)?n[n.length-1]||0:n,Yt=n=>!!(n&&n.getVelocity);function Br(n){const a=Yt(n)?n.get():n;return AC(a)?a.toValue():a}function wC({scrapeMotionValuesFromProps:n,createRenderState:a,onUpdate:i},o,r,d){const u={latestValues:NC(o,r,d,n),renderState:a()};return i&&(u.onMount=p=>i({props:o,current:p,...u}),u.onUpdate=p=>i(p)),u}const rb=n=>(a,i)=>{const o=S.useContext(sc),r=S.useContext(ac),d=()=>wC(n,a,o,r);return i?d():Vf(d)};function NC(n,a,i,o){const r={},d=o(n,{});for(const x in d)r[x]=Br(d[x]);let{initial:u,animate:p}=n;const m=lc(n),g=sb(n);a&&g&&!m&&n.inherit!==!1&&(u===void 0&&(u=a.initial),p===void 0&&(p=a.animate));let v=i?i.initial===!1:!1;v=v||u===!1;const y=v?p:u;if(y&&typeof y!="boolean"&&!ic(y)){const x=Array.isArray(y)?y:[y];for(let T=0;T<x.length;T++){const C=Kf(n,x[T]);if(C){const{transitionEnd:k,transition:w,...E}=C;for(const A in E){let j=E[A];if(Array.isArray(j)){const V=v?j.length-1:0;j=j[V]}j!==null&&(r[A]=j)}for(const A in k)r[A]=k[A]}}}return r}const Ii=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Is=new Set(Ii),cb=n=>a=>typeof a=="string"&&a.startsWith(n),ub=cb("--"),jC=cb("var(--"),Zf=n=>jC(n)?DC.test(n.split("/*")[0].trim()):!1,DC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,db=(n,a)=>a&&typeof n=="number"?a.transform(n):n,Ea=(n,a,i)=>i>a?a:i<n?n:i,Ui={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Ql={...Ui,transform:n=>Ea(0,1,n)},kr={...Ui,default:1},so=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),Wa=so("deg"),Qn=so("%"),ye=so("px"),MC=so("vh"),RC=so("vw"),qy={...Qn,parse:n=>Qn.parse(n)/100,transform:n=>Qn.transform(n*100)},OC={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},BC={rotate:Wa,rotateX:Wa,rotateY:Wa,rotateZ:Wa,scale:kr,scaleX:kr,scaleY:kr,scaleZ:kr,skew:Wa,skewX:Wa,skewY:Wa,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Ql,originX:qy,originY:qy,originZ:ye},Yy={...Ui,transform:Math.round},Xf={...OC,...BC,zIndex:Yy,size:ye,fillOpacity:Ql,strokeOpacity:Ql,numOctaves:Yy},LC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},IC=Ii.length;function UC(n,a,i){let o="",r=!0;for(let d=0;d<IC;d++){const u=Ii[d],p=n[u];if(p===void 0)continue;let m=!0;if(typeof p=="number"?m=p===(u.startsWith("scale")?1:0):m=parseFloat(p)===0,!m||i){const g=db(p,Xf[u]);if(!m){r=!1;const v=LC[u]||u;o+=`${v}(${g}) `}i&&(a[u]=g)}}return o=o.trim(),i?o=i(a,r?"":o):r&&(o="none"),o}function Qf(n,a,i){const{style:o,vars:r,transformOrigin:d}=n;let u=!1,p=!1;for(const m in a){const g=a[m];if(Is.has(m)){u=!0;continue}else if(ub(m)){r[m]=g;continue}else{const v=db(g,Xf[m]);m.startsWith("origin")?(p=!0,d[m]=v):o[m]=v}}if(a.transform||(u||i?o.transform=UC(a,n.transform,i):o.transform&&(o.transform="none")),p){const{originX:m="50%",originY:g="50%",originZ:v=0}=d;o.transformOrigin=`${m} ${g} ${v}`}}const zC={offset:"stroke-dashoffset",array:"stroke-dasharray"},VC={offset:"strokeDashoffset",array:"strokeDasharray"};function HC(n,a,i=1,o=0,r=!0){n.pathLength=1;const d=r?zC:VC;n[d.offset]=ye.transform(-o);const u=ye.transform(a),p=ye.transform(i);n[d.array]=`${u} ${p}`}function Ky(n,a,i){return typeof n=="string"?n:ye.transform(a+i*n)}function GC(n,a,i){const o=Ky(a,n.x,n.width),r=Ky(i,n.y,n.height);return`${o} ${r}`}function Wf(n,{attrX:a,attrY:i,attrScale:o,originX:r,originY:d,pathLength:u,pathSpacing:p=1,pathOffset:m=0,...g},v,y){if(Qf(n,g,y),v){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:x,style:T,dimensions:C}=n;x.transform&&(C&&(T.transform=x.transform),delete x.transform),C&&(r!==void 0||d!==void 0||T.transform)&&(T.transformOrigin=GC(C,r!==void 0?r:.5,d!==void 0?d:.5)),a!==void 0&&(x.x=a),i!==void 0&&(x.y=i),o!==void 0&&(x.scale=o),u!==void 0&&HC(x,u,p,m,!1)}const Jf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),fb=()=>({...Jf(),attrs:{}}),eh=n=>typeof n=="string"&&n.toLowerCase()==="svg";function hb(n,{style:a,vars:i},o,r){Object.assign(n.style,a,r&&r.getProjectionStyles(o));for(const d in i)n.style.setProperty(d,i[d])}const pb=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 mb(n,a,i,o){hb(n,a,void 0,o);for(const r in a.attrs)n.setAttribute(pb.has(r)?r:$f(r),a.attrs[r])}const Vr={};function PC(n){Object.assign(Vr,n)}function gb(n,{layout:a,layoutId:i}){return Is.has(n)||n.startsWith("origin")||(a||i!==void 0)&&(!!Vr[n]||n==="opacity")}function th(n,a,i){var o;const{style:r}=n,d={};for(const u in r)(Yt(r[u])||a.style&&Yt(a.style[u])||gb(u,n)||((o=i==null?void 0:i.getValue(u))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(d[u]=r[u]);return d}function yb(n,a,i){const o=th(n,a,i);for(const r in n)if(Yt(n[r])||Yt(a[r])){const d=Ii.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[d]=n[r]}return o}function FC(n,a){try{a.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{a.dimensions={x:0,y:0,width:0,height:0}}}const Zy=["x","y","width","height","cx","cy","r"],$C={useVisualState:rb({scrapeMotionValuesFromProps:yb,createRenderState:fb,onUpdate:({props:n,prevProps:a,current:i,renderState:o,latestValues:r})=>{if(!i)return;let d=!!n.drag;if(!d){for(const p in r)if(Is.has(p)){d=!0;break}}if(!d)return;let u=!a;if(a)for(let p=0;p<Zy.length;p++){const m=Zy[p];n[m]!==a[m]&&(u=!0)}u&&rt.read(()=>{FC(i,o),rt.render(()=>{Wf(o,r,eh(i.tagName),n.transformTemplate),mb(i,o)})})}})},qC={useVisualState:rb({scrapeMotionValuesFromProps:th,createRenderState:Jf})};function vb(n,a,i){for(const o in a)!Yt(a[o])&&!gb(o,i)&&(n[o]=a[o])}function YC({transformTemplate:n},a){return S.useMemo(()=>{const i=Jf();return Qf(i,a,n),Object.assign({},i.vars,i.style)},[a])}function KC(n,a){const i=n.style||{},o={};return vb(o,i,n),Object.assign(o,YC(n,a)),o}function ZC(n,a){const i={},o=KC(n,a);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=o,i}function XC(n,a,i,o){const r=S.useMemo(()=>{const d=fb();return Wf(d,a,eh(o),n.transformTemplate),{...d.attrs,style:{...d.style}}},[a]);if(n.style){const d={};vb(d,n.style,n),r.style={...d,...r.style}}return r}function QC(n=!1){return(i,o,r,{latestValues:d},u)=>{const m=(Yf(i)?XC:ZC)(o,d,u,i),g=fC(o,typeof i=="string",n),v=i!==S.Fragment?{...g,...m,ref:r}:{},{children:y}=o,x=S.useMemo(()=>Yt(y)?y.get():y,[y]);return S.createElement(i,{...v,children:x})}}function WC(n,a){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const u={...Yf(o)?$C:qC,preloadedFeatures:n,useRender:QC(r),createVisualElement:a,Component:o};return xC(u)}}function bb(n,a){if(!Array.isArray(a))return!1;const i=a.length;if(i!==n.length)return!1;for(let o=0;o<i;o++)if(a[o]!==n[o])return!1;return!0}function oc(n,a,i){const o=n.getProps();return Kf(o,a,i!==void 0?i:o.custom,n)}function nh(n,a){return n?n[a]||n.default||n:void 0}const Sb=new Set(["width","height","top","left","right","bottom",...Ii]);let Lr;function JC(){Lr=void 0}const Wn={now:()=>(Lr===void 0&&Wn.set(Ft.isProcessing||lC.useManualTiming?Ft.timestamp:performance.now()),Lr),set:n=>{Lr=n,queueMicrotask(JC)}};function ah(n,a){n.indexOf(a)===-1&&n.push(a)}function sh(n,a){const i=n.indexOf(a);i>-1&&n.splice(i,1)}class ih{constructor(){this.subscriptions=[]}add(a){return ah(this.subscriptions,a),()=>sh(this.subscriptions,a)}notify(a,i,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](a,i,o);else for(let d=0;d<r;d++){const u=this.subscriptions[d];u&&u(a,i,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function xb(n,a){return a?n*(1e3/a):0}const Xy=30,eA=n=>!isNaN(parseFloat(n));class tA{constructor(a,i={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const d=Wn.now();this.updatedAt!==d&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(a),this.owner=i.owner}setCurrent(a){this.current=a,this.updatedAt=Wn.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=eA(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,i){this.events[a]||(this.events[a]=new ih);const o=this.events[a].add(i);return a==="change"?()=>{o(),rt.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,i){this.passiveEffect=a,this.stopPassiveEffect=i}set(a,i=!0){!i||!this.passiveEffect?this.updateAndNotify(a,i):this.passiveEffect(a,this.updateAndNotify)}setWithVelocity(a,i,o){this.set(i),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,i=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=Wn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Xy)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,Xy);return xb(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(a){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=a(i),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 Wl(n,a){return new tA(n,a)}function nA(n,a,i){n.hasValue(a)?n.getValue(a).set(i):n.addValue(a,Wl(i))}function aA(n,a){const i=oc(n,a);let{transitionEnd:o={},transition:r={},...d}=i||{};d={...d,...o};for(const u in d){const p=kC(d[u]);nA(n,u,p)}}function sA(n){return!!(Yt(n)&&n.add)}function lf(n,a){const i=n.getValue("willChange");if(sA(i))return i.add(a)}function _b(n){return n.props[ib]}function lh(n){let a;return()=>(a===void 0&&(a=n()),a)}const iA=lh(()=>window.ScrollTimeline!==void 0);class lA{constructor(a){this.stop=()=>this.runAll("stop"),this.animations=a.filter(Boolean)}get finished(){return Promise.all(this.animations.map(a=>"finished"in a?a.finished:a))}getAll(a){return this.animations[0][a]}setAll(a,i){for(let o=0;o<this.animations.length;o++)this.animations[o][a]=i}attachTimeline(a,i){const o=this.animations.map(r=>{if(iA()&&r.attachTimeline)return r.attachTimeline(a);if(typeof i=="function")return i(r)});return()=>{o.forEach((r,d)=>{r&&r(),this.animations[d].stop()})}}get time(){return this.getAll("time")}set time(a){this.setAll("time",a)}get speed(){return this.getAll("speed")}set speed(a){this.setAll("speed",a)}get startTime(){return this.getAll("startTime")}get duration(){let a=0;for(let i=0;i<this.animations.length;i++)a=Math.max(a,this.animations[i].duration);return a}runAll(a){this.animations.forEach(i=>i[a]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class oA extends lA{then(a,i){return Promise.all(this.animations).then(a).catch(i)}}const xa=n=>n*1e3,_a=n=>n/1e3;function oh(n){return typeof n=="function"}function Qy(n,a){n.timeline=a,n.onfinish=null}const rh=n=>Array.isArray(n)&&typeof n[0]=="number",rA={linearEasing:void 0};function cA(n,a){const i=lh(n);return()=>{var o;return(o=rA[a])!==null&&o!==void 0?o:i()}}const Hr=cA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ri=(n,a,i)=>{const o=a-n;return o===0?1:(i-n)/o},Tb=(n,a,i=10)=>{let o="";const r=Math.max(Math.round(a/i),2);for(let d=0;d<r;d++)o+=n(Ri(0,r-1,d))+", ";return`linear(${o.substring(0,o.length-2)})`};function Eb(n){return!!(typeof n=="function"&&Hr()||!n||typeof n=="string"&&(n in of||Hr())||rh(n)||Array.isArray(n)&&n.every(Eb))}const Ul=([n,a,i,o])=>`cubic-bezier(${n}, ${a}, ${i}, ${o})`,of={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ul([0,.65,.55,1]),circOut:Ul([.55,0,1,.45]),backIn:Ul([.31,.01,.66,-.59]),backOut:Ul([.33,1.53,.69,.99])};function Cb(n,a){if(n)return typeof n=="function"&&Hr()?Tb(n,a):rh(n)?Ul(n):Array.isArray(n)?n.map(i=>Cb(i,a)||of.easeOut):of[n]}const Ab=(n,a,i)=>(((1-3*i+3*a)*n+(3*i-6*a))*n+3*a)*n,uA=1e-7,dA=12;function fA(n,a,i,o,r){let d,u,p=0;do u=a+(i-a)/2,d=Ab(u,o,r)-n,d>0?i=u:a=u;while(Math.abs(d)>uA&&++p<dA);return u}function io(n,a,i,o){if(n===a&&i===o)return pn;const r=d=>fA(d,0,1,n,i);return d=>d===0||d===1?d:Ab(r(d),a,o)}const kb=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,wb=n=>a=>1-n(1-a),Nb=io(.33,1.53,.69,.99),ch=wb(Nb),jb=kb(ch),Db=n=>(n*=2)<1?.5*ch(n):.5*(2-Math.pow(2,-10*(n-1))),uh=n=>1-Math.sin(Math.acos(n)),Mb=wb(uh),Rb=kb(uh),Ob=n=>/^0[^.\s]+$/u.test(n);function hA(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Ob(n):!0}const Gl=n=>Math.round(n*1e5)/1e5,dh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pA(n){return n==null}const mA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fh=(n,a)=>i=>!!(typeof i=="string"&&mA.test(i)&&i.startsWith(n)||a&&!pA(i)&&Object.prototype.hasOwnProperty.call(i,a)),Bb=(n,a,i)=>o=>{if(typeof o!="string")return o;const[r,d,u,p]=o.match(dh);return{[n]:parseFloat(r),[a]:parseFloat(d),[i]:parseFloat(u),alpha:p!==void 0?parseFloat(p):1}},gA=n=>Ea(0,255,n),Md={...Ui,transform:n=>Math.round(gA(n))},Ms={test:fh("rgb","red"),parse:Bb("red","green","blue"),transform:({red:n,green:a,blue:i,alpha:o=1})=>"rgba("+Md.transform(n)+", "+Md.transform(a)+", "+Md.transform(i)+", "+Gl(Ql.transform(o))+")"};function yA(n){let a="",i="",o="",r="";return n.length>5?(a=n.substring(1,3),i=n.substring(3,5),o=n.substring(5,7),r=n.substring(7,9)):(a=n.substring(1,2),i=n.substring(2,3),o=n.substring(3,4),r=n.substring(4,5),a+=a,i+=i,o+=o,r+=r),{red:parseInt(a,16),green:parseInt(i,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const rf={test:fh("#"),parse:yA,transform:Ms.transform},Ai={test:fh("hsl","hue"),parse:Bb("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:i,alpha:o=1})=>"hsla("+Math.round(n)+", "+Qn.transform(Gl(a))+", "+Qn.transform(Gl(i))+", "+Gl(Ql.transform(o))+")"},qt={test:n=>Ms.test(n)||rf.test(n)||Ai.test(n),parse:n=>Ms.test(n)?Ms.parse(n):Ai.test(n)?Ai.parse(n):rf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Ms.transform(n):Ai.transform(n)},vA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function bA(n){var a,i;return isNaN(n)&&typeof n=="string"&&(((a=n.match(dh))===null||a===void 0?void 0:a.length)||0)+(((i=n.match(vA))===null||i===void 0?void 0:i.length)||0)>0}const Lb="number",Ib="color",SA="var",xA="var(",Wy="${}",_A=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Jl(n){const a=n.toString(),i=[],o={color:[],number:[],var:[]},r=[];let d=0;const p=a.replace(_A,m=>(qt.test(m)?(o.color.push(d),r.push(Ib),i.push(qt.parse(m))):m.startsWith(xA)?(o.var.push(d),r.push(SA),i.push(m)):(o.number.push(d),r.push(Lb),i.push(parseFloat(m))),++d,Wy)).split(Wy);return{values:i,split:p,indexes:o,types:r}}function Ub(n){return Jl(n).values}function zb(n){const{split:a,types:i}=Jl(n),o=a.length;return r=>{let d="";for(let u=0;u<o;u++)if(d+=a[u],r[u]!==void 0){const p=i[u];p===Lb?d+=Gl(r[u]):p===Ib?d+=qt.transform(r[u]):d+=r[u]}return d}}const TA=n=>typeof n=="number"?0:n;function EA(n){const a=Ub(n);return zb(n)(a.map(TA))}const ss={test:bA,parse:Ub,createTransformer:zb,getAnimatableNone:EA},CA=new Set(["brightness","contrast","saturate","opacity"]);function AA(n){const[a,i]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=i.match(dh)||[];if(!o)return n;const r=i.replace(o,"");let d=CA.has(a)?1:0;return o!==i&&(d*=100),a+"("+d+r+")"}const kA=/\b([a-z-]*)\(.*?\)/gu,cf={...ss,getAnimatableNone:n=>{const a=n.match(kA);return a?a.map(AA).join(" "):n}},wA={...Xf,color:qt,backgroundColor:qt,outlineColor:qt,fill:qt,stroke:qt,borderColor:qt,borderTopColor:qt,borderRightColor:qt,borderBottomColor:qt,borderLeftColor:qt,filter:cf,WebkitFilter:cf},hh=n=>wA[n];function Vb(n,a){let i=hh(n);return i!==cf&&(i=ss),i.getAnimatableNone?i.getAnimatableNone(a):void 0}const NA=new Set(["auto","none","0"]);function jA(n,a,i){let o=0,r;for(;o<n.length&&!r;){const d=n[o];typeof d=="string"&&!NA.has(d)&&Jl(d).values.length&&(r=n[o]),o++}if(r&&i)for(const d of a)n[d]=Vb(i,r)}const Jy=n=>n===Ui||n===ye,ev=(n,a)=>parseFloat(n.split(", ")[a]),tv=(n,a)=>(i,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return ev(r[1],a);{const d=o.match(/^matrix\((.+)\)$/u);return d?ev(d[1],n):0}},DA=new Set(["x","y","z"]),MA=Ii.filter(n=>!DA.has(n));function RA(n){const a=[];return MA.forEach(i=>{const o=n.getValue(i);o!==void 0&&(a.push([i,o.get()]),o.set(i.startsWith("scale")?1:0))}),a}const Oi={width:({x:n},{paddingLeft:a="0",paddingRight:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),height:({y:n},{paddingTop:a="0",paddingBottom:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:tv(4,13),y:tv(5,14)};Oi.translateX=Oi.x;Oi.translateY=Oi.y;const Rs=new Set;let uf=!1,df=!1;function Hb(){if(df){const n=Array.from(Rs).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),i=new Map;a.forEach(o=>{const r=RA(o);r.length&&(i.set(o,r),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const r=i.get(o);r&&r.forEach(([d,u])=>{var p;(p=o.getValue(d))===null||p===void 0||p.set(u)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}df=!1,uf=!1,Rs.forEach(n=>n.complete()),Rs.clear()}function Gb(){Rs.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(df=!0)})}function OA(){Gb(),Hb()}class ph{constructor(a,i,o,r,d,u=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...a],this.onComplete=i,this.name=o,this.motionValue=r,this.element=d,this.isAsync=u}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Rs.add(this),uf||(uf=!0,rt.read(Gb),rt.resolveKeyframes(Hb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:i,element:o,motionValue:r}=this;for(let d=0;d<a.length;d++)if(a[d]===null)if(d===0){const u=r==null?void 0:r.get(),p=a[a.length-1];if(u!==void 0)a[0]=u;else if(o&&i){const m=o.readValue(i,p);m!=null&&(a[0]=m)}a[0]===void 0&&(a[0]=p),r&&u===void 0&&r.set(a[0])}else a[d]=a[d-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Rs.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Rs.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Pb=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),BA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function LA(n){const a=BA.exec(n);if(!a)return[,];const[,i,o,r]=a;return[`--${i??o}`,r]}function Fb(n,a,i=1){const[o,r]=LA(n);if(!o)return;const d=window.getComputedStyle(a).getPropertyValue(o);if(d){const u=d.trim();return Pb(u)?parseFloat(u):u}return Zf(r)?Fb(r,a,i+1):r}const $b=n=>a=>a.test(n),IA={test:n=>n==="auto",parse:n=>n},qb=[Ui,ye,Qn,Wa,RC,MC,IA],nv=n=>qb.find($b(n));class Yb extends ph{constructor(a,i,o,r,d){super(a,i,o,r,d,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:i,name:o}=this;if(!i||!i.current)return;super.readKeyframes();for(let m=0;m<a.length;m++){let g=a[m];if(typeof g=="string"&&(g=g.trim(),Zf(g))){const v=Fb(g,i.current);v!==void 0&&(a[m]=v),m===a.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!Sb.has(o)||a.length!==2)return;const[r,d]=a,u=nv(r),p=nv(d);if(u!==p)if(Jy(u)&&Jy(p))for(let m=0;m<a.length;m++){const g=a[m];typeof g=="string"&&(a[m]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:i}=this,o=[];for(let r=0;r<a.length;r++)hA(a[r])&&o.push(r);o.length&&jA(a,o,i)}measureInitialState(){const{element:a,unresolvedKeyframes:i,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Oi[o](a.measureViewportBox(),window.getComputedStyle(a.current)),i[0]=this.measuredOrigin;const r=i[i.length-1];r!==void 0&&a.getValue(o,r).jump(r,!1)}measureEndState(){var a;const{element:i,name:o,unresolvedKeyframes:r}=this;if(!i||!i.current)return;const d=i.getValue(o);d&&d.jump(this.measuredOrigin,!1);const u=r.length-1,p=r[u];r[u]=Oi[o](i.measureViewportBox(),window.getComputedStyle(i.current)),p!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=p),!((a=this.removedTransforms)===null||a===void 0)&&a.length&&this.removedTransforms.forEach(([m,g])=>{i.getValue(m).set(g)}),this.resolveNoneKeyframes()}}const av=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(ss.test(n)||n==="0")&&!n.startsWith("url("));function UA(n){const a=n[0];if(n.length===1)return!0;for(let i=0;i<n.length;i++)if(n[i]!==a)return!0}function zA(n,a,i,o){const r=n[0];if(r===null)return!1;if(a==="display"||a==="visibility")return!0;const d=n[n.length-1],u=av(r,a),p=av(d,a);return!u||!p?!1:UA(n)||(i==="spring"||oh(i))&&o}const VA=n=>n!==null;function rc(n,{repeat:a,repeatType:i="loop"},o){const r=n.filter(VA),d=a&&i!=="loop"&&a%2===1?0:r.length-1;return!d||o===void 0?r[d]:o}const HA=40;class Kb{constructor({autoplay:a=!0,delay:i=0,type:o="keyframes",repeat:r=0,repeatDelay:d=0,repeatType:u="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Wn.now(),this.options={autoplay:a,delay:i,type:o,repeat:r,repeatDelay:d,repeatType:u,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>HA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&OA(),this._resolved}onKeyframesResolved(a,i){this.resolvedAt=Wn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:d,delay:u,onComplete:p,onUpdate:m,isGenerator:g}=this.options;if(!g&&!zA(a,o,r,d))if(u)this.options.duration=0;else{m&&m(rc(a,this.options,i)),p&&p(),this.resolveFinishedPromise();return}const v=this.initPlayback(a,i);v!==!1&&(this._resolved={keyframes:a,finalKeyframe:i,...v},this.onPostResolved())}onPostResolved(){}then(a,i){return this.currentFinishedPromise.then(a,i)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(a=>{this.resolveFinishedPromise=a})}}const ff=2e4;function Zb(n){let a=0;const i=50;let o=n.next(a);for(;!o.done&&a<ff;)a+=i,o=n.next(a);return a>=ff?1/0:a}const gt=(n,a,i)=>n+(a-n)*i;function Rd(n,a,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?n+(a-n)*6*i:i<1/2?a:i<2/3?n+(a-n)*(2/3-i)*6:n}function GA({hue:n,saturation:a,lightness:i,alpha:o}){n/=360,a/=100,i/=100;let r=0,d=0,u=0;if(!a)r=d=u=i;else{const p=i<.5?i*(1+a):i+a-i*a,m=2*i-p;r=Rd(m,p,n+1/3),d=Rd(m,p,n),u=Rd(m,p,n-1/3)}return{red:Math.round(r*255),green:Math.round(d*255),blue:Math.round(u*255),alpha:o}}function Gr(n,a){return i=>i>0?a:n}const Od=(n,a,i)=>{const o=n*n,r=i*(a*a-o)+o;return r<0?0:Math.sqrt(r)},PA=[rf,Ms,Ai],FA=n=>PA.find(a=>a.test(n));function sv(n){const a=FA(n);if(!a)return!1;let i=a.parse(n);return a===Ai&&(i=GA(i)),i}const iv=(n,a)=>{const i=sv(n),o=sv(a);if(!i||!o)return Gr(n,a);const r={...i};return d=>(r.red=Od(i.red,o.red,d),r.green=Od(i.green,o.green,d),r.blue=Od(i.blue,o.blue,d),r.alpha=gt(i.alpha,o.alpha,d),Ms.transform(r))},$A=(n,a)=>i=>a(n(i)),lo=(...n)=>n.reduce($A),hf=new Set(["none","hidden"]);function qA(n,a){return hf.has(n)?i=>i<=0?n:a:i=>i>=1?a:n}function YA(n,a){return i=>gt(n,a,i)}function mh(n){return typeof n=="number"?YA:typeof n=="string"?Zf(n)?Gr:qt.test(n)?iv:XA:Array.isArray(n)?Xb:typeof n=="object"?qt.test(n)?iv:KA:Gr}function Xb(n,a){const i=[...n],o=i.length,r=n.map((d,u)=>mh(d)(d,a[u]));return d=>{for(let u=0;u<o;u++)i[u]=r[u](d);return i}}function KA(n,a){const i={...n,...a},o={};for(const r in i)n[r]!==void 0&&a[r]!==void 0&&(o[r]=mh(n[r])(n[r],a[r]));return r=>{for(const d in o)i[d]=o[d](r);return i}}function ZA(n,a){var i;const o=[],r={color:0,var:0,number:0};for(let d=0;d<a.values.length;d++){const u=a.types[d],p=n.indexes[u][r[u]],m=(i=n.values[p])!==null&&i!==void 0?i:0;o[d]=m,r[u]++}return o}const XA=(n,a)=>{const i=ss.createTransformer(a),o=Jl(n),r=Jl(a);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?hf.has(n)&&!r.values.length||hf.has(a)&&!o.values.length?qA(n,a):lo(Xb(ZA(o,r),r.values),i):Gr(n,a)};function Qb(n,a,i){return typeof n=="number"&&typeof a=="number"&&typeof i=="number"?gt(n,a,i):mh(n)(n,a)}const QA=5;function Wb(n,a,i){const o=Math.max(a-QA,0);return xb(i-n(o),a-o)}const xt={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},Bd=.001;function WA({duration:n=xt.duration,bounce:a=xt.bounce,velocity:i=xt.velocity,mass:o=xt.mass}){let r,d,u=1-a;u=Ea(xt.minDamping,xt.maxDamping,u),n=Ea(xt.minDuration,xt.maxDuration,_a(n)),u<1?(r=g=>{const v=g*u,y=v*n,x=v-i,T=pf(g,u),C=Math.exp(-y);return Bd-x/T*C},d=g=>{const y=g*u*n,x=y*i+i,T=Math.pow(u,2)*Math.pow(g,2)*n,C=Math.exp(-y),k=pf(Math.pow(g,2),u);return(-r(g)+Bd>0?-1:1)*((x-T)*C)/k}):(r=g=>{const v=Math.exp(-g*n),y=(g-i)*n+1;return-Bd+v*y},d=g=>{const v=Math.exp(-g*n),y=(i-g)*(n*n);return v*y});const p=5/n,m=ek(r,d,p);if(n=xa(n),isNaN(m))return{stiffness:xt.stiffness,damping:xt.damping,duration:n};{const g=Math.pow(m,2)*o;return{stiffness:g,damping:u*2*Math.sqrt(o*g),duration:n}}}const JA=12;function ek(n,a,i){let o=i;for(let r=1;r<JA;r++)o=o-n(o)/a(o);return o}function pf(n,a){return n*Math.sqrt(1-a*a)}const tk=["duration","bounce"],nk=["stiffness","damping","mass"];function lv(n,a){return a.some(i=>n[i]!==void 0)}function ak(n){let a={velocity:xt.velocity,stiffness:xt.stiffness,damping:xt.damping,mass:xt.mass,isResolvedFromDuration:!1,...n};if(!lv(n,nk)&&lv(n,tk))if(n.visualDuration){const i=n.visualDuration,o=2*Math.PI/(i*1.2),r=o*o,d=2*Ea(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:xt.mass,stiffness:r,damping:d}}else{const i=WA(n);a={...a,...i,mass:xt.mass},a.isResolvedFromDuration=!0}return a}function Jb(n=xt.visualDuration,a=xt.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:r}=i;const d=i.keyframes[0],u=i.keyframes[i.keyframes.length-1],p={done:!1,value:d},{stiffness:m,damping:g,mass:v,duration:y,velocity:x,isResolvedFromDuration:T}=ak({...i,velocity:-_a(i.velocity||0)}),C=x||0,k=g/(2*Math.sqrt(m*v)),w=u-d,E=_a(Math.sqrt(m/v)),A=Math.abs(w)<5;o||(o=A?xt.restSpeed.granular:xt.restSpeed.default),r||(r=A?xt.restDelta.granular:xt.restDelta.default);let j;if(k<1){const O=pf(E,k);j=F=>{const H=Math.exp(-k*E*F);return u-H*((C+k*E*w)/O*Math.sin(O*F)+w*Math.cos(O*F))}}else if(k===1)j=O=>u-Math.exp(-E*O)*(w+(C+E*w)*O);else{const O=E*Math.sqrt(k*k-1);j=F=>{const H=Math.exp(-k*E*F),D=Math.min(O*F,300);return u-H*((C+k*E*w)*Math.sinh(D)+O*w*Math.cosh(D))/O}}const V={calculatedDuration:T&&y||null,next:O=>{const F=j(O);if(T)p.done=O>=y;else{let H=0;k<1&&(H=O===0?xa(C):Wb(j,O,F));const D=Math.abs(H)<=o,U=Math.abs(u-F)<=r;p.done=D&&U}return p.value=p.done?u:F,p},toString:()=>{const O=Math.min(Zb(V),ff),F=Tb(H=>V.next(O*H).value,O,30);return O+"ms "+F}};return V}function ov({keyframes:n,velocity:a=0,power:i=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:d=500,modifyTarget:u,min:p,max:m,restDelta:g=.5,restSpeed:v}){const y=n[0],x={done:!1,value:y},T=D=>p!==void 0&&D<p||m!==void 0&&D>m,C=D=>p===void 0?m:m===void 0||Math.abs(p-D)<Math.abs(m-D)?p:m;let k=i*a;const w=y+k,E=u===void 0?w:u(w);E!==w&&(k=E-y);const A=D=>-k*Math.exp(-D/o),j=D=>E+A(D),V=D=>{const U=A(D),ee=j(D);x.done=Math.abs(U)<=g,x.value=x.done?E:ee};let O,F;const H=D=>{T(x.value)&&(O=D,F=Jb({keyframes:[x.value,C(x.value)],velocity:Wb(j,D,x.value),damping:r,stiffness:d,restDelta:g,restSpeed:v}))};return H(0),{calculatedDuration:null,next:D=>{let U=!1;return!F&&O===void 0&&(U=!0,V(D),H(D)),O!==void 0&&D>=O?F.next(D-O):(!U&&V(D),x)}}}const sk=io(.42,0,1,1),ik=io(0,0,.58,1),e1=io(.42,0,.58,1),lk=n=>Array.isArray(n)&&typeof n[0]!="number",ok={linear:pn,easeIn:sk,easeInOut:e1,easeOut:ik,circIn:uh,circInOut:Rb,circOut:Mb,backIn:ch,backInOut:jb,backOut:Nb,anticipate:Db},rv=n=>{if(rh(n)){eb(n.length===4);const[a,i,o,r]=n;return io(a,i,o,r)}else if(typeof n=="string")return ok[n];return n};function rk(n,a,i){const o=[],r=i||Qb,d=n.length-1;for(let u=0;u<d;u++){let p=r(n[u],n[u+1]);if(a){const m=Array.isArray(a)?a[u]||pn:a;p=lo(m,p)}o.push(p)}return o}function ck(n,a,{clamp:i=!0,ease:o,mixer:r}={}){const d=n.length;if(eb(d===a.length),d===1)return()=>a[0];if(d===2&&a[0]===a[1])return()=>a[1];const u=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),a=[...a].reverse());const p=rk(a,o,r),m=p.length,g=v=>{if(u&&v<n[0])return a[0];let y=0;if(m>1)for(;y<n.length-2&&!(v<n[y+1]);y++);const x=Ri(n[y],n[y+1],v);return p[y](x)};return i?v=>g(Ea(n[0],n[d-1],v)):g}function uk(n,a){const i=n[n.length-1];for(let o=1;o<=a;o++){const r=Ri(0,a,o);n.push(gt(i,1,r))}}function dk(n){const a=[0];return uk(a,n.length-1),a}function fk(n,a){return n.map(i=>i*a)}function hk(n,a){return n.map(()=>a||e1).splice(0,n.length-1)}function Pr({duration:n=300,keyframes:a,times:i,ease:o="easeInOut"}){const r=lk(o)?o.map(rv):rv(o),d={done:!1,value:a[0]},u=fk(i&&i.length===a.length?i:dk(a),n),p=ck(u,a,{ease:Array.isArray(r)?r:hk(a,r)});return{calculatedDuration:n,next:m=>(d.value=p(m),d.done=m>=n,d)}}const pk=n=>{const a=({timestamp:i})=>n(i);return{start:()=>rt.update(a,!0),stop:()=>as(a),now:()=>Ft.isProcessing?Ft.timestamp:Wn.now()}},mk={decay:ov,inertia:ov,tween:Pr,keyframes:Pr,spring:Jb},gk=n=>n/100;class gh extends Kb{constructor(a){super(a),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:m}=this.options;m&&m()};const{name:i,motionValue:o,element:r,keyframes:d}=this.options,u=(r==null?void 0:r.KeyframeResolver)||ph,p=(m,g)=>this.onKeyframesResolved(m,g);this.resolver=new u(d,p,i,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(a){const{type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:d,velocity:u=0}=this.options,p=oh(i)?i:mk[i]||Pr;let m,g;p!==Pr&&typeof a[0]!="number"&&(m=lo(gk,Qb(a[0],a[1])),a=[0,100]);const v=p({...this.options,keyframes:a});d==="mirror"&&(g=p({...this.options,keyframes:[...a].reverse(),velocity:-u})),v.calculatedDuration===null&&(v.calculatedDuration=Zb(v));const{calculatedDuration:y}=v,x=y+r,T=x*(o+1)-r;return{generator:v,mirroredGenerator:g,mapPercentToKeyframes:m,calculatedDuration:y,resolvedDuration:x,totalDuration:T}}onPostResolved(){const{autoplay:a=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!a?this.pause():this.state=this.pendingPlayState}tick(a,i=!1){const{resolved:o}=this;if(!o){const{keyframes:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:r,generator:d,mirroredGenerator:u,mapPercentToKeyframes:p,keyframes:m,calculatedDuration:g,totalDuration:v,resolvedDuration:y}=o;if(this.startTime===null)return d.next(0);const{delay:x,repeat:T,repeatType:C,repeatDelay:k,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-v/this.speed,this.startTime)),i?this.currentTime=a:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(a-this.startTime)*this.speed;const E=this.currentTime-x*(this.speed>=0?1:-1),A=this.speed>=0?E<0:E>v;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=v);let j=this.currentTime,V=d;if(T){const D=Math.min(this.currentTime,v)/y;let U=Math.floor(D),ee=D%1;!ee&&D>=1&&(ee=1),ee===1&&U--,U=Math.min(U,T+1),!!(U%2)&&(C==="reverse"?(ee=1-ee,k&&(ee-=k/y)):C==="mirror"&&(V=u)),j=Ea(0,1,ee)*y}const O=A?{done:!1,value:m[0]}:V.next(j);p&&(O.value=p(O.value));let{done:F}=O;!A&&g!==null&&(F=this.speed>=0?this.currentTime>=v:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&F);return H&&r!==void 0&&(O.value=rc(m,this.options,r)),w&&w(O.value),H&&this.finish(),O}get duration(){const{resolved:a}=this;return a?_a(a.calculatedDuration):0}get time(){return _a(this.currentTime)}set time(a){a=xa(a),this.currentTime=a,this.holdTime!==null||this.speed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.speed)}get speed(){return this.playbackSpeed}set speed(a){const i=this.playbackSpeed!==a;this.playbackSpeed=a,i&&(this.time=_a(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:a=pk,onPlay:i,startTime:o}=this.options;this.driver||(this.driver=a(d=>this.tick(d))),i&&i();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var a;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(a=this.currentTime)!==null&&a!==void 0?a:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:a}=this.options;a&&a()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}}const yk=new Set(["opacity","clipPath","filter","transform"]);function vk(n,a,i,{delay:o=0,duration:r=300,repeat:d=0,repeatType:u="loop",ease:p="easeInOut",times:m}={}){const g={[a]:i};m&&(g.offset=m);const v=Cb(p,r);return Array.isArray(v)&&(g.easing=v),n.animate(g,{delay:o,duration:r,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:d+1,direction:u==="reverse"?"alternate":"normal"})}const bk=lh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Fr=10,Sk=2e4;function xk(n){return oh(n.type)||n.type==="spring"||!Eb(n.ease)}function _k(n,a){const i=new gh({...a,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const r=[];let d=0;for(;!o.done&&d<Sk;)o=i.sample(d),r.push(o.value),d+=Fr;return{times:void 0,keyframes:r,duration:d-Fr,ease:"linear"}}const t1={anticipate:Db,backInOut:jb,circInOut:Rb};function Tk(n){return n in t1}class cv extends Kb{constructor(a){super(a);const{name:i,motionValue:o,element:r,keyframes:d}=this.options;this.resolver=new Yb(d,(u,p)=>this.onKeyframesResolved(u,p),i,o,r),this.resolver.scheduleResolve()}initPlayback(a,i){let{duration:o=300,times:r,ease:d,type:u,motionValue:p,name:m,startTime:g}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof d=="string"&&Hr()&&Tk(d)&&(d=t1[d]),xk(this.options)){const{onComplete:y,onUpdate:x,motionValue:T,element:C,...k}=this.options,w=_k(a,k);a=w.keyframes,a.length===1&&(a[1]=a[0]),o=w.duration,r=w.times,d=w.ease,u="keyframes"}const v=vk(p.owner.current,m,a,{...this.options,duration:o,times:r,ease:d});return v.startTime=g??this.calcStartTime(),this.pendingTimeline?(Qy(v,this.pendingTimeline),this.pendingTimeline=void 0):v.onfinish=()=>{const{onComplete:y}=this.options;p.set(rc(a,this.options,i)),y&&y(),this.cancel(),this.resolveFinishedPromise()},{animation:v,duration:o,times:r,type:u,ease:d,keyframes:a}}get duration(){const{resolved:a}=this;if(!a)return 0;const{duration:i}=a;return _a(i)}get time(){const{resolved:a}=this;if(!a)return 0;const{animation:i}=a;return _a(i.currentTime||0)}set time(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.currentTime=xa(a)}get speed(){const{resolved:a}=this;if(!a)return 1;const{animation:i}=a;return i.playbackRate}set speed(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.playbackRate=a}get state(){const{resolved:a}=this;if(!a)return"idle";const{animation:i}=a;return i.playState}get startTime(){const{resolved:a}=this;if(!a)return null;const{animation:i}=a;return i.startTime}attachTimeline(a){if(!this._resolved)this.pendingTimeline=a;else{const{resolved:i}=this;if(!i)return pn;const{animation:o}=i;Qy(o,a)}return pn}play(){if(this.isStopped)return;const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.playState==="finished"&&this.updateFinishedPromise(),i.play()}pause(){const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:a}=this;if(!a)return;const{animation:i,keyframes:o,duration:r,type:d,ease:u,times:p}=a;if(i.playState==="idle"||i.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:v,onComplete:y,element:x,...T}=this.options,C=new gh({...T,keyframes:o,duration:r,type:d,ease:u,times:p,isGenerator:!0}),k=xa(this.time);g.setWithVelocity(C.sample(k-Fr).value,C.sample(k).value,Fr)}const{onStop:m}=this.options;m&&m(),this.cancel()}complete(){const{resolved:a}=this;a&&a.animation.finish()}cancel(){const{resolved:a}=this;a&&a.animation.cancel()}static supports(a){const{motionValue:i,name:o,repeatDelay:r,repeatType:d,damping:u,type:p}=a;if(!i||!i.owner||!(i.owner.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=i.owner.getProps();return bk()&&o&&yk.has(o)&&!m&&!g&&!r&&d!=="mirror"&&u!==0&&p!=="inertia"}}const Ek={type:"spring",stiffness:500,damping:25,restSpeed:10},Ck=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Ak={type:"keyframes",duration:.8},kk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wk=(n,{keyframes:a})=>a.length>2?Ak:Is.has(n)?n.startsWith("scale")?Ck(a[1]):Ek:kk;function Nk({when:n,delay:a,delayChildren:i,staggerChildren:o,staggerDirection:r,repeat:d,repeatType:u,repeatDelay:p,from:m,elapsed:g,...v}){return!!Object.keys(v).length}const yh=(n,a,i,o={},r,d)=>u=>{const p=nh(o,n)||{},m=p.delay||o.delay||0;let{elapsed:g=0}=o;g=g-xa(m);let v={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:a.getVelocity(),...p,delay:-g,onUpdate:x=>{a.set(x),p.onUpdate&&p.onUpdate(x)},onComplete:()=>{u(),p.onComplete&&p.onComplete()},name:n,motionValue:a,element:d?void 0:r};Nk(p)||(v={...v,...wk(n,v)}),v.duration&&(v.duration=xa(v.duration)),v.repeatDelay&&(v.repeatDelay=xa(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let y=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(v.duration=0,v.delay===0&&(y=!0)),y&&!d&&a.get()!==void 0){const x=rc(v.keyframes,p);if(x!==void 0)return rt.update(()=>{v.onUpdate(x),v.onComplete()}),new oA([])}return!d&&cv.supports(v)?new cv(v):new gh(v)};function jk({protectedKeys:n,needsAnimating:a},i){const o=n.hasOwnProperty(i)&&a[i]!==!0;return a[i]=!1,o}function n1(n,a,{delay:i=0,transitionOverride:o,type:r}={}){var d;let{transition:u=n.getDefaultTransition(),transitionEnd:p,...m}=a;o&&(u=o);const g=[],v=r&&n.animationState&&n.animationState.getState()[r];for(const y in m){const x=n.getValue(y,(d=n.latestValues[y])!==null&&d!==void 0?d:null),T=m[y];if(T===void 0||v&&jk(v,y))continue;const C={delay:i,...nh(u||{},y)};let k=!1;if(window.MotionHandoffAnimation){const E=_b(n);if(E){const A=window.MotionHandoffAnimation(E,y,rt);A!==null&&(C.startTime=A,k=!0)}}lf(n,y),x.start(yh(y,x,T,n.shouldReduceMotion&&Sb.has(y)?{type:!1}:C,n,k));const w=x.animation;w&&g.push(w)}return p&&Promise.all(g).then(()=>{rt.update(()=>{p&&aA(n,p)})}),g}function mf(n,a,i={}){var o;const r=oc(n,a,i.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:d=n.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(d=i.transitionOverride);const u=r?()=>Promise.all(n1(n,r,i)):()=>Promise.resolve(),p=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:v=0,staggerChildren:y,staggerDirection:x}=d;return Dk(n,a,v+g,y,x,i)}:()=>Promise.resolve(),{when:m}=d;if(m){const[g,v]=m==="beforeChildren"?[u,p]:[p,u];return g().then(()=>v())}else return Promise.all([u(),p(i.delay)])}function Dk(n,a,i=0,o=0,r=1,d){const u=[],p=(n.variantChildren.size-1)*o,m=r===1?(g=0)=>g*o:(g=0)=>p-g*o;return Array.from(n.variantChildren).sort(Mk).forEach((g,v)=>{g.notify("AnimationStart",a),u.push(mf(g,a,{...d,delay:i+m(v)}).then(()=>g.notify("AnimationComplete",a)))}),Promise.all(u)}function Mk(n,a){return n.sortNodePosition(a)}function Rk(n,a,i={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const r=a.map(d=>mf(n,d,i));o=Promise.all(r)}else if(typeof a=="string")o=mf(n,a,i);else{const r=typeof a=="function"?oc(n,a,i.custom):a;o=Promise.all(n1(n,r,i))}return o.then(()=>{n.notify("AnimationComplete",a)})}const Ok=Ff.length;function a1(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?a1(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const a={};for(let i=0;i<Ok;i++){const o=Ff[i],r=n.props[o];(Xl(r)||r===!1)&&(a[o]=r)}return a}const Bk=[...Pf].reverse(),Lk=Pf.length;function Ik(n){return a=>Promise.all(a.map(({animation:i,options:o})=>Rk(n,i,o)))}function Uk(n){let a=Ik(n),i=uv(),o=!0;const r=m=>(g,v)=>{var y;const x=oc(n,v,m==="exit"?(y=n.presenceContext)===null||y===void 0?void 0:y.custom:void 0);if(x){const{transition:T,transitionEnd:C,...k}=x;g={...g,...k,...C}}return g};function d(m){a=m(n)}function u(m){const{props:g}=n,v=a1(n.parent)||{},y=[],x=new Set;let T={},C=1/0;for(let w=0;w<Lk;w++){const E=Bk[w],A=i[E],j=g[E]!==void 0?g[E]:v[E],V=Xl(j),O=E===m?A.isActive:null;O===!1&&(C=w);let F=j===v[E]&&j!==g[E]&&V;if(F&&o&&n.manuallyAnimateOnMount&&(F=!1),A.protectedKeys={...T},!A.isActive&&O===null||!j&&!A.prevProp||ic(j)||typeof j=="boolean")continue;const H=zk(A.prevProp,j);let D=H||E===m&&A.isActive&&!F&&V||w>C&&V,U=!1;const ee=Array.isArray(j)?j:[j];let ne=ee.reduce(r(E),{});O===!1&&(ne={});const{prevResolvedValues:ae={}}=A,ie={...ae,...ne},q=Y=>{D=!0,x.has(Y)&&(U=!0,x.delete(Y)),A.needsAnimating[Y]=!0;const Z=n.getValue(Y);Z&&(Z.liveStyle=!1)};for(const Y in ie){const Z=ne[Y],he=ae[Y];if(T.hasOwnProperty(Y))continue;let W=!1;sf(Z)&&sf(he)?W=!bb(Z,he):W=Z!==he,W?Z!=null?q(Y):x.add(Y):Z!==void 0&&x.has(Y)?q(Y):A.protectedKeys[Y]=!0}A.prevProp=j,A.prevResolvedValues=ne,A.isActive&&(T={...T,...ne}),o&&n.blockInitialAnimation&&(D=!1),D&&(!(F&&H)||U)&&y.push(...ee.map(Y=>({animation:Y,options:{type:E}})))}if(x.size){const w={};x.forEach(E=>{const A=n.getBaseTarget(E),j=n.getValue(E);j&&(j.liveStyle=!0),w[E]=A??null}),y.push({animation:w})}let k=!!y.length;return o&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(k=!1),o=!1,k?a(y):Promise.resolve()}function p(m,g){var v;if(i[m].isActive===g)return Promise.resolve();(v=n.variantChildren)===null||v===void 0||v.forEach(x=>{var T;return(T=x.animationState)===null||T===void 0?void 0:T.setActive(m,g)}),i[m].isActive=g;const y=u(m);for(const x in i)i[x].protectedKeys={};return y}return{animateChanges:u,setActive:p,setAnimateFunction:d,getState:()=>i,reset:()=>{i=uv(),o=!0}}}function zk(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!bb(a,n):!1}function As(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function uv(){return{animate:As(!0),whileInView:As(),whileHover:As(),whileTap:As(),whileDrag:As(),whileFocus:As(),exit:As()}}class ls{constructor(a){this.isMounted=!1,this.node=a}update(){}}class Vk extends ls{constructor(a){super(a),a.animationState||(a.animationState=Uk(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();ic(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:i}=this.node.prevProps||{};a!==i&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)===null||a===void 0||a.call(this)}}let Hk=0;class Gk extends ls{constructor(){super(...arguments),this.id=Hk++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:i}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;const r=this.node.animationState.setActive("exit",!a);i&&!a&&r.then(()=>i(this.id))}mount(){const{register:a}=this.node.presenceContext||{};a&&(this.unmount=a(this.id))}unmount(){}}const Pk={animation:{Feature:Vk},exit:{Feature:Gk}},Vn={x:!1,y:!1};function s1(){return Vn.x||Vn.y}function Fk(n){return n==="x"||n==="y"?Vn[n]?null:(Vn[n]=!0,()=>{Vn[n]=!1}):Vn.x||Vn.y?null:(Vn.x=Vn.y=!0,()=>{Vn.x=Vn.y=!1})}const vh=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function eo(n,a,i,o={passive:!0}){return n.addEventListener(a,i,o),()=>n.removeEventListener(a,i)}function oo(n){return{point:{x:n.pageX,y:n.pageY}}}const $k=n=>a=>vh(a)&&n(a,oo(a));function Pl(n,a,i,o){return eo(n,a,$k(i),o)}const dv=(n,a)=>Math.abs(n-a);function qk(n,a){const i=dv(n.x,a.x),o=dv(n.y,a.y);return Math.sqrt(i**2+o**2)}class i1{constructor(a,i,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:d=!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 y=Id(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,T=qk(y.offset,{x:0,y:0})>=3;if(!x&&!T)return;const{point:C}=y,{timestamp:k}=Ft;this.history.push({...C,timestamp:k});const{onStart:w,onMove:E}=this.handlers;x||(w&&w(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,y)},this.handlePointerMove=(y,x)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=Ld(x,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(y,x)=>{this.end();const{onEnd:T,onSessionEnd:C,resumeAnimation:k}=this.handlers;if(this.dragSnapToOrigin&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Id(y.type==="pointercancel"?this.lastMoveEventInfo:Ld(x,this.transformPagePoint),this.history);this.startEvent&&T&&T(y,w),C&&C(y,w)},!vh(a))return;this.dragSnapToOrigin=d,this.handlers=i,this.transformPagePoint=o,this.contextWindow=r||window;const u=oo(a),p=Ld(u,this.transformPagePoint),{point:m}=p,{timestamp:g}=Ft;this.history=[{...m,timestamp:g}];const{onSessionStart:v}=i;v&&v(a,Id(p,this.history)),this.removeListeners=lo(Pl(this.contextWindow,"pointermove",this.handlePointerMove),Pl(this.contextWindow,"pointerup",this.handlePointerUp),Pl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),as(this.updatePoint)}}function Ld(n,a){return a?{point:a(n.point)}:n}function fv(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Id({point:n},a){return{point:n,delta:fv(n,l1(a)),offset:fv(n,Yk(a)),velocity:Kk(a,.1)}}function Yk(n){return n[0]}function l1(n){return n[n.length-1]}function Kk(n,a){if(n.length<2)return{x:0,y:0};let i=n.length-1,o=null;const r=l1(n);for(;i>=0&&(o=n[i],!(r.timestamp-o.timestamp>xa(a)));)i--;if(!o)return{x:0,y:0};const d=_a(r.timestamp-o.timestamp);if(d===0)return{x:0,y:0};const u={x:(r.x-o.x)/d,y:(r.y-o.y)/d};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}const o1=1e-4,Zk=1-o1,Xk=1+o1,r1=.01,Qk=0-r1,Wk=0+r1;function mn(n){return n.max-n.min}function Jk(n,a,i){return Math.abs(n-a)<=i}function hv(n,a,i,o=.5){n.origin=o,n.originPoint=gt(a.min,a.max,n.origin),n.scale=mn(i)/mn(a),n.translate=gt(i.min,i.max,n.origin)-n.originPoint,(n.scale>=Zk&&n.scale<=Xk||isNaN(n.scale))&&(n.scale=1),(n.translate>=Qk&&n.translate<=Wk||isNaN(n.translate))&&(n.translate=0)}function Fl(n,a,i,o){hv(n.x,a.x,i.x,o?o.originX:void 0),hv(n.y,a.y,i.y,o?o.originY:void 0)}function pv(n,a,i){n.min=i.min+a.min,n.max=n.min+mn(a)}function ew(n,a,i){pv(n.x,a.x,i.x),pv(n.y,a.y,i.y)}function mv(n,a,i){n.min=a.min-i.min,n.max=n.min+mn(a)}function $l(n,a,i){mv(n.x,a.x,i.x),mv(n.y,a.y,i.y)}function tw(n,{min:a,max:i},o){return a!==void 0&&n<a?n=o?gt(a,n,o.min):Math.max(n,a):i!==void 0&&n>i&&(n=o?gt(i,n,o.max):Math.min(n,i)),n}function gv(n,a,i){return{min:a!==void 0?n.min+a:void 0,max:i!==void 0?n.max+i-(n.max-n.min):void 0}}function nw(n,{top:a,left:i,bottom:o,right:r}){return{x:gv(n.x,i,r),y:gv(n.y,a,o)}}function yv(n,a){let i=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([i,o]=[o,i]),{min:i,max:o}}function aw(n,a){return{x:yv(n.x,a.x),y:yv(n.y,a.y)}}function sw(n,a){let i=.5;const o=mn(n),r=mn(a);return r>o?i=Ri(a.min,a.max-o,n.min):o>r&&(i=Ri(n.min,n.max-r,a.min)),Ea(0,1,i)}function iw(n,a){const i={};return a.min!==void 0&&(i.min=a.min-n.min),a.max!==void 0&&(i.max=a.max-n.min),i}const gf=.35;function lw(n=gf){return n===!1?n=0:n===!0&&(n=gf),{x:vv(n,"left","right"),y:vv(n,"top","bottom")}}function vv(n,a,i){return{min:bv(n,a),max:bv(n,i)}}function bv(n,a){return typeof n=="number"?n:n[a]||0}const Sv=()=>({translate:0,scale:1,origin:0,originPoint:0}),ki=()=>({x:Sv(),y:Sv()}),xv=()=>({min:0,max:0}),Ct=()=>({x:xv(),y:xv()});function wn(n){return[n("x"),n("y")]}function c1({top:n,left:a,right:i,bottom:o}){return{x:{min:a,max:i},y:{min:n,max:o}}}function ow({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function rw(n,a){if(!a)return n;const i=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:i.y,left:i.x,bottom:o.y,right:o.x}}function Ud(n){return n===void 0||n===1}function yf({scale:n,scaleX:a,scaleY:i}){return!Ud(n)||!Ud(a)||!Ud(i)}function Ns(n){return yf(n)||u1(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function u1(n){return _v(n.x)||_v(n.y)}function _v(n){return n&&n!=="0%"}function $r(n,a,i){const o=n-i,r=a*o;return i+r}function Tv(n,a,i,o,r){return r!==void 0&&(n=$r(n,r,o)),$r(n,i,o)+a}function vf(n,a=0,i=1,o,r){n.min=Tv(n.min,a,i,o,r),n.max=Tv(n.max,a,i,o,r)}function d1(n,{x:a,y:i}){vf(n.x,a.translate,a.scale,a.originPoint),vf(n.y,i.translate,i.scale,i.originPoint)}const Ev=.999999999999,Cv=1.0000000000001;function cw(n,a,i,o=!1){const r=i.length;if(!r)return;a.x=a.y=1;let d,u;for(let p=0;p<r;p++){d=i[p],u=d.projectionDelta;const{visualElement:m}=d.options;m&&m.props.style&&m.props.style.display==="contents"||(o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Ni(n,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),u&&(a.x*=u.x.scale,a.y*=u.y.scale,d1(n,u)),o&&Ns(d.latestValues)&&Ni(n,d.latestValues))}a.x<Cv&&a.x>Ev&&(a.x=1),a.y<Cv&&a.y>Ev&&(a.y=1)}function wi(n,a){n.min=n.min+a,n.max=n.max+a}function Av(n,a,i,o,r=.5){const d=gt(n.min,n.max,r);vf(n,a,i,d,o)}function Ni(n,a){Av(n.x,a.x,a.scaleX,a.scale,a.originX),Av(n.y,a.y,a.scaleY,a.scale,a.originY)}function f1(n,a){return c1(rw(n.getBoundingClientRect(),a))}function uw(n,a,i){const o=f1(n,i),{scroll:r}=a;return r&&(wi(o.x,r.offset.x),wi(o.y,r.offset.y)),o}const h1=({current:n})=>n?n.ownerDocument.defaultView:null,dw=new WeakMap;class fw{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ct(),this.visualElement=a}start(a,{snapToCursor:i=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=v=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(oo(v).point)},d=(v,y)=>{const{drag:x,dragPropagation:T,onDragStart:C}=this.getProps();if(x&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fk(x),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wn(w=>{let E=this.getAxisMotionValue(w).get()||0;if(Qn.test(E)){const{projection:A}=this.visualElement;if(A&&A.layout){const j=A.layout.layoutBox[w];j&&(E=mn(j)*(parseFloat(E)/100))}}this.originPoint[w]=E}),C&&rt.postRender(()=>C(v,y)),lf(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},u=(v,y)=>{const{dragPropagation:x,dragDirectionLock:T,onDirectionLock:C,onDrag:k}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:w}=y;if(T&&this.currentDirection===null){this.currentDirection=hw(w),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",y.point,w),this.updateAxis("y",y.point,w),this.visualElement.render(),k&&k(v,y)},p=(v,y)=>this.stop(v,y),m=()=>wn(v=>{var y;return this.getAnimationState(v)==="paused"&&((y=this.getAxisMotionValue(v).animation)===null||y===void 0?void 0:y.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new i1(a,{onSessionStart:r,onStart:d,onMove:u,onSessionEnd:p,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:h1(this.visualElement)})}stop(a,i){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:d}=this.getProps();d&&rt.postRender(()=>d(a,i))}cancel(){this.isDragging=!1;const{projection:a,animationState:i}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(a,i,o){const{drag:r}=this.getProps();if(!o||!wr(a,r,this.currentDirection))return;const d=this.getAxisMotionValue(a);let u=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(u=tw(u,this.constraints[a],this.elastic[a])),d.set(u)}resolveConstraints(){var a;const{dragConstraints:i,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)===null||a===void 0?void 0:a.layout,d=this.constraints;i&&Ci(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&r?this.constraints=nw(r.layoutBox,i):this.constraints=!1,this.elastic=lw(o),d!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&wn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=iw(r.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:i}=this.getProps();if(!a||!Ci(a))return!1;const o=a.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const d=uw(o,r.root,this.visualElement.getTransformPagePoint());let u=aw(r.layout.layoutBox,d);if(i){const p=i(ow(u));this.hasMutatedConstraints=!!p,p&&(u=c1(p))}return u}startAnimation(a){const{drag:i,dragMomentum:o,dragElastic:r,dragTransition:d,dragSnapToOrigin:u,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=wn(v=>{if(!wr(v,i,this.currentDirection))return;let y=m&&m[v]||{};u&&(y={min:0,max:0});const x=r?200:1e6,T=r?40:1e7,C={type:"inertia",velocity:o?a[v]:0,bounceStiffness:x,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...d,...y};return this.startAxisValueAnimation(v,C)});return Promise.all(g).then(p)}startAxisValueAnimation(a,i){const o=this.getAxisMotionValue(a);return lf(this.visualElement,a),o.start(yh(a,o,0,i,this.visualElement,!1))}stopAnimation(){wn(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){wn(a=>{var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.pause()})}getAnimationState(a){var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.state}getAxisMotionValue(a){const i=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),r=o[i];return r||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){wn(i=>{const{drag:o}=this.getProps();if(!wr(i,o,this.currentDirection))return;const{projection:r}=this.visualElement,d=this.getAxisMotionValue(i);if(r&&r.layout){const{min:u,max:p}=r.layout.layoutBox[i];d.set(a[i]-gt(u,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:i}=this.getProps(),{projection:o}=this.visualElement;if(!Ci(i)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};wn(u=>{const p=this.getAxisMotionValue(u);if(p&&this.constraints!==!1){const m=p.get();r[u]=sw({min:m,max:m},this.constraints[u])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),wn(u=>{if(!wr(u,a,null))return;const p=this.getAxisMotionValue(u),{min:m,max:g}=this.constraints[u];p.set(gt(m,g,r[u]))})}addListeners(){if(!this.visualElement.current)return;dw.set(this.visualElement,this);const a=this.visualElement.current,i=Pl(a,"pointerdown",m=>{const{drag:g,dragListener:v=!0}=this.getProps();g&&v&&this.start(m)}),o=()=>{const{dragConstraints:m}=this.getProps();Ci(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,d=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),rt.read(o);const u=eo(window,"resize",()=>this.scalePositionWithinConstraints()),p=r.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(wn(v=>{const y=this.getAxisMotionValue(v);y&&(this.originPoint[v]+=m[v].translate,y.set(y.get()+m[v].translate))}),this.visualElement.render())}));return()=>{u(),i(),d(),p&&p()}}getProps(){const a=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:d=!1,dragElastic:u=gf,dragMomentum:p=!0}=a;return{...a,drag:i,dragDirectionLock:o,dragPropagation:r,dragConstraints:d,dragElastic:u,dragMomentum:p}}}function wr(n,a,i){return(a===!0||a===n)&&(i===null||i===n)}function hw(n,a=10){let i=null;return Math.abs(n.y)>a?i="y":Math.abs(n.x)>a&&(i="x"),i}class pw extends ls{constructor(a){super(a),this.removeGroupControls=pn,this.removeListeners=pn,this.controls=new fw(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pn}unmount(){this.removeGroupControls(),this.removeListeners()}}const kv=n=>(a,i)=>{n&&rt.postRender(()=>n(a,i))};class mw extends ls{constructor(){super(...arguments),this.removePointerDownListener=pn}onPointerDown(a){this.session=new i1(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:h1(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:i,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:kv(a),onStart:kv(i),onMove:o,onEnd:(d,u)=>{delete this.session,r&&rt.postRender(()=>r(d,u))}}}mount(){this.removePointerDownListener=Pl(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ir={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wv(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Ol={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(ye.test(n))n=parseFloat(n);else return n;const i=wv(n,a.target.x),o=wv(n,a.target.y);return`${i}% ${o}%`}},gw={correct:(n,{treeScale:a,projectionDelta:i})=>{const o=n,r=ss.parse(n);if(r.length>5)return o;const d=ss.createTransformer(n),u=typeof r[0]!="number"?1:0,p=i.x.scale*a.x,m=i.y.scale*a.y;r[0+u]/=p,r[1+u]/=m;const g=gt(p,m,.5);return typeof r[2+u]=="number"&&(r[2+u]/=g),typeof r[3+u]=="number"&&(r[3+u]/=g),d(r)}};class yw extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o,layoutId:r}=this.props,{projection:d}=a;PC(vw),d&&(i.group&&i.group.add(d),o&&o.register&&r&&o.register(d),d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,onExitComplete:()=>this.safeToRemove()})),Ir.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:i,visualElement:o,drag:r,isPresent:d}=this.props,u=o.projection;return u&&(u.isPresent=d,r||a.layoutDependency!==i||i===void 0?u.willUpdate():this.safeToRemove(),a.isPresent!==d&&(d?u.promote():u.relegate()||rt.postRender(()=>{const p=u.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),qf.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o}=this.props,{projection:r}=a;r&&(r.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function p1(n){const[a,i]=W0(),o=S.useContext(zf);return h.jsx(yw,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(lb),isPresent:a,safeToRemove:i})}const vw={borderRadius:{...Ol,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ol,borderTopRightRadius:Ol,borderBottomLeftRadius:Ol,borderBottomRightRadius:Ol,boxShadow:gw};function bw(n,a,i){const o=Yt(n)?n:Wl(n);return o.start(yh("",o,a,i)),o.animation}function Sw(n){return n instanceof SVGElement&&n.tagName!=="svg"}const xw=(n,a)=>n.depth-a.depth;class _w{constructor(){this.children=[],this.isDirty=!1}add(a){ah(this.children,a),this.isDirty=!0}remove(a){sh(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(xw),this.isDirty=!1,this.children.forEach(a)}}function Tw(n,a){const i=Wn.now(),o=({timestamp:r})=>{const d=r-i;d>=a&&(as(o),n(d-a))};return rt.read(o,!0),()=>as(o)}const m1=["TopLeft","TopRight","BottomLeft","BottomRight"],Ew=m1.length,Nv=n=>typeof n=="string"?parseFloat(n):n,jv=n=>typeof n=="number"||ye.test(n);function Cw(n,a,i,o,r,d){r?(n.opacity=gt(0,i.opacity!==void 0?i.opacity:1,Aw(o)),n.opacityExit=gt(a.opacity!==void 0?a.opacity:1,0,kw(o))):d&&(n.opacity=gt(a.opacity!==void 0?a.opacity:1,i.opacity!==void 0?i.opacity:1,o));for(let u=0;u<Ew;u++){const p=`border${m1[u]}Radius`;let m=Dv(a,p),g=Dv(i,p);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||jv(m)===jv(g)?(n[p]=Math.max(gt(Nv(m),Nv(g),o),0),(Qn.test(g)||Qn.test(m))&&(n[p]+="%")):n[p]=g}(a.rotate||i.rotate)&&(n.rotate=gt(a.rotate||0,i.rotate||0,o))}function Dv(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const Aw=g1(0,.5,Mb),kw=g1(.5,.95,pn);function g1(n,a,i){return o=>o<n?0:o>a?1:i(Ri(n,a,o))}function Mv(n,a){n.min=a.min,n.max=a.max}function kn(n,a){Mv(n.x,a.x),Mv(n.y,a.y)}function Rv(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function Ov(n,a,i,o,r){return n-=a,n=$r(n,1/i,o),r!==void 0&&(n=$r(n,1/r,o)),n}function ww(n,a=0,i=1,o=.5,r,d=n,u=n){if(Qn.test(a)&&(a=parseFloat(a),a=gt(u.min,u.max,a/100)-u.min),typeof a!="number")return;let p=gt(d.min,d.max,o);n===d&&(p-=a),n.min=Ov(n.min,a,i,p,r),n.max=Ov(n.max,a,i,p,r)}function Bv(n,a,[i,o,r],d,u){ww(n,a[i],a[o],a[r],a.scale,d,u)}const Nw=["x","scaleX","originX"],jw=["y","scaleY","originY"];function Lv(n,a,i,o){Bv(n.x,a,Nw,i?i.x:void 0,o?o.x:void 0),Bv(n.y,a,jw,i?i.y:void 0,o?o.y:void 0)}function Iv(n){return n.translate===0&&n.scale===1}function y1(n){return Iv(n.x)&&Iv(n.y)}function Uv(n,a){return n.min===a.min&&n.max===a.max}function Dw(n,a){return Uv(n.x,a.x)&&Uv(n.y,a.y)}function zv(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function v1(n,a){return zv(n.x,a.x)&&zv(n.y,a.y)}function Vv(n){return mn(n.x)/mn(n.y)}function Hv(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class Mw{constructor(){this.members=[]}add(a){ah(this.members,a),a.scheduleRender()}remove(a){if(sh(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(a){const i=this.members.findIndex(r=>a===r);if(i===0)return!1;let o;for(let r=i;r>=0;r--){const d=this.members[r];if(d.isPresent!==!1){o=d;break}}return o?(this.promote(o),!0):!1}promote(a,i){const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.instance&&o.scheduleRender(),a.scheduleRender(),a.resumeFrom=o,i&&(a.resumeFrom.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:r}=a.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:i,resumingFrom:o}=a;i.onExitComplete&&i.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Rw(n,a,i){let o="";const r=n.x.translate/a.x,d=n.y.translate/a.y,u=(i==null?void 0:i.z)||0;if((r||d||u)&&(o=`translate3d(${r}px, ${d}px, ${u}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),i){const{transformPerspective:g,rotate:v,rotateX:y,rotateY:x,skewX:T,skewY:C}=i;g&&(o=`perspective(${g}px) ${o}`),v&&(o+=`rotate(${v}deg) `),y&&(o+=`rotateX(${y}deg) `),x&&(o+=`rotateY(${x}deg) `),T&&(o+=`skewX(${T}deg) `),C&&(o+=`skewY(${C}deg) `)}const p=n.x.scale*a.x,m=n.y.scale*a.y;return(p!==1||m!==1)&&(o+=`scale(${p}, ${m})`),o||"none"}const js={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},zl=typeof window<"u"&&window.MotionDebug!==void 0,zd=["","X","Y","Z"],Ow={visibility:"hidden"},Gv=1e3;let Bw=0;function Vd(n,a,i,o){const{latestValues:r}=a;r[n]&&(i[n]=r[n],a.setStaticValue(n,0),o&&(o[n]=0))}function b1(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const i=_b(a);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:r,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",rt,!(r||d))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&b1(o)}function S1({attachResizeListener:n,defaultParent:a,measureScroll:i,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(u={},p=a==null?void 0:a()){this.id=Bw++,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,zl&&(js.totalNodes=js.resolvedTargetDeltas=js.recalculatedProjection=0),this.nodes.forEach(Uw),this.nodes.forEach(Pw),this.nodes.forEach(Fw),this.nodes.forEach(zw),zl&&window.MotionDebug.record(js)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new _w)}addEventListener(u,p){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new ih),this.eventHandlers.get(u).add(p)}notifyListeners(u,...p){const m=this.eventHandlers.get(u);m&&m.notify(...p)}hasListeners(u){return this.eventHandlers.has(u)}mount(u,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Sw(u),this.instance=u;const{layoutId:m,layout:g,visualElement:v}=this.options;if(v&&!v.current&&v.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(g||m)&&(this.isLayoutDirty=!0),n){let y;const x=()=>this.root.updateBlockedByResize=!1;n(u,()=>{this.root.updateBlockedByResize=!0,y&&y(),y=Tw(x,250),Ir.hasAnimatedSinceResize&&(Ir.hasAnimatedSinceResize=!1,this.nodes.forEach(Fv))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&v&&(m||g)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:x,hasRelativeTargetChanged:T,layout:C})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=this.options.transition||v.getDefaultTransition()||Zw,{onLayoutAnimationStart:w,onLayoutAnimationComplete:E}=v.getProps(),A=!this.targetLayout||!v1(this.targetLayout,C)||T,j=!x&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||j||x&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(y,j);const V={...nh(k,"layout"),onPlay:w,onComplete:E};(v.shouldReduceMotion||this.options.layoutRoot)&&(V.delay=0,V.type=!1),this.startAnimation(V)}else x||Fv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=C})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,as(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($w),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&b1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const y=this.path[v];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Pv);return}this.isUpdating||this.nodes.forEach(Hw),this.isUpdating=!1,this.nodes.forEach(Gw),this.nodes.forEach(Lw),this.nodes.forEach(Iw),this.clearAllSnapshots();const p=Wn.now();Ft.delta=Ea(0,1e3/60,p-Ft.timestamp),Ft.timestamp=p,Ft.isProcessing=!0,Dd.update.process(Ft),Dd.preRender.process(Ft),Dd.render.process(Ft),Ft.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Vw),this.sharedNodes.forEach(qw)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rt.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 m=0;m<this.path.length;m++)this.path[m].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ct(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(p=!1),p){const m=o(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!r)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!y1(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,v=g!==this.prevTransformTemplateValue;u&&(p||Ns(this.latestValues)||v)&&(r(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return u&&(m=this.removeTransform(m)),Xw(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:p}=this.options;if(!p)return Ct();const m=p.measureViewportBox();if(!(((u=this.scroll)===null||u===void 0?void 0:u.wasRoot)||this.path.some(Qw))){const{scroll:v}=this.root;v&&(wi(m.x,v.offset.x),wi(m.y,v.offset.y))}return m}removeElementScroll(u){var p;const m=Ct();if(kn(m,u),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return m;for(let g=0;g<this.path.length;g++){const v=this.path[g],{scroll:y,options:x}=v;v!==this.root&&y&&x.layoutScroll&&(y.wasRoot&&kn(m,u),wi(m.x,y.offset.x),wi(m.y,y.offset.y))}return m}applyTransform(u,p=!1){const m=Ct();kn(m,u);for(let g=0;g<this.path.length;g++){const v=this.path[g];!p&&v.options.layoutScroll&&v.scroll&&v!==v.root&&Ni(m,{x:-v.scroll.offset.x,y:-v.scroll.offset.y}),Ns(v.latestValues)&&Ni(m,v.latestValues)}return Ns(this.latestValues)&&Ni(m,this.latestValues),m}removeTransform(u){const p=Ct();kn(p,u);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!g.instance||!Ns(g.latestValues))continue;yf(g.latestValues)&&g.updateSnapshot();const v=Ct(),y=g.measurePageBox();kn(v,y),Lv(p,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,v)}return Ns(this.latestValues)&&Lv(p,this.latestValues),p}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.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!==Ft.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){var p;const m=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=m.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=m.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=m.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==m;if(!(u||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:x}=this.options;if(!(!this.layout||!(y||x))){if(this.resolvedRelativeTargetAt=Ft.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ct(),this.relativeTargetOrigin=Ct(),$l(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),kn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ct(),this.targetWithTransforms=Ct()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ew(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):kn(this.target,this.layout.layoutBox),d1(this.target,this.targetDelta)):kn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const T=this.getClosestProjectingParent();T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ct(),this.relativeTargetOrigin=Ct(),$l(this.relativeTargetOrigin,this.target,T.target),kn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}zl&&js.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||yf(this.parent.latestValues)||u1(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 u;const p=this.getLead(),m=!!this.resumingFrom||this!==p;let g=!0;if((this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty)&&(g=!1),m&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Ft.timestamp&&(g=!1),g)return;const{layout:v,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(v||y))return;kn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,T=this.treeScale.y;cw(this.layoutCorrected,this.treeScale,this.path,m),p.layout&&!p.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(p.target=p.layout.layoutBox,p.targetWithTransforms=Ct());const{target:C}=p;if(!C){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Rv(this.prevProjectionDelta.x,this.projectionDelta.x),Rv(this.prevProjectionDelta.y,this.projectionDelta.y)),Fl(this.projectionDelta,this.layoutCorrected,C,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==T||!Hv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Hv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",C)),zl&&js.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){var p;if((p=this.options.visualElement)===null||p===void 0||p.scheduleRender(),u){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ki(),this.projectionDelta=ki(),this.projectionDeltaWithTransform=ki()}setAnimationOrigin(u,p=!1){const m=this.snapshot,g=m?m.latestValues:{},v={...this.latestValues},y=ki();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const x=Ct(),T=m?m.source:void 0,C=this.layout?this.layout.source:void 0,k=T!==C,w=this.getStack(),E=!w||w.members.length<=1,A=!!(k&&!E&&this.options.crossfade===!0&&!this.path.some(Kw));this.animationProgress=0;let j;this.mixTargetDelta=V=>{const O=V/1e3;$v(y.x,u.x,O),$v(y.y,u.y,O),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($l(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Yw(this.relativeTarget,this.relativeTargetOrigin,x,O),j&&Dw(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=Ct()),kn(j,this.relativeTarget)),k&&(this.animationValues=v,Cw(v,g,this.latestValues,O,A,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(as(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{Ir.hasAnimatedSinceResize=!0,this.currentAnimation=bw(0,Gv,{...u,onUpdate:p=>{this.mixTargetDelta(p),u.onUpdate&&u.onUpdate(p)},onComplete:()=>{u.onComplete&&u.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 u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Gv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:v}=u;if(!(!p||!m||!g)){if(this!==u&&this.layout&&g&&x1(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||Ct();const y=mn(this.layout.layoutBox.x);m.x.min=u.target.x.min,m.x.max=m.x.min+y;const x=mn(this.layout.layoutBox.y);m.y.min=u.target.y.min,m.y.max=m.y.min+x}kn(p,m),Ni(p,v),Fl(this.projectionDeltaWithTransform,this.layoutCorrected,p,v)}}registerSharedNode(u,p){this.sharedNodes.has(u)||this.sharedNodes.set(u,new Mw),this.sharedNodes.get(u).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var u;const{layoutId:p}=this.options;return p?((u=this.getStack())===null||u===void 0?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:p}=this.options;return p?(u=this.getStack())===null||u===void 0?void 0:u.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:p,preserveFollowOpacity:m}={}){const g=this.getStack();g&&g.promote(this,m),u&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let p=!1;const{latestValues:m}=u;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const g={};m.z&&Vd("z",u,g,this.animationValues);for(let v=0;v<zd.length;v++)Vd(`rotate${zd[v]}`,u,g,this.animationValues),Vd(`skew${zd[v]}`,u,g,this.animationValues);u.render();for(const v in g)u.setStaticValue(v,g[v]),this.animationValues&&(this.animationValues[v]=g[v]);u.scheduleRender()}getProjectionStyles(u){var p,m;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Ow;const g={visibility:""},v=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Br(u==null?void 0:u.pointerEvents)||"",g.transform=v?v(this.latestValues,""):"none",g;const y=this.getLead();if(!this.projectionDelta||!this.layout||!y.target){const k={};return this.options.layoutId&&(k.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,k.pointerEvents=Br(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!Ns(this.latestValues)&&(k.transform=v?v({},""):"none",this.hasProjected=!1),k}const x=y.animationValues||y.latestValues;this.applyTransformsToTarget(),g.transform=Rw(this.projectionDeltaWithTransform,this.treeScale,x),v&&(g.transform=v(x,g.transform));const{x:T,y:C}=this.projectionDelta;g.transformOrigin=`${T.origin*100}% ${C.origin*100}% 0`,y.animationValues?g.opacity=y===this?(m=(p=x.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&m!==void 0?m:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:g.opacity=y===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const k in Vr){if(x[k]===void 0)continue;const{correct:w,applyTo:E}=Vr[k],A=g.transform==="none"?x[k]:w(x[k],y);if(E){const j=E.length;for(let V=0;V<j;V++)g[E[V]]=A}else g[k]=A}return this.options.layoutId&&(g.pointerEvents=y===this?Br(u==null?void 0:u.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>{var p;return(p=u.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(Pv),this.root.sharedNodes.clear()}}}function Lw(n){n.updateLayout()}function Iw(n){var a;const i=((a=n.resumeFrom)===null||a===void 0?void 0:a.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&i&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=n.layout,{animationType:d}=n.options,u=i.source!==n.layout.source;d==="size"?wn(y=>{const x=u?i.measuredBox[y]:i.layoutBox[y],T=mn(x);x.min=o[y].min,x.max=x.min+T}):x1(d,i.layoutBox,o)&&wn(y=>{const x=u?i.measuredBox[y]:i.layoutBox[y],T=mn(o[y]);x.max=x.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[y].max=n.relativeTarget[y].min+T)});const p=ki();Fl(p,o,i.layoutBox);const m=ki();u?Fl(m,n.applyTransform(r,!0),i.measuredBox):Fl(m,o,i.layoutBox);const g=!y1(p);let v=!1;if(!n.resumeFrom){const y=n.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:x,layout:T}=y;if(x&&T){const C=Ct();$l(C,i.layoutBox,x.layoutBox);const k=Ct();$l(k,o,T.layoutBox),v1(C,k)||(v=!0),y.options.layoutRoot&&(n.relativeTarget=k,n.relativeTargetOrigin=C,n.relativeParent=y)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeTargetChanged:v})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function Uw(n){zl&&js.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function zw(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function Vw(n){n.clearSnapshot()}function Pv(n){n.clearMeasurements()}function Hw(n){n.isLayoutDirty=!1}function Gw(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function Fv(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function Pw(n){n.resolveTargetDelta()}function Fw(n){n.calcProjection()}function $w(n){n.resetSkewAndRotation()}function qw(n){n.removeLeadSnapshot()}function $v(n,a,i){n.translate=gt(a.translate,0,i),n.scale=gt(a.scale,1,i),n.origin=a.origin,n.originPoint=a.originPoint}function qv(n,a,i,o){n.min=gt(a.min,i.min,o),n.max=gt(a.max,i.max,o)}function Yw(n,a,i,o){qv(n.x,a.x,i.x,o),qv(n.y,a.y,i.y,o)}function Kw(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const Zw={duration:.45,ease:[.4,0,.1,1]},Yv=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Kv=Yv("applewebkit/")&&!Yv("chrome/")?Math.round:pn;function Zv(n){n.min=Kv(n.min),n.max=Kv(n.max)}function Xw(n){Zv(n.x),Zv(n.y)}function x1(n,a,i){return n==="position"||n==="preserve-aspect"&&!Jk(Vv(a),Vv(i),.2)}function Qw(n){var a;return n!==n.root&&((a=n.scroll)===null||a===void 0?void 0:a.wasRoot)}const Ww=S1({attachResizeListener:(n,a)=>eo(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Hd={current:void 0},_1=S1({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Hd.current){const n=new Ww({});n.mount(window),n.setOptions({layoutScroll:!0}),Hd.current=n}return Hd.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),Jw={pan:{Feature:mw},drag:{Feature:pw,ProjectionNode:_1,MeasureLayout:p1}};function e2(n,a,i){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let r=document;const d=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(n);return d?Array.from(d):[]}return Array.from(n)}function T1(n,a){const i=e2(n),o=new AbortController,r={passive:!0,...a,signal:o.signal};return[i,r,()=>o.abort()]}function Xv(n){return a=>{a.pointerType==="touch"||s1()||n(a)}}function t2(n,a,i={}){const[o,r,d]=T1(n,i),u=Xv(p=>{const{target:m}=p,g=a(p);if(typeof g!="function"||!m)return;const v=Xv(y=>{g(y),m.removeEventListener("pointerleave",v)});m.addEventListener("pointerleave",v,r)});return o.forEach(p=>{p.addEventListener("pointerenter",u,r)}),d}function Qv(n,a,i){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",i==="Start");const r="onHover"+i,d=o[r];d&&rt.postRender(()=>d(a,oo(a)))}class n2 extends ls{mount(){const{current:a}=this.node;a&&(this.unmount=t2(a,i=>(Qv(this.node,i,"Start"),o=>Qv(this.node,o,"End"))))}unmount(){}}class a2 extends ls{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lo(eo(this.node.current,"focus",()=>this.onFocus()),eo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const E1=(n,a)=>a?n===a?!0:E1(n,a.parentElement):!1,s2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function i2(n){return s2.has(n.tagName)||n.tabIndex!==-1}const Vl=new WeakSet;function Wv(n){return a=>{a.key==="Enter"&&n(a)}}function Gd(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const l2=(n,a)=>{const i=n.currentTarget;if(!i)return;const o=Wv(()=>{if(Vl.has(i))return;Gd(i,"down");const r=Wv(()=>{Gd(i,"up")}),d=()=>Gd(i,"cancel");i.addEventListener("keyup",r,a),i.addEventListener("blur",d,a)});i.addEventListener("keydown",o,a),i.addEventListener("blur",()=>i.removeEventListener("keydown",o),a)};function Jv(n){return vh(n)&&!s1()}function o2(n,a,i={}){const[o,r,d]=T1(n,i),u=p=>{const m=p.currentTarget;if(!Jv(p)||Vl.has(m))return;Vl.add(m);const g=a(p),v=(T,C)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",x),!(!Jv(T)||!Vl.has(m))&&(Vl.delete(m),typeof g=="function"&&g(T,{success:C}))},y=T=>{v(T,i.useGlobalTarget||E1(m,T.target))},x=T=>{v(T,!1)};window.addEventListener("pointerup",y,r),window.addEventListener("pointercancel",x,r)};return o.forEach(p=>{!i2(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(i.useGlobalTarget?window:p).addEventListener("pointerdown",u,r),p.addEventListener("focus",g=>l2(g,r),r)}),d}function e0(n,a,i){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",i==="Start");const r="onTap"+(i==="End"?"":i),d=o[r];d&&rt.postRender(()=>d(a,oo(a)))}class r2 extends ls{mount(){const{current:a}=this.node;a&&(this.unmount=o2(a,i=>(e0(this.node,i,"Start"),(o,{success:r})=>e0(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const bf=new WeakMap,Pd=new WeakMap,c2=n=>{const a=bf.get(n.target);a&&a(n)},u2=n=>{n.forEach(c2)};function d2({root:n,...a}){const i=n||document;Pd.has(i)||Pd.set(i,{});const o=Pd.get(i),r=JSON.stringify(a);return o[r]||(o[r]=new IntersectionObserver(u2,{root:n,...a})),o[r]}function f2(n,a,i){const o=d2(a);return bf.set(n,i),o.observe(n),()=>{bf.delete(n),o.unobserve(n)}}const h2={some:0,all:1};class p2 extends ls{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:i,margin:o,amount:r="some",once:d}=a,u={root:i?i.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:h2[r]},p=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,d&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:v,onViewportLeave:y}=this.node.getProps(),x=g?v:y;x&&x(m)};return f2(this.node.current,u,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:i}=this.node;["amount","margin","root"].some(m2(a,i))&&this.startObserver()}unmount(){}}function m2({viewport:n={}},{viewport:a={}}={}){return i=>n[i]!==a[i]}const g2={inView:{Feature:p2},tap:{Feature:r2},focus:{Feature:a2},hover:{Feature:n2}},y2={layout:{ProjectionNode:_1,MeasureLayout:p1}},qr={current:null},bh={current:!1};function C1(){if(bh.current=!0,!!Gf)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>qr.current=n.matches;n.addListener(a),a()}else qr.current=!1}const v2=[...qb,qt,ss],b2=n=>v2.find($b(n)),t0=new WeakMap;function S2(n,a,i){for(const o in a){const r=a[o],d=i[o];if(Yt(r))n.addValue(o,r);else if(Yt(d))n.addValue(o,Wl(r,{owner:n}));else if(d!==r)if(n.hasValue(o)){const u=n.getValue(o);u.liveStyle===!0?u.jump(r):u.hasAnimated||u.set(r)}else{const u=n.getStaticValue(o);n.addValue(o,Wl(u!==void 0?u:r,{owner:n}))}}for(const o in i)a[o]===void 0&&n.removeValue(o);return a}const n0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class x2{scrapeMotionValuesFromProps(a,i,o){return{}}constructor({parent:a,props:i,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:d,visualState:u},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ph,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const T=Wn.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,rt.render(this.render,!1,!0))};const{latestValues:m,renderState:g,onUpdate:v}=u;this.onUpdate=v,this.latestValues=m,this.baseTarget={...m},this.initialValues=i.initial?{...m}:{},this.renderState=g,this.parent=a,this.props=i,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=r,this.options=p,this.blockInitialAnimation=!!d,this.isControllingVariants=lc(i),this.isVariantNode=sb(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:y,...x}=this.scrapeMotionValuesFromProps(i,{},this);for(const T in x){const C=x[T];m[T]!==void 0&&Yt(C)&&C.set(m[T],!1)}}mount(a){this.current=a,t0.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,o)=>this.bindToMotionValue(o,i)),bh.current||C1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qr.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){t0.delete(this.current),this.projection&&this.projection.unmount(),as(this.notifyUpdate),as(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const i=this.features[a];i&&(i.unmount(),i.isMounted=!1)}this.current=null}bindToMotionValue(a,i){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const o=Is.has(a),r=i.on("change",p=>{this.latestValues[a]=p,this.props.onUpdate&&rt.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),d=i.on("renderRequest",this.scheduleRender);let u;window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,a,i)),this.valueSubscriptions.set(a,()=>{r(),d(),u&&u(),i.owner&&i.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Mi){const i=Mi[a];if(!i)continue;const{isEnabled:o,Feature:r}=i;if(!this.features[a]&&r&&o(this.props)&&(this.features[a]=new r(this)),this.features[a]){const d=this.features[a];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ct()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,i){this.latestValues[a]=i}update(a,i){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let o=0;o<n0.length;o++){const r=n0[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const d="on"+r,u=a[d];u&&(this.propEventSubscriptions[r]=this.on(r,u))}this.prevMotionValues=S2(this,this.scrapeMotionValuesFromProps(a,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(a),()=>i.variantChildren.delete(a)}addValue(a,i){const o=this.values.get(a);i!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,i),this.values.set(a,i),this.latestValues[a]=i.get())}removeValue(a){this.values.delete(a);const i=this.valueSubscriptions.get(a);i&&(i(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,i){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&i!==void 0&&(o=Wl(i===null?void 0:i,{owner:this}),this.addValue(a,o)),o}readValue(a,i){var o;let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(o=this.getBaseTargetFromProps(this.props,a))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(Pb(r)||Ob(r))?r=parseFloat(r):!b2(r)&&ss.test(i)&&(r=Vb(a,i)),this.setBaseTarget(a,Yt(r)?r.get():r)),Yt(r)?r.get():r}setBaseTarget(a,i){this.baseTarget[a]=i}getBaseTarget(a){var i;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const u=Kf(this.props,o,(i=this.presenceContext)===null||i===void 0?void 0:i.custom);u&&(r=u[a])}if(o&&r!==void 0)return r;const d=this.getBaseTargetFromProps(this.props,a);return d!==void 0&&!Yt(d)?d:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,i){return this.events[a]||(this.events[a]=new ih),this.events[a].add(i)}notify(a,...i){this.events[a]&&this.events[a].notify(...i)}}class A1 extends x2{constructor(){super(...arguments),this.KeyframeResolver=Yb}sortInstanceNodePosition(a,i){return a.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(a,i){return a.style?a.style[i]:void 0}removeValueFromRenderState(a,{vars:i,style:o}){delete i[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;Yt(a)&&(this.childSubscription=a.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function _2(n){return window.getComputedStyle(n)}class T2 extends A1{constructor(){super(...arguments),this.type="html",this.renderInstance=hb}readValueFromInstance(a,i){if(Is.has(i)){const o=hh(i);return o&&o.default||0}else{const o=_2(a),r=(ub(i)?o.getPropertyValue(i):o[i])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:i}){return f1(a,i)}build(a,i,o){Qf(a,i,o.transformTemplate)}scrapeMotionValuesFromProps(a,i,o){return th(a,i,o)}}class E2 extends A1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ct}getBaseTargetFromProps(a,i){return a[i]}readValueFromInstance(a,i){if(Is.has(i)){const o=hh(i);return o&&o.default||0}return i=pb.has(i)?i:$f(i),a.getAttribute(i)}scrapeMotionValuesFromProps(a,i,o){return yb(a,i,o)}build(a,i,o){Wf(a,i,this.isSVGTag,o.transformTemplate)}renderInstance(a,i,o,r){mb(a,i,o,r)}mount(a){this.isSVGTag=eh(a.tagName),super.mount(a)}}const C2=(n,a)=>Yf(n)?new E2(a):new T2(a,{allowProjection:n!==S.Fragment}),A2=WC({...Pk,...g2,...Jw,...y2},C2),$t=hC(A2);function k2(){!bh.current&&C1();const[n]=S.useState(qr.current);return n}var _t;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.TEXT=1]="TEXT",n[n.TOOL_USE=2]="TOOL_USE",n[n.TOOL_RESULT=3]="TOOL_RESULT",n[n.ERROR=4]="ERROR",n[n.STATUS=5]="STATUS",n[n.SYSTEM=6]="SYSTEM",n[n.FINDING=7]="FINDING",n[n.SUBTASK_CREATE=8]="SUBTASK_CREATE",n[n.USER_INPUT=9]="USER_INPUT"})(_t||(_t={}));var Dt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.NOT_STARTED=1]="NOT_STARTED",n[n.WORKING=3]="WORKING",n[n.PAUSED=4]="PAUSED",n[n.COMPLETE=5]="COMPLETE",n[n.FAILED=6]="FAILED"})(Dt||(Dt={}));var Ja;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(Ja||(Ja={}));var es;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(es||(es={}));var Yn;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.SUBSCRIPTION=2]="SUBSCRIPTION",n[n.API_KEY=3]="API_KEY"})(Yn||(Yn={}));var ts;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.ON=2]="ON"})(ts||(ts={}));const w2=8;Object.assign(Object.create(null),{"":_t.UNSPECIFIED,text:_t.TEXT,tool_use:_t.TOOL_USE,tool_result:_t.TOOL_RESULT,error:_t.ERROR,status:_t.STATUS,system:_t.SYSTEM,finding:_t.FINDING,subtask_create:_t.SUBTASK_CREATE,user_input:_t.USER_INPUT});_t.UNSPECIFIED+"",_t.TEXT+"",_t.TOOL_USE+"",_t.TOOL_RESULT+"",_t.ERROR+"",_t.STATUS+"",_t.SYSTEM+"",_t.FINDING+"",_t.SUBTASK_CREATE+"",_t.USER_INPUT+"";Object.assign(Object.create(null),{"":Dt.UNSPECIFIED,not_started:Dt.NOT_STARTED,working:Dt.WORKING,paused:Dt.PAUSED,complete:Dt.COMPLETE,failed:Dt.FAILED,pending:Dt.NOT_STARTED,assigned:Dt.NOT_STARTED,in_progress:Dt.WORKING,waiting_input:Dt.PAUSED,review:Dt.PAUSED,done:Dt.COMPLETE});Dt.UNSPECIFIED+"",Dt.NOT_STARTED+"",Dt.WORKING+"",Dt.PAUSED+"",Dt.COMPLETE+"",Dt.FAILED+"";Object.assign(Object.create(null),{"":Ja.UNSPECIFIED,active:Ja.ACTIVE,archived:Ja.ARCHIVED});Ja.UNSPECIFIED+"",Ja.ACTIVE+"",Ja.ARCHIVED+"";Object.assign(Object.create(null),{"":es.UNSPECIFIED,open:es.OPEN,closed:es.CLOSED});es.UNSPECIFIED+"",es.OPEN+"",es.CLOSED+"";Object.assign(Object.create(null),{"":Yn.UNSPECIFIED,off:Yn.OFF,subscription:Yn.SUBSCRIPTION,api_key:Yn.API_KEY});Yn.UNSPECIFIED+"",Yn.OFF+"",Yn.SUBSCRIPTION+"",Yn.API_KEY+"";Object.assign(Object.create(null),{"":ts.UNSPECIFIED,off:ts.OFF,on:ts.ON});ts.UNSPECIFIED+"",ts.OFF+"",ts.ON+"";function Ca(n){return Array.isArray?Array.isArray(n):N1(n)==="[object Array]"}function N2(n){if(typeof n=="string")return n;let a=n+"";return a=="0"&&1/n==-1/0?"-0":a}function j2(n){return n==null?"":N2(n)}function Kn(n){return typeof n=="string"}function k1(n){return typeof n=="number"}function D2(n){return n===!0||n===!1||M2(n)&&N1(n)=="[object Boolean]"}function w1(n){return typeof n=="object"}function M2(n){return w1(n)&&n!==null}function hn(n){return n!=null}function Fd(n){return!n.trim().length}function N1(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const R2="Incorrect 'index' type",O2=n=>`Invalid value for key ${n}`,B2=n=>`Pattern length exceeds max of ${n}.`,L2=n=>`Missing ${n} property in key`,I2=n=>`Property 'weight' in key '${n}' must be a positive integer`,a0=Object.prototype.hasOwnProperty;class U2{constructor(a){this._keys=[],this._keyMap={};let i=0;a.forEach(o=>{let r=j1(o);this._keys.push(r),this._keyMap[r.id]=r,i+=r.weight}),this._keys.forEach(o=>{o.weight/=i})}get(a){return this._keyMap[a]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function j1(n){let a=null,i=null,o=null,r=1,d=null;if(Kn(n)||Ca(n))o=n,a=s0(n),i=Sf(n);else{if(!a0.call(n,"name"))throw new Error(L2("name"));const u=n.name;if(o=u,a0.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(I2(u));a=s0(u),i=Sf(u),d=n.getFn}return{path:a,id:i,weight:r,src:o,getFn:d}}function s0(n){return Ca(n)?n:n.split(".")}function Sf(n){return Ca(n)?n.join("."):n}function z2(n,a){let i=[],o=!1;const r=(d,u,p)=>{if(hn(d))if(!u[p])i.push(d);else{let m=u[p];const g=d[m];if(!hn(g))return;if(p===u.length-1&&(Kn(g)||k1(g)||D2(g)))i.push(j2(g));else if(Ca(g)){o=!0;for(let v=0,y=g.length;v<y;v+=1)r(g[v],u,p+1)}else u.length&&r(g,u,p+1)}};return r(n,Kn(a)?a.split("."):a,0),o?i:i[0]}const V2={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},H2={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,a)=>n.score===a.score?n.idx<a.idx?-1:1:n.score<a.score?-1:1},G2={location:0,threshold:.6,distance:100},P2={useExtendedSearch:!1,getFn:z2,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var be={...H2,...V2,...G2,...P2};const F2=/[^ ]+/g;function $2(n=1,a=3){const i=new Map,o=Math.pow(10,a);return{get(r){const d=r.match(F2).length;if(i.has(d))return i.get(d);const u=1/Math.pow(d,.5*n),p=parseFloat(Math.round(u*o)/o);return i.set(d,p),p},clear(){i.clear()}}}class Sh{constructor({getFn:a=be.getFn,fieldNormWeight:i=be.fieldNormWeight}={}){this.norm=$2(i,3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}setSources(a=[]){this.docs=a}setIndexRecords(a=[]){this.records=a}setKeys(a=[]){this.keys=a,this._keysMap={},a.forEach((i,o)=>{this._keysMap[i.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Kn(this.docs[0])?this.docs.forEach((a,i)=>{this._addString(a,i)}):this.docs.forEach((a,i)=>{this._addObject(a,i)}),this.norm.clear())}add(a){const i=this.size();Kn(a)?this._addString(a,i):this._addObject(a,i)}removeAt(a){this.records.splice(a,1);for(let i=a,o=this.size();i<o;i+=1)this.records[i].i-=1}getValueForItemAtKeyId(a,i){return a[this._keysMap[i]]}size(){return this.records.length}_addString(a,i){if(!hn(a)||Fd(a))return;let o={v:a,i,n:this.norm.get(a)};this.records.push(o)}_addObject(a,i){let o={i,$:{}};this.keys.forEach((r,d)=>{let u=r.getFn?r.getFn(a):this.getFn(a,r.path);if(hn(u)){if(Ca(u)){let p=[];const m=[{nestedArrIndex:-1,value:u}];for(;m.length;){const{nestedArrIndex:g,value:v}=m.pop();if(hn(v))if(Kn(v)&&!Fd(v)){let y={v,i:g,n:this.norm.get(v)};p.push(y)}else Ca(v)&&v.forEach((y,x)=>{m.push({nestedArrIndex:x,value:y})})}o.$[d]=p}else if(Kn(u)&&!Fd(u)){let p={v:u,n:this.norm.get(u)};o.$[d]=p}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function D1(n,a,{getFn:i=be.getFn,fieldNormWeight:o=be.fieldNormWeight}={}){const r=new Sh({getFn:i,fieldNormWeight:o});return r.setKeys(n.map(j1)),r.setSources(a),r.create(),r}function q2(n,{getFn:a=be.getFn,fieldNormWeight:i=be.fieldNormWeight}={}){const{keys:o,records:r}=n,d=new Sh({getFn:a,fieldNormWeight:i});return d.setKeys(o),d.setIndexRecords(r),d}function Nr(n,{errors:a=0,currentLocation:i=0,expectedLocation:o=0,distance:r=be.distance,ignoreLocation:d=be.ignoreLocation}={}){const u=a/n.length;if(d)return u;const p=Math.abs(o-i);return r?u+p/r:p?1:u}function Y2(n=[],a=be.minMatchCharLength){let i=[],o=-1,r=-1,d=0;for(let u=n.length;d<u;d+=1){let p=n[d];p&&o===-1?o=d:!p&&o!==-1&&(r=d-1,r-o+1>=a&&i.push([o,r]),o=-1)}return n[d-1]&&d-o>=a&&i.push([o,d-1]),i}const Ds=32;function K2(n,a,i,{location:o=be.location,distance:r=be.distance,threshold:d=be.threshold,findAllMatches:u=be.findAllMatches,minMatchCharLength:p=be.minMatchCharLength,includeMatches:m=be.includeMatches,ignoreLocation:g=be.ignoreLocation}={}){if(a.length>Ds)throw new Error(B2(Ds));const v=a.length,y=n.length,x=Math.max(0,Math.min(o,y));let T=d,C=x;const k=p>1||m,w=k?Array(y):[];let E;for(;(E=n.indexOf(a,C))>-1;){let H=Nr(a,{currentLocation:E,expectedLocation:x,distance:r,ignoreLocation:g});if(T=Math.min(H,T),C=E+v,k){let D=0;for(;D<v;)w[E+D]=1,D+=1}}C=-1;let A=[],j=1,V=v+y;const O=1<<v-1;for(let H=0;H<v;H+=1){let D=0,U=V;for(;D<U;)Nr(a,{errors:H,currentLocation:x+U,expectedLocation:x,distance:r,ignoreLocation:g})<=T?D=U:V=U,U=Math.floor((V-D)/2+D);V=U;let ee=Math.max(1,x-U+1),ne=u?y:Math.min(x+U,y)+v,ae=Array(ne+2);ae[ne+1]=(1<<H)-1;for(let q=ne;q>=ee;q-=1){let se=q-1,G=i[n.charAt(se)];if(k&&(w[se]=+!!G),ae[q]=(ae[q+1]<<1|1)&G,H&&(ae[q]|=(A[q+1]|A[q])<<1|1|A[q+1]),ae[q]&O&&(j=Nr(a,{errors:H,currentLocation:se,expectedLocation:x,distance:r,ignoreLocation:g}),j<=T)){if(T=j,C=se,C<=x)break;ee=Math.max(1,2*x-C)}}if(Nr(a,{errors:H+1,currentLocation:x,expectedLocation:x,distance:r,ignoreLocation:g})>T)break;A=ae}const F={isMatch:C>=0,score:Math.max(.001,j)};if(k){const H=Y2(w,p);H.length?m&&(F.indices=H):F.isMatch=!1}return F}function Z2(n){let a={};for(let i=0,o=n.length;i<o;i+=1){const r=n.charAt(i);a[r]=(a[r]||0)|1<<o-i-1}return a}const Yr=String.prototype.normalize?(n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(n=>n);class M1{constructor(a,{location:i=be.location,threshold:o=be.threshold,distance:r=be.distance,includeMatches:d=be.includeMatches,findAllMatches:u=be.findAllMatches,minMatchCharLength:p=be.minMatchCharLength,isCaseSensitive:m=be.isCaseSensitive,ignoreDiacritics:g=be.ignoreDiacritics,ignoreLocation:v=be.ignoreLocation}={}){if(this.options={location:i,threshold:o,distance:r,includeMatches:d,findAllMatches:u,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:v},a=m?a:a.toLowerCase(),a=g?Yr(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const y=(T,C)=>{this.chunks.push({pattern:T,alphabet:Z2(T),startIndex:C})},x=this.pattern.length;if(x>Ds){let T=0;const C=x%Ds,k=x-C;for(;T<k;)y(this.pattern.substr(T,Ds),T),T+=Ds;if(C){const w=x-Ds;y(this.pattern.substr(w),w)}}else y(this.pattern,0)}searchIn(a){const{isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r}=this.options;if(a=i?a:a.toLowerCase(),a=o?Yr(a):a,this.pattern===a){let k={isMatch:!0,score:0};return r&&(k.indices=[[0,a.length-1]]),k}const{location:d,distance:u,threshold:p,findAllMatches:m,minMatchCharLength:g,ignoreLocation:v}=this.options;let y=[],x=0,T=!1;this.chunks.forEach(({pattern:k,alphabet:w,startIndex:E})=>{const{isMatch:A,score:j,indices:V}=K2(a,k,w,{location:d+E,distance:u,threshold:p,findAllMatches:m,minMatchCharLength:g,includeMatches:r,ignoreLocation:v});A&&(T=!0),x+=j,A&&V&&(y=[...y,...V])});let C={isMatch:T,score:T?x/this.chunks.length:1};return T&&r&&(C.indices=y),C}}class os{constructor(a){this.pattern=a}static isMultiMatch(a){return i0(a,this.multiRegex)}static isSingleMatch(a){return i0(a,this.singleRegex)}search(){}}function i0(n,a){const i=n.match(a);return i?i[1]:null}class X2 extends os{constructor(a){super(a)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(a){const i=a===this.pattern;return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class Q2 extends os{constructor(a){super(a)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(a){const o=a.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,a.length-1]}}}class W2 extends os{constructor(a){super(a)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(a){const i=a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class J2 extends os{constructor(a){super(a)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(a){const i=!a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class eN extends os{constructor(a){super(a)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(a){const i=a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[a.length-this.pattern.length,a.length-1]}}}class tN extends os{constructor(a){super(a)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(a){const i=!a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class R1 extends os{constructor(a,{location:i=be.location,threshold:o=be.threshold,distance:r=be.distance,includeMatches:d=be.includeMatches,findAllMatches:u=be.findAllMatches,minMatchCharLength:p=be.minMatchCharLength,isCaseSensitive:m=be.isCaseSensitive,ignoreDiacritics:g=be.ignoreDiacritics,ignoreLocation:v=be.ignoreLocation}={}){super(a),this._bitapSearch=new M1(a,{location:i,threshold:o,distance:r,includeMatches:d,findAllMatches:u,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:v})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(a){return this._bitapSearch.searchIn(a)}}class O1 extends os{constructor(a){super(a)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(a){let i=0,o;const r=[],d=this.pattern.length;for(;(o=a.indexOf(this.pattern,i))>-1;)i=o+d,r.push([o,i-1]);const u=!!r.length;return{isMatch:u,score:u?0:1,indices:r}}}const xf=[X2,O1,W2,J2,tN,eN,Q2,R1],l0=xf.length,nN=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,aN="|";function sN(n,a={}){return n.split(aN).map(i=>{let o=i.trim().split(nN).filter(d=>d&&!!d.trim()),r=[];for(let d=0,u=o.length;d<u;d+=1){const p=o[d];let m=!1,g=-1;for(;!m&&++g<l0;){const v=xf[g];let y=v.isMultiMatch(p);y&&(r.push(new v(y,a)),m=!0)}if(!m)for(g=-1;++g<l0;){const v=xf[g];let y=v.isSingleMatch(p);if(y){r.push(new v(y,a));break}}}return r})}const iN=new Set([R1.type,O1.type]);class lN{constructor(a,{isCaseSensitive:i=be.isCaseSensitive,ignoreDiacritics:o=be.ignoreDiacritics,includeMatches:r=be.includeMatches,minMatchCharLength:d=be.minMatchCharLength,ignoreLocation:u=be.ignoreLocation,findAllMatches:p=be.findAllMatches,location:m=be.location,threshold:g=be.threshold,distance:v=be.distance}={}){this.query=null,this.options={isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r,minMatchCharLength:d,findAllMatches:p,ignoreLocation:u,location:m,threshold:g,distance:v},a=i?a:a.toLowerCase(),a=o?Yr(a):a,this.pattern=a,this.query=sN(this.pattern,this.options)}static condition(a,i){return i.useExtendedSearch}searchIn(a){const i=this.query;if(!i)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:r,ignoreDiacritics:d}=this.options;a=r?a:a.toLowerCase(),a=d?Yr(a):a;let u=0,p=[],m=0;for(let g=0,v=i.length;g<v;g+=1){const y=i[g];p.length=0,u=0;for(let x=0,T=y.length;x<T;x+=1){const C=y[x],{isMatch:k,indices:w,score:E}=C.search(a);if(k){if(u+=1,m+=E,o){const A=C.constructor.type;iN.has(A)?p=[...p,...w]:p.push(w)}}else{m=0,u=0,p.length=0;break}}if(u){let x={isMatch:!0,score:m/u};return o&&(x.indices=p),x}}return{isMatch:!1,score:1}}}const _f=[];function oN(...n){_f.push(...n)}function Tf(n,a){for(let i=0,o=_f.length;i<o;i+=1){let r=_f[i];if(r.condition(n,a))return new r(n,a)}return new M1(n,a)}const Kr={AND:"$and",OR:"$or"},Ef={PATH:"$path",PATTERN:"$val"},Cf=n=>!!(n[Kr.AND]||n[Kr.OR]),rN=n=>!!n[Ef.PATH],cN=n=>!Ca(n)&&w1(n)&&!Cf(n),o0=n=>({[Kr.AND]:Object.keys(n).map(a=>({[a]:n[a]}))});function B1(n,a,{auto:i=!0}={}){const o=r=>{let d=Object.keys(r);const u=rN(r);if(!u&&d.length>1&&!Cf(r))return o(o0(r));if(cN(r)){const m=u?r[Ef.PATH]:d[0],g=u?r[Ef.PATTERN]:r[m];if(!Kn(g))throw new Error(O2(m));const v={keyId:Sf(m),pattern:g};return i&&(v.searcher=Tf(g,a)),v}let p={children:[],operator:d[0]};return d.forEach(m=>{const g=r[m];Ca(g)&&g.forEach(v=>{p.children.push(o(v))})}),p};return Cf(n)||(n=o0(n)),o(n)}function uN(n,{ignoreFieldNorm:a=be.ignoreFieldNorm}){n.forEach(i=>{let o=1;i.matches.forEach(({key:r,norm:d,score:u})=>{const p=r?r.weight:null;o*=Math.pow(u===0&&p?Number.EPSILON:u,(p||1)*(a?1:d))}),i.score=o})}function dN(n,a){const i=n.matches;a.matches=[],hn(i)&&i.forEach(o=>{if(!hn(o.indices)||!o.indices.length)return;const{indices:r,value:d}=o;let u={indices:r,value:d};o.key&&(u.key=o.key.src),o.idx>-1&&(u.refIndex=o.idx),a.matches.push(u)})}function fN(n,a){a.score=n.score}function hN(n,a,{includeMatches:i=be.includeMatches,includeScore:o=be.includeScore}={}){const r=[];return i&&r.push(dN),o&&r.push(fN),n.map(d=>{const{idx:u}=d,p={item:a[u],refIndex:u};return r.length&&r.forEach(m=>{m(d,p)}),p})}class zi{constructor(a,i={},o){this.options={...be,...i},this.options.useExtendedSearch,this._keyStore=new U2(this.options.keys),this.setCollection(a,o)}setCollection(a,i){if(this._docs=a,i&&!(i instanceof Sh))throw new Error(R2);this._myIndex=i||D1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){hn(a)&&(this._docs.push(a),this._myIndex.add(a))}remove(a=()=>!1){const i=[];for(let o=0,r=this._docs.length;o<r;o+=1){const d=this._docs[o];a(d,o)&&(this.removeAt(o),o-=1,r-=1,i.push(d))}return i}removeAt(a){this._docs.splice(a,1),this._myIndex.removeAt(a)}getIndex(){return this._myIndex}search(a,{limit:i=-1}={}){const{includeMatches:o,includeScore:r,shouldSort:d,sortFn:u,ignoreFieldNorm:p}=this.options;let m=Kn(a)?Kn(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return uN(m,{ignoreFieldNorm:p}),d&&m.sort(u),k1(i)&&i>-1&&(m=m.slice(0,i)),hN(m,this._docs,{includeMatches:o,includeScore:r})}_searchStringList(a){const i=Tf(a,this.options),{records:o}=this._myIndex,r=[];return o.forEach(({v:d,i:u,n:p})=>{if(!hn(d))return;const{isMatch:m,score:g,indices:v}=i.searchIn(d);m&&r.push({item:d,idx:u,matches:[{score:g,value:d,norm:p,indices:v}]})}),r}_searchLogical(a){const i=B1(a,this.options),o=(p,m,g)=>{if(!p.children){const{keyId:y,searcher:x}=p,T=this._findMatches({key:this._keyStore.get(y),value:this._myIndex.getValueForItemAtKeyId(m,y),searcher:x});return T&&T.length?[{idx:g,item:m,matches:T}]:[]}const v=[];for(let y=0,x=p.children.length;y<x;y+=1){const T=p.children[y],C=o(T,m,g);if(C.length)v.push(...C);else if(p.operator===Kr.AND)return[]}return v},r=this._myIndex.records,d={},u=[];return r.forEach(({$:p,i:m})=>{if(hn(p)){let g=o(i,p,m);g.length&&(d[m]||(d[m]={idx:m,item:p,matches:[]},u.push(d[m])),g.forEach(({matches:v})=>{d[m].matches.push(...v)}))}}),u}_searchObjectList(a){const i=Tf(a,this.options),{keys:o,records:r}=this._myIndex,d=[];return r.forEach(({$:u,i:p})=>{if(!hn(u))return;let m=[];o.forEach((g,v)=>{m.push(...this._findMatches({key:g,value:u[v],searcher:i}))}),m.length&&d.push({idx:p,item:u,matches:m})}),d}_findMatches({key:a,value:i,searcher:o}){if(!hn(i))return[];let r=[];if(Ca(i))i.forEach(({v:d,i:u,n:p})=>{if(!hn(d))return;const{isMatch:m,score:g,indices:v}=o.searchIn(d);m&&r.push({score:g,key:a,value:d,idx:u,norm:p,indices:v})});else{const{v:d,n:u}=i,{isMatch:p,score:m,indices:g}=o.searchIn(d);p&&r.push({score:m,key:a,value:d,norm:u,indices:g})}return r}}zi.version="7.1.0";zi.createIndex=D1;zi.parseIndex=q2;zi.config=be;zi.parseQuery=B1;oN(lN);function r0(n,a,i,o){if(!a.trim())return[];const r=.3;return new zi(n,{keys:i,threshold:r,ignoreLocation:!0,includeScore:!0,includeMatches:!0,minMatchCharLength:2}).search(a).map(m=>({item:m.item,score:m.score??1,matches:(m.matches??[]).map(g=>({key:g.key??"",indices:g.indices}))}))}const pN="_breadcrumbs_17or2_1",mN="_list_17or2_11",gN="_item_17or2_21",yN="_separator_17or2_28",vN="_link_17or2_34",bN="_current_17or2_57",Ti={breadcrumbs:pN,list:mN,item:gN,separator:yN,link:vN,current:bN},SN="›";function Vi({segments:n}){return h.jsx("nav",{className:Ti.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:Ti.list,children:n.map((a,i)=>{const o=i===n.length-1;return h.jsxs("li",{className:Ti.item,children:[i>0&&h.jsx("span",{className:Ti.separator,"aria-hidden":"true",children:SN}),a.url&&!o?h.jsx(Lf,{className:Ti.link,to:a.url,title:a.label,children:a.label}):h.jsx("span",{className:Ti.current,"aria-current":"page",title:a.label,children:a.label})]},i)})})})}function Af(){Af=function(r,d){return new i(r,void 0,d)};var n=RegExp.prototype,a=new WeakMap;function i(r,d,u){var p=new RegExp(r,d);return a.set(p,u||a.get(r)),Zr(p,i.prototype)}function o(r,d){var u=a.get(d);return Object.keys(u).reduce(function(p,m){var g=u[m];if(typeof g=="number")p[m]=r[g];else{for(var v=0;r[g[v]]===void 0&&v+1<g.length;)v++;p[m]=r[g[v]]}return p},Object.create(null))}return(function(r,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(d&&d.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),d&&Zr(r,d)})(i,RegExp),i.prototype.exec=function(r){var d=n.exec.call(this,r);if(d){d.groups=o(d,this);var u=d.indices;u&&(u.groups=o(u,this))}return d},i.prototype[Symbol.replace]=function(r,d){if(typeof d=="string"){var u=a.get(this);return n[Symbol.replace].call(this,r,d.replace(/\$<([^>]+)>/g,function(m,g){var v=u[g];return"$"+(Array.isArray(v)?v.join("$"):v)}))}if(typeof d=="function"){var p=this;return n[Symbol.replace].call(this,r,function(){var m=arguments;return typeof m[m.length-1]!="object"&&(m=[].slice.call(m)).push(o(m,p)),d.apply(this,m)})}return n[Symbol.replace].call(this,r,d)},Af.apply(this,arguments)}function Zr(n,a){return Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},Zr(n,a)}function c0(n,a){(a==null||a>n.length)&&(a=n.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=n[i];return o}function $d(n,a){var i=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i)return(i=i.call(n)).next.bind(i);if(Array.isArray(n)||(i=(function(r,d){if(r){if(typeof r=="string")return c0(r,d);var u=Object.prototype.toString.call(r).slice(8,-1);return u==="Object"&&r.constructor&&(u=r.constructor.name),u==="Map"||u==="Set"?Array.from(r):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?c0(r,d):void 0}})(n))||a){i&&(n=i);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
87
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var xN=(function(n){return function(a){return a===void 0&&(a={}),(function(o,r){if(r&&!o.registered(r))throw new Error('The default language "'+r+'" is not registered with refractor.')})(n,a.defaultLanguage),function(o){c_(o,"element",i)};function i(o,r,d){var u,p;if(d&&d.tagName==="pre"&&o.tagName==="code"){var m=(o==null||(u=o.data)==null?void 0:u.meta)||(o==null||(p=o.properties)==null?void 0:p.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var g,v,y=(function(O){for(var F,H=$d(O.properties.className);!(F=H()).done;){var D=F.value;if(D.slice(0,9)==="language-")return D.slice(9).toLowerCase()}return null})(o);if(!y&&a.defaultLanguage&&o.properties.className.push("language-"+(y=a.defaultLanguage)),o.properties.className.push("code-highlight"),y)try{var x,T;T=(x=y)!=null&&x.includes("diff-")?y.split("-")[1]:y,g=n.highlight(Tr(o),T),d.properties.className=(d.properties.className||[]).concat("language-"+T)}catch(O){if(!a.ignoreMissing||!/Unknown language/.test(O.message))throw O;g=o}else g=o;g.children=(v=1,function O(F){return F.reduce(function(H,D){if(D.type==="text"){var U=D.value,ee=(U.match(/\n/g)||"").length;if(ee===0)D.position={start:{line:v,column:1},end:{line:v,column:1}},H.push(D);else for(var ne,ae=U.split(`
88
- `),ie=$d(ae.entries());!(ne=ie()).done;){var q=ne.value,se=q[0],G=q[1];H.push({type:"text",value:se===ae.length-1?G:G+`
89
- `,position:{start:{line:v+se,column:1},end:{line:v+se,column:1}}})}return v+=ee,H}if(Object.prototype.hasOwnProperty.call(D,"children")){var Y=v;return D.children=O(D.children),H.push(D),D.position={start:{line:Y,column:1},end:{line:v,column:1}},H}return H.push(D),H},[])})(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 C,k=(function(O){var F=/{([\d,-]+)}/,H=O.split(",").map(function(ee){return ee.trim()}).join();if(F.test(H)){var D=F.exec(H)[1],U=d_(D);return function(ee){return U.includes(ee+1)}}return function(){return!1}})(m),w=(function(O){var F=Af(/showLineNumbers=(\d+)/i,{lines:1});if(F.test(O)){var H=F.exec(O);return Number(H.groups.lines)}return 1})(m),E=(function(O){for(var F=new Array(O),H=0;H<O;H++)F[H]={type:"element",tagName:"span",properties:{className:[]},children:[]};return F})(g.position.end.line),A=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],j=function(){var O,F,H=C.value,D=H[0],U=H[1];U.properties.className=["code-line"];var ee=f_(g,function(ne){return ne.position.start.line<=D+1&&ne.position.end.line>=D+1});U.children=ee.children,(m.toLowerCase().includes("showLineNumbers".toLowerCase())||a.showLineNumbers===!0||typeof a.showLineNumbers=="object"&&a.showLineNumbers.includes(y))&&!A.some(function(ne){return m.toLowerCase().includes(ne)})&&(U.properties.line=[(D+w).toString()],U.properties.className.push("line-number")),k(D)&&U.properties.className.push("highlight-line"),(y==="diff"||(O=y)!=null&&O.includes("diff-"))&&Tr(U).substring(0,1)==="-"?U.properties.className.push("deleted"):(y==="diff"||(F=y)!=null&&F.includes("diff-"))&&Tr(U).substring(0,1)==="+"&&U.properties.className.push("inserted")},V=$d(E.entries());!(C=V()).done;)j();E.length>0&&Tr(E[E.length-1]).trim()===""&&E.pop(),o.children=E}}}})(u_);const _N="_systemEvent_463jy_1",TN="_systemTimestamp_463jy_8",EN="_textEvent_463jy_12",CN="_toolUseEvent_463jy_98",AN="_toolUseHeader_463jy_118",kN="_toolUsePrefix_463jy_125",wN="_toolUseName_463jy_130",NN="_toolUseArgs_463jy_135",jN="_toolResultEvent_463jy_146",DN="_toolResultHeader_463jy_151",MN="_toolResultIndicatorOk_463jy_175",RN="_toolResultIndicatorError_463jy_182",ON="_toolResultLabel_463jy_189",BN="_toolResultToggle_463jy_193",LN="_toolResultCommand_463jy_199",IN="_toolResultEllipsis_463jy_209",UN="_toolResultPre_463jy_213",zN="_errorEvent_463jy_234",VN="_statusEvent_463jy_242",HN="_userInputEvent_463jy_251",GN="_userInputContent_463jy_257",PN="_defaultEvent_463jy_274",mt={systemEvent:_N,systemTimestamp:TN,textEvent:EN,toolUseEvent:CN,toolUseHeader:AN,toolUsePrefix:kN,toolUseName:wN,toolUseArgs:NN,toolResultEvent:jN,toolResultHeader:DN,toolResultIndicatorOk:MN,toolResultIndicatorError:RN,toolResultLabel:ON,toolResultToggle:BN,toolResultCommand:LN,toolResultEllipsis:IN,toolResultPre:UN,errorEvent:zN,statusEvent:VN,userInputEvent:HN,userInputContent:GN,defaultEvent:PN};function FN({time:n,content:a}){return h.jsxs("div",{className:mt.systemEvent,children:[h.jsxs("span",{className:mt.systemTimestamp,children:["[",n,"]"]})," ",a]})}function $N({content:n}){return h.jsx("div",{className:mt.textEvent,children:h.jsx(wf,{remarkPlugins:[Nf],rehypePlugins:[xN],children:n})})}function qN({content:n}){let a="",i=n;try{const o=JSON.parse(n);a=o.tool||"",i=JSON.stringify(o.args,null,2)}catch{}return h.jsxs("div",{className:mt.toolUseEvent,children:[h.jsxs("div",{className:mt.toolUseHeader,children:[h.jsx("span",{className:mt.toolUsePrefix,children:">"}),a?h.jsx("span",{className:mt.toolUseName,children:a}):null]}),h.jsx("pre",{className:mt.toolUseArgs,children:i})]})}const u0=5;function YN(n,a){if(a==null)return"";if(typeof a!="object")return String(a);const i=a;if(typeof i.command=="string")return i.command;if(typeof i.file_path=="string")return i.file_path;if(typeof i.pattern=="string"){const o=typeof i.path=="string"?` in ${i.path}`:"";return`${i.pattern}${o}`}if(typeof i.path=="string")return i.path;if(typeof i.query=="string")return i.query;try{const o=JSON.stringify(a);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function KN({content:n,raw:a,toolUseCtx:i}){const[o,r]=S.useState(!1);let d=!1;if(a)try{d=JSON.parse(a).is_error===!0}catch{}const u=n.split(`
90
- `),p=u.length>u0,m=o?n:u.slice(0,u0).join(`
91
- `),v=((i==null?void 0:i.tool)??"")||(d?"Tool error":"Tool output"),y=i?YN(i.tool,i.args):"",x=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:d?mt.toolResultIndicatorError:mt.toolResultIndicatorOk,"aria-label":d?"error":"success","data-testid":d?"tool-result-indicator-error":"tool-result-indicator-ok",children:d?"✗":"✓"}),h.jsx("span",{className:mt.toolResultLabel,"data-testid":"tool-result-label",children:v}),p&&h.jsx("span",{className:mt.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:mt.toolResultEvent,"data-testid":"tool-result",children:[p?h.jsx("button",{className:mt.toolResultHeader,"data-testid":"tool-result-header",onClick:()=>{r(T=>!T)},"aria-expanded":o,children:x}):h.jsx("div",{className:mt.toolResultHeader,"data-testid":"tool-result-header",children:x}),y&&h.jsx("div",{className:mt.toolResultCommand,children:y}),h.jsxs("pre",{className:mt.toolResultPre,"data-testid":"tool-result-content",children:[m,!o&&p&&h.jsx("span",{className:mt.toolResultEllipsis,children:"…"})]})]})}function ZN({content:n}){return h.jsxs("div",{className:mt.errorEvent,children:["Error: ",n]})}function XN({content:n}){return h.jsxs("div",{className:mt.statusEvent,children:["--- ",n," ---"]})}function QN({content:n}){return h.jsx("div",{className:mt.userInputEvent,children:h.jsx("span",{className:mt.userInputContent,children:n})})}function WN({content:n}){return h.jsx("div",{className:mt.defaultEvent,children:n})}function JN({event:n,toolUseCtx:a}){const i=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(FN,{time:i,content:n.content});case"text":case"output":return h.jsx($N,{content:n.content});case"tool_use":return h.jsx(qN,{content:n.content});case"tool_result":return h.jsx(KN,{content:n.content,raw:n.raw,toolUseCtx:a});case"error":return h.jsx(ZN,{content:n.content});case"status":return h.jsx(XN,{content:n.content});case"user_input":return h.jsx(QN,{content:n.content});default:return h.jsx(WN,{content:n.content})}}const ej="_overlay_cmicx_1",tj="_dialog_cmicx_11",nj="_title_cmicx_30",aj="_description_cmicx_38",sj="_actions_cmicx_45",ij="_cancelButton_cmicx_52",lj="_confirmButton_cmicx_79",ks={overlay:ej,dialog:tj,title:nj,description:aj,actions:sj,cancelButton:ij,confirmButton:lj};function cc({isOpen:n,title:a,description:i,confirmLabel:o="Delete",onConfirm:r,onCancel:d}){const u=S.useId(),p=S.useId();return h.jsx(Dn,{children:n&&h.jsx($t.div,{className:ks.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:d,onKeyDown:m=>{m.key==="Escape"&&d()},role:"dialog","aria-modal":"true","aria-labelledby":u,"aria-describedby":i?p:void 0,children:h.jsxs($t.div,{className:ks.dialog,initial:{opacity:0,scale:.93,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.93,y:-10},transition:{duration:.15,ease:[.16,1,.3,1]},onClick:m=>m.stopPropagation(),children:[h.jsx("h3",{id:u,className:ks.title,children:a}),i&&h.jsx("p",{id:p,className:ks.description,children:i}),h.jsxs("div",{className:ks.actions,children:[h.jsx("button",{type:"button",className:ks.cancelButton,onClick:d,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:ks.confirmButton,onClick:r,children:o})]})]})})})}const oj="_spinner_1uyt1_1",rj="_spin_1uyt1_1",cj="_sm_1uyt1_14",uj="_md_1uyt1_20",dj="_lg_1uyt1_26",fj="_xl_1uyt1_32",d0={spinner:oj,spin:rj,sm:cj,md:uj,lg:dj,xl:fj};function Xr({size:n="md",className:a,label:i="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${d0.spinner} ${d0[n]} ${a??""}`,role:o?"status":void 0,"aria-label":i,"aria-hidden":o?void 0:!0})}const hj="_splash_1bn1g_1",pj="_logo_1bn1g_11",f0={splash:hj,logo:pj};function mj(){return h.jsxs("div",{className:f0.splash,"data-testid":"splash-screen",children:[h.jsx("img",{src:"/grackle-logo.png",alt:"Grackle",className:f0.logo}),h.jsx(Xr,{size:"xl",label:"Loading Grackle",liveRegion:!0})]})}const kf={not_started:{color:"var(--text-tertiary)",icon:"○",label:"Not Started"},working:{color:"var(--accent-green)",icon:"●",label:"Working"},paused:{color:"var(--accent-yellow)",icon:"◉",label:"Paused"},complete:{color:"var(--accent-green)",icon:"✓",label:"Complete"},failed:{color:"var(--accent-red)",icon:"✗",label:"Failed"},blocked:{color:"var(--accent-yellow)",icon:"⦸",label:"Blocked"}};function is(n){return n==="blocked"?kf.blocked:kf[xh(n)]}const gj={not_started:"statusPending",working:"statusInProgress",paused:"statusWaitingInput",complete:"statusDone",failed:"statusFailed"};function yj(n){return gj[xh(n)]??"statusPending"}const vj=["working","paused","failed","not_started","blocked","complete"],h0=["not_started","working","paused","complete","failed"],bj={pending:"not_started",assigned:"not_started",in_progress:"working",waiting_input:"paused",review:"paused",done:"complete"};function xh(n){return n in kf&&n!=="blocked"?n:bj[n]??"not_started"}const Sj={not_started:"--text-tertiary",working:"--accent-green",paused:"--accent-yellow",complete:"--accent-green",failed:"--accent-red",pending:"--text-tertiary",assigned:"--text-tertiary",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",waiting_input:"--accent-yellow"},xj="_container_1jba1_1",_j="_header_1jba1_5",Tj="_searchInput_1jba1_17",Ej="_searchHighlight_1jba1_50",Cj="_addButton_1jba1_56",Aj="_createForm_1jba1_83",kj="_createInput_1jba1_89",wj="_createButton_1jba1_120",Nj="_creatingHint_1jba1_161",jj="_workspaceRow_1jba1_170",Dj="_selected_1jba1_188",Mj="_expandArrow_1jba1_193",Rj="_expanded_1jba1_200",Oj="_workspaceName_1jba1_204",Bj="_taskCount_1jba1_208",Lj="_newTaskButton_1jba1_214",Ij="_taskRow_1jba1_241",Uj="_taskStatusIcon_1jba1_271",zj="_taskTitle_1jba1_275",Vj="_dependencyBadge_1jba1_282",Hj="_blockedBadge_1jba1_294",Gj="_leafSpacer_1jba1_299",Pj="_childCountBadge_1jba1_304",Fj="_addChildButton_1jba1_317",$j="_emptyCta_1jba1_366",qj="_ctaDescription_1jba1_379",Yj="_ctaButton_1jba1_385",Kj="_emptyTaskCta_1jba1_420",Zj="_headerActions_1jba1_425",Xj="_groupToggle_1jba1_431",Qj="_groupToggleActive_1jba1_458",Wj="_statusGroupHeader_1jba1_462",Jj="_statusGroupIcon_1jba1_481",eD="_statusGroupLabel_1jba1_485",tD="_statusGroupCount_1jba1_490",nD="_createTaskLink_1jba1_503",Se={container:xj,header:_j,searchInput:Tj,searchHighlight:Ej,addButton:Cj,createForm:Aj,createInput:kj,createButton:wj,creatingHint:Nj,workspaceRow:jj,selected:Dj,expandArrow:Mj,expanded:Rj,workspaceName:Oj,taskCount:Bj,newTaskButton:Lj,taskRow:Ij,taskStatusIcon:Uj,taskTitle:zj,dependencyBadge:Vj,blockedBadge:Hj,leafSpacer:Gj,childCountBadge:Pj,addChildButton:Fj,emptyCta:$j,ctaDescription:qj,ctaButton:Yj,emptyTaskCta:Kj,headerActions:Zj,groupToggle:Xj,groupToggleActive:Qj,statusGroupHeader:Wj,statusGroupIcon:Jj,statusGroupLabel:eD,statusGroupCount:tD,createTaskLink:nD};function aD(n){if(n.length===0)return[];const a=[...n].sort((o,r)=>o[0]-r[0]),i=[[a[0][0],a[0][1]]];for(let o=1;o<a.length;o++){const r=i[i.length-1],[d,u]=a[o];d<=r[1]+1?r[1]=Math.max(r[1],u):i.push([d,u])}return i}function L1({text:n,indices:a}){if(!a||a.length===0)return h.jsx(h.Fragment,{children:n});const i=aD(a),o=[];let r=0;for(const[d,u]of i)d>r&&o.push(h.jsx("span",{children:n.slice(r,d)},`p${r}`)),o.push(h.jsx("mark",{className:Se.searchHighlight,children:n.slice(d,u+1)},`m${d}`)),r=u+1;return r<n.length&&o.push(h.jsx("span",{children:n.slice(r)},`p${r}`)),h.jsx(h.Fragment,{children:o})}const sD=[{name:"name",weight:2},{name:"description",weight:1}],iD=[{name:"title",weight:2},{name:"description",weight:1}],I1=34,lD=16,U1="grackle-group-by-status";function p0(){try{return localStorage.getItem(U1)==="true"}catch{return!1}}function oD(n){try{localStorage.setItem(U1,String(n))}catch{}}function rD(n,a){const i=new Map;for(const d of n){const p=d.dependsOn.length>0&&d.dependsOn.some(g=>a.get(g)!=="complete")?"blocked":d.status,m=i.get(p);m?m.push(d):i.set(p,[d])}const o=[],r=new Set;for(const d of vj){r.add(d);const u=i.get(d);if(u&&u.length>0){u.sort((m,g)=>m.sortOrder-g.sortOrder);const p=is(d);o.push({status:d,label:p.label,style:p,tasks:u})}}for(const[d,u]of i)if(!r.has(d)&&u.length>0){u.sort((m,g)=>m.sortOrder-g.sortOrder);const p=is(d);o.push({status:d,label:p.label,style:p,tasks:u})}return o}function cD({group:n,isExpanded:a,onToggle:i,selectedTaskId:o,navigate:r,titleHighlights:d}){return h.jsxs("div",{"data-testid":`status-group-${n.status}`,children:[h.jsxs("div",{className:Se.statusGroupHeader,role:"button",tabIndex:0,"aria-expanded":a,onClick:i,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),i())},children:[h.jsx("span",{className:`${Se.expandArrow} ${a?Se.expanded:""}`,children:"▸"}),h.jsx("span",{className:Se.statusGroupIcon,style:{color:n.style.color},children:n.style.icon}),h.jsx("span",{className:Se.statusGroupLabel,children:n.label}),h.jsx("span",{className:Se.statusGroupCount,children:n.tasks.length})]}),h.jsx(Dn,{children:a&&h.jsx($t.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"},children:n.tasks.map(u=>{const p=is(u.status),m=o===u.id;return h.jsxs("div",{onClick:()=>r(ns(u.id)),className:`${Se.taskRow} ${m?Se.selected:""}`,style:{"--task-indent":`${I1}px`},"data-task-id":u.id,children:[h.jsx("span",{className:Se.leafSpacer}),h.jsx("span",{className:Se.taskStatusIcon,style:{color:p.color},children:p.icon}),h.jsx("span",{className:Se.taskTitle,title:u.title,children:h.jsx(L1,{text:u.title,indices:d.get(u.id)})})]},u.id)})})})]})}function uD(n){const a=new Map(n.map(o=>[o.id,{...o,children:[]}])),i=[];for(const o of a.values())o.parentTaskId&&a.has(o.parentTaskId)?a.get(o.parentTaskId).children.push(o):i.push(o);for(const o of a.values())o.children.sort((r,d)=>r.sortOrder-d.sortOrder);return i.sort((o,r)=>o.sortOrder-r.sortOrder)}function z1({node:n,depth:a,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:d,workspaceId:u,taskStatusById:p,titleHighlights:m}){const g=is(n.status),v=n.dependsOn.length>0&&n.dependsOn.some(k=>p.get(k)!=="complete"),y=i.has(n.id),x=n.children.length>0,T=r===n.id,C=I1+a*lD;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>d(ns(n.id)),className:`${Se.taskRow} ${T?Se.selected:""}`,style:{"--task-indent":`${C}px`},"data-task-id":n.id,children:[x&&h.jsx("span",{className:`${Se.expandArrow} ${y?Se.expanded:""}`,role:"button",tabIndex:0,"aria-label":y?"Collapse task":"Expand task",onClick:k=>{k.stopPropagation(),o(n.id)},onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),o(n.id))},children:"▸"}),!x&&h.jsx("span",{className:Se.leafSpacer}),h.jsx("span",{className:Se.taskStatusIcon,style:{color:g.color},children:g.icon}),h.jsx("span",{className:Se.taskTitle,title:n.title,children:h.jsx(L1,{text:n.title,indices:m.get(n.id)})}),x&&h.jsxs("span",{className:Se.childCountBadge,children:[n.children.filter(k=>k.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${Se.dependencyBadge} ${v?Se.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:v?"blocked":"dep"}),a<w2&&h.jsx("button",{onClick:k=>{k.stopPropagation(),d(Os(u,n.id))},title:"Add child task","aria-label":"Add child task",className:Se.addChildButton,children:"+"})]}),h.jsx(Dn,{children:x&&y&&h.jsx($t.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:n.children.map(k=>h.jsx(z1,{node:k,depth:a+1,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:d,workspaceId:u,taskStatusById:p,titleHighlights:m},k.id))})})]})}function dD(){const{workspaces:n,tasks:a,loadTasks:i,createWorkspace:o,workspaceCreating:r}=Bt(),d=Rn(),[u,p]=S.useState(new Set),[m,g]=S.useState(new Set),[v,y]=S.useState(new Set),[x,T]=S.useState(!1),[C,k]=S.useState(""),[w,E]=S.useState(p0),[A,j]=S.useState(p0),[V,O]=S.useState(new Map),F=()=>{const te=!w;oD(te),E(te),te&&(j(!0),O(new Map))},H=(te,ze)=>{const Ne=`${te}:${ze}`;O(_e=>{const yt=new Map(_e),ht=yt.has(Ne)?yt.get(Ne):A;return yt.set(Ne,!ht),yt})},D=(te,ze)=>{const Ne=`${te}:${ze}`;return V.has(Ne)?V.get(Ne):A},U=Zt("/tasks/:taskId/*"),ee=Zt("/workspaces/:workspaceId"),ne=(U==null?void 0:U.params.taskId)!=="new"?U==null?void 0:U.params.taskId:void 0,ae=ee==null?void 0:ee.params.workspaceId,ie=S.useRef(u);ie.current=u;const q=S.useMemo(()=>new Map(a.map(te=>[te.id,te.status])),[a]),se=te=>{p(ze=>{const Ne=new Set(ze);return Ne.has(te)?Ne.delete(te):(Ne.add(te),i(te)),Ne})},G=te=>{g(ze=>{const Ne=new Set(ze);return Ne.has(te)?(Ne.delete(te),y(_e=>new Set(_e).add(te))):(Ne.add(te),y(_e=>{const yt=new Set(_e);return yt.delete(te),yt})),Ne})};S.useEffect(()=>{const te=new Set(a.filter(ze=>ze.parentTaskId).map(ze=>ze.parentTaskId));te.size>0&&g(ze=>{const Ne=new Set(ze);for(const _e of te)v.has(_e)||Ne.add(_e);return Ne})},[a,v]),S.useEffect(()=>{ae&&!ie.current.has(ae)&&(p(te=>new Set(te).add(ae)),i(ae))},[ae,i]);const Y=()=>{!C.trim()||r||(o(C.trim()),k(""),T(!1))},[Z,he]=S.useState(""),{directMatchTaskIds:W,treeMatchTaskIds:Fe,visibleWorkspaceIds:we,matchedWorkspaceIds:pe,titleHighlights:Be}=S.useMemo(()=>{if(!Z.trim())return{directMatchTaskIds:null,treeMatchTaskIds:null,visibleWorkspaceIds:null,matchedWorkspaceIds:null,titleHighlights:new Map};const te=r0(n,Z,sD),ze=r0(a,Z,iD),Ne=new Set(te.map(Ke=>Ke.item.id)),_e=new Set(ze.map(Ke=>Ke.item.id)),yt=new Map;for(const Ke of ze){const Me=Ke.matches.find(On=>On.key==="title");Me&&yt.set(Ke.item.id,Me.indices)}const ht=new Set(Ne);for(const Ke of ze)ht.add(Ke.item.workspaceId);const Ut=new Set(_e),Mt=new Map(a.map(Ke=>[Ke.id,Ke]));for(const Ke of[..._e]){let Me=Mt.get(Ke);for(;Me!=null&&Me.parentTaskId;)Ut.add(Me.parentTaskId),Me=Mt.get(Me.parentTaskId)}return{directMatchTaskIds:_e,treeMatchTaskIds:Ut,visibleWorkspaceIds:ht,matchedWorkspaceIds:Ne,titleHighlights:yt}},[Z,n,a]),Te=S.useRef(new Set);return S.useEffect(()=>{if(Z.trim())for(const te of n)!u.has(te.id)&&!Te.current.has(te.id)&&(Te.current.add(te.id),i(te.id))},[Z,n,u,i]),h.jsxs("div",{className:Se.container,children:[h.jsxs("div",{className:Se.header,children:[h.jsx("span",{children:"Workspaces"}),h.jsxs("div",{className:Se.headerActions,children:[h.jsx("button",{className:`${Se.groupToggle} ${w?Se.groupToggleActive:""}`,onClick:F,"aria-label":w?"Switch to tree view":"Group tasks by status","aria-pressed":w,title:w?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:Se.addButton,onClick:()=>T(!x),"aria-label":"Create workspace",title:"Create workspace",children:"+"})]})]}),n.length>0&&h.jsx("input",{type:"text",value:Z,onChange:te=>he(te.target.value),placeholder:"Filter...","aria-label":"Filter workspaces and tasks",className:Se.searchInput,"data-testid":"sidebar-search"}),x&&h.jsxs("div",{className:Se.createForm,children:[h.jsx("input",{type:"text",value:C,onChange:te=>k(te.target.value),onKeyDown:te=>te.key==="Enter"&&Y(),placeholder:"Workspace name...",autoFocus:!0,disabled:r,className:Se.createInput}),h.jsx("button",{onClick:Y,className:Se.createButton,disabled:r,children:r?h.jsx(Xr,{size:"sm",label:"Creating workspace"}):"OK"})]}),r&&h.jsxs("div",{className:Se.creatingHint,children:[h.jsx(Xr,{size:"sm",label:"Creating workspace"}),"Creating workspace…"]}),n.length===0&&!x&&h.jsxs("div",{className:Se.emptyCta,children:[h.jsx("button",{className:Se.ctaButton,onClick:()=>T(!0),children:"Create Workspace"}),h.jsx("div",{className:Se.ctaDescription,children:"Organize your work into workspaces"})]}),n.map(te=>{if(we&&!we.has(te.id))return null;const ze=W!==null,Ne=u.has(te.id)||ze,_e=a.filter(Me=>Me.workspaceId===te.id),yt=(pe==null?void 0:pe.has(te.id))??!1,ht=ze&&!yt?w?W:Fe:null,Ut=ht?_e.filter(Me=>ht.has(Me.id)):_e,Mt=ae===te.id,Ke=Ne&&!w?uD(Ut):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{Mt?se(te.id):(Ne||se(te.id),d(Kl(te.id)))},className:`${Se.workspaceRow} ${Mt?Se.selected:""}`,children:[h.jsx("span",{className:`${Se.expandArrow} ${Ne?Se.expanded:""}`,children:"▸"}),h.jsx("span",{className:Se.workspaceName,title:te.name,children:te.name}),h.jsx("span",{className:Se.taskCount,children:_e.length>0&&`${_e.filter(Me=>Me.status==="complete").length}/${_e.length}`}),h.jsx("button",{onClick:Me=>{Me.stopPropagation(),d(Os(te.id))},title:"New task",className:Se.newTaskButton,children:"+"})]}),h.jsx(Dn,{children:Ne&&h.jsxs($t.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:[w?rD(Ut,q).map(Me=>h.jsx(cD,{group:Me,isExpanded:D(te.id,Me.status),onToggle:()=>H(te.id,Me.status),selectedTaskId:ne,navigate:d,titleHighlights:Be},Me.status)):Ke.map(Me=>h.jsx(z1,{node:Me,depth:0,expandedTasks:m,toggleTask:G,selectedTaskId:ne,navigate:d,workspaceId:te.id,taskStatusById:q,titleHighlights:Be},Me.id)),Ut.length===0&&h.jsx("div",{className:Se.emptyTaskCta,children:h.jsx("button",{className:Se.createTaskLink,onClick:()=>d(Os(te.id)),children:"+ Create Task"})})]})})]},te.id)})]})}const fD="_container_lovia_1",hD="_content_lovia_40",m0={container:fD,content:hD},pD=320,V1=220,H1=600,G1="grackle-sidebar-width";function mD(){try{const n=localStorage.getItem(G1);if(n!==null){const a=Number(n);if(Number.isFinite(a)&&a>=V1&&a<=H1)return a}}catch{}return pD}function gD(n){try{localStorage.setItem(G1,String(n))}catch{}}function yD(){const[n]=S.useState(mD),a=S.useRef(null);return S.useEffect(()=>{const i=a.current;if(!i)return;const o=new ResizeObserver(r=>{for(const d of r){const u=d.borderBoxSize[0];if(u){const p=Math.round(u.inlineSize);p>=V1&&p<=H1&&gD(p)}}});return o.observe(i),()=>{o.disconnect()}},[]),h.jsx("div",{className:m0.container,ref:a,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:m0.content,children:h.jsx(dD,{})})})}const vD="_bar_8ghh5_1",bD="_barColumn_8ghh5_32",SD="_barRow_8ghh5_63",xD="_input_8ghh5_74",_D="_inputSmall_8ghh5_109",TD="_select_8ghh5_178",ED="_btnPrimary_8ghh5_214",CD="_btnDanger_8ghh5_245",AD="_btnGhost_8ghh5_284",kD="_badge_8ghh5_312",wD="_statusText_8ghh5_322",ND="_statusCompleted_8ghh5_327",jD="_statusFailed_8ghh5_331",DD="_statusBlocked_8ghh5_335",MD="_hintText_8ghh5_340",RD="_creatingHint_8ghh5_345",OD="_errorHint_8ghh5_353",BD="_disconnectHint_8ghh5_359",ue={bar:vD,barColumn:bD,barRow:SD,input:xD,inputSmall:_D,select:TD,btnPrimary:ED,btnDanger:CD,btnGhost:AD,badge:kD,statusText:wD,statusCompleted:ND,statusFailed:jD,statusBlocked:DD,hintText:MD,creatingHint:RD,errorHint:OD,disconnectHint:BD};function g0(n,a){if(!n)return!1;const i=a.find(o=>o.id===n);return i!==void 0&&(i.status==="disconnected"||i.status==="error")}function y0({environmentId:n,onReconnect:a}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:ue.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>a(n),className:ue.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function LD(){const{spawn:n,sendInput:a,kill:i,sessions:o,tasks:r,environments:d,personas:u,addEnvironment:p,provisionEnvironment:m,codespaces:g,codespaceError:v,codespaceListError:y,codespaceCreating:x,listCodespaces:T,createCodespace:C}=Bt(),{showToast:k}=ao(),w=Rn(),[E]=If(),A=Zt("/sessions/:sessionId"),j=Zt("/tasks/:taskId"),V=Zt("/tasks/:taskId/stream"),O=Zt("/tasks/:taskId/findings"),F=Zt("/tasks/:taskId/edit"),H=Zt("/sessions/new"),D=Zt("/environments/new"),U=Zt("/workspaces/:workspaceId"),ee=Zt("/tasks/new"),ne=Zt("/"),ae=Zt("/settings/*"),ie=A==null?void 0:A.params.sessionId,q=(j==null?void 0:j.params.taskId)??(V==null?void 0:V.params.taskId)??(O==null?void 0:O.params.taskId),se=!!H,G=!!D,Y=!!U,Z=!!ee,he=!!F,W=!!ne&&!se&&!G&&!Y&&!Z,Fe=!!ae,we=se?E.get("env")??"":"",[pe,Be]=S.useState(""),[Te,te]=S.useState(""),[ze,Ne]=S.useState(""),[_e,yt]=S.useState("local"),[ht,Ut]=S.useState(""),[Mt,Ke]=S.useState(""),[Me,On]=S.useState(""),[Aa,ka]=S.useState(""),[Hn,Jn]=S.useState(""),[Bn,ea]=S.useState(""),[X,J]=S.useState(""),[oe,ve]=S.useState(""),[ge,Le]=S.useState(""),[Ce,ct]=S.useState("pick"),ke=ie?o.find(xe=>xe.id===ie):void 0,$e=q?r.find(xe=>xe.id===q):void 0,ut=($e==null?void 0:$e.latestSessionId)||void 0,Ve=ut?o.find(xe=>xe.id===ut):void 0,pt=$e?$e.dependsOn.some(xe=>{const Ue=r.find(dt=>dt.id===xe);return Ue&&Ue.status!=="complete"}):!1;if(W||Fe)return h.jsx("div",{className:ue.bar,children:h.jsx("span",{className:ue.hintText,children:"Select a session or click + to start"})});if(he||Z)return h.jsx(h.Fragment,{});if(G){const xe=le=>{if(!le.trim())return!0;const At=Number(le);return Number.isInteger(At)&&At>=1&&At<=65535},Ue=()=>!(!ze.trim()||_e==="ssh"&&!ht.trim()||_e==="codespace"&&!Bn.trim()||(_e==="local"||_e==="ssh")&&!xe(Mt)),dt=()=>{if(!Ue())return;const le={};if(_e==="local"){if(ht.trim()&&(le.host=ht.trim()),Mt.trim()){const At=Number(Mt);Number.isInteger(At)&&(le.port=At)}}else if(_e==="ssh"){if(le.host=ht.trim(),Me.trim()&&(le.user=Me.trim()),Mt.trim()){const At=Number(Mt);Number.isInteger(At)&&(le.sshPort=At)}X.trim()&&(le.identityFile=X.trim())}else _e==="docker"?(Aa.trim()&&(le.image=Aa.trim()),Hn.trim()&&(le.repo=Hn.trim())):_e==="codespace"&&(le.codespaceName=Bn.trim());p(ze.trim(),_e,le),k("Environment added successfully","success"),Ne(""),yt("local"),Ut(""),Ke(""),On(""),ka(""),Jn(""),ea(""),J(""),ve(""),Le(""),ct("pick"),w(Di,{replace:!0})};return h.jsxs("div",{className:ue.barColumn,children:[h.jsxs("div",{className:ue.barRow,children:[h.jsx("span",{className:ue.badge,children:"new env"}),h.jsx("input",{type:"text",value:ze,onChange:le=>Ne(le.target.value),placeholder:"Environment name...",autoFocus:!0,className:ue.input}),h.jsxs("select",{value:_e,onChange:le=>{yt(le.target.value),le.target.value==="codespace"&&(T(),ct("pick"),ea(""))},className:ue.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx("button",{onClick:dt,disabled:!Ue(),className:ue.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:ue.barRow,children:[_e==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:ht,onChange:le=>Ut(le.target.value),placeholder:"Host (optional)...",className:ue.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Mt,onChange:le=>Ke(le.target.value),placeholder:"Port (optional)...",className:ue.inputSmall})]}),_e==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:ht,onChange:le=>Ut(le.target.value),placeholder:"Host (required)...",className:ue.inputSmall}),h.jsx("input",{type:"text",value:Me,onChange:le=>On(le.target.value),placeholder:"User (optional)...",className:ue.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Mt,onChange:le=>Ke(le.target.value),placeholder:"SSH port (optional)...",className:ue.inputSmall}),h.jsx("input",{type:"text",value:X,onChange:le=>J(le.target.value),placeholder:"Identity file (optional)...",className:ue.inputSmall})]}),_e==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Aa,onChange:le=>ka(le.target.value),placeholder:"Image (optional)...",className:ue.inputSmall}),h.jsx("input",{type:"text",value:Hn,onChange:le=>Jn(le.target.value),placeholder:"Repo (optional)...",className:ue.inputSmall})]}),_e==="codespace"&&Ce==="pick"&&h.jsxs(h.Fragment,{children:[!y&&h.jsxs("select",{value:Bn,onChange:le=>{le.target.value==="__create__"?(ct("create"),ea("")):(ea(le.target.value),le.target.value&&!ze.trim()&&Ne(le.target.value))},disabled:x,className:ue.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),g.map(le=>h.jsxs("option",{value:le.name,children:[le.name," (",le.repository,") — ",le.state]},le.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),x&&h.jsx("span",{className:ue.creatingHint,children:"Creating codespace..."}),y&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:ue.errorHint,children:y}),h.jsx("input",{type:"text",value:Bn,onChange:le=>ea(le.target.value),placeholder:"Or enter codespace name manually...",className:ue.inputSmall})]}),v&&!y&&h.jsx("span",{className:ue.errorHint,children:v})]}),_e==="codespace"&&Ce==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:oe,onChange:le=>ve(le.target.value),placeholder:"owner/repo",className:ue.inputSmall}),h.jsx("input",{type:"text",value:ge,onChange:le=>Le(le.target.value),placeholder:"Machine type (optional)...",className:ue.inputSmall}),h.jsx("button",{onClick:()=>{oe.trim()&&(C(oe.trim(),ge.trim()||void 0),ct("pick"),ve(""),Le(""))},disabled:!oe.trim(),className:ue.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{ct("pick"),ve(""),Le("")},className:ue.btnGhost,children:"Cancel"})]})]})]})}if(Y)return h.jsx("div",{className:ue.bar,children:h.jsx("span",{className:ue.hintText,children:"Select a task or click + to create one"})});if(q&&$e){if($e.status==="not_started"){const xe=pt?$e.dependsOn.map(Ue=>r.find(dt=>dt.id===Ue)).filter(Ue=>Ue&&Ue.status!=="complete").map(Ue=>Ue.title):[];return h.jsx("div",{className:ue.bar,children:pt?h.jsxs("span",{className:ue.statusBlocked,children:["Blocked by: ",xe.join(", ")]}):h.jsx("span",{className:ue.hintText,children:"Use the buttons above to start or manage this task"})})}if($e.status==="working"||$e.status==="paused"){if((Ve==null?void 0:Ve.status)==="idle"){const Ue=Ve.environmentId,dt=g0(Ue,d),le=At=>{At.preventDefault();const Ln=$e.latestSessionId||ut;!pe.trim()||!Ln||dt||(a(Ln,pe),Be(""))};return h.jsxs("form",{onSubmit:le,className:ue.bar,children:[dt&&Ue&&h.jsx(y0,{environmentId:Ue,onReconnect:m}),h.jsx("input",{type:"text",value:pe,onChange:At=>Be(At.target.value),placeholder:"Type a message...",autoFocus:!dt,disabled:dt,className:ue.input}),h.jsx("span",{title:dt?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!pe.trim()||dt,className:ue.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:ue.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ue.input})})}if($e.status==="complete")return h.jsxs("div",{className:ue.bar,children:[h.jsx("span",{className:`${ue.statusText} ${ue.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>w(Os($e.workspaceId)),className:ue.btnPrimary,children:"+ New Task"})]});if($e.status==="failed")return h.jsx("div",{className:ue.bar,children:h.jsx("span",{className:`${ue.statusText} ${ue.statusFailed}`,children:"Task failed"})})}if(se){const xe=Ue=>{Ue.preventDefault(),!(!pe.trim()||!we)&&(n(we,pe,Te),k("Session started","success"),Be(""),te(""))};return h.jsxs("form",{onSubmit:xe,className:ue.bar,children:[h.jsx("span",{className:ue.badge,children:"new chat"}),h.jsx("input",{type:"text",value:pe,onChange:Ue=>Be(Ue.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:ue.input}),h.jsxs("select",{value:Te,onChange:Ue=>te(Ue.target.value),className:ue.select,children:[h.jsx("option",{value:"",children:"(Default)"}),u.map(Ue=>h.jsx("option",{value:Ue.id,children:Ue.name},Ue.id))]}),h.jsx("button",{type:"submit",disabled:!pe.trim()||!we,className:ue.btnPrimary,children:"Go"})]})}if(ie){const xe=(ke==null?void 0:ke.status)==="running",Ue=(ke==null?void 0:ke.status)==="idle",dt=ke!==void 0&&["completed","failed","interrupted"].includes(ke.status);if(xe)return h.jsxs("div",{className:ue.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ue.input}),h.jsx("button",{onClick:()=>i(ie),className:ue.btnDanger,title:"Stop session",children:"Stop"})]});if(Ue){const le=g0(ke.environmentId,d),At=Ln=>{Ln.preventDefault(),!(!pe.trim()||le)&&(a(ie,pe),Be(""))};return h.jsxs("form",{onSubmit:At,className:ue.bar,children:[le&&ke.environmentId&&h.jsx(y0,{environmentId:ke.environmentId,onReconnect:m}),h.jsx("input",{type:"text",value:pe,onChange:Ln=>Be(Ln.target.value),placeholder:"Type a message...",autoFocus:!le,disabled:le,className:ue.input}),h.jsx("span",{title:le?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!pe.trim()||le,className:ue.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>i(ie),className:ue.btnDanger,title:"Stop session",children:"Stop"})]})}if(dt)return h.jsxs("div",{className:ue.bar,children:[h.jsxs("span",{className:`${ue.statusText} ${ue.hintText}`,children:["Session ",ke.status]}),h.jsx("button",{onClick:()=>w(F0(ke.environmentId)),className:ue.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:ue.bar,children:h.jsx("span",{className:ue.hintText,children:"Loading..."})})}const ID="_toast_da8ll_1",UD="_success_da8ll_18",zD="_icon_da8ll_22",VD="_error_da8ll_25",HD="_warning_da8ll_32",GD="_info_da8ll_38",PD="_message_da8ll_53",FD="_close_da8ll_60",Bl={toast:ID,success:UD,icon:zD,error:VD,warning:HD,info:GD,message:PD,close:FD},$D={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function qD({toast:n,onDismiss:a}){return S.useEffect(()=>{const i=setTimeout(()=>a(n.id),n.duration);return()=>clearTimeout(i)},[n.id,n.duration,a]),h.jsxs($t.div,{className:`${Bl.toast} ${Bl[n.variant]}`,role:"status",initial:{opacity:0,y:-16,scale:.94},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.94},transition:{duration:.2,ease:"easeOut"},layout:!0,children:[h.jsx("span",{className:Bl.icon,"aria-hidden":"true",children:$D[n.variant]}),h.jsx("span",{className:Bl.message,children:n.message}),h.jsx("button",{type:"button",className:Bl.close,onClick:()=>a(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const YD="_container_qqse2_1",KD={container:YD};function ZD(){const{toasts:n,dismissToast:a}=ao();return h.jsx("div",{className:KD.container,"data-testid":"toast-container",children:h.jsx(Dn,{children:n.map(i=>h.jsx(qD,{toast:i,onDismiss:a},i.id))})})}function XD(n,a){const i=S.useRef(null);S.useEffect(()=>{const o=i.current;if(i.current=n,o===null)return;const r=new Map;for(const u of o)r.set(u.id,u);const d=new Set;for(const u of n){d.add(u.id);const p=r.get(u.id);if(p&&p.status!==u.status&&u.status!=="sleeping"){if(u.status==="connecting"){a("Provisioning environment…","info");continue}u.status==="connected"?a("Environment connected","success"):u.status==="error"?a("Environment provision failed","error"):u.status==="disconnected"&&(p.status==="connected"?a("Environment disconnected","warning"):a("Environment stopped","info"))}}for(const u of o)d.has(u.id)||a("Environment removed","info")},[n,a])}const QD="_panelContainer_aei9x_1",WD="_emptyState_aei9x_8",JD="_fadeIn_aei9x_1",eM="_workspaceSummary_aei9x_17",tM="_workspaceSummaryTitle_aei9x_28",nM="_workspaceSummarySubtitle_aei9x_32",aM="_header_aei9x_36",sM="_headerInfo_aei9x_69",iM="_killButton_aei9x_75",lM="_headerTitle_aei9x_104",oM="_headerActions_aei9x_119",rM="_taskStatusBadge_aei9x_126",cM="_taskBranch_aei9x_135",uM="_taskBlockedBadge_aei9x_141",dM="_btnPrimary_aei9x_149",fM="_btnDanger_aei9x_180",hM="_btnGhost_aei9x_219",pM="_rejectInput_aei9x_245",mM="_tabBar_aei9x_275",gM="_tab_aei9x_275",yM="_active_aei9x_301",vM="_eventScroll_aei9x_306",bM="_tabContent_aei9x_312",SM="_noContext_aei9x_317",xM="_overviewContent_aei9x_323",_M="_overviewDashboard_aei9x_332",TM="_overviewHero_aei9x_338",EM="_statusBadge_aei9x_345",CM="_statusPending_aei9x_357",AM="_statusAssigned_aei9x_362",kM="_statusInProgress_aei9x_367",wM="_statusReview_aei9x_372",NM="_statusDone_aei9x_377",jM="_statusFailed_aei9x_382",DM="_statusWaitingInput_aei9x_387",MM="_overviewBranchPill_aei9x_392",RM="_branchLink_aei9x_407",OM="_overviewSection_aei9x_418",BM="_overviewLabel_aei9x_424",LM="_overviewValue_aei9x_431",IM="_overviewMuted_aei9x_436",UM="_overviewMarkdown_aei9x_442",zM="_envRow_aei9x_511",VM="_envDot_aei9x_517",HM="_envDotGreen_aei9x_524",GM="_envDotYellow_aei9x_528",PM="_envDotRed_aei9x_532",FM="_envDotGray_aei9x_536",$M="_depList_aei9x_540",qM="_depItem_aei9x_546",YM="_depBlocked_aei9x_553",KM="_depDone_aei9x_557",ZM="_timeline_aei9x_561",XM="_timelineRow_aei9x_567",QM="_timelineKey_aei9x_574",WM="_timelineValue_aei9x_580",JM="_timelineDelta_aei9x_584",eR="_reviewNotes_aei9x_595",tR="_overviewDescription_aei9x_606",nR="_waitingMessage_aei9x_612",aR="_errorMessage_aei9x_616",sR="_eventOverflowWarning_aei9x_620",iR="_attemptSelector_aei9x_634",lR="_attemptLabel_aei9x_650",oR="_attemptButton_aei9x_654",rR="_attemptActive_aei9x_671",cR="_attemptStatus_aei9x_677",uR="_emptyCta_aei9x_683",dR="_ctaTitle_aei9x_695",fR="_ctaDescription_aei9x_701",hR="_ctaButton_aei9x_708",pR="_ctaCreateForm_aei9x_743",mR="_ctaCreateInput_aei9x_749",gR="_ctaCreateOk_aei9x_780",yR="_ctaLink_aei9x_815",vR="_workspaceHeader_aei9x_829",bR="_workspaceName_aei9x_854",SR="_workspaceMeta_aei9x_867",xR="_metaRow_aei9x_875",_R="_metaLabel_aei9x_888",TR="_metaValue_aei9x_903",ER="_archiveButton_aei9x_913",CR="_repoLink_aei9x_943",AR="_metaToggle_aei9x_953",kR="_metaToggleArrow_aei9x_974",wR="_metaToggleArrowOpen_aei9x_979",NR="_progressBarContainer_aei9x_983",jR="_progressBar_aei9x_983",DR="_progressFill_aei9x_999",MR="_progressLabel_aei9x_1006",RR="_metaTimestamps_aei9x_1013",OR="_metaTimestamp_aei9x_1013",B={panelContainer:QD,emptyState:WD,fadeIn:JD,workspaceSummary:eM,workspaceSummaryTitle:tM,workspaceSummarySubtitle:nM,header:aM,headerInfo:sM,killButton:iM,headerTitle:lM,headerActions:oM,taskStatusBadge:rM,taskBranch:cM,taskBlockedBadge:uM,btnPrimary:dM,btnDanger:fM,btnGhost:hM,rejectInput:pM,tabBar:mM,tab:gM,active:yM,eventScroll:vM,tabContent:bM,noContext:SM,overviewContent:xM,overviewDashboard:_M,overviewHero:TM,statusBadge:EM,statusPending:CM,statusAssigned:AM,statusInProgress:kM,statusReview:wM,statusDone:NM,statusFailed:jM,statusWaitingInput:DM,overviewBranchPill:MM,branchLink:RM,overviewSection:OM,overviewLabel:BM,overviewValue:LM,overviewMuted:IM,overviewMarkdown:UM,envRow:zM,envDot:VM,envDotGreen:HM,envDotYellow:GM,envDotRed:PM,envDotGray:FM,depList:$M,depItem:qM,depBlocked:YM,depDone:KM,timeline:ZM,timelineRow:XM,timelineKey:QM,timelineValue:WM,timelineDelta:JM,reviewNotes:eR,overviewDescription:tR,waitingMessage:nR,errorMessage:aR,eventOverflowWarning:sR,attemptSelector:iR,attemptLabel:lR,attemptButton:oR,attemptActive:rR,attemptStatus:cR,emptyCta:uR,ctaTitle:dR,ctaDescription:fR,ctaButton:hR,ctaCreateForm:pR,ctaCreateInput:mR,ctaCreateOk:gR,ctaLink:yR,workspaceHeader:vR,workspaceName:bR,workspaceMeta:SR,metaRow:xR,metaLabel:_R,metaValue:TR,archiveButton:ER,repoLink:CR,metaToggle:AR,metaToggleArrow:kR,metaToggleArrowOpen:wR,progressBarContainer:NR,progressBar:jR,progressFill:DR,progressLabel:MR,metaTimestamps:RR,metaTimestamp:OR};function BR(){const{workspaces:n,createWorkspace:a,workspaceCreating:i}=Bt(),[o,r]=S.useState(!1),[d,u]=S.useState(""),p=()=>{!d.trim()||i||a(d.trim())};return n.length===0?h.jsxs("div",{className:B.emptyCta,"data-testid":"welcome-cta",children:[h.jsx("div",{className:B.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:B.ctaDescription,children:"Organize your work into workspaces and let agents tackle the tasks."}),o?h.jsxs("div",{className:B.ctaCreateForm,children:[h.jsx("input",{type:"text",value:d,onChange:m=>u(m.target.value),onKeyDown:m=>{m.key==="Enter"?p():m.key==="Escape"&&(r(!1),u(""))},placeholder:"Workspace name...","aria-label":"Workspace name",autoFocus:!0,disabled:i,className:B.ctaCreateInput,"data-testid":"welcome-create-input"}),h.jsx("button",{onClick:p,className:B.ctaCreateOk,disabled:i,"aria-label":i?"Creating workspace":void 0,"data-testid":"welcome-create-ok",children:i?h.jsx(Xr,{size:"sm",label:"Creating workspace"}):"OK"})]}):h.jsx("button",{className:B.ctaButton,onClick:()=>r(!0),disabled:i,"data-testid":"welcome-create-button",children:"Create Your First Workspace"})]}):h.jsx("div",{className:B.emptyState,children:"Select a workspace or task to get started"})}function LR(n,a){const i=[];let o=n;const r=new Set;for(;o&&a.has(o)&&!r.has(o);){r.add(o);const d=a.get(o);i.unshift(d),o=d.parentTaskId||void 0}return i}const Bs={label:"Home",url:"/"};function IR(n){return n?[Bs,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Bs,{label:"Settings",url:void 0}]}function UR(){return[Bs,{label:"New Environment",url:void 0}]}function zR(){return[Bs,{label:"New Chat",url:void 0}]}function VR(n){return[Bs,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function HR(n,a){const i=a.find(o=>o.id===n);return[Bs,{label:(i==null?void 0:i.name)??"Workspace",url:void 0}]}function GR(n,a,i){const o=LR(n,i),r=i.get(n),d=r==null?void 0:r.workspaceId,u=d?a.find(g=>g.id===d):void 0,p=[Bs];u&&p.push({label:u.name,url:Kl(u.id)});for(let g=0;g<o.length-1;g++)p.push({label:o[g].title,url:ns(o[g].id)});const m=o[o.length-1];return p.push({label:(m==null?void 0:m.title)??n,url:void 0}),p}function PR(){const n=zR();return h.jsxs("div",{className:B.panelContainer,children:[h.jsx(Vi,{segments:n}),h.jsx("div",{className:B.emptyState,children:"Enter a prompt below to start a new session"})]})}const P1=50;function FR(n,a,i,o,r=P1){return o?n<r:a-n-i<r}function $R(n,a){const i=a-n;return i>0?i:0}function qR({scrollRef:n,contentLength:a,isReversed:i}){const[o,r]=S.useState(!0),d=S.useRef(0),u=S.useRef(!1),p=S.useRef(0);S.useEffect(()=>{const g=n.current;if(!g)return;let v=!0;const y=()=>{p.current||(p.current=requestAnimationFrame(()=>{p.current=0;const x=FR(g.scrollTop,g.scrollHeight,g.clientHeight,i,P1);x!==v&&(v=x,r(x))}))};return g.addEventListener("scroll",y,{passive:!0}),()=>{g.removeEventListener("scroll",y),p.current&&(cancelAnimationFrame(p.current),p.current=0)}},[n,i]),S.useLayoutEffect(()=>{const g=n.current;!g||u.current||(u.current=!0,i?g.scrollTop=0:g.scrollTop=g.scrollHeight,r(!0))},[n,i]),S.useLayoutEffect(()=>{const g=n.current;if(g){if(i&&!o){const v=$R(d.current,g.scrollHeight);v>0&&(g.scrollTop+=v)}o&&(i?g.scrollTo({top:0,behavior:"smooth"}):g.scrollTo({top:g.scrollHeight,behavior:"smooth"})),d.current=g.scrollHeight}},[a,o,i,n]);const m=S.useCallback(()=>{const g=n.current;if(!g)return;const v=i?0:g.scrollHeight;g.scrollTo({top:v,behavior:"smooth"}),r(!0)},[n,i]);return{isAtAnchor:o,scrollToAnchor:m}}const YR="_wrapper_p24zt_1",KR="_scrollContainer_p24zt_9",ZR="_toolbar_p24zt_15",XR="_directionToggle_p24zt_22",QR="_scrollToAnchor_p24zt_60",WR="_scrollToAnchorBottom_p24zt_84",JR="_scrollToAnchorTop_p24zt_88",ws={wrapper:YR,scrollContainer:KR,toolbar:ZR,directionToggle:XR,scrollToAnchor:QR,scrollToAnchorBottom:WR,scrollToAnchorTop:JR},F1="grackle-stream-direction";function e3(){try{return localStorage.getItem(F1)==="reversed"}catch{return!1}}function t3({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:B.eventOverflowWarning,role:"alert",children:["⚠"," ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function $1({events:n,eventsDropped:a,emptyState:i}){const o=S.useRef(null),[r,d]=S.useState(e3),u=k2(),p=S.useMemo(()=>r?[...n].reverse():n,[n,r]),{isAtAnchor:m,scrollToAnchor:g}=qR({scrollRef:o,contentLength:n.length,isReversed:r}),v=()=>{const T=!r;d(T);try{localStorage.setItem(F1,T?"reversed":"default")}catch{}},y=u?0:.2,x=r?-8:8;return h.jsxs("div",{className:ws.wrapper,children:[h.jsx("div",{className:ws.toolbar,children:h.jsx("button",{className:ws.directionToggle,onClick:v,title:r?"Showing newest first":"Showing oldest first","aria-label":r?"Switch to newest at bottom":"Switch to newest at top","data-testid":"direction-toggle",children:r?"↓":"↑"})}),h.jsxs("div",{ref:o,className:ws.scrollContainer,"data-testid":"event-stream-scroll",children:[n.length===0&&i,h.jsx(t3,{eventsDropped:a}),h.jsx(Dn,{initial:!1,children:p.map((T,C)=>{const k=r?n.length-1-C:C;return h.jsx($t.div,{initial:{opacity:0,y:x},animate:{opacity:1,y:0},transition:{duration:y,ease:"easeOut"},children:h.jsx(JN,{event:T,toolUseCtx:T.toolUseCtx})},`${T.sessionId}-${T.timestamp}-${k}`)})})]}),h.jsx(Dn,{children:!m&&h.jsxs($t.button,{className:`${ws.scrollToAnchor} ${r?ws.scrollToAnchorTop:ws.scrollToAnchorBottom}`,onClick:g,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15},"aria-label":"Scroll to latest","data-testid":"scroll-to-anchor",children:[r?"↑":"↓"," New events"]})})]})}function q1(n){const a=[];for(const i of n){const o=a[a.length-1];i.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?a[a.length-1]={...o,content:o.content+i.content}:a.push(i)}return a}function Y1(n){const a=new Map;for(const d of n)if(d.raw)try{a.set(d,JSON.parse(d.raw))}catch{}const i=new Map;for(const d of n){if(d.eventType!=="tool_use")continue;const u=a.get(d);if(!(!u||typeof u.id!="string"))try{const p=JSON.parse(d.content);i.set(u.id,{tool:p.tool,args:p.args})}catch{}}const o=new Set;return n.map(d=>{if(d.eventType!=="tool_result")return d;const u=a.get(d);if(!u||typeof u.tool_use_id!="string")return d;const p=i.get(u.tool_use_id);return p?(o.add(u.tool_use_id),{...d,toolUseCtx:p}):d}).filter(d=>{if(d.eventType!=="tool_use")return!0;const u=a.get(d);return u&&typeof u.id=="string"?!o.has(u.id):!0})}function n3({sessionId:n,session:a,isActive:i,onKill:o}){return h.jsxs("div",{className:B.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),a&&` | ${a.runtime} | ${a.status}`]}),h.jsxs("span",{className:B.headerInfo,children:[a&&h.jsx("span",{children:a.prompt.length>60?a.prompt.slice(0,60)+"...":a.prompt}),i&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:B.killButton,children:"×"})]})]})}function a3({session:n}){const a=n&&["completed","failed","interrupted"].includes(n.status),i=a?`Session ${n.status} with no events recorded.`:"Waiting for events...";return h.jsx("div",{className:a?B.errorMessage:B.waitingMessage,children:i})}function s3(){const{sessionId:n}=ec(),{events:a,eventsDropped:i,sessions:o,kill:r,loadSessionEvents:d}=Bt(),u=S.useRef(void 0),p=VR(n),m=o.find(y=>y.id===n)??void 0,g=S.useMemo(()=>{const y=n?a.filter(x=>x.sessionId===n):[];return Y1(q1(y))},[a,n]);if(S.useEffect(()=>{n&&n!==u.current&&(u.current=n,d(n))},[n,d]),!n)return h.jsx("div",{className:B.emptyState,children:"No session selected"});const v=(m==null?void 0:m.status)==="running"||(m==null?void 0:m.status)==="idle";return h.jsxs("div",{className:B.panelContainer,children:[h.jsx(Vi,{segments:p}),h.jsx(n3,{sessionId:n,session:m,isActive:v,onKill:r}),h.jsx($1,{events:g,eventsDropped:i,emptyState:h.jsx(a3,{session:m})})]})}const v0=220,b0=70,i3=40,l3=60,o3="hierarchy",r3="dependency";function c3(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const a=new by.graphlib.Graph({multigraph:!0});a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:i3,ranksep:l3});const i=new Map(n.map(u=>[u.id,u])),o=new Map;for(const u of n)if(u.parentTaskId&&i.has(u.parentTaskId)){const p=o.get(u.parentTaskId)||[];p.push(u),o.set(u.parentTaskId,p)}for(const u of n)a.setNode(u.id,{width:v0,height:b0});const r=[];for(const u of n){if(u.parentTaskId&&i.has(u.parentTaskId)){const p=`hierarchy-${u.parentTaskId}-${u.id}`;a.setEdge(u.parentTaskId,u.id,{},p),r.push({id:p,source:u.parentTaskId,target:u.id,type:"smoothstep",data:{edgeType:o3},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of u.dependsOn)if(i.has(p)){const m=`dependency-${p}-${u.id}`;a.setEdge(p,u.id,{},m),r.push({id:m,source:p,target:u.id,type:"smoothstep",data:{edgeType:r3},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return by.layout(a),{nodes:n.map(u=>{const p=a.node(u.id),m=o.get(u.id)||[];return{id:u.id,type:"task",position:{x:p.x-v0/2,y:p.y-b0/2},data:{task:u,childCount:m.length,doneChildCount:m.filter(g=>g.status==="complete").length,hasDependencies:u.dependsOn.length>0}}}),edges:r}},[n])}const u3="_dagContainer_js4w6_1",d3="_taskNode_js4w6_26",f3="_taskNodeBorder_js4w6_54",h3="_taskNodeContent_js4w6_60",p3="_taskNodeHeader_js4w6_70",m3="_taskNodeIcon_js4w6_77",g3="_taskNodeTitle_js4w6_82",y3="_taskNodeBadges_js4w6_90",v3="_childBadge_js4w6_95",b3="_depBadge_js4w6_107",S3="_handle_js4w6_119",x3="_emptyCta_js4w6_126",_3="_ctaDescription_js4w6_137",T3="_ctaButton_js4w6_144",Xt={dagContainer:u3,taskNode:d3,taskNodeBorder:f3,taskNodeContent:h3,taskNodeHeader:p3,taskNodeIcon:m3,taskNodeTitle:g3,taskNodeBadges:y3,childBadge:v3,depBadge:b3,handle:S3,emptyCta:x3,ctaDescription:_3,ctaButton:T3};function E3({data:n}){const{task:a,childCount:i,doneChildCount:o,hasDependencies:r}=n,d=is(a.status);return h.jsxs("div",{className:Xt.taskNode,"data-task-id":a.id,"data-task-title":a.title,children:[h.jsx(Sy,{type:"target",position:xy.Top,className:Xt.handle}),h.jsx("div",{className:Xt.taskNodeBorder,style:{backgroundColor:d.color}}),h.jsxs("div",{className:Xt.taskNodeContent,children:[h.jsxs("div",{className:Xt.taskNodeHeader,children:[h.jsx("span",{className:Xt.taskNodeIcon,style:{color:d.color},children:d.icon}),h.jsx("span",{className:Xt.taskNodeTitle,children:a.title})]}),h.jsxs("div",{className:Xt.taskNodeBadges,children:[i>0&&h.jsxs("span",{className:Xt.childBadge,children:[o,"/",i]}),r&&h.jsx("span",{className:Xt.depBadge,children:"dep"})]})]}),h.jsx(Sy,{type:"source",position:xy.Bottom,className:Xt.handle})]})}const C3=Sj,A3={task:E3};function k3({workspaceId:n}){const{tasks:a}=Bt(),i=Rn(),{resolvedThemeId:o}=Q0(),r=S.useMemo(()=>a.filter(v=>v.workspaceId===n),[a,n]),{nodes:d,edges:u}=c3(r),p=S.useMemo(()=>{const v=getComputedStyle(document.documentElement),y={};for(const[x,T]of Object.entries(C3))y[x]=v.getPropertyValue(T).trim()||"#6b7a8d";return y},[o]),m=S.useCallback((v,y)=>{i(ns(y.id))},[i]),g=S.useCallback(v=>{const y=v.data;return p[y.task.status]||p.pending},[p]);return r.length===0?h.jsxs("div",{className:Xt.emptyCta,children:[h.jsx("button",{className:Xt.ctaButton,onClick:()=>i(Os(n)),children:"Create Task"}),h.jsx("div",{className:Xt.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:Xt.dagContainer,children:h.jsxs(p_,{nodes:d,edges:u,nodeTypes:A3,onNodeClick:m,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(m_,{variant:g_.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(y_,{showInteractive:!1}),h.jsx(v_,{nodeColor:g,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function w3({tasks:n,taskStatusById:a,sessionStatusByTaskId:i}){const o=new Map;for(const d of n)if(d.parentTaskId){const u=o.get(d.parentTaskId);u?u.push(d):o.set(d.parentTaskId,[d])}const r=new Map(h0.map(d=>[d,[]]));for(const d of n){const u=xh(d.status),p=d.dependsOn.length>0&&d.dependsOn.some(C=>a.get(C)!=="complete"),m=o.get(d.id)??[],g=m.length,v=m.filter(C=>C.status==="complete").length;let y;if(u==="paused"&&i){const C=i.get(d.id);C==="idle"?y="Needs input":C==="completed"&&(y="Ready to complete")}const x={task:d,isBlocked:p,childCount:g,doneChildCount:v,pausedSubBadge:y},T=r.get(u);T?T.push(x):r.get("not_started").push(x)}for(const d of r.values())d.sort((u,p)=>u.task.sortOrder-p.task.sortOrder);return h0.map(d=>{const u=is(d);return{status:d,label:u.label,style:u,tasks:r.get(d)??[]}})}const N3="_boardContainer_1c4y1_1",j3="_column_1c4y1_17",D3="_columnHeader_1c4y1_34",M3="_columnIcon_1c4y1_47",R3="_columnLabel_1c4y1_52",O3="_columnCount_1c4y1_57",B3="_cardList_1c4y1_67",L3="_emptyPlaceholder_1c4y1_76",I3="_card_1c4y1_67",U3="_cardHeader_1c4y1_107",z3="_cardStatusIcon_1c4y1_113",V3="_cardTitle_1c4y1_119",H3="_cardBadges_1c4y1_127",G3="_badge_1c4y1_134",P3="_blockedBadge_1c4y1_146",F3="_childBadge_1c4y1_151",$3="_depBadge_1c4y1_155",q3="_parentBadge_1c4y1_159",Y3="_pausedSubBadge_1c4y1_166",K3="_personaBadge_1c4y1_170",Z3="_envBadge_1c4y1_174",X3="_emptyCta_1c4y1_178",Q3="_ctaButton_1c4y1_188",W3="_ctaDescription_1c4y1_204",Xe={boardContainer:N3,column:j3,columnHeader:D3,columnIcon:M3,columnLabel:R3,columnCount:O3,cardList:B3,emptyPlaceholder:L3,card:I3,cardHeader:U3,cardStatusIcon:z3,cardTitle:V3,cardBadges:H3,badge:G3,blockedBadge:P3,childBadge:F3,depBadge:$3,parentBadge:q3,pausedSubBadge:Y3,personaBadge:K3,envBadge:Z3,emptyCta:X3,ctaButton:Q3,ctaDescription:W3};function J3({workspaceId:n}){const{tasks:a,sessions:i,personas:o,environments:r}=Bt(),d=Rn(),u=S.useMemo(()=>a.filter(y=>y.workspaceId===n),[a,n]),p=S.useMemo(()=>new Map(a.map(y=>[y.id,y.status])),[a]),m=S.useMemo(()=>new Map(u.map(y=>[y.id,y])),[u]),g=S.useMemo(()=>{const y=new Map(i.map(E=>[E.id,E])),x=new Map(o.map(E=>[E.id,E])),T=new Map(r.map(E=>[E.id,E])),C=new Map,k=new Map,w=new Map;for(const E of u)if(E.latestSessionId){const A=y.get(E.latestSessionId);if(A){if(C.set(E.id,A.status),A.personaId){const j=x.get(A.personaId);j&&k.set(E.id,j.name)}if(A.environmentId){const j=T.get(A.environmentId);j&&w.set(E.id,j.displayName)}}}return{sessionStatusByTaskId:C,personaNameByTaskId:k,environmentNameByTaskId:w}},[u,i,o,r]),v=S.useMemo(()=>w3({tasks:u,taskStatusById:p,sessionStatusByTaskId:g.sessionStatusByTaskId}),[u,p,g]);return u.length===0?h.jsxs("div",{className:Xe.emptyCta,"data-testid":"board-empty-cta",children:[h.jsx("button",{className:Xe.ctaButton,onClick:()=>d(Os(n)),children:"Create Task"}),h.jsx("div",{className:Xe.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}):h.jsx("div",{className:Xe.boardContainer,"data-testid":"board-container",children:v.map(y=>h.jsxs("section",{className:Xe.column,"data-testid":`board-column-${y.status}`,"aria-label":`${y.label}, ${y.tasks.length} ${y.tasks.length===1?"task":"tasks"}`,children:[h.jsxs("div",{className:Xe.columnHeader,children:[h.jsx("span",{className:Xe.columnIcon,style:{color:y.style.color},children:y.style.icon}),h.jsx("span",{className:Xe.columnLabel,children:y.label}),h.jsx("span",{className:Xe.columnCount,"data-testid":`board-count-${y.status}`,children:y.tasks.length})]}),h.jsx("div",{className:Xe.cardList,children:y.tasks.length===0?h.jsx("div",{className:Xe.emptyPlaceholder,children:"No tasks"}):h.jsx(Dn,{mode:"popLayout",children:y.tasks.map(x=>h.jsx($t.div,{layout:!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},children:h.jsx(eO,{boardTask:x,tasksById:m,personaName:g.personaNameByTaskId.get(x.task.id),envName:g.environmentNameByTaskId.get(x.task.id),onClick:()=>d(ns(x.task.id))})},x.task.id))})})]},y.status))})}function eO({boardTask:n,tasksById:a,personaName:i,envName:o,onClick:r}){const{task:d,isBlocked:u,childCount:p,doneChildCount:m,pausedSubBadge:g}=n,v=is(d.status),y=d.parentTaskId?a.get(d.parentTaskId):void 0;return h.jsxs("div",{className:Xe.card,tabIndex:0,role:"button","data-testid":`board-card-${d.id}`,onClick:r,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),r())},children:[h.jsxs("div",{className:Xe.cardHeader,children:[h.jsx("span",{className:Xe.cardStatusIcon,style:{color:v.color},children:v.icon}),h.jsx("span",{className:Xe.cardTitle,children:d.title})]}),h.jsxs("div",{className:Xe.cardBadges,children:[y&&h.jsx("span",{className:`${Xe.badge} ${Xe.parentBadge}`,title:y.title,children:y.title}),p>0&&h.jsxs("span",{className:`${Xe.badge} ${Xe.childBadge}`,children:[m,"/",p]}),u&&h.jsx("span",{className:`${Xe.badge} ${Xe.blockedBadge}`,children:"blocked"}),d.dependsOn.length>0&&!u&&h.jsx("span",{className:`${Xe.badge} ${Xe.depBadge}`,children:"dep"}),g&&h.jsx("span",{className:`${Xe.badge} ${Xe.pausedSubBadge}`,children:g}),i&&h.jsx("span",{className:`${Xe.badge} ${Xe.personaBadge}`,children:i}),o&&h.jsx("span",{className:`${Xe.badge} ${Xe.envBadge}`,children:o})]})]})}function _h(n){const{value:a,onSave:i,validate:o,fieldId:r,activeFieldId:d,onActivate:u,enterToSave:p=!0,trimOnSave:m=!0}=n,[g,v]=S.useState(""),[y,x]=S.useState(""),T=S.useRef(!1),C=d===r,k=S.useCallback(H=>{v(H),x("")},[]),w=S.useCallback(()=>{x("")},[]),E=S.useCallback(()=>{T.current=!1,u==null||u(null),v(""),x("")},[u]),A=S.useCallback(()=>{const H=m?g.trim():g;if(o){const U=o(g);if(U){x(U);return}}const D=m?a.trim():a;if(H===D){E();return}i(H),E()},[g,a,m,o,i,E]),j=S.useCallback(()=>{T.current=!0,u==null||u(r),v(a),x("")},[r,a,u]),V=S.useCallback(H=>{if(T.current){T.current=!1;return}H.relatedTarget instanceof HTMLElement&&H.relatedTarget.dataset.editAction===r||A()},[r,A]),O=S.useCallback(H=>{H.key==="Escape"?E():H.key==="Enter"&&p&&A()},[E,p,A]),F=(()=>{if(!C)return!1;const H=m?a.trim():a;return(m?g.trim():g)!==H})();return S.useEffect(()=>{!C&&(g!==""||y!=="")&&(v(""),x(""))},[C,g,y]),{isEditing:C,draft:g,error:y,isDirty:F,startEdit:j,cancelEdit:E,save:A,setDraft:k,clearError:w,handleBlur:V,handleKeyDown:O,ignoreInitialBlurRef:T}}const tO="_editFieldWrapper_yuzty_1",nO="_editInput_yuzty_10",aO="_editTextarea_yuzty_42",sO="_editSelect_yuzty_78",iO="_editError_yuzty_111",lO="_editInputInvalid_yuzty_118",oO="_editHint_yuzty_123",rO="_unsavedDot_yuzty_132",cO="_metaValueClickable_yuzty_140",uO="_editButton_yuzty_159",dO="_metaPlaceholder_yuzty_175",fO="_worktreeToggle_yuzty_180",Pe={editFieldWrapper:tO,editInput:nO,editTextarea:aO,editSelect:sO,editError:iO,editInputInvalid:lO,editHint:oO,unsavedDot:rO,metaValueClickable:cO,editButton:uO,metaPlaceholder:dO,worktreeToggle:fO};function qd(n){const{value:a,onSave:i,validate:o,mode:r="edit",fieldId:d="text",activeFieldId:u,onActivate:p,onChange:m,renderDisplay:g,placeholder:v,maxLength:y,ariaLabel:x,"data-testid":T}=n,C=S.useRef(null),k=_h({value:a,onSave:i,validate:o,fieldId:d,activeFieldId:u,onActivate:p,enterToSave:!0,trimOnSave:!0});if(S.useEffect(()=>{if(k.isEditing){const E=window.setTimeout(()=>{var A;(A=C.current)==null||A.focus()},0);return()=>window.clearTimeout(E)}},[k.isEditing]),r==="create"){const E=j=>{m==null||m(j.target.value)},A=o==null?void 0:o(a);return h.jsxs("div",{className:Pe.editFieldWrapper,children:[h.jsx("input",{className:`${Pe.editInput} ${A?Pe.editInputInvalid:""}`,value:a,onChange:E,maxLength:y,placeholder:v,"aria-label":x,"data-testid":T?`${T}-input`:void 0}),A&&h.jsx("span",{className:Pe.editError,"data-testid":"edit-error",children:A})]})}if(k.isEditing)return h.jsxs("div",{className:Pe.editFieldWrapper,children:[h.jsx("input",{ref:C,className:`${Pe.editInput} ${k.error?Pe.editInputInvalid:""}`,value:k.draft,onChange:E=>k.setDraft(E.target.value),onBlur:k.handleBlur,onKeyDown:k.handleKeyDown,maxLength:y,placeholder:v,"aria-label":x,"data-testid":T?`${T}-input`:void 0}),k.isDirty&&h.jsx("span",{className:Pe.unsavedDot,title:"Unsaved changes"}),k.error&&h.jsx("span",{className:Pe.editError,"data-testid":"edit-error",children:k.error}),h.jsx("span",{className:Pe.editHint,children:"Enter to save · Esc to cancel"})]});const w=g==null?void 0:g(a);return h.jsxs("span",{role:"button",tabIndex:0,className:Pe.metaValueClickable,onClick:()=>k.startEdit(),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),k.startEdit())},title:"Click to edit","aria-label":x,"data-testid":T?`${T}-button`:void 0,children:[w!==void 0?w:a?h.jsx("span",{children:a}):h.jsx("span",{className:Pe.metaPlaceholder,children:v||"None"}),h.jsx("span",{className:Pe.editButton,"aria-hidden":"true",children:"✏️"})]})}function hO(n){const{value:a,onSave:i,validate:o,mode:r="edit",fieldId:d="textarea",activeFieldId:u,onActivate:p,onChange:m,renderDisplay:g,placeholder:v,ariaLabel:y,"data-testid":x}=n,T=S.useRef(null),C=_h({value:a,onSave:i,validate:o,fieldId:d,activeFieldId:u,onActivate:p,enterToSave:!1,trimOnSave:!1});if(S.useEffect(()=>{if(C.isEditing){const w=window.setTimeout(()=>{var E;(E=T.current)==null||E.focus()},0);return()=>window.clearTimeout(w)}},[C.isEditing]),r==="create"){const w=A=>{m==null||m(A.target.value)},E=o==null?void 0:o(a);return h.jsxs("div",{className:Pe.editFieldWrapper,children:[h.jsx("textarea",{className:`${Pe.editTextarea} ${E?Pe.editInputInvalid:""}`,value:a,onChange:w,placeholder:v,"aria-label":y,"data-testid":x?`${x}-input`:void 0}),E&&h.jsx("span",{className:Pe.editError,"data-testid":"edit-error",children:E})]})}if(C.isEditing)return h.jsxs("div",{className:Pe.editFieldWrapper,children:[h.jsx("textarea",{ref:T,className:`${Pe.editTextarea} ${C.error?Pe.editInputInvalid:""}`,value:C.draft,onChange:w=>C.setDraft(w.target.value),onBlur:C.handleBlur,onKeyDown:C.handleKeyDown,title:y,"aria-label":y,"data-testid":x?`${x}-input`:void 0}),C.isDirty&&h.jsx("span",{className:Pe.unsavedDot,title:"Unsaved changes"}),C.error&&h.jsx("span",{className:Pe.editError,"data-testid":"edit-error",children:C.error}),h.jsx("span",{className:Pe.editHint,children:"Tab to save · Esc to cancel"})]});const k=g==null?void 0:g(a);return h.jsxs("span",{role:"button",tabIndex:0,className:Pe.metaValueClickable,onClick:()=>C.startEdit(),onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),C.startEdit())},title:"Click to edit","aria-label":y,"data-testid":x?`${x}-button`:void 0,children:[k!==void 0?k:a?h.jsx("span",{children:a}):h.jsx("span",{className:Pe.metaPlaceholder,children:v||"None"}),h.jsx("span",{className:Pe.editButton,"aria-hidden":"true",children:"✏️"})]})}function S0(n){var j;const{value:a,onSave:i,mode:o="edit",options:r,fieldId:d="select",activeFieldId:u,onActivate:p,onChange:m,renderDisplay:g,placeholder:v,ariaLabel:y,"data-testid":x}=n,T=S.useRef(null),C=_h({value:a,onSave:i,fieldId:d,activeFieldId:u,onActivate:p,enterToSave:!1,trimOnSave:!1});S.useEffect(()=>{if(C.isEditing){const V=window.setTimeout(()=>{var O;(O=T.current)==null||O.focus()},0);return()=>window.clearTimeout(V)}},[C.isEditing]);const k=S.useCallback(V=>{const O=V.target.value;C.ignoreInitialBlurRef.current=!1,O!==a&&i(O),C.cancelEdit()},[a,i,C]),w=S.useCallback(V=>{if(C.ignoreInitialBlurRef.current){C.ignoreInitialBlurRef.current=!1;return}V.relatedTarget instanceof HTMLElement&&V.relatedTarget.dataset.editAction===d||C.cancelEdit()},[d,C]);if(o==="create")return h.jsx("select",{className:Pe.editSelect,value:a,onChange:V=>m==null?void 0:m(V.target.value),"aria-label":y,"data-testid":x?`${x}-select`:void 0,children:r.map(V=>h.jsx("option",{value:V.value,children:V.label},V.value))});if(C.isEditing)return h.jsx("select",{ref:T,className:Pe.editSelect,value:C.draft,onChange:k,onBlur:w,title:y,"aria-label":y,"data-testid":x?`${x}-select`:void 0,children:r.map(V=>h.jsx("option",{value:V.value,children:V.label},V.value))});const E=g==null?void 0:g(a),A=(j=r.find(V=>V.value===a))==null?void 0:j.label;return h.jsxs("button",{type:"button",className:Pe.metaValueClickable,onClick:()=>C.startEdit(),title:"Click to change","aria-label":y,"data-testid":x?`${x}-button`:void 0,children:[E!==void 0?E:A?h.jsx("span",{children:A}):h.jsx("span",{className:Pe.metaPlaceholder,children:v||"None"}),h.jsx("span",{className:Pe.editButton,"aria-hidden":"true",children:"✏️"})]})}function pO(n){const{checked:a,onChange:i,label:o,ariaLabel:r,"data-testid":d}=n;return h.jsxs("label",{className:Pe.worktreeToggle,"data-testid":d,children:[h.jsx("input",{type:"checkbox",checked:a,onChange:u=>i(u.target.checked),"aria-label":r}),h.jsx("span",{children:o})]})}function mO(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?B.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?B.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?B.envDotRed:B.envDotGray}function x0(n){if(!n)return"";const a=new Date(n);if(isNaN(a.getTime()))return"";const o=Date.now()-a.getTime();if(o<0)return"just now";const r=Math.floor(o/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const d=Math.floor(r/60);if(d<24)return`${d}h ago`;const u=Math.floor(d/24);return u<30?`${u}d ago`:a.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}const Yd=100;function gO(){const{workspaceId:n}=ec(),a=Rn(),{tasks:i,environments:o,workspaces:r,personas:d,archiveWorkspace:u,updateWorkspace:p}=Bt(),[m,g]=S.useState("tasks"),[v,y]=S.useState(!1),[x,T]=S.useState(null),[C,k]=S.useState(!1),w=S.useRef(void 0),E=HR(n,r);S.useEffect(()=>{const D=w.current;w.current=n,!(D===void 0||D===n)&&x!==null&&T(null)},[n,x]);const A=r.find(D=>D.id===n),j=i.filter(D=>D.workspaceId===n),V=j.filter(D=>D.status==="complete").length,O=j.length,F=O>0?Math.round(V/O*100):0,H=o.find(D=>D.id===(A==null?void 0:A.defaultEnvironmentId));return h.jsxs("div",{className:B.panelContainer,children:[h.jsx(Vi,{segments:E}),h.jsxs("div",{className:B.workspaceHeader,children:[h.jsx("span",{className:B.workspaceName,"data-testid":"workspace-name",children:h.jsx(qd,{value:(A==null?void 0:A.name)||"",onSave:D=>{A&&p(A.id,{name:D})},validate:D=>{const U=D.trim();if(!U)return"Name is required";if(U.length>Yd)return`Max ${Yd} characters`},maxLength:Yd,fieldId:"name",activeFieldId:x,onActivate:T,ariaLabel:"Workspace name",renderDisplay:D=>D||n||void 0,"data-testid":"edit-name"})}),h.jsx("button",{className:B.archiveButton,onClick:()=>y(!0),title:"Archive workspace","data-testid":"archive-workspace-button",children:"Archive"})]}),h.jsxs("button",{className:B.metaToggle,onClick:()=>k(!C),"aria-expanded":!C,"aria-controls":"workspace-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${B.metaToggleArrow} ${C?"":B.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!C&&h.jsxs("div",{className:B.workspaceMeta,"data-testid":"workspace-meta",id:"workspace-meta-panel",children:[h.jsxs("div",{className:B.metaRow,children:[h.jsx("span",{className:B.metaLabel,children:"Description"}),h.jsx("div",{className:B.metaValue,children:h.jsx(hO,{value:(A==null?void 0:A.description)||"",onSave:D=>{A&&p(A.id,{description:D})},fieldId:"description",activeFieldId:x,onActivate:T,renderDisplay:D=>D?h.jsx("span",{className:B.overviewMarkdown,children:h.jsx(wf,{remarkPlugins:[Nf],children:D})}):void 0,placeholder:"No description",ariaLabel:"Workspace description","data-testid":"edit-description"})})]}),h.jsxs("div",{className:B.metaRow,children:[h.jsx("span",{className:B.metaLabel,children:"Repository"}),h.jsx("div",{className:B.metaValue,children:h.jsx(qd,{value:(A==null?void 0:A.repoUrl)||"",onSave:D=>{A&&p(A.id,{repoUrl:D})},validate:D=>{const U=D.trim();if(U&&!/^https?:\/\/.+/.test(U))return"Must be a valid http(s) URL"},fieldId:"repoUrl",activeFieldId:x,onActivate:T,renderDisplay:D=>D&&/^https?:\/\//i.test(D)?h.jsx("a",{className:B.repoLink,href:D,target:"_blank",rel:"noopener noreferrer",onClick:U=>U.stopPropagation(),children:D}):D?h.jsx("span",{children:D}):void 0,placeholder:"No repository",ariaLabel:"Workspace repository URL","data-testid":"edit-repo"})})]}),h.jsxs("div",{className:B.metaRow,children:[h.jsx("span",{className:B.metaLabel,children:"Environment"}),h.jsx("div",{className:B.metaValue,children:h.jsx(S0,{value:(A==null?void 0:A.defaultEnvironmentId)||"",onSave:D=>{A&&p(A.id,{defaultEnvironmentId:D})},options:[{value:"",label:"None"},...o.map(D=>({value:D.id,label:D.displayName}))],fieldId:"defaultEnvironmentId",activeFieldId:x,onActivate:T,renderDisplay:()=>{if(H)return h.jsxs("span",{className:B.envRow,children:[h.jsx("span",{className:`${B.envDot} ${mO(H.status)}`}),H.displayName]})},placeholder:(A==null?void 0:A.defaultEnvironmentId)||"No default environment",ariaLabel:"Workspace default environment","data-testid":"edit-env"})})]}),h.jsxs("div",{className:B.metaRow,children:[h.jsx("span",{className:B.metaLabel,children:"Persona"}),h.jsx("div",{className:B.metaValue,children:h.jsx(S0,{value:(A==null?void 0:A.defaultPersonaId)||"",onSave:D=>{A&&p(A.id,{defaultPersonaId:D})},options:[{value:"",label:"(Inherit)"},...d.map(D=>({value:D.id,label:D.name}))],fieldId:"defaultPersonaId",activeFieldId:x,onActivate:T,renderDisplay:D=>{const U=d.find(ee=>ee.id===D);if(U)return h.jsx("span",{children:U.name})},placeholder:(A==null?void 0:A.defaultPersonaId)||"(Inherit)",ariaLabel:"Workspace default persona","data-testid":"edit-persona"})})]}),h.jsxs("div",{className:B.metaRow,children:[h.jsx("span",{className:B.metaLabel,children:"Worktrees"}),h.jsx("div",{className:B.metaValue,children:h.jsx(pO,{checked:(A==null?void 0:A.useWorktrees)??!0,onChange:D=>{A&&p(A.id,{useWorktrees:D})},label:"Enable worktree isolation","data-testid":"worktree-toggle"})})]}),h.jsxs("div",{className:B.metaRow,children:[h.jsx("span",{className:B.metaLabel,children:"Working Dir"}),h.jsx("div",{className:B.metaValue,children:h.jsx(qd,{value:(A==null?void 0:A.worktreeBasePath)||"",onSave:D=>{A&&p(A.id,{worktreeBasePath:D})},fieldId:"worktreeBasePath",activeFieldId:x,onActivate:T,placeholder:"Default (server default)",ariaLabel:"Working directory","data-testid":"edit-worktree-base-path"})})]}),A&&h.jsxs("div",{className:B.metaTimestamps,children:[h.jsxs("span",{className:B.metaTimestamp,children:["Created ",x0(A.createdAt)]}),A.updatedAt&&A.updatedAt!==A.createdAt&&h.jsxs("span",{className:B.metaTimestamp,children:["· Updated ",x0(A.updatedAt)]})]})]}),O>0&&h.jsxs("div",{className:B.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:B.progressBar,children:h.jsx("div",{className:B.progressFill,style:{width:`${F}%`}})}),h.jsxs("span",{className:B.progressLabel,children:[V,"/",O]})]}),h.jsxs("div",{className:B.tabBar,role:"tablist","aria-label":"Workspace view",children:[h.jsx("button",{role:"tab","aria-selected":m==="graph",className:`${B.tab} ${m==="graph"?B.active:""}`,onClick:()=>g("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":m==="board",className:`${B.tab} ${m==="board"?B.active:""}`,onClick:()=>g("board"),"data-testid":"board-tab",children:"Board"}),h.jsx("button",{role:"tab","aria-selected":m==="tasks",className:`${B.tab} ${m==="tasks"?B.active:""}`,onClick:()=>g("tasks"),children:"Tasks"})]}),m==="tasks"&&O>0&&h.jsxs("div",{className:B.workspaceSummary,children:[h.jsx("span",{className:B.workspaceSummaryTitle,children:`${V}/${O} tasks complete`}),h.jsx("span",{className:B.workspaceSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&O===0&&h.jsxs("div",{className:B.emptyCta,children:[h.jsx("button",{className:B.ctaButton,onClick:()=>a(Os(n)),children:"Create Task"}),h.jsx("div",{className:B.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),m==="board"&&h.jsx(J3,{workspaceId:n}),m==="graph"&&h.jsx(k3,{workspaceId:n}),h.jsx(cc,{isOpen:v,title:"Archive Workspace?",description:"This will hide the workspace from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{A&&(u(A.id),a("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const yO="_container_cddyd_1",vO="_header_cddyd_8",bO="_headerTitle_cddyd_35",SO="_badge_cddyd_44",xO="_headerActions_cddyd_54",_O="_body_cddyd_61",TO="_formContent_cddyd_73",EO="_section_cddyd_85",CO="_label_cddyd_91",AO="_titleInput_cddyd_98",kO="_descriptionTextarea_cddyd_131",wO="_parentContext_cddyd_167",NO="_parentLabel_cddyd_175",jO="_parentName_cddyd_182",DO="_personaSelect_cddyd_186",MO="_depList_cddyd_220",RO="_depItem_cddyd_226",OO="_depItemSelected_cddyd_248",BO="_noDeps_cddyd_252",LO="_btnPrimary_cddyd_258",IO="_btnGhost_cddyd_289",Je={container:yO,header:vO,headerTitle:bO,badge:SO,headerActions:xO,body:_O,formContent:TO,section:EO,label:CO,titleInput:AO,descriptionTextarea:kO,parentContext:wO,parentLabel:NO,parentName:jO,personaSelect:DO,depList:MO,depItem:RO,depItemSelected:OO,noDeps:BO,btnPrimary:LO,btnGhost:IO};function K1({mode:n,taskId:a,workspaceId:i,parentTaskId:o}){const{tasks:r,personas:d,createTask:u,updateTask:p}=Bt(),{showToast:m}=ao(),g=Rn(),v=n==="edit",y=v&&a?r.find(Z=>Z.id===a):void 0,x=v?(y==null?void 0:y.workspaceId)??"":i??"",T=v?(y==null?void 0:y.parentTaskId)??"":o??"",C=T?r.find(Z=>Z.id===T):void 0,[k,w]=S.useState((y==null?void 0:y.title)??""),[E,A]=S.useState((y==null?void 0:y.description)??""),[j,V]=S.useState((y==null?void 0:y.dependsOn)??[]),[O,F]=S.useState((y==null?void 0:y.defaultPersonaId)??""),[H,D]=S.useState((y==null?void 0:y.canDecompose)??!1),[U,ee]=S.useState(!1),ne=S.useRef(!1);S.useEffect(()=>{v&&y&&!ne.current&&(ne.current=!0,w(y.title),A(y.description),V(y.dependsOn),F(y.defaultPersonaId),D(y.canDecompose))},[v,y]);const ae=r.filter(Z=>Z.workspaceId===x&&(!v||Z.id!==a)&&Z.id!==T),ie=k.trim().length>0&&(!v||y!==void 0)&&(v||x.length>0),q=Z=>{V(he=>he.includes(Z)?he.filter(W=>W!==Z):[...he,Z])},se=()=>{!ie||U||v&&y===void 0||(v&&a?(p(a,k.trim(),E,j,O),m("Task updated","success"),g(ns(a),{replace:!0})):(ee(!0),u(x,k.trim(),E,j.length>0?j:void 0,T||void 0,O,H,()=>{m("Task created","success"),g(Kl(x),{replace:!0})},Z=>{m(Z,"error"),ee(!1)})))},G=()=>{g(v&&a?ns(a):Kl(x))},Y=v?"edit task":T?"child task":"new task";return h.jsxs("div",{className:Je.container,children:[h.jsxs("div",{className:Je.header,children:[h.jsxs("div",{className:Je.headerTitle,children:[h.jsx("span",{className:Je.badge,children:Y}),C&&h.jsxs("span",{className:Je.parentContext,children:[h.jsx("span",{className:Je.parentLabel,children:"Child of"}),h.jsx("span",{className:Je.parentName,children:C.title})]})]}),h.jsxs("div",{className:Je.headerActions,children:[h.jsx("button",{onClick:se,disabled:!ie||U,className:Je.btnPrimary,"data-testid":"task-edit-save",children:U?"Creating…":v?"Save Changes":"Create"}),h.jsx("button",{onClick:G,className:Je.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:Je.body,children:h.jsxs("div",{className:Je.formContent,children:[h.jsxs("div",{className:Je.section,children:[h.jsx("label",{className:Je.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:k,onChange:Z=>w(Z.target.value),placeholder:"Task title...",autoFocus:!0,className:Je.titleInput,"data-testid":"task-edit-title",onKeyDown:Z=>{Z.key==="Enter"&&ie&&se()}})]}),h.jsxs("div",{className:Je.section,children:[h.jsx("label",{className:Je.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:E,onChange:Z=>A(Z.target.value),placeholder:"Describe the task... (markdown supported)",className:Je.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:Je.section,children:[h.jsx("label",{className:Je.label,htmlFor:"task-edit-persona",children:"Default Persona"}),h.jsxs("select",{id:"task-edit-persona",value:O,onChange:Z=>F(Z.target.value),className:Je.personaSelect,"data-testid":"task-edit-persona",children:[h.jsx("option",{value:"",children:"(Inherit)"}),d.map(Z=>h.jsx("option",{value:Z.id,children:Z.name},Z.id))]})]}),!v&&h.jsx("div",{className:Je.section,children:h.jsxs("label",{className:Je.depItem,"data-testid":"task-edit-can-decompose",children:[h.jsx("input",{type:"checkbox",checked:H,onChange:Z=>D(Z.target.checked)}),"Can spawn subtasks"]})}),h.jsxs("div",{className:Je.section,children:[h.jsx("div",{className:Je.label,children:"Dependencies"}),ae.length===0?h.jsx("div",{className:Je.noDeps,children:"No other tasks in this workspace"}):h.jsx("div",{className:Je.depList,children:ae.map(Z=>{const he=j.includes(Z.id);return h.jsxs("label",{className:`${Je.depItem} ${he?Je.depItemSelected:""}`,"data-testid":`dep-option-${Z.id}`,children:[h.jsx("input",{type:"checkbox",checked:he,onChange:()=>q(Z.id)}),Z.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",Z.status,")"]})]},Z.id)})})]})]})})]})}function UO(){const[n]=If(),a=n.get("workspace")??"",i=n.get("parent")??void 0;return a?h.jsx(K1,{mode:"new",workspaceId:a,parentTaskId:i}):h.jsx(ji,{to:"/",replace:!0})}function zO(){const{taskId:n}=ec();return h.jsx(K1,{mode:"edit",taskId:n})}const VO="_container_1pqxm_1",HO="_emptyState_1pqxm_8",GO="_card_1pqxm_14",PO="_cardHeader_1pqxm_34",FO="_categoryBadge_1pqxm_46",$O="_findingTitle_1pqxm_54",qO="_findingDate_1pqxm_60",YO="_findingContent_1pqxm_72",KO="_tags_1pqxm_78",ZO="_tag_1pqxm_78",qn={container:VO,emptyState:HO,card:GO,cardHeader:PO,categoryBadge:FO,findingTitle:$O,findingDate:qO,findingContent:YO,tags:KO,tag:ZO};function XO(n){const a=new Date(n),i=new Date,o=i.getTime()-a.getTime(),r=Math.floor(o/1e3),d=Math.floor(r/60),u=Math.floor(d/60),p=Math.floor(u/24);if(r<60)return"just now";if(d<60)return`${d}m ago`;if(u<24)return`${u}h ago`;if(p===1)return"yesterday";if(p<7)return`${p} days ago`;const m=a.getFullYear()===i.getFullYear(),g=a.toLocaleString("en-US",{month:"short"}),v=a.getDate();return m?`${g} ${v}`:`${g} ${v} ${a.getFullYear()}`}const _0={architecture:{text:"var(--accent-blue)",bg:"var(--accent-blue-dim)"},api:{text:"var(--accent-green)",bg:"var(--accent-green-dim)"},bug:{text:"var(--accent-red)",bg:"var(--accent-red-dim)"},decision:{text:"var(--accent-yellow)",bg:"var(--accent-yellow-dim)"},dependency:{text:"var(--accent-purple)",bg:"var(--accent-purple-dim)"},pattern:{text:"var(--accent-cyan)",bg:"var(--accent-cyan-dim)"},general:{text:"var(--text-secondary)",bg:"var(--bg-elevated)"}};function QO({workspaceId:n}){const{findings:a}=Bt(),i=a.filter(o=>o.workspaceId===n);return i.length===0?h.jsx("div",{className:qn.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:qn.container,children:i.map((o,r)=>{const d=_0[o.category]||_0.general;return h.jsxs($t.div,{className:qn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:r*.05,duration:.2},children:[h.jsxs("div",{className:qn.cardHeader,children:[h.jsx("span",{className:qn.categoryBadge,style:{background:d.bg,color:d.text},children:o.category}),h.jsx("span",{className:qn.findingTitle,children:o.title}),h.jsx("span",{className:qn.findingDate,title:o.createdAt,children:XO(o.createdAt)})]}),h.jsx("div",{className:qn.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:qn.tags,children:o.tags.map(u=>h.jsx("span",{className:qn.tag,style:{color:d.text,textShadow:`0 0 8px ${d.text}`},children:u},u))})]},o.id)})})}function jr(n){if(!n)return"—";const a=new Date(n);return isNaN(a.getTime())?"—":a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Kd(n,a){if(!n||!a)return;const i=new Date(a).getTime()-new Date(n).getTime();if(isNaN(i)||i<0)return;const o=Math.floor(i/6e4),r=Math.floor(i%6e4/1e3);if(o===0)return`${r}s`;const d=Math.floor(o/60),u=o%60;return d===0?`${o}m ${r}s`:`${d}h ${u}m`}function WO(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?B.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?B.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?B.envDotRed:B.envDotGray}function JO({status:n}){const a=is(n),i=yj(n);return h.jsx("span",{className:`${B.statusBadge} ${B[i]??B.statusPending}`,children:a.label})}function eB({task:n,tasksById:a,environments:i,workspaces:o,taskSessions:r}){const d=r.length>0?r[r.length-1]:void 0,u=(d==null?void 0:d.environmentId)??"",p=u?i.find(v=>v.id===u):void 0,m=o.find(v=>v.id===n.workspaceId),g=n.branch&&(m!=null&&m.repoUrl)?`${m.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:B.overviewDashboard,children:[h.jsxs("div",{className:B.overviewHero,children:[h.jsx(JO,{status:n.status}),n.branch&&h.jsx("span",{className:B.overviewBranchPill,children:g?h.jsxs("a",{href:g,target:"_blank",rel:"noreferrer noopener",className:B.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:B.overviewSection,children:[h.jsx("div",{className:B.overviewLabel,children:"Description"}),h.jsx("div",{className:B.overviewMarkdown,children:h.jsx(wf,{remarkPlugins:[Nf],children:n.description})})]}),u&&h.jsxs("div",{className:B.overviewSection,children:[h.jsx("div",{className:B.overviewLabel,children:"Environment"}),h.jsxs("div",{className:B.envRow,children:[p&&h.jsx("span",{className:`${B.envDot} ${WO(p.status)}`,title:p.status,"aria-label":`Status: ${p.status}`,role:"img"}),h.jsx("span",{className:B.overviewValue,children:(p==null?void 0:p.displayName)??u})]})]}),h.jsxs("div",{className:B.overviewSection,children:[h.jsx("div",{className:B.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:B.overviewMuted,children:"None"}):h.jsx("div",{className:B.depList,children:n.dependsOn.map(v=>{const y=a.get(v),x=(y==null?void 0:y.status)==="complete";return h.jsxs("div",{className:`${B.depItem} ${x?B.depDone:B.depBlocked}`,children:[h.jsx("span",{children:x?"✓":"○"}),h.jsx("span",{children:(y==null?void 0:y.title)??v})]},v)})})]}),h.jsxs("div",{className:B.overviewSection,children:[h.jsx("div",{className:B.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:B.timeline,children:[n.createdAt&&h.jsxs("div",{className:B.timelineRow,children:[h.jsx("span",{className:B.timelineKey,children:"Created"}),h.jsx("span",{className:B.timelineValue,children:jr(n.createdAt)})]}),n.assignedAt&&(()=>{const v=Kd(n.createdAt,n.assignedAt);return h.jsxs("div",{className:B.timelineRow,children:[h.jsx("span",{className:B.timelineKey,children:"Assigned"}),h.jsx("span",{className:B.timelineValue,children:jr(n.assignedAt)}),v!==void 0&&h.jsx("span",{className:B.timelineDelta,children:v})]})})(),n.startedAt&&(()=>{const v=Kd(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:B.timelineRow,children:[h.jsx("span",{className:B.timelineKey,children:"Started"}),h.jsx("span",{className:B.timelineValue,children:jr(n.startedAt)}),v!==void 0&&h.jsx("span",{className:B.timelineDelta,children:v})]})})(),n.completedAt&&(()=>{const v=Kd(n.startedAt,n.completedAt);return h.jsxs("div",{className:B.timelineRow,children:[h.jsx("span",{className:B.timelineKey,children:"Completed"}),h.jsx("span",{className:B.timelineValue,children:jr(n.completedAt)}),v!==void 0&&h.jsx("span",{className:B.timelineDelta,children:v})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:B.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:B.overviewSection,children:[h.jsx("div",{className:B.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:B.reviewNotes,children:n.reviewNotes})]})]})}function tB({task:n,sessionId:a,isBlocked:i,onStart:o,onResume:r,onStop:d,onPause:u,onDelete:p,onEdit:m}){if(n.status==="not_started")return i?h.jsxs("div",{className:B.headerActions,children:[h.jsx("button",{onClick:m,className:B.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:B.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:B.headerActions,children:[h.jsx("button",{onClick:o,className:B.btnPrimary,children:"Start"}),h.jsx("button",{onClick:m,className:B.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:B.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsxs("div",{className:B.headerActions,children:[h.jsx("button",{onClick:d,className:B.btnDanger,children:"Stop"}),h.jsx("button",{onClick:u,disabled:!a,className:B.btnGhost,children:"Pause"})]});if(n.status==="paused")return h.jsxs("div",{className:B.headerActions,children:[h.jsx("button",{onClick:d,className:B.btnPrimary,children:"Stop"}),h.jsx("button",{onClick:r,className:B.btnGhost,children:"Resume"}),h.jsx("button",{onClick:p,className:B.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:B.headerActions,children:h.jsx("button",{onClick:p,className:B.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:B.headerActions,children:[h.jsx("button",{onClick:o,className:B.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:p,className:B.btnDanger,children:"Delete"})]})}function nB({taskSessions:n,selectedSessionId:a,onSelect:i}){if(!(n.length<2))return h.jsxs("div",{className:B.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:B.attemptLabel,children:"Attempts:"}),n.map((o,r)=>{const d=o.id===a,u=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${B.attemptButton} ${d?B.attemptActive:""}`,onClick:()=>i(o.id),title:`Attempt #${r+1} — ${o.status}`,"aria-label":`Attempt #${r+1}, ${o.status}`,"aria-pressed":d,"data-testid":`attempt-${r+1}`,children:["#",r+1,u&&h.jsx("span",{className:B.attemptStatus,children:u})]},o.id)})]})}function Zd(){const{taskId:n}=ec(),a=Qt(),i=Rn(),{events:o,eventsDropped:r,tasks:d,environments:u,loadSessionEvents:p,loadFindings:m,kill:g,startTask:v,stopTask:y,resumeTask:x,deleteTask:T,workspaces:C,taskSessions:k,loadTaskSessions:w}=Bt(),E=S.useRef(void 0),A=S.useRef(void 0),j=S.useRef(void 0),V=S.useRef(void 0),O=S.useRef(void 0),F=a.pathname.endsWith("/stream")?"stream":a.pathname.endsWith("/findings")?"findings":"overview",[H,D]=S.useState(F),[U,ee]=S.useState(!1),[ne,ae]=S.useState(void 0),ie=S.useRef(F);F!==ie.current&&(ie.current=F,F!==H&&D(F));const q=d.find(Te=>Te.id===n),se=(q==null?void 0:q.workspaceId)||void 0,G=q?k[q.id]??[]:[];let Y;ne&&G.some(Te=>Te.id===ne)?Y=ne:Y=(q==null?void 0:q.latestSessionId)||void 0;const Z=()=>{ee(!0)},he=()=>{q&&(T(q.id),ee(!1),i(Kl(q.workspaceId),{replace:!0}))};if((q==null?void 0:q.id)!==A.current&&(A.current=q==null?void 0:q.id,ne!==void 0&&ae(void 0)),S.useEffect(()=>{if(!(q!=null&&q.id))return;const Te=q.id!==V.current,te=q.latestSessionId!==O.current;(Te||te)&&(V.current=q.id,O.current=q.latestSessionId,w(q.id))},[q==null?void 0:q.id,q==null?void 0:q.latestSessionId,w]),(q==null?void 0:q.status)!==j.current){j.current=q==null?void 0:q.status;const Te=(q==null?void 0:q.status)==="not_started"?"overview":(q==null?void 0:q.status)==="working"||(q==null?void 0:q.status)==="paused"?"stream":(q==null?void 0:q.status)==="complete"?"findings":void 0;Te&&Te!==H&&D(Te)}const W=S.useMemo(()=>new Map(d.map(Te=>[Te.id,Te])),[d]),Fe=S.useMemo(()=>{const Te=Y?o.filter(te=>te.sessionId===Y):[];return Y1(q1(Te))},[o,Y]),we=q?q.dependsOn.some(Te=>{const te=W.get(Te);return te!==void 0&&te.status!=="complete"}):!1,pe=S.useMemo(()=>GR(n,C,W),[n,C,W]);S.useEffect(()=>{Y&&Y!==E.current&&(E.current=Y,p(Y))},[Y,p]),S.useEffect(()=>{H==="findings"&&se&&m(se)},[H,se,m]);const Be=Te=>{D(Te),i(ns(n,Te==="overview"?void 0:Te))};return h.jsxs("div",{className:B.panelContainer,children:[h.jsx(Vi,{segments:pe}),h.jsxs("div",{className:B.header,children:[h.jsxs("span",{className:B.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(q==null?void 0:q.title)||n}),q&&h.jsx("span",{className:B.taskStatusBadge,"data-testid":"task-status",children:q.status}),(q==null?void 0:q.branch)&&h.jsx("span",{className:B.taskBranch,children:q.branch}),we&&h.jsx("span",{className:B.taskBlockedBadge,children:"blocked"})]}),q&&h.jsx(tB,{task:q,sessionId:Y,isBlocked:we,onStart:()=>v(q.id),onResume:()=>x(q.id),onStop:()=>y(q.id),onPause:()=>Y&&g(Y),onDelete:Z,onEdit:()=>i(nE(q.id))})]}),h.jsxs("div",{className:B.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":H==="overview",className:`${B.tab} ${H==="overview"?B.active:""}`,onClick:()=>Be("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":H==="stream",className:`${B.tab} ${H==="stream"?B.active:""}`,onClick:()=>Be("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":H==="findings",className:`${B.tab} ${H==="findings"?B.active:""}`,onClick:()=>Be("findings"),children:"Findings"})]}),h.jsxs(Dn,{mode:"wait",children:[H==="overview"&&h.jsx($t.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:B.overviewContent,children:q?h.jsx(eB,{task:q,tasksById:W,environments:u,workspaces:C,taskSessions:G}):h.jsx("div",{className:B.waitingMessage,children:"No additional details"})},"overview"),H==="stream"&&h.jsxs($t.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden"},children:[h.jsx(nB,{taskSessions:G,selectedSessionId:Y,onSelect:Te=>ae(Te)}),h.jsx($1,{events:Fe,eventsDropped:r,emptyState:!Y&&q?h.jsxs("div",{className:B.emptyCta,children:[h.jsx("button",{className:B.ctaButton,onClick:()=>v(q.id),children:"Start Task"}),h.jsx("div",{className:B.ctaDescription,children:"Click to begin agent execution"})]}):Y&&Fe.length===0?h.jsx("div",{className:B.waitingMessage,children:"Waiting for events..."}):void 0})]},"stream"),H==="findings"&&h.jsx($t.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:B.tabContent,children:se?h.jsx(QO,{workspaceId:se}):h.jsx("div",{className:B.noContext,children:"Navigate to a task within a workspace to view findings"})},"findings")]}),q&&h.jsx(cc,{isOpen:U,title:"Delete Task?",description:`"${q.title}" will be permanently removed.`,onConfirm:he,onCancel:()=>ee(!1)})]})}function aB(){const n=UR();return h.jsxs("div",{className:B.panelContainer,children:[h.jsx(Vi,{segments:n}),h.jsx("div",{className:B.emptyState,children:"Configure the new environment below"})]})}const sB="_layout_11u79_1",iB="_content_11u79_8",lB="_tabPanel_11u79_14",Xd={layout:sB,content:iB,tabPanel:lB},oB={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function rB(){const a=Qt().pathname.replace(/^\/settings\/?/,"").split("/")[0],i=oB[a],o=IR(i);return h.jsxs("div",{className:Xd.layout,children:[h.jsx(Vi,{segments:o}),h.jsx("div",{className:Xd.content,children:h.jsx("div",{className:Xd.tabPanel,children:h.jsx(U0,{})},a)})]})}const cB="_nav_13n0b_1",uB="_tab_13n0b_44",dB="_tabIcon_13n0b_82",fB="_tabActive_13n0b_88",Dr={nav:cB,tab:uB,tabIcon:dB,tabActive:fB},Sa=[{path:"environments",label:"Environments",icon:"🖥️"},{path:"credentials",label:"Credentials",icon:"🔑"},{path:"personas",label:"Personas",icon:"👤"},{path:"appearance",label:"Appearance",icon:"🎨"},{path:"about",label:"About",icon:"ℹ️"}];function hB(){var u;const n=Qt(),a=Rn(),i=S.useRef(null),o=((u=Sa.find(p=>n.pathname===`${Di}/${p.path}`))==null?void 0:u.path)??Sa[0].path,r=S.useCallback(p=>{a(`${Di}/${p}`)},[a]),d=S.useCallback(p=>{var T,C;const m=(T=i.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!m)return;const g=Array.from(m).findIndex(k=>k===document.activeElement),v=g>=0?g:Sa.findIndex(k=>k.path===o);let y=v;if(p.key==="ArrowDown")p.preventDefault(),y=(v+1)%Sa.length;else if(p.key==="ArrowUp")p.preventDefault(),y=(v-1+Sa.length)%Sa.length;else if(p.key==="Home")p.preventDefault(),y=0;else if(p.key==="End")p.preventDefault(),y=Sa.length-1;else return;const x=Sa[y].path;a(`${Di}/${x}`),(C=m[y])==null||C.focus()},[o,a]);return h.jsx("nav",{className:Dr.nav,ref:i,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:d,children:Sa.map(p=>{const m=p.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":m,tabIndex:m?0:-1,className:`${Dr.tab} ${m?Dr.tabActive:""}`,onClick:()=>r(p.path),children:[h.jsx("span",{className:Dr.tabIcon,"aria-hidden":"true",children:p.icon}),p.label]},p.path)})})}const pB="_container_1nk8c_1",mB="_header_1nk8c_5",gB="_headerLabel_1nk8c_12",yB="_addButton_1nk8c_20",vB="_envRow_1nk8c_55",bB="_targeted_1nk8c_69",SB="_expanded_1nk8c_72",xB="_statusDot_1nk8c_76",_B="_pulse_1nk8c_79",TB="_envName_1nk8c_83",EB="_envActions_1nk8c_87",CB="_idleLabel_1nk8c_94",AB="_newChatButton_1nk8c_99",kB="_envActionsRow_1nk8c_126",wB="_connectButton_1nk8c_134",NB="_stopButton_1nk8c_160",jB="_deleteButton_1nk8c_186",DB="_provisionMessage_1nk8c_213",MB="_errorMessage_1nk8c_220",RB="_sessionRow_1nk8c_227",OB="_selected_1nk8c_243",BB="_sessionDot_1nk8c_248",LB="_sessionSummaryRow_1nk8c_252",IB="_sessionExpandArrow_1nk8c_272",UB="_sessionSummaryText_1nk8c_283",zB="_sessionCountBadge_1nk8c_290",VB="_emptyCta_1nk8c_313",HB="_ctaDescription_1nk8c_326",GB="_ctaButton_1nk8c_332",Ze={container:pB,header:mB,headerLabel:gB,addButton:yB,envRow:vB,targeted:bB,expanded:SB,statusDot:xB,pulse:_B,envName:TB,envActions:EB,idleLabel:CB,newChatButton:AB,envActionsRow:kB,connectButton:wB,stopButton:NB,deleteButton:jB,provisionMessage:DB,errorMessage:MB,sessionRow:RB,selected:OB,sessionDot:BB,sessionSummaryRow:LB,sessionExpandArrow:IB,sessionSummaryText:UB,sessionCountBadge:zB,emptyCta:VB,ctaDescription:HB,ctaButton:GB},PB={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},FB={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},T0=["running","idle","failed","interrupted","completed"],$B=.2;function qB(n){const a={};for(const d of n)a[d.status]=(a[d.status]||0)+1;const i=T0.filter(d=>a[d]>0).map(d=>`${a[d]} ${FB[d]||d}`),o=new Set(T0),r=Object.keys(a).filter(d=>!o.has(d)).sort().map(d=>`${a[d]} ${d}`);return[...i,...r].join(", ")}function YB({status:n}){const a=n==="running"?"var(--accent-green)":n==="idle"?"var(--accent-yellow)":n==="completed"?"var(--text-secondary)":n==="failed"||n==="interrupted"?"var(--accent-red)":"var(--text-tertiary)";return h.jsx("span",{className:Ze.sessionDot,style:{color:a},children:"●"})}function KB({env:n,envSessions:a,selectedSessionId:i,isNewChatTarget:o,expanded:r,onToggleExpand:d,sessionsExpanded:u,onToggleSessionsExpand:p,provisionProgress:m,onProvision:g,onStop:v,onRemove:y,navigate:x}){const[T,C]=S.useState(!1),k=PB[n.status]||"var(--text-tertiary)",w=n.status==="connected",E=n.status==="connecting",A=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(cc,{isOpen:T,title:"Delete Environment?",description:`"${n.displayName||n.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{y(n.id),C(!1)},onCancel:()=>C(!1)}),h.jsxs("div",{className:`${Ze.envRow} ${o?Ze.targeted:""} ${r?Ze.expanded:""}`,"data-testid":"env-row",onClick:d,children:[h.jsx("span",{className:`${Ze.statusDot} ${w?Ze.pulse:""}`,style:{color:k},children:"●"}),h.jsx("span",{className:Ze.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:Ze.envActions,children:[a.length===0&&!o&&!r&&h.jsx("span",{className:Ze.idleLabel,children:"(idle)"}),w&&h.jsx("button",{onClick:j=>{j.stopPropagation(),x(F0(n.id))},title:"New chat",className:Ze.newChatButton,children:"+"})]})]}),r&&h.jsxs("div",{className:Ze.envActionsRow,children:[E&&m&&h.jsx("span",{className:Ze.provisionMessage,children:m.message}),n.status==="error"&&(m==null?void 0:m.stage)==="error"&&h.jsx("span",{className:Ze.errorMessage,children:m.message}),A&&h.jsx("button",{onClick:j=>{j.stopPropagation(),g(n.id)},className:Ze.connectButton,children:n.status==="error"?"Retry":"Connect"}),w&&h.jsx("button",{onClick:j=>{j.stopPropagation(),v(n.id)},className:Ze.stopButton,children:"Stop"}),!E&&h.jsx("button",{onClick:j=>{j.stopPropagation(),C(!0)},className:Ze.deleteButton,children:"Delete"})]}),a.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Ze.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":u,"aria-label":u?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),p())},children:[h.jsx("span",{className:`${Ze.sessionExpandArrow} ${u?Ze.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ze.sessionSummaryText,children:qB(a)}),h.jsx("span",{className:Ze.sessionCountBadge,children:a.length})]}),h.jsx(Dn,{children:u&&h.jsx($t.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:$B,ease:"easeInOut"},style:{overflow:"hidden"},children:a.map(j=>h.jsxs("div",{onClick:V=>{V.stopPropagation(),x(P0(j.id))},className:`${Ze.sessionRow} ${i===j.id?Ze.selected:""}`,title:j.prompt,"data-testid":"session-row",children:[h.jsx(YB,{status:j.status})," ",j.prompt.length>24?j.prompt.slice(0,24)+"...":j.prompt]},j.id))})})]})]})}function ZB(){const{environments:n,sessions:a,provisionStatus:i,provisionEnvironment:o,stopEnvironment:r,removeEnvironment:d}=Bt(),u=Rn(),[p,m]=S.useState(null),[g,v]=S.useState(new Set),y=Zt("/sessions/:sessionId"),x=Zt("/sessions/new"),T=(y==null?void 0:y.params.sessionId)!=="new"?y==null?void 0:y.params.sessionId:void 0,[C]=If(),k=x?C.get("env")??void 0:void 0;return h.jsxs("div",{className:Ze.container,children:[h.jsxs("div",{className:Ze.header,children:[h.jsx("span",{className:Ze.headerLabel,children:"Environments"}),h.jsx("button",{className:Ze.addButton,onClick:()=>u(Ry),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:Ze.emptyCta,children:[h.jsx("button",{className:Ze.ctaButton,onClick:()=>u(Ry),children:"Add Environment"}),h.jsx("div",{className:Ze.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(w=>{const E=a.filter(A=>A.environmentId===w.id);return h.jsx(KB,{env:w,envSessions:E,selectedSessionId:T,isNewChatTarget:k===w.id,expanded:p===w.id,onToggleExpand:()=>m(p===w.id?null:w.id),sessionsExpanded:g.has(w.id),onToggleSessionsExpand:()=>{v(A=>{const j=new Set(A);return j.has(w.id)?j.delete(w.id):j.add(w.id),j})},provisionProgress:i[w.id],onProvision:o,onStop:r,onRemove:d,navigate:u},w.id)})]})}function XB(){return h.jsx(ZB,{})}const QB="_section_1ingb_14",WB="_sectionTitle_1ingb_26",JB="_sectionDescription_1ingb_35",e4="_tokenList_1ingb_48",t4="_tokenRow_1ingb_55",n4="_tokenBadge_1ingb_68",a4="_tokenName_1ingb_83",s4="_tokenTarget_1ingb_90",i4="_deleteButton_1ingb_99",l4="_addForm_1ingb_113",o4="_formRow_1ingb_119",r4="_input_1ingb_125",c4="_select_1ingb_155",u4="_addButton_1ingb_187",d4="_emptyStateInfo_1ingb_221",f4="_themeOptions_1ingb_229",h4="_themeOption_1ingb_229",p4="_themeOptionSelected_1ingb_254",m4="_themeOptionHeader_1ingb_259",g4="_themeOptionLabel_1ingb_266",y4="_themeOptionDesc_1ingb_273",v4="_variantToggle_1ingb_279",b4="_variantButton_1ingb_286",S4="_variantActive_1ingb_305",x4="_themeSwatches_1ingb_311",_4="_themeSwatch_1ingb_311",T4="_systemToggle_1ingb_325",E4="_systemToggleHint_1ingb_341",C4="_themeActive_1ingb_348",A4="_aboutGrid_1ingb_354",k4="_aboutItem_1ingb_360",w4="_aboutLabel_1ingb_373",N4="_aboutValue_1ingb_379",j4="_aboutDot_1ingb_387",D4="_aboutDotConnected_1ingb_394",M4="_aboutDotDisconnected_1ingb_398",ce={section:QB,sectionTitle:WB,sectionDescription:JB,tokenList:e4,tokenRow:t4,tokenBadge:n4,tokenName:a4,tokenTarget:s4,deleteButton:i4,addForm:l4,formRow:o4,input:r4,select:c4,addButton:u4,emptyStateInfo:d4,themeOptions:f4,themeOption:h4,themeOptionSelected:p4,themeOptionHeader:m4,themeOptionLabel:g4,themeOptionDesc:y4,variantToggle:v4,variantButton:b4,variantActive:S4,themeSwatches:x4,themeSwatch:_4,systemToggle:T4,systemToggleHint:E4,themeActive:C4,aboutGrid:A4,aboutItem:k4,aboutLabel:w4,aboutValue:N4,aboutDot:j4,aboutDotConnected:D4,aboutDotDisconnected:M4},R4=[{key:"claude",label:"Claude",description:"Forward Claude credentials for AI agent access.",options:[{value:"off",label:"Off"},{value:"subscription",label:"Subscription"},{value:"api_key",label:"API Key"}]},{key:"github",label:"GitHub",description:"Forward GITHUB_TOKEN and GH_TOKEN for git operations.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"copilot",label:"Copilot",description:"Forward Copilot tokens (COPILOT_GITHUB_TOKEN, CLI config).",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"codex",label:"Codex",description:"Forward OPENAI_API_KEY for Codex/OpenAI access.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]}];function O4(){const{credentialProviders:n,updateCredentialProviders:a}=Bt(),i=(o,r)=>{const d={...n};o==="claude"?d.claude=r:d[o]=r,a(d)};return h.jsxs("section",{className:ce.section,children:[h.jsx("h3",{className:ce.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:ce.sectionDescription,children:"Enable providers to automatically forward credentials to environments at task start. Credentials are read fresh from the host each time."}),h.jsx("div",{className:ce.tokenList,children:R4.map(o=>h.jsxs("div",{className:ce.tokenRow,children:[h.jsx("span",{className:ce.tokenName,children:o.label}),h.jsx("span",{className:ce.tokenTarget,children:o.description}),h.jsx("select",{className:ce.select,value:n[o.key],onChange:r=>i(o.key,r.target.value),children:o.options.map(r=>h.jsx("option",{value:r.value,children:r.label},r.value))})]},o.key))})]})}const B4=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function L4(){const{tokens:n,setToken:a,deleteToken:i}=Bt(),{showToast:o}=ao(),[r,d]=S.useState(""),[u,p]=S.useState(""),[m,g]=S.useState("env_var"),[v,y]=S.useState(""),[x,T]=S.useState(null),C=E=>{if(E.preventDefault(),!r||!u)return;const A=m==="env_var"?v||r.toUpperCase()+"_TOKEN":"";a(r,u,m,A,m==="file"?v:""),o("Token saved successfully","success"),d(""),p(""),y("")},k=E=>{T(E)},w=()=>{x&&(i(x),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(cc,{isOpen:x!==null,title:"Delete Token?",description:x?`"${x}" will be permanently removed.`:void 0,onConfirm:w,onCancel:()=>T(null)}),h.jsxs("section",{className:ce.section,children:[h.jsx("h3",{className:ce.sectionTitle,children:"Tokens"}),h.jsx("p",{className:ce.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:ce.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:ce.tokenList,children:n.map(E=>h.jsxs("div",{className:ce.tokenRow,children:[h.jsx("span",{className:ce.tokenBadge,children:E.tokenType}),h.jsx("span",{className:ce.tokenName,children:E.name}),h.jsx("span",{className:ce.tokenTarget,children:E.tokenType==="env_var"?E.envVar:E.filePath}),h.jsx("button",{className:ce.deleteButton,onClick:()=>k(E.name),title:`Delete ${E.name}`,children:"×"})]},E.name))}),h.jsxs("form",{className:ce.addForm,onSubmit:C,children:[h.jsxs("div",{className:ce.formRow,children:[h.jsx("input",{className:ce.input,type:"text",placeholder:"Token name",value:r,onChange:E=>d(E.target.value)}),h.jsx("input",{className:ce.input,type:"password",placeholder:"Value",value:u,onChange:E=>p(E.target.value)})]}),h.jsxs("div",{className:ce.formRow,children:[h.jsx("select",{className:ce.select,value:m,onChange:E=>g(E.target.value),children:B4.map(E=>h.jsx("option",{value:E.value,children:E.label},E.value))}),h.jsx("input",{className:ce.input,type:"text",placeholder:m==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:v,onChange:E=>y(E.target.value)}),h.jsx("button",{className:ce.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function I4(){return h.jsxs(h.Fragment,{children:[h.jsx(O4,{}),h.jsx(L4,{})]})}const U4="_container_xb7ms_1",z4="_header_xb7ms_7",V4="_form_xb7ms_19",H4="_formActions_xb7ms_87",G4="_list_xb7ms_93",P4="_card_xb7ms_99",F4="_active_xb7ms_109",$4="_cardHeader_xb7ms_113",q4="_cardTitle_xb7ms_123",Y4="_defaultBadge_xb7ms_129",K4="_cardActions_xb7ms_143",Z4="_description_xb7ms_148",X4="_meta_xb7ms_154",Q4="_promptDetails_xb7ms_171",W4="_promptText_xb7ms_183",J4="_empty_xb7ms_200",e6="_btnPrimary_xb7ms_206",t6="_btnSecondary_xb7ms_240",n6="_btnSmall_xb7ms_267",a6="_btnDanger_xb7ms_293",s6="_typeToggle_xb7ms_336",i6="_typeBadge_xb7ms_350",l6="_scriptEditor_xb7ms_364",o6="_optional_xb7ms_371",Ye={container:U4,header:z4,form:V4,formActions:H4,list:G4,card:P4,active:F4,cardHeader:$4,cardTitle:q4,defaultBadge:Y4,cardActions:K4,description:Z4,meta:X4,promptDetails:Q4,promptText:W4,empty:J4,btnPrimary:e6,btnSecondary:t6,btnSmall:n6,btnDanger:a6,typeToggle:s6,typeBadge:i6,scriptEditor:l6,optional:o6};function r6(){const{personas:n,createPersona:a,updatePersona:i,deletePersona:o,appDefaultPersonaId:r,setAppDefaultPersonaId:d}=Bt(),[u,p]=S.useState(null),[m,g]=S.useState(!1),[v,y]=S.useState(null),[x,T]=S.useState(""),[C,k]=S.useState(""),[w,E]=S.useState(""),[A,j]=S.useState("claude-code"),[V,O]=S.useState("sonnet"),[F,H]=S.useState(0),[D,U]=S.useState("agent"),[ee,ne]=S.useState(""),ae=()=>{T(""),k(""),E(""),j("claude-code"),O("sonnet"),H(0),U("agent"),ne("")},ie=()=>{ae(),p(null),g(!0)},q=W=>{T(W.name),k(W.description),E(W.systemPrompt);const Fe=W.type==="script"?"script":"agent";j(Fe==="script"?W.runtime||"genaiscript":W.runtime),O(W.model),H(W.maxTurns),U(Fe),ne(W.script||""),p(W),g(!1)},se=W=>{U(W),W==="script"?j("genaiscript"):A==="genaiscript"&&j("claude-code")},G=W=>{if(W.preventDefault(),!!x.trim()){if(D==="script"){if(!ee.trim())return}else if(!w.trim()||!A||!V)return;u?(i(u.id,x,C,w,A,V,F,D,ee),p(null)):(a(x,C,w,A,V,F,D,ee),g(!1)),ae()}},Y=W=>{o(W),y(null),(u==null?void 0:u.id)===W&&(p(null),ae())},Z=()=>{p(null),g(!1),ae()},he=()=>h.jsxs("form",{onSubmit:G,className:Ye.form,children:[h.jsx("h3",{children:u?"Edit Persona":"Create Persona"}),h.jsxs("div",{className:Ye.typeToggle,"data-testid":"persona-type-toggle",children:[h.jsxs("label",{children:[h.jsx("input",{type:"radio",name:"personaType",value:"agent",checked:D==="agent",onChange:()=>se("agent")}),"Agent"]}),h.jsxs("label",{children:[h.jsx("input",{type:"radio",name:"personaType",value:"script",checked:D==="script",onChange:()=>se("script")}),"Script"]})]}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:x,onChange:W=>T(W.target.value),placeholder:D==="script"?"e.g. Nightly Report":"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:C,onChange:W=>k(W.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsx("select",{value:A,onChange:W=>j(W.target.value),"data-testid":"persona-runtime-select",children:D==="script"?h.jsx("option",{value:"genaiscript",children:"genaiscript"}):h.jsxs(h.Fragment,{children:[h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"stub",children:"stub"}),h.jsx("option",{value:"claude-code-acp",children:"claude-code-acp (experimental)"}),h.jsx("option",{value:"codex-acp",children:"codex-acp (experimental)"}),h.jsx("option",{value:"copilot-acp",children:"copilot-acp (experimental)"})]})})]}),D==="agent"&&h.jsxs(h.Fragment,{children:[h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:V,onChange:W=>O(W.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:F,onChange:W=>H(parseInt(W.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:w,onChange:W=>E(W.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]})]}),D==="script"&&h.jsxs(h.Fragment,{children:[h.jsxs("label",{children:["Model ",h.jsx("span",{className:Ye.optional,children:"(optional)"}),h.jsx("input",{type:"text",value:V,onChange:W=>O(W.target.value),placeholder:"e.g. sonnet (leave empty for script-only)"})]}),h.jsxs("label",{children:["System Prompt ",h.jsx("span",{className:Ye.optional,children:"(optional)"}),h.jsx("textarea",{value:w,onChange:W=>E(W.target.value),placeholder:"Optional context for the script...",rows:4})]}),h.jsxs("label",{children:["Script",h.jsx("textarea",{value:ee,onChange:W=>ne(W.target.value),placeholder:`script({ model: "openai:gpt-4o" });
92
-
93
- const grackle = await host.mcpServer({
94
- id: "grackle",
95
- url: env.vars.GRACKLE_MCP_URL,
96
- });
97
-
98
- $\`Summarize the current tasks.\`;`,rows:20,className:Ye.scriptEditor,required:!0,"data-testid":"persona-script-editor"})]})]}),h.jsxs("div",{className:Ye.formActions,children:[h.jsx("button",{type:"submit",className:Ye.btnPrimary,children:u?"Save":"Create"}),h.jsx("button",{type:"button",onClick:Z,className:Ye.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:Ye.container,children:[h.jsxs("div",{className:Ye.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:ie,className:Ye.btnPrimary,children:"+ New Persona"})]}),(m||u)&&he(),n.length===0&&!m?h.jsx("p",{className:Ye.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:Ye.list,children:n.map(W=>{const Fe=r===W.id,we=W.type==="script";return h.jsxs("div",{className:`${Ye.card} ${(u==null?void 0:u.id)===W.id?Ye.active:""}`,"data-testid":`persona-card-${W.id}`,children:[h.jsxs("div",{className:Ye.cardHeader,children:[h.jsxs("span",{className:Ye.cardTitle,children:[h.jsx("strong",{children:W.name}),h.jsx("span",{className:Ye.typeBadge,"data-testid":`persona-type-badge-${W.id}`,children:we?"Script":"Agent"}),Fe&&h.jsx("span",{className:Ye.defaultBadge,"data-testid":`persona-default-badge-${W.id}`,children:"App Default"})]}),h.jsxs("div",{className:Ye.cardActions,children:[!Fe&&h.jsx("button",{onClick:()=>d(W.id),className:Ye.btnSmall,"data-testid":`persona-set-default-${W.id}`,title:"Set as app default persona",children:"Set Default"}),h.jsx("button",{onClick:()=>q(W),className:Ye.btnSmall,children:"Edit"}),v===W.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>Y(W.id),className:Ye.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>y(null),className:Ye.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>y(W.id),className:Ye.btnSmall,children:"Delete"})]})]}),W.description&&h.jsx("p",{className:Ye.description,children:W.description}),h.jsxs("div",{className:Ye.meta,children:[W.runtime&&h.jsxs("span",{children:["Runtime: ",W.runtime]}),W.model&&h.jsxs("span",{children:["Model: ",W.model]}),W.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",W.maxTurns]})]}),we?h.jsxs("details",{className:Ye.promptDetails,children:[h.jsx("summary",{children:"Script"}),h.jsx("pre",{className:Ye.promptText,children:W.script})]}):h.jsxs("details",{className:Ye.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:Ye.promptText,children:W.systemPrompt})]})]},W.id)})})]})}function c6(){return h.jsx(r6,{})}function u6(){const{themeId:n,resolvedThemeId:a,setTheme:i,preferSystem:o,setPreferSystem:r}=Q0();return h.jsxs("section",{className:ce.section,children:[h.jsx("h3",{className:ce.sectionTitle,children:"Appearance"}),h.jsx("p",{className:ce.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:ce.themeOptions,children:nc.filter(d=>!d.hidden).map(d=>{const u=!!(d.variantLightId&&d.variantDarkId),p=u?n===d.id||n===d.variantLightId||n===d.variantDarkId:n===d.id,m=u&&a===d.variantLightId;return h.jsxs("button",{type:"button",className:`${ce.themeOption} ${p?ce.themeOptionSelected:""}`,"aria-pressed":p,onClick:()=>i(d.id),children:[h.jsxs("span",{className:ce.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:ce.themeOptionLabel,children:d.label}),h.jsx("span",{className:ce.themeOptionDesc,children:d.description})]}),u&&h.jsxs("span",{className:ce.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${ce.variantButton} ${p&&m?ce.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(d.variantLightId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(d.variantLightId))},"aria-label":"Light variant","aria-pressed":p&&m,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${ce.variantButton} ${p&&!m?ce.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(d.variantDarkId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(d.variantDarkId))},"aria-label":"Dark variant","aria-pressed":p&&!m,children:"☾"})]})]}),d.swatches&&h.jsx("span",{className:ce.themeSwatches,children:d.swatches.map((g,v)=>h.jsx("span",{className:ce.themeSwatch,style:{background:g}},v))})]},d.id)})}),h.jsxs("label",{className:ce.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:d=>r(d.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:ce.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:ce.themeActive,children:["Active theme: ",h.jsx("strong",{children:a})]})]})}function d6(){return h.jsx(u6,{})}function f6(){const{connected:n,environments:a,sessions:i}=Bt(),o=a.filter(u=>u.status==="connected").length,r=a.length,d=i.filter(u=>["running","idle"].includes(u.status)).length;return h.jsxs("section",{className:ce.section,"data-testid":"about-panel",children:[h.jsx("h3",{className:ce.sectionTitle,children:"About"}),h.jsx("p",{className:ce.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:ce.aboutGrid,children:[h.jsxs("div",{className:ce.aboutItem,children:[h.jsx("span",{className:ce.aboutLabel,children:"Connection"}),h.jsxs("span",{className:ce.aboutValue,children:[h.jsx("span",{className:`${ce.aboutDot} ${n?ce.aboutDotConnected:ce.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:ce.aboutItem,children:[h.jsx("span",{className:ce.aboutLabel,children:"Environments"}),h.jsxs("span",{className:ce.aboutValue,children:[o,"/",r," connected"]})]}),h.jsxs("div",{className:ce.aboutItem,children:[h.jsx("span",{className:ce.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:ce.aboutValue,children:d})]}),h.jsxs("div",{className:ce.aboutItem,children:[h.jsx("span",{className:ce.aboutLabel,children:"Version"}),h.jsx("span",{className:ce.aboutValue,children:"0.46.0"})]})]})]})}function h6(){return h.jsx(f6,{})}const p6="_wizard_1260s_1",m6="_container_1260s_10",g6="_stepContent_1260s_19",y6="_logoArea_1260s_28",v6="_logoImage_1260s_32",b6="_heading_1260s_41",S6="_tagline_1260s_49",x6="_subtitle_1260s_56",_6="_featureList_1260s_64",T6="_runtimeGrid_1260s_89",E6="_runtimeCard_1260s_101",C6="_runtimeName_1260s_133",A6="_runtimeDescription_1260s_139",k6="_buttonRow_1260s_144",w6="_primaryButton_1260s_151",N6="_ghostButton_1260s_185",j6="_dots_1260s_213",D6="_dot_1260s_213",st={wizard:p6,container:m6,stepContent:g6,logoArea:y6,logoImage:v6,heading:b6,tagline:S6,subtitle:x6,featureList:_6,runtimeGrid:T6,runtimeCard:E6,runtimeName:C6,runtimeDescription:A6,buttonRow:k6,primaryButton:w6,ghostButton:N6,dots:j6,dot:D6};function M6({onNext:n}){return h.jsxs("div",{className:st.stepContent,"data-testid":"setup-welcome",children:[h.jsx("div",{className:st.logoArea,children:h.jsx("img",{src:"/grackle-logo.png",alt:"Grackle",className:st.logoImage})}),h.jsx("h1",{className:st.heading,children:"Welcome to Grackle"}),h.jsx("p",{className:st.tagline,children:"Multi-agent orchestration for software teams"}),h.jsx("button",{type:"button",className:st.primaryButton,onClick:n,"data-testid":"setup-get-started",children:"Get Started"})]})}function R6({onNext:n,onBack:a}){return h.jsxs("div",{className:st.stepContent,"data-testid":"setup-about",children:[h.jsx("h2",{className:st.heading,children:"What is Grackle?"}),h.jsxs("ul",{className:st.featureList,children:[h.jsx("li",{children:"Run Claude, Copilot, and Codex agents side by side"}),h.jsx("li",{children:"Provision and control dev environments — SSH, Codespaces, or local"}),h.jsx("li",{children:"Organize work into workspaces with agent-executable tasks"}),h.jsx("li",{children:"Customize agent behavior with personas, tools, and MCP servers"}),h.jsx("li",{children:"Live-stream agent sessions with full terminal replay"})]}),h.jsxs("div",{className:st.buttonRow,children:[h.jsx("button",{type:"button",className:st.ghostButton,onClick:a,children:"Back"}),h.jsx("button",{type:"button",className:st.primaryButton,onClick:n,"data-testid":"setup-about-next",children:"Next"})]})]})}const O6=[{id:"claude-code",name:"Claude Code",description:"Anthropic's agentic coding tool"},{id:"copilot",name:"Copilot Coding Agent",description:"GitHub's AI pair programmer"},{id:"codex",name:"Codex CLI",description:"OpenAI's coding agent"}];function B6({currentRuntime:n,onFinish:a,onBack:i,finishDisabled:o}){const[r,d]=S.useState(n||"claude-code");return S.useEffect(()=>{n&&d(n)},[n]),h.jsxs("div",{className:st.stepContent,"data-testid":"setup-runtime",children:[h.jsx("h2",{className:st.heading,children:"Choose Your Runtime"}),h.jsx("p",{className:st.subtitle,children:"Select the primary agent runtime for your workspace. You can change this later."}),h.jsx("div",{className:st.runtimeGrid,children:O6.map(u=>h.jsxs("button",{type:"button",className:st.runtimeCard,"data-selected":r===u.id,"aria-pressed":r===u.id,"data-testid":`runtime-card-${u.id}`,onClick:()=>d(u.id),children:[h.jsx("span",{className:st.runtimeName,children:u.name}),h.jsx("span",{className:st.runtimeDescription,children:u.description})]},u.id))}),h.jsxs("div",{className:st.buttonRow,children:[h.jsx("button",{type:"button",className:st.ghostButton,onClick:i,children:"Back"}),h.jsx("button",{type:"button",className:st.primaryButton,onClick:()=>a(r),disabled:o,"data-testid":"setup-finish",children:"Finish"})]})]})}const L6=3,I6={"claude-code":"sonnet",copilot:"gpt-4o",codex:"o3"};function U6(){const{personas:n,updatePersona:a,completeOnboarding:i,onboardingCompleted:o}=Bt(),r=Rn(),[d,u]=S.useState(0),p=n.find(g=>g.id==="claude-code"),m=S.useCallback(g=>{if(p&&g!==p.runtime){const v=I6[g]??"sonnet";a(p.id,void 0,void 0,void 0,g,v)}i(),r("/",{replace:!0})},[p,a,i,r]);return o===!0?h.jsx(ji,{to:"/",replace:!0}):h.jsx("div",{className:st.wizard,"data-testid":"setup-wizard",children:h.jsxs("div",{className:st.container,children:[h.jsx(Dn,{mode:"wait",children:h.jsxs($t.div,{initial:{opacity:0,x:40},animate:{opacity:1,x:0},exit:{opacity:0,x:-40},transition:{duration:.2,ease:"easeInOut"},children:[d===0&&h.jsx(M6,{onNext:()=>u(1)}),d===1&&h.jsx(R6,{onNext:()=>u(2),onBack:()=>u(0)}),d===2&&h.jsx(B6,{currentRuntime:(p==null?void 0:p.runtime)??"claude-code",onFinish:m,onBack:()=>u(1),finishDisabled:!p})]},d)}),h.jsx("div",{className:st.dots,children:Array.from({length:L6},(g,v)=>h.jsx("span",{className:st.dot,"data-active":v===d},v))})]})})}const z6="_root_h353j_1",V6="_body_h353j_7",H6="_main_h353j_19",G6="_sidebarWrapper_h353j_26",P6="_overlay_h353j_56",Ll={root:z6,body:V6,main:H6,sidebarWrapper:G6,overlay:P6},F6=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function $6(){const{lastSpawnedId:n,environments:a,connected:i,onboardingCompleted:o}=Bt(),{showToast:r}=ao();XD(a,r);const d=Rn(),u=Qt(),p=u.pathname.startsWith(Di),[m,g]=S.useState(!1),v=S.useCallback(()=>g(y=>!y),[]);return S.useEffect(()=>{g(!1)},[u.pathname]),S.useEffect(()=>{if(!m)return;const y=x=>{x.key==="Escape"&&g(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[m]),S.useEffect(()=>{n&&!u.pathname.startsWith("/tasks/")&&d(P0(n),{replace:!0})},[n,d,u.pathname]),i&&o===!1?h.jsx(ji,{to:"/setup",replace:!0}):h.jsxs("div",{className:Ll.root,children:[h.jsx(tC,{onToggleSidebar:p?void 0:v,sidebarOpen:m}),h.jsxs("div",{className:Ll.body,children:[h.jsx("div",{className:Ll.sidebarWrapper,"data-sidebar-open":m,"data-settings":p,children:p?h.jsx(hB,{}):h.jsx(yD,{})}),m&&!p&&h.jsx("div",{className:Ll.overlay,"data-testid":"drawer-overlay",onClick:()=>g(!1)}),h.jsxs("div",{className:Ll.main,children:[h.jsx(U0,{}),h.jsx(LD,{})]})]}),h.jsx(ZD,{})]})}function q6(){return h.jsxs(xT,{children:[h.jsx(St,{path:"setup",element:h.jsx(U6,{})}),h.jsxs(St,{element:h.jsx($6,{}),children:[h.jsx(St,{index:!0,element:h.jsx(BR,{})}),h.jsx(St,{path:"sessions/new",element:h.jsx(PR,{})}),h.jsx(St,{path:"sessions/:sessionId",element:h.jsx(s3,{})}),h.jsx(St,{path:"workspaces/:workspaceId",element:h.jsx(gO,{})}),h.jsx(St,{path:"tasks/new",element:h.jsx(UO,{})}),h.jsx(St,{path:"tasks/:taskId",element:h.jsx(Zd,{})}),h.jsx(St,{path:"tasks/:taskId/stream",element:h.jsx(Zd,{})}),h.jsx(St,{path:"tasks/:taskId/findings",element:h.jsx(Zd,{})}),h.jsx(St,{path:"tasks/:taskId/edit",element:h.jsx(zO,{})}),h.jsx(St,{path:"environments/new",element:h.jsx(aB,{})}),h.jsxs(St,{path:"settings",element:h.jsx(rB,{}),children:[h.jsx(St,{index:!0,element:h.jsx(ji,{to:"environments",replace:!0})}),h.jsx(St,{path:"environments",element:h.jsx(XB,{})}),h.jsx(St,{path:"credentials",element:h.jsx(I4,{})}),h.jsx(St,{path:"tokens",element:h.jsx(ji,{to:"../credentials",replace:!0})}),h.jsx(St,{path:"personas",element:h.jsx(c6,{})}),h.jsx(St,{path:"appearance",element:h.jsx(d6,{})}),h.jsx(St,{path:"about",element:h.jsx(h6,{})})]}),h.jsx(St,{path:"*",element:h.jsx(ji,{to:"/",replace:!0})})]})]})}const Y6=1e4;function K6(){const{onboardingCompleted:n}=Bt(),[a,i]=S.useState(!1);S.useEffect(()=>{if(n!==void 0)return;const r=setTimeout(()=>i(!0),Y6);return()=>clearTimeout(r)},[n]);const o=n===void 0&&!a;return h.jsx(Dn,{mode:"wait",children:o?h.jsx($t.div,{initial:{opacity:1},exit:{opacity:0},transition:{duration:.25},children:h.jsx(mj,{})},"splash"):h.jsx($t.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.25},style:{minHeight:"100vh"},children:h.jsx(qT,{children:h.jsx(q6,{})})},"app")})}function Z6(){const n=F6?zE:jE;return h.jsx($E,{children:h.jsx(HE,{children:h.jsx(n,{children:h.jsx(K6,{})})})})}T_.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(Z6,{})}));