cascade-ai 0.76.0 → 0.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,246 @@
1
+ var u0=Object.defineProperty;var c0=(e,t,l)=>t in e?u0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l;var cl=(e,t,l)=>c0(e,typeof t!="symbol"?t+"":t,l);import{r as S,a as Ho,g as r0,H as Rr,P as Br,M as Hr,R as f0,B as o0,b as d0,C as h0,c as m0}from"./reactflow-CkXCC9kc.js";import{l as v0}from"./socketio-SYmKJpIj.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function l(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(n){if(n.ep)return;n.ep=!0;const i=l(n);fetch(n.href,i)}})();var Lo={exports:{}},is={};/**
2
+ * @license React
3
+ * react-jsx-runtime.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 g0=Symbol.for("react.transitional.element"),y0=Symbol.for("react.fragment");function qo(e,t,l){var a=null;if(l!==void 0&&(a=""+l),t.key!==void 0&&(a=""+t.key),"key"in t){l={};for(var n in t)n!=="key"&&(l[n]=t[n])}else l=t;return t=l.ref,{$$typeof:g0,type:e,key:a,ref:t!==void 0?t:null,props:l}}is.Fragment=y0;is.jsx=qo;is.jsxs=qo;Lo.exports=is;var r=Lo.exports,Yo={exports:{}},ss={},Vo={exports:{}},Go={};/**
10
+ * @license React
11
+ * scheduler.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
+ */(function(e){function t(C,T){var D=C.length;C.push(T);e:for(;0<D;){var K=D-1>>>1,R=C[K];if(0<n(R,T))C[K]=T,C[D]=R,D=K;else break e}}function l(C){return C.length===0?null:C[0]}function a(C){if(C.length===0)return null;var T=C[0],D=C.pop();if(D!==T){C[0]=D;e:for(var K=0,R=C.length,Pe=R>>>1;K<Pe;){var Cl=2*(K+1)-1,Os=C[Cl],ul=Cl+1,Bn=C[ul];if(0>n(Os,D))ul<R&&0>n(Bn,Os)?(C[K]=Bn,C[ul]=D,K=ul):(C[K]=Os,C[Cl]=D,K=Cl);else if(ul<R&&0>n(Bn,D))C[K]=Bn,C[ul]=D,K=ul;else break e}}return T}function n(C,T){var D=C.sortIndex-T.sortIndex;return D!==0?D:C.id-T.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],f=[],h=1,m=null,o=3,g=!1,x=!1,b=!1,E=!1,v=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function p(C){for(var T=l(f);T!==null;){if(T.callback===null)a(f);else if(T.startTime<=C)a(f),T.sortIndex=T.expirationTime,t(c,T);else break;T=l(f)}}function _(C){if(b=!1,p(C),!x)if(l(c)!==null)x=!0,N||(N=!0,fe());else{var T=l(f);T!==null&&za(_,T.startTime-C)}}var N=!1,j=-1,M=5,A=-1;function O(){return E?!0:!(e.unstable_now()-A<M)}function G(){if(E=!1,N){var C=e.unstable_now();A=C;var T=!0;try{e:{x=!1,b&&(b=!1,d(j),j=-1),g=!0;var D=o;try{t:{for(p(C),m=l(c);m!==null&&!(m.expirationTime>C&&O());){var K=m.callback;if(typeof K=="function"){m.callback=null,o=m.priorityLevel;var R=K(m.expirationTime<=C);if(C=e.unstable_now(),typeof R=="function"){m.callback=R,p(C),T=!0;break t}m===l(c)&&a(c),p(C)}else a(c);m=l(c)}if(m!==null)T=!0;else{var Pe=l(f);Pe!==null&&za(_,Pe.startTime-C),T=!1}}break e}finally{m=null,o=D,g=!1}T=void 0}}finally{T?fe():N=!1}}}var fe;if(typeof y=="function")fe=function(){y(G)};else if(typeof MessageChannel<"u"){var Ie=new MessageChannel,sl=Ie.port2;Ie.port1.onmessage=G,fe=function(){sl.postMessage(null)}}else fe=function(){v(G,0)};function za(C,T){j=v(function(){C(e.unstable_now())},T)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return o},e.unstable_next=function(C){switch(o){case 1:case 2:case 3:var T=3;break;default:T=o}var D=o;o=T;try{return C()}finally{o=D}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(C,T){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var D=o;o=C;try{return T()}finally{o=D}},e.unstable_scheduleCallback=function(C,T,D){var K=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?K+D:K):D=K,C){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=D+R,C={id:h++,callback:T,priorityLevel:C,startTime:D,expirationTime:R,sortIndex:-1},D>K?(C.sortIndex=D,t(f,C),l(c)===null&&C===l(f)&&(b?(d(j),j=-1):b=!0,za(_,D-K))):(C.sortIndex=R,t(c,C),x||g||(x=!0,N||(N=!0,fe()))),C},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(C){var T=o;return function(){var D=o;o=T;try{return C.apply(this,arguments)}finally{o=D}}}})(Go);Vo.exports=Go;var p0=Vo.exports;/**
18
+ * @license React
19
+ * react-dom-client.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var re=p0,Xo=S,x0=Ho;function z(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 Qo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function bn(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function Zo(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 ko(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 Lr(e){if(bn(e)!==e)throw Error(z(188))}function b0(e){var t=e.alternate;if(!t){if(t=bn(e),t===null)throw Error(z(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return Lr(n),e;if(i===a)return Lr(n),t;i=i.sibling}throw Error(z(188))}if(l.return!==a.return)l=n,a=i;else{for(var s=!1,u=n.child;u;){if(u===l){s=!0,l=n,a=i;break}if(u===a){s=!0,a=n,l=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===l){s=!0,l=i,a=n;break}if(u===a){s=!0,a=i,l=n;break}u=u.sibling}if(!s)throw Error(z(189))}}if(l.alternate!==a)throw Error(z(190))}if(l.tag!==3)throw Error(z(188));return l.stateNode.current===l?e:t}function Ko(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Ko(e),t!==null)return t;e=e.sibling}return null}var I=Object.assign,S0=Symbol.for("react.element"),Hn=Symbol.for("react.transitional.element"),Ua=Symbol.for("react.portal"),Hl=Symbol.for("react.fragment"),Jo=Symbol.for("react.strict_mode"),Mu=Symbol.for("react.profiler"),$o=Symbol.for("react.consumer"),pt=Symbol.for("react.context"),Dc=Symbol.for("react.forward_ref"),Cu=Symbol.for("react.suspense"),Ou=Symbol.for("react.suspense_list"),wc=Symbol.for("react.memo"),Dt=Symbol.for("react.lazy"),Du=Symbol.for("react.activity"),_0=Symbol.for("react.memo_cache_sentinel"),qr=Symbol.iterator;function ja(e){return e===null||typeof e!="object"?null:(e=qr&&e[qr]||e["@@iterator"],typeof e=="function"?e:null)}var E0=Symbol.for("react.client.reference");function wu(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===E0?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Hl:return"Fragment";case Mu:return"Profiler";case Jo:return"StrictMode";case Cu:return"Suspense";case Ou:return"SuspenseList";case Du:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Ua:return"Portal";case pt:return e.displayName||"Context";case $o:return(e._context.displayName||"Context")+".Consumer";case Dc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wc:return t=e.displayName||null,t!==null?t:wu(e.type)||"Memo";case Dt:t=e._payload,e=e._init;try{return wu(e(t))}catch{}}return null}var Ra=Array.isArray,w=Xo.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=x0.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ml={pending:!1,data:null,method:null,action:null},Uu=[],Ll=-1;function ct(e){return{current:e}}function he(e){0>Ll||(e.current=Uu[Ll],Uu[Ll]=null,Ll--)}function $(e,t){Ll++,Uu[Ll]=e.current,e.current=t}var ut=ct(null),ln=ct(null),Qt=ct(null),Si=ct(null);function _i(e,t){switch($(Qt,t),$(ln,e),$(ut,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=kf(t),e=vm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}he(ut),$(ut,e)}function la(){he(ut),he(ln),he(Qt)}function Ru(e){e.memoizedState!==null&&$(Si,e);var t=ut.current,l=vm(t,e.type);t!==l&&($(ln,e),$(ut,l))}function Ei(e){ln.current===e&&(he(ut),he(ln)),Si.current===e&&(he(Si),mn._currentValue=ml)}var Ds,Yr;function fl(e){if(Ds===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Ds=t&&t[1]||"",Yr=-1<l.stack.indexOf(`
26
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
27
+ `+Ds+e+Yr}var ws=!1;function Us(e,t){if(!e||ws)return"";ws=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(g){var o=g}Reflect.construct(e,[],m)}else{try{m.call()}catch(g){o=g}e.call(m.prototype)}}else{try{throw Error()}catch(g){o=g}(m=e())&&typeof m.catch=="function"&&m.catch(function(){})}}catch(g){if(g&&o&&typeof g.stack=="string")return[g.stack,o.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),s=i[0],u=i[1];if(s&&u){var c=s.split(`
28
+ `),f=u.split(`
29
+ `);for(n=a=0;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;for(;n<f.length&&!f[n].includes("DetermineComponentFrameRoot");)n++;if(a===c.length||n===f.length)for(a=c.length-1,n=f.length-1;1<=a&&0<=n&&c[a]!==f[n];)n--;for(;1<=a&&0<=n;a--,n--)if(c[a]!==f[n]){if(a!==1||n!==1)do if(a--,n--,0>n||c[a]!==f[n]){var h=`
30
+ `+c[a].replace(" at new "," at ");return e.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",e.displayName)),h}while(1<=a&&0<=n);break}}}finally{ws=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?fl(l):""}function z0(e,t){switch(e.tag){case 26:case 27:case 5:return fl(e.type);case 16:return fl("Lazy");case 13:return e.child!==t&&t!==null?fl("Suspense Fallback"):fl("Suspense");case 19:return fl("SuspenseList");case 0:case 15:return Us(e.type,!1);case 11:return Us(e.type.render,!1);case 1:return Us(e.type,!0);case 31:return fl("Activity");default:return""}}function Vr(e){try{var t="",l=null;do t+=z0(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
31
+ Error generating stack: `+a.message+`
32
+ `+a.stack}}var Bu=Object.prototype.hasOwnProperty,Uc=re.unstable_scheduleCallback,Rs=re.unstable_cancelCallback,j0=re.unstable_shouldYield,T0=re.unstable_requestPaint,Re=re.unstable_now,N0=re.unstable_getCurrentPriorityLevel,Fo=re.unstable_ImmediatePriority,Wo=re.unstable_UserBlockingPriority,zi=re.unstable_NormalPriority,A0=re.unstable_LowPriority,Io=re.unstable_IdlePriority,M0=re.log,C0=re.unstable_setDisableYieldValue,Sn=null,Be=null;function Lt(e){if(typeof M0=="function"&&C0(e),Be&&typeof Be.setStrictMode=="function")try{Be.setStrictMode(Sn,e)}catch{}}var He=Math.clz32?Math.clz32:w0,O0=Math.log,D0=Math.LN2;function w0(e){return e>>>=0,e===0?32:31-(O0(e)/D0|0)|0}var Ln=256,qn=262144,Yn=4194304;function ol(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 us(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var u=a&134217727;return u!==0?(a=u&~i,a!==0?n=ol(a):(s&=u,s!==0?n=ol(s):l||(l=u&~e,l!==0&&(n=ol(l))))):(u=a&~i,u!==0?n=ol(u):s!==0?n=ol(s):l||(l=a&~e,l!==0&&(n=ol(l)))),n===0?0:t!==0&&t!==n&&!(t&i)&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function _n(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function U0(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 Po(){var e=Yn;return Yn<<=1,!(Yn&62914560)&&(Yn=4194304),e}function Bs(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function En(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function R0(e,t,l,a,n,i){var s=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var u=e.entanglements,c=e.expirationTimes,f=e.hiddenUpdates;for(l=s&~l;0<l;){var h=31-He(l),m=1<<h;u[h]=0,c[h]=-1;var o=f[h];if(o!==null)for(f[h]=null,h=0;h<o.length;h++){var g=o[h];g!==null&&(g.lane&=-536870913)}l&=~m}a!==0&&ed(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(s&~t))}function ed(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-He(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function td(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-He(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function ld(e,t){var l=t&-t;return l=l&42?1:Rc(l),l&(e.suspendedLanes|t)?0:l}function Rc(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 Bc(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ad(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:Tm(e.type))}function Gr(e,t){var l=V.p;try{return V.p=e,t()}finally{V.p=l}}var nl=Math.random().toString(36).slice(2),ge="__reactFiber$"+nl,Ae="__reactProps$"+nl,ma="__reactContainer$"+nl,Hu="__reactEvents$"+nl,B0="__reactListeners$"+nl,H0="__reactHandles$"+nl,Xr="__reactResources$"+nl,zn="__reactMarker$"+nl;function Hc(e){delete e[ge],delete e[Ae],delete e[Hu],delete e[B0],delete e[H0]}function ql(e){var t=e[ge];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ma]||l[ge]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Wf(e);e!==null;){if(l=e[ge])return l;e=Wf(e)}return t}e=l,l=e.parentNode}return null}function va(e){if(e=e[ge]||e[ma]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ba(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(z(33))}function $l(e){var t=e[Xr];return t||(t=e[Xr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function de(e){e[zn]=!0}var nd=new Set,id={};function jl(e,t){aa(e,t),aa(e+"Capture",t)}function aa(e,t){for(id[e]=t,e=0;e<t.length;e++)nd.add(t[e])}var L0=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]*$"),Qr={},Zr={};function q0(e){return Bu.call(Zr,e)?!0:Bu.call(Qr,e)?!1:L0.test(e)?Zr[e]=!0:(Qr[e]=!0,!1)}function ni(e,t,l){if(q0(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Vn(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function ft(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Ge(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Y0(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(s){l=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(s){l=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lu(e){if(!e._valueTracker){var t=sd(e)?"checked":"value";e._valueTracker=Y0(e,t,""+e[t])}}function ud(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=sd(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function ji(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 V0=/[\n"\\]/g;function Ze(e){return e.replace(V0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function qu(e,t,l,a,n,i,s,u){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ge(t)):e.value!==""+Ge(t)&&(e.value=""+Ge(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Yu(e,s,Ge(t)):l!=null?Yu(e,s,Ge(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.name=""+Ge(u):e.removeAttribute("name")}function cd(e,t,l,a,n,i,s,u){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Lu(e);return}l=l!=null?""+Ge(l):"",t=t!=null?""+Ge(t):l,u||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=u?e.checked:!!a,e.defaultChecked=!!a,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Lu(e)}function Yu(e,t,l){t==="number"&&ji(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Fl(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Ge(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function rd(e,t,l){if(t!=null&&(t=""+Ge(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Ge(l):""}function fd(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(z(92));if(Ra(a)){if(1<a.length)throw Error(z(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Ge(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Lu(e)}function na(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var G0=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 kr(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||G0.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function od(e,t,l){if(t!=null&&typeof t!="object")throw Error(z(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&kr(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&kr(e,i,t[i])}function Lc(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 X0=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"]]),Q0=/^[\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 ii(e){return Q0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function xt(){}var Vu=null;function qc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yl=null,Wl=null;function Kr(e){var t=va(e);if(t&&(e=t.stateNode)){var l=e[Ae]||null;e:switch(e=t.stateNode,t.type){case"input":if(qu(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ze(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[Ae]||null;if(!n)throw Error(z(90));qu(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&ud(a)}break e;case"textarea":rd(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Fl(e,!!l.multiple,t,!1)}}}var Hs=!1;function dd(e,t,l){if(Hs)return e(t,l);Hs=!0;try{var a=e(t);return a}finally{if(Hs=!1,(Yl!==null||Wl!==null)&&(xs(),Yl&&(t=Yl,e=Wl,Wl=Yl=null,Kr(t),e)))for(t=0;t<e.length;t++)Kr(e[t])}}function an(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Ae]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(z(231,t,typeof l));return l}var jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gu=!1;if(jt)try{var Ta={};Object.defineProperty(Ta,"passive",{get:function(){Gu=!0}}),window.addEventListener("test",Ta,Ta),window.removeEventListener("test",Ta,Ta)}catch{Gu=!1}var qt=null,Yc=null,si=null;function hd(){if(si)return si;var e,t=Yc,l=t.length,a,n="value"in qt?qt.value:qt.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var s=l-e;for(a=1;a<=s&&t[l-a]===n[i-a];a++);return si=n.slice(e,1<a?1-a:void 0)}function ui(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 Gn(){return!0}function Jr(){return!1}function Me(e){function t(l,a,n,i,s){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(l=e[u],this[u]=l?l(i):i[u]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Gn:Jr,this.isPropagationStopped=Jr,this}return I(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Gn)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Gn)},persist:function(){},isPersistent:Gn}),t}var Tl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cs=Me(Tl),jn=I({},Tl,{view:0,detail:0}),Z0=Me(jn),Ls,qs,Na,rs=I({},jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vc,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!==Na&&(Na&&e.type==="mousemove"?(Ls=e.screenX-Na.screenX,qs=e.screenY-Na.screenY):qs=Ls=0,Na=e),Ls)},movementY:function(e){return"movementY"in e?e.movementY:qs}}),$r=Me(rs),k0=I({},rs,{dataTransfer:0}),K0=Me(k0),J0=I({},jn,{relatedTarget:0}),Ys=Me(J0),$0=I({},Tl,{animationName:0,elapsedTime:0,pseudoElement:0}),F0=Me($0),W0=I({},Tl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),I0=Me(W0),P0=I({},Tl,{data:0}),Fr=Me(P0),ev={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tv={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"},lv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function av(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lv[e])?!!t[e]:!1}function Vc(){return av}var nv=I({},jn,{key:function(e){if(e.key){var t=ev[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ui(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vc,charCode:function(e){return e.type==="keypress"?ui(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ui(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iv=Me(nv),sv=I({},rs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wr=Me(sv),uv=I({},jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vc}),cv=Me(uv),rv=I({},Tl,{propertyName:0,elapsedTime:0,pseudoElement:0}),fv=Me(rv),ov=I({},rs,{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}),dv=Me(ov),hv=I({},Tl,{newState:0,oldState:0}),mv=Me(hv),vv=[9,13,27,32],Gc=jt&&"CompositionEvent"in window,Va=null;jt&&"documentMode"in document&&(Va=document.documentMode);var gv=jt&&"TextEvent"in window&&!Va,md=jt&&(!Gc||Va&&8<Va&&11>=Va),Ir=" ",Pr=!1;function vd(e,t){switch(e){case"keyup":return vv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vl=!1;function yv(e,t){switch(e){case"compositionend":return gd(t);case"keypress":return t.which!==32?null:(Pr=!0,Ir);case"textInput":return e=t.data,e===Ir&&Pr?null:e;default:return null}}function pv(e,t){if(Vl)return e==="compositionend"||!Gc&&vd(e,t)?(e=hd(),si=Yc=qt=null,Vl=!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 md&&t.locale!=="ko"?null:t.data;default:return null}}var xv={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 ef(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xv[e.type]:t==="textarea"}function yd(e,t,l,a){Yl?Wl?Wl.push(a):Wl=[a]:Yl=a,t=Xi(t,"onChange"),0<t.length&&(l=new cs("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Ga=null,nn=null;function bv(e){dm(e,0)}function fs(e){var t=Ba(e);if(ud(t))return e}function tf(e,t){if(e==="change")return t}var pd=!1;if(jt){var Vs;if(jt){var Gs="oninput"in document;if(!Gs){var lf=document.createElement("div");lf.setAttribute("oninput","return;"),Gs=typeof lf.oninput=="function"}Vs=Gs}else Vs=!1;pd=Vs&&(!document.documentMode||9<document.documentMode)}function af(){Ga&&(Ga.detachEvent("onpropertychange",xd),nn=Ga=null)}function xd(e){if(e.propertyName==="value"&&fs(nn)){var t=[];yd(t,nn,e,qc(e)),dd(bv,t)}}function Sv(e,t,l){e==="focusin"?(af(),Ga=t,nn=l,Ga.attachEvent("onpropertychange",xd)):e==="focusout"&&af()}function _v(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fs(nn)}function Ev(e,t){if(e==="click")return fs(t)}function zv(e,t){if(e==="input"||e==="change")return fs(t)}function jv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qe=typeof Object.is=="function"?Object.is:jv;function sn(e,t){if(qe(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!Bu.call(t,n)||!qe(e[n],t[n]))return!1}return!0}function nf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sf(e,t){var l=nf(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=nf(l)}}function bd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ji(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=ji(e.document)}return t}function Xc(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 Tv=jt&&"documentMode"in document&&11>=document.documentMode,Gl=null,Xu=null,Xa=null,Qu=!1;function uf(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Qu||Gl==null||Gl!==ji(a)||(a=Gl,"selectionStart"in a&&Xc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Xa&&sn(Xa,a)||(Xa=a,a=Xi(Xu,"onSelect"),0<a.length&&(t=new cs("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Gl)))}function rl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Xl={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionrun:rl("Transition","TransitionRun"),transitionstart:rl("Transition","TransitionStart"),transitioncancel:rl("Transition","TransitionCancel"),transitionend:rl("Transition","TransitionEnd")},Xs={},_d={};jt&&(_d=document.createElement("div").style,"AnimationEvent"in window||(delete Xl.animationend.animation,delete Xl.animationiteration.animation,delete Xl.animationstart.animation),"TransitionEvent"in window||delete Xl.transitionend.transition);function Nl(e){if(Xs[e])return Xs[e];if(!Xl[e])return e;var t=Xl[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in _d)return Xs[e]=t[l];return e}var Ed=Nl("animationend"),zd=Nl("animationiteration"),jd=Nl("animationstart"),Nv=Nl("transitionrun"),Av=Nl("transitionstart"),Mv=Nl("transitioncancel"),Td=Nl("transitionend"),Nd=new Map,Zu="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(" ");Zu.push("scrollEnd");function at(e,t){Nd.set(e,t),jl(t,[e])}var Ti=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)},Ve=[],Ql=0,Qc=0;function os(){for(var e=Ql,t=Qc=Ql=0;t<e;){var l=Ve[t];Ve[t++]=null;var a=Ve[t];Ve[t++]=null;var n=Ve[t];Ve[t++]=null;var i=Ve[t];if(Ve[t++]=null,a!==null&&n!==null){var s=a.pending;s===null?n.next=n:(n.next=s.next,s.next=n),a.pending=n}i!==0&&Ad(l,n,i)}}function ds(e,t,l,a){Ve[Ql++]=e,Ve[Ql++]=t,Ve[Ql++]=l,Ve[Ql++]=a,Qc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Zc(e,t,l,a){return ds(e,t,l,a),Ni(e)}function Al(e,t){return ds(e,null,null,t),Ni(e)}function Ad(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-He(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function Ni(e){if(50<Ia)throw Ia=0,dc=null,Error(z(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Zl={};function Cv(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function De(e,t,l,a){return new Cv(e,t,l,a)}function kc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function St(e,t){var l=e.alternate;return l===null?(l=De(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Md(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ci(e,t,l,a,n,i){var s=0;if(a=e,typeof e=="function")kc(e)&&(s=1);else if(typeof e=="string")s=Rg(e,l,ut.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Du:return e=De(31,l,t,n),e.elementType=Du,e.lanes=i,e;case Hl:return vl(l.children,n,i,t);case Jo:s=8,n|=24;break;case Mu:return e=De(12,l,t,n|2),e.elementType=Mu,e.lanes=i,e;case Cu:return e=De(13,l,t,n),e.elementType=Cu,e.lanes=i,e;case Ou:return e=De(19,l,t,n),e.elementType=Ou,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pt:s=10;break e;case $o:s=9;break e;case Dc:s=11;break e;case wc:s=14;break e;case Dt:s=16,a=null;break e}s=29,l=Error(z(130,e===null?"null":typeof e,"")),a=null}return t=De(s,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function vl(e,t,l,a){return e=De(7,e,a,t),e.lanes=l,e}function Qs(e,t,l){return e=De(6,e,null,t),e.lanes=l,e}function Cd(e){var t=De(18,null,null,0);return t.stateNode=e,t}function Zs(e,t,l){return t=De(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var cf=new WeakMap;function ke(e,t){if(typeof e=="object"&&e!==null){var l=cf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Vr(t)},cf.set(e,t),t)}return{value:e,source:t,stack:Vr(t)}}var kl=[],Kl=0,Ai=null,un=0,Xe=[],Qe=0,Pt=null,nt=1,it="";function vt(e,t){kl[Kl++]=un,kl[Kl++]=Ai,Ai=e,un=t}function Od(e,t,l){Xe[Qe++]=nt,Xe[Qe++]=it,Xe[Qe++]=Pt,Pt=e;var a=nt;e=it;var n=32-He(a)-1;a&=~(1<<n),l+=1;var i=32-He(t)+n;if(30<i){var s=n-n%5;i=(a&(1<<s)-1).toString(32),a>>=s,n-=s,nt=1<<32-He(t)+n|l<<n|a,it=i+e}else nt=1<<i|l<<n|a,it=e}function Kc(e){e.return!==null&&(vt(e,1),Od(e,1,0))}function Jc(e){for(;e===Ai;)Ai=kl[--Kl],kl[Kl]=null,un=kl[--Kl],kl[Kl]=null;for(;e===Pt;)Pt=Xe[--Qe],Xe[Qe]=null,it=Xe[--Qe],Xe[Qe]=null,nt=Xe[--Qe],Xe[Qe]=null}function Dd(e,t){Xe[Qe++]=nt,Xe[Qe++]=it,Xe[Qe++]=Pt,nt=t.id,it=t.overflow,Pt=e}var ye=null,W=null,q=!1,Zt=null,Ke=!1,ku=Error(z(519));function el(e){var t=Error(z(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cn(ke(t,e)),ku}function rf(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[ge]=e,t[Ae]=a,l){case"dialog":B("cancel",t),B("close",t);break;case"iframe":case"object":case"embed":B("load",t);break;case"video":case"audio":for(l=0;l<dn.length;l++)B(dn[l],t);break;case"source":B("error",t);break;case"img":case"image":case"link":B("error",t),B("load",t);break;case"details":B("toggle",t);break;case"input":B("invalid",t),cd(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":B("invalid",t);break;case"textarea":B("invalid",t),fd(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||mm(t.textContent,l)?(a.popover!=null&&(B("beforetoggle",t),B("toggle",t)),a.onScroll!=null&&B("scroll",t),a.onScrollEnd!=null&&B("scrollend",t),a.onClick!=null&&(t.onclick=xt),t=!0):t=!1,t||el(e,!0)}function ff(e){for(ye=e.return;ye;)switch(ye.tag){case 5:case 31:case 13:Ke=!1;return;case 27:case 3:Ke=!0;return;default:ye=ye.return}}function Ol(e){if(e!==ye)return!1;if(!q)return ff(e),q=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||yc(e.type,e.memoizedProps)),l=!l),l&&W&&el(e),ff(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));W=Ff(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));W=Ff(e)}else t===27?(t=W,il(e.type)?(e=Sc,Sc=null,W=e):W=t):W=ye?$e(e.stateNode.nextSibling):null;return!0}function xl(){W=ye=null,q=!1}function ks(){var e=Zt;return e!==null&&(Te===null?Te=e:Te.push.apply(Te,e),Zt=null),e}function cn(e){Zt===null?Zt=[e]:Zt.push(e)}var Ku=ct(null),Ml=null,bt=null;function Ut(e,t,l){$(Ku,t._currentValue),t._currentValue=l}function _t(e){e._currentValue=Ku.current,he(Ku)}function Ju(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function $u(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var s=n.child;i=i.firstContext;e:for(;i!==null;){var u=i;i=n;for(var c=0;c<t.length;c++)if(u.context===t[c]){i.lanes|=l,u=i.alternate,u!==null&&(u.lanes|=l),Ju(i.return,l,e),a||(s=null);break e}i=u.next}}else if(n.tag===18){if(s=n.return,s===null)throw Error(z(341));s.lanes|=l,i=s.alternate,i!==null&&(i.lanes|=l),Ju(s,l,e),s=null}else s=n.child;if(s!==null)s.return=n;else for(s=n;s!==null;){if(s===e){s=null;break}if(n=s.sibling,n!==null){n.return=s.return,s=n;break}s=s.return}n=s}}function ga(e,t,l,a){e=null;for(var n=t,i=!1;n!==null;){if(!i){if(n.flags&524288)i=!0;else if(n.flags&262144)break}if(n.tag===10){var s=n.alternate;if(s===null)throw Error(z(387));if(s=s.memoizedProps,s!==null){var u=n.type;qe(n.pendingProps.value,s.value)||(e!==null?e.push(u):e=[u])}}else if(n===Si.current){if(s=n.alternate,s===null)throw Error(z(387));s.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(mn):e=[mn])}n=n.return}e!==null&&$u(t,e,l,a),t.flags|=262144}function Mi(e){for(e=e.firstContext;e!==null;){if(!qe(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function bl(e){Ml=e,bt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function pe(e){return wd(Ml,e)}function Xn(e,t){return Ml===null&&bl(e),wd(e,t)}function wd(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},bt===null){if(e===null)throw Error(z(308));bt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else bt=bt.next=t;return l}var Ov=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Dv=re.unstable_scheduleCallback,wv=re.unstable_NormalPriority,se={$$typeof:pt,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $c(){return{controller:new Ov,data:new Map,refCount:0}}function Tn(e){e.refCount--,e.refCount===0&&Dv(wv,function(){e.controller.abort()})}var Qa=null,Fu=0,ia=0,Il=null;function Uv(e,t){if(Qa===null){var l=Qa=[];Fu=0,ia=br(),Il={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Fu++,t.then(of,of),t}function of(){if(--Fu===0&&Qa!==null){Il!==null&&(Il.status="fulfilled");var e=Qa;Qa=null,ia=0,Il=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Rv(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var df=w.S;w.S=function(e,t){Kh=Re(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Uv(e,t),df!==null&&df(e,t)};var gl=ct(null);function Fc(){var e=gl.current;return e!==null?e:J.pooledCache}function ri(e,t){t===null?$(gl,gl.current):$(gl,t.pool)}function Ud(){var e=Fc();return e===null?null:{parent:se._currentValue,pool:e}}var ya=Error(z(460)),Wc=Error(z(474)),hs=Error(z(542)),Ci={then:function(){}};function hf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Rd(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(xt,xt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vf(e),e;default:if(typeof t.status=="string")t.then(xt,xt);else{if(e=J,e!==null&&100<e.shellSuspendCounter)throw Error(z(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vf(e),e}throw yl=t,ya}}function dl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(yl=l,ya):l}}var yl=null;function mf(){if(yl===null)throw Error(z(459));var e=yl;return yl=null,e}function vf(e){if(e===ya||e===hs)throw Error(z(483))}var Pl=null,rn=0;function Qn(e){var t=rn;return rn+=1,Pl===null&&(Pl=[]),Rd(Pl,e,t)}function Aa(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zn(e,t){throw t.$$typeof===S0?Error(z(525)):(e=Object.prototype.toString.call(t),Error(z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Bd(e){function t(v,d){if(e){var y=v.deletions;y===null?(v.deletions=[d],v.flags|=16):y.push(d)}}function l(v,d){if(!e)return null;for(;d!==null;)t(v,d),d=d.sibling;return null}function a(v){for(var d=new Map;v!==null;)v.key!==null?d.set(v.key,v):d.set(v.index,v),v=v.sibling;return d}function n(v,d){return v=St(v,d),v.index=0,v.sibling=null,v}function i(v,d,y){return v.index=y,e?(y=v.alternate,y!==null?(y=y.index,y<d?(v.flags|=67108866,d):y):(v.flags|=67108866,d)):(v.flags|=1048576,d)}function s(v){return e&&v.alternate===null&&(v.flags|=67108866),v}function u(v,d,y,p){return d===null||d.tag!==6?(d=Qs(y,v.mode,p),d.return=v,d):(d=n(d,y),d.return=v,d)}function c(v,d,y,p){var _=y.type;return _===Hl?h(v,d,y.props.children,p,y.key):d!==null&&(d.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Dt&&dl(_)===d.type)?(d=n(d,y.props),Aa(d,y),d.return=v,d):(d=ci(y.type,y.key,y.props,null,v.mode,p),Aa(d,y),d.return=v,d)}function f(v,d,y,p){return d===null||d.tag!==4||d.stateNode.containerInfo!==y.containerInfo||d.stateNode.implementation!==y.implementation?(d=Zs(y,v.mode,p),d.return=v,d):(d=n(d,y.children||[]),d.return=v,d)}function h(v,d,y,p,_){return d===null||d.tag!==7?(d=vl(y,v.mode,p,_),d.return=v,d):(d=n(d,y),d.return=v,d)}function m(v,d,y){if(typeof d=="string"&&d!==""||typeof d=="number"||typeof d=="bigint")return d=Qs(""+d,v.mode,y),d.return=v,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case Hn:return y=ci(d.type,d.key,d.props,null,v.mode,y),Aa(y,d),y.return=v,y;case Ua:return d=Zs(d,v.mode,y),d.return=v,d;case Dt:return d=dl(d),m(v,d,y)}if(Ra(d)||ja(d))return d=vl(d,v.mode,y,null),d.return=v,d;if(typeof d.then=="function")return m(v,Qn(d),y);if(d.$$typeof===pt)return m(v,Xn(v,d),y);Zn(v,d)}return null}function o(v,d,y,p){var _=d!==null?d.key:null;if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return _!==null?null:u(v,d,""+y,p);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Hn:return y.key===_?c(v,d,y,p):null;case Ua:return y.key===_?f(v,d,y,p):null;case Dt:return y=dl(y),o(v,d,y,p)}if(Ra(y)||ja(y))return _!==null?null:h(v,d,y,p,null);if(typeof y.then=="function")return o(v,d,Qn(y),p);if(y.$$typeof===pt)return o(v,d,Xn(v,y),p);Zn(v,y)}return null}function g(v,d,y,p,_){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return v=v.get(y)||null,u(d,v,""+p,_);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Hn:return v=v.get(p.key===null?y:p.key)||null,c(d,v,p,_);case Ua:return v=v.get(p.key===null?y:p.key)||null,f(d,v,p,_);case Dt:return p=dl(p),g(v,d,y,p,_)}if(Ra(p)||ja(p))return v=v.get(y)||null,h(d,v,p,_,null);if(typeof p.then=="function")return g(v,d,y,Qn(p),_);if(p.$$typeof===pt)return g(v,d,y,Xn(d,p),_);Zn(d,p)}return null}function x(v,d,y,p){for(var _=null,N=null,j=d,M=d=0,A=null;j!==null&&M<y.length;M++){j.index>M?(A=j,j=null):A=j.sibling;var O=o(v,j,y[M],p);if(O===null){j===null&&(j=A);break}e&&j&&O.alternate===null&&t(v,j),d=i(O,d,M),N===null?_=O:N.sibling=O,N=O,j=A}if(M===y.length)return l(v,j),q&&vt(v,M),_;if(j===null){for(;M<y.length;M++)j=m(v,y[M],p),j!==null&&(d=i(j,d,M),N===null?_=j:N.sibling=j,N=j);return q&&vt(v,M),_}for(j=a(j);M<y.length;M++)A=g(j,v,M,y[M],p),A!==null&&(e&&A.alternate!==null&&j.delete(A.key===null?M:A.key),d=i(A,d,M),N===null?_=A:N.sibling=A,N=A);return e&&j.forEach(function(G){return t(v,G)}),q&&vt(v,M),_}function b(v,d,y,p){if(y==null)throw Error(z(151));for(var _=null,N=null,j=d,M=d=0,A=null,O=y.next();j!==null&&!O.done;M++,O=y.next()){j.index>M?(A=j,j=null):A=j.sibling;var G=o(v,j,O.value,p);if(G===null){j===null&&(j=A);break}e&&j&&G.alternate===null&&t(v,j),d=i(G,d,M),N===null?_=G:N.sibling=G,N=G,j=A}if(O.done)return l(v,j),q&&vt(v,M),_;if(j===null){for(;!O.done;M++,O=y.next())O=m(v,O.value,p),O!==null&&(d=i(O,d,M),N===null?_=O:N.sibling=O,N=O);return q&&vt(v,M),_}for(j=a(j);!O.done;M++,O=y.next())O=g(j,v,M,O.value,p),O!==null&&(e&&O.alternate!==null&&j.delete(O.key===null?M:O.key),d=i(O,d,M),N===null?_=O:N.sibling=O,N=O);return e&&j.forEach(function(fe){return t(v,fe)}),q&&vt(v,M),_}function E(v,d,y,p){if(typeof y=="object"&&y!==null&&y.type===Hl&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Hn:e:{for(var _=y.key;d!==null;){if(d.key===_){if(_=y.type,_===Hl){if(d.tag===7){l(v,d.sibling),p=n(d,y.props.children),p.return=v,v=p;break e}}else if(d.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Dt&&dl(_)===d.type){l(v,d.sibling),p=n(d,y.props),Aa(p,y),p.return=v,v=p;break e}l(v,d);break}else t(v,d);d=d.sibling}y.type===Hl?(p=vl(y.props.children,v.mode,p,y.key),p.return=v,v=p):(p=ci(y.type,y.key,y.props,null,v.mode,p),Aa(p,y),p.return=v,v=p)}return s(v);case Ua:e:{for(_=y.key;d!==null;){if(d.key===_)if(d.tag===4&&d.stateNode.containerInfo===y.containerInfo&&d.stateNode.implementation===y.implementation){l(v,d.sibling),p=n(d,y.children||[]),p.return=v,v=p;break e}else{l(v,d);break}else t(v,d);d=d.sibling}p=Zs(y,v.mode,p),p.return=v,v=p}return s(v);case Dt:return y=dl(y),E(v,d,y,p)}if(Ra(y))return x(v,d,y,p);if(ja(y)){if(_=ja(y),typeof _!="function")throw Error(z(150));return y=_.call(y),b(v,d,y,p)}if(typeof y.then=="function")return E(v,d,Qn(y),p);if(y.$$typeof===pt)return E(v,d,Xn(v,y),p);Zn(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,d!==null&&d.tag===6?(l(v,d.sibling),p=n(d,y),p.return=v,v=p):(l(v,d),p=Qs(y,v.mode,p),p.return=v,v=p),s(v)):l(v,d)}return function(v,d,y,p){try{rn=0;var _=E(v,d,y,p);return Pl=null,_}catch(j){if(j===ya||j===hs)throw j;var N=De(29,j,null,v.mode);return N.lanes=p,N.return=v,N}finally{}}}var Sl=Bd(!0),Hd=Bd(!1),wt=!1;function Ic(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wu(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 kt(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Kt(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,Y&2){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Ni(e),Ad(e,null,l),t}return ds(e,a,t,l),Ni(e)}function Za(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,td(e,l)}}function Ks(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var s={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=s:i=i.next=s,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Iu=!1;function ka(){if(Iu){var e=Il;if(e!==null)throw e}}function Ka(e,t,l,a){Iu=!1;var n=e.updateQueue;wt=!1;var i=n.firstBaseUpdate,s=n.lastBaseUpdate,u=n.shared.pending;if(u!==null){n.shared.pending=null;var c=u,f=c.next;c.next=null,s===null?i=f:s.next=f,s=c;var h=e.alternate;h!==null&&(h=h.updateQueue,u=h.lastBaseUpdate,u!==s&&(u===null?h.firstBaseUpdate=f:u.next=f,h.lastBaseUpdate=c))}if(i!==null){var m=n.baseState;s=0,h=f=c=null,u=i;do{var o=u.lane&-536870913,g=o!==u.lane;if(g?(L&o)===o:(a&o)===o){o!==0&&o===ia&&(Iu=!0),h!==null&&(h=h.next={lane:0,tag:u.tag,payload:u.payload,callback:null,next:null});e:{var x=e,b=u;o=t;var E=l;switch(b.tag){case 1:if(x=b.payload,typeof x=="function"){m=x.call(E,m,o);break e}m=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=b.payload,o=typeof x=="function"?x.call(E,m,o):x,o==null)break e;m=I({},m,o);break e;case 2:wt=!0}}o=u.callback,o!==null&&(e.flags|=64,g&&(e.flags|=8192),g=n.callbacks,g===null?n.callbacks=[o]:g.push(o))}else g={lane:o,tag:u.tag,payload:u.payload,callback:u.callback,next:null},h===null?(f=h=g,c=m):h=h.next=g,s|=o;if(u=u.next,u===null){if(u=n.shared.pending,u===null)break;g=u,u=g.next,g.next=null,n.lastBaseUpdate=g,n.shared.pending=null}}while(!0);h===null&&(c=m),n.baseState=c,n.firstBaseUpdate=f,n.lastBaseUpdate=h,i===null&&(n.shared.lanes=0),ll|=s,e.lanes=s,e.memoizedState=m}}function Ld(e,t){if(typeof e!="function")throw Error(z(191,e));e.call(t)}function qd(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Ld(l[e],t)}var sa=ct(null),Oi=ct(0);function gf(e,t){e=Mt,$(Oi,e),$(sa,t),Mt=e|t.baseLanes}function Pu(){$(Oi,Mt),$(sa,sa.current)}function Pc(){Mt=Oi.current,he(sa),he(Oi)}var Ye=ct(null),Je=null;function Rt(e){var t=e.alternate;$(le,le.current&1),$(Ye,e),Je===null&&(t===null||sa.current!==null||t.memoizedState!==null)&&(Je=e)}function ec(e){$(le,le.current),$(Ye,e),Je===null&&(Je=e)}function Yd(e){e.tag===22?($(le,le.current),$(Ye,e),Je===null&&(Je=e)):Bt()}function Bt(){$(le,le.current),$(Ye,Ye.current)}function Oe(e){he(Ye),Je===e&&(Je=null),he(le)}var le=ct(0);function Di(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||xc(l)||bc(l)))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)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 Tt=0,U=null,k=null,ne=null,wi=!1,ea=!1,_l=!1,Ui=0,fn=0,ta=null,Bv=0;function ee(){throw Error(z(321))}function er(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!qe(e[l],t[l]))return!1;return!0}function tr(e,t,l,a,n,i){return Tt=i,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?yh:dr,_l=!1,i=l(a,n),_l=!1,ea&&(i=Gd(t,l,a,n)),Vd(e),i}function Vd(e){w.H=on;var t=k!==null&&k.next!==null;if(Tt=0,ne=k=U=null,wi=!1,fn=0,ta=null,t)throw Error(z(300));e===null||ue||(e=e.dependencies,e!==null&&Mi(e)&&(ue=!0))}function Gd(e,t,l,a){U=e;var n=0;do{if(ea&&(ta=null),fn=0,ea=!1,25<=n)throw Error(z(301));if(n+=1,ne=k=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}w.H=ph,i=t(l,a)}while(ea);return i}function Hv(){var e=w.H,t=e.useState()[0];return t=typeof t.then=="function"?Nn(t):t,e=e.useState()[0],(k!==null?k.memoizedState:null)!==e&&(U.flags|=1024),t}function lr(){var e=Ui!==0;return Ui=0,e}function ar(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function nr(e){if(wi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}wi=!1}Tt=0,ne=k=U=null,ea=!1,fn=Ui=0,ta=null}function _e(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ne===null?U.memoizedState=ne=e:ne=ne.next=e,ne}function ae(){if(k===null){var e=U.alternate;e=e!==null?e.memoizedState:null}else e=k.next;var t=ne===null?U.memoizedState:ne.next;if(t!==null)ne=t,k=e;else{if(e===null)throw U.alternate===null?Error(z(467)):Error(z(310));k=e,e={memoizedState:k.memoizedState,baseState:k.baseState,baseQueue:k.baseQueue,queue:k.queue,next:null},ne===null?U.memoizedState=ne=e:ne=ne.next=e}return ne}function ms(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Nn(e){var t=fn;return fn+=1,ta===null&&(ta=[]),e=Rd(ta,e,t),t=U,(ne===null?t.memoizedState:ne.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?yh:dr),e}function vs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Nn(e);if(e.$$typeof===pt)return pe(e)}throw Error(z(438,String(e)))}function ir(e){var t=null,l=U.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=U.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=ms(),U.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=_0;return t.index++,l}function Nt(e,t){return typeof t=="function"?t(e):t}function fi(e){var t=ae();return sr(t,k,e)}function sr(e,t,l){var a=e.queue;if(a===null)throw Error(z(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var s=n.next;n.next=i.next,i.next=s}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var u=s=null,c=null,f=t,h=!1;do{var m=f.lane&-536870913;if(m!==f.lane?(L&m)===m:(Tt&m)===m){var o=f.revertLane;if(o===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),m===ia&&(h=!0);else if((Tt&o)===o){f=f.next,o===ia&&(h=!0);continue}else m={lane:0,revertLane:f.revertLane,gesture:null,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null},c===null?(u=c=m,s=i):c=c.next=m,U.lanes|=o,ll|=o;m=f.action,_l&&l(i,m),i=f.hasEagerState?f.eagerState:l(i,m)}else o={lane:m,revertLane:f.revertLane,gesture:f.gesture,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null},c===null?(u=c=o,s=i):c=c.next=o,U.lanes|=m,ll|=m;f=f.next}while(f!==null&&f!==t);if(c===null?s=i:c.next=u,!qe(i,e.memoizedState)&&(ue=!0,h&&(l=Il,l!==null)))throw l;e.memoizedState=i,e.baseState=s,e.baseQueue=c,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Js(e){var t=ae(),l=t.queue;if(l===null)throw Error(z(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var s=n=n.next;do i=e(i,s.action),s=s.next;while(s!==n);qe(i,t.memoizedState)||(ue=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function Xd(e,t,l){var a=U,n=ae(),i=q;if(i){if(l===void 0)throw Error(z(407));l=l()}else l=t();var s=!qe((k||n).memoizedState,l);if(s&&(n.memoizedState=l,ue=!0),n=n.queue,ur(kd.bind(null,a,n,e),[e]),n.getSnapshot!==t||s||ne!==null&&ne.memoizedState.tag&1){if(a.flags|=2048,ua(9,{destroy:void 0},Zd.bind(null,a,n,l,t),null),J===null)throw Error(z(349));i||Tt&127||Qd(a,t,l)}return l}function Qd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=U.updateQueue,t===null?(t=ms(),U.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Zd(e,t,l,a){t.value=l,t.getSnapshot=a,Kd(t)&&Jd(e)}function kd(e,t,l){return l(function(){Kd(t)&&Jd(e)})}function Kd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!qe(e,l)}catch{return!0}}function Jd(e){var t=Al(e,2);t!==null&&Ne(t,e,2)}function tc(e){var t=_e();if(typeof e=="function"){var l=e;if(e=l(),_l){Lt(!0);try{l()}finally{Lt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nt,lastRenderedState:e},t}function $d(e,t,l,a){return e.baseState=l,sr(e,k,typeof a=="function"?a:Nt)}function Lv(e,t,l,a,n){if(ys(e))throw Error(z(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){i.listeners.push(s)}};w.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,Fd(t,i)):(i.next=l.next,t.pending=l.next=i)}}function Fd(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=w.T,s={};w.T=s;try{var u=l(n,a),c=w.S;c!==null&&c(s,u),yf(e,t,u)}catch(f){lc(e,t,f)}finally{i!==null&&s.types!==null&&(i.types=s.types),w.T=i}}else try{i=l(n,a),yf(e,t,i)}catch(f){lc(e,t,f)}}function yf(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){pf(e,t,a)},function(a){return lc(e,t,a)}):pf(e,t,l)}function pf(e,t,l){t.status="fulfilled",t.value=l,Wd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Fd(e,l)))}function lc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Wd(t),t=t.next;while(t!==a)}e.action=null}function Wd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Id(e,t){return t}function xf(e,t){if(q){var l=J.formState;if(l!==null){e:{var a=U;if(q){if(W){t:{for(var n=W,i=Ke;n.nodeType!==8;){if(!i){n=null;break t}if(n=$e(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){W=$e(n.nextSibling),a=n.data==="F!";break e}}el(a)}a=!1}a&&(t=l[0])}}return l=_e(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Id,lastRenderedState:t},l.queue=a,l=mh.bind(null,U,a),a.dispatch=l,a=tc(!1),i=or.bind(null,U,!1,a.queue),a=_e(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=Lv.bind(null,U,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function bf(e){var t=ae();return Pd(t,k,e)}function Pd(e,t,l){if(t=sr(e,t,Id)[0],e=fi(Nt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Nn(t)}catch(s){throw s===ya?hs:s}else a=t;t=ae();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(U.flags|=2048,ua(9,{destroy:void 0},qv.bind(null,n,l),null)),[a,i,e]}function qv(e,t){e.action=t}function Sf(e){var t=ae(),l=k;if(l!==null)return Pd(t,l,e);ae(),t=t.memoizedState,l=ae();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function ua(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=U.updateQueue,t===null&&(t=ms(),U.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function eh(){return ae().memoizedState}function oi(e,t,l,a){var n=_e();U.flags|=e,n.memoizedState=ua(1|t,{destroy:void 0},l,a===void 0?null:a)}function gs(e,t,l,a){var n=ae();a=a===void 0?null:a;var i=n.memoizedState.inst;k!==null&&a!==null&&er(a,k.memoizedState.deps)?n.memoizedState=ua(t,i,l,a):(U.flags|=e,n.memoizedState=ua(1|t,i,l,a))}function _f(e,t){oi(8390656,8,e,t)}function ur(e,t){gs(2048,8,e,t)}function Yv(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=ms(),U.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function th(e){var t=ae().memoizedState;return Yv({ref:t,nextImpl:e}),function(){if(Y&2)throw Error(z(440));return t.impl.apply(void 0,arguments)}}function lh(e,t){return gs(4,2,e,t)}function ah(e,t){return gs(4,4,e,t)}function nh(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ih(e,t,l){l=l!=null?l.concat([e]):null,gs(4,4,nh.bind(null,t,e),l)}function cr(){}function sh(e,t){var l=ae();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&er(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function uh(e,t){var l=ae();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&er(t,a[1]))return a[0];if(a=e(),_l){Lt(!0);try{e()}finally{Lt(!1)}}return l.memoizedState=[a,t],a}function rr(e,t,l){return l===void 0||Tt&1073741824&&!(L&261930)?e.memoizedState=t:(e.memoizedState=l,e=$h(),U.lanes|=e,ll|=e,l)}function ch(e,t,l,a){return qe(l,t)?l:sa.current!==null?(e=rr(e,l,a),qe(e,t)||(ue=!0),e):!(Tt&42)||Tt&1073741824&&!(L&261930)?(ue=!0,e.memoizedState=l):(e=$h(),U.lanes|=e,ll|=e,t)}function rh(e,t,l,a,n){var i=V.p;V.p=i!==0&&8>i?i:8;var s=w.T,u={};w.T=u,or(e,!1,t,l);try{var c=n(),f=w.S;if(f!==null&&f(u,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var h=Rv(c,a);Ja(e,t,h,Le(e))}else Ja(e,t,a,Le(e))}catch(m){Ja(e,t,{then:function(){},status:"rejected",reason:m},Le())}finally{V.p=i,s!==null&&u.types!==null&&(s.types=u.types),w.T=s}}function Vv(){}function ac(e,t,l,a){if(e.tag!==5)throw Error(z(476));var n=fh(e).queue;rh(e,n,t,ml,l===null?Vv:function(){return oh(e),l(a)})}function fh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ml,baseState:ml,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nt,lastRenderedState:ml},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nt,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function oh(e){var t=fh(e);t.next===null&&(t=e.alternate.memoizedState),Ja(e,t.next.queue,{},Le())}function fr(){return pe(mn)}function dh(){return ae().memoizedState}function hh(){return ae().memoizedState}function Gv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Le();e=kt(l);var a=Kt(t,e,l);a!==null&&(Ne(a,t,l),Za(a,t,l)),t={cache:$c()},e.payload=t;return}t=t.return}}function Xv(e,t,l){var a=Le();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ys(e)?vh(t,l):(l=Zc(e,t,l,a),l!==null&&(Ne(l,e,a),gh(l,t,a)))}function mh(e,t,l){var a=Le();Ja(e,t,l,a)}function Ja(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ys(e))vh(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,u=i(s,l);if(n.hasEagerState=!0,n.eagerState=u,qe(u,s))return ds(e,t,n,0),J===null&&os(),!1}catch{}finally{}if(l=Zc(e,t,n,a),l!==null)return Ne(l,e,a),gh(l,t,a),!0}return!1}function or(e,t,l,a){if(a={lane:2,revertLane:br(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ys(e)){if(t)throw Error(z(479))}else t=Zc(e,l,a,2),t!==null&&Ne(t,e,2)}function ys(e){var t=e.alternate;return e===U||t!==null&&t===U}function vh(e,t){ea=wi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function gh(e,t,l){if(l&4194048){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,td(e,l)}}var on={readContext:pe,use:vs,useCallback:ee,useContext:ee,useEffect:ee,useImperativeHandle:ee,useLayoutEffect:ee,useInsertionEffect:ee,useMemo:ee,useReducer:ee,useRef:ee,useState:ee,useDebugValue:ee,useDeferredValue:ee,useTransition:ee,useSyncExternalStore:ee,useId:ee,useHostTransitionStatus:ee,useFormState:ee,useActionState:ee,useOptimistic:ee,useMemoCache:ee,useCacheRefresh:ee};on.useEffectEvent=ee;var yh={readContext:pe,use:vs,useCallback:function(e,t){return _e().memoizedState=[e,t===void 0?null:t],e},useContext:pe,useEffect:_f,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,oi(4194308,4,nh.bind(null,t,e),l)},useLayoutEffect:function(e,t){return oi(4194308,4,e,t)},useInsertionEffect:function(e,t){oi(4,2,e,t)},useMemo:function(e,t){var l=_e();t=t===void 0?null:t;var a=e();if(_l){Lt(!0);try{e()}finally{Lt(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=_e();if(l!==void 0){var n=l(t);if(_l){Lt(!0);try{l(t)}finally{Lt(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Xv.bind(null,U,e),[a.memoizedState,e]},useRef:function(e){var t=_e();return e={current:e},t.memoizedState=e},useState:function(e){e=tc(e);var t=e.queue,l=mh.bind(null,U,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:cr,useDeferredValue:function(e,t){var l=_e();return rr(l,e,t)},useTransition:function(){var e=tc(!1);return e=rh.bind(null,U,e.queue,!0,!1),_e().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=U,n=_e();if(q){if(l===void 0)throw Error(z(407));l=l()}else{if(l=t(),J===null)throw Error(z(349));L&127||Qd(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,_f(kd.bind(null,a,i,e),[e]),a.flags|=2048,ua(9,{destroy:void 0},Zd.bind(null,a,i,l,t),null),l},useId:function(){var e=_e(),t=J.identifierPrefix;if(q){var l=it,a=nt;l=(a&~(1<<32-He(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ui++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Bv++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:fr,useFormState:xf,useActionState:xf,useOptimistic:function(e){var t=_e();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=or.bind(null,U,!0,l),l.dispatch=t,[e,t]},useMemoCache:ir,useCacheRefresh:function(){return _e().memoizedState=Gv.bind(null,U)},useEffectEvent:function(e){var t=_e(),l={impl:e};return t.memoizedState=l,function(){if(Y&2)throw Error(z(440));return l.impl.apply(void 0,arguments)}}},dr={readContext:pe,use:vs,useCallback:sh,useContext:pe,useEffect:ur,useImperativeHandle:ih,useInsertionEffect:lh,useLayoutEffect:ah,useMemo:uh,useReducer:fi,useRef:eh,useState:function(){return fi(Nt)},useDebugValue:cr,useDeferredValue:function(e,t){var l=ae();return ch(l,k.memoizedState,e,t)},useTransition:function(){var e=fi(Nt)[0],t=ae().memoizedState;return[typeof e=="boolean"?e:Nn(e),t]},useSyncExternalStore:Xd,useId:dh,useHostTransitionStatus:fr,useFormState:bf,useActionState:bf,useOptimistic:function(e,t){var l=ae();return $d(l,k,e,t)},useMemoCache:ir,useCacheRefresh:hh};dr.useEffectEvent=th;var ph={readContext:pe,use:vs,useCallback:sh,useContext:pe,useEffect:ur,useImperativeHandle:ih,useInsertionEffect:lh,useLayoutEffect:ah,useMemo:uh,useReducer:Js,useRef:eh,useState:function(){return Js(Nt)},useDebugValue:cr,useDeferredValue:function(e,t){var l=ae();return k===null?rr(l,e,t):ch(l,k.memoizedState,e,t)},useTransition:function(){var e=Js(Nt)[0],t=ae().memoizedState;return[typeof e=="boolean"?e:Nn(e),t]},useSyncExternalStore:Xd,useId:dh,useHostTransitionStatus:fr,useFormState:Sf,useActionState:Sf,useOptimistic:function(e,t){var l=ae();return k!==null?$d(l,k,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:ir,useCacheRefresh:hh};ph.useEffectEvent=th;function $s(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:I({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var nc={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Le(),n=kt(a);n.payload=t,l!=null&&(n.callback=l),t=Kt(e,n,a),t!==null&&(Ne(t,e,a),Za(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Le(),n=kt(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Kt(e,n,a),t!==null&&(Ne(t,e,a),Za(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Le(),a=kt(l);a.tag=2,t!=null&&(a.callback=t),t=Kt(e,a,l),t!==null&&(Ne(t,e,l),Za(t,e,l))}};function Ef(e,t,l,a,n,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,s):t.prototype&&t.prototype.isPureReactComponent?!sn(l,a)||!sn(n,i):!0}function zf(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&nc.enqueueReplaceState(t,t.state,null)}function El(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=I({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function xh(e){Ti(e)}function bh(e){console.error(e)}function Sh(e){Ti(e)}function Ri(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function jf(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function ic(e,t,l){return l=kt(l),l.tag=3,l.payload={element:null},l.callback=function(){Ri(e,t)},l}function _h(e){return e=kt(e),e.tag=3,e}function Eh(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){jf(t,l,a)}}var s=l.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){jf(t,l,a),typeof n!="function"&&(Jt===null?Jt=new Set([this]):Jt.add(this));var u=a.stack;this.componentDidCatch(a.value,{componentStack:u!==null?u:""})})}function Qv(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&ga(t,l,n,!0),l=Ye.current,l!==null){switch(l.tag){case 31:case 13:return Je===null?Yi():l.alternate===null&&te===0&&(te=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===Ci?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),su(e,a,n)),!1;case 22:return l.flags|=65536,a===Ci?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),su(e,a,n)),!1}throw Error(z(435,l.tag))}return su(e,a,n),Yi(),!1}if(q)return t=Ye.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==ku&&(e=Error(z(422),{cause:a}),cn(ke(e,l)))):(a!==ku&&(t=Error(z(423),{cause:a}),cn(ke(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=ke(a,l),n=ic(e.stateNode,a,n),Ks(e,n),te!==4&&(te=2)),!1;var i=Error(z(520),{cause:a});if(i=ke(i,l),Wa===null?Wa=[i]:Wa.push(i),te!==4&&(te=2),t===null)return!0;a=ke(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=ic(l.stateNode,a,e),Ks(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Jt===null||!Jt.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=_h(n),Eh(n,e,l,a),Ks(l,n),!1}l=l.return}while(l!==null);return!1}var hr=Error(z(461)),ue=!1;function ve(e,t,l,a){t.child=e===null?Hd(t,null,l,a):Sl(t,e.child,l,a)}function Tf(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var s={};for(var u in a)u!=="ref"&&(s[u]=a[u])}else s=a;return bl(t),a=tr(e,t,l,s,i,n),u=lr(),e!==null&&!ue?(ar(e,t,n),At(e,t,n)):(q&&u&&Kc(t),t.flags|=1,ve(e,t,a,n),t.child)}function Nf(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!kc(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,zh(e,t,i,a,n)):(e=ci(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!mr(e,n)){var s=i.memoizedProps;if(l=l.compare,l=l!==null?l:sn,l(s,a)&&e.ref===t.ref)return At(e,t,n)}return t.flags|=1,e=St(i,a),e.ref=t.ref,e.return=t,t.child=e}function zh(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(sn(i,a)&&e.ref===t.ref)if(ue=!1,t.pendingProps=a=i,mr(e,n))e.flags&131072&&(ue=!0);else return t.lanes=e.lanes,At(e,t,n)}return sc(e,t,l,a,n)}function jh(e,t,l,a){var n=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,t.child=null;return Af(e,t,i,l,a)}if(l&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ri(t,i!==null?i.cachePool:null),i!==null?gf(t,i):Pu(),Yd(t);else return a=t.lanes=536870912,Af(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(ri(t,i.cachePool),gf(t,i),Bt(),t.memoizedState=null):(e!==null&&ri(t,null),Pu(),Bt());return ve(e,t,n,l),t.child}function Ha(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Af(e,t,l,a,n){var i=Fc();return i=i===null?null:{parent:se._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&ri(t,null),Pu(),Yd(t),e!==null&&ga(e,t,a,!0),t.childLanes=n,null}function di(e,t){return t=Bi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Mf(e,t,l){return Sl(t,e.child,null,l),e=di(t,t.pendingProps),e.flags|=2,Oe(t),t.memoizedState=null,e}function Zv(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(q){if(a.mode==="hidden")return e=di(t,a),t.lanes=536870912,Ha(null,e);if(ec(t),(e=W)?(e=ym(e,Ke),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pt!==null?{id:nt,overflow:it}:null,retryLane:536870912,hydrationErrors:null},l=Cd(e),l.return=t,t.child=l,ye=t,W=null)):e=null,e===null)throw el(t);return t.lanes=536870912,null}return di(t,a)}var i=e.memoizedState;if(i!==null){var s=i.dehydrated;if(ec(t),n)if(t.flags&256)t.flags&=-257,t=Mf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(z(558));else if(ue||ga(e,t,l,!1),n=(l&e.childLanes)!==0,ue||n){if(a=J,a!==null&&(s=ld(a,l),s!==0&&s!==i.retryLane))throw i.retryLane=s,Al(e,s),Ne(a,e,s),hr;Yi(),t=Mf(e,t,l)}else e=i.treeContext,W=$e(s.nextSibling),ye=t,q=!0,Zt=null,Ke=!1,e!==null&&Dd(t,e),t=di(t,a),t.flags|=4096;return t}return e=St(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hi(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(z(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function sc(e,t,l,a,n){return bl(t),l=tr(e,t,l,a,void 0,n),a=lr(),e!==null&&!ue?(ar(e,t,n),At(e,t,n)):(q&&a&&Kc(t),t.flags|=1,ve(e,t,l,n),t.child)}function Cf(e,t,l,a,n,i){return bl(t),t.updateQueue=null,l=Gd(t,a,l,n),Vd(e),a=lr(),e!==null&&!ue?(ar(e,t,i),At(e,t,i)):(q&&a&&Kc(t),t.flags|=1,ve(e,t,l,i),t.child)}function Of(e,t,l,a,n){if(bl(t),t.stateNode===null){var i=Zl,s=l.contextType;typeof s=="object"&&s!==null&&(i=pe(s)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=nc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Ic(t),s=l.contextType,i.context=typeof s=="object"&&s!==null?pe(s):Zl,i.state=t.memoizedState,s=l.getDerivedStateFromProps,typeof s=="function"&&($s(t,l,s,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(s=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),s!==i.state&&nc.enqueueReplaceState(i,i.state,null),Ka(t,a,i,n),ka(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var u=t.memoizedProps,c=El(l,u);i.props=c;var f=i.context,h=l.contextType;s=Zl,typeof h=="object"&&h!==null&&(s=pe(h));var m=l.getDerivedStateFromProps;h=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function",u=t.pendingProps!==u,h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u||f!==s)&&zf(t,i,a,s),wt=!1;var o=t.memoizedState;i.state=o,Ka(t,a,i,n),ka(),f=t.memoizedState,u||o!==f||wt?(typeof m=="function"&&($s(t,l,m,a),f=t.memoizedState),(c=wt||Ef(t,l,c,a,o,f,s))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=f),i.props=a,i.state=f,i.context=s,a=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Wu(e,t),s=t.memoizedProps,h=El(l,s),i.props=h,m=t.pendingProps,o=i.context,f=l.contextType,c=Zl,typeof f=="object"&&f!==null&&(c=pe(f)),u=l.getDerivedStateFromProps,(f=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==m||o!==c)&&zf(t,i,a,c),wt=!1,o=t.memoizedState,i.state=o,Ka(t,a,i,n),ka();var g=t.memoizedState;s!==m||o!==g||wt||e!==null&&e.dependencies!==null&&Mi(e.dependencies)?(typeof u=="function"&&($s(t,l,u,a),g=t.memoizedState),(h=wt||Ef(t,l,h,a,o,g,c)||e!==null&&e.dependencies!==null&&Mi(e.dependencies))?(f||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,g,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,g,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&o===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&o===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=g),i.props=a,i.state=g,i.context=c,a=h):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&o===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&o===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,hi(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Sl(t,e.child,null,n),t.child=Sl(t,null,l,n)):ve(e,t,l,n),t.memoizedState=i.state,e=t.child):e=At(e,t,n),e}function Df(e,t,l,a){return xl(),t.flags|=256,ve(e,t,l,a),t.child}var Fs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ws(e){return{baseLanes:e,cachePool:Ud()}}function Is(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=we),e}function Th(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(le.current&2)!==0),s&&(n=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(q){if(n?Rt(t):Bt(),(e=W)?(e=ym(e,Ke),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pt!==null?{id:nt,overflow:it}:null,retryLane:536870912,hydrationErrors:null},l=Cd(e),l.return=t,t.child=l,ye=t,W=null)):e=null,e===null)throw el(t);return bc(e)?t.lanes=32:t.lanes=536870912,null}var u=a.children;return a=a.fallback,n?(Bt(),n=t.mode,u=Bi({mode:"hidden",children:u},n),a=vl(a,n,l,null),u.return=t,a.return=t,u.sibling=a,t.child=u,a=t.child,a.memoizedState=Ws(l),a.childLanes=Is(e,s,l),t.memoizedState=Fs,Ha(null,a)):(Rt(t),uc(t,u))}var c=e.memoizedState;if(c!==null&&(u=c.dehydrated,u!==null)){if(i)t.flags&256?(Rt(t),t.flags&=-257,t=Ps(e,t,l)):t.memoizedState!==null?(Bt(),t.child=e.child,t.flags|=128,t=null):(Bt(),u=a.fallback,n=t.mode,a=Bi({mode:"visible",children:a.children},n),u=vl(u,n,l,null),u.flags|=2,a.return=t,u.return=t,a.sibling=u,t.child=a,Sl(t,e.child,null,l),a=t.child,a.memoizedState=Ws(l),a.childLanes=Is(e,s,l),t.memoizedState=Fs,t=Ha(null,a));else if(Rt(t),bc(u)){if(s=u.nextSibling&&u.nextSibling.dataset,s)var f=s.dgst;s=f,a=Error(z(419)),a.stack="",a.digest=s,cn({value:a,source:null,stack:null}),t=Ps(e,t,l)}else if(ue||ga(e,t,l,!1),s=(l&e.childLanes)!==0,ue||s){if(s=J,s!==null&&(a=ld(s,l),a!==0&&a!==c.retryLane))throw c.retryLane=a,Al(e,a),Ne(s,e,a),hr;xc(u)||Yi(),t=Ps(e,t,l)}else xc(u)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,W=$e(u.nextSibling),ye=t,q=!0,Zt=null,Ke=!1,e!==null&&Dd(t,e),t=uc(t,a.children),t.flags|=4096);return t}return n?(Bt(),u=a.fallback,n=t.mode,c=e.child,f=c.sibling,a=St(c,{mode:"hidden",children:a.children}),a.subtreeFlags=c.subtreeFlags&65011712,f!==null?u=St(f,u):(u=vl(u,n,l,null),u.flags|=2),u.return=t,a.return=t,a.sibling=u,t.child=a,Ha(null,a),a=t.child,u=e.child.memoizedState,u===null?u=Ws(l):(n=u.cachePool,n!==null?(c=se._currentValue,n=n.parent!==c?{parent:c,pool:c}:n):n=Ud(),u={baseLanes:u.baseLanes|l,cachePool:n}),a.memoizedState=u,a.childLanes=Is(e,s,l),t.memoizedState=Fs,Ha(e.child,a)):(Rt(t),l=e.child,e=l.sibling,l=St(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=l,t.memoizedState=null,l)}function uc(e,t){return t=Bi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bi(e,t){return e=De(22,e,null,t),e.lanes=0,e}function Ps(e,t,l){return Sl(t,e.child,null,l),e=uc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Ju(e.return,t,l)}function eu(e,t,l,a,n,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=a,s.tail=l,s.tailMode=n,s.treeForkCount=i)}function Nh(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var s=le.current,u=(s&2)!==0;if(u?(s=s&1|2,t.flags|=128):s&=1,$(le,s),ve(e,t,a,l),a=q?un:0,!u&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wf(e,l,t);else if(e.tag===19)wf(e,l,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(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&Di(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),eu(t,!1,n,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Di(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}eu(t,!0,l,null,i,a);break;case"together":eu(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function At(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),ll|=t.lanes,!(l&t.childLanes))if(e!==null){if(ga(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(z(153));if(t.child!==null){for(e=t.child,l=St(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=St(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function mr(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Mi(e)))}function kv(e,t,l){switch(t.tag){case 3:_i(t,t.stateNode.containerInfo),Ut(t,se,e.memoizedState.cache),xl();break;case 27:case 5:Ru(t);break;case 4:_i(t,t.stateNode.containerInfo);break;case 10:Ut(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ec(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Rt(t),t.flags|=128,null):l&t.child.childLanes?Th(e,t,l):(Rt(t),e=At(e,t,l),e!==null?e.sibling:null);Rt(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(ga(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return Nh(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),$(le,le.current),a)break;return null;case 22:return t.lanes=0,jh(e,t,l,t.pendingProps);case 24:Ut(t,se,e.memoizedState.cache)}return At(e,t,l)}function Ah(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ue=!0;else{if(!mr(e,l)&&!(t.flags&128))return ue=!1,kv(e,t,l);ue=!!(e.flags&131072)}else ue=!1,q&&t.flags&1048576&&Od(t,un,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=dl(t.elementType),t.type=e,typeof e=="function")kc(e)?(a=El(e,a),t.tag=1,t=Of(null,t,e,a,l)):(t.tag=0,t=sc(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===Dc){t.tag=11,t=Tf(null,t,e,a,l);break e}else if(n===wc){t.tag=14,t=Nf(null,t,e,a,l);break e}}throw t=wu(e)||e,Error(z(306,t,""))}}return t;case 0:return sc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=El(a,t.pendingProps),Of(e,t,a,n,l);case 3:e:{if(_i(t,t.stateNode.containerInfo),e===null)throw Error(z(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,Wu(e,t),Ka(t,a,null,l);var s=t.memoizedState;if(a=s.cache,Ut(t,se,a),a!==i.cache&&$u(t,[se],l,!0),ka(),a=s.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Df(e,t,a,l);break e}else if(a!==n){n=ke(Error(z(424)),t),cn(n),t=Df(e,t,a,l);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(W=$e(e.firstChild),ye=t,q=!0,Zt=null,Ke=!0,l=Hd(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(xl(),a===n){t=At(e,t,l);break e}ve(e,t,a,l)}t=t.child}return t;case 26:return hi(e,t),e===null?(l=Pf(t.type,null,t.pendingProps,null))?t.memoizedState=l:q||(l=t.type,e=t.pendingProps,a=Qi(Qt.current).createElement(l),a[ge]=t,a[Ae]=e,xe(a,l,e),de(a),t.stateNode=a):t.memoizedState=Pf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ru(t),e===null&&q&&(a=t.stateNode=pm(t.type,t.pendingProps,Qt.current),ye=t,Ke=!0,n=W,il(t.type)?(Sc=n,W=$e(a.firstChild)):W=n),ve(e,t,t.pendingProps.children,l),hi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&q&&((n=a=W)&&(a=_g(a,t.type,t.pendingProps,Ke),a!==null?(t.stateNode=a,ye=t,W=$e(a.firstChild),Ke=!1,n=!0):n=!1),n||el(t)),Ru(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,yc(n,i)?a=null:s!==null&&yc(n,s)&&(t.flags|=32),t.memoizedState!==null&&(n=tr(e,t,Hv,null,null,l),mn._currentValue=n),hi(e,t),ve(e,t,a,l),t.child;case 6:return e===null&&q&&((e=l=W)&&(l=Eg(l,t.pendingProps,Ke),l!==null?(t.stateNode=l,ye=t,W=null,e=!0):e=!1),e||el(t)),null;case 13:return Th(e,t,l);case 4:return _i(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Sl(t,null,a,l):ve(e,t,a,l),t.child;case 11:return Tf(e,t,t.type,t.pendingProps,l);case 7:return ve(e,t,t.pendingProps,l),t.child;case 8:return ve(e,t,t.pendingProps.children,l),t.child;case 12:return ve(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Ut(t,t.type,a.value),ve(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,bl(t),n=pe(n),a=a(n),t.flags|=1,ve(e,t,a,l),t.child;case 14:return Nf(e,t,t.type,t.pendingProps,l);case 15:return zh(e,t,t.type,t.pendingProps,l);case 19:return Nh(e,t,l);case 31:return Zv(e,t,l);case 22:return jh(e,t,l,t.pendingProps);case 24:return bl(t),a=pe(se),e===null?(n=Fc(),n===null&&(n=J,i=$c(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},Ic(t),Ut(t,se,n)):(e.lanes&l&&(Wu(e,t),Ka(t,null,null,l),ka()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Ut(t,se,a)):(a=i.cache,Ut(t,se,a),a!==n.cache&&$u(t,[se],l,!0))),ve(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(z(156,t.tag))}function ot(e){e.flags|=4}function tu(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Ih())e.flags|=8192;else throw yl=Ci,Wc}else e.flags&=-16777217}function Uf(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Sm(t))if(Ih())e.flags|=8192;else throw yl=Ci,Wc}function kn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Po():536870912,e.lanes|=t,ca|=t)}function Ma(e,t){if(!q)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function F(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Kv(e,t,l){var a=t.pendingProps;switch(Jc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return F(t),null;case 1:return F(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),_t(se),la(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ol(t)?ot(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ks())),F(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(ot(t),i!==null?(F(t),Uf(t,i)):(F(t),tu(t,n,null,a,l))):i?i!==e.memoizedState?(ot(t),F(t),Uf(t,i)):(F(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ot(t),F(t),tu(t,n,e,a,l)),null;case 27:if(Ei(t),l=Qt.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ot(t);else{if(!a){if(t.stateNode===null)throw Error(z(166));return F(t),null}e=ut.current,Ol(t)?rf(t):(e=pm(n,a,l),t.stateNode=e,ot(t))}return F(t),null;case 5:if(Ei(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ot(t);else{if(!a){if(t.stateNode===null)throw Error(z(166));return F(t),null}if(i=ut.current,Ol(t))rf(t);else{var s=Qi(Qt.current);switch(i){case 1:i=s.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=s.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=s.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?s.createElement(n,{is:a.is}):s.createElement(n)}}i[ge]=t,i[Ae]=a;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)i.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(xe(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ot(t)}}return F(t),tu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ot(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(z(166));if(e=Qt.current,Ol(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=ye,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[ge]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||mm(e.nodeValue,l)),e||el(t,!0)}else e=Qi(e).createTextNode(a),e[ge]=t,t.stateNode=e}return F(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ol(t),l!==null){if(e===null){if(!a)throw Error(z(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(557));e[ge]=t}else xl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;F(t),e=!1}else l=ks(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Oe(t),t):(Oe(t),null);if(t.flags&128)throw Error(z(558))}return F(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ol(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(z(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(z(317));n[ge]=t}else xl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;F(t),n=!1}else n=ks(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Oe(t),t):(Oe(t),null)}return Oe(t),t.flags&128?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),kn(t,t.updateQueue),F(t),null);case 4:return la(),e===null&&Sr(t.stateNode.containerInfo),F(t),null;case 10:return _t(t.type),F(t),null;case 19:if(he(le),a=t.memoizedState,a===null)return F(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)Ma(a,!1);else{if(te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Di(e),i!==null){for(t.flags|=128,Ma(a,!1),e=i.updateQueue,t.updateQueue=e,kn(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Md(l,e),l=l.sibling;return $(le,le.current&1|2),q&&vt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Re()>Li&&(t.flags|=128,n=!0,Ma(a,!1),t.lanes=4194304)}else{if(!n)if(e=Di(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,kn(t,e),Ma(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!q)return F(t),null}else 2*Re()-a.renderingStartTime>Li&&l!==536870912&&(t.flags|=128,n=!0,Ma(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Re(),e.sibling=null,l=le.current,$(le,n?l&1|2:l&1),q&&vt(t,a.treeForkCount),e):(F(t),null);case 22:case 23:return Oe(t),Pc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?l&536870912&&!(t.flags&128)&&(F(t),t.subtreeFlags&6&&(t.flags|=8192)):F(t),l=t.updateQueue,l!==null&&kn(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&he(gl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),_t(se),F(t),null;case 25:return null;case 30:return null}throw Error(z(156,t.tag))}function Jv(e,t){switch(Jc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _t(se),la(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ei(t),null;case 31:if(t.memoizedState!==null){if(Oe(t),t.alternate===null)throw Error(z(340));xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Oe(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return he(le),null;case 4:return la(),null;case 10:return _t(t.type),null;case 22:case 23:return Oe(t),Pc(),e!==null&&he(gl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return _t(se),null;case 25:return null;default:return null}}function Mh(e,t){switch(Jc(t),t.tag){case 3:_t(se),la();break;case 26:case 27:case 5:Ei(t);break;case 4:la();break;case 31:t.memoizedState!==null&&Oe(t);break;case 13:Oe(t);break;case 19:he(le);break;case 10:_t(t.type);break;case 22:case 23:Oe(t),Pc(),e!==null&&he(gl);break;case 24:_t(se)}}function An(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var i=l.create,s=l.inst;a=i(),s.destroy=a}l=l.next}while(l!==n)}}catch(u){Q(t,t.return,u)}}function tl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){var s=a.inst,u=s.destroy;if(u!==void 0){s.destroy=void 0,n=t;var c=l,f=u;try{f()}catch(h){Q(n,c,h)}}}a=a.next}while(a!==i)}}catch(h){Q(t,t.return,h)}}function Ch(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{qd(t,l)}catch(a){Q(e,e.return,a)}}}function Oh(e,t,l){l.props=El(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Q(e,t,a)}}function $a(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){Q(e,t,n)}}function st(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Q(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Q(e,t,n)}else l.current=null}function Dh(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){Q(e,e.return,n)}}function lu(e,t,l){try{var a=e.stateNode;gg(a,e.type,l,t),a[Ae]=t}catch(n){Q(e,e.return,n)}}function wh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&il(e.type)||e.tag===4}function au(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wh(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&&il(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 cc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=xt));else if(a!==4&&(a===27&&il(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(cc(e,t,l),e=e.sibling;e!==null;)cc(e,t,l),e=e.sibling}function Hi(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&il(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Hi(e,t,l),e=e.sibling;e!==null;)Hi(e,t,l),e=e.sibling}function Uh(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);xe(t,a,l),t[ge]=e,t[Ae]=l}catch(i){Q(e,e.return,i)}}var yt=!1,ie=!1,nu=!1,Rf=typeof WeakSet=="function"?WeakSet:Set,oe=null;function $v(e,t){if(e=e.containerInfo,vc=Ji,e=Sd(e),Xc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var s=0,u=-1,c=-1,f=0,h=0,m=e,o=null;t:for(;;){for(var g;m!==l||n!==0&&m.nodeType!==3||(u=s+n),m!==i||a!==0&&m.nodeType!==3||(c=s+a),m.nodeType===3&&(s+=m.nodeValue.length),(g=m.firstChild)!==null;)o=m,m=g;for(;;){if(m===e)break t;if(o===l&&++f===n&&(u=s),o===i&&++h===a&&(c=s),(g=m.nextSibling)!==null)break;m=o,o=m.parentNode}m=g}l=u===-1||c===-1?null:{start:u,end:c}}else l=null}l=l||{start:0,end:0}}else l=null;for(gc={focusedElem:e,selectionRange:l},Ji=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){switch(t=oe,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,l=t,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var x=El(l.type,n);e=a.getSnapshotBeforeUpdate(x,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(b){Q(l,l.return,b)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)pc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(z(163))}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}}function Rh(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ht(e,l),a&4&&An(5,l);break;case 1:if(ht(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(s){Q(l,l.return,s)}else{var n=El(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){Q(l,l.return,s)}}a&64&&Ch(l),a&512&&$a(l,l.return);break;case 3:if(ht(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{qd(e,t)}catch(s){Q(l,l.return,s)}}break;case 27:t===null&&a&4&&Uh(l);case 26:case 5:ht(e,l),t===null&&a&4&&Dh(l),a&512&&$a(l,l.return);break;case 12:ht(e,l);break;case 31:ht(e,l),a&4&&Lh(e,l);break;case 13:ht(e,l),a&4&&qh(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=ng.bind(null,l),zg(e,l))));break;case 22:if(a=l.memoizedState!==null||yt,!a){t=t!==null&&t.memoizedState!==null||ie,n=yt;var i=ie;yt=a,(ie=t)&&!i?mt(e,l,(l.subtreeFlags&8772)!==0):ht(e,l),yt=n,ie=i}break;case 30:break;default:ht(e,l)}}function Bh(e){var t=e.alternate;t!==null&&(e.alternate=null,Bh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Hc(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 P=null,je=!1;function dt(e,t,l){for(l=l.child;l!==null;)Hh(e,t,l),l=l.sibling}function Hh(e,t,l){if(Be&&typeof Be.onCommitFiberUnmount=="function")try{Be.onCommitFiberUnmount(Sn,l)}catch{}switch(l.tag){case 26:ie||st(l,t),dt(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ie||st(l,t);var a=P,n=je;il(l.type)&&(P=l.stateNode,je=!1),dt(e,t,l),Pa(l.stateNode),P=a,je=n;break;case 5:ie||st(l,t);case 6:if(a=P,n=je,P=null,dt(e,t,l),P=a,je=n,P!==null)if(je)try{(P.nodeType===9?P.body:P.nodeName==="HTML"?P.ownerDocument.body:P).removeChild(l.stateNode)}catch(i){Q(l,t,i)}else try{P.removeChild(l.stateNode)}catch(i){Q(l,t,i)}break;case 18:P!==null&&(je?(e=P,Jf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),da(e)):Jf(P,l.stateNode));break;case 4:a=P,n=je,P=l.stateNode.containerInfo,je=!0,dt(e,t,l),P=a,je=n;break;case 0:case 11:case 14:case 15:tl(2,l,t),ie||tl(4,l,t),dt(e,t,l);break;case 1:ie||(st(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Oh(l,t,a)),dt(e,t,l);break;case 21:dt(e,t,l);break;case 22:ie=(a=ie)||l.memoizedState!==null,dt(e,t,l),ie=a;break;default:dt(e,t,l)}}function Lh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{da(e)}catch(l){Q(t,t.return,l)}}}function qh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{da(e)}catch(l){Q(t,t.return,l)}}function Fv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Rf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Rf),t;default:throw Error(z(435,e.tag))}}function Kn(e,t){var l=Fv(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=ig.bind(null,e,a);a.then(n,n)}})}function Ee(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,s=t,u=s;e:for(;u!==null;){switch(u.tag){case 27:if(il(u.type)){P=u.stateNode,je=!1;break e}break;case 5:P=u.stateNode,je=!1;break e;case 3:case 4:P=u.stateNode.containerInfo,je=!0;break e}u=u.return}if(P===null)throw Error(z(160));Hh(i,s,n),P=null,je=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Yh(t,e),t=t.sibling}var tt=null;function Yh(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ee(t,e),ze(e),a&4&&(tl(3,e,e.return),An(3,e),tl(5,e,e.return));break;case 1:Ee(t,e),ze(e),a&512&&(ie||l===null||st(l,l.return)),a&64&&yt&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=tt;if(Ee(t,e),ze(e),a&512&&(ie||l===null||st(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":i=n.getElementsByTagName("title")[0],(!i||i[zn]||i[ge]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),xe(i,a,l),i[ge]=e,de(i),a=i;break e;case"link":var s=to("link","href",n).get(a+(l.href||""));if(s){for(var u=0;u<s.length;u++)if(i=s[u],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){s.splice(u,1);break t}}i=n.createElement(a),xe(i,a,l),n.head.appendChild(i);break;case"meta":if(s=to("meta","content",n).get(a+(l.content||""))){for(u=0;u<s.length;u++)if(i=s[u],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){s.splice(u,1);break t}}i=n.createElement(a),xe(i,a,l),n.head.appendChild(i);break;default:throw Error(z(468,a))}i[ge]=e,de(i),a=i}e.stateNode=a}else lo(n,e.type,e.stateNode);else e.stateNode=eo(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?lo(n,e.type,e.stateNode):eo(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&lu(e,e.memoizedProps,l.memoizedProps)}break;case 27:Ee(t,e),ze(e),a&512&&(ie||l===null||st(l,l.return)),l!==null&&a&4&&lu(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Ee(t,e),ze(e),a&512&&(ie||l===null||st(l,l.return)),e.flags&32){n=e.stateNode;try{na(n,"")}catch(x){Q(e,e.return,x)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,lu(e,n,l!==null?l.memoizedProps:n)),a&1024&&(nu=!0);break;case 6:if(Ee(t,e),ze(e),a&4){if(e.stateNode===null)throw Error(z(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(x){Q(e,e.return,x)}}break;case 3:if(gi=null,n=tt,tt=Zi(t.containerInfo),Ee(t,e),tt=n,ze(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{da(t.containerInfo)}catch(x){Q(e,e.return,x)}nu&&(nu=!1,Vh(e));break;case 4:a=tt,tt=Zi(e.stateNode.containerInfo),Ee(t,e),ze(e),tt=a;break;case 12:Ee(t,e),ze(e);break;case 31:Ee(t,e),ze(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Kn(e,a)));break;case 13:Ee(t,e),ze(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ps=Re()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Kn(e,a)));break;case 22:n=e.memoizedState!==null;var c=l!==null&&l.memoizedState!==null,f=yt,h=ie;if(yt=f||n,ie=h||c,Ee(t,e),ie=h,yt=f,ze(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||c||yt||ie||hl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){c=l=t;try{if(i=c.stateNode,n)s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{u=c.stateNode;var m=c.memoizedProps.style,o=m!=null&&m.hasOwnProperty("display")?m.display:null;u.style.display=o==null||typeof o=="boolean"?"":(""+o).trim()}}catch(x){Q(c,c.return,x)}}}else if(t.tag===6){if(l===null){c=t;try{c.stateNode.nodeValue=n?"":c.memoizedProps}catch(x){Q(c,c.return,x)}}}else if(t.tag===18){if(l===null){c=t;try{var g=c.stateNode;n?$f(g,!0):$f(c.stateNode,!1)}catch(x){Q(c,c.return,x)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Kn(e,l))));break;case 19:Ee(t,e),ze(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Kn(e,a)));break;case 30:break;case 21:break;default:Ee(t,e),ze(e)}}function ze(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(wh(a)){l=a;break}a=a.return}if(l==null)throw Error(z(160));switch(l.tag){case 27:var n=l.stateNode,i=au(e);Hi(e,i,n);break;case 5:var s=l.stateNode;l.flags&32&&(na(s,""),l.flags&=-33);var u=au(e);Hi(e,u,s);break;case 3:case 4:var c=l.stateNode.containerInfo,f=au(e);cc(e,f,c);break;default:throw Error(z(161))}}catch(h){Q(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ht(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Rh(e,t.alternate,t),t=t.sibling}function hl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:tl(4,t,t.return),hl(t);break;case 1:st(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Oh(t,t.return,l),hl(t);break;case 27:Pa(t.stateNode);case 26:case 5:st(t,t.return),hl(t);break;case 22:t.memoizedState===null&&hl(t);break;case 30:hl(t);break;default:hl(t)}e=e.sibling}}function mt(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,s=i.flags;switch(i.tag){case 0:case 11:case 15:mt(n,i,l),An(4,i);break;case 1:if(mt(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(f){Q(a,a.return,f)}if(a=i,n=a.updateQueue,n!==null){var u=a.stateNode;try{var c=n.shared.hiddenCallbacks;if(c!==null)for(n.shared.hiddenCallbacks=null,n=0;n<c.length;n++)Ld(c[n],u)}catch(f){Q(a,a.return,f)}}l&&s&64&&Ch(i),$a(i,i.return);break;case 27:Uh(i);case 26:case 5:mt(n,i,l),l&&a===null&&s&4&&Dh(i),$a(i,i.return);break;case 12:mt(n,i,l);break;case 31:mt(n,i,l),l&&s&4&&Lh(n,i);break;case 13:mt(n,i,l),l&&s&4&&qh(n,i);break;case 22:i.memoizedState===null&&mt(n,i,l),$a(i,i.return);break;case 30:break;default:mt(n,i,l)}t=t.sibling}}function vr(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Tn(l))}function gr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Tn(e))}function et(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gh(e,t,l,a),t=t.sibling}function Gh(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:et(e,t,l,a),n&2048&&An(9,t);break;case 1:et(e,t,l,a);break;case 3:et(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Tn(e)));break;case 12:if(n&2048){et(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,s=i.id,u=i.onPostCommit;typeof u=="function"&&u(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){Q(t,t.return,c)}}else et(e,t,l,a);break;case 31:et(e,t,l,a);break;case 13:et(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,s=t.alternate,t.memoizedState!==null?i._visibility&2?et(e,t,l,a):Fa(e,t):i._visibility&2?et(e,t,l,a):(i._visibility|=2,Ul(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&vr(s,t);break;case 24:et(e,t,l,a),n&2048&&gr(t.alternate,t);break;default:et(e,t,l,a)}}function Ul(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,s=t,u=l,c=a,f=s.flags;switch(s.tag){case 0:case 11:case 15:Ul(i,s,u,c,n),An(8,s);break;case 23:break;case 22:var h=s.stateNode;s.memoizedState!==null?h._visibility&2?Ul(i,s,u,c,n):Fa(i,s):(h._visibility|=2,Ul(i,s,u,c,n)),n&&f&2048&&vr(s.alternate,s);break;case 24:Ul(i,s,u,c,n),n&&f&2048&&gr(s.alternate,s);break;default:Ul(i,s,u,c,n)}t=t.sibling}}function Fa(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:Fa(l,a),n&2048&&vr(a.alternate,a);break;case 24:Fa(l,a),n&2048&&gr(a.alternate,a);break;default:Fa(l,a)}t=t.sibling}}var La=8192;function Dl(e,t,l){if(e.subtreeFlags&La)for(e=e.child;e!==null;)Xh(e,t,l),e=e.sibling}function Xh(e,t,l){switch(e.tag){case 26:Dl(e,t,l),e.flags&La&&e.memoizedState!==null&&Bg(l,tt,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,l);break;case 3:case 4:var a=tt;tt=Zi(e.stateNode.containerInfo),Dl(e,t,l),tt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=La,La=16777216,Dl(e,t,l),La=a):Dl(e,t,l));break;default:Dl(e,t,l)}}function Qh(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 Ca(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];oe=a,kh(a,e)}Qh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zh(e),e=e.sibling}function Zh(e){switch(e.tag){case 0:case 11:case 15:Ca(e),e.flags&2048&&tl(9,e,e.return);break;case 3:Ca(e);break;case 12:Ca(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mi(e)):Ca(e);break;default:Ca(e)}}function mi(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];oe=a,kh(a,e)}Qh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:tl(8,t,t.return),mi(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,mi(t));break;default:mi(t)}e=e.sibling}}function kh(e,t){for(;oe!==null;){var l=oe;switch(l.tag){case 0:case 11:case 15:tl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Tn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,oe=a;else e:for(l=e;oe!==null;){a=oe;var n=a.sibling,i=a.return;if(Bh(a),a===l){oe=null;break e}if(n!==null){n.return=i,oe=n;break e}oe=i}}}var Wv={getCacheForType:function(e){var t=pe(se),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return pe(se).controller.signal}},Iv=typeof WeakMap=="function"?WeakMap:Map,Y=0,J=null,H=null,L=0,X=0,Ce=null,Yt=!1,pa=!1,yr=!1,Mt=0,te=0,ll=0,pl=0,pr=0,we=0,ca=0,Wa=null,Te=null,rc=!1,ps=0,Kh=0,Li=1/0,qi=null,Jt=null,ce=0,$t=null,ra=null,Et=0,fc=0,oc=null,Jh=null,Ia=0,dc=null;function Le(){return Y&2&&L!==0?L&-L:w.T!==null?br():ad()}function $h(){if(we===0)if(!(L&536870912)||q){var e=qn;qn<<=1,!(qn&3932160)&&(qn=262144),we=e}else we=536870912;return e=Ye.current,e!==null&&(e.flags|=32),we}function Ne(e,t,l){(e===J&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(fa(e,0),Vt(e,L,we,!1)),En(e,l),(!(Y&2)||e!==J)&&(e===J&&(!(Y&2)&&(pl|=l),te===4&&Vt(e,L,we,!1)),rt(e))}function Fh(e,t,l){if(Y&6)throw Error(z(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||_n(e,t),n=a?tg(e,t):iu(e,t,!0),i=a;do{if(n===0){pa&&!a&&Vt(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Pv(l)){n=iu(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var u=e;n=Wa;var c=u.current.memoizedState.isDehydrated;if(c&&(fa(u,s).flags|=256),s=iu(u,s,!1),s!==2){if(yr&&!c){u.errorRecoveryDisabledLanes|=i,pl|=i,n=4;break e}i=Te,Te=n,i!==null&&(Te===null?Te=i:Te.push.apply(Te,i))}n=s}if(i=!1,n!==2)continue}}if(n===1){fa(e,0),Vt(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(z(345));case 4:if((t&4194048)!==t)break;case 6:Vt(a,t,we,!Yt);break e;case 2:Te=null;break;case 3:case 5:break;default:throw Error(z(329))}if((t&62914560)===t&&(n=ps+300-Re(),10<n)){if(Vt(a,t,we,!Yt),us(a,0,!0)!==0)break e;Et=t,a.timeoutHandle=gm(Bf.bind(null,a,l,Te,qi,rc,t,we,pl,ca,Yt,i,"Throttled",-0,0),n);break e}Bf(a,l,Te,qi,rc,t,we,pl,ca,Yt,i,null,-0,0)}}break}while(!0);rt(e)}function Bf(e,t,l,a,n,i,s,u,c,f,h,m,o,g){if(e.timeoutHandle=-1,m=t.subtreeFlags,m&8192||(m&16785408)===16785408){m={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xt},Xh(t,i,m);var x=(i&62914560)===i?ps-Re():(i&4194048)===i?Kh-Re():0;if(x=Hg(m,x),x!==null){Et=i,e.cancelPendingCommit=x(Lf.bind(null,e,t,i,l,a,n,s,u,c,h,m,null,o,g)),Vt(e,i,s,!f);return}}Lf(e,t,i,l,a,n,s,u,c)}function Pv(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],i=n.getSnapshot;n=n.value;try{if(!qe(i(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Vt(e,t,l,a){t&=~pr,t&=~pl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-He(n),s=1<<i;a[i]=-1,n&=~s}l!==0&&ed(e,l,t)}function xs(){return Y&6?!0:(Mn(0),!1)}function xr(){if(H!==null){if(X===0)var e=H.return;else e=H,bt=Ml=null,nr(e),Pl=null,rn=0,e=H;for(;e!==null;)Mh(e.alternate,e),e=e.return;H=null}}function fa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,xg(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Et=0,xr(),J=e,H=l=St(e.current,null),L=t,X=0,Ce=null,Yt=!1,pa=_n(e,t),yr=!1,ca=we=pr=pl=ll=te=0,Te=Wa=null,rc=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-He(a),i=1<<n;t|=e[n],a&=~i}return Mt=t,os(),l}function Wh(e,t){U=null,w.H=on,t===ya||t===hs?(t=mf(),X=3):t===Wc?(t=mf(),X=4):X=t===hr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ce=t,H===null&&(te=1,Ri(e,ke(t,e.current)))}function Ih(){var e=Ye.current;return e===null?!0:(L&4194048)===L?Je===null:(L&62914560)===L||L&536870912?e===Je:!1}function Ph(){var e=w.H;return w.H=on,e===null?on:e}function em(){var e=w.A;return w.A=Wv,e}function Yi(){te=4,Yt||(L&4194048)!==L&&Ye.current!==null||(pa=!0),!(ll&134217727)&&!(pl&134217727)||J===null||Vt(J,L,we,!1)}function iu(e,t,l){var a=Y;Y|=2;var n=Ph(),i=em();(J!==e||L!==t)&&(qi=null,fa(e,t)),t=!1;var s=te;e:do try{if(X!==0&&H!==null){var u=H,c=Ce;switch(X){case 8:xr(),s=6;break e;case 3:case 2:case 9:case 6:Ye.current===null&&(t=!0);var f=X;if(X=0,Ce=null,Jl(e,u,c,f),l&&pa){s=0;break e}break;default:f=X,X=0,Ce=null,Jl(e,u,c,f)}}eg(),s=te;break}catch(h){Wh(e,h)}while(!0);return t&&e.shellSuspendCounter++,bt=Ml=null,Y=a,w.H=n,w.A=i,H===null&&(J=null,L=0,os()),s}function eg(){for(;H!==null;)tm(H)}function tg(e,t){var l=Y;Y|=2;var a=Ph(),n=em();J!==e||L!==t?(qi=null,Li=Re()+500,fa(e,t)):pa=_n(e,t);e:do try{if(X!==0&&H!==null){t=H;var i=Ce;t:switch(X){case 1:X=0,Ce=null,Jl(e,t,i,1);break;case 2:case 9:if(hf(i)){X=0,Ce=null,Hf(t);break}t=function(){X!==2&&X!==9||J!==e||(X=7),rt(e)},i.then(t,t);break e;case 3:X=7;break e;case 4:X=5;break e;case 7:hf(i)?(X=0,Ce=null,Hf(t)):(X=0,Ce=null,Jl(e,t,i,7));break;case 5:var s=null;switch(H.tag){case 26:s=H.memoizedState;case 5:case 27:var u=H;if(s?Sm(s):u.stateNode.complete){X=0,Ce=null;var c=u.sibling;if(c!==null)H=c;else{var f=u.return;f!==null?(H=f,bs(f)):H=null}break t}}X=0,Ce=null,Jl(e,t,i,5);break;case 6:X=0,Ce=null,Jl(e,t,i,6);break;case 8:xr(),te=6;break e;default:throw Error(z(462))}}lg();break}catch(h){Wh(e,h)}while(!0);return bt=Ml=null,w.H=a,w.A=n,Y=l,H!==null?0:(J=null,L=0,os(),te)}function lg(){for(;H!==null&&!j0();)tm(H)}function tm(e){var t=Ah(e.alternate,e,Mt);e.memoizedProps=e.pendingProps,t===null?bs(e):H=t}function Hf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Cf(l,t,t.pendingProps,t.type,void 0,L);break;case 11:t=Cf(l,t,t.pendingProps,t.type.render,t.ref,L);break;case 5:nr(t);default:Mh(l,t),t=H=Md(t,Mt),t=Ah(l,t,Mt)}e.memoizedProps=e.pendingProps,t===null?bs(e):H=t}function Jl(e,t,l,a){bt=Ml=null,nr(t),Pl=null,rn=0;var n=t.return;try{if(Qv(e,n,t,l,L)){te=1,Ri(e,ke(l,e.current)),H=null;return}}catch(i){if(n!==null)throw H=n,i;te=1,Ri(e,ke(l,e.current)),H=null;return}t.flags&32768?(q||a===1?e=!0:pa||L&536870912?e=!1:(Yt=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ye.current,a!==null&&a.tag===13&&(a.flags|=16384))),lm(t,e)):bs(t)}function bs(e){var t=e;do{if(t.flags&32768){lm(t,Yt);return}e=t.return;var l=Kv(t.alternate,t,Mt);if(l!==null){H=l;return}if(t=t.sibling,t!==null){H=t;return}H=t=e}while(t!==null);te===0&&(te=5)}function lm(e,t){do{var l=Jv(e.alternate,e);if(l!==null){l.flags&=32767,H=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){H=e;return}H=e=l}while(e!==null);te=6,H=null}function Lf(e,t,l,a,n,i,s,u,c){e.cancelPendingCommit=null;do Ss();while(ce!==0);if(Y&6)throw Error(z(327));if(t!==null){if(t===e.current)throw Error(z(177));if(i=t.lanes|t.childLanes,i|=Qc,R0(e,l,i,s,u,c),e===J&&(H=J=null,L=0),ra=t,$t=e,Et=l,fc=i,oc=n,Jh=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,sg(zi,function(){return um(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=w.T,w.T=null,n=V.p,V.p=2,s=Y,Y|=4;try{$v(e,t,l)}finally{Y=s,V.p=n,w.T=a}}ce=1,am(),nm(),im()}}function am(){if(ce===1){ce=0;var e=$t,t=ra,l=(t.flags&13878)!==0;if(t.subtreeFlags&13878||l){l=w.T,w.T=null;var a=V.p;V.p=2;var n=Y;Y|=4;try{Yh(t,e);var i=gc,s=Sd(e.containerInfo),u=i.focusedElem,c=i.selectionRange;if(s!==u&&u&&u.ownerDocument&&bd(u.ownerDocument.documentElement,u)){if(c!==null&&Xc(u)){var f=c.start,h=c.end;if(h===void 0&&(h=f),"selectionStart"in u)u.selectionStart=f,u.selectionEnd=Math.min(h,u.value.length);else{var m=u.ownerDocument||document,o=m&&m.defaultView||window;if(o.getSelection){var g=o.getSelection(),x=u.textContent.length,b=Math.min(c.start,x),E=c.end===void 0?b:Math.min(c.end,x);!g.extend&&b>E&&(s=E,E=b,b=s);var v=sf(u,b),d=sf(u,E);if(v&&d&&(g.rangeCount!==1||g.anchorNode!==v.node||g.anchorOffset!==v.offset||g.focusNode!==d.node||g.focusOffset!==d.offset)){var y=m.createRange();y.setStart(v.node,v.offset),g.removeAllRanges(),b>E?(g.addRange(y),g.extend(d.node,d.offset)):(y.setEnd(d.node,d.offset),g.addRange(y))}}}}for(m=[],g=u;g=g.parentNode;)g.nodeType===1&&m.push({element:g,left:g.scrollLeft,top:g.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<m.length;u++){var p=m[u];p.element.scrollLeft=p.left,p.element.scrollTop=p.top}}Ji=!!vc,gc=vc=null}finally{Y=n,V.p=a,w.T=l}}e.current=t,ce=2}}function nm(){if(ce===2){ce=0;var e=$t,t=ra,l=(t.flags&8772)!==0;if(t.subtreeFlags&8772||l){l=w.T,w.T=null;var a=V.p;V.p=2;var n=Y;Y|=4;try{Rh(e,t.alternate,t)}finally{Y=n,V.p=a,w.T=l}}ce=3}}function im(){if(ce===4||ce===3){ce=0,T0();var e=$t,t=ra,l=Et,a=Jh;t.subtreeFlags&10256||t.flags&10256?ce=5:(ce=0,ra=$t=null,sm(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Jt=null),Bc(l),t=t.stateNode,Be&&typeof Be.onCommitFiberRoot=="function")try{Be.onCommitFiberRoot(Sn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=w.T,n=V.p,V.p=2,w.T=null;try{for(var i=e.onRecoverableError,s=0;s<a.length;s++){var u=a[s];i(u.value,{componentStack:u.stack})}}finally{w.T=t,V.p=n}}Et&3&&Ss(),rt(e),n=e.pendingLanes,l&261930&&n&42?e===dc?Ia++:(Ia=0,dc=e):Ia=0,Mn(0)}}function sm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Tn(t)))}function Ss(){return am(),nm(),im(),um()}function um(){if(ce!==5)return!1;var e=$t,t=fc;fc=0;var l=Bc(Et),a=w.T,n=V.p;try{V.p=32>l?32:l,w.T=null,l=oc,oc=null;var i=$t,s=Et;if(ce=0,ra=$t=null,Et=0,Y&6)throw Error(z(331));var u=Y;if(Y|=4,Zh(i.current),Gh(i,i.current,s,l),Y=u,Mn(0,!1),Be&&typeof Be.onPostCommitFiberRoot=="function")try{Be.onPostCommitFiberRoot(Sn,i)}catch{}return!0}finally{V.p=n,w.T=a,sm(e,t)}}function qf(e,t,l){t=ke(l,t),t=ic(e.stateNode,t,2),e=Kt(e,t,2),e!==null&&(En(e,2),rt(e))}function Q(e,t,l){if(e.tag===3)qf(e,e,l);else for(;t!==null;){if(t.tag===3){qf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Jt===null||!Jt.has(a))){e=ke(l,e),l=_h(2),a=Kt(t,l,2),a!==null&&(Eh(l,a,t,e),En(a,2),rt(a));break}}t=t.return}}function su(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Iv;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(yr=!0,n.add(l),e=ag.bind(null,e,t,l),t.then(e,e))}function ag(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,J===e&&(L&l)===l&&(te===4||te===3&&(L&62914560)===L&&300>Re()-ps?!(Y&2)&&fa(e,0):pr|=l,ca===L&&(ca=0)),rt(e)}function cm(e,t){t===0&&(t=Po()),e=Al(e,t),e!==null&&(En(e,t),rt(e))}function ng(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),cm(e,l)}function ig(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(z(314))}a!==null&&a.delete(t),cm(e,l)}function sg(e,t){return Uc(e,t)}var Vi=null,Rl=null,hc=!1,Gi=!1,uu=!1,Gt=0;function rt(e){e!==Rl&&e.next===null&&(Rl===null?Vi=Rl=e:Rl=Rl.next=e),Gi=!0,hc||(hc=!0,cg())}function Mn(e,t){if(!uu&&Gi){uu=!0;do for(var l=!1,a=Vi;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var s=a.suspendedLanes,u=a.pingedLanes;i=(1<<31-He(42|e)+1)-1,i&=n&~(s&~u),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Yf(a,i))}else i=L,i=us(a,a===J?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(i&3)||_n(a,i)||(l=!0,Yf(a,i));a=a.next}while(l);uu=!1}}function ug(){rm()}function rm(){Gi=hc=!1;var e=0;Gt!==0&&pg()&&(e=Gt);for(var t=Re(),l=null,a=Vi;a!==null;){var n=a.next,i=fm(a,t);i===0?(a.next=null,l===null?Vi=n:l.next=n,n===null&&(Rl=l)):(l=a,(e!==0||i&3)&&(Gi=!0)),a=n}ce!==0&&ce!==5||Mn(e),Gt!==0&&(Gt=0)}function fm(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var s=31-He(i),u=1<<s,c=n[s];c===-1?(!(u&l)||u&a)&&(n[s]=U0(u,t)):c<=t&&(e.expiredLanes|=u),i&=~u}if(t=J,l=L,l=us(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Rs(a),e.callbackNode=null,e.callbackPriority=0;if(!(l&3)||_n(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Rs(a),Bc(l)){case 2:case 8:l=Wo;break;case 32:l=zi;break;case 268435456:l=Io;break;default:l=zi}return a=om.bind(null,e),l=Uc(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Rs(a),e.callbackPriority=2,e.callbackNode=null,2}function om(e,t){if(ce!==0&&ce!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Ss()&&e.callbackNode!==l)return null;var a=L;return a=us(e,e===J?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Fh(e,a,t),fm(e,Re()),e.callbackNode!=null&&e.callbackNode===l?om.bind(null,e):null)}function Yf(e,t){if(Ss())return null;Fh(e,t,!0)}function cg(){bg(function(){Y&6?Uc(Fo,ug):rm()})}function br(){if(Gt===0){var e=ia;e===0&&(e=Ln,Ln<<=1,!(Ln&261888)&&(Ln=256)),Gt=e}return Gt}function Vf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ii(""+e)}function Gf(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function rg(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=Vf((n[Ae]||null).action),s=a.submitter;s&&(t=(t=s[Ae]||null)?Vf(t.formAction):s.getAttribute("formAction"),t!==null&&(i=t,s=null));var u=new cs("action","action",null,a,n);e.push({event:u,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Gt!==0){var c=s?Gf(n,s):new FormData(n);ac(l,{pending:!0,data:c,method:n.method,action:i},null,c)}}else typeof i=="function"&&(u.preventDefault(),c=s?Gf(n,s):new FormData(n),ac(l,{pending:!0,data:c,method:n.method,action:i},i,c))},currentTarget:n}]})}}for(var cu=0;cu<Zu.length;cu++){var ru=Zu[cu],fg=ru.toLowerCase(),og=ru[0].toUpperCase()+ru.slice(1);at(fg,"on"+og)}at(Ed,"onAnimationEnd");at(zd,"onAnimationIteration");at(jd,"onAnimationStart");at("dblclick","onDoubleClick");at("focusin","onFocus");at("focusout","onBlur");at(Nv,"onTransitionRun");at(Av,"onTransitionStart");at(Mv,"onTransitionCancel");at(Td,"onTransitionEnd");aa("onMouseEnter",["mouseout","mouseover"]);aa("onMouseLeave",["mouseout","mouseover"]);aa("onPointerEnter",["pointerout","pointerover"]);aa("onPointerLeave",["pointerout","pointerover"]);jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));jl("onBeforeInput",["compositionend","keypress","textInput","paste"]);jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var dn="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(" "),dg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(dn));function dm(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var s=a.length-1;0<=s;s--){var u=a[s],c=u.instance,f=u.currentTarget;if(u=u.listener,c!==i&&n.isPropagationStopped())break e;i=u,n.currentTarget=f;try{i(n)}catch(h){Ti(h)}n.currentTarget=null,i=c}else for(s=0;s<a.length;s++){if(u=a[s],c=u.instance,f=u.currentTarget,u=u.listener,c!==i&&n.isPropagationStopped())break e;i=u,n.currentTarget=f;try{i(n)}catch(h){Ti(h)}n.currentTarget=null,i=c}}}}function B(e,t){var l=t[Hu];l===void 0&&(l=t[Hu]=new Set);var a=e+"__bubble";l.has(a)||(hm(t,e,2,!1),l.add(a))}function fu(e,t,l){var a=0;t&&(a|=4),hm(l,e,a,t)}var Jn="_reactListening"+Math.random().toString(36).slice(2);function Sr(e){if(!e[Jn]){e[Jn]=!0,nd.forEach(function(l){l!=="selectionchange"&&(dg.has(l)||fu(l,!1,e),fu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jn]||(t[Jn]=!0,fu("selectionchange",!1,t))}}function hm(e,t,l,a){switch(Tm(t)){case 2:var n=Yg;break;case 8:n=Vg;break;default:n=jr}l=n.bind(null,t,l,e),n=void 0,!Gu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function ou(e,t,l,a,n){var i=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var s=a.tag;if(s===3||s===4){var u=a.stateNode.containerInfo;if(u===n)break;if(s===4)for(s=a.return;s!==null;){var c=s.tag;if((c===3||c===4)&&s.stateNode.containerInfo===n)return;s=s.return}for(;u!==null;){if(s=ql(u),s===null)return;if(c=s.tag,c===5||c===6||c===26||c===27){a=i=s;continue e}u=u.parentNode}}a=a.return}dd(function(){var f=i,h=qc(l),m=[];e:{var o=Nd.get(e);if(o!==void 0){var g=cs,x=e;switch(e){case"keypress":if(ui(l)===0)break e;case"keydown":case"keyup":g=iv;break;case"focusin":x="focus",g=Ys;break;case"focusout":x="blur",g=Ys;break;case"beforeblur":case"afterblur":g=Ys;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=$r;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=K0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=cv;break;case Ed:case zd:case jd:g=F0;break;case Td:g=fv;break;case"scroll":case"scrollend":g=Z0;break;case"wheel":g=dv;break;case"copy":case"cut":case"paste":g=I0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Wr;break;case"toggle":case"beforetoggle":g=mv}var b=(t&4)!==0,E=!b&&(e==="scroll"||e==="scrollend"),v=b?o!==null?o+"Capture":null:o;b=[];for(var d=f,y;d!==null;){var p=d;if(y=p.stateNode,p=p.tag,p!==5&&p!==26&&p!==27||y===null||v===null||(p=an(d,v),p!=null&&b.push(hn(d,p,y))),E)break;d=d.return}0<b.length&&(o=new g(o,x,null,l,h),m.push({event:o,listeners:b}))}}if(!(t&7)){e:{if(o=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",o&&l!==Vu&&(x=l.relatedTarget||l.fromElement)&&(ql(x)||x[ma]))break e;if((g||o)&&(o=h.window===h?h:(o=h.ownerDocument)?o.defaultView||o.parentWindow:window,g?(x=l.relatedTarget||l.toElement,g=f,x=x?ql(x):null,x!==null&&(E=bn(x),b=x.tag,x!==E||b!==5&&b!==27&&b!==6)&&(x=null)):(g=null,x=f),g!==x)){if(b=$r,p="onMouseLeave",v="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(b=Wr,p="onPointerLeave",v="onPointerEnter",d="pointer"),E=g==null?o:Ba(g),y=x==null?o:Ba(x),o=new b(p,d+"leave",g,l,h),o.target=E,o.relatedTarget=y,p=null,ql(h)===f&&(b=new b(v,d+"enter",x,l,h),b.target=y,b.relatedTarget=E,p=b),E=p,g&&x)t:{for(b=hg,v=g,d=x,y=0,p=v;p;p=b(p))y++;p=0;for(var _=d;_;_=b(_))p++;for(;0<y-p;)v=b(v),y--;for(;0<p-y;)d=b(d),p--;for(;y--;){if(v===d||d!==null&&v===d.alternate){b=v;break t}v=b(v),d=b(d)}b=null}else b=null;g!==null&&Xf(m,o,g,b,!1),x!==null&&E!==null&&Xf(m,E,x,b,!0)}}e:{if(o=f?Ba(f):window,g=o.nodeName&&o.nodeName.toLowerCase(),g==="select"||g==="input"&&o.type==="file")var N=tf;else if(ef(o))if(pd)N=zv;else{N=_v;var j=Sv}else g=o.nodeName,!g||g.toLowerCase()!=="input"||o.type!=="checkbox"&&o.type!=="radio"?f&&Lc(f.elementType)&&(N=tf):N=Ev;if(N&&(N=N(e,f))){yd(m,N,l,h);break e}j&&j(e,o,f),e==="focusout"&&f&&o.type==="number"&&f.memoizedProps.value!=null&&Yu(o,"number",o.value)}switch(j=f?Ba(f):window,e){case"focusin":(ef(j)||j.contentEditable==="true")&&(Gl=j,Xu=f,Xa=null);break;case"focusout":Xa=Xu=Gl=null;break;case"mousedown":Qu=!0;break;case"contextmenu":case"mouseup":case"dragend":Qu=!1,uf(m,l,h);break;case"selectionchange":if(Tv)break;case"keydown":case"keyup":uf(m,l,h)}var M;if(Gc)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Vl?vd(e,l)&&(A="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(A="onCompositionStart");A&&(md&&l.locale!=="ko"&&(Vl||A!=="onCompositionStart"?A==="onCompositionEnd"&&Vl&&(M=hd()):(qt=h,Yc="value"in qt?qt.value:qt.textContent,Vl=!0)),j=Xi(f,A),0<j.length&&(A=new Fr(A,e,null,l,h),m.push({event:A,listeners:j}),M?A.data=M:(M=gd(l),M!==null&&(A.data=M)))),(M=gv?yv(e,l):pv(e,l))&&(A=Xi(f,"onBeforeInput"),0<A.length&&(j=new Fr("onBeforeInput","beforeinput",null,l,h),m.push({event:j,listeners:A}),j.data=M)),rg(m,e,f,l,h)}dm(m,t)})}function hn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Xi(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=an(e,l),n!=null&&a.unshift(hn(e,n,i)),n=an(e,t),n!=null&&a.push(hn(e,n,i))),e.tag===3)return a;e=e.return}return[]}function hg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(e,t,l,a,n){for(var i=t._reactName,s=[];l!==null&&l!==a;){var u=l,c=u.alternate,f=u.stateNode;if(u=u.tag,c!==null&&c===a)break;u!==5&&u!==26&&u!==27||f===null||(c=f,n?(f=an(l,i),f!=null&&s.unshift(hn(l,f,c))):n||(f=an(l,i),f!=null&&s.push(hn(l,f,c)))),l=l.return}s.length!==0&&e.push({event:t,listeners:s})}var mg=/\r\n?/g,vg=/\u0000|\uFFFD/g;function Qf(e){return(typeof e=="string"?e:""+e).replace(mg,`
33
+ `).replace(vg,"")}function mm(e,t){return t=Qf(t),Qf(e)===t}function Z(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||na(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&na(e,""+a);break;case"className":Vn(e,"class",a);break;case"tabIndex":Vn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Vn(e,l,a);break;case"style":od(e,a,i);break;case"data":if(t!=="object"){Vn(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ii(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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 i=="function"&&(l==="formAction"?(t!=="input"&&Z(e,t,"name",n.name,n,null),Z(e,t,"formEncType",n.formEncType,n,null),Z(e,t,"formMethod",n.formMethod,n,null),Z(e,t,"formTarget",n.formTarget,n,null)):(Z(e,t,"encType",n.encType,n,null),Z(e,t,"method",n.method,n,null),Z(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=ii(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=xt);break;case"onScroll":a!=null&&B("scroll",e);break;case"onScrollEnd":a!=null&&B("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(z(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(z(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=ii(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":B("beforetoggle",e),B("toggle",e),ni(e,"popover",a);break;case"xlinkActuate":ft(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ft(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ft(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ft(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ft(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ft(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ft(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ft(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ft(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ni(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=X0.get(l)||l,ni(e,l,a))}}function mc(e,t,l,a,n,i){switch(l){case"style":od(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(z(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(z(60));e.innerHTML=l}}break;case"children":typeof a=="string"?na(e,a):(typeof a=="number"||typeof a=="bigint")&&na(e,""+a);break;case"onScroll":a!=null&&B("scroll",e);break;case"onScrollEnd":a!=null&&B("scrollend",e);break;case"onClick":a!=null&&(e.onclick=xt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!id.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),i=e[Ae]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):ni(e,l,a)}}}function xe(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":B("error",e),B("load",e);var a=!1,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var s=l[i];if(s!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(z(137,t));default:Z(e,t,i,s,l,null)}}n&&Z(e,t,"srcSet",l.srcSet,l,null),a&&Z(e,t,"src",l.src,l,null);return;case"input":B("invalid",e);var u=i=s=n=null,c=null,f=null;for(a in l)if(l.hasOwnProperty(a)){var h=l[a];if(h!=null)switch(a){case"name":n=h;break;case"type":s=h;break;case"checked":c=h;break;case"defaultChecked":f=h;break;case"value":i=h;break;case"defaultValue":u=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(z(137,t));break;default:Z(e,t,a,h,l,null)}}cd(e,i,u,c,f,s,n,!1);return;case"select":B("invalid",e),a=s=i=null;for(n in l)if(l.hasOwnProperty(n)&&(u=l[n],u!=null))switch(n){case"value":i=u;break;case"defaultValue":s=u;break;case"multiple":a=u;default:Z(e,t,n,u,l,null)}t=i,l=s,e.multiple=!!a,t!=null?Fl(e,!!a,t,!1):l!=null&&Fl(e,!!a,l,!0);return;case"textarea":B("invalid",e),i=n=a=null;for(s in l)if(l.hasOwnProperty(s)&&(u=l[s],u!=null))switch(s){case"value":a=u;break;case"defaultValue":n=u;break;case"children":i=u;break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(z(91));break;default:Z(e,t,s,u,l,null)}fd(e,a,n,i);return;case"option":for(c in l)if(l.hasOwnProperty(c)&&(a=l[c],a!=null))switch(c){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Z(e,t,c,a,l,null)}return;case"dialog":B("beforetoggle",e),B("toggle",e),B("cancel",e),B("close",e);break;case"iframe":case"object":B("load",e);break;case"video":case"audio":for(a=0;a<dn.length;a++)B(dn[a],e);break;case"image":B("error",e),B("load",e);break;case"details":B("toggle",e);break;case"embed":case"source":case"link":B("error",e),B("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(f in l)if(l.hasOwnProperty(f)&&(a=l[f],a!=null))switch(f){case"children":case"dangerouslySetInnerHTML":throw Error(z(137,t));default:Z(e,t,f,a,l,null)}return;default:if(Lc(t)){for(h in l)l.hasOwnProperty(h)&&(a=l[h],a!==void 0&&mc(e,t,h,a,l,void 0));return}}for(u in l)l.hasOwnProperty(u)&&(a=l[u],a!=null&&Z(e,t,u,a,l,null))}function gg(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,s=null,u=null,c=null,f=null,h=null;for(g in l){var m=l[g];if(l.hasOwnProperty(g)&&m!=null)switch(g){case"checked":break;case"value":break;case"defaultValue":c=m;default:a.hasOwnProperty(g)||Z(e,t,g,null,a,m)}}for(var o in a){var g=a[o];if(m=l[o],a.hasOwnProperty(o)&&(g!=null||m!=null))switch(o){case"type":i=g;break;case"name":n=g;break;case"checked":f=g;break;case"defaultChecked":h=g;break;case"value":s=g;break;case"defaultValue":u=g;break;case"children":case"dangerouslySetInnerHTML":if(g!=null)throw Error(z(137,t));break;default:g!==m&&Z(e,t,o,g,a,m)}}qu(e,s,u,c,f,h,i,n);return;case"select":g=s=u=o=null;for(i in l)if(c=l[i],l.hasOwnProperty(i)&&c!=null)switch(i){case"value":break;case"multiple":g=c;default:a.hasOwnProperty(i)||Z(e,t,i,null,a,c)}for(n in a)if(i=a[n],c=l[n],a.hasOwnProperty(n)&&(i!=null||c!=null))switch(n){case"value":o=i;break;case"defaultValue":u=i;break;case"multiple":s=i;default:i!==c&&Z(e,t,n,i,a,c)}t=u,l=s,a=g,o!=null?Fl(e,!!l,o,!1):!!a!=!!l&&(t!=null?Fl(e,!!l,t,!0):Fl(e,!!l,l?[]:"",!1));return;case"textarea":g=o=null;for(u in l)if(n=l[u],l.hasOwnProperty(u)&&n!=null&&!a.hasOwnProperty(u))switch(u){case"value":break;case"children":break;default:Z(e,t,u,null,a,n)}for(s in a)if(n=a[s],i=l[s],a.hasOwnProperty(s)&&(n!=null||i!=null))switch(s){case"value":o=n;break;case"defaultValue":g=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(z(91));break;default:n!==i&&Z(e,t,s,n,a,i)}rd(e,o,g);return;case"option":for(var x in l)if(o=l[x],l.hasOwnProperty(x)&&o!=null&&!a.hasOwnProperty(x))switch(x){case"selected":e.selected=!1;break;default:Z(e,t,x,null,a,o)}for(c in a)if(o=a[c],g=l[c],a.hasOwnProperty(c)&&o!==g&&(o!=null||g!=null))switch(c){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Z(e,t,c,o,a,g)}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 b in l)o=l[b],l.hasOwnProperty(b)&&o!=null&&!a.hasOwnProperty(b)&&Z(e,t,b,null,a,o);for(f in a)if(o=a[f],g=l[f],a.hasOwnProperty(f)&&o!==g&&(o!=null||g!=null))switch(f){case"children":case"dangerouslySetInnerHTML":if(o!=null)throw Error(z(137,t));break;default:Z(e,t,f,o,a,g)}return;default:if(Lc(t)){for(var E in l)o=l[E],l.hasOwnProperty(E)&&o!==void 0&&!a.hasOwnProperty(E)&&mc(e,t,E,void 0,a,o);for(h in a)o=a[h],g=l[h],!a.hasOwnProperty(h)||o===g||o===void 0&&g===void 0||mc(e,t,h,o,a,g);return}}for(var v in l)o=l[v],l.hasOwnProperty(v)&&o!=null&&!a.hasOwnProperty(v)&&Z(e,t,v,null,a,o);for(m in a)o=a[m],g=l[m],!a.hasOwnProperty(m)||o===g||o==null&&g==null||Z(e,t,m,o,a,g)}function Zf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,s=n.initiatorType,u=n.duration;if(i&&u&&Zf(s)){for(s=0,u=n.responseEnd,a+=1;a<l.length;a++){var c=l[a],f=c.startTime;if(f>u)break;var h=c.transferSize,m=c.initiatorType;h&&Zf(m)&&(c=c.responseEnd,s+=h*(c<u?1:(u-f)/(c-f)))}if(--a,t+=8*(i+s)/(n.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 vc=null,gc=null;function Qi(e){return e.nodeType===9?e:e.ownerDocument}function kf(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 vm(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 yc(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 du=null;function pg(){var e=window.event;return e&&e.type==="popstate"?e===du?!1:(du=e,!0):(du=null,!1)}var gm=typeof setTimeout=="function"?setTimeout:void 0,xg=typeof clearTimeout=="function"?clearTimeout:void 0,Kf=typeof Promise=="function"?Promise:void 0,bg=typeof queueMicrotask=="function"?queueMicrotask:typeof Kf<"u"?function(e){return Kf.resolve(null).then(e).catch(Sg)}:gm;function Sg(e){setTimeout(function(){throw e})}function il(e){return e==="head"}function Jf(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),da(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Pa(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Pa(l);for(var i=l.firstChild;i;){var s=i.nextSibling,u=i.nodeName;i[zn]||u==="SCRIPT"||u==="STYLE"||u==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=s}}else l==="body"&&Pa(e.ownerDocument.body);l=n}while(l);da(t)}function $f(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function pc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":pc(l),Hc(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function _g(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[zn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=$e(e.nextSibling),e===null)break}return null}function Eg(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=$e(e.nextSibling),e===null))return null;return e}function ym(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=$e(e.nextSibling),e===null))return null;return e}function xc(e){return e.data==="$?"||e.data==="$~"}function bc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function zg(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function $e(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 Sc=null;function Ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return $e(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Wf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function pm(e,t,l){switch(t=Qi(l),e){case"html":if(e=t.documentElement,!e)throw Error(z(452));return e;case"head":if(e=t.head,!e)throw Error(z(453));return e;case"body":if(e=t.body,!e)throw Error(z(454));return e;default:throw Error(z(451))}}function Pa(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Hc(e)}var Fe=new Map,If=new Set;function Zi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ot=V.d;V.d={f:jg,r:Tg,D:Ng,C:Ag,L:Mg,m:Cg,X:Dg,S:Og,M:wg};function jg(){var e=Ot.f(),t=xs();return e||t}function Tg(e){var t=va(e);t!==null&&t.tag===5&&t.type==="form"?oh(t):Ot.r(e)}var xa=typeof document>"u"?null:document;function xm(e,t,l){var a=xa;if(a&&typeof t=="string"&&t){var n=Ze(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),If.has(n)||(If.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),xe(t,"link",e),de(t),a.head.appendChild(t)))}}function Ng(e){Ot.D(e),xm("dns-prefetch",e,null)}function Ag(e,t){Ot.C(e,t),xm("preconnect",e,t)}function Mg(e,t,l){Ot.L(e,t,l);var a=xa;if(a&&e&&t){var n='link[rel="preload"][as="'+Ze(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Ze(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Ze(l.imageSizes)+'"]')):n+='[href="'+Ze(e)+'"]';var i=n;switch(t){case"style":i=oa(e);break;case"script":i=ba(e)}Fe.has(i)||(e=I({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Fe.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(Cn(i))||t==="script"&&a.querySelector(On(i))||(t=a.createElement("link"),xe(t,"link",e),de(t),a.head.appendChild(t)))}}function Cg(e,t){Ot.m(e,t);var l=xa;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Ze(a)+'"][href="'+Ze(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ba(e)}if(!Fe.has(i)&&(e=I({rel:"modulepreload",href:e},t),Fe.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(On(i)))return}a=l.createElement("link"),xe(a,"link",e),de(a),l.head.appendChild(a)}}}function Og(e,t,l){Ot.S(e,t,l);var a=xa;if(a&&e){var n=$l(a).hoistableStyles,i=oa(e);t=t||"default";var s=n.get(i);if(!s){var u={loading:0,preload:null};if(s=a.querySelector(Cn(i)))u.loading=5;else{e=I({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Fe.get(i))&&_r(e,l);var c=s=a.createElement("link");de(c),xe(c,"link",e),c._p=new Promise(function(f,h){c.onload=f,c.onerror=h}),c.addEventListener("load",function(){u.loading|=1}),c.addEventListener("error",function(){u.loading|=2}),u.loading|=4,vi(s,t,a)}s={type:"stylesheet",instance:s,count:1,state:u},n.set(i,s)}}}function Dg(e,t){Ot.X(e,t);var l=xa;if(l&&e){var a=$l(l).hoistableScripts,n=ba(e),i=a.get(n);i||(i=l.querySelector(On(n)),i||(e=I({src:e,async:!0},t),(t=Fe.get(n))&&Er(e,t),i=l.createElement("script"),de(i),xe(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function wg(e,t){Ot.M(e,t);var l=xa;if(l&&e){var a=$l(l).hoistableScripts,n=ba(e),i=a.get(n);i||(i=l.querySelector(On(n)),i||(e=I({src:e,async:!0,type:"module"},t),(t=Fe.get(n))&&Er(e,t),i=l.createElement("script"),de(i),xe(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function Pf(e,t,l,a){var n=(n=Qt.current)?Zi(n):null;if(!n)throw Error(z(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=oa(l.href),l=$l(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=oa(l.href);var i=$l(n).hoistableStyles,s=i.get(e);if(s||(n=n.ownerDocument||n,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=n.querySelector(Cn(e)))&&!i._p&&(s.instance=i,s.state.loading=5),Fe.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Fe.set(e,l),i||Ug(n,e,l,s.state))),t&&a===null)throw Error(z(528,""));return s}if(t&&a!==null)throw Error(z(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ba(l),l=$l(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(z(444,e))}}function oa(e){return'href="'+Ze(e)+'"'}function Cn(e){return'link[rel="stylesheet"]['+e+"]"}function bm(e){return I({},e,{"data-precedence":e.precedence,precedence:null})}function Ug(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),xe(t,"link",l),de(t),e.head.appendChild(t))}function ba(e){return'[src="'+Ze(e)+'"]'}function On(e){return"script[async]"+e}function eo(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Ze(l.href)+'"]');if(a)return t.instance=a,de(a),a;var n=I({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),de(a),xe(a,"style",n),vi(a,l.precedence,e),t.instance=a;case"stylesheet":n=oa(l.href);var i=e.querySelector(Cn(n));if(i)return t.state.loading|=4,t.instance=i,de(i),i;a=bm(l),(n=Fe.get(n))&&_r(a,n),i=(e.ownerDocument||e).createElement("link"),de(i);var s=i;return s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),xe(i,"link",a),t.state.loading|=4,vi(i,l.precedence,e),t.instance=i;case"script":return i=ba(l.src),(n=e.querySelector(On(i)))?(t.instance=n,de(n),n):(a=l,(n=Fe.get(i))&&(a=I({},l),Er(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),de(n),xe(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(z(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,vi(a,l.precedence,e));return t.instance}function vi(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,s=0;s<a.length;s++){var u=a[s];if(u.dataset.precedence===t)i=u;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function _r(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Er(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var gi=null;function to(e,t,l){if(gi===null){var a=new Map,n=gi=new Map;n.set(l,a)}else n=gi,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var i=l[n];if(!(i[zn]||i[ge]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var s=i.getAttribute(t)||"";s=e+s;var u=a.get(s);u?u.push(i):a.set(s,[i])}}return a}function lo(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Rg(e,t,l){if(l===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 Sm(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function Bg(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(l.state.loading&4)){if(l.instance===null){var n=oa(a.href),i=t.querySelector(Cn(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ki.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,de(i);return}i=t.ownerDocument||t,a=bm(a),(n=Fe.get(n))&&_r(a,n),i=i.createElement("link"),de(i);var s=i;s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),xe(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&!(l.state.loading&3)&&(e.count++,l=ki.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var hu=0;function Hg(e,t){return e.stylesheets&&e.count===0&&yi(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&yi(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&hu===0&&(hu=62500*yg());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&yi(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>hu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function ki(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ki=null;function yi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ki=new Map,t.forEach(Lg,e),Ki=null,ki.call(e))}function Lg(e,t){if(!(t.state.loading&4)){var l=Ki.get(e);if(l)var a=l.get(null);else{l=new Map,Ki.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var s=n[i];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(l.set(s.dataset.precedence,s),a=s)}a&&l.set(null,a)}n=t.instance,s=n.getAttribute("data-precedence"),i=l.get(s)||a,i===a&&l.set(null,n),l.set(s,n),this.count++,a=ki.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var mn={$$typeof:pt,Provider:null,Consumer:null,_currentValue:ml,_currentValue2:ml,_threadCount:0};function qg(e,t,l,a,n,i,s,u,c){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=Bs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bs(0),this.hiddenUpdates=Bs(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function _m(e,t,l,a,n,i,s,u,c,f,h,m){return e=new qg(e,t,l,s,c,f,h,m,u),t=1,i===!0&&(t|=24),i=De(3,null,null,t),e.current=i,i.stateNode=e,t=$c(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Ic(i),e}function Em(e){return e?(e=Zl,e):Zl}function zm(e,t,l,a,n,i){n=Em(n),a.context===null?a.context=n:a.pendingContext=n,a=kt(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Kt(e,a,t),l!==null&&(Ne(l,e,t),Za(l,e,t))}function ao(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function zr(e,t){ao(e,t),(e=e.alternate)&&ao(e,t)}function jm(e){if(e.tag===13||e.tag===31){var t=Al(e,67108864);t!==null&&Ne(t,e,67108864),zr(e,67108864)}}function no(e){if(e.tag===13||e.tag===31){var t=Le();t=Rc(t);var l=Al(e,t);l!==null&&Ne(l,e,t),zr(e,t)}}var Ji=!0;function Yg(e,t,l,a){var n=w.T;w.T=null;var i=V.p;try{V.p=2,jr(e,t,l,a)}finally{V.p=i,w.T=n}}function Vg(e,t,l,a){var n=w.T;w.T=null;var i=V.p;try{V.p=8,jr(e,t,l,a)}finally{V.p=i,w.T=n}}function jr(e,t,l,a){if(Ji){var n=_c(a);if(n===null)ou(e,t,a,$i,l),io(e,a);else if(Xg(n,e,t,l,a))a.stopPropagation();else if(io(e,a),t&4&&-1<Gg.indexOf(e)){for(;n!==null;){var i=va(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var s=ol(i.pendingLanes);if(s!==0){var u=i;for(u.pendingLanes|=2,u.entangledLanes|=2;s;){var c=1<<31-He(s);u.entanglements[1]|=c,s&=~c}rt(i),!(Y&6)&&(Li=Re()+500,Mn(0))}}break;case 31:case 13:u=Al(i,2),u!==null&&Ne(u,i,2),xs(),zr(i,2)}if(i=_c(a),i===null&&ou(e,t,a,$i,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else ou(e,t,a,null,l)}}function _c(e){return e=qc(e),Tr(e)}var $i=null;function Tr(e){if($i=null,e=ql(e),e!==null){var t=bn(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=Zo(t),e!==null)return e;e=null}else if(l===31){if(e=ko(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return $i=e,null}function Tm(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(N0()){case Fo:return 2;case Wo:return 8;case zi:case A0:return 32;case Io:return 268435456;default:return 32}default:return 32}}var Ec=!1,Ft=null,Wt=null,It=null,vn=new Map,gn=new Map,Ht=[],Gg="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 io(e,t){switch(e){case"focusin":case"focusout":Ft=null;break;case"dragenter":case"dragleave":Wt=null;break;case"mouseover":case"mouseout":It=null;break;case"pointerover":case"pointerout":vn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":gn.delete(t.pointerId)}}function Oa(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=va(t),t!==null&&jm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Xg(e,t,l,a,n){switch(t){case"focusin":return Ft=Oa(Ft,e,t,l,a,n),!0;case"dragenter":return Wt=Oa(Wt,e,t,l,a,n),!0;case"mouseover":return It=Oa(It,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return vn.set(i,Oa(vn.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,gn.set(i,Oa(gn.get(i)||null,e,t,l,a,n)),!0}return!1}function Nm(e){var t=ql(e.target);if(t!==null){var l=bn(t);if(l!==null){if(t=l.tag,t===13){if(t=Zo(l),t!==null){e.blockedOn=t,Gr(e.priority,function(){no(l)});return}}else if(t===31){if(t=ko(l),t!==null){e.blockedOn=t,Gr(e.priority,function(){no(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function pi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=_c(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Vu=a,l.target.dispatchEvent(a),Vu=null}else return t=va(l),t!==null&&jm(t),e.blockedOn=l,!1;t.shift()}return!0}function so(e,t,l){pi(e)&&l.delete(t)}function Qg(){Ec=!1,Ft!==null&&pi(Ft)&&(Ft=null),Wt!==null&&pi(Wt)&&(Wt=null),It!==null&&pi(It)&&(It=null),vn.forEach(so),gn.forEach(so)}function $n(e,t){e.blockedOn===t&&(e.blockedOn=null,Ec||(Ec=!0,re.unstable_scheduleCallback(re.unstable_NormalPriority,Qg)))}var Fn=null;function uo(e){Fn!==e&&(Fn=e,re.unstable_scheduleCallback(re.unstable_NormalPriority,function(){Fn===e&&(Fn=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(Tr(a||l)===null)continue;break}var i=va(l);i!==null&&(e.splice(t,3),t-=3,ac(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function da(e){function t(c){return $n(c,e)}Ft!==null&&$n(Ft,e),Wt!==null&&$n(Wt,e),It!==null&&$n(It,e),vn.forEach(t),gn.forEach(t);for(var l=0;l<Ht.length;l++){var a=Ht[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ht.length&&(l=Ht[0],l.blockedOn===null);)Nm(l),l.blockedOn===null&&Ht.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],s=n[Ae]||null;if(typeof i=="function")s||uo(l);else if(s){var u=null;if(i&&i.hasAttribute("formAction")){if(n=i,s=i[Ae]||null)u=s.formAction;else if(Tr(n)!==null)continue}else u=s.action;typeof u=="function"?l[a+1]=u:(l.splice(a,3),a-=3),uo(l)}}}function Am(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(s){return n=s})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function Nr(e){this._internalRoot=e}_s.prototype.render=Nr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(z(409));var l=t.current,a=Le();zm(l,a,e,t,null,null)};_s.prototype.unmount=Nr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zm(e.current,2,null,e,null,null),xs(),t[ma]=null}};function _s(e){this._internalRoot=e}_s.prototype.unstable_scheduleHydration=function(e){if(e){var t=ad();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Ht.length&&t!==0&&t<Ht[l].priority;l++);Ht.splice(l,0,e),l===0&&Nm(e)}};var co=Xo.version;if(co!=="19.2.8")throw Error(z(527,co,"19.2.8"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(z(188)):(e=Object.keys(e).join(","),Error(z(268,e)));return e=b0(t),e=e!==null?Ko(e):null,e=e===null?null:e.stateNode,e};var Zg={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wn.isDisabled&&Wn.supportsFiber)try{Sn=Wn.inject(Zg),Be=Wn}catch{}}ss.createRoot=function(e,t){if(!Qo(e))throw Error(z(299));var l=!1,a="",n=xh,i=bh,s=Sh;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=_m(e,1,!1,null,null,l,a,null,n,i,s,Am),e[ma]=t.current,Sr(e),new Nr(t)};ss.hydrateRoot=function(e,t,l){if(!Qo(e))throw Error(z(299));var a=!1,n="",i=xh,s=bh,u=Sh,c=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(s=l.onCaughtError),l.onRecoverableError!==void 0&&(u=l.onRecoverableError),l.formState!==void 0&&(c=l.formState)),t=_m(e,1,!0,t,l??null,a,n,c,i,s,u,Am),t.context=Em(null),l=t.current,a=Le(),a=Rc(a),n=kt(a),n.callback=null,Kt(l,n,a),l=a,t.current.lanes=l,En(t,l),rt(t),e[ma]=t.current,Sr(e),new _s(t)};ss.version="19.2.8";function Mm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mm)}catch(e){console.error(e)}}Mm(),Yo.exports=ss;var kg=Yo.exports;const Kg=r0(kg);var Cm={exports:{}},Om={};/**
34
+ * @license React
35
+ * use-sync-external-store-with-selector.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Dn=S;function Jg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $g=typeof Object.is=="function"?Object.is:Jg,Fg=Dn.useSyncExternalStore,Wg=Dn.useRef,Ig=Dn.useEffect,Pg=Dn.useMemo,ey=Dn.useDebugValue;Om.useSyncExternalStoreWithSelector=function(e,t,l,a,n){var i=Wg(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Pg(function(){function c(g){if(!f){if(f=!0,h=g,g=a(g),n!==void 0&&s.hasValue){var x=s.value;if(n(x,g))return m=x}return m=g}if(x=m,$g(h,g))return x;var b=a(g);return n!==void 0&&n(x,b)?(h=g,x):(h=g,m=b)}var f=!1,h,m,o=l===void 0?null:l;return[function(){return c(t())},o===null?void 0:function(){return c(o())}]},[t,l,a,n]);var u=Fg(e,i[0],i[1]);return Ig(function(){s.hasValue=!0,s.value=u},[u]),ey(u),u};Cm.exports=Om;var ty=Cm.exports;function ly(e){e()}function ay(){let e=null,t=null;return{clear(){e=null,t=null},notify(){ly(()=>{let l=e;for(;l;)l.callback(),l=l.next})},get(){const l=[];let a=e;for(;a;)l.push(a),a=a.next;return l},subscribe(l){let a=!0;const n=t={callback:l,next:null,prev:t};return n.prev?n.prev.next=n:e=n,function(){!a||e===null||(a=!1,n.next?n.next.prev=n.prev:t=n.prev,n.prev?n.prev.next=n.next:e=n.next)}}}}var ro={notify(){},get:()=>[]};function ny(e,t){let l,a=ro,n=0,i=!1;function s(b){h();const E=a.subscribe(b);let v=!1;return()=>{v||(v=!0,E(),m())}}function u(){a.notify()}function c(){x.onStateChange&&x.onStateChange()}function f(){return i}function h(){n++,l||(l=e.subscribe(c),a=ay())}function m(){n--,l&&n===0&&(l(),l=void 0,a.clear(),a=ro)}function o(){i||(i=!0,h())}function g(){i&&(i=!1,m())}const x={addNestedSub:s,notifyNestedSubs:u,handleChangeWrapper:c,isSubscribed:f,trySubscribe:o,tryUnsubscribe:g,getListeners:()=>a};return x}var iy=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",sy=iy(),uy=()=>typeof navigator<"u"&&navigator.product==="ReactNative",cy=uy(),ry=()=>sy||cy?S.useLayoutEffect:S.useEffect,fy=ry(),mu=Symbol.for("react-redux-context"),vu=typeof globalThis<"u"?globalThis:{};function oy(){if(!S.createContext)return{};const e=vu[mu]??(vu[mu]=new Map);let t=e.get(S.createContext);return t||(t=S.createContext(null),e.set(S.createContext,t)),t}var al=oy();function dy(e){const{children:t,context:l,serverState:a,store:n}=e,i=S.useMemo(()=>{const c=ny(n);return{store:n,subscription:c,getServerState:a?()=>a:void 0}},[n,a]),s=S.useMemo(()=>n.getState(),[n]);fy(()=>{const{subscription:c}=i;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==n.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[i,s]);const u=l||al;return S.createElement(u.Provider,{value:i},t)}var hy=dy;function Ar(e=al){return function(){return S.useContext(e)}}var Dm=Ar();function wm(e=al){const t=e===al?Dm:Ar(e),l=()=>{const{store:a}=t();return a};return Object.assign(l,{withTypes:()=>l}),l}var my=wm();function vy(e=al){const t=e===al?my:wm(e),l=()=>t().dispatch;return Object.assign(l,{withTypes:()=>l}),l}var gy=vy(),yy=(e,t)=>e===t;function py(e=al){const t=e===al?Dm:Ar(e),l=(a,n={})=>{const{equalityFn:i=yy}=typeof n=="function"?{equalityFn:n}:n,s=t(),{store:u,subscription:c,getServerState:f}=s;S.useRef(!0);const h=S.useCallback({[a.name](o){return a(o)}}[a.name],[a]),m=ty.useSyncExternalStoreWithSelector(c.addNestedSub,u.getState,f||u.getState,h,i);return S.useDebugValue(m),m};return Object.assign(l,{withTypes:()=>l}),l}var xy=py();function me(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var by=typeof Symbol=="function"&&Symbol.observable||"@@observable",fo=by,gu=()=>Math.random().toString(36).substring(7).split("").join("."),Sy={INIT:`@@redux/INIT${gu()}`,REPLACE:`@@redux/REPLACE${gu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${gu()}`},Fi=Sy;function Mr(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Um(e,t,l){if(typeof e!="function")throw new Error(me(2));if(typeof t=="function"&&typeof l=="function"||typeof l=="function"&&typeof arguments[3]=="function")throw new Error(me(0));if(typeof t=="function"&&typeof l>"u"&&(l=t,t=void 0),typeof l<"u"){if(typeof l!="function")throw new Error(me(1));return l(Um)(e,t)}let a=e,n=t,i=new Map,s=i,u=0,c=!1;function f(){s===i&&(s=new Map,i.forEach((E,v)=>{s.set(v,E)}))}function h(){if(c)throw new Error(me(3));return n}function m(E){if(typeof E!="function")throw new Error(me(4));if(c)throw new Error(me(5));let v=!0;f();const d=u++;return s.set(d,E),function(){if(v){if(c)throw new Error(me(6));v=!1,f(),s.delete(d),i=null}}}function o(E){if(!Mr(E))throw new Error(me(7));if(typeof E.type>"u")throw new Error(me(8));if(typeof E.type!="string")throw new Error(me(17));if(c)throw new Error(me(9));try{c=!0,n=a(n,E)}finally{c=!1}return(i=s).forEach(d=>{d()}),E}function g(E){if(typeof E!="function")throw new Error(me(10));a=E,o({type:Fi.REPLACE})}function x(){const E=m;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(me(11));function d(){const p=v;p.next&&p.next(h())}return d(),{unsubscribe:E(d)}},[fo](){return this}}}return o({type:Fi.INIT}),{dispatch:o,subscribe:m,getState:h,replaceReducer:g,[fo]:x}}function _y(e){Object.keys(e).forEach(t=>{const l=e[t];if(typeof l(void 0,{type:Fi.INIT})>"u")throw new Error(me(12));if(typeof l(void 0,{type:Fi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(me(13))})}function Ey(e){const t=Object.keys(e),l={};for(let i=0;i<t.length;i++){const s=t[i];typeof e[s]=="function"&&(l[s]=e[s])}const a=Object.keys(l);let n;try{_y(l)}catch(i){n=i}return function(s={},u){if(n)throw n;let c=!1;const f={};for(let h=0;h<a.length;h++){const m=a[h],o=l[m],g=s[m],x=o(g,u);if(typeof x>"u")throw u&&u.type,new Error(me(14));f[m]=x,c=c||x!==g}return c=c||a.length!==Object.keys(s).length,c?f:s}}function Wi(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,l)=>(...a)=>t(l(...a)))}function zy(...e){return t=>(l,a)=>{const n=t(l,a);let i=()=>{throw new Error(me(15))};const s={getState:n.getState,dispatch:(c,...f)=>i(c,...f)},u=e.map(c=>c(s));return i=Wi(...u)(n.dispatch),{...n,dispatch:i}}}function jy(e){return Mr(e)&&"type"in e&&typeof e.type=="string"}var Rm=Symbol.for("immer-nothing"),oo=Symbol.for("immer-draftable"),Se=Symbol.for("immer-state");function lt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ue=Object,ha=Ue.getPrototypeOf,Ii="constructor",Es="prototype",zc="configurable",Pi="enumerable",xi="writable",yn="value",Ct=e=>!!e&&!!e[Se];function We(e){var t;return e?Bm(e)||js(e)||!!e[oo]||!!((t=e[Ii])!=null&&t[oo])||Ts(e)||Ns(e):!1}var Ty=Ue[Es][Ii].toString(),ho=new WeakMap;function Bm(e){if(!e||!Cr(e))return!1;const t=ha(e);if(t===null||t===Ue[Es])return!0;const l=Ue.hasOwnProperty.call(t,Ii)&&t[Ii];if(l===Object)return!0;if(!Bl(l))return!1;let a=ho.get(l);return a===void 0&&(a=Function.toString.call(l),ho.set(l,a)),a===Ty}function zs(e,t,l=!0){wn(e)===0?(l?Reflect.ownKeys(e):Ue.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((a,n)=>t(n,a,e))}function wn(e){const t=e[Se];return t?t.type_:js(e)?1:Ts(e)?2:Ns(e)?3:0}var yu=(e,t,l=wn(e))=>l===2?e.has(t):Ue[Es].hasOwnProperty.call(e,t),jc=(e,t,l=wn(e))=>l===2?e.get(t):e[t],es=(e,t,l,a=wn(e))=>{a===2?e.set(t,l):a===3?e.add(l):e[t]=l};function Ny(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var js=Array.isArray,Ts=e=>e instanceof Map,Ns=e=>e instanceof Set,Cr=e=>typeof e=="object",Bl=e=>typeof e=="function",pu=e=>typeof e=="boolean";function Ay(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var gt=e=>e.copy_||e.base_,Or=e=>e.modified_?e.copy_:e.base_;function Tc(e,t){if(Ts(e))return new Map(e);if(Ns(e))return new Set(e);if(js(e))return Array[Es].slice.call(e);const l=Bm(e);if(t===!0||t==="class_only"&&!l){const a=Ue.getOwnPropertyDescriptors(e);delete a[Se];let n=Reflect.ownKeys(a);for(let i=0;i<n.length;i++){const s=n[i],u=a[s];u[xi]===!1&&(u[xi]=!0,u[zc]=!0),(u.get||u.set)&&(a[s]={[zc]:!0,[xi]:!0,[Pi]:u[Pi],[yn]:e[s]})}return Ue.create(ha(e),a)}else{const a=ha(e);if(a!==null&&l)return{...e};const n=Ue.create(a);return Ue.assign(n,e)}}function Dr(e,t=!1){return As(e)||Ct(e)||!We(e)||(wn(e)>1&&Ue.defineProperties(e,{set:In,add:In,clear:In,delete:In}),Ue.freeze(e),t&&zs(e,(l,a)=>{Dr(a,!0)},!1)),e}function My(){lt(2)}var In={[yn]:My};function As(e){return e===null||!Cr(e)?!0:Ue.isFrozen(e)}var ts="MapSet",Nc="Patches",mo="ArrayMethods",Hm={};function zl(e){const t=Hm[e];return t||lt(0,e),t}var vo=e=>!!Hm[e],pn,Lm=()=>pn,Cy=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:vo(ts)?zl(ts):void 0,arrayMethodsPlugin_:vo(mo)?zl(mo):void 0});function go(e,t){t&&(e.patchPlugin_=zl(Nc),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ac(e){Mc(e),e.drafts_.forEach(Oy),e.drafts_=null}function Mc(e){e===pn&&(pn=e.parent_)}var yo=e=>pn=Cy(pn,e);function Oy(e){const t=e[Se];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function po(e,t){t.unfinalizedDrafts_=t.drafts_.length;const l=t.drafts_[0];if(e!==void 0&&e!==l){l[Se].modified_&&(Ac(t),lt(4)),We(e)&&(e=xo(t,e));const{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(l[Se].base_,e,t)}else e=xo(t,l);return Dy(t,e,!0),Ac(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Rm?e:void 0}function xo(e,t){if(As(t))return t;const l=t[Se];if(!l)return ls(t,e.handledSet_,e);if(!Ms(l,e))return t;if(!l.modified_)return l.base_;if(!l.finalized_){const{callbacks_:a}=l;if(a)for(;a.length>0;)a.pop()(e);Vm(l,e)}return l.copy_}function Dy(e,t,l=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Dr(t,l)}function qm(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ms=(e,t)=>e.scope_===t,wy=[];function Ym(e,t,l,a){const n=gt(e),i=e.type_;if(a!==void 0&&jc(n,a,i)===t){es(n,a,l,i);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;zs(n,(c,f)=>{if(Ct(f)){const h=u.get(f)||[];h.push(c),u.set(f,h)}})}const s=e.draftLocations_.get(t)??wy;for(const u of s)es(n,u,l,i)}function Uy(e,t,l){e.callbacks_.push(function(n){var u;const i=t;if(!i||!Ms(i,n))return;(u=n.mapSetPlugin_)==null||u.fixSetContents(i);const s=Or(i);Ym(e,i.draft_??i,s,l),Vm(i,n)})}function Vm(e,t){var a;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((a=e.assigned_)==null?void 0:a.size)??0)>0)){const{patchPlugin_:n}=t;if(n){const i=n.getPath(e);i&&n.generatePatches_(e,i,t)}qm(e)}}function Ry(e,t,l){const{scope_:a}=e;if(Ct(l)){const n=l[Se];Ms(n,a)&&n.callbacks_.push(function(){bi(e);const s=Or(n);Ym(e,l,s,t)})}else We(l)&&e.callbacks_.push(function(){const i=gt(e);e.type_===3?i.has(l)&&ls(l,a.handledSet_,a):jc(i,t,e.type_)===l&&a.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ls(jc(e.copy_,t,e.type_),a.handledSet_,a)})}function ls(e,t,l){return!l.immer_.autoFreeze_&&l.unfinalizedDrafts_<1||Ct(e)||t.has(e)||!We(e)||As(e)||(t.add(e),zs(e,(a,n)=>{if(Ct(n)){const i=n[Se];if(Ms(i,l)){const s=Or(i);es(e,a,s,e.type_),qm(i)}}else We(n)&&ls(n,t,l)})),e}function By(e,t){const l=js(e),a={type_:l?1:0,scope_:t?t.scope_:Lm(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let n=a,i=as;l&&(n=[a],i=xn);const{revoke:s,proxy:u}=Proxy.revocable(n,i);return a.draft_=u,a.revoke_=s,[u,a]}var as={get(e,t){if(t===Se)return e;let l=e.scope_.arrayMethodsPlugin_;const a=e.type_===1&&typeof t=="string";if(a&&l!=null&&l.isArrayOperationMethod(t))return l.createMethodInterceptor(e,t);const n=gt(e);if(!yu(n,t,e.type_))return Ly(e,n,t);const i=n[t];if(e.finalized_||!We(i)||a&&e.operationMethod&&(l!=null&&l.isMutatingArrayMethod(e.operationMethod))&&Ay(t))return i;if(i===xu(e.base_,t)||Hy(e,t,i)){bi(e);const s=e.type_===1?+t:t,u=Oc(e.scope_,i,e,s);return e.copy_[s]=u}return i},has(e,t){return t in gt(e)},ownKeys(e){return Reflect.ownKeys(gt(e))},set(e,t,l){const a=Gm(gt(e),t);if(a!=null&&a.set)return a.set.call(e.draft_,l),!0;if(!e.modified_){const n=xu(gt(e),t),i=n==null?void 0:n[Se];if(i&&i.base_===l)return e.copy_[t]=l,e.assigned_.set(t,!1),!0;if(Ny(l,n)&&(l!==void 0||yu(e.base_,t,e.type_)))return!0;bi(e),Cc(e)}return e.copy_[t]===l&&(l!==void 0||yu(e.copy_,t,e.type_))||Number.isNaN(l)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=l,e.assigned_.set(t,!0),Ry(e,t,l)),!0},deleteProperty(e,t){return bi(e),xu(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Cc(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const l=gt(e),a=Reflect.getOwnPropertyDescriptor(l,t);return a&&{[xi]:!0,[zc]:e.type_!==1||t!=="length",[Pi]:a[Pi],[yn]:l[t]}},defineProperty(){lt(11)},getPrototypeOf(e){return ha(e.base_)},setPrototypeOf(){lt(12)}},xn={};for(let e in as){let t=as[e];xn[e]=function(){const l=arguments;return l[0]=l[0][0],t.apply(this,l)}}xn.deleteProperty=function(e,t){return xn.set.call(this,e,t,void 0)};xn.set=function(e,t,l){return as.set.call(this,e[0],t,l,e[0])};function xu(e,t){const l=e[Se];return(l?gt(l):e)[t]}function Hy(e,t,l){var a;return e.type_!==1||!e.allIndicesReassigned_||(a=e.assigned_)!=null&&a.get(t)||!We(l)||l[Se]?!1:e.baseRefs_.has(l)}function Ly(e,t,l){var n;const a=Gm(t,l);return a?yn in a?a[yn]:(n=a.get)==null?void 0:n.call(e.draft_):void 0}function Gm(e,t){if(!(t in e))return;let l=ha(e);for(;l;){const a=Object.getOwnPropertyDescriptor(l,t);if(a)return a;l=ha(l)}}function Cc(e){e.modified_||(e.modified_=!0,e.parent_&&Cc(e.parent_))}function bi(e){e.copy_||(e.assigned_=new Map,e.copy_=Tc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qy=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,l,a)=>{if(Bl(t)&&!Bl(l)){const i=l;l=t;const s=this;return function(c=i,...f){return s.produce(c,h=>l.call(this,h,...f))}}Bl(l)||lt(6),a!==void 0&&!Bl(a)&&lt(7);let n;if(We(t)){const i=yo(this),s=Oc(i,t,void 0);let u=!0;try{n=l(s),u=!1}finally{u?Ac(i):Mc(i)}return go(i,a),po(n,i)}else if(!t||!Cr(t)){if(n=l(t),n===void 0&&(n=t),n===Rm&&(n=void 0),this.autoFreeze_&&Dr(n,!0),a){const i=[],s=[];zl(Nc).generateReplacementPatches_(t,n,{patches_:i,inversePatches_:s}),a(i,s)}return n}else lt(1,t)},this.produceWithPatches=(t,l)=>{if(Bl(t))return(s,...u)=>this.produceWithPatches(s,c=>t(c,...u));let a,n;return[this.produce(t,l,(s,u)=>{a=s,n=u}),a,n]},pu(e==null?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),pu(e==null?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),pu(e==null?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){We(e)||lt(8),Ct(e)&&(e=Yy(e));const t=yo(this),l=Oc(t,e,void 0);return l[Se].isManual_=!0,Mc(t),l}finishDraft(e,t){const l=e&&e[Se];(!l||!l.isManual_)&&lt(9);const{scope_:a}=l;return go(a,t),po(void 0,a)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let l;for(l=t.length-1;l>=0;l--){const n=t[l];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}l>-1&&(t=t.slice(l+1));const a=zl(Nc).applyPatches_;return Ct(e)?a(e,t):this.produce(e,n=>a(n,t))}};function Oc(e,t,l,a){const[n,i]=Ts(t)?zl(ts).proxyMap_(t,l):Ns(t)?zl(ts).proxySet_(t,l):By(t,l);return((l==null?void 0:l.scope_)??Lm()).drafts_.push(n),i.callbacks_=(l==null?void 0:l.callbacks_)??[],i.key_=a,l&&a!==void 0?Uy(l,i,a):i.callbacks_.push(function(c){var h;(h=c.mapSetPlugin_)==null||h.fixSetContents(i);const{patchPlugin_:f}=c;i.modified_&&f&&f.generatePatches_(i,[],c)}),n}function Yy(e){return Ct(e)||lt(10,e),Xm(e)}function Xm(e){if(!We(e)||As(e))return e;const t=e[Se];let l,a=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,l=Tc(e,t.scope_.immer_.useStrictShallowCopy_),a=t.scope_.immer_.shouldUseStrictIteration()}else l=Tc(e,!0);return zs(l,(n,i)=>{es(l,n,Xm(i))},a),t&&(t.finalized_=!1),l}var bu=globalThis.Iterator;bu==null||bu.from;var Vy=new qy,Qm=Vy.produce,Gy=class{constructor(e){this.value=e}deref(){return this.value}},Xy=()=>typeof WeakRef>"u"?Gy:WeakRef,Zm=Xy(),Qy=0,Pn=1;function Da(){return{s:Qy,v:void 0,o:null,p:null}}function Zy(e){return e instanceof Zm?e.deref():e}function km(e,t={}){let l=Da();const{resultEqualityCheck:a,maxSize:n}=t,i=n!==void 0;if(i&&(!Number.isInteger(n)||n<1))throw new TypeError(`maxSize must be a positive integer, received: ${n}`);let s=null,u=0,c,f=0;function h(){u>=n&&(s=l,l=Da(),u=0)}function m(){let o=l;const{length:g}=arguments;for(let E=0,v=g;E<v;E++){const d=arguments[E];if(typeof d=="function"||typeof d=="object"&&d!==null){let y=o.o;y===null&&(o.o=y=new WeakMap);const p=y.get(d);p===void 0?(o=Da(),y.set(d,o)):o=p}else{let y=o.p;y===null&&(o.p=y=new Map);const p=y.get(d);p===void 0?(o=Da(),y.set(d,o),u++):o=p}}if(o.s===Pn)return o.v;if(s!==null){let E=s;for(let v=0,d=g;v<d;v++){const y=arguments[v];let p;if(typeof y=="function"||typeof y=="object"&&y!==null){const _=E.o;p=_!==null?_.get(y):void 0}else{const _=E.p;p=_!==null?_.get(y):void 0}if(p===void 0){E=null;break}E=p}if(E!==null&&E.s===Pn){const v=o;return v.s=Pn,v.v=E.v,h(),E.v}}const x=o;let b=e.apply(null,arguments);if(f++,a){const E=Zy(c);E!=null&&a(E,b)&&(b=E,f!==0&&f--),c=typeof b=="object"&&b!==null||typeof b=="function"?new Zm(b):b}return x.s=Pn,x.v=b,i&&h(),b}return m.clearCache=()=>{l=Da(),s=null,u=0,m.resetResultsCount()},m.resultsCount=()=>f,m.resetResultsCount=()=>{f=0},m}function ky(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Ky(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(l=>typeof l=="function")){const l=e.map(a=>typeof a=="function"?`function ${a.name||"unnamed"}()`:typeof a).join(", ");throw new TypeError(`${t}[${l}]`)}}var bo=e=>Array.isArray(e)?e:[e];function Jy(e){const t=Array.isArray(e[0])?e[0]:e;return Ky(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $y(e,...t){const l=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,a=(...n)=>{let i=0,s=0,u,c={},f=n.pop();typeof f=="object"&&(c=f,f=n.pop()),ky(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...l,...c},{memoize:m,memoizeOptions:o=[],argsMemoize:g=km,argsMemoizeOptions:x=[]}=h,b=bo(o),E=bo(x),v=Jy(n),d=m(function(){return i++,f.apply(null,arguments)},...b),y=g(function(){s++;const{length:_}=v,N=new Array(_);for(let j=0;j<_;j++)N[j]=v[j].apply(null,arguments);return u=d.apply(null,N),u},...E);return Object.assign(y,{resultFunc:f,memoizedResultFunc:d,dependencies:v,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:m,argsMemoize:g})};return Object.assign(a,{withTypes:()=>a}),a}var Sa=$y(km);function Km(e){return({dispatch:l,getState:a})=>n=>i=>typeof i=="function"?i(l,a,e):n(i)}var Fy=Km(),Wy=Km,Iy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Wi:Wi.apply(null,arguments)},Py=e=>e&&typeof e.match=="function";function en(e,t){function l(...a){if(t){let n=t(...a);if(!n)throw new Error(zt(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:a[0]}}return l.toString=()=>`${e}`,l.type=e,l.match=a=>jy(a)&&a.type===e,l}var Jm=class qa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,qa.prototype)}static get[Symbol.species](){return qa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new qa(...t[0].concat(this)):new qa(...t.concat(this))}};function So(e){return We(e)?Qm(e,()=>{}):e}function ei(e,t,l){return e.has(t)?e.get(t):e.set(t,l(t)).get(t)}function ep(e){return typeof e=="boolean"}var tp=()=>function(t){const{thunk:l=!0,immutableCheck:a=!0,serializableCheck:n=!0,actionCreatorCheck:i=!0}=t??{};let s=new Jm;return l&&(ep(l)?s.push(Fy):s.push(Wy(l.extraArgument))),s},lp="RTK_autoBatch",_o=e=>t=>{setTimeout(t,e)},ap=(e,t)=>l=>{let a=!1;const n=()=>{a||(a=!0,cancelAnimationFrame(i),clearTimeout(s),l())},i=e(n),s=setTimeout(n,t)},np=(e={type:"raf"})=>t=>(...l)=>{const a=t(...l);let n=!0,i=!1,s=!1;const u=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?ap(window.requestAnimationFrame,100):_o(10):e.type==="callback"?e.queueNotification:_o(e.timeout),f=()=>{s=!1,i&&(i=!1,u.forEach(h=>h()))};return Object.assign({},a,{subscribe(h){const m=()=>n&&h(),o=a.subscribe(m);return u.add(h),()=>{o(),u.delete(h)}},dispatch(h){var m;try{return n=!((m=h==null?void 0:h.meta)!=null&&m[lp]),i=!n,i&&(s||(s=!0,c(f))),a.dispatch(h)}finally{n=!0}}})},ip=e=>function(l){const{autoBatch:a=!0}=l??{};let n=new Jm(e);return a&&n.push(np(typeof a=="object"?a:void 0)),n};function sp(e){const t=tp(),{reducer:l=void 0,middleware:a,devTools:n=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{};let u;if(typeof l=="function")u=l;else if(Mr(l))u=Ey(l);else throw new Error(zt(1));let c;typeof a=="function"?c=a(t):c=t();let f=Wi;n&&(f=Iy({trace:!1,...typeof n=="object"&&n}));const h=zy(...c),m=ip(h);let o=typeof s=="function"?s(m):m();const g=f(...o);return Um(u,i,g)}function $m(e){const t={},l=[];let a;const n={addCase(i,s){const u=typeof i=="string"?i:i.type;if(!u)throw new Error(zt(28));if(u in t)throw new Error(zt(29));return t[u]=s,n},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&l.push({matcher:i.settled,reducer:s.settled}),n},addMatcher(i,s){return l.push({matcher:i,reducer:s}),n},addDefaultCase(i){return a=i,n}};return e(n),[t,l,a]}function up(e){return typeof e=="function"}function cp(e,t){let[l,a,n]=$m(t),i;if(up(e))i=()=>So(e());else{const u=So(e);i=()=>u}function s(u=i(),c){let f=[l[c.type],...a.filter(({matcher:h})=>h(c)).map(({reducer:h})=>h)];return f.filter(h=>!!h).length===0&&(f=[n]),f.reduce((h,m)=>{if(m)if(Ct(h)){const g=m(h,c);return g===void 0?h:g}else{if(We(h))return Qm(h,o=>m(o,c));{const o=m(h,c);if(o===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return o}}return h},u)}return s.getInitialState=i,s}var rp=(e,t)=>Py(e)?e.match(t):e(t);function fp(...e){return t=>e.some(l=>rp(l,t))}var op="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",dp=(e=21)=>{let t="",l=e;for(;l--;)t+=op[Math.random()*64|0];return t},hp=["name","message","stack","code"],Su=class{constructor(e,t){cl(this,"payload");cl(this,"meta");cl(this,"_type");this.payload=e,this.meta=t}},Eo=class{constructor(e,t){cl(this,"payload");cl(this,"meta");cl(this,"_type");this.payload=e,this.meta=t}},mp=e=>{if(typeof e=="object"&&e!==null){const t={};for(const l of hp)typeof e[l]=="string"&&(t[l]=e[l]);return t}return{message:String(e)}},zo="External signal was aborted",vp=(()=>{function e(t,l,a){const n=en(t+"/fulfilled",(c,f,h,m)=>({payload:c,meta:{...m||{},arg:h,requestId:f,requestStatus:"fulfilled"}})),i=en(t+"/pending",(c,f,h)=>({payload:void 0,meta:{...h||{},arg:f,requestId:c,requestStatus:"pending"}})),s=en(t+"/rejected",(c,f,h,m,o)=>({payload:m,error:(a&&a.serializeError||mp)(c||"Rejected"),meta:{...o||{},arg:h,requestId:f,rejectedWithValue:!!m,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function u(c,{signal:f}={}){return(h,m,o)=>{const g=a!=null&&a.idGenerator?a.idGenerator(c):dp(),x=new AbortController;let b,E;function v(y){E=y,x.abort()}f&&(f.aborted?v(zo):f.addEventListener("abort",()=>v(zo),{once:!0}));const d=async function(){var _,N;let y;try{let j=(_=a==null?void 0:a.condition)==null?void 0:_.call(a,c,{getState:m,extra:o});if(yp(j)&&(j=await j),j===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const M=new Promise((A,O)=>{b=()=>{O({name:"AbortError",message:E||"Aborted"})},x.signal.addEventListener("abort",b,{once:!0})});h(i(g,c,(N=a==null?void 0:a.getPendingMeta)==null?void 0:N.call(a,{requestId:g,arg:c},{getState:m,extra:o}))),y=await Promise.race([M,Promise.resolve(l(c,{dispatch:h,getState:m,extra:o,requestId:g,signal:x.signal,abort:v,rejectWithValue:(A,O)=>new Su(A,O),fulfillWithValue:(A,O)=>new Eo(A,O)})).then(A=>{if(A instanceof Su)throw A;return A instanceof Eo?n(A.payload,g,c,A.meta):n(A,g,c)})])}catch(j){y=j instanceof Su?s(null,g,c,j.payload,j.meta):s(j,g,c)}finally{b&&x.signal.removeEventListener("abort",b)}return a&&!a.dispatchConditionRejection&&s.match(y)&&y.meta.condition||h(y),y}();return Object.assign(d,{abort:v,requestId:g,arg:c,unwrap(){return d.then(gp)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:n,settled:fp(s,n),typePrefix:t})}return e.withTypes=()=>e,e})();function gp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function yp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var pp=Symbol.for("rtk-slice-createasyncthunk");function xp(e,t){return`${e}/${t}`}function bp({creators:e}={}){var l;const t=(l=e==null?void 0:e.asyncThunk)==null?void 0:l[pp];return function(n){const{name:i,reducerPath:s=i}=n;if(!i)throw new Error(zt(11));const u=(typeof n.reducers=="function"?n.reducers(Ep()):n.reducers)||{},c=Object.keys(u),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(p,_){const N=typeof p=="string"?p:p.type;if(!N)throw new Error(zt(12));if(N in f.sliceCaseReducersByType)throw new Error(zt(13));return f.sliceCaseReducersByType[N]=_,h},addMatcher(p,_){return f.sliceMatchers.push({matcher:p,reducer:_}),h},exposeAction(p,_){return f.actionCreators[p]=_,h},exposeCaseReducer(p,_){return f.sliceCaseReducersByName[p]=_,h}};c.forEach(p=>{const _=u[p],N={reducerName:p,type:xp(i,p),createNotation:typeof n.reducers=="function"};jp(_)?Np(N,_,h,t):zp(N,_,h)});function m(){const[p={},_=[],N=void 0]=typeof n.extraReducers=="function"?$m(n.extraReducers):[n.extraReducers],j={...p,...f.sliceCaseReducersByType};return cp(n.initialState,M=>{for(let A in j)M.addCase(A,j[A]);for(let A of f.sliceMatchers)M.addMatcher(A.matcher,A.reducer);for(let A of _)M.addMatcher(A.matcher,A.reducer);N&&M.addDefaultCase(N)})}const o=p=>p,g=new Map,x=new WeakMap;let b;function E(p,_){return b||(b=m()),b(p,_)}function v(){return b||(b=m()),b.getInitialState()}function d(p,_=!1){function N(M){let A=M[p];return typeof A>"u"&&_&&(A=ei(x,N,v)),A}function j(M=o){const A=ei(g,_,()=>new WeakMap);return ei(A,M,()=>{const O={};for(const[G,fe]of Object.entries(n.selectors??{}))O[G]=Sp(fe,M,()=>ei(x,M,v),_);return O})}return{reducerPath:p,getSelectors:j,get selectors(){return j(N)},selectSlice:N}}const y={name:i,reducer:E,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:v,...d(s),injectInto(p,{reducerPath:_,...N}={}){const j=_??s;return p.inject({reducerPath:j,reducer:E},N),{...y,...d(j,!0)}}};return y}}function Sp(e,t,l,a){function n(i,...s){let u=t(i);return typeof u>"u"&&a&&(u=l()),e(u,...s)}return n.unwrapped=e,n}var _p=bp();function Ep(){function e(t,l){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...l}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...l){return t(...l)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,l){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:l}},asyncThunk:e}}function zp({type:e,reducerName:t,createNotation:l},a,n){let i,s;if("reducer"in a){if(l&&!Tp(a))throw new Error(zt(17));i=a.reducer,s=a.prepare}else i=a;n.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?en(e,s):en(e))}function jp(e){return e._reducerDefinitionType==="asyncThunk"}function Tp(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Np({type:e,reducerName:t},l,a,n){if(!n)throw new Error(zt(18));const{payloadCreator:i,fulfilled:s,pending:u,rejected:c,settled:f,options:h}=l,m=n(e,i,h);a.exposeAction(t,m),s&&a.addCase(m.fulfilled,s),u&&a.addCase(m.pending,u),c&&a.addCase(m.rejected,c),f&&a.addMatcher(m.settled,f),a.exposeCaseReducer(t,{fulfilled:s||ti,pending:u||ti,rejected:c||ti,settled:f||ti})}function ti(){}function zt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const Ap=vp("runtime/fetchHistory",async({sessionId:e,before:t,limit:l=100})=>{const a=localStorage.getItem("cascade_token")??"",n=`/api/runtime/logs/${e}?limit=${l}${t?`&before=${t}`:""}`,i=await fetch(n,{headers:{Authorization:`Bearer ${a}`}});if(!i.ok)throw new Error("Failed to fetch history");const s=await i.json();return{sessionId:e,logs:s}}),Mp={sessions:{},nodes:{},logIds:{},logs:{},activeSessionId:null,scope:"workspace",connected:!1,peerMessages:[]};function jo(e,t,l){for(const a of t){const n=a.sessionId??l??"",i=`${n}:${a.tierId}`,s=e[i],u=a.output??(s==null?void 0:s.output);e[i]={...s,...a,sessionId:n,output:u}}}function li(e,t,l,a=1e3){e.logIds[t]||(e.logIds[t]=new Set),e.logs[t]||(e.logs[t]=[]);const n=e.logIds[t],i=e.logs[t];for(const s of l)n.has(s.id)||(n.add(s.id),i.push(s));if(i.length>a){const s=i.splice(0,i.length-a);for(const u of s)n.delete(u.id)}}const Fm=_p({name:"runtime",initialState:Mp,reducers:{setConnected(e,t){e.connected=t.payload},setScope(e,t){e.scope=t.payload},setActiveSession(e,t){e.activeSessionId=t.payload},updateRTKSnapshot(e,t){var s;const{sessions:l,nodes:a,logs:n,scope:i}=t.payload;(i==="workspace"||i==="global")&&(e.scope=i);for(const u of l)e.sessions[u.sessionId]={...e.sessions[u.sessionId]??{},...u};if(!e.activeSessionId&&l.length>0&&(e.activeSessionId=((s=l.find(u=>u.status==="ACTIVE"))==null?void 0:s.sessionId)??l[0].sessionId),a!=null&&a.length&&jo(e.nodes,a),n!=null&&n.length)for(const u of n)u.sessionId&&li(e,u.sessionId,[u])},updateSessionDetails(e,t){var i;const{sessionId:l,nodes:a,logs:n}=t.payload;jo(e.nodes,a,l),li(e,l,n),(i=e.logs[l])==null||i.sort((s,u)=>new Date(s.timestamp).getTime()-new Date(u.timestamp).getTime())},appendLog(e,t){const l=t.payload;li(e,l.sessionId,[l])},clearFrontendGraphs(e){e.nodes={},e.logIds={},e.logs={}},removeSessionsBulk(e,t){var l,a;for(const n of t.payload){delete e.sessions[n];for(const i of Object.keys(e.nodes))((l=e.nodes[i])==null?void 0:l.sessionId)===n&&delete e.nodes[i];delete e.logs[n],delete e.logIds[n]}if(e.activeSessionId&&t.payload.includes(e.activeSessionId)){const n=Object.values(e.sessions);e.activeSessionId=((a=n[0])==null?void 0:a.sessionId)??null}},addPeerMessage(e,t){e.peerMessages.push(t.payload),e.peerMessages.length>200&&(e.peerMessages=e.peerMessages.slice(-200))}},extraReducers(e){e.addCase(Ap.fulfilled,(t,l)=>{var i;const{sessionId:a,logs:n}=l.payload;li(t,a,n,2e3),(i=t.logs[a])==null||i.sort((s,u)=>new Date(s.timestamp).getTime()-new Date(u.timestamp).getTime())})}}),{setConnected:To,setScope:rx,setActiveSession:Cp,updateRTKSnapshot:Wm,updateSessionDetails:Op,appendLog:Dp,clearFrontendGraphs:No,removeSessionsBulk:wp,addPeerMessage:Up}=Fm.actions,_a=e=>e.runtime,Rp=Sa(_a,e=>Object.values(e.sessions).sort((t,l)=>new Date(l.updatedAt).getTime()-new Date(t.updatedAt).getTime())),wr=Sa(_a,e=>e.activeSessionId?e.sessions[e.activeSessionId]??null:null),Bp=Sa(_a,e=>e.activeSessionId?Object.values(e.nodes).filter(t=>t.sessionId===e.activeSessionId):[]),Hp=Sa(_a,e=>e.activeSessionId?e.logs[e.activeSessionId]??[]:[]),Lp=Sa(_a,e=>e.connected),qp=Sa(_a,e=>e.peerMessages),Yp=Fm.reducer,Vp=sp({reducer:{runtime:Yp},middleware:e=>e({serializableCheck:{ignoredPaths:["runtime.logIds"]}})}),Cs=()=>gy(),Xt=xy;var Un={},Ur={};function Gp(e,t,l){for(var a=0,n=0,i=l.length;n<i;n++)a=l.charCodeAt(n),a<128?e.setUint8(t++,a):a<2048?(e.setUint8(t++,192|a>>6),e.setUint8(t++,128|a&63)):a<55296||a>=57344?(e.setUint8(t++,224|a>>12),e.setUint8(t++,128|a>>6&63),e.setUint8(t++,128|a&63)):(n++,a=65536+((a&1023)<<10|l.charCodeAt(n)&1023),e.setUint8(t++,240|a>>18),e.setUint8(t++,128|a>>12&63),e.setUint8(t++,128|a>>6&63),e.setUint8(t++,128|a&63))}function Xp(e){for(var t=0,l=0,a=0,n=e.length;a<n;a++)t=e.charCodeAt(a),t<128?l+=1:t<2048?l+=2:t<55296||t>=57344?l+=3:(a++,l+=4);return l}function Ya(e,t,l){var a=typeof l,n=0,i=0,s=0,u=0,c=0,f=0;if(a==="string"){if(c=Xp(l),c<32)e.push(c|160),f=1;else if(c<256)e.push(217,c),f=2;else if(c<65536)e.push(218,c>>8,c),f=3;else if(c<4294967296)e.push(219,c>>24,c>>16,c>>8,c),f=5;else throw new Error("String too long");return t.push({_str:l,_length:c,_offset:e.length}),f+c}if(a==="number")return Math.floor(l)!==l||!isFinite(l)?(e.push(203),t.push({_float:l,_length:8,_offset:e.length}),9):l>=0?l<128?(e.push(l),1):l<256?(e.push(204,l),2):l<65536?(e.push(205,l>>8,l),3):l<4294967296?(e.push(206,l>>24,l>>16,l>>8,l),5):(s=l/Math.pow(2,32)>>0,u=l>>>0,e.push(207,s>>24,s>>16,s>>8,s,u>>24,u>>16,u>>8,u),9):l>=-32?(e.push(l),1):l>=-128?(e.push(208,l),2):l>=-32768?(e.push(209,l>>8,l),3):l>=-2147483648?(e.push(210,l>>24,l>>16,l>>8,l),5):(s=Math.floor(l/Math.pow(2,32)),u=l>>>0,e.push(211,s>>24,s>>16,s>>8,s,u>>24,u>>16,u>>8,u),9);if(a==="object"){if(l===null)return e.push(192),1;if(Array.isArray(l)){if(c=l.length,c<16)e.push(c|144),f=1;else if(c<65536)e.push(220,c>>8,c),f=3;else if(c<4294967296)e.push(221,c>>24,c>>16,c>>8,c),f=5;else throw new Error("Array too large");for(n=0;n<c;n++)f+=Ya(e,t,l[n]);return f}if(l instanceof Date){var h=l.getTime();return s=Math.floor(h/Math.pow(2,32)),u=h>>>0,e.push(215,0,s>>24,s>>16,s>>8,s,u>>24,u>>16,u>>8,u),10}if(l instanceof ArrayBuffer){if(c=l.byteLength,c<256)e.push(196,c),f=2;else if(c<65536)e.push(197,c>>8,c),f=3;else if(c<4294967296)e.push(198,c>>24,c>>16,c>>8,c),f=5;else throw new Error("Buffer too large");return t.push({_bin:l,_length:c,_offset:e.length}),f+c}if(typeof l.toJSON=="function")return Ya(e,t,l.toJSON());var m=[],o="",g=Object.keys(l);for(n=0,i=g.length;n<i;n++)o=g[n],typeof l[o]!="function"&&m.push(o);if(c=m.length,c<16)e.push(c|128),f=1;else if(c<65536)e.push(222,c>>8,c),f=3;else if(c<4294967296)e.push(223,c>>24,c>>16,c>>8,c),f=5;else throw new Error("Object too large");for(n=0;n<c;n++)o=m[n],f+=Ya(e,t,o),f+=Ya(e,t,l[o]);return f}if(a==="boolean")return e.push(l?195:194),1;if(a==="undefined")return e.push(212,0,0),3;throw new Error("Could not encode")}function Qp(e){var t=[],l=[],a=Ya(t,l,e),n=new ArrayBuffer(a),i=new DataView(n),s=0,u=0,c=-1;l.length>0&&(c=l[0]._offset);for(var f,h=0,m=0,o=0,g=t.length;o<g;o++)if(i.setUint8(u+o,t[o]),o+1===c){if(f=l[s],h=f._length,m=u+c,f._bin)for(var x=new Uint8Array(f._bin),b=0;b<h;b++)i.setUint8(m+b,x[b]);else f._str?Gp(i,m,f._str):f._float!==void 0&&i.setFloat64(m,f._float);s++,u+=h,l[s]&&(c=l[s]._offset)}return n}var Zp=Qp;function Ea(e){if(this._offset=0,e instanceof ArrayBuffer)this._buffer=e,this._view=new DataView(this._buffer);else if(ArrayBuffer.isView(e))this._buffer=e.buffer,this._view=new DataView(this._buffer,e.byteOffset,e.byteLength);else throw new Error("Invalid argument")}function kp(e,t,l){for(var a="",n=0,i=t,s=t+l;i<s;i++){var u=e.getUint8(i);if(!(u&128)){a+=String.fromCharCode(u);continue}if((u&224)===192){a+=String.fromCharCode((u&31)<<6|e.getUint8(++i)&63);continue}if((u&240)===224){a+=String.fromCharCode((u&15)<<12|(e.getUint8(++i)&63)<<6|(e.getUint8(++i)&63)<<0);continue}if((u&248)===240){n=(u&7)<<18|(e.getUint8(++i)&63)<<12|(e.getUint8(++i)&63)<<6|(e.getUint8(++i)&63)<<0,n>=65536?(n-=65536,a+=String.fromCharCode((n>>>10)+55296,(n&1023)+56320)):a+=String.fromCharCode(n);continue}throw new Error("Invalid byte "+u.toString(16))}return a}Ea.prototype._array=function(e){for(var t=new Array(e),l=0;l<e;l++)t[l]=this._parse();return t};Ea.prototype._map=function(e){for(var t="",l={},a=0;a<e;a++)t=this._parse(),l[t]=this._parse();return l};Ea.prototype._str=function(e){var t=kp(this._view,this._offset,e);return this._offset+=e,t};Ea.prototype._bin=function(e){var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t};Ea.prototype._parse=function(){var e=this._view.getUint8(this._offset++),t,l=0,a=0,n=0,i=0;if(e<192)return e<128?e:e<144?this._map(e&15):e<160?this._array(e&15):this._str(e&31);if(e>223)return(255-e+1)*-1;switch(e){case 192:return null;case 194:return!1;case 195:return!0;case 196:return l=this._view.getUint8(this._offset),this._offset+=1,this._bin(l);case 197:return l=this._view.getUint16(this._offset),this._offset+=2,this._bin(l);case 198:return l=this._view.getUint32(this._offset),this._offset+=4,this._bin(l);case 199:return l=this._view.getUint8(this._offset),a=this._view.getInt8(this._offset+1),this._offset+=2,[a,this._bin(l)];case 200:return l=this._view.getUint16(this._offset),a=this._view.getInt8(this._offset+2),this._offset+=3,[a,this._bin(l)];case 201:return l=this._view.getUint32(this._offset),a=this._view.getInt8(this._offset+4),this._offset+=5,[a,this._bin(l)];case 202:return t=this._view.getFloat32(this._offset),this._offset+=4,t;case 203:return t=this._view.getFloat64(this._offset),this._offset+=8,t;case 204:return t=this._view.getUint8(this._offset),this._offset+=1,t;case 205:return t=this._view.getUint16(this._offset),this._offset+=2,t;case 206:return t=this._view.getUint32(this._offset),this._offset+=4,t;case 207:return n=this._view.getUint32(this._offset)*Math.pow(2,32),i=this._view.getUint32(this._offset+4),this._offset+=8,n+i;case 208:return t=this._view.getInt8(this._offset),this._offset+=1,t;case 209:return t=this._view.getInt16(this._offset),this._offset+=2,t;case 210:return t=this._view.getInt32(this._offset),this._offset+=4,t;case 211:return n=this._view.getInt32(this._offset)*Math.pow(2,32),i=this._view.getUint32(this._offset+4),this._offset+=8,n+i;case 212:if(a=this._view.getInt8(this._offset),this._offset+=1,a===0){this._offset+=1;return}return[a,this._bin(1)];case 213:return a=this._view.getInt8(this._offset),this._offset+=1,[a,this._bin(2)];case 214:return a=this._view.getInt8(this._offset),this._offset+=1,[a,this._bin(4)];case 215:return a=this._view.getInt8(this._offset),this._offset+=1,a===0?(n=this._view.getInt32(this._offset)*Math.pow(2,32),i=this._view.getUint32(this._offset+4),this._offset+=8,new Date(n+i)):[a,this._bin(8)];case 216:return a=this._view.getInt8(this._offset),this._offset+=1,[a,this._bin(16)];case 217:return l=this._view.getUint8(this._offset),this._offset+=1,this._str(l);case 218:return l=this._view.getUint16(this._offset),this._offset+=2,this._str(l);case 219:return l=this._view.getUint32(this._offset),this._offset+=4,this._str(l);case 220:return l=this._view.getUint16(this._offset),this._offset+=2,this._array(l);case 221:return l=this._view.getUint32(this._offset),this._offset+=4,this._array(l);case 222:return l=this._view.getUint16(this._offset),this._offset+=2,this._map(l);case 223:return l=this._view.getUint32(this._offset),this._offset+=4,this._map(l)}throw new Error("Could not parse")};function Kp(e){var t=new Ea(e),l=t._parse();if(t._offset!==e.byteLength)throw new Error(e.byteLength-t._offset+" trailing bytes");return l}var Jp=Kp;Ur.encode=Zp;Ur.decode=Jp;var Im={exports:{}};(function(e){e.exports=t;function t(a){if(a)return l(a)}function l(a){for(var n in t.prototype)a[n]=t.prototype[n];return a}t.prototype.on=t.prototype.addEventListener=function(a,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+a]=this._callbacks["$"+a]||[]).push(n),this},t.prototype.once=function(a,n){function i(){this.off(a,i),n.apply(this,arguments)}return i.fn=n,this.on(a,i),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(a,n){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+a];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+a],this;for(var s,u=0;u<i.length;u++)if(s=i[u],s===n||s.fn===n){i.splice(u,1);break}return i.length===0&&delete this._callbacks["$"+a],this},t.prototype.emit=function(a){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),i=this._callbacks["$"+a],s=1;s<arguments.length;s++)n[s-1]=arguments[s];if(i){i=i.slice(0);for(var s=0,u=i.length;s<u;++s)i[s].apply(this,n)}return this},t.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks["$"+a]||[]},t.prototype.hasListeners=function(a){return!!this.listeners(a).length}})(Im);var $p=Im.exports,Pm=Ur,Fp=$p;Un.protocol=5;var tn=Un.PacketType={CONNECT:0,DISCONNECT:1,EVENT:2,ACK:3,CONNECT_ERROR:4},Ao=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},e0=function(e){return typeof e=="string"},Mo=function(e){return Object.prototype.toString.call(e)==="[object Object]"};function t0(){}t0.prototype.encode=function(e){return[Pm.encode(e)]};function Rn(){}Fp(Rn.prototype);Rn.prototype.add=function(e){var t=Pm.decode(e);this.checkPacket(t),this.emit("decoded",t)};function Wp(e){switch(e.type){case tn.CONNECT:return e.data===void 0||Mo(e.data);case tn.DISCONNECT:return e.data===void 0;case tn.CONNECT_ERROR:return e0(e.data)||Mo(e.data);default:return Array.isArray(e.data)}}Rn.prototype.checkPacket=function(e){var t=Ao(e.type)&&e.type>=tn.CONNECT&&e.type<=tn.CONNECT_ERROR;if(!t)throw new Error("invalid packet type");if(!e0(e.nsp))throw new Error("invalid namespace");if(!Wp(e))throw new Error("invalid payload");var l=e.id===void 0||Ao(e.id);if(!l)throw new Error("invalid packet id")};Rn.prototype.destroy=function(){};Un.Encoder=t0;Un.Decoder=Rn;function Ip({url:e="/",token:t,activeSessionId:l,onRuntimeRefresh:a,onStreamToken:n,onCostUpdate:i,onEscalation:s}={}){const[u,c]=S.useState(null),f=Cs(),h=S.useRef(a),m=S.useRef(n),o=S.useRef(i),g=S.useRef(s);h.current=a,m.current=n,o.current=i,g.current=s;const x=S.useRef(l);x.current=l;const b=S.useRef(null);return S.useEffect(()=>{const E=v0(e,{auth:t?{token:t}:{},transports:["websocket","polling"],reconnection:!0,reconnectionDelay:500,parser:Un});return E.on("connect",()=>{f(To(!0)),E.emit("runtime:refresh",{scope:"workspace"});const v=x.current;v&&(E.emit("join:session",{sessionId:v}),b.current=v),c(E)}),E.on("disconnect",()=>{f(To(!1)),c(null)}),E.on("runtime:update",v=>{f(Wm(v))}),E.on("session:details",v=>{f(Op(v))}),E.on("log:new",v=>{f(Dp(v))}),E.on("runtime:refresh",v=>{var y;const d=v;(y=h.current)==null||y.call(h,d==null?void 0:d.scope)}),E.on("stream:token",v=>{var d;(d=m.current)==null||d.call(m,v)}),E.on("cost:update",v=>{var d;(d=o.current)==null||d.call(o,v)}),E.on("permission:user-required",v=>{var d;(d=g.current)==null||d.call(g,v)}),E.on("peer:message",v=>{f(Up(v))}),()=>{E.disconnect(),c(null),b.current=null}},[e,t,f]),S.useEffect(()=>{u&&l!==b.current&&(b.current&&u.emit("leave:session",{sessionId:b.current}),l&&u.emit("join:session",{sessionId:l}),b.current=l??null)},[u,l]),{socket:u}}const Pp=S.memo(function({onLogin:t}){const[l,a]=S.useState(""),[n,i]=S.useState(""),[s,u]=S.useState(!1),c=async f=>{f.preventDefault();const h=l.trim();if(h){u(!0),i("");try{const m=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:"admin",password:h})});if(m.ok){const o=await m.json();t(o.token)}else i("Invalid token — check your cascade dashboard config.")}catch{i("Cannot reach server. Is the dashboard running?")}finally{u(!1)}}};return r.jsxs("div",{className:"relative flex items-center justify-center w-full h-full bg-[var(--bg-base)] dot-grid overflow-hidden",children:[r.jsx("div",{className:"absolute top-[20%] left-[30%] w-[480px] h-[480px] rounded-full bg-[var(--accent)] opacity-[0.035] blur-[140px] pointer-events-none"}),r.jsx("div",{className:"absolute bottom-[20%] right-[25%] w-[320px] h-[320px] rounded-full bg-[var(--t3-color)] opacity-[0.03] blur-[120px] pointer-events-none"}),r.jsxs("form",{onSubmit:c,"aria-label":"Cascade AI login",className:`
42
+ relative z-10 w-full max-w-[360px]
43
+ glass-elevated rounded-[var(--radius-lg)]
44
+ p-8 shadow-dialog animate-fade-in-up
45
+ `,children:[r.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[r.jsx("div",{className:`
46
+ w-9 h-9 rounded-[var(--radius-sm)] bg-[var(--accent)]
47
+ flex items-center justify-center flex-shrink-0
48
+ shadow-[var(--shadow-glow-violet)]
49
+ `,children:r.jsx("span",{className:"text-white font-black text-[14px] font-mono",children:"C"})}),r.jsxs("div",{children:[r.jsx("h1",{className:"text-[15px] font-bold text-[var(--text-primary)] tracking-tight",children:"Cascade AI"}),r.jsx("p",{className:"section-label mt-0.5",children:"Dashboard"})]})]}),r.jsxs("div",{className:"mb-5",children:[r.jsx("label",{htmlFor:"token-input",className:"block section-label mb-2",children:"Access Token"}),r.jsx("input",{id:"token-input",type:"password",className:"input",placeholder:"paste your token here",value:l,onChange:f=>a(f.target.value),autoComplete:"current-password",autoFocus:!0}),n&&r.jsx("p",{role:"alert",className:"text-[11px] text-[var(--error)] mt-2 font-mono",children:n})]}),r.jsx("button",{type:"submit",disabled:s||!l.trim(),className:"btn btn-primary w-full justify-center py-2.5",children:s?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"w-3 h-3 rounded-full border border-white/40 border-t-white animate-spin"}),"Connecting…"]}):"Connect"}),r.jsxs("p",{className:"text-center text-[10px] text-[var(--text-faint)] mt-5 font-mono",children:["No token?"," ",r.jsx("code",{className:"text-[var(--text-muted)]",children:"dashboard.auth: false"})]})]})]})});/**
50
+ * @license lucide-react v0.460.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */const e1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l0=(...e)=>e.filter((t,l,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===l).join(" ").trim();/**
55
+ * @license lucide-react v0.460.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */var t1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
60
+ * @license lucide-react v0.460.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */const l1=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:l=2,absoluteStrokeWidth:a,className:n="",children:i,iconNode:s,...u},c)=>S.createElement("svg",{ref:c,...t1,width:t,height:t,stroke:e,strokeWidth:a?Number(l)*24/Number(t):l,className:l0("lucide",n),...u},[...s.map(([f,h])=>S.createElement(f,h)),...Array.isArray(i)?i:[i]]));/**
65
+ * @license lucide-react v0.460.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const be=(e,t)=>{const l=S.forwardRef(({className:a,...n},i)=>S.createElement(l1,{ref:i,iconNode:t,className:l0(`lucide-${e1(e)}`,a),...n}));return l.displayName=`${e}`,l};/**
70
+ * @license lucide-react v0.460.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */const a0=be("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
75
+ * @license lucide-react v0.460.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const a1=be("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
80
+ * @license lucide-react v0.460.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */const n1=be("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
85
+ * @license lucide-react v0.460.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */const n0=be("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
90
+ * @license lucide-react v0.460.0 - ISC
91
+ *
92
+ * This source code is licensed under the ISC license.
93
+ * See the LICENSE file in the root directory of this source tree.
94
+ */const _u=be("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
95
+ * @license lucide-react v0.460.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ */const i1=be("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
100
+ * @license lucide-react v0.460.0 - ISC
101
+ *
102
+ * This source code is licensed under the ISC license.
103
+ * See the LICENSE file in the root directory of this source tree.
104
+ */const s1=be("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
105
+ * @license lucide-react v0.460.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */const u1=be("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
110
+ * @license lucide-react v0.460.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */const c1=be("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
115
+ * @license lucide-react v0.460.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */const r1=be("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
120
+ * @license lucide-react v0.460.0 - ISC
121
+ *
122
+ * This source code is licensed under the ISC license.
123
+ * See the LICENSE file in the root directory of this source tree.
124
+ */const f1=be("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
125
+ * @license lucide-react v0.460.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */const o1=be("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
130
+ * @license lucide-react v0.460.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */const d1=be("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
135
+ * @license lucide-react v0.460.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */const Co=be("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
140
+ * @license lucide-react v0.460.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */const Oo=be("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
145
+ * @license lucide-react v0.460.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */const h1=be("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
150
+ * @license lucide-react v0.460.0 - ISC
151
+ *
152
+ * This source code is licensed under the ISC license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */const m1=be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),v1=[{id:"topology",icon:f1,label:"Agent Topology"},{id:"sessions",icon:u1,label:"Sessions"},{id:"logs",icon:i1,label:"Telemetry"},{id:"settings",icon:o1,label:"Settings"}];function Do({label:e}){return r.jsx("div",{role:"tooltip",className:`
155
+ absolute left-full ml-3 px-2.5 py-1.5
156
+ text-[10px] font-medium font-mono text-[var(--text-primary)]
157
+ bg-[var(--bg-overlay)] border border-[var(--border-strong)]
158
+ rounded-[var(--radius-sm)] whitespace-nowrap pointer-events-none
159
+ opacity-0 group-hover:opacity-100
160
+ translate-x-[-4px] group-hover:translate-x-0
161
+ transition-all duration-150 z-50
162
+ shadow-[var(--shadow-panel)]
163
+ `,children:e})}const g1=S.memo(function({activeTab:t,onTabChange:l,onLogout:a}){return r.jsxs("nav",{"aria-label":"Main navigation",className:`
164
+ flex flex-col items-center py-5 gap-1
165
+ w-[56px] flex-shrink-0 h-full z-20
166
+ bg-[var(--bg-surface)]
167
+ border-r border-[var(--border-subtle)]
168
+ `,children:[r.jsx("div",{className:`
169
+ mb-4 w-8 h-8 rounded-[var(--radius-sm)]
170
+ bg-[var(--accent)] flex items-center justify-center
171
+ shadow-[var(--shadow-glow-violet)] select-none
172
+ `,children:r.jsx("span",{className:"text-white font-black text-[13px] font-mono tracking-tighter",children:"C"})}),r.jsx("div",{className:"divider w-8 mb-2"}),r.jsx("div",{className:"flex flex-col gap-0.5 flex-1 w-full px-1.5",children:v1.map(({id:n,icon:i,label:s})=>{const u=t===n;return r.jsxs("div",{className:"relative group",children:[r.jsx("button",{id:`nav-${n}`,"aria-label":s,"aria-current":u?"page":void 0,onClick:()=>l(n),className:`nav-rail-btn w-full ${u?"active":""}`,children:r.jsx(i,{size:17,strokeWidth:u?2:1.75})}),r.jsx(Do,{label:s})]},n)})}),r.jsxs("div",{className:"relative group px-1.5 w-full",children:[r.jsx("button",{"aria-label":"Log out",onClick:a,className:"nav-rail-btn w-full text-[var(--text-faint)] hover:text-[var(--error)]",children:r.jsx(c1,{size:15,strokeWidth:1.75})}),r.jsx(Do,{label:"Log out"})]})]})});function y1(e){const[t,l]=S.useState(null);return S.useEffect(()=>{if(!e){l(null);return}let a=!1;const n=async()=>{const s=Date.now();try{await fetch("/api/ping",{cache:"no-store"}),a||l(Date.now()-s)}catch{a||l(null)}};n();const i=setInterval(n,5e3);return()=>{a=!0,clearInterval(i)}},[e]),t}function p1(e){const[t,l]=S.useState("");return S.useEffect(()=>{if(!e){l("");return}const a=()=>{const i=Date.now()-new Date(e).getTime(),s=Math.floor(i/36e5).toString().padStart(2,"0"),u=Math.floor(i%36e5/6e4).toString().padStart(2,"0"),c=Math.floor(i%6e4/1e3).toString().padStart(2,"0");l(`${s}:${u}:${c}`)};a();const n=setInterval(a,1e3);return()=>clearInterval(n)},[e]),t}function ai({label:e,value:t,highlight:l}){return r.jsxs("div",{className:"metric-chip",children:[r.jsx("span",{className:"label",children:e}),r.jsx("span",{className:`value ${l?"text-[var(--warning)]":""}`,children:t})]})}const x1=S.memo(function({isConnected:t,totalCostUsd:l,totalTokens:a}){const n=Xt(wr),i=y1(t),s=p1(n==null?void 0:n.startedAt);return r.jsxs("header",{"aria-label":"Dashboard header",className:`
173
+ flex items-center justify-between px-5 h-11
174
+ border-b border-[var(--border-subtle)]
175
+ bg-[var(--bg-surface)] flex-shrink-0 z-10
176
+ `,children:[r.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[r.jsx("span",{"aria-label":t?"Connected":"Disconnected",className:`
177
+ w-1.5 h-1.5 rounded-full transition-all duration-500
178
+ ${t?"bg-[var(--success)] shadow-[var(--shadow-glow-green)]":"bg-[var(--text-faint)]"}
179
+ `}),r.jsx("span",{className:"section-label",children:t?"Live":"Offline"})]}),n&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"divider-v h-4 flex-shrink-0"}),r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx("span",{className:"text-[12px] font-medium text-[var(--text-primary)] truncate max-w-[200px]",children:n.title||"Untitled Session"}),r.jsx("span",{className:`badge badge-${n.status} flex-shrink-0`,children:n.status})]})]})]}),r.jsxs("div",{className:"flex items-center gap-5",children:[i!==null&&r.jsx(ai,{label:"Ping",value:`${i}ms`}),s&&r.jsx(ai,{label:"Uptime",value:s}),r.jsx("div",{className:"divider-v h-4"}),r.jsx(ai,{label:"Tokens",value:a>=1e3?`${(a/1e3).toFixed(1)}k`:a.toLocaleString()}),r.jsx(ai,{label:"Cost",value:`$${l.toFixed(4)}`,highlight:l>1})]})]})}),Eu={T1:"var(--t1-color)",T2:"var(--t2-color)",T3:"var(--t3-color)"},wo={ACTIVE:"border-[var(--t3-color)] agent-node-ACTIVE",COMPLETED:"border-[var(--success)] agent-node-COMPLETED",FAILED:"border-[var(--error)] agent-node-FAILED",ESCALATED:"border-[var(--warning)] agent-node-ESCALATED",IDLE:"border-[var(--border-subtle)]"},b1=S.memo(function({data:t,selected:l}){const a=wo[t.status]??wo.IDLE;return r.jsxs("div",{"aria-label":`${t.role} agent: ${t.label}, status: ${t.status}`,className:`
180
+ relative px-3.5 py-3 glass min-w-[170px] max-w-[210px]
181
+ rounded-[var(--radius-md)] border transition-all duration-300
182
+ ${a}
183
+ ${l?"ring-2 ring-[var(--accent)] ring-offset-2 ring-offset-[var(--bg-base)]":""}
184
+ `,children:[r.jsx(Rr,{type:"target",position:Br.Top,className:"!w-1.5 !h-1.5 !bg-[var(--border-strong)] !border-none !top-[-4px]"}),r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("span",{className:"badge",style:{color:Eu[t.role],background:`color-mix(in srgb, ${Eu[t.role]} 10%, transparent)`,borderColor:`color-mix(in srgb, ${Eu[t.role]} 22%, transparent)`},children:t.role}),r.jsxs("div",{className:"flex items-center gap-1",children:[t.status==="ACTIVE"&&r.jsx("div",{className:"flex gap-[2px] items-center","aria-label":"Active",children:[0,100,200].map(n=>r.jsx("span",{className:"w-1 h-1 rounded-full bg-[var(--t3-color)]",style:{animation:`pulse-glow 1.4s ease-in-out ${n}ms infinite`}},n))}),t.status==="COMPLETED"&&r.jsx("span",{className:"text-[var(--success)] text-[10px] font-mono",children:"✓"}),t.status==="FAILED"&&r.jsx("span",{className:"text-[var(--error)] text-[10px] font-mono",children:"✗"}),t.status==="ESCALATED"&&r.jsx("span",{className:"text-[var(--warning)] text-[10px]",children:"⚠"})]})]}),r.jsx("p",{className:"text-[11px] font-semibold text-[var(--text-primary)] truncate leading-snug mb-0.5",children:t.label}),t.action&&r.jsx("p",{className:"text-[9px] text-[var(--text-muted)] truncate leading-snug font-mono",children:t.action}),t.progressPct!==void 0&&t.status==="ACTIVE"&&r.jsx("div",{className:"progress-track mt-2.5",children:r.jsx("div",{className:"progress-fill",style:{width:`${t.progressPct}%`}})}),r.jsx(Rr,{type:"source",position:Br.Bottom,className:"!w-1.5 !h-1.5 !bg-[var(--border-strong)] !border-none !bottom-[-4px]"})]})}),S1={agent:b1};function _1(){return r.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-5 animate-fade-in select-none",children:[r.jsxs("div",{className:"relative w-16 h-16",children:[[0,1,2].map(e=>r.jsx("div",{className:"absolute inset-0 rounded-full border border-[var(--accent)]",style:{opacity:.12+e*.08,animation:`orbit ${3.5+e*.8}s linear infinite`,animationDelay:`${e*-1.2}s`}},e)),r.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-2xl",children:"⬡"})]}),r.jsxs("div",{className:"text-center",children:[r.jsx("p",{className:"text-[13px] font-medium text-[var(--text-primary)]",children:"No active agents"}),r.jsx("p",{className:"text-[11px] text-[var(--text-muted)] mt-1",children:"Start a task to see the agent topology"})]})]})}const E1=S.memo(function({nodes:t,edges:l,peerEdges:a=[],selectedNodeId:n,onSelectNode:i}){const s=S.useMemo(()=>{if(!t.length)return[];const f={T1:[],T2:[],T3:[]};t.forEach(g=>{var x;return(x=f[g.role])==null?void 0:x.push(g)});const h={T1:40,T2:210,T3:380},m=250,o=500;return t.map(g=>{const x=f[g.role],b=x.findIndex(y=>y.id===g.id),E=x.length,v=o-(E-1)*m/2+b*m,d=h[g.role]??40;return{id:g.id,type:"agent",position:{x:v,y:d},selected:n===g.id,data:{role:g.role,label:g.label,status:g.status,action:g.action,progressPct:g.progressPct}}})},[t,n]),u=S.useMemo(()=>{const f=l.map((m,o)=>({id:`e${o}`,source:m.from,target:m.to,animated:!0,style:{stroke:"rgba(124,106,247,0.28)",strokeWidth:1.5},markerEnd:{type:Hr.ArrowClosed,color:"rgba(124,106,247,0.45)",width:10,height:10}})),h=a.map(m=>({id:m.id,source:m.from,target:m.to,animated:!0,label:m.syncType,labelStyle:{fontSize:9,fill:"rgba(255,165,0,0.85)"},labelBgStyle:{fill:"var(--bg-base)",fillOpacity:.7},style:{stroke:"rgba(255,140,0,0.7)",strokeWidth:1.5,strokeDasharray:"5,3"},markerEnd:{type:Hr.ArrowClosed,color:"rgba(255,140,0,0.7)",width:8,height:8}}));return[...f,...h]},[l,a]),c=S.useCallback((f,h)=>{i(h.id===n?null:h.id)},[i,n]);return t.length?r.jsxs("div",{className:"w-full h-full relative","aria-label":"Agent topology graph",role:"img",children:[r.jsxs(f0,{nodes:s,edges:u,nodeTypes:S1,onNodeClick:c,onPaneClick:()=>i(null),fitView:!0,fitViewOptions:{padding:.18,maxZoom:1.2},minZoom:.25,maxZoom:2.5,proOptions:{hideAttribution:!0},children:[r.jsx(o0,{variant:d0.Dots,color:"rgba(255,255,255,0.03)",gap:24,size:1}),r.jsx(h0,{showInteractive:!1,"aria-label":"Graph controls"})]}),r.jsx("div",{className:"absolute inset-x-0 top-0 h-14 bg-gradient-to-b from-[var(--bg-base)] to-transparent pointer-events-none"}),r.jsx("div",{className:"absolute inset-x-0 bottom-0 h-14 bg-gradient-to-t from-[var(--bg-base)] to-transparent pointer-events-none"})]}):r.jsx(_1,{})});function z1({pct:e}){return r.jsx("div",{className:"progress-track",children:r.jsx("div",{className:"progress-fill",style:{width:`${Math.min(Math.max(e,0),100)}%`}})})}function zu({icon:e,label:t,children:l}){return r.jsxs("div",{className:"px-4 py-3 border-b border-[var(--border-subtle)]",children:[r.jsxs("p",{className:"section-label flex items-center gap-1.5 mb-1.5",children:[r.jsx(e,{size:9}),t]}),l]})}const j1=S.memo(function({node:t,streamLog:l,peerMessages:a=[],onClose:n}){const i=S.useRef(null),[s,u]=S.useState("output");return S.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[l]),S.useEffect(()=>{const c=f=>{f.key==="Escape"&&n()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[n]),r.jsxs("aside",{role:"complementary","aria-label":"Agent inspector",className:`
185
+ flex flex-col w-[300px] flex-shrink-0 h-full
186
+ border-l border-[var(--border-subtle)]
187
+ bg-[var(--bg-surface)] animate-slide-in overflow-hidden
188
+ `,children:[r.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-[var(--border-subtle)] flex-shrink-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(_u,{size:13,className:"text-[var(--accent)]"}),r.jsx("span",{className:"section-label",children:"Inspector"})]}),r.jsx("button",{"aria-label":"Close inspector",onClick:n,className:`
189
+ w-6 h-6 rounded-[var(--radius-xs)] flex items-center justify-center
190
+ text-[var(--text-faint)] hover:text-[var(--text-primary)]
191
+ hover:bg-[var(--bg-elevated)] transition-all
192
+ `,children:r.jsx(m1,{size:13})})]}),t?r.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"px-4 py-4 border-b border-[var(--border-subtle)]",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx("span",{className:`badge badge-${t.role}`,children:t.role}),r.jsx("span",{className:`badge badge-${t.status}`,children:t.status})]}),r.jsx("h2",{className:"text-[12px] font-semibold text-[var(--text-primary)] leading-snug",children:t.label}),r.jsx("p",{className:"text-[9px] text-[var(--text-muted)] font-mono mt-1 break-all opacity-60",children:t.tierId})]}),t.progressPct!==void 0&&r.jsxs(zu,{icon:a0,label:"Progress",children:[r.jsx("div",{className:"flex items-center justify-between mb-1.5",children:r.jsxs("span",{className:"text-[10px] font-mono text-[var(--text-primary)]",children:[t.progressPct,"%"]})}),r.jsx(z1,{pct:t.progressPct})]}),t.currentAction&&r.jsx(zu,{icon:n1,label:"Current action",children:r.jsx("p",{className:"text-[11px] text-[var(--text-primary)] leading-snug",children:t.currentAction})}),r.jsx(zu,{icon:n0,label:"Last update",children:r.jsx("p",{className:"text-[10px] font-mono text-[var(--text-muted)]",children:new Date(t.updatedAt).toLocaleTimeString()})}),r.jsx("div",{className:"flex gap-0 px-3 pt-2 flex-shrink-0 border-b border-[var(--border-subtle)]",children:["output","comms"].map(c=>r.jsxs("button",{onClick:()=>u(c),className:`
193
+ flex items-center gap-1 px-2.5 py-1.5 text-[9.5px] font-medium rounded-t-sm
194
+ transition-colors border-b-2 -mb-px
195
+ ${s===c?"text-[var(--accent)] border-[var(--accent)]":"text-[var(--text-muted)] border-transparent hover:text-[var(--text-primary)]"}
196
+ `,children:[c==="output"?r.jsx(_u,{size:9}):r.jsx(r1,{size:9}),c==="output"?"Output":`Comms${a.length?` (${a.length})`:""}`]},c))}),s==="output"&&r.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-3 py-3",children:r.jsx("div",{ref:i,className:`
197
+ flex-1 overflow-y-auto font-mono text-[9.5px]
198
+ text-[var(--t3-color)] leading-[1.7]
199
+ whitespace-pre-wrap break-words
200
+ bg-[var(--bg-base)] rounded-[var(--radius-xs)]
201
+ p-2.5 border border-[var(--border-subtle)]
202
+ scrollbar-thin
203
+ `,"aria-live":"polite","aria-label":"Live token stream",children:t.output?r.jsx("span",{children:t.output}):l&&t.status==="ACTIVE"?r.jsxs("span",{children:[l.slice(-4e3),r.jsx("span",{className:"animate-blink text-[var(--t3-color)]",children:"█"})]}):r.jsx("span",{className:"text-[var(--text-faint)] italic",children:t.status==="COMPLETED"?"No output recorded.":"Waiting for output…"})})}),s==="comms"&&r.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-3 py-3",children:r.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin space-y-1.5",children:a.length===0?r.jsx("p",{className:"text-[10px] text-[var(--text-faint)] italic text-center py-6",children:"No peer communications yet"}):[...a].reverse().map((c,f)=>r.jsxs("div",{className:"text-[9.5px] rounded-[var(--radius-xs)] bg-[var(--bg-base)] border border-[var(--border-subtle)] px-2.5 py-2",children:[r.jsxs("div",{className:"flex items-center justify-between mb-1",children:[r.jsx("span",{className:"font-mono text-[var(--warning)] font-medium",children:c.syncType}),r.jsx("span",{className:"text-[var(--text-faint)]",children:new Date(c.timestamp).toLocaleTimeString()})]}),r.jsxs("div",{className:"text-[var(--text-muted)] font-mono",children:[r.jsx("span",{className:"text-[var(--text-primary)]",children:c.fromId.slice(0,12)})," → ",r.jsx("span",{className:"text-[var(--text-primary)]",children:c.toId?c.toId.slice(0,12):"all"})]}),c.payload&&r.jsx("p",{className:"mt-1 text-[var(--text-faint)] truncate",children:c.payload.slice(0,80)})]},f))})})]}):r.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 gap-3 text-center p-6",children:[r.jsx("div",{className:"w-9 h-9 rounded-full bg-[var(--bg-elevated)] flex items-center justify-center",children:r.jsx(_u,{size:16,className:"text-[var(--text-faint)]"})}),r.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Select an agent node to inspect it"})]})]})});function ju({icon:e,tier:t,label:l,isLast:a=!1}){return r.jsxs("div",{className:`flex items-start gap-3 py-2.5 ${a?"":"border-b border-[var(--border-subtle)]"}`,children:[r.jsx("div",{className:`
204
+ flex-shrink-0 w-6 h-6 rounded-full
205
+ bg-[var(--bg-overlay)] border border-[var(--border-subtle)]
206
+ flex items-center justify-center text-[11px] mt-0.5
207
+ `,children:e}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[r.jsx("span",{className:`badge badge-${t}`,children:t}),r.jsx("span",{className:"text-[10px] text-[var(--text-muted)] truncate",children:l})]}),r.jsx("p",{className:"text-[9px] font-mono text-[var(--warning)]",children:"⚠ Uncertain — escalated upward"})]}),r.jsx(a1,{size:10,className:"text-[var(--text-faint)] mt-1.5 flex-shrink-0"})]})}const T1=S.memo(function({request:t,onDecide:l}){S.useEffect(()=>{const s=u=>{u.key==="y"&&l(!0,!1),u.key==="n"&&l(!1,!1)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[l]);const a=S.useCallback(s=>l(!0,s),[l]),n=S.useCallback(s=>l(!1,s),[l]),i=t.input.path??t.input.command??JSON.stringify(t.input).slice(0,60);return r.jsx("div",{className:"fixed inset-0 bg-black/65 backdrop-blur-[6px] z-50 flex items-center justify-center p-4 animate-fade-in",role:"dialog","aria-modal":"true","aria-labelledby":"escalation-title",children:r.jsxs("div",{className:"w-full max-w-[460px] glass-elevated rounded-[var(--radius-lg)] shadow-dialog animate-fade-in-up",onClick:s=>s.stopPropagation(),children:[r.jsxs("div",{className:"flex items-center gap-3 px-5 pt-5 pb-4 border-b border-[var(--border-subtle)]",children:[r.jsx("div",{className:`
208
+ w-9 h-9 rounded-[var(--radius-sm)] flex-shrink-0
209
+ bg-[rgba(245,166,35,0.1)] border border-[rgba(245,166,35,0.22)]
210
+ flex items-center justify-center
211
+ `,children:r.jsx(d1,{size:18,className:"text-[var(--warning)]"})}),r.jsxs("div",{children:[r.jsx("h2",{id:"escalation-title",className:"text-[13px] font-bold text-[var(--text-primary)]",children:"Permission required"}),r.jsx("p",{className:"text-[10px] text-[var(--text-muted)] font-mono mt-0.5",children:"No tier could determine if this action is safe"})]})]}),r.jsxs("div",{className:"px-5 py-4 border-b border-[var(--border-subtle)]",children:[r.jsx("p",{className:"section-label mb-2",children:"Requested action"}),r.jsxs("div",{className:`
212
+ flex items-center gap-2
213
+ bg-[var(--bg-base)] rounded-[var(--radius-xs)]
214
+ border border-[var(--border-subtle)] px-3 py-2
215
+ `,children:[r.jsx("code",{className:"text-[var(--accent)] font-mono font-bold text-[11px] flex-shrink-0",children:t.toolName}),i&&r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"text-[var(--text-faint)] text-[11px]",children:"→"}),r.jsx("code",{className:"text-[var(--text-muted)] font-mono text-[10px] truncate flex-1 min-w-0",children:i})]}),t.isDangerous&&r.jsx("span",{className:"ml-auto badge badge-FAILED flex-shrink-0",children:"Dangerous"})]})]}),r.jsxs("div",{className:"px-5 py-4 border-b border-[var(--border-subtle)]",children:[r.jsx("p",{className:"section-label mb-2",children:"Escalation trail"}),r.jsx(ju,{icon:"🔹",tier:"T3",label:`"${t.subtaskContext}" requested this`}),r.jsx(ju,{icon:"🟣",tier:"T2",label:`Section "${t.sectionContext}" evaluated — uncertain`}),r.jsx(ju,{icon:"🟡",tier:"T1",label:"Full task context evaluated — uncertain",isLast:!0}),r.jsxs("div",{className:"flex items-center gap-3 pt-3",children:[r.jsx("div",{className:"w-6 h-6 rounded-full bg-[var(--accent)] flex items-center justify-center flex-shrink-0",children:r.jsx("span",{className:"text-white text-[10px] font-bold",children:"?"})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-[11px] font-semibold text-[var(--text-primary)]",children:"Your decision required"}),r.jsxs("p",{className:"text-[9px] font-mono text-[var(--text-muted)] mt-0.5",children:["Press"," ",r.jsx("kbd",{className:"px-1 py-0.5 rounded-[3px] bg-[var(--bg-overlay)] border border-[var(--border-strong)] font-mono text-[8px]",children:"Y"})," ","to approve,"," ",r.jsx("kbd",{className:"px-1 py-0.5 rounded-[3px] bg-[var(--bg-overlay)] border border-[var(--border-strong)] font-mono text-[8px]",children:"N"})," ","to deny"]})]})]})]}),r.jsxs("div",{className:"px-5 py-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-2",children:[r.jsx("button",{className:"btn btn-danger justify-center",onClick:()=>n(!1),children:"Deny once"}),r.jsx("button",{className:"btn btn-success justify-center",onClick:()=>a(!1),children:"Approve once"})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[r.jsx("button",{className:"btn btn-ghost justify-center",onClick:()=>n(!0),children:"Always deny"}),r.jsx("button",{className:"btn btn-ghost justify-center",onClick:()=>a(!0),children:"Always approve"})]})]})]})})});function N1(e){const t=Date.now()-new Date(e).getTime();return t<6e4?"just now":t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:new Date(e).toLocaleDateString()}function A1(e,t){const l=new Date(t).getTime()-new Date(e).getTime();return l<1e3?"<1s":l<6e4?`${Math.round(l/1e3)}s`:`${Math.round(l/6e4)}m`}const M1=S.memo(function(){const t=Cs(),l=Xt(Rp),a=Xt(wr),[n,i]=S.useState(new Set),[s,u]=S.useState(null),[c,f]=S.useState(!1),[h,m]=S.useState(""),o=S.useCallback(y=>{n.size===0&&t(Cp(y))},[t,n.size]),g=S.useCallback((y,p,_)=>{_.stopPropagation(),i(N=>{var M;const j=new Set(N);if(_.shiftKey&&s!==null){const[A,O]=[Math.min(s,p),Math.max(s,p)];for(let G=A;G<=O;G++){const fe=(M=l[G])==null?void 0:M.sessionId;fe&&j.add(fe)}}else j.has(y)?j.delete(y):j.add(y);return j}),u(p)},[s,l]),x=S.useCallback(()=>{n.size===l.length?i(new Set):i(new Set(l.map(y=>y.sessionId)))},[n.size,l]),b=S.useCallback(async()=>{if(!(n.size===0||c)){f(!0),m("");try{const y=Array.from(n);(await fetch("/api/sessions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:y})})).ok?(t(wp(y)),i(new Set),u(null)):m("Delete failed. Please try again.")}catch{m("Network error. Please try again.")}finally{f(!1)}}},[n,c,t]),E=S.useCallback(()=>{i(new Set),u(null)},[]);if(!l.length)return r.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3 animate-fade-in",children:[r.jsx("div",{className:"w-11 h-11 rounded-full bg-[var(--bg-elevated)] flex items-center justify-center",children:r.jsx(a0,{size:18,className:"text-[var(--text-faint)]"})}),r.jsx("p",{className:"text-[12px] text-[var(--text-muted)]",children:"No sessions yet"}),r.jsx("p",{className:"text-[10px] font-mono text-[var(--text-faint)]",children:"Run a task to create the first session"})]});const v=n.size===l.length,d=n.size>0;return r.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[r.jsx("div",{className:"px-5 py-4 border-b border-[var(--border-subtle)] flex-shrink-0 bg-[var(--bg-surface)]",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"section-label",children:"Sessions"}),r.jsxs("p",{className:"text-[10px] font-mono text-[var(--text-faint)] mt-1",children:[l.length," session",l.length!==1?"s":"",d&&r.jsxs("span",{className:"text-[var(--accent)] ml-2",children:["· ",n.size," selected"]})]})]}),r.jsx("button",{onClick:x,title:v?"Deselect all":"Select all",className:"p-1.5 rounded hover:bg-[var(--bg-elevated)] transition-colors",children:v?r.jsx(Co,{size:14,className:"text-[var(--accent)]"}):r.jsx(Oo,{size:14,className:"text-[var(--text-faint)]"})})]})}),r.jsx("div",{className:"flex-1 overflow-y-auto",children:l.map((y,p)=>{const _=y.sessionId===(a==null?void 0:a.sessionId),N=n.has(y.sessionId);return r.jsxs("button",{"aria-selected":_,"aria-label":`Session: ${y.title}, status: ${y.status}`,onClick:()=>o(y.sessionId),className:`
216
+ w-full text-left px-5 py-3.5
217
+ border-b border-[var(--border-subtle)]
218
+ transition-all duration-150 relative
219
+ animate-slide-up
220
+ `,style:{animationDelay:`${p*25}ms`,background:N?"rgba(124,106,247,0.08)":_?"rgba(124,106,247,0.05)":void 0,borderLeft:N||_?"2px solid var(--accent)":"2px solid transparent",paddingLeft:_||N?"18px":"20px"},children:[r.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx("span",{role:"checkbox","aria-checked":N,onClick:j=>g(y.sessionId,p,j),className:"flex-shrink-0 cursor-pointer",children:N?r.jsx(Co,{size:12,className:"text-[var(--accent)]"}):r.jsx(Oo,{size:12,className:"text-[var(--text-faint)] opacity-40 hover:opacity-100 transition-opacity"})}),r.jsx("span",{className:"text-[12px] font-semibold text-[var(--text-primary)] truncate",children:y.title||"Untitled Session"})]}),r.jsx("span",{className:`badge badge-${y.status} flex-shrink-0`,children:y.status})]}),y.workspacePath&&r.jsxs("div",{className:"flex items-center gap-1.5 mb-1 pl-5",children:[r.jsx(s1,{size:9,className:"text-[var(--text-faint)] flex-shrink-0"}),r.jsx("span",{className:"text-[9px] font-mono text-[var(--text-faint)] truncate",children:y.workspacePath.split("/").pop()})]}),y.latestPrompt&&r.jsxs("p",{className:"text-[10px] text-[var(--text-muted)] truncate mb-1.5 italic pl-5",children:['"',y.latestPrompt,'"']}),r.jsxs("div",{className:"flex items-center gap-3 pl-5",children:[r.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-mono text-[var(--text-faint)]",children:[r.jsx(n0,{size:8}),N1(y.updatedAt)]}),r.jsx("span",{className:"text-[9px] font-mono text-[var(--text-faint)]",children:A1(y.startedAt,y.updatedAt)})]})]},y.sessionId)})}),d&&r.jsxs("div",{className:`
221
+ absolute bottom-4 left-1/2 -translate-x-1/2
222
+ flex items-center gap-3 px-4 py-2.5 rounded-xl
223
+ bg-[var(--bg-elevated)] border border-[var(--border-subtle)]
224
+ shadow-lg z-10 animate-slide-up
225
+ `,children:[r.jsxs("span",{className:"text-[11px] font-mono text-[var(--text-muted)]",children:[n.size," selected"]}),h&&r.jsx("span",{className:"text-[11px] font-mono text-[var(--error)]",children:h}),r.jsxs("button",{onClick:b,disabled:c,className:`
226
+ flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[11px] font-medium
227
+ bg-red-500/10 text-red-400 border border-red-500/20
228
+ hover:bg-red-500/20 transition-colors disabled:opacity-50
229
+ `,children:[r.jsx(h1,{size:12}),c?"Deleting...":`Delete ${n.size}`]}),r.jsx("button",{onClick:E,className:"text-[11px] text-[var(--text-faint)] hover:text-[var(--text-muted)] transition-colors",children:"Cancel"})]})]})});function C1(e,t,l){const a=new Array(e);return new Proxy(a,{get(n,i,s){if(typeof i=="string"){const u=i.charCodeAt(0);if(u>=48&&u<=57){const c=+i;if(Number.isInteger(c)&&c>=0&&c<e){let f=n[c];if(!f){const h=t[c*2];f=n[c]={index:c,key:l(c),start:h,size:t[c*2+1],end:h+t[c*2+1],lane:0}}return f}}if(i==="length")return e}return Reflect.get(n,i,s)}})}function wl(e,t,l){let a=l.initialDeps??[],n,i=!0;function s(){const u=e();return(u.length!==a.length||u.some((f,h)=>a[h]!==f))&&(a=u,n=t(...u),l!=null&&l.onChange&&!(i&&l.skipInitialOnChange)&&l.onChange(n),i=!1),n}return s.updateDeps=u=>{a=u},s}function Uo(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const O1=(e,t)=>Math.abs(e-t)<1.01,D1=(e,t,l)=>{let a;return Object.assign(function(...n){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,n),l)},{cancel:()=>{e.clearTimeout(a)}})};let wa;const Tu=()=>{if(wa!==void 0)return wa;if(typeof navigator>"u")return wa=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return wa=!0;const e=navigator.maxTouchPoints;return wa=navigator.platform==="MacIntel"&&e!==void 0&&e>0},Ro=e=>{const{offsetWidth:t,offsetHeight:l}=e;return{width:t,height:l}},w1=e=>e,U1=e=>{const t=Math.max(e.startIndex-e.overscan,0),a=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,n=new Array(a);for(let i=0;i<a;i++)n[i]=t+i;return n},R1=(e,t)=>{const l=e.scrollElement;if(!l)return;const a=e.targetWindow;if(!a)return;const n=s=>{const{width:u,height:c}=s;t({width:Math.round(u),height:Math.round(c)})};if(n(Ro(l)),!a.ResizeObserver)return()=>{};const i=new a.ResizeObserver(s=>{const u=()=>{const c=s[0];if(c!=null&&c.borderBoxSize){const f=c.borderBoxSize[0];if(f){n({width:f.inlineSize,height:f.blockSize});return}}n(Ro(l))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return i.observe(l,{box:"border-box"}),()=>{i.unobserve(l)}},ns={passive:!0},B1=typeof window>"u"?!0:"onscrollend"in window,H1=(e,t,l)=>{const a=e.scrollElement;if(!a)return;const n=e.targetWindow;if(!n)return;const i=e.options.useScrollendEvent&&B1;let s=0;const u=i?null:D1(n,()=>t(s,!1),e.options.isScrollingResetDelay),c=m=>()=>{s=l(a),u==null||u(),t(s,m)},f=c(!0),h=c(!1);return a.addEventListener("scroll",f,ns),i&&a.addEventListener("scrollend",h,ns),()=>{a.removeEventListener("scroll",f),i&&a.removeEventListener("scrollend",h),u==null||u.cancel()}},L1=(e,t)=>H1(e,t,l=>{const{horizontal:a,isRtl:n}=e.options;return a?l.scrollLeft*(n&&-1||1):l.scrollTop}),q1=(e,t,l)=>{if(l.options.useCachedMeasurements){const a=l.indexFromElement(e),n=l.options.getItemKey(a);return l.itemSizeCache.get(n)??l.options.estimateSize(a)}if(t!=null&&t.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[l.options.horizontal?"inlineSize":"blockSize"])}if(!t){const a=l.indexFromElement(e),n=l.options.getItemKey(a),i=l.itemSizeCache.get(n);if(i!==void 0)return i}return e[l.options.horizontal?"offsetWidth":"offsetHeight"]},Y1=(e,{adjustments:t=0,behavior:l},a)=>{var n,i;(i=(n=a.scrollElement)==null?void 0:n.scrollTo)==null||i.call(n,{[a.options.horizontal?"left":"top"]:e+t,behavior:l})},V1=Y1;class G1{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var l,a,n;return((n=(a=(l=this.targetWindow)==null?void 0:l.performance)==null?void 0:a.now)==null?void 0:n.call(a))??Date.now()},this.observer=(()=>{let l=null;const a=()=>l||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:l=new this.targetWindow.ResizeObserver(n=>{n.forEach(i=>{const s=()=>{const u=i.target,c=this.indexFromElement(u);if(!u.isConnected){this.observer.unobserve(u);for(const[f,h]of this.elementsCache)if(h===u){this.elementsCache.delete(f);break}return}this.isIndexInRange(c)&&this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(u,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var n;(n=a())==null||n.disconnect(),l=null},observe:n=>{var i;return(i=a())==null?void 0:i.observe(n,{box:"border-box"})},unobserve:n=>{var i;return(i=a())==null?void 0:i.unobserve(n)}}})(),this.range=null,this.setOptions=l=>{var a,n;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:w1,rangeExtractor:U1,onChange:()=>{},measureElement:q1,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const o in l){const g=l[o];g!==void 0&&(i[o]=g)}const s=this.options;let u=null,c=null,f=!1;if(s!==void 0&&s.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const o=s.count,g=i.count,x=this.getMeasurements(),b=o>0?((a=x[0])==null?void 0:a.key)??s.getItemKey(0):null,E=o>0?((n=x[o-1])==null?void 0:n.key)??s.getItemKey(o-1):null;if(g!==o||o>0&&g>0&&(i.getItemKey(0)!==b||i.getItemKey(g-1)!==E)){f=!0;const y=o>0?this.getVirtualItemForOffset(this.getScrollOffset())??x[0]:null;y&&(u=[y.key,this.getScrollOffset()-y.start]);const p=i.followOnAppend===!0?"auto":i.followOnAppend||null;p&&g>o&&this.isAtEnd(s.scrollEndThreshold)&&(o===0||i.getItemKey(g-1)!==E)&&(c=p)}}this.options=i,f&&(this.pendingMin=0,this.itemSizeCacheVersion++);let h=!1,m=0;if(u&&this.scrollOffset!==null){const[o,g]=u,x=this.getMeasurements(),{count:b,getItemKey:E}=this.options;let v=0;for(;v<b&&E(v)!==o;)v++;if(v<b){const d=x[v];if(d){const y=Math.max(0,d.start+g);y!==this.scrollOffset&&(m=y-this.scrollOffset,this.scrollOffset=y,h=!0)}}}(h||c)&&(this.pendingScrollAnchor=[h?u[0]:null,h?u[1]:0,c,m])},this.notify=l=>{var a,n;(n=(a=this.options).onChange)==null||n.call(a,this,l)},this.maybeNotify=wl(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),l=>{this.notify(l)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(l=>l()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var l;const a=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==a){if(this.cleanup(),!a){this.maybeNotify();return}if(this.scrollElement=a,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((l=this.scrollElement)==null?void 0:l.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,s)=>{if(s&&this._intendedScrollOffset===null&&i===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const u=this.getScrollOffset();this.scrollDirection=s?u===i?this.scrollDirection:u<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=s,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const i=this.scrollElement,s=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},u=()=>{this._iosTouching=!1,!(!Tu()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",s,ns),i.addEventListener("touchend",u,ns),this.unsubs.push(()=>{i.removeEventListener("touchstart",s),i.removeEventListener("touchend",u),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const n=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,n&&this.scrollElement&&this.options.enabled){const[i,s,u,c]=n;i!==null&&!u&&(Tu()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),u&&this.scrollToEnd({behavior:u})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const l=this.getScrollOffset(),a=this.getMaxScrollOffset();if(l<0||l>a)return;if(this._iosDeferredAdjustment<0&&l>=a-1){this._iosDeferredAdjustment=0;return}const n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(l,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=wl(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(l,a,n,i,s,u,c,f)=>(this.prevLanes!==void 0&&this.prevLanes!==u&&(this.lanesChangedFlag=!0),this.prevLanes=u,this.pendingMin=null,{count:l,paddingStart:a,scrollMargin:n,getItemKey:i,enabled:s,lanes:u,laneAssignmentMode:c,gap:f}),{key:!1}),this.isIndexInRange=l=>l>=0&&l<this.options.count,this.getMeasurements=wl(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:l,paddingStart:a,scrollMargin:n,getItemKey:i,enabled:s,lanes:u,laneAssignmentMode:c,gap:f},h)=>{const m=this.itemSizeCache;if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>l)for(const v of this.laneAssignments.keys())v>=l&&this.laneAssignments.delete(v);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(v=>{this.itemSizeCache.set(v.key,v.size)}));const o=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===l&&(this.lanesSettling=!1),u===1){const v=l*2;let d=this._flatMeasurements;if(!d||d.length<v){const _=new Float64Array(v);d&&o>0&&_.set(d.subarray(0,o*2)),d=_,this._flatMeasurements=d}let y;if(o===0)y=a+n;else{const _=o-1;y=d[_*2]+d[_*2+1]+f}for(let _=o;_<l;_++){const N=i(_),j=m.get(N),M=typeof j=="number"?j:this.options.estimateSize(_);d[_*2]=y,d[_*2+1]=M,y+=M+f}const p=C1(l,d,i);return this.measurementsCache=p,p}const g=this.measurementsCache.slice(0,o),x=new Array(u).fill(void 0),b=new Float64Array(u);let E=0;for(let v=0;v<o;v++){const d=g[v];d&&(x[d.lane]===void 0&&E++,x[d.lane]=v,b[d.lane]=d.end)}for(let v=o;v<l;v++){const d=i(v),y=this.laneAssignments.get(v);let p,_;const N=c==="estimate"||m.has(d);if(y!==void 0&&this.options.lanes>1){p=y;const O=x[p],G=O!==void 0?g[O]:void 0;_=G?G.end+f:a+n}else if(E===u){let O=0,G=b[0],fe=x[0];for(let Ie=1;Ie<u;Ie++){const sl=b[Ie];(sl<G||sl===G&&x[Ie]<fe)&&(O=Ie,G=sl,fe=x[Ie])}p=O,_=G+f,N&&this.laneAssignments.set(v,p)}else p=v%this.options.lanes,_=a+n,N&&this.laneAssignments.set(v,p);const j=m.get(d),M=typeof j=="number"?j:this.options.estimateSize(v),A=_+M;g[v]={index:v,start:_,size:M,end:A,key:d,lane:p},x[p]===void 0&&E++,x[p]=v,b[p]=A}return this.measurementsCache=g,g},{key:!1,debug:()=>this.options.debug}),this.calculateRange=wl(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(l,a,n,i)=>l.length===0||a===0?(this.range=null,null):(this.range=Q1(l,a,n,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=wl(()=>{let l=null,a=null;const n=this.calculateRange();return n&&(l=n.startIndex,a=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,l,a]),[this.options.rangeExtractor,this.options.overscan,this.options.count,l,a]},(l,a,n,i,s)=>i===null||s===null?[]:l({startIndex:i,endIndex:s,overscan:a,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=l=>{const a=this.options.indexAttribute,n=l.getAttribute(a);return n?parseInt(n,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=l=>{var a;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const n=this.scrollState.index??((a=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:a.index);if(n!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),s=Math.max(0,n-i),u=Math.min(this.options.count-1,n+i);return l>=s&&l<=u}return!0},this.measureElement=l=>{if(!l){this.elementsCache.forEach((s,u)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(u))});return}const a=this.indexFromElement(l);if(!this.isIndexInRange(a))return;const n=this.options.getItemKey(a),i=this.elementsCache.get(n);i!==l&&(i&&this.observer.unobserve(i),this.observer.observe(l),this.elementsCache.set(n,l)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(a)&&this.resizeItem(a,this.options.measureElement(l,void 0,this))},this.resizeItem=(l,a)=>{var n,i;if(!this.isIndexInRange(l))return;let s,u,c;const f=this._flatMeasurements;if(this.options.lanes===1&&f!==null)c=this.options.getItemKey(l),u=f[l*2],s=f[l*2+1];else{const o=this.measurementsCache[l];if(!o)return;c=o.key,u=o.start,s=o.size}const h=this.itemSizeCache.get(c)??s,m=a-h;if(m!==0){const o=this.options.anchorTo==="end"&&((n=this.scrollState)==null?void 0:n.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,g=o?this.getTotalSize():0,x=this.getScrollOffset()+this.scrollAdjustments,E=!this.itemSizeCache.has(c)?u<x:u+h<=x&&this.scrollDirection!=="backward",v=((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[l]??{index:l,key:c,start:u,size:s,end:u+s,lane:0},m,this):E);(this.pendingMin===null||l<this.pendingMin)&&(this.pendingMin=l),this.itemSizeCache.set(c,a),this.itemSizeCacheVersion++;let d=!1;o?d=this.applyScrollAdjustment(this.getTotalSize()-g):v&&(d=this.applyScrollAdjustment(m)),this.notify(d)}},this.getVirtualItems=wl(()=>[this.getVirtualIndexes(),this.getMeasurements()],(l,a)=>{const n=[];for(let i=0,s=l.length;i<s;i++){const u=l[i],c=a[u];n.push(c)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=l=>{const a=this.getMeasurements();if(a.length===0)return;const n=this._flatMeasurements,i=this.options.lanes===1&&n!=null,s=i0(0,a.length-1,i?u=>n[u*2]:u=>Uo(a[u]).start,l);return Uo(a[s])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const l=this.scrollElement.document.documentElement;return this.options.horizontal?l.scrollWidth-this.scrollElement.innerWidth:l.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(l=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=l,this.getOffsetForAlignment=(l,a,n=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),s=this.getScrollOffset();a==="auto"&&(a=l>=s+i?"end":"start"),a==="center"?l+=(n-i)/2:a==="end"&&(l-=i);const u=this.getMaxScrollOffset();return Math.max(Math.min(u,l),0)},this.getOffsetForIndex=(l,a="auto")=>{l=Math.max(0,Math.min(l,this.options.count-1));const n=this.getSize(),i=this.getScrollOffset(),s=this.measurementsCache[l];if(!s)return;if(a==="auto")if(s.end>=i+n-this.options.scrollPaddingEnd)a="end";else if(s.start<=i+this.options.scrollPaddingStart)a="start";else return[i,a];if(a==="end"&&l===this.options.count-1)return[this.getMaxScrollOffset(),a];const u=a==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,a,s.size),a]},this.scrollToOffset=(l,{align:a="start",behavior:n="auto"}={})=>{this._iosDeferredAdjustment=0;const i=this.getOffsetForAlignment(l,a),s=this.now();this.scrollState={index:null,align:a,behavior:n,startedAt:s,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(l,{align:a="auto",behavior:n="auto"}={})=>{this._iosDeferredAdjustment=0,l=Math.max(0,Math.min(l,this.options.count-1));const i=this.getOffsetForIndex(l,a);if(!i)return;const[s,u]=i,c=this.now();this.scrollState={index:l,align:u,behavior:n,startedAt:c,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(l,{behavior:a="auto"}={})=>{const n=this.getScrollOffset()+l,i=this.now();this.scrollState={index:null,align:"start",behavior:a,startedAt:i,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:a}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:l="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:l});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:l})},this.getTotalSize=()=>{var l;const a=this.getMeasurements();let n;if(a.length===0)n=this.options.paddingStart;else if(this.options.lanes===1){const i=a.length-1,s=this._flatMeasurements;s!=null?n=s[i*2]+s[i*2+1]:n=((l=a[i])==null?void 0:l.end)??0}else{const i=Array(this.options.lanes).fill(null);let s=a.length-1;for(;s>=0&&i.some(u=>u===null);){const u=a[s];i[u.lane]===null&&(i[u.lane]=u.end),s--}n=Math.max(...i.filter(u=>u!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const l=[];if(this.itemSizeCache.size===0)return l;const a=this.getMeasurements();for(const n of a)n&&this.itemSizeCache.has(n.key)&&l.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return l},this._scrollToOffset=(l,{adjustments:a,behavior:n})=>{this._intendedScrollOffset=l+(a??0),this.options.scrollToFn(l,{behavior:n,adjustments:a},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,l){return t===0?!1:Tu()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=t,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:l}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const a=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,n=a?a[0]:this.scrollState.lastTargetOffset,i=1,s=n!==this.scrollState.lastTargetOffset;if(!s&&O1(n,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.getScrollOffset()!==n&&this._scrollToOffset(n,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,s){const u=this.getSize()||600,c=Math.abs(n-this.getScrollOffset()),f=this.scrollState.behavior==="smooth"&&c>u;this.scrollState.lastTargetOffset=n,f||(this.scrollState.behavior="auto"),this._scrollToOffset(n,{adjustments:void 0,behavior:f?"smooth":"auto"})}this.scheduleScrollReconcile()}}const i0=(e,t,l,a)=>{for(;e<=t;){const n=(e+t)/2|0,i=l(n);if(i<a)e=n+1;else if(i>a)t=n-1;else return n}return e>0?e-1:0};function X1(e,t,l){let a=0;for(;a<=t;){const n=(a+t)/2|0,i=e[n*2];if(i<l)a=n+1;else if(i>l)t=n-1;else return n}return a>0?a-1:0}function Q1(e,t,l,a,n){const i=e.length-1;if(e.length<=a)return{startIndex:0,endIndex:i};if(a===1&&n!==null){const f=X1(n,i,l);let h=f;const m=l+t;for(;h<i&&n[h*2]+n[h*2+1]<m;)h++;return{startIndex:f,endIndex:h}}let u=i0(0,i,f=>e[f].start,l),c=u;if(a===1)for(;c<i&&e[c].end<l+t;)c++;else if(a>1){const f=Array(a).fill(0);for(;c<i&&f.some(m=>m<l+t);){const m=e[c];f[m.lane]=m.end,c++}const h=Array(a).fill(l+t);for(;u>=0&&h.some(m=>m>=l);){const m=e[u];h[m.lane]=m.start,u--}u=Math.max(0,u-u%a),c=Math.min(i,c+(a-1-c%a))}return{startIndex:u,endIndex:c}}const Nu=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Z1({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:l="transform",...a}){const n=S.useReducer(h=>h+1,0)[1],i=S.useRef({enabled:t,mode:l,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});i.current.enabled=t,i.current.mode=l;const s=h=>{const m=i.current;if(!m.enabled||!m.container)return;const o=h.getTotalSize();if(o!==m.lastSize){m.lastSize=o;const g=h.options.horizontal?"width":"height";m.container.style[g]=`${o}px`}},u=h=>{const m=i.current;if(!m.enabled||!m.container)return;s(h);const o=!!h.options.horizontal,g=m.mode==="transform",x=o?"left":"top",b=h.options.scrollMargin,E=h.getVirtualItems();for(const v of E){const d=v.start-b,y=h.elementsCache.get(v.key);y&&m.lastPositions.get(y)!==d&&(m.lastPositions.set(y,d),g?y.style.transform=o?`translate3d(${d}px, 0, 0)`:`translate3d(0, ${d}px, 0)`:y.style[x]=`${d}px`)}},c={...a,onChange:(h,m)=>{var o;const g=i.current;let x=!0;if(g.enabled){u(h);const b=h.range,E=g.prevRange;x=!E||E.isScrolling!==h.isScrolling||E.startIndex!==(b==null?void 0:b.startIndex)||E.endIndex!==(b==null?void 0:b.endIndex),x&&(g.prevRange=b?{startIndex:b.startIndex,endIndex:b.endIndex,isScrolling:h.isScrolling}:null)}x&&(e&&m?Ho.flushSync(n):n()),(o=a.onChange)==null||o.call(a,h,m)}},[f]=S.useState(()=>{const h=new G1(c);return Object.assign(h,{containerRef:m=>{const o=i.current;if(o.container=m,o.lastSize=null,m&&o.enabled){const g=h.getTotalSize();o.lastSize=g;const x=h.options.horizontal?"width":"height";m.style[x]=`${g}px`}}})});return f.setOptions(c),Nu(()=>f._didMount(),[]),Nu(()=>(s(f),f._willUpdate())),Nu(()=>{u(f)}),f}function k1(e){return Z1({observeElementRect:R1,observeElementOffset:L1,scrollToFn:V1,...e})}function Bo({label:e,active:t,onClick:l}){return r.jsx("button",{className:`
230
+ px-2.5 py-1 rounded-[3px] text-[9px] font-mono font-bold
231
+ uppercase tracking-wider transition-all duration-100 border
232
+ ${t?"bg-[var(--accent)] text-white border-[var(--accent)]":"bg-transparent text-[var(--text-muted)] border-[var(--border-subtle)] hover:border-[var(--border-strong)] hover:text-[var(--text-primary)]"}
233
+ `,onClick:l,children:e})}const K1=38,J1=S.memo(function({log:t,style:l}){return r.jsxs("div",{style:l,className:`
234
+ flex items-center gap-3 px-5
235
+ border-b border-[var(--border-subtle)]
236
+ hover:bg-[var(--bg-elevated)] transition-colors
237
+ `,children:[r.jsx("span",{className:"text-[9px] font-mono text-[var(--text-faint)] flex-shrink-0 w-[64px] tabular-nums",children:new Date(t.timestamp).toLocaleTimeString("en-US",{hour12:!1})}),r.jsx("span",{className:`badge badge-${t.role} flex-shrink-0`,children:t.role}),r.jsx("span",{className:`badge badge-${t.status} flex-shrink-0`,children:t.status}),r.jsx("span",{className:"text-[10px] font-medium text-[var(--text-primary)] truncate flex-shrink-0 max-w-[120px]",children:t.label}),t.currentAction&&r.jsx("span",{className:"text-[9px] text-[var(--text-muted)] font-mono truncate flex-1 min-w-0",children:t.currentAction})]})}),$1=S.memo(function(){const t=Xt(Hp),[l,a]=S.useState("ALL"),[n,i]=S.useState("ALL"),[s,u]=S.useState(!0),c=S.useRef(null),f=S.useMemo(()=>t.filter(g=>!(l!=="ALL"&&g.role!==l||n!=="ALL"&&g.status!==n)),[t,l,n]),h=k1({count:f.length,getScrollElement:()=>c.current,estimateSize:()=>K1,overscan:12}),m=S.useCallback(()=>{f.length>0&&h.scrollToIndex(f.length-1,{behavior:"smooth"})},[f.length,h]);S.useEffect(()=>{s&&m()},[f.length,s]);const o=S.useCallback(()=>{const g=c.current;g&&u(g.scrollHeight-g.scrollTop<=g.clientHeight+60)},[]);return r.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-[var(--bg-base)]",children:[r.jsxs("div",{className:`
238
+ flex items-center gap-2 px-5 py-2.5
239
+ border-b border-[var(--border-subtle)] flex-shrink-0 flex-wrap
240
+ bg-[var(--bg-surface)]
241
+ `,children:[r.jsx("span",{className:"section-label mr-1",children:"Role"}),["ALL","T1","T2","T3"].map(g=>r.jsx(Bo,{label:g,active:l===g,onClick:()=>a(g)},g)),r.jsx("div",{className:"divider-v h-4 mx-1"}),r.jsx("span",{className:"section-label mr-1",children:"Status"}),["ALL","ACTIVE","COMPLETED","FAILED","ESCALATED"].map(g=>r.jsx(Bo,{label:g,active:n===g,onClick:()=>i(g)},g)),r.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[r.jsxs("span",{className:"text-[9px] font-mono text-[var(--text-faint)] tabular-nums",children:[f.length.toLocaleString()," entries"]}),!s&&r.jsx("button",{className:"btn btn-ghost py-0.5 px-2",onClick:()=>{u(!0),m()},children:"↓ Jump to latest"})]})]}),r.jsxs("div",{className:`
242
+ flex items-center gap-3 px-5 py-1.5
243
+ border-b border-[var(--border-subtle)]
244
+ bg-[var(--bg-surface)] flex-shrink-0
245
+ `,children:[r.jsx("span",{className:"section-label w-[64px]",children:"Time"}),r.jsx("span",{className:"section-label w-[28px]",children:"Tier"}),r.jsx("span",{className:"section-label w-[72px]",children:"Status"}),r.jsx("span",{className:"section-label w-[120px]",children:"Agent"}),r.jsx("span",{className:"section-label",children:"Action"})]}),f.length===0?r.jsx("div",{className:"flex items-center justify-center flex-1 text-[var(--text-faint)] text-[11px] font-mono",children:t.length===0?"// no log entries":"// no entries match filter"}):r.jsx("div",{ref:c,onScroll:o,className:"flex-1 overflow-y-auto",role:"log","aria-label":"Activity log","aria-live":"polite",children:r.jsx("div",{style:{height:h.getTotalSize(),position:"relative"},children:h.getVirtualItems().map(g=>{const x=f[g.index];return r.jsx(J1,{log:x,style:{position:"absolute",top:0,left:0,right:0,transform:`translateY(${g.start}px)`,height:`${g.size}px`}},x.id)})})})]})}),F1=[{id:"identities",label:"Identities",icon:"◎"},{id:"tier-limits",label:"Tier Limits",icon:"⊟"},{id:"budget",label:"Budget",icon:"⟁"},{id:"danger",label:"Danger Zone",icon:"⚡"}];function W1({token:e}){const t=Cs(),[l,a]=S.useState("identities");return r.jsxs("div",{className:"flex h-full overflow-hidden animate-fade-in",children:[r.jsxs("nav",{className:"w-44 flex-shrink-0 border-r border-[var(--border-base)] p-4 flex flex-col gap-1",children:[r.jsx("p",{className:"section-label mb-3",children:"Settings"}),F1.map(n=>r.jsxs("button",{onClick:()=>a(n.id),className:`flex items-center gap-2.5 px-3 py-2 rounded-[var(--radius-sm)] text-sm transition-all text-left
246
+ ${l===n.id?"bg-[var(--accent)]/15 text-[var(--accent)] font-medium":"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-elevated)]"}`,children:[r.jsx("span",{className:"text-[11px] font-mono opacity-70",children:n.icon}),n.label]},n.id))]}),r.jsx("div",{className:"flex-1 overflow-y-auto p-8",children:r.jsxs("div",{className:"max-w-2xl mx-auto",children:[l==="identities"&&r.jsx(I1,{token:e}),l==="tier-limits"&&r.jsx(ex,{token:e}),l==="budget"&&r.jsx(tx,{token:e}),l==="danger"&&r.jsx(lx,{token:e,dispatch:t})]})})]})}function I1({token:e}){const[t,l]=S.useState([]),[a,n]=S.useState(!0),[i,s]=S.useState(!1),[u,c]=S.useState(null),[f,h]=S.useState({name:"",description:"",systemPrompt:"",setDefault:!1}),[m,o]=S.useState(""),g=S.useCallback(async()=>{try{const d=await fetch("/api/identities",{headers:{Authorization:`Bearer ${e}`}});d.ok&&l(await d.json())}finally{n(!1)}},[e]);S.useEffect(()=>{g()},[g]);const x=()=>{h({name:"",description:"",systemPrompt:"",setDefault:!1}),o("")},b=async()=>{if(!f.name.trim()){o("Name is required");return}(await fetch("/api/identities",{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(f)})).ok?(x(),s(!1),await g()):o("Failed to create identity")},E=async(d,y)=>{await fetch(`/api/identities/${d}`,{method:"PUT",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify(y)}),c(null),await g()},v=async d=>{await fetch(`/api/identities/${d}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`}}),await g()};return a?r.jsx(ax,{}):r.jsxs("section",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-bold text-[var(--text-primary)]",children:"Identities"}),r.jsx("p",{className:"text-sm text-[var(--text-muted)] mt-1",children:"Persona profiles that shape how agents behave."})]}),r.jsx("button",{onClick:()=>{x(),s(!0)},className:"btn btn-primary h-8 text-sm px-3",children:"+ New Identity"})]}),i&&r.jsxs("div",{className:"glass-elevated rounded-[var(--radius-lg)] p-5 mb-6 border border-[var(--accent)]/30",children:[r.jsx("p",{className:"font-medium text-[var(--text-primary)] mb-4",children:"Create Identity"}),r.jsx(s0,{form:f,onChange:h,error:m}),r.jsxs("div",{className:"flex gap-2 mt-4",children:[r.jsx("button",{onClick:b,className:"btn btn-primary text-sm",children:"Create"}),r.jsx("button",{onClick:()=>{s(!1),x()},className:"btn glass text-sm",children:"Cancel"})]})]}),t.length===0&&!i&&r.jsxs("div",{className:"text-center py-12 text-[var(--text-muted)]",children:[r.jsx("p",{className:"text-2xl mb-2",children:"◎"}),r.jsx("p",{children:"No identities yet. Create one above."})]}),r.jsx("div",{className:"flex flex-col gap-3",children:t.map(d=>r.jsx(P1,{identity:d,token:e,editing:u===d.id,onEdit:()=>c(u===d.id?null:d.id),onSave:y=>E(d.id,y),onDelete:()=>v(d.id),onSetDefault:()=>E(d.id,{setDefault:!0})},d.id))})]})}function s0({form:e,onChange:t,error:l}){return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"section-label mb-1 block",children:"Name *"}),r.jsx("input",{className:"input",placeholder:"e.g. Senior Engineer",value:e.name,onChange:a=>t({...e,name:a.target.value})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"section-label mb-1 block",children:"Description"}),r.jsx("input",{className:"input",placeholder:"Short description",value:e.description,onChange:a=>t({...e,description:a.target.value})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"section-label mb-1 block",children:"System Prompt"}),r.jsx("textarea",{className:"input resize-none",rows:3,placeholder:"You are a senior engineer who writes concise, maintainable code...",value:e.systemPrompt,onChange:a=>t({...e,systemPrompt:a.target.value})})]}),r.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:e.setDefault,onChange:a=>t({...e,setDefault:a.target.checked}),className:"accent-[var(--accent)]"}),r.jsx("span",{className:"text-sm text-[var(--text-muted)]",children:"Set as default identity"})]}),l&&r.jsx("p",{className:"text-[11px] text-[var(--error)] font-mono",children:l})]})}function P1({identity:e,editing:t,onEdit:l,onSave:a,onDelete:n,onSetDefault:i}){var h;const[s,u]=S.useState({name:e.name,description:e.description??"",systemPrompt:e.systemPrompt??"",setDefault:e.isDefault}),[c,f]=S.useState(!1);return r.jsxs("div",{className:`glass-elevated rounded-[var(--radius-lg)] p-4 border transition-all ${t?"border-[var(--accent)]/40":"border-[var(--border-base)]"}`,children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx("div",{className:"w-8 h-8 rounded-full bg-[var(--accent)]/20 flex items-center justify-center flex-shrink-0 text-[var(--accent)] font-bold text-sm",children:(h=e.name[0])==null?void 0:h.toUpperCase()}),r.jsxs("div",{className:"min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("p",{className:"font-medium text-[var(--text-primary)] truncate",children:e.name}),e.isDefault&&r.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--accent)]/20 text-[var(--accent)] font-mono",children:"Default"})]}),e.description&&r.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-0.5 truncate",children:e.description})]})]}),r.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[!e.isDefault&&r.jsx("button",{onClick:i,className:"btn glass text-xs h-7 px-2",children:"Set Default"}),r.jsx("button",{onClick:l,className:"btn glass text-xs h-7 px-2",children:t?"Cancel":"Edit"}),c?r.jsx("button",{onClick:n,className:"btn text-xs h-7 px-2 bg-[var(--error)] border-transparent text-white",children:"Confirm"}):r.jsx("button",{onClick:()=>f(!0),className:"btn glass text-xs h-7 px-2 text-[var(--error)]",children:"Delete"})]})]}),t&&r.jsxs("div",{className:"mt-4 pt-4 border-t border-[var(--border-base)]",children:[r.jsx(s0,{form:s,onChange:u,error:""}),r.jsx("div",{className:"flex gap-2 mt-4",children:r.jsx("button",{onClick:()=>a(s),className:"btn btn-primary text-sm",children:"Save Changes"})})]})]})}function ex({token:e}){const[t,l]=S.useState({}),[a,n]=S.useState(!1),[i,s]=S.useState(!1),[u,c]=S.useState("");S.useEffect(()=>{fetch("/api/config",{headers:{Authorization:`Bearer ${e}`}}).then(m=>{if(!m.ok)throw new Error(`HTTP ${m.status}`);return m.json()}).then(m=>{m.tierLimits&&l(m.tierLimits)}).catch(()=>c("Failed to load tier limits."))},[e]);const f=async()=>{n(!0),c("");try{const m=await fetch("/api/config",{method:"PUT",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({tierLimits:t})});if(!m.ok)throw new Error(`HTTP ${m.status}`);s(!0),setTimeout(()=>s(!1),2e3)}catch{c("Failed to save tier limits.")}finally{n(!1)}},h=[{key:"t1MaxTokens",label:"T1 (Administrator)",desc:"Max output tokens for the planner tier",placeholder:"4096"},{key:"t2MaxTokens",label:"T2 (Manager)",desc:"Max output tokens for manager/coordinator",placeholder:"8192"},{key:"t3MaxTokens",label:"T3 (Worker)",desc:"Max output tokens for each task worker",placeholder:"32768"}];return r.jsxs("section",{children:[r.jsx("h2",{className:"text-lg font-bold text-[var(--text-primary)] mb-1",children:"Tier Token Limits"}),r.jsx("p",{className:"text-sm text-[var(--text-muted)] mb-6",children:"Cap the maximum output tokens per AI call for each tier. Leave blank to use model defaults."}),r.jsx("div",{className:"glass-elevated rounded-[var(--radius-lg)] divide-y divide-[var(--border-base)]",children:h.map(m=>r.jsxs("div",{className:"flex items-center justify-between p-5 gap-6",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-[var(--text-primary)]",children:m.label}),r.jsx("p",{className:"text-sm text-[var(--text-muted)] mt-0.5",children:m.desc})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("input",{type:"number",min:128,max:2e5,step:128,placeholder:m.placeholder,value:t[m.key]??"",onChange:o=>l(g=>({...g,[m.key]:o.target.value?Number(o.target.value):void 0})),className:"input w-28 text-right font-mono text-sm"}),r.jsx("span",{className:"text-xs text-[var(--text-faint)] font-mono",children:"tokens"})]})]},m.key))}),r.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[r.jsx("button",{onClick:f,disabled:a,className:"btn btn-primary",children:a?"Saving…":i?"✓ Saved":"Save Limits"}),i&&r.jsx("span",{className:"text-xs text-green-400 font-mono",children:"Persisted to .cascade/config.json"}),u&&r.jsx("span",{className:"text-xs text-[var(--error)] font-mono",children:u})]})]})}function tx({token:e}){var x;const[t,l]=S.useState({warnAtPct:80}),[a,n]=S.useState(null),[i,s]=S.useState(!1),[u,c]=S.useState(!1),[f,h]=S.useState("");S.useEffect(()=>{fetch("/api/config",{headers:{Authorization:`Bearer ${e}`}}).then(b=>{if(!b.ok)throw new Error(`HTTP ${b.status}`);return b.json()}).then(b=>{b.budget&&l(b.budget)}).catch(()=>h("Failed to load budget config.")),fetch("/api/stats",{headers:{Authorization:`Bearer ${e}`}}).then(b=>{if(!b.ok)throw new Error(`HTTP ${b.status}`);return b.json()}).then(b=>n(b)).catch(()=>{})},[e]);const m=async()=>{s(!0),h("");try{const b=await fetch("/api/config",{method:"PUT",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({budget:t})});if(!b.ok)throw new Error(`HTTP ${b.status}`);c(!0),setTimeout(()=>c(!1),2e3)}catch{h("Failed to save budget.")}finally{s(!1)}},o=t.sessionBudgetUsd&&a?Math.min(100,a.totalCostUsd/t.sessionBudgetUsd*100):null,g=t.warnAtPct;return r.jsxs("section",{children:[r.jsx("h2",{className:"text-lg font-bold text-[var(--text-primary)] mb-1",children:"Cost Budget"}),r.jsx("p",{className:"text-sm text-[var(--text-muted)] mb-6",children:"Set spending limits. The agent will abort if a session budget is exceeded."}),r.jsxs("div",{className:"glass-elevated rounded-[var(--radius-lg)] divide-y divide-[var(--border-base)] mb-4",children:[r.jsxs("div",{className:"p-5",children:[r.jsxs("div",{className:"flex items-center justify-between gap-6",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-[var(--text-primary)]",children:"Session Budget"}),r.jsx("p",{className:"text-sm text-[var(--text-muted)] mt-0.5",children:"Max spend per REPL session. Exceeding this aborts the current run."})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-[var(--text-faint)] font-mono text-sm",children:"$"}),r.jsx("input",{type:"number",min:0,step:.01,placeholder:"0.50",value:t.sessionBudgetUsd??"",onChange:b=>l(E=>({...E,sessionBudgetUsd:b.target.value?Number(b.target.value):void 0})),className:"input w-24 text-right font-mono text-sm"})]})]}),o!==null&&r.jsxs("div",{className:"mt-3",children:[r.jsxs("div",{className:"flex justify-between text-xs text-[var(--text-faint)] mb-1",children:[r.jsx("span",{children:"Session spend"}),r.jsxs("span",{children:["$",a==null?void 0:a.totalCostUsd.toFixed(4)," / $",(x=t.sessionBudgetUsd)==null?void 0:x.toFixed(2)]})]}),r.jsx("div",{className:"h-1.5 rounded-full bg-[var(--bg-base)] overflow-hidden",children:r.jsx("div",{className:`h-full rounded-full transition-all ${o>=100?"bg-[var(--error)]":o>=g?"bg-yellow-400":"bg-[var(--accent)]"}`,style:{width:`${o}%`}})})]})]}),r.jsx("div",{className:"p-5",children:r.jsxs("div",{className:"flex items-center justify-between gap-6",children:[r.jsxs("div",{children:[r.jsxs("p",{className:"font-medium text-[var(--text-primary)]",children:["Daily Budget ",r.jsx("span",{className:"text-xs text-[var(--text-faint)] ml-1",children:"(display only)"})]}),r.jsx("p",{className:"text-sm text-[var(--text-muted)] mt-0.5",children:"Informational limit shown in the dashboard for reference."})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-[var(--text-faint)] font-mono text-sm",children:"$"}),r.jsx("input",{type:"number",min:0,step:.1,placeholder:"5.00",value:t.dailyBudgetUsd??"",onChange:b=>l(E=>({...E,dailyBudgetUsd:b.target.value?Number(b.target.value):void 0})),className:"input w-24 text-right font-mono text-sm"})]})]})}),r.jsxs("div",{className:"p-5",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-[var(--text-primary)]",children:"Warn at"}),r.jsx("p",{className:"text-sm text-[var(--text-muted)] mt-0.5",children:"Show a dashboard warning when spend reaches this % of limit."})]}),r.jsxs("span",{className:"text-sm font-mono text-[var(--accent)]",children:[t.warnAtPct,"%"]})]}),r.jsx("input",{type:"range",min:10,max:99,step:5,value:t.warnAtPct,onChange:b=>l(E=>({...E,warnAtPct:Number(b.target.value)})),className:"w-full accent-[var(--accent)]"}),r.jsxs("div",{className:"flex justify-between text-xs text-[var(--text-faint)] mt-1",children:[r.jsx("span",{children:"10%"}),r.jsx("span",{children:"50%"}),r.jsx("span",{children:"99%"})]})]})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:m,disabled:i,className:"btn btn-primary",children:i?"Saving…":u?"✓ Saved":"Save Budget"}),u&&r.jsx("span",{className:"text-xs text-green-400 font-mono",children:"Persisted to .cascade/config.json"}),f&&r.jsx("span",{className:"text-xs text-[var(--error)] font-mono",children:f})]})]})}function lx({token:e,dispatch:t}){const[l,a]=S.useState(null),[n,i]=S.useState(!1),s=async u=>{a(u);try{await fetch(u,{method:"DELETE",headers:{Authorization:`Bearer ${e}`}})}finally{a(null),i(!1)}};return r.jsxs("section",{children:[r.jsx("h2",{className:"text-lg font-bold text-[var(--error)] mb-1",children:"Danger Zone"}),r.jsx("p",{className:"text-sm text-[var(--text-muted)] mb-6",children:"These actions are irreversible."}),r.jsxs("div",{className:"rounded-[var(--radius-lg)] border border-[var(--error)]/30 divide-y divide-[var(--error)]/10 overflow-hidden",children:[r.jsx(Au,{title:"Clear All Sessions",desc:"Permanently delete all conversation sessions and messages.",action:n?r.jsx("button",{onClick:()=>s("/api/sessions"),disabled:!!l,className:"btn text-sm bg-[var(--error)] border-transparent text-white",children:l==="/api/sessions"?"Clearing…":"Confirm Delete"}):r.jsx("button",{onClick:()=>i(!0),className:"btn glass text-sm border-[var(--error)]/40 text-[var(--error)]",children:"Clear Sessions"})}),r.jsx(Au,{title:"Clear Graphs (Backend + Frontend)",desc:"Delete all runtime node logs from DB and reset the topology view.",action:r.jsx("button",{onClick:async()=>{await s("/api/runtime"),t(No())},disabled:!!l,className:"btn glass text-sm border-[var(--error)]/40 text-[var(--error)]",children:l==="/api/runtime"?"Clearing…":"Clear DB Graphs"})}),r.jsx(Au,{title:"Clear Graphs (Frontend Only)",desc:"Reset the topology view locally without touching the server database.",action:r.jsx("button",{onClick:()=>t(No()),className:"btn glass text-sm",children:"Clear View"})})]})]})}function Au({title:e,desc:t,action:l}){return r.jsxs("div",{className:"flex items-center justify-between gap-6 p-5 bg-[var(--error)]/[0.03]",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-[var(--text-primary)]",children:e}),r.jsx("p",{className:"text-sm text-[var(--text-muted)] mt-0.5",children:t})]}),r.jsx("div",{className:"flex-shrink-0",children:l})]})}function ax(){return r.jsx("div",{className:"flex items-center justify-center py-16",children:r.jsx("div",{className:"w-6 h-6 rounded-full border-2 border-[var(--accent)] border-t-transparent animate-spin"})})}function nx(){const[e,t]=S.useState(()=>localStorage.getItem("cascade_token")),[l,a]=S.useState(e===null);S.useEffect(()=>{e===null&&(async()=>{try{(await fetch("/api/runtime?scope=workspace",{headers:{Authorization:"Bearer "}})).ok&&(t(""),localStorage.setItem("cascade_token",""))}catch{}finally{a(!1)}})()},[e]);const n=S.useCallback(s=>{t(s),localStorage.setItem("cascade_token",s)},[]),i=S.useCallback(()=>{t(null),localStorage.removeItem("cascade_token")},[]);return l?r.jsx("div",{className:"flex items-center justify-center w-full h-full bg-[var(--bg-base)]",children:r.jsxs("div",{className:"flex flex-col items-center gap-3",children:[r.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-[var(--accent)] border-t-transparent animate-spin"}),r.jsx("p",{className:"section-label",children:"Connecting…"})]})}):e===null?r.jsx(Pp,{onLogin:n}):r.jsx(ix,{token:e,onLogout:i,onNeedAuth:()=>{t(null),localStorage.removeItem("cascade_token")}})}function ix({token:e,onLogout:t,onNeedAuth:l}){const a=Cs(),n=()=>{const T=window.location.hash.slice(1);return["topology","sessions","logs","settings"].includes(T)?T:"topology"},[i,s]=S.useState(n),u=S.useCallback(T=>{s(T),window.location.hash=T},[]);S.useLayoutEffect(()=>{const T=()=>s(n());return window.addEventListener("popstate",T),()=>window.removeEventListener("popstate",T)},[]);const[c,f]=S.useState(null),[h,m]=S.useState({}),[o,g]=S.useState(null),[x,b]=S.useState(0),[E,v]=S.useState(0),[d,y]=S.useState([]),p=Xt(Bp),_=Xt(wr),N=Xt(Lp),j=Xt(qp),M=S.useRef(o);M.current=o;const A=S.useCallback(async(T="workspace")=>{try{const D=await fetch(`/api/runtime?scope=${T}`,{headers:{Authorization:`Bearer ${e}`},cache:"no-store"});if(D.status===401){l();return}if(D.ok){const K=await D.json();a(Wm(K))}}catch{}},[e,a,l]),{socket:O}=Ip({url:"/",token:e,activeSessionId:_==null?void 0:_.sessionId,onRuntimeRefresh:T=>A(T??"workspace"),onStreamToken:T=>{m(D=>{const K=D[T.tierId]||"";return{...D,[T.tierId]:(K+T.text).slice(-8e3)}})},onCostUpdate:T=>{typeof T.totalCostUsd=="number"&&b(T.totalCostUsd),typeof T.totalTokens=="number"&&v(T.totalTokens)},onEscalation:T=>{M.current||g(T)}});S.useEffect(()=>{A()},[A]);const G=S.useRef(0);S.useEffect(()=>{const T=j.slice(G.current);if(G.current=j.length,!T.length)return;const D=T.filter(R=>R.fromId&&(R.toId||p.some(Pe=>Pe.tierId!==R.fromId))).map(R=>{var Pe;return{id:`peer-${R.timestamp}-${R.fromId}`,from:R.fromId,to:R.toId??((Pe=p.find(Cl=>Cl.tierId!==R.fromId))==null?void 0:Pe.tierId)??"",syncType:R.syncType}}).filter(R=>R.to);if(!D.length)return;y(R=>[...R,...D]);const K=new Set(D.map(R=>R.id));setTimeout(()=>y(R=>R.filter(Pe=>!K.has(Pe.id))),3e3)},[j,p]);const fe=S.useMemo(()=>p.map(T=>({id:T.tierId,role:T.role,label:T.label,status:T.status,action:T.currentAction,progressPct:T.progressPct})),[p]),Ie=S.useMemo(()=>p.filter(T=>T.parentId).map(T=>({from:T.parentId,to:T.tierId})),[p]),sl=S.useMemo(()=>p.find(T=>T.tierId===c)??null,[p,c]),za=S.useCallback((T,D)=>{!o||!O||(O.emit("permission:decision",{requestId:o.id,approved:T,always:D,decidedBy:"USER"}),g(null))},[o,O]),C=c!==null;return r.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-[var(--bg-base)]",children:[r.jsx(g1,{activeTab:i,onTabChange:u,onLogout:t}),r.jsxs("div",{className:"flex flex-col flex-1 min-w-0 overflow-hidden",children:[r.jsx(x1,{isConnected:N,totalCostUsd:x,totalTokens:E}),r.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[r.jsxs("main",{className:"flex-1 min-w-0 overflow-hidden relative dot-grid",children:[i==="topology"&&r.jsx(E1,{nodes:fe,edges:Ie,peerEdges:d,selectedNodeId:c??void 0,onSelectNode:f}),i==="sessions"&&r.jsx(M1,{}),i==="logs"&&r.jsx($1,{}),i==="settings"&&r.jsx(W1,{token:e})]}),i==="topology"&&C&&r.jsx(j1,{node:sl,streamLog:c&&h[c]||"",peerMessages:j.filter(T=>T.fromId===c||T.toId===c),onClose:()=>f(null)})]})]}),o&&r.jsx(T1,{request:o,onDecide:za})]})}Kg.createRoot(document.getElementById("root")).render(r.jsx(m0.StrictMode,{children:r.jsx(hy,{store:Vp,children:r.jsx(nx,{})})}));