@axlsdk/studio 0.13.5 → 0.13.7

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,221 @@
1
+ var Hv=Object.defineProperty;var Hp=n=>{throw TypeError(n)};var qv=(n,r,o)=>r in n?Hv(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o;var Qr=(n,r,o)=>qv(n,typeof r!="symbol"?r+"":r,o),Ic=(n,r,o)=>r.has(n)||Hp("Cannot "+o);var S=(n,r,o)=>(Ic(n,r,"read from private field"),o?o.call(n):r.get(n)),he=(n,r,o)=>r.has(n)?Hp("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,o),ie=(n,r,o,c)=>(Ic(n,r,"write to private field"),c?c.call(n,o):r.set(n,o),o),ze=(n,r,o)=>(Ic(n,r,"access private method"),o);var Su=(n,r,o,c)=>({set _(d){ie(n,r,d,o)},get _(){return S(n,r,c)}});(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&c(m)}).observe(document,{childList:!0,subtree:!0});function o(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function c(d){if(d.ep)return;d.ep=!0;const h=o(d);fetch(d.href,h)}})();var Pc={exports:{}},Gr={};/**
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 qp;function Lv(){if(qp)return Gr;qp=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(c,d,h){var m=null;if(h!==void 0&&(m=""+h),d.key!==void 0&&(m=""+d.key),"key"in d){h={};for(var x in d)x!=="key"&&(h[x]=d[x])}else h=d;return d=h.ref,{$$typeof:n,type:c,key:m,ref:d!==void 0?d:null,props:h}}return Gr.Fragment=r,Gr.jsx=o,Gr.jsxs=o,Gr}var Lp;function Bv(){return Lp||(Lp=1,Pc.exports=Lv()),Pc.exports}var s=Bv(),ed={exports:{}},Ne={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Bp;function Qv(){if(Bp)return Ne;Bp=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),m=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),T=Symbol.iterator;function E(C){return C===null||typeof C!="object"?null:(C=T&&C[T]||C["@@iterator"],typeof C=="function"?C:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,U={};function _(C,V,le){this.props=C,this.context=V,this.refs=U,this.updater=le||B}_.prototype.isReactComponent={},_.prototype.setState=function(C,V){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,V,"setState")},_.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function J(){}J.prototype=_.prototype;function M(C,V,le){this.props=C,this.context=V,this.refs=U,this.updater=le||B}var D=M.prototype=new J;D.constructor=M,L(D,_.prototype),D.isPureReactComponent=!0;var w=Array.isArray;function k(){}var A={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function R(C,V,le){var ue=le.ref;return{$$typeof:n,type:C,key:V,ref:ue!==void 0?ue:null,props:le}}function F(C,V){return R(C.type,V,C.props)}function se(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function I(C){var V={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(le){return V[le]})}var re=/\/+/g;function ve(C,V){return typeof C=="object"&&C!==null&&C.key!=null?I(""+C.key):V.toString(36)}function pe(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(k,k):(C.status="pending",C.then(function(V){C.status==="pending"&&(C.status="fulfilled",C.value=V)},function(V){C.status==="pending"&&(C.status="rejected",C.reason=V)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function G(C,V,le,ue,ye){var be=typeof C;(be==="undefined"||be==="boolean")&&(C=null);var ae=!1;if(C===null)ae=!0;else switch(be){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(C.$$typeof){case n:case r:ae=!0;break;case j:return ae=C._init,G(ae(C._payload),V,le,ue,ye)}}if(ae)return ye=ye(C),ae=ue===""?"."+ve(C,0):ue,w(ye)?(le="",ae!=null&&(le=ae.replace(re,"$&/")+"/"),G(ye,V,le,"",function(Qe){return Qe})):ye!=null&&(se(ye)&&(ye=F(ye,le+(ye.key==null||C&&C.key===ye.key?"":(""+ye.key).replace(re,"$&/")+"/")+ae)),V.push(ye)),1;ae=0;var Me=ue===""?".":ue+":";if(w(C))for(var Ee=0;Ee<C.length;Ee++)ue=C[Ee],be=Me+ve(ue,Ee),ae+=G(ue,V,le,be,ye);else if(Ee=E(C),typeof Ee=="function")for(C=Ee.call(C),Ee=0;!(ue=C.next()).done;)ue=ue.value,be=Me+ve(ue,Ee++),ae+=G(ue,V,le,be,ye);else if(be==="object"){if(typeof C.then=="function")return G(pe(C),V,le,ue,ye);throw V=String(C),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ae}function W(C,V,le){if(C==null)return C;var ue=[],ye=0;return G(C,ue,"","",function(be){return V.call(le,be,ye++)}),ue}function ee(C){if(C._status===-1){var V=C._result;V=V(),V.then(function(le){(C._status===0||C._status===-1)&&(C._status=1,C._result=le)},function(le){(C._status===0||C._status===-1)&&(C._status=2,C._result=le)}),C._status===-1&&(C._status=0,C._result=V)}if(C._status===1)return C._result.default;throw C._result}var fe=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},Se={map:W,forEach:function(C,V,le){W(C,function(){V.apply(this,arguments)},le)},count:function(C){var V=0;return W(C,function(){V++}),V},toArray:function(C){return W(C,function(V){return V})||[]},only:function(C){if(!se(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return Ne.Activity=v,Ne.Children=Se,Ne.Component=_,Ne.Fragment=o,Ne.Profiler=d,Ne.PureComponent=M,Ne.StrictMode=c,Ne.Suspense=p,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(C){return A.H.useMemoCache(C)}},Ne.cache=function(C){return function(){return C.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(C,V,le){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var ue=L({},C.props),ye=C.key;if(V!=null)for(be in V.key!==void 0&&(ye=""+V.key),V)!Y.call(V,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&V.ref===void 0||(ue[be]=V[be]);var be=arguments.length-2;if(be===1)ue.children=le;else if(1<be){for(var ae=Array(be),Me=0;Me<be;Me++)ae[Me]=arguments[Me+2];ue.children=ae}return R(C.type,ye,ue)},Ne.createContext=function(C){return C={$$typeof:m,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:h,_context:C},C},Ne.createElement=function(C,V,le){var ue,ye={},be=null;if(V!=null)for(ue in V.key!==void 0&&(be=""+V.key),V)Y.call(V,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(ye[ue]=V[ue]);var ae=arguments.length-2;if(ae===1)ye.children=le;else if(1<ae){for(var Me=Array(ae),Ee=0;Ee<ae;Ee++)Me[Ee]=arguments[Ee+2];ye.children=Me}if(C&&C.defaultProps)for(ue in ae=C.defaultProps,ae)ye[ue]===void 0&&(ye[ue]=ae[ue]);return R(C,be,ye)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(C){return{$$typeof:x,render:C}},Ne.isValidElement=se,Ne.lazy=function(C){return{$$typeof:j,_payload:{_status:-1,_result:C},_init:ee}},Ne.memo=function(C,V){return{$$typeof:y,type:C,compare:V===void 0?null:V}},Ne.startTransition=function(C){var V=A.T,le={};A.T=le;try{var ue=C(),ye=A.S;ye!==null&&ye(le,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(k,fe)}catch(be){fe(be)}finally{V!==null&&le.types!==null&&(V.types=le.types),A.T=V}},Ne.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Ne.use=function(C){return A.H.use(C)},Ne.useActionState=function(C,V,le){return A.H.useActionState(C,V,le)},Ne.useCallback=function(C,V){return A.H.useCallback(C,V)},Ne.useContext=function(C){return A.H.useContext(C)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(C,V){return A.H.useDeferredValue(C,V)},Ne.useEffect=function(C,V){return A.H.useEffect(C,V)},Ne.useEffectEvent=function(C){return A.H.useEffectEvent(C)},Ne.useId=function(){return A.H.useId()},Ne.useImperativeHandle=function(C,V,le){return A.H.useImperativeHandle(C,V,le)},Ne.useInsertionEffect=function(C,V){return A.H.useInsertionEffect(C,V)},Ne.useLayoutEffect=function(C,V){return A.H.useLayoutEffect(C,V)},Ne.useMemo=function(C,V){return A.H.useMemo(C,V)},Ne.useOptimistic=function(C,V){return A.H.useOptimistic(C,V)},Ne.useReducer=function(C,V,le){return A.H.useReducer(C,V,le)},Ne.useRef=function(C){return A.H.useRef(C)},Ne.useState=function(C){return A.H.useState(C)},Ne.useSyncExternalStore=function(C,V,le){return A.H.useSyncExternalStore(C,V,le)},Ne.useTransition=function(){return A.H.useTransition()},Ne.version="19.2.4",Ne}var Qp;function Ad(){return Qp||(Qp=1,ed.exports=Qv()),ed.exports}var b=Ad(),td={exports:{}},Yr={},ld={exports:{}},ad={};/**
18
+ * @license React
19
+ * scheduler.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 Gp;function Gv(){return Gp||(Gp=1,(function(n){function r(G,W){var ee=G.length;G.push(W);e:for(;0<ee;){var fe=ee-1>>>1,Se=G[fe];if(0<d(Se,W))G[fe]=W,G[ee]=Se,ee=fe;else break e}}function o(G){return G.length===0?null:G[0]}function c(G){if(G.length===0)return null;var W=G[0],ee=G.pop();if(ee!==W){G[0]=ee;e:for(var fe=0,Se=G.length,C=Se>>>1;fe<C;){var V=2*(fe+1)-1,le=G[V],ue=V+1,ye=G[ue];if(0>d(le,ee))ue<Se&&0>d(ye,le)?(G[fe]=ye,G[ue]=ee,fe=ue):(G[fe]=le,G[V]=ee,fe=V);else if(ue<Se&&0>d(ye,ee))G[fe]=ye,G[ue]=ee,fe=ue;else break e}}return W}function d(G,W){var ee=G.sortIndex-W.sortIndex;return ee!==0?ee:G.id-W.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var m=Date,x=m.now();n.unstable_now=function(){return m.now()-x}}var p=[],y=[],j=1,v=null,T=3,E=!1,B=!1,L=!1,U=!1,_=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function D(G){for(var W=o(y);W!==null;){if(W.callback===null)c(y);else if(W.startTime<=G)c(y),W.sortIndex=W.expirationTime,r(p,W);else break;W=o(y)}}function w(G){if(L=!1,D(G),!B)if(o(p)!==null)B=!0,k||(k=!0,I());else{var W=o(y);W!==null&&pe(w,W.startTime-G)}}var k=!1,A=-1,Y=5,R=-1;function F(){return U?!0:!(n.unstable_now()-R<Y)}function se(){if(U=!1,k){var G=n.unstable_now();R=G;var W=!0;try{e:{B=!1,L&&(L=!1,J(A),A=-1),E=!0;var ee=T;try{t:{for(D(G),v=o(p);v!==null&&!(v.expirationTime>G&&F());){var fe=v.callback;if(typeof fe=="function"){v.callback=null,T=v.priorityLevel;var Se=fe(v.expirationTime<=G);if(G=n.unstable_now(),typeof Se=="function"){v.callback=Se,D(G),W=!0;break t}v===o(p)&&c(p),D(G)}else c(p);v=o(p)}if(v!==null)W=!0;else{var C=o(y);C!==null&&pe(w,C.startTime-G),W=!1}}break e}finally{v=null,T=ee,E=!1}W=void 0}}finally{W?I():k=!1}}}var I;if(typeof M=="function")I=function(){M(se)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,ve=re.port2;re.port1.onmessage=se,I=function(){ve.postMessage(null)}}else I=function(){_(se,0)};function pe(G,W){A=_(function(){G(n.unstable_now())},W)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(G){G.callback=null},n.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<G?Math.floor(1e3/G):5},n.unstable_getCurrentPriorityLevel=function(){return T},n.unstable_next=function(G){switch(T){case 1:case 2:case 3:var W=3;break;default:W=T}var ee=T;T=W;try{return G()}finally{T=ee}},n.unstable_requestPaint=function(){U=!0},n.unstable_runWithPriority=function(G,W){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var ee=T;T=G;try{return W()}finally{T=ee}},n.unstable_scheduleCallback=function(G,W,ee){var fe=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?fe+ee:fe):ee=fe,G){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=ee+Se,G={id:j++,callback:W,priorityLevel:G,startTime:ee,expirationTime:Se,sortIndex:-1},ee>fe?(G.sortIndex=ee,r(y,G),o(p)===null&&G===o(y)&&(L?(J(A),A=-1):L=!0,pe(w,ee-fe))):(G.sortIndex=Se,r(p,G),B||E||(B=!0,k||(k=!0,I()))),G},n.unstable_shouldYield=F,n.unstable_wrapCallback=function(G){var W=T;return function(){var ee=T;T=W;try{return G.apply(this,arguments)}finally{T=ee}}}})(ad)),ad}var Yp;function Yv(){return Yp||(Yp=1,ld.exports=Gv()),ld.exports}var nd={exports:{}},Ht={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Xp;function Xv(){if(Xp)return Ht;Xp=1;var n=Ad();function r(p){var y="https://react.dev/errors/"+p;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)y+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+p+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var c={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},d=Symbol.for("react.portal");function h(p,y,j){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:v==null?null:""+v,children:p,containerInfo:y,implementation:j}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(p,y){if(p==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,Ht.createPortal=function(p,y){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(r(299));return h(p,y,null,j)},Ht.flushSync=function(p){var y=m.T,j=c.p;try{if(m.T=null,c.p=2,p)return p()}finally{m.T=y,c.p=j,c.d.f()}},Ht.preconnect=function(p,y){typeof p=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,c.d.C(p,y))},Ht.prefetchDNS=function(p){typeof p=="string"&&c.d.D(p)},Ht.preinit=function(p,y){if(typeof p=="string"&&y&&typeof y.as=="string"){var j=y.as,v=x(j,y.crossOrigin),T=typeof y.integrity=="string"?y.integrity:void 0,E=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;j==="style"?c.d.S(p,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:v,integrity:T,fetchPriority:E}):j==="script"&&c.d.X(p,{crossOrigin:v,integrity:T,fetchPriority:E,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},Ht.preinitModule=function(p,y){if(typeof p=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var j=x(y.as,y.crossOrigin);c.d.M(p,{crossOrigin:j,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&c.d.M(p)},Ht.preload=function(p,y){if(typeof p=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var j=y.as,v=x(j,y.crossOrigin);c.d.L(p,j,{crossOrigin:v,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},Ht.preloadModule=function(p,y){if(typeof p=="string")if(y){var j=x(y.as,y.crossOrigin);c.d.m(p,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:j,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else c.d.m(p)},Ht.requestFormReset=function(p){c.d.r(p)},Ht.unstable_batchedUpdates=function(p,y){return p(y)},Ht.useFormState=function(p,y,j){return m.H.useFormState(p,y,j)},Ht.useFormStatus=function(){return m.H.useHostTransitionStatus()},Ht.version="19.2.4",Ht}var Vp;function Vv(){if(Vp)return nd.exports;Vp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),nd.exports=Xv(),nd.exports}/**
34
+ * @license React
35
+ * react-dom-client.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 Kp;function Kv(){if(Kp)return Yr;Kp=1;var n=Yv(),r=Ad(),o=Vv();function c(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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function m(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 x(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 p(e){if(h(e)!==e)throw Error(c(188))}function y(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(c(188));return t!==e?null:e}for(var l=e,a=t;;){var i=l.return;if(i===null)break;var u=i.alternate;if(u===null){if(a=i.return,a!==null){l=a;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===l)return p(i),e;if(u===a)return p(i),t;u=u.sibling}throw Error(c(188))}if(l.return!==a.return)l=i,a=u;else{for(var f=!1,g=i.child;g;){if(g===l){f=!0,l=i,a=u;break}if(g===a){f=!0,a=i,l=u;break}g=g.sibling}if(!f){for(g=u.child;g;){if(g===l){f=!0,l=u,a=i;break}if(g===a){f=!0,a=u,l=i;break}g=g.sibling}if(!f)throw Error(c(189))}}if(l.alternate!==a)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,T=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),M=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function I(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var re=Symbol.for("react.client.reference");function ve(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case L:return"Fragment";case _:return"Profiler";case U:return"StrictMode";case w:return"Suspense";case k:return"SuspenseList";case R:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case B:return"Portal";case M:return e.displayName||"Context";case J:return(e._context.displayName||"Context")+".Consumer";case D:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case A:return t=e.displayName||null,t!==null?t:ve(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var pe=Array.isArray,G=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},fe=[],Se=-1;function C(e){return{current:e}}function V(e){0>Se||(e.current=fe[Se],fe[Se]=null,Se--)}function le(e,t){Se++,fe[Se]=e.current,e.current=t}var ue=C(null),ye=C(null),be=C(null),ae=C(null);function Me(e,t){switch(le(be,t),le(ye,e),le(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?rp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=rp(t),e=ip(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(ue),le(ue,e)}function Ee(){V(ue),V(ye),V(be)}function Qe(e){e.memoizedState!==null&&le(ae,e);var t=ue.current,l=ip(t,e.type);t!==l&&(le(ye,e),le(ue,l))}function Lt(e){ye.current===e&&(V(ue),V(ye)),ae.current===e&&(V(ae),Hr._currentValue=ee)}var ol,at;function Ot(e){if(ol===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);ol=t&&t[1]||"",at=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+ol+e+at}var ht=!1;function cl(e,t){if(!e||ht)return"";ht=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(X){var Q=X}Reflect.construct(e,[],$)}else{try{$.call()}catch(X){Q=X}e.call($.prototype)}}else{try{throw Error()}catch(X){Q=X}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(X){if(X&&Q&&typeof X.stack=="string")return[X.stack,Q.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),f=u[0],g=u[1];if(f&&g){var N=f.split(`
44
+ `),q=g.split(`
45
+ `);for(i=a=0;a<N.length&&!N[a].includes("DetermineComponentFrameRoot");)a++;for(;i<q.length&&!q[i].includes("DetermineComponentFrameRoot");)i++;if(a===N.length||i===q.length)for(a=N.length-1,i=q.length-1;1<=a&&0<=i&&N[a]!==q[i];)i--;for(;1<=a&&0<=i;a--,i--)if(N[a]!==q[i]){if(a!==1||i!==1)do if(a--,i--,0>i||N[a]!==q[i]){var K=`
46
+ `+N[a].replace(" at new "," at ");return e.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",e.displayName)),K}while(1<=a&&0<=i);break}}}finally{ht=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ot(l):""}function Bu(e,t){switch(e.tag){case 26:case 27:case 5:return Ot(e.type);case 16:return Ot("Lazy");case 13:return e.child!==t&&t!==null?Ot("Suspense Fallback"):Ot("Suspense");case 19:return Ot("SuspenseList");case 0:case 15:return cl(e.type,!1);case 11:return cl(e.type.render,!1);case 1:return cl(e.type,!0);case 31:return Ot("Activity");default:return""}}function si(e){try{var t="",l=null;do t+=Bu(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
+ Error generating stack: `+a.message+`
48
+ `+a.stack}}var $s=Object.prototype.hasOwnProperty,Fs=n.unstable_scheduleCallback,Ca=n.unstable_cancelCallback,Ct=n.unstable_shouldYield,Dl=n.unstable_requestPaint,_e=n.unstable_now,Ws=n.unstable_getCurrentPriorityLevel,Ge=n.unstable_ImmediatePriority,ri=n.unstable_UserBlockingPriority,Yn=n.unstable_NormalPriority,Qu=n.unstable_LowPriority,ii=n.unstable_IdlePriority,Xn=n.log,Vn=n.unstable_setDisableYieldValue,dl=null,At=null;function Ut(e){if(typeof Xn=="function"&&Vn(e),At&&typeof At.setStrictMode=="function")try{At.setStrictMode(dl,e)}catch{}}var zt=Math.clz32?Math.clz32:oi,Gu=Math.log,ui=Math.LN2;function oi(e){return e>>>=0,e===0?32:31-(Gu(e)/ui|0)|0}var Kn=256,kl=262144,Ul=4194304;function Jl(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 Zn(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var i=0,u=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var g=a&134217727;return g!==0?(a=g&~u,a!==0?i=Jl(a):(f&=g,f!==0?i=Jl(f):l||(l=g&~e,l!==0&&(i=Jl(l))))):(g=a&~u,g!==0?i=Jl(g):f!==0?i=Jl(f):l||(l=a&~e,l!==0&&(i=Jl(l)))),i===0?0:t!==0&&t!==i&&(t&u)===0&&(u=i&-i,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:i}function Ta(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Yu(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 Is(){var e=Ul;return Ul<<=1,(Ul&62914560)===0&&(Ul=4194304),e}function Jn(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function wa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ci(e,t,l,a,i,u){var f=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 g=e.entanglements,N=e.expirationTimes,q=e.hiddenUpdates;for(l=f&~l;0<l;){var K=31-zt(l),$=1<<K;g[K]=0,N[K]=-1;var Q=q[K];if(Q!==null)for(q[K]=null,K=0;K<Q.length;K++){var X=Q[K];X!==null&&(X.lane&=-536870913)}l&=~$}a!==0&&Ps(e,a,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(f&~t))}function Ps(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-zt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function P(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-zt(l),i=1<<a;i&t|e[a]&t&&(e[a]|=t),l&=~i}}function te(e,t){var l=t&-t;return l=(l&42)!==0?1:oe(l),(l&(e.suspendedLanes|t))!==0?0:l}function oe(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 Re(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ce(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:Ap(e.type))}function Ke(e,t){var l=W.p;try{return W.p=e,t()}finally{W.p=l}}var Oe=Math.random().toString(36).slice(2),ge="__reactFiber$"+Oe,je="__reactProps$"+Oe,Te="__reactContainer$"+Oe,Ue="__reactEvents$"+Oe,$l="__reactListeners$"+Oe,Ma="__reactHandles$"+Oe,Tl="__reactResources$"+Oe,mt="__reactMarker$"+Oe;function fl(e){delete e[ge],delete e[je],delete e[Ue],delete e[$l],delete e[Ma]}function Yt(e){var t=e[ge];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Te]||l[ge]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=mp(e);e!==null;){if(l=e[ge])return l;e=mp(e)}return t}e=l,l=e.parentNode}return null}function Fl(e){if(e=e[ge]||e[Te]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Wl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Hl(e){var t=e[Tl];return t||(t=e[Tl]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function pt(e){e[mt]=!0}var Oa=new Set,hn={};function mn(e,t){$n(e,t),$n(e+"Capture",t)}function $n(e,t){for(hn[e]=t,e=0;e<t.length;e++)Oa.add(t[e])}var Mg=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]*$"),$d={},Fd={};function Og(e){return $s.call(Fd,e)?!0:$s.call($d,e)?!1:Mg.test(e)?Fd[e]=!0:($d[e]=!0,!1)}function di(e,t,l){if(Og(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 fi(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 Il(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 hl(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ag(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 i=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(f){l=""+f,u.call(this,f)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(f){l=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xu(e){if(!e._valueTracker){var t=Wd(e)?"checked":"value";e._valueTracker=Ag(e,t,""+e[t])}}function Id(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Wd(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function hi(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 zg=/[\n"\\]/g;function ml(e){return e.replace(zg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Vu(e,t,l,a,i,u,f,g){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+hl(t)):e.value!==""+hl(t)&&(e.value=""+hl(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?Ku(e,f,hl(t)):l!=null?Ku(e,f,hl(l)):a!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.name=""+hl(g):e.removeAttribute("name")}function Pd(e,t,l,a,i,u,f,g){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Xu(e);return}l=l!=null?""+hl(l):"",t=t!=null?""+hl(t):l,g||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=g?e.checked:!!a,e.defaultChecked=!!a,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),Xu(e)}function Ku(e,t,l){t==="number"&&hi(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Fn(e,t,l,a){if(e=e.options,t){t={};for(var i=0;i<l.length;i++)t["$"+l[i]]=!0;for(l=0;l<e.length;l++)i=t.hasOwnProperty("$"+e[l].value),e[l].selected!==i&&(e[l].selected=i),i&&a&&(e[l].defaultSelected=!0)}else{for(l=""+hl(l),t=null,i=0;i<e.length;i++){if(e[i].value===l){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ef(e,t,l){if(t!=null&&(t=""+hl(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+hl(l):""}function tf(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(c(92));if(pe(a)){if(1<a.length)throw Error(c(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=hl(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Xu(e)}function Wn(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var _g=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 lf(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||_g.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function af(e,t,l){if(t!=null&&typeof t!="object")throw Error(c(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 i in t)a=t[i],t.hasOwnProperty(i)&&l[i]!==a&&lf(e,i,a)}else for(var u in t)t.hasOwnProperty(u)&&lf(e,u,t[u])}function Zu(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 Rg=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"]]),Dg=/^[\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 mi(e){return Dg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pl(){}var Ju=null;function $u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var In=null,Pn=null;function nf(e){var t=Fl(e);if(t&&(e=t.stateNode)){var l=e[je]||null;e:switch(e=t.stateNode,t.type){case"input":if(Vu(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="'+ml(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var i=a[je]||null;if(!i)throw Error(c(90));Vu(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Id(a)}break e;case"textarea":ef(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Fn(e,!!l.multiple,t,!1)}}}var Fu=!1;function sf(e,t,l){if(Fu)return e(t,l);Fu=!0;try{var a=e(t);return a}finally{if(Fu=!1,(In!==null||Pn!==null)&&(tu(),In&&(t=In,e=Pn,Pn=In=null,nf(t),e)))for(t=0;t<e.length;t++)nf(e[t])}}function er(e,t){var l=e.stateNode;if(l===null)return null;var a=l[je]||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(c(231,t,typeof l));return l}var ea=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wu=!1;if(ea)try{var tr={};Object.defineProperty(tr,"passive",{get:function(){Wu=!0}}),window.addEventListener("test",tr,tr),window.removeEventListener("test",tr,tr)}catch{Wu=!1}var Aa=null,Iu=null,pi=null;function rf(){if(pi)return pi;var e,t=Iu,l=t.length,a,i="value"in Aa?Aa.value:Aa.textContent,u=i.length;for(e=0;e<l&&t[e]===i[e];e++);var f=l-e;for(a=1;a<=f&&t[l-a]===i[u-a];a++);return pi=i.slice(e,1<a?1-a:void 0)}function xi(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 gi(){return!0}function uf(){return!1}function Xt(e){function t(l,a,i,u,f){this._reactName=l,this._targetInst=i,this.type=a,this.nativeEvent=u,this.target=f,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(l=e[g],this[g]=l?l(u):u[g]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?gi:uf,this.isPropagationStopped=uf,this}return v(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=gi)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=gi)},persist:function(){},isPersistent:gi}),t}var pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vi=Xt(pn),lr=v({},pn,{view:0,detail:0}),kg=Xt(lr),Pu,eo,ar,yi=v({},lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lo,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!==ar&&(ar&&e.type==="mousemove"?(Pu=e.screenX-ar.screenX,eo=e.screenY-ar.screenY):eo=Pu=0,ar=e),Pu)},movementY:function(e){return"movementY"in e?e.movementY:eo}}),of=Xt(yi),Ug=v({},yi,{dataTransfer:0}),Hg=Xt(Ug),qg=v({},lr,{relatedTarget:0}),to=Xt(qg),Lg=v({},pn,{animationName:0,elapsedTime:0,pseudoElement:0}),Bg=Xt(Lg),Qg=v({},pn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gg=Xt(Qg),Yg=v({},pn,{data:0}),cf=Xt(Yg),Xg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vg={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"},Kg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Kg[e])?!!t[e]:!1}function lo(){return Zg}var Jg=v({},lr,{key:function(e){if(e.key){var t=Xg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Vg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lo,charCode:function(e){return e.type==="keypress"?xi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$g=Xt(Jg),Fg=v({},yi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),df=Xt(Fg),Wg=v({},lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lo}),Ig=Xt(Wg),Pg=v({},pn,{propertyName:0,elapsedTime:0,pseudoElement:0}),e0=Xt(Pg),t0=v({},yi,{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}),l0=Xt(t0),a0=v({},pn,{newState:0,oldState:0}),n0=Xt(a0),s0=[9,13,27,32],ao=ea&&"CompositionEvent"in window,nr=null;ea&&"documentMode"in document&&(nr=document.documentMode);var r0=ea&&"TextEvent"in window&&!nr,ff=ea&&(!ao||nr&&8<nr&&11>=nr),hf=" ",mf=!1;function pf(e,t){switch(e){case"keyup":return s0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var es=!1;function i0(e,t){switch(e){case"compositionend":return xf(t);case"keypress":return t.which!==32?null:(mf=!0,hf);case"textInput":return e=t.data,e===hf&&mf?null:e;default:return null}}function u0(e,t){if(es)return e==="compositionend"||!ao&&pf(e,t)?(e=rf(),pi=Iu=Aa=null,es=!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 ff&&t.locale!=="ko"?null:t.data;default:return null}}var o0={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 gf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!o0[e.type]:t==="textarea"}function vf(e,t,l,a){In?Pn?Pn.push(a):Pn=[a]:In=a,t=uu(t,"onChange"),0<t.length&&(l=new vi("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var sr=null,rr=null;function c0(e){ep(e,0)}function bi(e){var t=Wl(e);if(Id(t))return e}function yf(e,t){if(e==="change")return t}var bf=!1;if(ea){var no;if(ea){var so="oninput"in document;if(!so){var jf=document.createElement("div");jf.setAttribute("oninput","return;"),so=typeof jf.oninput=="function"}no=so}else no=!1;bf=no&&(!document.documentMode||9<document.documentMode)}function Nf(){sr&&(sr.detachEvent("onpropertychange",Sf),rr=sr=null)}function Sf(e){if(e.propertyName==="value"&&bi(rr)){var t=[];vf(t,rr,e,$u(e)),sf(c0,t)}}function d0(e,t,l){e==="focusin"?(Nf(),sr=t,rr=l,sr.attachEvent("onpropertychange",Sf)):e==="focusout"&&Nf()}function f0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bi(rr)}function h0(e,t){if(e==="click")return bi(t)}function m0(e,t){if(e==="input"||e==="change")return bi(t)}function p0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var It=typeof Object.is=="function"?Object.is:p0;function ir(e,t){if(It(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 i=l[a];if(!$s.call(t,i)||!It(e[i],t[i]))return!1}return!0}function Ef(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cf(e,t){var l=Ef(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=Ef(l)}}function Tf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=hi(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=hi(e.document)}return t}function ro(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 x0=ea&&"documentMode"in document&&11>=document.documentMode,ts=null,io=null,ur=null,uo=!1;function Mf(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;uo||ts==null||ts!==hi(a)||(a=ts,"selectionStart"in a&&ro(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}),ur&&ir(ur,a)||(ur=a,a=uu(io,"onSelect"),0<a.length&&(t=new vi("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=ts)))}function xn(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ls={animationend:xn("Animation","AnimationEnd"),animationiteration:xn("Animation","AnimationIteration"),animationstart:xn("Animation","AnimationStart"),transitionrun:xn("Transition","TransitionRun"),transitionstart:xn("Transition","TransitionStart"),transitioncancel:xn("Transition","TransitionCancel"),transitionend:xn("Transition","TransitionEnd")},oo={},Of={};ea&&(Of=document.createElement("div").style,"AnimationEvent"in window||(delete ls.animationend.animation,delete ls.animationiteration.animation,delete ls.animationstart.animation),"TransitionEvent"in window||delete ls.transitionend.transition);function gn(e){if(oo[e])return oo[e];if(!ls[e])return e;var t=ls[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Of)return oo[e]=t[l];return e}var Af=gn("animationend"),zf=gn("animationiteration"),_f=gn("animationstart"),g0=gn("transitionrun"),v0=gn("transitionstart"),y0=gn("transitioncancel"),Rf=gn("transitionend"),Df=new Map,co="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(" ");co.push("scrollEnd");function wl(e,t){Df.set(e,t),mn(t,[e])}var ji=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)},pl=[],as=0,fo=0;function Ni(){for(var e=as,t=fo=as=0;t<e;){var l=pl[t];pl[t++]=null;var a=pl[t];pl[t++]=null;var i=pl[t];pl[t++]=null;var u=pl[t];if(pl[t++]=null,a!==null&&i!==null){var f=a.pending;f===null?i.next=i:(i.next=f.next,f.next=i),a.pending=i}u!==0&&kf(l,i,u)}}function Si(e,t,l,a){pl[as++]=e,pl[as++]=t,pl[as++]=l,pl[as++]=a,fo|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ho(e,t,l,a){return Si(e,t,l,a),Ei(e)}function vn(e,t){return Si(e,null,null,t),Ei(e)}function kf(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var i=!1,u=e.return;u!==null;)u.childLanes|=l,a=u.alternate,a!==null&&(a.childLanes|=l),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&t!==null&&(i=31-zt(l),e=u.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=l|536870912),u):null}function Ei(e){if(50<Ar)throw Ar=0,Nc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ns={};function b0(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 Pt(e,t,l,a){return new b0(e,t,l,a)}function mo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ta(e,t){var l=e.alternate;return l===null?(l=Pt(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 Uf(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,i,u){var f=0;if(a=e,typeof e=="function")mo(e)&&(f=1);else if(typeof e=="string")f=Cv(e,l,ue.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=Pt(31,l,t,i),e.elementType=R,e.lanes=u,e;case L:return yn(l.children,i,u,t);case U:f=8,i|=24;break;case _:return e=Pt(12,l,t,i|2),e.elementType=_,e.lanes=u,e;case w:return e=Pt(13,l,t,i),e.elementType=w,e.lanes=u,e;case k:return e=Pt(19,l,t,i),e.elementType=k,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:f=10;break e;case J:f=9;break e;case D:f=11;break e;case A:f=14;break e;case Y:f=16,a=null;break e}f=29,l=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=Pt(f,l,t,i),t.elementType=e,t.type=a,t.lanes=u,t}function yn(e,t,l,a){return e=Pt(7,e,a,t),e.lanes=l,e}function po(e,t,l){return e=Pt(6,e,null,t),e.lanes=l,e}function Hf(e){var t=Pt(18,null,null,0);return t.stateNode=e,t}function xo(e,t,l){return t=Pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qf=new WeakMap;function xl(e,t){if(typeof e=="object"&&e!==null){var l=qf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:si(t)},qf.set(e,t),t)}return{value:e,source:t,stack:si(t)}}var ss=[],rs=0,Ti=null,or=0,gl=[],vl=0,za=null,ql=1,Ll="";function la(e,t){ss[rs++]=or,ss[rs++]=Ti,Ti=e,or=t}function Lf(e,t,l){gl[vl++]=ql,gl[vl++]=Ll,gl[vl++]=za,za=e;var a=ql;e=Ll;var i=32-zt(a)-1;a&=~(1<<i),l+=1;var u=32-zt(t)+i;if(30<u){var f=i-i%5;u=(a&(1<<f)-1).toString(32),a>>=f,i-=f,ql=1<<32-zt(t)+i|l<<i|a,Ll=u+e}else ql=1<<u|l<<i|a,Ll=e}function go(e){e.return!==null&&(la(e,1),Lf(e,1,0))}function vo(e){for(;e===Ti;)Ti=ss[--rs],ss[rs]=null,or=ss[--rs],ss[rs]=null;for(;e===za;)za=gl[--vl],gl[vl]=null,Ll=gl[--vl],gl[vl]=null,ql=gl[--vl],gl[vl]=null}function Bf(e,t){gl[vl++]=ql,gl[vl++]=Ll,gl[vl++]=za,ql=t.id,Ll=t.overflow,za=e}var _t=null,tt=null,Le=!1,_a=null,yl=!1,yo=Error(c(519));function Ra(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cr(xl(t,e)),yo}function Qf(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[ge]=e,t[je]=a,l){case"dialog":ke("cancel",t),ke("close",t);break;case"iframe":case"object":case"embed":ke("load",t);break;case"video":case"audio":for(l=0;l<_r.length;l++)ke(_r[l],t);break;case"source":ke("error",t);break;case"img":case"image":case"link":ke("error",t),ke("load",t);break;case"details":ke("toggle",t);break;case"input":ke("invalid",t),Pd(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ke("invalid",t);break;case"textarea":ke("invalid",t),tf(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||np(t.textContent,l)?(a.popover!=null&&(ke("beforetoggle",t),ke("toggle",t)),a.onScroll!=null&&ke("scroll",t),a.onScrollEnd!=null&&ke("scrollend",t),a.onClick!=null&&(t.onclick=Pl),t=!0):t=!1,t||Ra(e,!0)}function Gf(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 31:case 13:yl=!1;return;case 27:case 3:yl=!0;return;default:_t=_t.return}}function is(e){if(e!==_t)return!1;if(!Le)return Gf(e),Le=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Hc(e.type,e.memoizedProps)),l=!l),l&&tt&&Ra(e),Gf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));tt=hp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));tt=hp(e)}else t===27?(t=tt,Za(e.type)?(e=Gc,Gc=null,tt=e):tt=t):tt=_t?jl(e.stateNode.nextSibling):null;return!0}function bn(){tt=_t=null,Le=!1}function bo(){var e=_a;return e!==null&&(Jt===null?Jt=e:Jt.push.apply(Jt,e),_a=null),e}function cr(e){_a===null?_a=[e]:_a.push(e)}var jo=C(null),jn=null,aa=null;function Da(e,t,l){le(jo,t._currentValue),t._currentValue=l}function na(e){e._currentValue=jo.current,V(jo)}function No(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 So(e,t,l,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var f=i.child;u=u.firstContext;e:for(;u!==null;){var g=u;u=i;for(var N=0;N<t.length;N++)if(g.context===t[N]){u.lanes|=l,g=u.alternate,g!==null&&(g.lanes|=l),No(u.return,l,e),a||(f=null);break e}u=g.next}}else if(i.tag===18){if(f=i.return,f===null)throw Error(c(341));f.lanes|=l,u=f.alternate,u!==null&&(u.lanes|=l),No(f,l,e),f=null}else f=i.child;if(f!==null)f.return=i;else for(f=i;f!==null;){if(f===e){f=null;break}if(i=f.sibling,i!==null){i.return=f.return,f=i;break}f=f.return}i=f}}function us(e,t,l,a){e=null;for(var i=t,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var f=i.alternate;if(f===null)throw Error(c(387));if(f=f.memoizedProps,f!==null){var g=i.type;It(i.pendingProps.value,f.value)||(e!==null?e.push(g):e=[g])}}else if(i===ae.current){if(f=i.alternate,f===null)throw Error(c(387));f.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Hr):e=[Hr])}i=i.return}e!==null&&So(t,e,l,a),t.flags|=262144}function wi(e){for(e=e.firstContext;e!==null;){if(!It(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Nn(e){jn=e,aa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return Yf(jn,e)}function Mi(e,t){return jn===null&&Nn(e),Yf(e,t)}function Yf(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},aa===null){if(e===null)throw Error(c(308));aa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else aa=aa.next=t;return l}var j0=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()})}},N0=n.unstable_scheduleCallback,S0=n.unstable_NormalPriority,vt={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eo(){return{controller:new j0,data:new Map,refCount:0}}function dr(e){e.refCount--,e.refCount===0&&N0(S0,function(){e.controller.abort()})}var fr=null,Co=0,os=0,cs=null;function E0(e,t){if(fr===null){var l=fr=[];Co=0,os=Mc(),cs={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Co++,t.then(Xf,Xf),t}function Xf(){if(--Co===0&&fr!==null){cs!==null&&(cs.status="fulfilled");var e=fr;fr=null,os=0,cs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function C0(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(i){l.push(i)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var i=0;i<l.length;i++)(0,l[i])(t)},function(i){for(a.status="rejected",a.reason=i,i=0;i<l.length;i++)(0,l[i])(void 0)}),a}var Vf=G.S;G.S=function(e,t){Mm=_e(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&E0(e,t),Vf!==null&&Vf(e,t)};var Sn=C(null);function To(){var e=Sn.current;return e!==null?e:et.pooledCache}function Oi(e,t){t===null?le(Sn,Sn.current):le(Sn,t.pool)}function Kf(){var e=To();return e===null?null:{parent:vt._currentValue,pool:e}}var ds=Error(c(460)),wo=Error(c(474)),Ai=Error(c(542)),zi={then:function(){}};function Zf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Jf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Pl,Pl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ff(e),e;default:if(typeof t.status=="string")t.then(Pl,Pl);else{if(e=et,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=a}},function(a){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ff(e),e}throw Cn=t,ds}}function En(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Cn=l,ds):l}}var Cn=null;function $f(){if(Cn===null)throw Error(c(459));var e=Cn;return Cn=null,e}function Ff(e){if(e===ds||e===Ai)throw Error(c(483))}var fs=null,hr=0;function _i(e){var t=hr;return hr+=1,fs===null&&(fs=[]),Jf(fs,e,t)}function mr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ri(e,t){throw t.$$typeof===T?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Wf(e){function t(z,O){if(e){var H=z.deletions;H===null?(z.deletions=[O],z.flags|=16):H.push(O)}}function l(z,O){if(!e)return null;for(;O!==null;)t(z,O),O=O.sibling;return null}function a(z){for(var O=new Map;z!==null;)z.key!==null?O.set(z.key,z):O.set(z.index,z),z=z.sibling;return O}function i(z,O){return z=ta(z,O),z.index=0,z.sibling=null,z}function u(z,O,H){return z.index=H,e?(H=z.alternate,H!==null?(H=H.index,H<O?(z.flags|=67108866,O):H):(z.flags|=67108866,O)):(z.flags|=1048576,O)}function f(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function g(z,O,H,Z){return O===null||O.tag!==6?(O=po(H,z.mode,Z),O.return=z,O):(O=i(O,H),O.return=z,O)}function N(z,O,H,Z){var me=H.type;return me===L?K(z,O,H.props.children,Z,H.key):O!==null&&(O.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Y&&En(me)===O.type)?(O=i(O,H.props),mr(O,H),O.return=z,O):(O=Ci(H.type,H.key,H.props,null,z.mode,Z),mr(O,H),O.return=z,O)}function q(z,O,H,Z){return O===null||O.tag!==4||O.stateNode.containerInfo!==H.containerInfo||O.stateNode.implementation!==H.implementation?(O=xo(H,z.mode,Z),O.return=z,O):(O=i(O,H.children||[]),O.return=z,O)}function K(z,O,H,Z,me){return O===null||O.tag!==7?(O=yn(H,z.mode,Z,me),O.return=z,O):(O=i(O,H),O.return=z,O)}function $(z,O,H){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=po(""+O,z.mode,H),O.return=z,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case E:return H=Ci(O.type,O.key,O.props,null,z.mode,H),mr(H,O),H.return=z,H;case B:return O=xo(O,z.mode,H),O.return=z,O;case Y:return O=En(O),$(z,O,H)}if(pe(O)||I(O))return O=yn(O,z.mode,H,null),O.return=z,O;if(typeof O.then=="function")return $(z,_i(O),H);if(O.$$typeof===M)return $(z,Mi(z,O),H);Ri(z,O)}return null}function Q(z,O,H,Z){var me=O!==null?O.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return me!==null?null:g(z,O,""+H,Z);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case E:return H.key===me?N(z,O,H,Z):null;case B:return H.key===me?q(z,O,H,Z):null;case Y:return H=En(H),Q(z,O,H,Z)}if(pe(H)||I(H))return me!==null?null:K(z,O,H,Z,null);if(typeof H.then=="function")return Q(z,O,_i(H),Z);if(H.$$typeof===M)return Q(z,O,Mi(z,H),Z);Ri(z,H)}return null}function X(z,O,H,Z,me){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return z=z.get(H)||null,g(O,z,""+Z,me);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case E:return z=z.get(Z.key===null?H:Z.key)||null,N(O,z,Z,me);case B:return z=z.get(Z.key===null?H:Z.key)||null,q(O,z,Z,me);case Y:return Z=En(Z),X(z,O,H,Z,me)}if(pe(Z)||I(Z))return z=z.get(H)||null,K(O,z,Z,me,null);if(typeof Z.then=="function")return X(z,O,H,_i(Z),me);if(Z.$$typeof===M)return X(z,O,H,Mi(O,Z),me);Ri(O,Z)}return null}function ce(z,O,H,Z){for(var me=null,Ye=null,de=O,Ae=O=0,qe=null;de!==null&&Ae<H.length;Ae++){de.index>Ae?(qe=de,de=null):qe=de.sibling;var Xe=Q(z,de,H[Ae],Z);if(Xe===null){de===null&&(de=qe);break}e&&de&&Xe.alternate===null&&t(z,de),O=u(Xe,O,Ae),Ye===null?me=Xe:Ye.sibling=Xe,Ye=Xe,de=qe}if(Ae===H.length)return l(z,de),Le&&la(z,Ae),me;if(de===null){for(;Ae<H.length;Ae++)de=$(z,H[Ae],Z),de!==null&&(O=u(de,O,Ae),Ye===null?me=de:Ye.sibling=de,Ye=de);return Le&&la(z,Ae),me}for(de=a(de);Ae<H.length;Ae++)qe=X(de,z,Ae,H[Ae],Z),qe!==null&&(e&&qe.alternate!==null&&de.delete(qe.key===null?Ae:qe.key),O=u(qe,O,Ae),Ye===null?me=qe:Ye.sibling=qe,Ye=qe);return e&&de.forEach(function(Ia){return t(z,Ia)}),Le&&la(z,Ae),me}function xe(z,O,H,Z){if(H==null)throw Error(c(151));for(var me=null,Ye=null,de=O,Ae=O=0,qe=null,Xe=H.next();de!==null&&!Xe.done;Ae++,Xe=H.next()){de.index>Ae?(qe=de,de=null):qe=de.sibling;var Ia=Q(z,de,Xe.value,Z);if(Ia===null){de===null&&(de=qe);break}e&&de&&Ia.alternate===null&&t(z,de),O=u(Ia,O,Ae),Ye===null?me=Ia:Ye.sibling=Ia,Ye=Ia,de=qe}if(Xe.done)return l(z,de),Le&&la(z,Ae),me;if(de===null){for(;!Xe.done;Ae++,Xe=H.next())Xe=$(z,Xe.value,Z),Xe!==null&&(O=u(Xe,O,Ae),Ye===null?me=Xe:Ye.sibling=Xe,Ye=Xe);return Le&&la(z,Ae),me}for(de=a(de);!Xe.done;Ae++,Xe=H.next())Xe=X(de,z,Ae,Xe.value,Z),Xe!==null&&(e&&Xe.alternate!==null&&de.delete(Xe.key===null?Ae:Xe.key),O=u(Xe,O,Ae),Ye===null?me=Xe:Ye.sibling=Xe,Ye=Xe);return e&&de.forEach(function(Uv){return t(z,Uv)}),Le&&la(z,Ae),me}function Ie(z,O,H,Z){if(typeof H=="object"&&H!==null&&H.type===L&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case E:e:{for(var me=H.key;O!==null;){if(O.key===me){if(me=H.type,me===L){if(O.tag===7){l(z,O.sibling),Z=i(O,H.props.children),Z.return=z,z=Z;break e}}else if(O.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Y&&En(me)===O.type){l(z,O.sibling),Z=i(O,H.props),mr(Z,H),Z.return=z,z=Z;break e}l(z,O);break}else t(z,O);O=O.sibling}H.type===L?(Z=yn(H.props.children,z.mode,Z,H.key),Z.return=z,z=Z):(Z=Ci(H.type,H.key,H.props,null,z.mode,Z),mr(Z,H),Z.return=z,z=Z)}return f(z);case B:e:{for(me=H.key;O!==null;){if(O.key===me)if(O.tag===4&&O.stateNode.containerInfo===H.containerInfo&&O.stateNode.implementation===H.implementation){l(z,O.sibling),Z=i(O,H.children||[]),Z.return=z,z=Z;break e}else{l(z,O);break}else t(z,O);O=O.sibling}Z=xo(H,z.mode,Z),Z.return=z,z=Z}return f(z);case Y:return H=En(H),Ie(z,O,H,Z)}if(pe(H))return ce(z,O,H,Z);if(I(H)){if(me=I(H),typeof me!="function")throw Error(c(150));return H=me.call(H),xe(z,O,H,Z)}if(typeof H.then=="function")return Ie(z,O,_i(H),Z);if(H.$$typeof===M)return Ie(z,O,Mi(z,H),Z);Ri(z,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,O!==null&&O.tag===6?(l(z,O.sibling),Z=i(O,H),Z.return=z,z=Z):(l(z,O),Z=po(H,z.mode,Z),Z.return=z,z=Z),f(z)):l(z,O)}return function(z,O,H,Z){try{hr=0;var me=Ie(z,O,H,Z);return fs=null,me}catch(de){if(de===ds||de===Ai)throw de;var Ye=Pt(29,de,null,z.mode);return Ye.lanes=Z,Ye.return=z,Ye}finally{}}}var Tn=Wf(!0),If=Wf(!1),ka=!1;function Mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oo(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 Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ve&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=Ei(e),kf(e,null,l),t}return Si(e,a,t,l),Ei(e)}function pr(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,P(e,l)}}function Ao(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var i=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var f={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?i=u=f:u=u.next=f,l=l.next}while(l!==null);u===null?i=u=t:u=u.next=t}else i=u=t;l={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:u,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 zo=!1;function xr(){if(zo){var e=cs;if(e!==null)throw e}}function gr(e,t,l,a){zo=!1;var i=e.updateQueue;ka=!1;var u=i.firstBaseUpdate,f=i.lastBaseUpdate,g=i.shared.pending;if(g!==null){i.shared.pending=null;var N=g,q=N.next;N.next=null,f===null?u=q:f.next=q,f=N;var K=e.alternate;K!==null&&(K=K.updateQueue,g=K.lastBaseUpdate,g!==f&&(g===null?K.firstBaseUpdate=q:g.next=q,K.lastBaseUpdate=N))}if(u!==null){var $=i.baseState;f=0,K=q=N=null,g=u;do{var Q=g.lane&-536870913,X=Q!==g.lane;if(X?(He&Q)===Q:(a&Q)===Q){Q!==0&&Q===os&&(zo=!0),K!==null&&(K=K.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var ce=e,xe=g;Q=t;var Ie=l;switch(xe.tag){case 1:if(ce=xe.payload,typeof ce=="function"){$=ce.call(Ie,$,Q);break e}$=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=xe.payload,Q=typeof ce=="function"?ce.call(Ie,$,Q):ce,Q==null)break e;$=v({},$,Q);break e;case 2:ka=!0}}Q=g.callback,Q!==null&&(e.flags|=64,X&&(e.flags|=8192),X=i.callbacks,X===null?i.callbacks=[Q]:X.push(Q))}else X={lane:Q,tag:g.tag,payload:g.payload,callback:g.callback,next:null},K===null?(q=K=X,N=$):K=K.next=X,f|=Q;if(g=g.next,g===null){if(g=i.shared.pending,g===null)break;X=g,g=X.next,X.next=null,i.lastBaseUpdate=X,i.shared.pending=null}}while(!0);K===null&&(N=$),i.baseState=N,i.firstBaseUpdate=q,i.lastBaseUpdate=K,u===null&&(i.shared.lanes=0),Ga|=f,e.lanes=f,e.memoizedState=$}}function Pf(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function eh(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Pf(l[e],t)}var hs=C(null),Di=C(0);function th(e,t){e=ha,le(Di,e),le(hs,t),ha=e|t.baseLanes}function _o(){le(Di,ha),le(hs,hs.current)}function Ro(){ha=Di.current,V(hs),V(Di)}var el=C(null),bl=null;function qa(e){var t=e.alternate;le(xt,xt.current&1),le(el,e),bl===null&&(t===null||hs.current!==null||t.memoizedState!==null)&&(bl=e)}function Do(e){le(xt,xt.current),le(el,e),bl===null&&(bl=e)}function lh(e){e.tag===22?(le(xt,xt.current),le(el,e),bl===null&&(bl=e)):La()}function La(){le(xt,xt.current),le(el,el.current)}function tl(e){V(el),bl===e&&(bl=null),V(xt)}var xt=C(0);function ki(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Bc(l)||Qc(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)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sa=0,we=null,Fe=null,yt=null,Ui=!1,ms=!1,wn=!1,Hi=0,vr=0,ps=null,T0=0;function it(){throw Error(c(321))}function ko(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!It(e[l],t[l]))return!1;return!0}function Uo(e,t,l,a,i,u){return sa=u,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Lh:Wo,wn=!1,u=l(a,i),wn=!1,ms&&(u=nh(t,l,a,i)),ah(e),u}function ah(e){G.H=jr;var t=Fe!==null&&Fe.next!==null;if(sa=0,yt=Fe=we=null,Ui=!1,vr=0,ps=null,t)throw Error(c(300));e===null||bt||(e=e.dependencies,e!==null&&wi(e)&&(bt=!0))}function nh(e,t,l,a){we=e;var i=0;do{if(ms&&(ps=null),vr=0,ms=!1,25<=i)throw Error(c(301));if(i+=1,yt=Fe=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}G.H=Bh,u=t(l,a)}while(ms);return u}function w0(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?yr(t):t,e=e.useState()[0],(Fe!==null?Fe.memoizedState:null)!==e&&(we.flags|=1024),t}function Ho(){var e=Hi!==0;return Hi=0,e}function qo(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Lo(e){if(Ui){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ui=!1}sa=0,yt=Fe=we=null,ms=!1,vr=Hi=0,ps=null}function Bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?we.memoizedState=yt=e:yt=yt.next=e,yt}function gt(){if(Fe===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=yt===null?we.memoizedState:yt.next;if(t!==null)yt=t,Fe=e;else{if(e===null)throw we.alternate===null?Error(c(467)):Error(c(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},yt===null?we.memoizedState=yt=e:yt=yt.next=e}return yt}function qi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yr(e){var t=vr;return vr+=1,ps===null&&(ps=[]),e=Jf(ps,e,t),t=we,(yt===null?t.memoizedState:yt.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Lh:Wo),e}function Li(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yr(e);if(e.$$typeof===M)return Rt(e)}throw Error(c(438,String(e)))}function Bo(e){var t=null,l=we.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=we.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=qi(),we.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]=F;return t.index++,l}function ra(e,t){return typeof t=="function"?t(e):t}function Bi(e){var t=gt();return Qo(t,Fe,e)}function Qo(e,t,l){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=l;var i=e.baseQueue,u=a.pending;if(u!==null){if(i!==null){var f=i.next;i.next=u.next,u.next=f}t.baseQueue=i=u,a.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{t=i.next;var g=f=null,N=null,q=t,K=!1;do{var $=q.lane&-536870913;if($!==q.lane?(He&$)===$:(sa&$)===$){var Q=q.revertLane;if(Q===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),$===os&&(K=!0);else if((sa&Q)===Q){q=q.next,Q===os&&(K=!0);continue}else $={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},N===null?(g=N=$,f=u):N=N.next=$,we.lanes|=Q,Ga|=Q;$=q.action,wn&&l(u,$),u=q.hasEagerState?q.eagerState:l(u,$)}else Q={lane:$,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},N===null?(g=N=Q,f=u):N=N.next=Q,we.lanes|=$,Ga|=$;q=q.next}while(q!==null&&q!==t);if(N===null?f=u:N.next=g,!It(u,e.memoizedState)&&(bt=!0,K&&(l=cs,l!==null)))throw l;e.memoizedState=u,e.baseState=f,e.baseQueue=N,a.lastRenderedState=u}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Go(e){var t=gt(),l=t.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=e;var a=l.dispatch,i=l.pending,u=t.memoizedState;if(i!==null){l.pending=null;var f=i=i.next;do u=e(u,f.action),f=f.next;while(f!==i);It(u,t.memoizedState)||(bt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),l.lastRenderedState=u}return[u,a]}function sh(e,t,l){var a=we,i=gt(),u=Le;if(u){if(l===void 0)throw Error(c(407));l=l()}else l=t();var f=!It((Fe||i).memoizedState,l);if(f&&(i.memoizedState=l,bt=!0),i=i.queue,Vo(uh.bind(null,a,i,e),[e]),i.getSnapshot!==t||f||yt!==null&&yt.memoizedState.tag&1){if(a.flags|=2048,xs(9,{destroy:void 0},ih.bind(null,a,i,l,t),null),et===null)throw Error(c(349));u||(sa&127)!==0||rh(a,t,l)}return l}function rh(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=we.updateQueue,t===null?(t=qi(),we.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function ih(e,t,l,a){t.value=l,t.getSnapshot=a,oh(t)&&ch(e)}function uh(e,t,l){return l(function(){oh(t)&&ch(e)})}function oh(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!It(e,l)}catch{return!0}}function ch(e){var t=vn(e,2);t!==null&&$t(t,e,2)}function Yo(e){var t=Bt();if(typeof e=="function"){var l=e;if(e=l(),wn){Ut(!0);try{l()}finally{Ut(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function dh(e,t,l,a){return e.baseState=l,Qo(e,Fe,typeof a=="function"?a:ra)}function M0(e,t,l,a,i){if(Yi(e))throw Error(c(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){u.listeners.push(f)}};G.T!==null?l(!0):u.isTransition=!1,a(u),l=t.pending,l===null?(u.next=t.pending=u,fh(t,u)):(u.next=l.next,t.pending=l.next=u)}}function fh(e,t){var l=t.action,a=t.payload,i=e.state;if(t.isTransition){var u=G.T,f={};G.T=f;try{var g=l(i,a),N=G.S;N!==null&&N(f,g),hh(e,t,g)}catch(q){Xo(e,t,q)}finally{u!==null&&f.types!==null&&(u.types=f.types),G.T=u}}else try{u=l(i,a),hh(e,t,u)}catch(q){Xo(e,t,q)}}function hh(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){mh(e,t,a)},function(a){return Xo(e,t,a)}):mh(e,t,l)}function mh(e,t,l){t.status="fulfilled",t.value=l,ph(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,fh(e,l)))}function Xo(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,ph(t),t=t.next;while(t!==a)}e.action=null}function ph(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function xh(e,t){return t}function gh(e,t){if(Le){var l=et.formState;if(l!==null){e:{var a=we;if(Le){if(tt){t:{for(var i=tt,u=yl;i.nodeType!==8;){if(!u){i=null;break t}if(i=jl(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){tt=jl(i.nextSibling),a=i.data==="F!";break e}}Ra(a)}a=!1}a&&(t=l[0])}}return l=Bt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xh,lastRenderedState:t},l.queue=a,l=Uh.bind(null,we,a),a.dispatch=l,a=Yo(!1),u=Fo.bind(null,we,!1,a.queue),a=Bt(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,l=M0.bind(null,we,i,u,l),i.dispatch=l,a.memoizedState=e,[t,l,!1]}function vh(e){var t=gt();return yh(t,Fe,e)}function yh(e,t,l){if(t=Qo(e,t,xh)[0],e=Bi(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=yr(t)}catch(f){throw f===ds?Ai:f}else a=t;t=gt();var i=t.queue,u=i.dispatch;return l!==t.memoizedState&&(we.flags|=2048,xs(9,{destroy:void 0},O0.bind(null,i,l),null)),[a,u,e]}function O0(e,t){e.action=t}function bh(e){var t=gt(),l=Fe;if(l!==null)return yh(t,l,e);gt(),t=t.memoizedState,l=gt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function xs(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=we.updateQueue,t===null&&(t=qi(),we.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 jh(){return gt().memoizedState}function Qi(e,t,l,a){var i=Bt();we.flags|=e,i.memoizedState=xs(1|t,{destroy:void 0},l,a===void 0?null:a)}function Gi(e,t,l,a){var i=gt();a=a===void 0?null:a;var u=i.memoizedState.inst;Fe!==null&&a!==null&&ko(a,Fe.memoizedState.deps)?i.memoizedState=xs(t,u,l,a):(we.flags|=e,i.memoizedState=xs(1|t,u,l,a))}function Nh(e,t){Qi(8390656,8,e,t)}function Vo(e,t){Gi(2048,8,e,t)}function A0(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=qi(),we.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Sh(e){var t=gt().memoizedState;return A0({ref:t,nextImpl:e}),function(){if((Ve&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Eh(e,t){return Gi(4,2,e,t)}function Ch(e,t){return Gi(4,4,e,t)}function Th(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 wh(e,t,l){l=l!=null?l.concat([e]):null,Gi(4,4,Th.bind(null,t,e),l)}function Ko(){}function Mh(e,t){var l=gt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&ko(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Oh(e,t){var l=gt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&ko(t,a[1]))return a[0];if(a=e(),wn){Ut(!0);try{e()}finally{Ut(!1)}}return l.memoizedState=[a,t],a}function Zo(e,t,l){return l===void 0||(sa&1073741824)!==0&&(He&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Am(),we.lanes|=e,Ga|=e,l)}function Ah(e,t,l,a){return It(l,t)?l:hs.current!==null?(e=Zo(e,l,a),It(e,t)||(bt=!0),e):(sa&42)===0||(sa&1073741824)!==0&&(He&261930)===0?(bt=!0,e.memoizedState=l):(e=Am(),we.lanes|=e,Ga|=e,t)}function zh(e,t,l,a,i){var u=W.p;W.p=u!==0&&8>u?u:8;var f=G.T,g={};G.T=g,Fo(e,!1,t,l);try{var N=i(),q=G.S;if(q!==null&&q(g,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var K=C0(N,a);br(e,t,K,nl(e))}else br(e,t,a,nl(e))}catch($){br(e,t,{then:function(){},status:"rejected",reason:$},nl())}finally{W.p=u,f!==null&&g.types!==null&&(f.types=g.types),G.T=f}}function z0(){}function Jo(e,t,l,a){if(e.tag!==5)throw Error(c(476));var i=_h(e).queue;zh(e,i,t,ee,l===null?z0:function(){return Rh(e),l(a)})}function _h(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:ee},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Rh(e){var t=_h(e);t.next===null&&(t=e.alternate.memoizedState),br(e,t.next.queue,{},nl())}function $o(){return Rt(Hr)}function Dh(){return gt().memoizedState}function kh(){return gt().memoizedState}function _0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=nl();e=Ua(l);var a=Ha(t,e,l);a!==null&&($t(a,t,l),pr(a,t,l)),t={cache:Eo()},e.payload=t;return}t=t.return}}function R0(e,t,l){var a=nl();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Yi(e)?Hh(t,l):(l=ho(e,t,l,a),l!==null&&($t(l,e,a),qh(l,t,a)))}function Uh(e,t,l){var a=nl();br(e,t,l,a)}function br(e,t,l,a){var i={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Yi(e))Hh(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var f=t.lastRenderedState,g=u(f,l);if(i.hasEagerState=!0,i.eagerState=g,It(g,f))return Si(e,t,i,0),et===null&&Ni(),!1}catch{}finally{}if(l=ho(e,t,i,a),l!==null)return $t(l,e,a),qh(l,t,a),!0}return!1}function Fo(e,t,l,a){if(a={lane:2,revertLane:Mc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Yi(e)){if(t)throw Error(c(479))}else t=ho(e,l,a,2),t!==null&&$t(t,e,2)}function Yi(e){var t=e.alternate;return e===we||t!==null&&t===we}function Hh(e,t){ms=Ui=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function qh(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,P(e,l)}}var jr={readContext:Rt,use:Li,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};jr.useEffectEvent=it;var Lh={readContext:Rt,use:Li,useCallback:function(e,t){return Bt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:Nh,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Qi(4194308,4,Th.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Qi(4194308,4,e,t)},useInsertionEffect:function(e,t){Qi(4,2,e,t)},useMemo:function(e,t){var l=Bt();t=t===void 0?null:t;var a=e();if(wn){Ut(!0);try{e()}finally{Ut(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Bt();if(l!==void 0){var i=l(t);if(wn){Ut(!0);try{l(t)}finally{Ut(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=R0.bind(null,we,e),[a.memoizedState,e]},useRef:function(e){var t=Bt();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,l=Uh.bind(null,we,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Ko,useDeferredValue:function(e,t){var l=Bt();return Zo(l,e,t)},useTransition:function(){var e=Yo(!1);return e=zh.bind(null,we,e.queue,!0,!1),Bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=we,i=Bt();if(Le){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),et===null)throw Error(c(349));(He&127)!==0||rh(a,t,l)}i.memoizedState=l;var u={value:l,getSnapshot:t};return i.queue=u,Nh(uh.bind(null,a,u,e),[e]),a.flags|=2048,xs(9,{destroy:void 0},ih.bind(null,a,u,l,t),null),l},useId:function(){var e=Bt(),t=et.identifierPrefix;if(Le){var l=Ll,a=ql;l=(a&~(1<<32-zt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Hi++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=T0++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:$o,useFormState:gh,useActionState:gh,useOptimistic:function(e){var t=Bt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Fo.bind(null,we,!0,l),l.dispatch=t,[e,t]},useMemoCache:Bo,useCacheRefresh:function(){return Bt().memoizedState=_0.bind(null,we)},useEffectEvent:function(e){var t=Bt(),l={impl:e};return t.memoizedState=l,function(){if((Ve&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},Wo={readContext:Rt,use:Li,useCallback:Mh,useContext:Rt,useEffect:Vo,useImperativeHandle:wh,useInsertionEffect:Eh,useLayoutEffect:Ch,useMemo:Oh,useReducer:Bi,useRef:jh,useState:function(){return Bi(ra)},useDebugValue:Ko,useDeferredValue:function(e,t){var l=gt();return Ah(l,Fe.memoizedState,e,t)},useTransition:function(){var e=Bi(ra)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:sh,useId:Dh,useHostTransitionStatus:$o,useFormState:vh,useActionState:vh,useOptimistic:function(e,t){var l=gt();return dh(l,Fe,e,t)},useMemoCache:Bo,useCacheRefresh:kh};Wo.useEffectEvent=Sh;var Bh={readContext:Rt,use:Li,useCallback:Mh,useContext:Rt,useEffect:Vo,useImperativeHandle:wh,useInsertionEffect:Eh,useLayoutEffect:Ch,useMemo:Oh,useReducer:Go,useRef:jh,useState:function(){return Go(ra)},useDebugValue:Ko,useDeferredValue:function(e,t){var l=gt();return Fe===null?Zo(l,e,t):Ah(l,Fe.memoizedState,e,t)},useTransition:function(){var e=Go(ra)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:sh,useId:Dh,useHostTransitionStatus:$o,useFormState:bh,useActionState:bh,useOptimistic:function(e,t){var l=gt();return Fe!==null?dh(l,Fe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Bo,useCacheRefresh:kh};Bh.useEffectEvent=Sh;function Io(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:v({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Po={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=nl(),i=Ua(a);i.payload=t,l!=null&&(i.callback=l),t=Ha(e,i,a),t!==null&&($t(t,e,a),pr(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=nl(),i=Ua(a);i.tag=1,i.payload=t,l!=null&&(i.callback=l),t=Ha(e,i,a),t!==null&&($t(t,e,a),pr(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=nl(),a=Ua(l);a.tag=2,t!=null&&(a.callback=t),t=Ha(e,a,l),t!==null&&($t(t,e,l),pr(t,e,l))}};function Qh(e,t,l,a,i,u,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,f):t.prototype&&t.prototype.isPureReactComponent?!ir(l,a)||!ir(i,u):!0}function Gh(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&&Po.enqueueReplaceState(t,t.state,null)}function Mn(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=v({},l));for(var i in e)l[i]===void 0&&(l[i]=e[i])}return l}function Yh(e){ji(e)}function Xh(e){console.error(e)}function Vh(e){ji(e)}function Xi(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Kh(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function ec(e,t,l){return l=Ua(l),l.tag=3,l.payload={element:null},l.callback=function(){Xi(e,t)},l}function Zh(e){return e=Ua(e),e.tag=3,e}function Jh(e,t,l,a){var i=l.type.getDerivedStateFromError;if(typeof i=="function"){var u=a.value;e.payload=function(){return i(u)},e.callback=function(){Kh(t,l,a)}}var f=l.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Kh(t,l,a),typeof i!="function"&&(Ya===null?Ya=new Set([this]):Ya.add(this));var g=a.stack;this.componentDidCatch(a.value,{componentStack:g!==null?g:""})})}function D0(e,t,l,a,i){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&us(t,l,i,!0),l=el.current,l!==null){switch(l.tag){case 31:case 13:return bl===null?lu():l.alternate===null&&ut===0&&(ut=3),l.flags&=-257,l.flags|=65536,l.lanes=i,a===zi?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Cc(e,a,i)),!1;case 22:return l.flags|=65536,a===zi?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)),Cc(e,a,i)),!1}throw Error(c(435,l.tag))}return Cc(e,a,i),lu(),!1}if(Le)return t=el.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==yo&&(e=Error(c(422),{cause:a}),cr(xl(e,l)))):(a!==yo&&(t=Error(c(423),{cause:a}),cr(xl(t,l))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=xl(a,l),i=ec(e.stateNode,a,i),Ao(e,i),ut!==4&&(ut=2)),!1;var u=Error(c(520),{cause:a});if(u=xl(u,l),Or===null?Or=[u]:Or.push(u),ut!==4&&(ut=2),t===null)return!0;a=xl(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=i&-i,l.lanes|=e,e=ec(l.stateNode,a,e),Ao(l,e),!1;case 1:if(t=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ya===null||!Ya.has(u))))return l.flags|=65536,i&=-i,l.lanes|=i,i=Zh(i),Jh(i,e,l,a),Ao(l,i),!1}l=l.return}while(l!==null);return!1}var tc=Error(c(461)),bt=!1;function Dt(e,t,l,a){t.child=e===null?If(t,null,l,a):Tn(t,e.child,l,a)}function $h(e,t,l,a,i){l=l.render;var u=t.ref;if("ref"in a){var f={};for(var g in a)g!=="ref"&&(f[g]=a[g])}else f=a;return Nn(t),a=Uo(e,t,l,f,u,i),g=Ho(),e!==null&&!bt?(qo(e,t,i),ia(e,t,i)):(Le&&g&&go(t),t.flags|=1,Dt(e,t,a,i),t.child)}function Fh(e,t,l,a,i){if(e===null){var u=l.type;return typeof u=="function"&&!mo(u)&&u.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=u,Wh(e,t,u,a,i)):(e=Ci(l.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!oc(e,i)){var f=u.memoizedProps;if(l=l.compare,l=l!==null?l:ir,l(f,a)&&e.ref===t.ref)return ia(e,t,i)}return t.flags|=1,e=ta(u,a),e.ref=t.ref,e.return=t,t.child=e}function Wh(e,t,l,a,i){if(e!==null){var u=e.memoizedProps;if(ir(u,a)&&e.ref===t.ref)if(bt=!1,t.pendingProps=a=u,oc(e,i))(e.flags&131072)!==0&&(bt=!0);else return t.lanes=e.lanes,ia(e,t,i)}return lc(e,t,l,a,i)}function Ih(e,t,l,a){var i=a.children,u=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)!==0){if(u=u!==null?u.baseLanes|l:l,e!==null){for(a=t.child=e.child,i=0;a!==null;)i=i|a.lanes|a.childLanes,a=a.sibling;a=i&~u}else a=0,t.child=null;return Ph(e,t,u,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Oi(t,u!==null?u.cachePool:null),u!==null?th(t,u):_o(),lh(t);else return a=t.lanes=536870912,Ph(e,t,u!==null?u.baseLanes|l:l,l,a)}else u!==null?(Oi(t,u.cachePool),th(t,u),La(),t.memoizedState=null):(e!==null&&Oi(t,null),_o(),La());return Dt(e,t,i,l),t.child}function Nr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ph(e,t,l,a,i){var u=To();return u=u===null?null:{parent:vt._currentValue,pool:u},t.memoizedState={baseLanes:l,cachePool:u},e!==null&&Oi(t,null),_o(),lh(t),e!==null&&us(e,t,a,!0),t.childLanes=i,null}function Vi(e,t){return t=Zi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function em(e,t,l){return Tn(t,e.child,null,l),e=Vi(t,t.pendingProps),e.flags|=2,tl(t),t.memoizedState=null,e}function k0(e,t,l){var a=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(a.mode==="hidden")return e=Vi(t,a),t.lanes=536870912,Nr(null,e);if(Do(t),(e=tt)?(e=fp(e,yl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:za!==null?{id:ql,overflow:Ll}:null,retryLane:536870912,hydrationErrors:null},l=Hf(e),l.return=t,t.child=l,_t=t,tt=null)):e=null,e===null)throw Ra(t);return t.lanes=536870912,null}return Vi(t,a)}var u=e.memoizedState;if(u!==null){var f=u.dehydrated;if(Do(t),i)if(t.flags&256)t.flags&=-257,t=em(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(bt||us(e,t,l,!1),i=(l&e.childLanes)!==0,bt||i){if(a=et,a!==null&&(f=te(a,l),f!==0&&f!==u.retryLane))throw u.retryLane=f,vn(e,f),$t(a,e,f),tc;lu(),t=em(e,t,l)}else e=u.treeContext,tt=jl(f.nextSibling),_t=t,Le=!0,_a=null,yl=!1,e!==null&&Bf(t,e),t=Vi(t,a),t.flags|=4096;return t}return e=ta(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ki(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(c(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function lc(e,t,l,a,i){return Nn(t),l=Uo(e,t,l,a,void 0,i),a=Ho(),e!==null&&!bt?(qo(e,t,i),ia(e,t,i)):(Le&&a&&go(t),t.flags|=1,Dt(e,t,l,i),t.child)}function tm(e,t,l,a,i,u){return Nn(t),t.updateQueue=null,l=nh(t,a,l,i),ah(e),a=Ho(),e!==null&&!bt?(qo(e,t,u),ia(e,t,u)):(Le&&a&&go(t),t.flags|=1,Dt(e,t,l,u),t.child)}function lm(e,t,l,a,i){if(Nn(t),t.stateNode===null){var u=ns,f=l.contextType;typeof f=="object"&&f!==null&&(u=Rt(f)),u=new l(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Po,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},Mo(t),f=l.contextType,u.context=typeof f=="object"&&f!==null?Rt(f):ns,u.state=t.memoizedState,f=l.getDerivedStateFromProps,typeof f=="function"&&(Io(t,l,f,a),u.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(f=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),f!==u.state&&Po.enqueueReplaceState(u,u.state,null),gr(t,a,u,i),xr(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var g=t.memoizedProps,N=Mn(l,g);u.props=N;var q=u.context,K=l.contextType;f=ns,typeof K=="object"&&K!==null&&(f=Rt(K));var $=l.getDerivedStateFromProps;K=typeof $=="function"||typeof u.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,K||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g||q!==f)&&Gh(t,u,a,f),ka=!1;var Q=t.memoizedState;u.state=Q,gr(t,a,u,i),xr(),q=t.memoizedState,g||Q!==q||ka?(typeof $=="function"&&(Io(t,l,$,a),q=t.memoizedState),(N=ka||Qh(t,l,N,a,Q,q,f))?(K||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=q),u.props=a,u.state=q,u.context=f,a=N):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,Oo(e,t),f=t.memoizedProps,K=Mn(l,f),u.props=K,$=t.pendingProps,Q=u.context,q=l.contextType,N=ns,typeof q=="object"&&q!==null&&(N=Rt(q)),g=l.getDerivedStateFromProps,(q=typeof g=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(f!==$||Q!==N)&&Gh(t,u,a,N),ka=!1,Q=t.memoizedState,u.state=Q,gr(t,a,u,i),xr();var X=t.memoizedState;f!==$||Q!==X||ka||e!==null&&e.dependencies!==null&&wi(e.dependencies)?(typeof g=="function"&&(Io(t,l,g,a),X=t.memoizedState),(K=ka||Qh(t,l,K,a,Q,X,N)||e!==null&&e.dependencies!==null&&wi(e.dependencies))?(q||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,X,N),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,X,N)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=X),u.props=a,u.state=X,u.context=N,a=K):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,Ki(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=Tn(t,e.child,null,i),t.child=Tn(t,null,l,i)):Dt(e,t,l,i),t.memoizedState=u.state,e=t.child):e=ia(e,t,i),e}function am(e,t,l,a){return bn(),t.flags|=256,Dt(e,t,l,a),t.child}var ac={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function nc(e){return{baseLanes:e,cachePool:Kf()}}function sc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=al),e}function nm(e,t,l){var a=t.pendingProps,i=!1,u=(t.flags&128)!==0,f;if((f=u)||(f=e!==null&&e.memoizedState===null?!1:(xt.current&2)!==0),f&&(i=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(i?qa(t):La(),(e=tt)?(e=fp(e,yl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:za!==null?{id:ql,overflow:Ll}:null,retryLane:536870912,hydrationErrors:null},l=Hf(e),l.return=t,t.child=l,_t=t,tt=null)):e=null,e===null)throw Ra(t);return Qc(e)?t.lanes=32:t.lanes=536870912,null}var g=a.children;return a=a.fallback,i?(La(),i=t.mode,g=Zi({mode:"hidden",children:g},i),a=yn(a,i,l,null),g.return=t,a.return=t,g.sibling=a,t.child=g,a=t.child,a.memoizedState=nc(l),a.childLanes=sc(e,f,l),t.memoizedState=ac,Nr(null,a)):(qa(t),rc(t,g))}var N=e.memoizedState;if(N!==null&&(g=N.dehydrated,g!==null)){if(u)t.flags&256?(qa(t),t.flags&=-257,t=ic(e,t,l)):t.memoizedState!==null?(La(),t.child=e.child,t.flags|=128,t=null):(La(),g=a.fallback,i=t.mode,a=Zi({mode:"visible",children:a.children},i),g=yn(g,i,l,null),g.flags|=2,a.return=t,g.return=t,a.sibling=g,t.child=a,Tn(t,e.child,null,l),a=t.child,a.memoizedState=nc(l),a.childLanes=sc(e,f,l),t.memoizedState=ac,t=Nr(null,a));else if(qa(t),Qc(g)){if(f=g.nextSibling&&g.nextSibling.dataset,f)var q=f.dgst;f=q,a=Error(c(419)),a.stack="",a.digest=f,cr({value:a,source:null,stack:null}),t=ic(e,t,l)}else if(bt||us(e,t,l,!1),f=(l&e.childLanes)!==0,bt||f){if(f=et,f!==null&&(a=te(f,l),a!==0&&a!==N.retryLane))throw N.retryLane=a,vn(e,a),$t(f,e,a),tc;Bc(g)||lu(),t=ic(e,t,l)}else Bc(g)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,tt=jl(g.nextSibling),_t=t,Le=!0,_a=null,yl=!1,e!==null&&Bf(t,e),t=rc(t,a.children),t.flags|=4096);return t}return i?(La(),g=a.fallback,i=t.mode,N=e.child,q=N.sibling,a=ta(N,{mode:"hidden",children:a.children}),a.subtreeFlags=N.subtreeFlags&65011712,q!==null?g=ta(q,g):(g=yn(g,i,l,null),g.flags|=2),g.return=t,a.return=t,a.sibling=g,t.child=a,Nr(null,a),a=t.child,g=e.child.memoizedState,g===null?g=nc(l):(i=g.cachePool,i!==null?(N=vt._currentValue,i=i.parent!==N?{parent:N,pool:N}:i):i=Kf(),g={baseLanes:g.baseLanes|l,cachePool:i}),a.memoizedState=g,a.childLanes=sc(e,f,l),t.memoizedState=ac,Nr(e.child,a)):(qa(t),l=e.child,e=l.sibling,l=ta(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=l,t.memoizedState=null,l)}function rc(e,t){return t=Zi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Zi(e,t){return e=Pt(22,e,null,t),e.lanes=0,e}function ic(e,t,l){return Tn(t,e.child,null,l),e=rc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sm(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),No(e.return,t,l)}function uc(e,t,l,a,i,u){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:i,treeForkCount:u}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=a,f.tail=l,f.tailMode=i,f.treeForkCount=u)}function rm(e,t,l){var a=t.pendingProps,i=a.revealOrder,u=a.tail;a=a.children;var f=xt.current,g=(f&2)!==0;if(g?(f=f&1|2,t.flags|=128):f&=1,le(xt,f),Dt(e,t,a,l),a=Le?or:0,!g&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sm(e,l,t);else if(e.tag===19)sm(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(i){case"forwards":for(l=t.child,i=null;l!==null;)e=l.alternate,e!==null&&ki(e)===null&&(i=l),l=l.sibling;l=i,l===null?(i=t.child,t.child=null):(i=l.sibling,l.sibling=null),uc(t,!1,i,l,u,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ki(e)===null){t.child=i;break}e=i.sibling,i.sibling=l,l=i,i=e}uc(t,!0,l,null,u,a);break;case"together":uc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function ia(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Ga|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(us(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,l=ta(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=ta(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function oc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&wi(e)))}function U0(e,t,l){switch(t.tag){case 3:Me(t,t.stateNode.containerInfo),Da(t,vt,e.memoizedState.cache),bn();break;case 27:case 5:Qe(t);break;case 4:Me(t,t.stateNode.containerInfo);break;case 10:Da(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Do(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(qa(t),t.flags|=128,null):(l&t.child.childLanes)!==0?nm(e,t,l):(qa(t),e=ia(e,t,l),e!==null?e.sibling:null);qa(t);break;case 19:var i=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(us(e,t,l,!1),a=(l&t.childLanes)!==0),i){if(a)return rm(e,t,l);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),le(xt,xt.current),a)break;return null;case 22:return t.lanes=0,Ih(e,t,l,t.pendingProps);case 24:Da(t,vt,e.memoizedState.cache)}return ia(e,t,l)}function im(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)bt=!0;else{if(!oc(e,l)&&(t.flags&128)===0)return bt=!1,U0(e,t,l);bt=(e.flags&131072)!==0}else bt=!1,Le&&(t.flags&1048576)!==0&&Lf(t,or,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=En(t.elementType),t.type=e,typeof e=="function")mo(e)?(a=Mn(e,a),t.tag=1,t=lm(null,t,e,a,l)):(t.tag=0,t=lc(null,t,e,a,l));else{if(e!=null){var i=e.$$typeof;if(i===D){t.tag=11,t=$h(null,t,e,a,l);break e}else if(i===A){t.tag=14,t=Fh(null,t,e,a,l);break e}}throw t=ve(e)||e,Error(c(306,t,""))}}return t;case 0:return lc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,i=Mn(a,t.pendingProps),lm(e,t,a,i,l);case 3:e:{if(Me(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var u=t.memoizedState;i=u.element,Oo(e,t),gr(t,a,null,l);var f=t.memoizedState;if(a=f.cache,Da(t,vt,a),a!==u.cache&&So(t,[vt],l,!0),xr(),a=f.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=am(e,t,a,l);break e}else if(a!==i){i=xl(Error(c(424)),t),cr(i),t=am(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(tt=jl(e.firstChild),_t=t,Le=!0,_a=null,yl=!0,l=If(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(bn(),a===i){t=ia(e,t,l);break e}Dt(e,t,a,l)}t=t.child}return t;case 26:return Ki(e,t),e===null?(l=vp(t.type,null,t.pendingProps,null))?t.memoizedState=l:Le||(l=t.type,e=t.pendingProps,a=ou(be.current).createElement(l),a[ge]=t,a[je]=e,kt(a,l,e),pt(a),t.stateNode=a):t.memoizedState=vp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Qe(t),e===null&&Le&&(a=t.stateNode=pp(t.type,t.pendingProps,be.current),_t=t,yl=!0,i=tt,Za(t.type)?(Gc=i,tt=jl(a.firstChild)):tt=i),Dt(e,t,t.pendingProps.children,l),Ki(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((i=a=tt)&&(a=fv(a,t.type,t.pendingProps,yl),a!==null?(t.stateNode=a,_t=t,tt=jl(a.firstChild),yl=!1,i=!0):i=!1),i||Ra(t)),Qe(t),i=t.type,u=t.pendingProps,f=e!==null?e.memoizedProps:null,a=u.children,Hc(i,u)?a=null:f!==null&&Hc(i,f)&&(t.flags|=32),t.memoizedState!==null&&(i=Uo(e,t,w0,null,null,l),Hr._currentValue=i),Ki(e,t),Dt(e,t,a,l),t.child;case 6:return e===null&&Le&&((e=l=tt)&&(l=hv(l,t.pendingProps,yl),l!==null?(t.stateNode=l,_t=t,tt=null,e=!0):e=!1),e||Ra(t)),null;case 13:return nm(e,t,l);case 4:return Me(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Tn(t,null,a,l):Dt(e,t,a,l),t.child;case 11:return $h(e,t,t.type,t.pendingProps,l);case 7:return Dt(e,t,t.pendingProps,l),t.child;case 8:return Dt(e,t,t.pendingProps.children,l),t.child;case 12:return Dt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Da(t,t.type,a.value),Dt(e,t,a.children,l),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,Nn(t),i=Rt(i),a=a(i),t.flags|=1,Dt(e,t,a,l),t.child;case 14:return Fh(e,t,t.type,t.pendingProps,l);case 15:return Wh(e,t,t.type,t.pendingProps,l);case 19:return rm(e,t,l);case 31:return k0(e,t,l);case 22:return Ih(e,t,l,t.pendingProps);case 24:return Nn(t),a=Rt(vt),e===null?(i=To(),i===null&&(i=et,u=Eo(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=l),i=u),t.memoizedState={parent:a,cache:i},Mo(t),Da(t,vt,i)):((e.lanes&l)!==0&&(Oo(e,t),gr(t,null,null,l),xr()),i=e.memoizedState,u=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Da(t,vt,a)):(a=u.cache,Da(t,vt,a),a!==i.cache&&So(t,[vt],l,!0))),Dt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function ua(e){e.flags|=4}function cc(e,t,l,a,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Dm())e.flags|=8192;else throw Cn=zi,wo}else e.flags&=-16777217}function um(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Sp(t))if(Dm())e.flags|=8192;else throw Cn=zi,wo}function Ji(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Is():536870912,e.lanes|=t,bs|=t)}function Sr(e,t){if(!Le)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 lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var i=e.child;i!==null;)l|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)l|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function H0(e,t,l){var a=t.pendingProps;switch(vo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return lt(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),na(vt),Ee(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(is(t)?ua(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,bo())),lt(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(ua(t),u!==null?(lt(t),um(t,u)):(lt(t),cc(t,i,null,a,l))):u?u!==e.memoizedState?(ua(t),lt(t),um(t,u)):(lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ua(t),lt(t),cc(t,i,e,a,l)),null;case 27:if(Lt(t),l=be.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ua(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return lt(t),null}e=ue.current,is(t)?Qf(t):(e=pp(i,a,l),t.stateNode=e,ua(t))}return lt(t),null;case 5:if(Lt(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ua(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return lt(t),null}if(u=ue.current,is(t))Qf(t);else{var f=ou(be.current);switch(u){case 1:u=f.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:u=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":u=f.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":u=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":u=f.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?f.createElement("select",{is:a.is}):f.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?f.createElement(i,{is:a.is}):f.createElement(i)}}u[ge]=t,u[je]=a;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)u.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=u;e:switch(kt(u,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ua(t)}}return lt(t),cc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ua(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=be.current,is(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,i=_t,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[ge]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||np(e.nodeValue,l)),e||Ra(t,!0)}else e=ou(e).createTextNode(a),e[ge]=t,t.stateNode=e}return lt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=is(t),l!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[ge]=t}else bn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),e=!1}else l=bo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(tl(t),t):(tl(t),null);if((t.flags&128)!==0)throw Error(c(558))}return lt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=is(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(c(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(c(317));i[ge]=t}else bn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),i=!1}else i=bo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(tl(t),t):(tl(t),null)}return tl(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==i&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Ji(t,t.updateQueue),lt(t),null);case 4:return Ee(),e===null&&_c(t.stateNode.containerInfo),lt(t),null;case 10:return na(t.type),lt(t),null;case 19:if(V(xt),a=t.memoizedState,a===null)return lt(t),null;if(i=(t.flags&128)!==0,u=a.rendering,u===null)if(i)Sr(a,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=ki(e),u!==null){for(t.flags|=128,Sr(a,!1),e=u.updateQueue,t.updateQueue=e,Ji(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Uf(l,e),l=l.sibling;return le(xt,xt.current&1|2),Le&&la(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&_e()>Pi&&(t.flags|=128,i=!0,Sr(a,!1),t.lanes=4194304)}else{if(!i)if(e=ki(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Ji(t,e),Sr(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Le)return lt(t),null}else 2*_e()-a.renderingStartTime>Pi&&l!==536870912&&(t.flags|=128,i=!0,Sr(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=_e(),e.sibling=null,l=xt.current,le(xt,i?l&1|2:l&1),Le&&la(t,a.treeForkCount),e):(lt(t),null);case 22:case 23:return tl(t),Ro(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),l=t.updateQueue,l!==null&&Ji(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&&V(Sn),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),na(vt),lt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function q0(e,t){switch(vo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return na(vt),Ee(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Lt(t),null;case 31:if(t.memoizedState!==null){if(tl(t),t.alternate===null)throw Error(c(340));bn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(tl(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));bn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(xt),null;case 4:return Ee(),null;case 10:return na(t.type),null;case 22:case 23:return tl(t),Ro(),e!==null&&V(Sn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return na(vt),null;case 25:return null;default:return null}}function om(e,t){switch(vo(t),t.tag){case 3:na(vt),Ee();break;case 26:case 27:case 5:Lt(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&tl(t);break;case 13:tl(t);break;case 19:V(xt);break;case 10:na(t.type);break;case 22:case 23:tl(t),Ro(),e!==null&&V(Sn);break;case 24:na(vt)}}function Er(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){a=void 0;var u=l.create,f=l.inst;a=u(),f.destroy=a}l=l.next}while(l!==i)}}catch(g){$e(t,t.return,g)}}function Ba(e,t,l){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var u=i.next;a=u;do{if((a.tag&e)===e){var f=a.inst,g=f.destroy;if(g!==void 0){f.destroy=void 0,i=t;var N=l,q=g;try{q()}catch(K){$e(i,N,K)}}}a=a.next}while(a!==u)}}catch(K){$e(t,t.return,K)}}function cm(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{eh(t,l)}catch(a){$e(e,e.return,a)}}}function dm(e,t,l){l.props=Mn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){$e(e,t,a)}}function Cr(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(i){$e(e,t,i)}}function Bl(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(i){$e(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(i){$e(e,t,i)}else l.current=null}function fm(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(i){$e(e,e.return,i)}}function dc(e,t,l){try{var a=e.stateNode;rv(a,e.type,l,t),a[je]=t}catch(i){$e(e,e.return,i)}}function hm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Za(e.type)||e.tag===4}function fc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hm(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&&Za(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 hc(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=Pl));else if(a!==4&&(a===27&&Za(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(hc(e,t,l),e=e.sibling;e!==null;)hc(e,t,l),e=e.sibling}function $i(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&&Za(e.type)&&(l=e.stateNode),e=e.child,e!==null))for($i(e,t,l),e=e.sibling;e!==null;)$i(e,t,l),e=e.sibling}function mm(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);kt(t,a,l),t[ge]=e,t[je]=l}catch(u){$e(e,e.return,u)}}var oa=!1,jt=!1,mc=!1,pm=typeof WeakSet=="function"?WeakSet:Set,Tt=null;function L0(e,t){if(e=e.containerInfo,kc=xu,e=wf(e),ro(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 i=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var f=0,g=-1,N=-1,q=0,K=0,$=e,Q=null;t:for(;;){for(var X;$!==l||i!==0&&$.nodeType!==3||(g=f+i),$!==u||a!==0&&$.nodeType!==3||(N=f+a),$.nodeType===3&&(f+=$.nodeValue.length),(X=$.firstChild)!==null;)Q=$,$=X;for(;;){if($===e)break t;if(Q===l&&++q===i&&(g=f),Q===u&&++K===a&&(N=f),(X=$.nextSibling)!==null)break;$=Q,Q=$.parentNode}$=X}l=g===-1||N===-1?null:{start:g,end:N}}else l=null}l=l||{start:0,end:0}}else l=null;for(Uc={focusedElem:e,selectionRange:l},xu=!1,Tt=t;Tt!==null;)if(t=Tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Tt=e;else for(;Tt!==null;){switch(t=Tt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)i=e[l],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,l=t,i=u.memoizedProps,u=u.memoizedState,a=l.stateNode;try{var ce=Mn(l.type,i);e=a.getSnapshotBeforeUpdate(ce,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(xe){$e(l,l.return,xe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Lc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Tt=e;break}Tt=t.return}}function xm(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:da(e,l),a&4&&Er(5,l);break;case 1:if(da(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(f){$e(l,l.return,f)}else{var i=Mn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){$e(l,l.return,f)}}a&64&&cm(l),a&512&&Cr(l,l.return);break;case 3:if(da(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{eh(e,t)}catch(f){$e(l,l.return,f)}}break;case 27:t===null&&a&4&&mm(l);case 26:case 5:da(e,l),t===null&&a&4&&fm(l),a&512&&Cr(l,l.return);break;case 12:da(e,l);break;case 31:da(e,l),a&4&&ym(e,l);break;case 13:da(e,l),a&4&&bm(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=J0.bind(null,l),mv(e,l))));break;case 22:if(a=l.memoizedState!==null||oa,!a){t=t!==null&&t.memoizedState!==null||jt,i=oa;var u=jt;oa=a,(jt=t)&&!u?fa(e,l,(l.subtreeFlags&8772)!==0):da(e,l),oa=i,jt=u}break;case 30:break;default:da(e,l)}}function gm(e){var t=e.alternate;t!==null&&(e.alternate=null,gm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&fl(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 nt=null,Vt=!1;function ca(e,t,l){for(l=l.child;l!==null;)vm(e,t,l),l=l.sibling}function vm(e,t,l){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(dl,l)}catch{}switch(l.tag){case 26:jt||Bl(l,t),ca(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:jt||Bl(l,t);var a=nt,i=Vt;Za(l.type)&&(nt=l.stateNode,Vt=!1),ca(e,t,l),Dr(l.stateNode),nt=a,Vt=i;break;case 5:jt||Bl(l,t);case 6:if(a=nt,i=Vt,nt=null,ca(e,t,l),nt=a,Vt=i,nt!==null)if(Vt)try{(nt.nodeType===9?nt.body:nt.nodeName==="HTML"?nt.ownerDocument.body:nt).removeChild(l.stateNode)}catch(u){$e(l,t,u)}else try{nt.removeChild(l.stateNode)}catch(u){$e(l,t,u)}break;case 18:nt!==null&&(Vt?(e=nt,cp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Ms(e)):cp(nt,l.stateNode));break;case 4:a=nt,i=Vt,nt=l.stateNode.containerInfo,Vt=!0,ca(e,t,l),nt=a,Vt=i;break;case 0:case 11:case 14:case 15:Ba(2,l,t),jt||Ba(4,l,t),ca(e,t,l);break;case 1:jt||(Bl(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&dm(l,t,a)),ca(e,t,l);break;case 21:ca(e,t,l);break;case 22:jt=(a=jt)||l.memoizedState!==null,ca(e,t,l),jt=a;break;default:ca(e,t,l)}}function ym(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ms(e)}catch(l){$e(t,t.return,l)}}}function bm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ms(e)}catch(l){$e(t,t.return,l)}}function B0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pm),t;default:throw Error(c(435,e.tag))}}function Fi(e,t){var l=B0(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var i=$0.bind(null,e,a);a.then(i,i)}})}function Kt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var i=l[a],u=e,f=t,g=f;e:for(;g!==null;){switch(g.tag){case 27:if(Za(g.type)){nt=g.stateNode,Vt=!1;break e}break;case 5:nt=g.stateNode,Vt=!1;break e;case 3:case 4:nt=g.stateNode.containerInfo,Vt=!0;break e}g=g.return}if(nt===null)throw Error(c(160));vm(u,f,i),nt=null,Vt=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jm(t,e),t=t.sibling}var Ml=null;function jm(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Kt(t,e),Zt(e),a&4&&(Ba(3,e,e.return),Er(3,e),Ba(5,e,e.return));break;case 1:Kt(t,e),Zt(e),a&512&&(jt||l===null||Bl(l,l.return)),a&64&&oa&&(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 i=Ml;if(Kt(t,e),Zt(e),a&512&&(jt||l===null||Bl(l,l.return)),a&4){var u=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,i=i.ownerDocument||i;t:switch(a){case"title":u=i.getElementsByTagName("title")[0],(!u||u[mt]||u[ge]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(a),i.head.insertBefore(u,i.querySelector("head > title"))),kt(u,a,l),u[ge]=e,pt(u),a=u;break e;case"link":var f=jp("link","href",i).get(a+(l.href||""));if(f){for(var g=0;g<f.length;g++)if(u=f[g],u.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&u.getAttribute("rel")===(l.rel==null?null:l.rel)&&u.getAttribute("title")===(l.title==null?null:l.title)&&u.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){f.splice(g,1);break t}}u=i.createElement(a),kt(u,a,l),i.head.appendChild(u);break;case"meta":if(f=jp("meta","content",i).get(a+(l.content||""))){for(g=0;g<f.length;g++)if(u=f[g],u.getAttribute("content")===(l.content==null?null:""+l.content)&&u.getAttribute("name")===(l.name==null?null:l.name)&&u.getAttribute("property")===(l.property==null?null:l.property)&&u.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&u.getAttribute("charset")===(l.charSet==null?null:l.charSet)){f.splice(g,1);break t}}u=i.createElement(a),kt(u,a,l),i.head.appendChild(u);break;default:throw Error(c(468,a))}u[ge]=e,pt(u),a=u}e.stateNode=a}else Np(i,e.type,e.stateNode);else e.stateNode=bp(i,a,e.memoizedProps);else u!==a?(u===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):u.count--,a===null?Np(i,e.type,e.stateNode):bp(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&dc(e,e.memoizedProps,l.memoizedProps)}break;case 27:Kt(t,e),Zt(e),a&512&&(jt||l===null||Bl(l,l.return)),l!==null&&a&4&&dc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Kt(t,e),Zt(e),a&512&&(jt||l===null||Bl(l,l.return)),e.flags&32){i=e.stateNode;try{Wn(i,"")}catch(ce){$e(e,e.return,ce)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,dc(e,i,l!==null?l.memoizedProps:i)),a&1024&&(mc=!0);break;case 6:if(Kt(t,e),Zt(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ce){$e(e,e.return,ce)}}break;case 3:if(fu=null,i=Ml,Ml=cu(t.containerInfo),Kt(t,e),Ml=i,Zt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Ms(t.containerInfo)}catch(ce){$e(e,e.return,ce)}mc&&(mc=!1,Nm(e));break;case 4:a=Ml,Ml=cu(e.stateNode.containerInfo),Kt(t,e),Zt(e),Ml=a;break;case 12:Kt(t,e),Zt(e);break;case 31:Kt(t,e),Zt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Fi(e,a)));break;case 13:Kt(t,e),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ii=_e()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Fi(e,a)));break;case 22:i=e.memoizedState!==null;var N=l!==null&&l.memoizedState!==null,q=oa,K=jt;if(oa=q||i,jt=K||N,Kt(t,e),jt=K,oa=q,Zt(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(l===null||N||oa||jt||On(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){N=l=t;try{if(u=N.stateNode,i)f=u.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{g=N.stateNode;var $=N.memoizedProps.style,Q=$!=null&&$.hasOwnProperty("display")?$.display:null;g.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(ce){$e(N,N.return,ce)}}}else if(t.tag===6){if(l===null){N=t;try{N.stateNode.nodeValue=i?"":N.memoizedProps}catch(ce){$e(N,N.return,ce)}}}else if(t.tag===18){if(l===null){N=t;try{var X=N.stateNode;i?dp(X,!0):dp(N.stateNode,!1)}catch(ce){$e(N,N.return,ce)}}}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,Fi(e,l))));break;case 19:Kt(t,e),Zt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Fi(e,a)));break;case 30:break;case 21:break;default:Kt(t,e),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(hm(a)){l=a;break}a=a.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var i=l.stateNode,u=fc(e);$i(e,u,i);break;case 5:var f=l.stateNode;l.flags&32&&(Wn(f,""),l.flags&=-33);var g=fc(e);$i(e,g,f);break;case 3:case 4:var N=l.stateNode.containerInfo,q=fc(e);hc(e,q,N);break;default:throw Error(c(161))}}catch(K){$e(e,e.return,K)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Nm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function da(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)xm(e,t.alternate,t),t=t.sibling}function On(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ba(4,t,t.return),On(t);break;case 1:Bl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&dm(t,t.return,l),On(t);break;case 27:Dr(t.stateNode);case 26:case 5:Bl(t,t.return),On(t);break;case 22:t.memoizedState===null&&On(t);break;case 30:On(t);break;default:On(t)}e=e.sibling}}function fa(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,i=e,u=t,f=u.flags;switch(u.tag){case 0:case 11:case 15:fa(i,u,l),Er(4,u);break;case 1:if(fa(i,u,l),a=u,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(q){$e(a,a.return,q)}if(a=u,i=a.updateQueue,i!==null){var g=a.stateNode;try{var N=i.shared.hiddenCallbacks;if(N!==null)for(i.shared.hiddenCallbacks=null,i=0;i<N.length;i++)Pf(N[i],g)}catch(q){$e(a,a.return,q)}}l&&f&64&&cm(u),Cr(u,u.return);break;case 27:mm(u);case 26:case 5:fa(i,u,l),l&&a===null&&f&4&&fm(u),Cr(u,u.return);break;case 12:fa(i,u,l);break;case 31:fa(i,u,l),l&&f&4&&ym(i,u);break;case 13:fa(i,u,l),l&&f&4&&bm(i,u);break;case 22:u.memoizedState===null&&fa(i,u,l),Cr(u,u.return);break;case 30:break;default:fa(i,u,l)}t=t.sibling}}function pc(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&&dr(l))}function xc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dr(e))}function Ol(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sm(e,t,l,a),t=t.sibling}function Sm(e,t,l,a){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ol(e,t,l,a),i&2048&&Er(9,t);break;case 1:Ol(e,t,l,a);break;case 3:Ol(e,t,l,a),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dr(e)));break;case 12:if(i&2048){Ol(e,t,l,a),e=t.stateNode;try{var u=t.memoizedProps,f=u.id,g=u.onPostCommit;typeof g=="function"&&g(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){$e(t,t.return,N)}}else Ol(e,t,l,a);break;case 31:Ol(e,t,l,a);break;case 13:Ol(e,t,l,a);break;case 23:break;case 22:u=t.stateNode,f=t.alternate,t.memoizedState!==null?u._visibility&2?Ol(e,t,l,a):Tr(e,t):u._visibility&2?Ol(e,t,l,a):(u._visibility|=2,gs(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),i&2048&&pc(f,t);break;case 24:Ol(e,t,l,a),i&2048&&xc(t.alternate,t);break;default:Ol(e,t,l,a)}}function gs(e,t,l,a,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,f=t,g=l,N=a,q=f.flags;switch(f.tag){case 0:case 11:case 15:gs(u,f,g,N,i),Er(8,f);break;case 23:break;case 22:var K=f.stateNode;f.memoizedState!==null?K._visibility&2?gs(u,f,g,N,i):Tr(u,f):(K._visibility|=2,gs(u,f,g,N,i)),i&&q&2048&&pc(f.alternate,f);break;case 24:gs(u,f,g,N,i),i&&q&2048&&xc(f.alternate,f);break;default:gs(u,f,g,N,i)}t=t.sibling}}function Tr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,i=a.flags;switch(a.tag){case 22:Tr(l,a),i&2048&&pc(a.alternate,a);break;case 24:Tr(l,a),i&2048&&xc(a.alternate,a);break;default:Tr(l,a)}t=t.sibling}}var wr=8192;function vs(e,t,l){if(e.subtreeFlags&wr)for(e=e.child;e!==null;)Em(e,t,l),e=e.sibling}function Em(e,t,l){switch(e.tag){case 26:vs(e,t,l),e.flags&wr&&e.memoizedState!==null&&Tv(l,Ml,e.memoizedState,e.memoizedProps);break;case 5:vs(e,t,l);break;case 3:case 4:var a=Ml;Ml=cu(e.stateNode.containerInfo),vs(e,t,l),Ml=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=wr,wr=16777216,vs(e,t,l),wr=a):vs(e,t,l));break;default:vs(e,t,l)}}function Cm(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 Mr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,wm(a,e)}Cm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Tm(e),e=e.sibling}function Tm(e){switch(e.tag){case 0:case 11:case 15:Mr(e),e.flags&2048&&Ba(9,e,e.return);break;case 3:Mr(e);break;case 12:Mr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wi(e)):Mr(e);break;default:Mr(e)}}function Wi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Tt=a,wm(a,e)}Cm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ba(8,t,t.return),Wi(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Wi(t));break;default:Wi(t)}e=e.sibling}}function wm(e,t){for(;Tt!==null;){var l=Tt;switch(l.tag){case 0:case 11:case 15:Ba(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:dr(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Tt=a;else e:for(l=e;Tt!==null;){a=Tt;var i=a.sibling,u=a.return;if(gm(a),a===l){Tt=null;break e}if(i!==null){i.return=u,Tt=i;break e}Tt=u}}}var Q0={getCacheForType:function(e){var t=Rt(vt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Rt(vt).controller.signal}},G0=typeof WeakMap=="function"?WeakMap:Map,Ve=0,et=null,De=null,He=0,Je=0,ll=null,Qa=!1,ys=!1,gc=!1,ha=0,ut=0,Ga=0,An=0,vc=0,al=0,bs=0,Or=null,Jt=null,yc=!1,Ii=0,Mm=0,Pi=1/0,eu=null,Ya=null,St=0,Xa=null,js=null,ma=0,bc=0,jc=null,Om=null,Ar=0,Nc=null;function nl(){return(Ve&2)!==0&&He!==0?He&-He:G.T!==null?Mc():Ce()}function Am(){if(al===0)if((He&536870912)===0||Le){var e=kl;kl<<=1,(kl&3932160)===0&&(kl=262144),al=e}else al=536870912;return e=el.current,e!==null&&(e.flags|=32),al}function $t(e,t,l){(e===et&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(Ns(e,0),Va(e,He,al,!1)),wa(e,l),((Ve&2)===0||e!==et)&&(e===et&&((Ve&2)===0&&(An|=l),ut===4&&Va(e,He,al,!1)),Ql(e))}function zm(e,t,l){if((Ve&6)!==0)throw Error(c(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Ta(e,t),i=a?V0(e,t):Ec(e,t,!0),u=a;do{if(i===0){ys&&!a&&Va(e,t,0,!1);break}else{if(l=e.current.alternate,u&&!Y0(l)){i=Ec(e,t,!1),u=!1;continue}if(i===2){if(u=t,e.errorRecoveryDisabledLanes&u)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var g=e;i=Or;var N=g.current.memoizedState.isDehydrated;if(N&&(Ns(g,f).flags|=256),f=Ec(g,f,!1),f!==2){if(gc&&!N){g.errorRecoveryDisabledLanes|=u,An|=u,i=4;break e}u=Jt,Jt=i,u!==null&&(Jt===null?Jt=u:Jt.push.apply(Jt,u))}i=f}if(u=!1,i!==2)continue}}if(i===1){Ns(e,0),Va(e,t,0,!0);break}e:{switch(a=e,u=i,u){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Va(a,t,al,!Qa);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(i=Ii+300-_e(),10<i)){if(Va(a,t,al,!Qa),Zn(a,0,!0)!==0)break e;ma=t,a.timeoutHandle=up(_m.bind(null,a,l,Jt,eu,yc,t,al,An,bs,Qa,u,"Throttled",-0,0),i);break e}_m(a,l,Jt,eu,yc,t,al,An,bs,Qa,u,null,-0,0)}}break}while(!0);Ql(e)}function _m(e,t,l,a,i,u,f,g,N,q,K,$,Q,X){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pl},Em(t,u,$);var ce=(u&62914560)===u?Ii-_e():(u&4194048)===u?Mm-_e():0;if(ce=wv($,ce),ce!==null){ma=u,e.cancelPendingCommit=ce(Bm.bind(null,e,t,u,l,a,i,f,g,N,K,$,null,Q,X)),Va(e,u,f,!q);return}}Bm(e,t,u,l,a,i,f,g,N)}function Y0(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 i=l[a],u=i.getSnapshot;i=i.value;try{if(!It(u(),i))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 Va(e,t,l,a){t&=~vc,t&=~An,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var i=t;0<i;){var u=31-zt(i),f=1<<u;a[u]=-1,i&=~f}l!==0&&Ps(e,l,t)}function tu(){return(Ve&6)===0?(zr(0),!1):!0}function Sc(){if(De!==null){if(Je===0)var e=De.return;else e=De,aa=jn=null,Lo(e),fs=null,hr=0,e=De;for(;e!==null;)om(e.alternate,e),e=e.return;De=null}}function Ns(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,ov(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ma=0,Sc(),et=e,De=l=ta(e.current,null),He=t,Je=0,ll=null,Qa=!1,ys=Ta(e,t),gc=!1,bs=al=vc=An=Ga=ut=0,Jt=Or=null,yc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var i=31-zt(a),u=1<<i;t|=e[i],a&=~u}return ha=t,Ni(),l}function Rm(e,t){we=null,G.H=jr,t===ds||t===Ai?(t=$f(),Je=3):t===wo?(t=$f(),Je=4):Je=t===tc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ll=t,De===null&&(ut=1,Xi(e,xl(t,e.current)))}function Dm(){var e=el.current;return e===null?!0:(He&4194048)===He?bl===null:(He&62914560)===He||(He&536870912)!==0?e===bl:!1}function km(){var e=G.H;return G.H=jr,e===null?jr:e}function Um(){var e=G.A;return G.A=Q0,e}function lu(){ut=4,Qa||(He&4194048)!==He&&el.current!==null||(ys=!0),(Ga&134217727)===0&&(An&134217727)===0||et===null||Va(et,He,al,!1)}function Ec(e,t,l){var a=Ve;Ve|=2;var i=km(),u=Um();(et!==e||He!==t)&&(eu=null,Ns(e,t)),t=!1;var f=ut;e:do try{if(Je!==0&&De!==null){var g=De,N=ll;switch(Je){case 8:Sc(),f=6;break e;case 3:case 2:case 9:case 6:el.current===null&&(t=!0);var q=Je;if(Je=0,ll=null,Ss(e,g,N,q),l&&ys){f=0;break e}break;default:q=Je,Je=0,ll=null,Ss(e,g,N,q)}}X0(),f=ut;break}catch(K){Rm(e,K)}while(!0);return t&&e.shellSuspendCounter++,aa=jn=null,Ve=a,G.H=i,G.A=u,De===null&&(et=null,He=0,Ni()),f}function X0(){for(;De!==null;)Hm(De)}function V0(e,t){var l=Ve;Ve|=2;var a=km(),i=Um();et!==e||He!==t?(eu=null,Pi=_e()+500,Ns(e,t)):ys=Ta(e,t);e:do try{if(Je!==0&&De!==null){t=De;var u=ll;t:switch(Je){case 1:Je=0,ll=null,Ss(e,t,u,1);break;case 2:case 9:if(Zf(u)){Je=0,ll=null,qm(t);break}t=function(){Je!==2&&Je!==9||et!==e||(Je=7),Ql(e)},u.then(t,t);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:Zf(u)?(Je=0,ll=null,qm(t)):(Je=0,ll=null,Ss(e,t,u,7));break;case 5:var f=null;switch(De.tag){case 26:f=De.memoizedState;case 5:case 27:var g=De;if(f?Sp(f):g.stateNode.complete){Je=0,ll=null;var N=g.sibling;if(N!==null)De=N;else{var q=g.return;q!==null?(De=q,au(q)):De=null}break t}}Je=0,ll=null,Ss(e,t,u,5);break;case 6:Je=0,ll=null,Ss(e,t,u,6);break;case 8:Sc(),ut=6;break e;default:throw Error(c(462))}}K0();break}catch(K){Rm(e,K)}while(!0);return aa=jn=null,G.H=a,G.A=i,Ve=l,De!==null?0:(et=null,He=0,Ni(),ut)}function K0(){for(;De!==null&&!Ct();)Hm(De)}function Hm(e){var t=im(e.alternate,e,ha);e.memoizedProps=e.pendingProps,t===null?au(e):De=t}function qm(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=tm(l,t,t.pendingProps,t.type,void 0,He);break;case 11:t=tm(l,t,t.pendingProps,t.type.render,t.ref,He);break;case 5:Lo(t);default:om(l,t),t=De=Uf(t,ha),t=im(l,t,ha)}e.memoizedProps=e.pendingProps,t===null?au(e):De=t}function Ss(e,t,l,a){aa=jn=null,Lo(t),fs=null,hr=0;var i=t.return;try{if(D0(e,i,t,l,He)){ut=1,Xi(e,xl(l,e.current)),De=null;return}}catch(u){if(i!==null)throw De=i,u;ut=1,Xi(e,xl(l,e.current)),De=null;return}t.flags&32768?(Le||a===1?e=!0:ys||(He&536870912)!==0?e=!1:(Qa=e=!0,(a===2||a===9||a===3||a===6)&&(a=el.current,a!==null&&a.tag===13&&(a.flags|=16384))),Lm(t,e)):au(t)}function au(e){var t=e;do{if((t.flags&32768)!==0){Lm(t,Qa);return}e=t.return;var l=H0(t.alternate,t,ha);if(l!==null){De=l;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);ut===0&&(ut=5)}function Lm(e,t){do{var l=q0(e.alternate,e);if(l!==null){l.flags&=32767,De=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=l}while(e!==null);ut=6,De=null}function Bm(e,t,l,a,i,u,f,g,N){e.cancelPendingCommit=null;do nu();while(St!==0);if((Ve&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=fo,ci(e,l,u,f,g,N),e===et&&(De=et=null,He=0),js=t,Xa=e,ma=l,bc=u,jc=i,Om=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,F0(Yn,function(){return Vm(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=G.T,G.T=null,i=W.p,W.p=2,f=Ve,Ve|=4;try{L0(e,t,l)}finally{Ve=f,W.p=i,G.T=a}}St=1,Qm(),Gm(),Ym()}}function Qm(){if(St===1){St=0;var e=Xa,t=js,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=G.T,G.T=null;var a=W.p;W.p=2;var i=Ve;Ve|=4;try{jm(t,e);var u=Uc,f=wf(e.containerInfo),g=u.focusedElem,N=u.selectionRange;if(f!==g&&g&&g.ownerDocument&&Tf(g.ownerDocument.documentElement,g)){if(N!==null&&ro(g)){var q=N.start,K=N.end;if(K===void 0&&(K=q),"selectionStart"in g)g.selectionStart=q,g.selectionEnd=Math.min(K,g.value.length);else{var $=g.ownerDocument||document,Q=$&&$.defaultView||window;if(Q.getSelection){var X=Q.getSelection(),ce=g.textContent.length,xe=Math.min(N.start,ce),Ie=N.end===void 0?xe:Math.min(N.end,ce);!X.extend&&xe>Ie&&(f=Ie,Ie=xe,xe=f);var z=Cf(g,xe),O=Cf(g,Ie);if(z&&O&&(X.rangeCount!==1||X.anchorNode!==z.node||X.anchorOffset!==z.offset||X.focusNode!==O.node||X.focusOffset!==O.offset)){var H=$.createRange();H.setStart(z.node,z.offset),X.removeAllRanges(),xe>Ie?(X.addRange(H),X.extend(O.node,O.offset)):(H.setEnd(O.node,O.offset),X.addRange(H))}}}}for($=[],X=g;X=X.parentNode;)X.nodeType===1&&$.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<$.length;g++){var Z=$[g];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}xu=!!kc,Uc=kc=null}finally{Ve=i,W.p=a,G.T=l}}e.current=t,St=2}}function Gm(){if(St===2){St=0;var e=Xa,t=js,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=G.T,G.T=null;var a=W.p;W.p=2;var i=Ve;Ve|=4;try{xm(e,t.alternate,t)}finally{Ve=i,W.p=a,G.T=l}}St=3}}function Ym(){if(St===4||St===3){St=0,Dl();var e=Xa,t=js,l=ma,a=Om;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?St=5:(St=0,js=Xa=null,Xm(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ya=null),Re(l),t=t.stateNode,At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(dl,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=G.T,i=W.p,W.p=2,G.T=null;try{for(var u=e.onRecoverableError,f=0;f<a.length;f++){var g=a[f];u(g.value,{componentStack:g.stack})}}finally{G.T=t,W.p=i}}(ma&3)!==0&&nu(),Ql(e),i=e.pendingLanes,(l&261930)!==0&&(i&42)!==0?e===Nc?Ar++:(Ar=0,Nc=e):Ar=0,zr(0)}}function Xm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,dr(t)))}function nu(){return Qm(),Gm(),Ym(),Vm()}function Vm(){if(St!==5)return!1;var e=Xa,t=bc;bc=0;var l=Re(ma),a=G.T,i=W.p;try{W.p=32>l?32:l,G.T=null,l=jc,jc=null;var u=Xa,f=ma;if(St=0,js=Xa=null,ma=0,(Ve&6)!==0)throw Error(c(331));var g=Ve;if(Ve|=4,Tm(u.current),Sm(u,u.current,f,l),Ve=g,zr(0,!1),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(dl,u)}catch{}return!0}finally{W.p=i,G.T=a,Xm(e,t)}}function Km(e,t,l){t=xl(l,t),t=ec(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(wa(e,2),Ql(e))}function $e(e,t,l){if(e.tag===3)Km(e,e,l);else for(;t!==null;){if(t.tag===3){Km(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ya===null||!Ya.has(a))){e=xl(l,e),l=Zh(2),a=Ha(t,l,2),a!==null&&(Jh(l,a,t,e),wa(a,2),Ql(a));break}}t=t.return}}function Cc(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new G0;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(l)||(gc=!0,i.add(l),e=Z0.bind(null,e,t,l),t.then(e,e))}function Z0(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,et===e&&(He&l)===l&&(ut===4||ut===3&&(He&62914560)===He&&300>_e()-Ii?(Ve&2)===0&&Ns(e,0):vc|=l,bs===He&&(bs=0)),Ql(e)}function Zm(e,t){t===0&&(t=Is()),e=vn(e,t),e!==null&&(wa(e,t),Ql(e))}function J0(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Zm(e,l)}function $0(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(l=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),Zm(e,l)}function F0(e,t){return Fs(e,t)}var su=null,Es=null,Tc=!1,ru=!1,wc=!1,Ka=0;function Ql(e){e!==Es&&e.next===null&&(Es===null?su=Es=e:Es=Es.next=e),ru=!0,Tc||(Tc=!0,I0())}function zr(e,t){if(!wc&&ru){wc=!0;do for(var l=!1,a=su;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var u=0;else{var f=a.suspendedLanes,g=a.pingedLanes;u=(1<<31-zt(42|e)+1)-1,u&=i&~(f&~g),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,Wm(a,u))}else u=He,u=Zn(a,a===et?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Ta(a,u)||(l=!0,Wm(a,u));a=a.next}while(l);wc=!1}}function W0(){Jm()}function Jm(){ru=Tc=!1;var e=0;Ka!==0&&uv()&&(e=Ka);for(var t=_e(),l=null,a=su;a!==null;){var i=a.next,u=$m(a,t);u===0?(a.next=null,l===null?su=i:l.next=i,i===null&&(Es=l)):(l=a,(e!==0||(u&3)!==0)&&(ru=!0)),a=i}St!==0&&St!==5||zr(e),Ka!==0&&(Ka=0)}function $m(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var f=31-zt(u),g=1<<f,N=i[f];N===-1?((g&l)===0||(g&a)!==0)&&(i[f]=Yu(g,t)):N<=t&&(e.expiredLanes|=g),u&=~g}if(t=et,l=He,l=Zn(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ca(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ta(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ca(a),Re(l)){case 2:case 8:l=ri;break;case 32:l=Yn;break;case 268435456:l=ii;break;default:l=Yn}return a=Fm.bind(null,e),l=Fs(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Ca(a),e.callbackPriority=2,e.callbackNode=null,2}function Fm(e,t){if(St!==0&&St!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(nu()&&e.callbackNode!==l)return null;var a=He;return a=Zn(e,e===et?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(zm(e,a,t),$m(e,_e()),e.callbackNode!=null&&e.callbackNode===l?Fm.bind(null,e):null)}function Wm(e,t){if(nu())return null;zm(e,t,!0)}function I0(){cv(function(){(Ve&6)!==0?Fs(Ge,W0):Jm()})}function Mc(){if(Ka===0){var e=os;e===0&&(e=Kn,Kn<<=1,(Kn&261888)===0&&(Kn=256)),Ka=e}return Ka}function Im(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mi(""+e)}function Pm(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 P0(e,t,l,a,i){if(t==="submit"&&l&&l.stateNode===i){var u=Im((i[je]||null).action),f=a.submitter;f&&(t=(t=f[je]||null)?Im(t.formAction):f.getAttribute("formAction"),t!==null&&(u=t,f=null));var g=new vi("action","action",null,a,i);e.push({event:g,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ka!==0){var N=f?Pm(i,f):new FormData(i);Jo(l,{pending:!0,data:N,method:i.method,action:u},null,N)}}else typeof u=="function"&&(g.preventDefault(),N=f?Pm(i,f):new FormData(i),Jo(l,{pending:!0,data:N,method:i.method,action:u},u,N))},currentTarget:i}]})}}for(var Oc=0;Oc<co.length;Oc++){var Ac=co[Oc],ev=Ac.toLowerCase(),tv=Ac[0].toUpperCase()+Ac.slice(1);wl(ev,"on"+tv)}wl(Af,"onAnimationEnd"),wl(zf,"onAnimationIteration"),wl(_f,"onAnimationStart"),wl("dblclick","onDoubleClick"),wl("focusin","onFocus"),wl("focusout","onBlur"),wl(g0,"onTransitionRun"),wl(v0,"onTransitionStart"),wl(y0,"onTransitionCancel"),wl(Rf,"onTransitionEnd"),$n("onMouseEnter",["mouseout","mouseover"]),$n("onMouseLeave",["mouseout","mouseover"]),$n("onPointerEnter",["pointerout","pointerover"]),$n("onPointerLeave",["pointerout","pointerover"]),mn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mn("onBeforeInput",["compositionend","keypress","textInput","paste"]),mn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="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(" "),lv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_r));function ep(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],i=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var f=a.length-1;0<=f;f--){var g=a[f],N=g.instance,q=g.currentTarget;if(g=g.listener,N!==u&&i.isPropagationStopped())break e;u=g,i.currentTarget=q;try{u(i)}catch(K){ji(K)}i.currentTarget=null,u=N}else for(f=0;f<a.length;f++){if(g=a[f],N=g.instance,q=g.currentTarget,g=g.listener,N!==u&&i.isPropagationStopped())break e;u=g,i.currentTarget=q;try{u(i)}catch(K){ji(K)}i.currentTarget=null,u=N}}}}function ke(e,t){var l=t[Ue];l===void 0&&(l=t[Ue]=new Set);var a=e+"__bubble";l.has(a)||(tp(t,e,2,!1),l.add(a))}function zc(e,t,l){var a=0;t&&(a|=4),tp(l,e,a,t)}var iu="_reactListening"+Math.random().toString(36).slice(2);function _c(e){if(!e[iu]){e[iu]=!0,Oa.forEach(function(l){l!=="selectionchange"&&(lv.has(l)||zc(l,!1,e),zc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[iu]||(t[iu]=!0,zc("selectionchange",!1,t))}}function tp(e,t,l,a){switch(Ap(t)){case 2:var i=Av;break;case 8:i=zv;break;default:i=Zc}l=i.bind(null,t,l,e),i=void 0,!Wu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,l,{capture:!0,passive:i}):e.addEventListener(t,l,!0):i!==void 0?e.addEventListener(t,l,{passive:i}):e.addEventListener(t,l,!1)}function Rc(e,t,l,a,i){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var f=a.tag;if(f===3||f===4){var g=a.stateNode.containerInfo;if(g===i)break;if(f===4)for(f=a.return;f!==null;){var N=f.tag;if((N===3||N===4)&&f.stateNode.containerInfo===i)return;f=f.return}for(;g!==null;){if(f=Yt(g),f===null)return;if(N=f.tag,N===5||N===6||N===26||N===27){a=u=f;continue e}g=g.parentNode}}a=a.return}sf(function(){var q=u,K=$u(l),$=[];e:{var Q=Df.get(e);if(Q!==void 0){var X=vi,ce=e;switch(e){case"keypress":if(xi(l)===0)break e;case"keydown":case"keyup":X=$g;break;case"focusin":ce="focus",X=to;break;case"focusout":ce="blur",X=to;break;case"beforeblur":case"afterblur":X=to;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":X=of;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=Hg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=Ig;break;case Af:case zf:case _f:X=Bg;break;case Rf:X=e0;break;case"scroll":case"scrollend":X=kg;break;case"wheel":X=l0;break;case"copy":case"cut":case"paste":X=Gg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=df;break;case"toggle":case"beforetoggle":X=n0}var xe=(t&4)!==0,Ie=!xe&&(e==="scroll"||e==="scrollend"),z=xe?Q!==null?Q+"Capture":null:Q;xe=[];for(var O=q,H;O!==null;){var Z=O;if(H=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||H===null||z===null||(Z=er(O,z),Z!=null&&xe.push(Rr(O,Z,H))),Ie)break;O=O.return}0<xe.length&&(Q=new X(Q,ce,null,l,K),$.push({event:Q,listeners:xe}))}}if((t&7)===0){e:{if(Q=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",Q&&l!==Ju&&(ce=l.relatedTarget||l.fromElement)&&(Yt(ce)||ce[Te]))break e;if((X||Q)&&(Q=K.window===K?K:(Q=K.ownerDocument)?Q.defaultView||Q.parentWindow:window,X?(ce=l.relatedTarget||l.toElement,X=q,ce=ce?Yt(ce):null,ce!==null&&(Ie=h(ce),xe=ce.tag,ce!==Ie||xe!==5&&xe!==27&&xe!==6)&&(ce=null)):(X=null,ce=q),X!==ce)){if(xe=of,Z="onMouseLeave",z="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(xe=df,Z="onPointerLeave",z="onPointerEnter",O="pointer"),Ie=X==null?Q:Wl(X),H=ce==null?Q:Wl(ce),Q=new xe(Z,O+"leave",X,l,K),Q.target=Ie,Q.relatedTarget=H,Z=null,Yt(K)===q&&(xe=new xe(z,O+"enter",ce,l,K),xe.target=H,xe.relatedTarget=Ie,Z=xe),Ie=Z,X&&ce)t:{for(xe=av,z=X,O=ce,H=0,Z=z;Z;Z=xe(Z))H++;Z=0;for(var me=O;me;me=xe(me))Z++;for(;0<H-Z;)z=xe(z),H--;for(;0<Z-H;)O=xe(O),Z--;for(;H--;){if(z===O||O!==null&&z===O.alternate){xe=z;break t}z=xe(z),O=xe(O)}xe=null}else xe=null;X!==null&&lp($,Q,X,xe,!1),ce!==null&&Ie!==null&&lp($,Ie,ce,xe,!0)}}e:{if(Q=q?Wl(q):window,X=Q.nodeName&&Q.nodeName.toLowerCase(),X==="select"||X==="input"&&Q.type==="file")var Ye=yf;else if(gf(Q))if(bf)Ye=m0;else{Ye=f0;var de=d0}else X=Q.nodeName,!X||X.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?q&&Zu(q.elementType)&&(Ye=yf):Ye=h0;if(Ye&&(Ye=Ye(e,q))){vf($,Ye,l,K);break e}de&&de(e,Q,q),e==="focusout"&&q&&Q.type==="number"&&q.memoizedProps.value!=null&&Ku(Q,"number",Q.value)}switch(de=q?Wl(q):window,e){case"focusin":(gf(de)||de.contentEditable==="true")&&(ts=de,io=q,ur=null);break;case"focusout":ur=io=ts=null;break;case"mousedown":uo=!0;break;case"contextmenu":case"mouseup":case"dragend":uo=!1,Mf($,l,K);break;case"selectionchange":if(x0)break;case"keydown":case"keyup":Mf($,l,K)}var Ae;if(ao)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else es?pf(e,l)&&(qe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(qe="onCompositionStart");qe&&(ff&&l.locale!=="ko"&&(es||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&es&&(Ae=rf()):(Aa=K,Iu="value"in Aa?Aa.value:Aa.textContent,es=!0)),de=uu(q,qe),0<de.length&&(qe=new cf(qe,e,null,l,K),$.push({event:qe,listeners:de}),Ae?qe.data=Ae:(Ae=xf(l),Ae!==null&&(qe.data=Ae)))),(Ae=r0?i0(e,l):u0(e,l))&&(qe=uu(q,"onBeforeInput"),0<qe.length&&(de=new cf("onBeforeInput","beforeinput",null,l,K),$.push({event:de,listeners:qe}),de.data=Ae)),P0($,e,q,l,K)}ep($,t)})}function Rr(e,t,l){return{instance:e,listener:t,currentTarget:l}}function uu(e,t){for(var l=t+"Capture",a=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=er(e,l),i!=null&&a.unshift(Rr(e,i,u)),i=er(e,t),i!=null&&a.push(Rr(e,i,u))),e.tag===3)return a;e=e.return}return[]}function av(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function lp(e,t,l,a,i){for(var u=t._reactName,f=[];l!==null&&l!==a;){var g=l,N=g.alternate,q=g.stateNode;if(g=g.tag,N!==null&&N===a)break;g!==5&&g!==26&&g!==27||q===null||(N=q,i?(q=er(l,u),q!=null&&f.unshift(Rr(l,q,N))):i||(q=er(l,u),q!=null&&f.push(Rr(l,q,N)))),l=l.return}f.length!==0&&e.push({event:t,listeners:f})}var nv=/\r\n?/g,sv=/\u0000|\uFFFD/g;function ap(e){return(typeof e=="string"?e:""+e).replace(nv,`
49
+ `).replace(sv,"")}function np(e,t){return t=ap(t),ap(e)===t}function We(e,t,l,a,i,u){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Wn(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Wn(e,""+a);break;case"className":fi(e,"class",a);break;case"tabIndex":fi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":fi(e,l,a);break;case"style":af(e,a,u);break;case"data":if(t!=="object"){fi(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=mi(""+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 u=="function"&&(l==="formAction"?(t!=="input"&&We(e,t,"name",i.name,i,null),We(e,t,"formEncType",i.formEncType,i,null),We(e,t,"formMethod",i.formMethod,i,null),We(e,t,"formTarget",i.formTarget,i,null)):(We(e,t,"encType",i.encType,i,null),We(e,t,"method",i.method,i,null),We(e,t,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=mi(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Pl);break;case"onScroll":a!=null&&ke("scroll",e);break;case"onScrollEnd":a!=null&&ke("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(i.children!=null)throw Error(c(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=mi(""+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":ke("beforetoggle",e),ke("toggle",e),di(e,"popover",a);break;case"xlinkActuate":Il(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Il(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Il(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Il(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Il(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Il(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Il(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Il(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Il(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":di(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=Rg.get(l)||l,di(e,l,a))}}function Dc(e,t,l,a,i,u){switch(l){case"style":af(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(i.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Wn(e,a):(typeof a=="number"||typeof a=="bigint")&&Wn(e,""+a);break;case"onScroll":a!=null&&ke("scroll",e);break;case"onScrollEnd":a!=null&&ke("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Pl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!hn.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(i=l.endsWith("Capture"),t=l.slice(2,i?l.length-7:void 0),u=e[je]||null,u=u!=null?u[l]:null,typeof u=="function"&&e.removeEventListener(t,u,i),typeof a=="function")){typeof u!="function"&&u!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,i);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):di(e,l,a)}}}function kt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",e),ke("load",e);var a=!1,i=!1,u;for(u in l)if(l.hasOwnProperty(u)){var f=l[u];if(f!=null)switch(u){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:We(e,t,u,f,l,null)}}i&&We(e,t,"srcSet",l.srcSet,l,null),a&&We(e,t,"src",l.src,l,null);return;case"input":ke("invalid",e);var g=u=f=i=null,N=null,q=null;for(a in l)if(l.hasOwnProperty(a)){var K=l[a];if(K!=null)switch(a){case"name":i=K;break;case"type":f=K;break;case"checked":N=K;break;case"defaultChecked":q=K;break;case"value":u=K;break;case"defaultValue":g=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(c(137,t));break;default:We(e,t,a,K,l,null)}}Pd(e,u,g,N,q,f,i,!1);return;case"select":ke("invalid",e),a=f=u=null;for(i in l)if(l.hasOwnProperty(i)&&(g=l[i],g!=null))switch(i){case"value":u=g;break;case"defaultValue":f=g;break;case"multiple":a=g;default:We(e,t,i,g,l,null)}t=u,l=f,e.multiple=!!a,t!=null?Fn(e,!!a,t,!1):l!=null&&Fn(e,!!a,l,!0);return;case"textarea":ke("invalid",e),u=i=a=null;for(f in l)if(l.hasOwnProperty(f)&&(g=l[f],g!=null))switch(f){case"value":a=g;break;case"defaultValue":i=g;break;case"children":u=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(c(91));break;default:We(e,t,f,g,l,null)}tf(e,a,i,u);return;case"option":for(N in l)if(l.hasOwnProperty(N)&&(a=l[N],a!=null))switch(N){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:We(e,t,N,a,l,null)}return;case"dialog":ke("beforetoggle",e),ke("toggle",e),ke("cancel",e),ke("close",e);break;case"iframe":case"object":ke("load",e);break;case"video":case"audio":for(a=0;a<_r.length;a++)ke(_r[a],e);break;case"image":ke("error",e),ke("load",e);break;case"details":ke("toggle",e);break;case"embed":case"source":case"link":ke("error",e),ke("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(q in l)if(l.hasOwnProperty(q)&&(a=l[q],a!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:We(e,t,q,a,l,null)}return;default:if(Zu(t)){for(K in l)l.hasOwnProperty(K)&&(a=l[K],a!==void 0&&Dc(e,t,K,a,l,void 0));return}}for(g in l)l.hasOwnProperty(g)&&(a=l[g],a!=null&&We(e,t,g,a,l,null))}function rv(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 i=null,u=null,f=null,g=null,N=null,q=null,K=null;for(X in l){var $=l[X];if(l.hasOwnProperty(X)&&$!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":N=$;default:a.hasOwnProperty(X)||We(e,t,X,null,a,$)}}for(var Q in a){var X=a[Q];if($=l[Q],a.hasOwnProperty(Q)&&(X!=null||$!=null))switch(Q){case"type":u=X;break;case"name":i=X;break;case"checked":q=X;break;case"defaultChecked":K=X;break;case"value":f=X;break;case"defaultValue":g=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(c(137,t));break;default:X!==$&&We(e,t,Q,X,a,$)}}Vu(e,f,g,N,q,K,u,i);return;case"select":X=f=g=Q=null;for(u in l)if(N=l[u],l.hasOwnProperty(u)&&N!=null)switch(u){case"value":break;case"multiple":X=N;default:a.hasOwnProperty(u)||We(e,t,u,null,a,N)}for(i in a)if(u=a[i],N=l[i],a.hasOwnProperty(i)&&(u!=null||N!=null))switch(i){case"value":Q=u;break;case"defaultValue":g=u;break;case"multiple":f=u;default:u!==N&&We(e,t,i,u,a,N)}t=g,l=f,a=X,Q!=null?Fn(e,!!l,Q,!1):!!a!=!!l&&(t!=null?Fn(e,!!l,t,!0):Fn(e,!!l,l?[]:"",!1));return;case"textarea":X=Q=null;for(g in l)if(i=l[g],l.hasOwnProperty(g)&&i!=null&&!a.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:We(e,t,g,null,a,i)}for(f in a)if(i=a[f],u=l[f],a.hasOwnProperty(f)&&(i!=null||u!=null))switch(f){case"value":Q=i;break;case"defaultValue":X=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(c(91));break;default:i!==u&&We(e,t,f,i,a,u)}ef(e,Q,X);return;case"option":for(var ce in l)if(Q=l[ce],l.hasOwnProperty(ce)&&Q!=null&&!a.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:We(e,t,ce,null,a,Q)}for(N in a)if(Q=a[N],X=l[N],a.hasOwnProperty(N)&&Q!==X&&(Q!=null||X!=null))switch(N){case"selected":e.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:We(e,t,N,Q,a,X)}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 xe in l)Q=l[xe],l.hasOwnProperty(xe)&&Q!=null&&!a.hasOwnProperty(xe)&&We(e,t,xe,null,a,Q);for(q in a)if(Q=a[q],X=l[q],a.hasOwnProperty(q)&&Q!==X&&(Q!=null||X!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(c(137,t));break;default:We(e,t,q,Q,a,X)}return;default:if(Zu(t)){for(var Ie in l)Q=l[Ie],l.hasOwnProperty(Ie)&&Q!==void 0&&!a.hasOwnProperty(Ie)&&Dc(e,t,Ie,void 0,a,Q);for(K in a)Q=a[K],X=l[K],!a.hasOwnProperty(K)||Q===X||Q===void 0&&X===void 0||Dc(e,t,K,Q,a,X);return}}for(var z in l)Q=l[z],l.hasOwnProperty(z)&&Q!=null&&!a.hasOwnProperty(z)&&We(e,t,z,null,a,Q);for($ in a)Q=a[$],X=l[$],!a.hasOwnProperty($)||Q===X||Q==null&&X==null||We(e,t,$,Q,a,X)}function sp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function iv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var i=l[a],u=i.transferSize,f=i.initiatorType,g=i.duration;if(u&&g&&sp(f)){for(f=0,g=i.responseEnd,a+=1;a<l.length;a++){var N=l[a],q=N.startTime;if(q>g)break;var K=N.transferSize,$=N.initiatorType;K&&sp($)&&(N=N.responseEnd,f+=K*(N<g?1:(g-q)/(N-q)))}if(--a,t+=8*(u+f)/(i.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 kc=null,Uc=null;function ou(e){return e.nodeType===9?e:e.ownerDocument}function rp(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 ip(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 Hc(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 qc=null;function uv(){var e=window.event;return e&&e.type==="popstate"?e===qc?!1:(qc=e,!0):(qc=null,!1)}var up=typeof setTimeout=="function"?setTimeout:void 0,ov=typeof clearTimeout=="function"?clearTimeout:void 0,op=typeof Promise=="function"?Promise:void 0,cv=typeof queueMicrotask=="function"?queueMicrotask:typeof op<"u"?function(e){return op.resolve(null).then(e).catch(dv)}:up;function dv(e){setTimeout(function(){throw e})}function Za(e){return e==="head"}function cp(e,t){var l=t,a=0;do{var i=l.nextSibling;if(e.removeChild(l),i&&i.nodeType===8)if(l=i.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(i),Ms(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Dr(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Dr(l);for(var u=l.firstChild;u;){var f=u.nextSibling,g=u.nodeName;u[mt]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=f}}else l==="body"&&Dr(e.ownerDocument.body);l=i}while(l);Ms(t)}function dp(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 Lc(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":Lc(l),fl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function fv(e,t,l,a){for(;e.nodeType===1;){var i=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[mt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=jl(e.nextSibling),e===null)break}return null}function hv(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=jl(e.nextSibling),e===null))return null;return e}function fp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=jl(e.nextSibling),e===null))return null;return e}function Bc(e){return e.data==="$?"||e.data==="$~"}function Qc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function mv(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 jl(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 Gc=null;function hp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return jl(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function mp(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 pp(e,t,l){switch(t=ou(l),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Dr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);fl(e)}var Nl=new Map,xp=new Set;function cu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var pa=W.d;W.d={f:pv,r:xv,D:gv,C:vv,L:yv,m:bv,X:Nv,S:jv,M:Sv};function pv(){var e=pa.f(),t=tu();return e||t}function xv(e){var t=Fl(e);t!==null&&t.tag===5&&t.type==="form"?Rh(t):pa.r(e)}var Cs=typeof document>"u"?null:document;function gp(e,t,l){var a=Cs;if(a&&typeof t=="string"&&t){var i=ml(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof l=="string"&&(i+='[crossorigin="'+l+'"]'),xp.has(i)||(xp.add(i),e={rel:e,crossOrigin:l,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),kt(t,"link",e),pt(t),a.head.appendChild(t)))}}function gv(e){pa.D(e),gp("dns-prefetch",e,null)}function vv(e,t){pa.C(e,t),gp("preconnect",e,t)}function yv(e,t,l){pa.L(e,t,l);var a=Cs;if(a&&e&&t){var i='link[rel="preload"][as="'+ml(t)+'"]';t==="image"&&l&&l.imageSrcSet?(i+='[imagesrcset="'+ml(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(i+='[imagesizes="'+ml(l.imageSizes)+'"]')):i+='[href="'+ml(e)+'"]';var u=i;switch(t){case"style":u=Ts(e);break;case"script":u=ws(e)}Nl.has(u)||(e=v({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Nl.set(u,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(kr(u))||t==="script"&&a.querySelector(Ur(u))||(t=a.createElement("link"),kt(t,"link",e),pt(t),a.head.appendChild(t)))}}function bv(e,t){pa.m(e,t);var l=Cs;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+ml(a)+'"][href="'+ml(e)+'"]',u=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=ws(e)}if(!Nl.has(u)&&(e=v({rel:"modulepreload",href:e},t),Nl.set(u,e),l.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ur(u)))return}a=l.createElement("link"),kt(a,"link",e),pt(a),l.head.appendChild(a)}}}function jv(e,t,l){pa.S(e,t,l);var a=Cs;if(a&&e){var i=Hl(a).hoistableStyles,u=Ts(e);t=t||"default";var f=i.get(u);if(!f){var g={loading:0,preload:null};if(f=a.querySelector(kr(u)))g.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Nl.get(u))&&Yc(e,l);var N=f=a.createElement("link");pt(N),kt(N,"link",e),N._p=new Promise(function(q,K){N.onload=q,N.onerror=K}),N.addEventListener("load",function(){g.loading|=1}),N.addEventListener("error",function(){g.loading|=2}),g.loading|=4,du(f,t,a)}f={type:"stylesheet",instance:f,count:1,state:g},i.set(u,f)}}}function Nv(e,t){pa.X(e,t);var l=Cs;if(l&&e){var a=Hl(l).hoistableScripts,i=ws(e),u=a.get(i);u||(u=l.querySelector(Ur(i)),u||(e=v({src:e,async:!0},t),(t=Nl.get(i))&&Xc(e,t),u=l.createElement("script"),pt(u),kt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function Sv(e,t){pa.M(e,t);var l=Cs;if(l&&e){var a=Hl(l).hoistableScripts,i=ws(e),u=a.get(i);u||(u=l.querySelector(Ur(i)),u||(e=v({src:e,async:!0,type:"module"},t),(t=Nl.get(i))&&Xc(e,t),u=l.createElement("script"),pt(u),kt(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function vp(e,t,l,a){var i=(i=be.current)?cu(i):null;if(!i)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Ts(l.href),l=Hl(i).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=Ts(l.href);var u=Hl(i).hoistableStyles,f=u.get(e);if(f||(i=i.ownerDocument||i,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,f),(u=i.querySelector(kr(e)))&&!u._p&&(f.instance=u,f.state.loading=5),Nl.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},Nl.set(e,l),u||Ev(i,e,l,f.state))),t&&a===null)throw Error(c(528,""));return f}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ws(l),l=Hl(i).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(c(444,e))}}function Ts(e){return'href="'+ml(e)+'"'}function kr(e){return'link[rel="stylesheet"]['+e+"]"}function yp(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Ev(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}),kt(t,"link",l),pt(t),e.head.appendChild(t))}function ws(e){return'[src="'+ml(e)+'"]'}function Ur(e){return"script[async]"+e}function bp(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+ml(l.href)+'"]');if(a)return t.instance=a,pt(a),a;var i=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),pt(a),kt(a,"style",i),du(a,l.precedence,e),t.instance=a;case"stylesheet":i=Ts(l.href);var u=e.querySelector(kr(i));if(u)return t.state.loading|=4,t.instance=u,pt(u),u;a=yp(l),(i=Nl.get(i))&&Yc(a,i),u=(e.ownerDocument||e).createElement("link"),pt(u);var f=u;return f._p=new Promise(function(g,N){f.onload=g,f.onerror=N}),kt(u,"link",a),t.state.loading|=4,du(u,l.precedence,e),t.instance=u;case"script":return u=ws(l.src),(i=e.querySelector(Ur(u)))?(t.instance=i,pt(i),i):(a=l,(i=Nl.get(u))&&(a=v({},l),Xc(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),pt(i),kt(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,du(a,l.precedence,e));return t.instance}function du(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,u=i,f=0;f<a.length;f++){var g=a[f];if(g.dataset.precedence===t)u=g;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Yc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var fu=null;function jp(e,t,l){if(fu===null){var a=new Map,i=fu=new Map;i.set(l,a)}else i=fu,a=i.get(l),a||(a=new Map,i.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),i=0;i<l.length;i++){var u=l[i];if(!(u[mt]||u[ge]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var f=u.getAttribute(t)||"";f=e+f;var g=a.get(f);g?g.push(u):a.set(f,[u])}}return a}function Np(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Cv(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 Sp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Tv(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var i=Ts(a.href),u=t.querySelector(kr(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=hu.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,pt(u);return}u=t.ownerDocument||t,a=yp(a),(i=Nl.get(i))&&Yc(a,i),u=u.createElement("link"),pt(u);var f=u;f._p=new Promise(function(g,N){f.onload=g,f.onerror=N}),kt(u,"link",a),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=hu.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Vc=0;function wv(e,t){return e.stylesheets&&e.count===0&&pu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Vc===0&&(Vc=62500*iv());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Vc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function hu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mu=null;function pu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mu=new Map,t.forEach(Mv,e),mu=null,hu.call(e))}function Mv(e,t){if(!(t.state.loading&4)){var l=mu.get(e);if(l)var a=l.get(null);else{l=new Map,mu.set(e,l);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var f=i[u];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(l.set(f.dataset.precedence,f),a=f)}a&&l.set(null,a)}i=t.instance,f=i.getAttribute("data-precedence"),u=l.get(f)||a,u===a&&l.set(null,i),l.set(f,i),this.count++,a=hu.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Hr={$$typeof:M,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Ov(e,t,l,a,i,u,f,g,N){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Jn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jn(0),this.hiddenUpdates=Jn(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Ep(e,t,l,a,i,u,f,g,N,q,K,$){return e=new Ov(e,t,l,f,N,q,K,$,g),t=1,u===!0&&(t|=24),u=Pt(3,null,null,t),e.current=u,u.stateNode=e,t=Eo(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:l,cache:t},Mo(u),e}function Cp(e){return e?(e=ns,e):ns}function Tp(e,t,l,a,i,u){i=Cp(i),a.context===null?a.context=i:a.pendingContext=i,a=Ua(t),a.payload={element:l},u=u===void 0?null:u,u!==null&&(a.callback=u),l=Ha(e,a,t),l!==null&&($t(l,e,t),pr(l,e,t))}function wp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Kc(e,t){wp(e,t),(e=e.alternate)&&wp(e,t)}function Mp(e){if(e.tag===13||e.tag===31){var t=vn(e,67108864);t!==null&&$t(t,e,67108864),Kc(e,67108864)}}function Op(e){if(e.tag===13||e.tag===31){var t=nl();t=oe(t);var l=vn(e,t);l!==null&&$t(l,e,t),Kc(e,t)}}var xu=!0;function Av(e,t,l,a){var i=G.T;G.T=null;var u=W.p;try{W.p=2,Zc(e,t,l,a)}finally{W.p=u,G.T=i}}function zv(e,t,l,a){var i=G.T;G.T=null;var u=W.p;try{W.p=8,Zc(e,t,l,a)}finally{W.p=u,G.T=i}}function Zc(e,t,l,a){if(xu){var i=Jc(a);if(i===null)Rc(e,t,a,gu,l),zp(e,a);else if(Rv(i,e,t,l,a))a.stopPropagation();else if(zp(e,a),t&4&&-1<_v.indexOf(e)){for(;i!==null;){var u=Fl(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var f=Jl(u.pendingLanes);if(f!==0){var g=u;for(g.pendingLanes|=2,g.entangledLanes|=2;f;){var N=1<<31-zt(f);g.entanglements[1]|=N,f&=~N}Ql(u),(Ve&6)===0&&(Pi=_e()+500,zr(0))}}break;case 31:case 13:g=vn(u,2),g!==null&&$t(g,u,2),tu(),Kc(u,2)}if(u=Jc(a),u===null&&Rc(e,t,a,gu,l),u===i)break;i=u}i!==null&&a.stopPropagation()}else Rc(e,t,a,null,l)}}function Jc(e){return e=$u(e),$c(e)}var gu=null;function $c(e){if(gu=null,e=Yt(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=m(t),e!==null)return e;e=null}else if(l===31){if(e=x(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 gu=e,null}function Ap(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(Ws()){case Ge:return 2;case ri:return 8;case Yn:case Qu:return 32;case ii:return 268435456;default:return 32}default:return 32}}var Fc=!1,Ja=null,$a=null,Fa=null,qr=new Map,Lr=new Map,Wa=[],_v="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 zp(e,t){switch(e){case"focusin":case"focusout":Ja=null;break;case"dragenter":case"dragleave":$a=null;break;case"mouseover":case"mouseout":Fa=null;break;case"pointerover":case"pointerout":qr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lr.delete(t.pointerId)}}function Br(e,t,l,a,i,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:u,targetContainers:[i]},t!==null&&(t=Fl(t),t!==null&&Mp(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rv(e,t,l,a,i){switch(t){case"focusin":return Ja=Br(Ja,e,t,l,a,i),!0;case"dragenter":return $a=Br($a,e,t,l,a,i),!0;case"mouseover":return Fa=Br(Fa,e,t,l,a,i),!0;case"pointerover":var u=i.pointerId;return qr.set(u,Br(qr.get(u)||null,e,t,l,a,i)),!0;case"gotpointercapture":return u=i.pointerId,Lr.set(u,Br(Lr.get(u)||null,e,t,l,a,i)),!0}return!1}function _p(e){var t=Yt(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=m(l),t!==null){e.blockedOn=t,Ke(e.priority,function(){Op(l)});return}}else if(t===31){if(t=x(l),t!==null){e.blockedOn=t,Ke(e.priority,function(){Op(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 vu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Jc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Ju=a,l.target.dispatchEvent(a),Ju=null}else return t=Fl(l),t!==null&&Mp(t),e.blockedOn=l,!1;t.shift()}return!0}function Rp(e,t,l){vu(e)&&l.delete(t)}function Dv(){Fc=!1,Ja!==null&&vu(Ja)&&(Ja=null),$a!==null&&vu($a)&&($a=null),Fa!==null&&vu(Fa)&&(Fa=null),qr.forEach(Rp),Lr.forEach(Rp)}function yu(e,t){e.blockedOn===t&&(e.blockedOn=null,Fc||(Fc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Dv)))}var bu=null;function Dp(e){bu!==e&&(bu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){bu===e&&(bu=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],i=e[t+2];if(typeof a!="function"){if($c(a||l)===null)continue;break}var u=Fl(l);u!==null&&(e.splice(t,3),t-=3,Jo(u,{pending:!0,data:i,method:l.method,action:a},a,i))}}))}function Ms(e){function t(N){return yu(N,e)}Ja!==null&&yu(Ja,e),$a!==null&&yu($a,e),Fa!==null&&yu(Fa,e),qr.forEach(t),Lr.forEach(t);for(var l=0;l<Wa.length;l++){var a=Wa[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Wa.length&&(l=Wa[0],l.blockedOn===null);)_p(l),l.blockedOn===null&&Wa.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var i=l[a],u=l[a+1],f=i[je]||null;if(typeof u=="function")f||Dp(l);else if(f){var g=null;if(u&&u.hasAttribute("formAction")){if(i=u,f=u[je]||null)g=f.formAction;else if($c(i)!==null)continue}else g=f.action;typeof g=="function"?l[a+1]=g:(l.splice(a,3),a-=3),Dp(l)}}}function kp(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(f){return i=f})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,i=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),i!==null&&(i(),i=null)}}}function Wc(e){this._internalRoot=e}ju.prototype.render=Wc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var l=t.current,a=nl();Tp(l,a,e,t,null,null)},ju.prototype.unmount=Wc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Tp(e.current,2,null,e,null,null),tu(),t[Te]=null}};function ju(e){this._internalRoot=e}ju.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ce();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Wa.length&&t!==0&&t<Wa[l].priority;l++);Wa.splice(l,0,e),l===0&&_p(e)}};var Up=r.version;if(Up!=="19.2.4")throw Error(c(527,Up,"19.2.4"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=y(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var kv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nu.isDisabled&&Nu.supportsFiber)try{dl=Nu.inject(kv),At=Nu}catch{}}return Yr.createRoot=function(e,t){if(!d(e))throw Error(c(299));var l=!1,a="",i=Yh,u=Xh,f=Vh;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=Ep(e,1,!1,null,null,l,a,null,i,u,f,kp),e[Te]=t.current,_c(e),new Wc(t)},Yr.hydrateRoot=function(e,t,l){if(!d(e))throw Error(c(299));var a=!1,i="",u=Yh,f=Xh,g=Vh,N=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(i=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(f=l.onCaughtError),l.onRecoverableError!==void 0&&(g=l.onRecoverableError),l.formState!==void 0&&(N=l.formState)),t=Ep(e,1,!0,t,l??null,a,i,N,u,f,g,kp),t.context=Cp(null),l=t.current,a=nl(),a=oe(a),i=Ua(a),i.callback=null,Ha(l,i,a),l=a,t.current.lanes=l,wa(t,l),Ql(t),e[Te]=t.current,_c(e),new ju(t)},Yr.version="19.2.4",Yr}var Zp;function Zv(){if(Zp)return td.exports;Zp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),td.exports=Kv(),td.exports}var Jv=Zv(),Vs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},$v={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},en,Od,jx,Fv=(jx=class{constructor(){he(this,en,$v);he(this,Od,!1)}setTimeoutProvider(n){ie(this,en,n)}setTimeout(n,r){return S(this,en).setTimeout(n,r)}clearTimeout(n){S(this,en).clearTimeout(n)}setInterval(n,r){return S(this,en).setInterval(n,r)}clearInterval(n){S(this,en).clearInterval(n)}},en=new WeakMap,Od=new WeakMap,jx),zn=new Fv;function Wv(n){setTimeout(n,0)}var Qn=typeof window>"u"||"Deno"in globalThis;function Gt(){}function Iv(n,r){return typeof n=="function"?n(r):n}function cd(n){return typeof n=="number"&&n>=0&&n!==1/0}function _x(n,r){return Math.max(n+(r||0)-Date.now(),0)}function cn(n,r){return typeof n=="function"?n(r):n}function El(n,r){return typeof n=="function"?n(r):n}function Jp(n,r){const{type:o="all",exact:c,fetchStatus:d,predicate:h,queryKey:m,stale:x}=n;if(m){if(c){if(r.queryHash!==zd(m,r.options))return!1}else if(!Zr(r.queryKey,m))return!1}if(o!=="all"){const p=r.isActive();if(o==="active"&&!p||o==="inactive"&&p)return!1}return!(typeof x=="boolean"&&r.isStale()!==x||d&&d!==r.state.fetchStatus||h&&!h(r))}function $p(n,r){const{exact:o,status:c,predicate:d,mutationKey:h}=n;if(h){if(!r.options.mutationKey)return!1;if(o){if(Gn(r.options.mutationKey)!==Gn(h))return!1}else if(!Zr(r.options.mutationKey,h))return!1}return!(c&&r.state.status!==c||d&&!d(r))}function zd(n,r){return((r==null?void 0:r.queryKeyHashFn)||Gn)(n)}function Gn(n){return JSON.stringify(n,(r,o)=>dd(o)?Object.keys(o).sort().reduce((c,d)=>(c[d]=o[d],c),{}):o)}function Zr(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(o=>Zr(n[o],r[o])):!1}var Pv=Object.prototype.hasOwnProperty;function Rx(n,r,o=0){if(n===r)return n;if(o>500)return r;const c=Fp(n)&&Fp(r);if(!c&&!(dd(n)&&dd(r)))return r;const h=(c?n:Object.keys(n)).length,m=c?r:Object.keys(r),x=m.length,p=c?new Array(x):{};let y=0;for(let j=0;j<x;j++){const v=c?j:m[j],T=n[v],E=r[v];if(T===E){p[v]=T,(c?j<h:Pv.call(n,v))&&y++;continue}if(T===null||E===null||typeof T!="object"||typeof E!="object"){p[v]=E;continue}const B=Rx(T,E,o+1);p[v]=B,B===T&&y++}return h===x&&y===h?n:p}function zu(n,r){if(!r||Object.keys(n).length!==Object.keys(r).length)return!1;for(const o in n)if(n[o]!==r[o])return!1;return!0}function Fp(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function dd(n){if(!Wp(n))return!1;const r=n.constructor;if(r===void 0)return!0;const o=r.prototype;return!(!Wp(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Wp(n){return Object.prototype.toString.call(n)==="[object Object]"}function ey(n){return new Promise(r=>{zn.setTimeout(r,n)})}function fd(n,r,o){return typeof o.structuralSharing=="function"?o.structuralSharing(n,r):o.structuralSharing!==!1?Rx(n,r):r}function ty(n,r,o=0){const c=[...n,r];return o&&c.length>o?c.slice(1):c}function ly(n,r,o=0){const c=[r,...n];return o&&c.length>o?c.slice(0,-1):c}var _d=Symbol();function Dx(n,r){return!n.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!n.queryFn||n.queryFn===_d?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Rd(n,r){return typeof n=="function"?n(...r):!!n}function ay(n,r,o){let c=!1,d;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(d??(d=r()),c||(c=!0,d.aborted?o():d.addEventListener("abort",o,{once:!0})),d)}),n}var _n,tn,zs,Nx,ny=(Nx=class extends Vs{constructor(){super();he(this,_n);he(this,tn);he(this,zs);ie(this,zs,r=>{if(!Qn&&window.addEventListener){const o=()=>r();return window.addEventListener("visibilitychange",o,!1),()=>{window.removeEventListener("visibilitychange",o)}}})}onSubscribe(){S(this,tn)||this.setEventListener(S(this,zs))}onUnsubscribe(){var r;this.hasListeners()||((r=S(this,tn))==null||r.call(this),ie(this,tn,void 0))}setEventListener(r){var o;ie(this,zs,r),(o=S(this,tn))==null||o.call(this),ie(this,tn,r(c=>{typeof c=="boolean"?this.setFocused(c):this.onFocus()}))}setFocused(r){S(this,_n)!==r&&(ie(this,_n,r),this.onFocus())}onFocus(){const r=this.isFocused();this.listeners.forEach(o=>{o(r)})}isFocused(){var r;return typeof S(this,_n)=="boolean"?S(this,_n):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},_n=new WeakMap,tn=new WeakMap,zs=new WeakMap,Nx),Dd=new ny;function hd(){let n,r;const o=new Promise((d,h)=>{n=d,r=h});o.status="pending",o.catch(()=>{});function c(d){Object.assign(o,d),delete o.resolve,delete o.reject}return o.resolve=d=>{c({status:"fulfilled",value:d}),n(d)},o.reject=d=>{c({status:"rejected",reason:d}),r(d)},o}var sy=Wv;function ry(){let n=[],r=0,o=x=>{x()},c=x=>{x()},d=sy;const h=x=>{r?n.push(x):d(()=>{o(x)})},m=()=>{const x=n;n=[],x.length&&d(()=>{c(()=>{x.forEach(p=>{o(p)})})})};return{batch:x=>{let p;r++;try{p=x()}finally{r--,r||m()}return p},batchCalls:x=>(...p)=>{h(()=>{x(...p)})},schedule:h,setNotifyFunction:x=>{o=x},setBatchNotifyFunction:x=>{c=x},setScheduler:x=>{d=x}}}var Et=ry(),_s,ln,Rs,Sx,iy=(Sx=class extends Vs{constructor(){super();he(this,_s,!0);he(this,ln);he(this,Rs);ie(this,Rs,r=>{if(!Qn&&window.addEventListener){const o=()=>r(!0),c=()=>r(!1);return window.addEventListener("online",o,!1),window.addEventListener("offline",c,!1),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",c)}}})}onSubscribe(){S(this,ln)||this.setEventListener(S(this,Rs))}onUnsubscribe(){var r;this.hasListeners()||((r=S(this,ln))==null||r.call(this),ie(this,ln,void 0))}setEventListener(r){var o;ie(this,Rs,r),(o=S(this,ln))==null||o.call(this),ie(this,ln,r(this.setOnline.bind(this)))}setOnline(r){S(this,_s)!==r&&(ie(this,_s,r),this.listeners.forEach(c=>{c(r)}))}isOnline(){return S(this,_s)}},_s=new WeakMap,ln=new WeakMap,Rs=new WeakMap,Sx),_u=new iy;function uy(n){return Math.min(1e3*2**n,3e4)}function kx(n){return(n??"online")==="online"?_u.isOnline():!0}var md=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Ux(n){let r=!1,o=0,c;const d=hd(),h=()=>d.status!=="pending",m=L=>{var U;if(!h()){const _=new md(L);T(_),(U=n.onCancel)==null||U.call(n,_)}},x=()=>{r=!0},p=()=>{r=!1},y=()=>Dd.isFocused()&&(n.networkMode==="always"||_u.isOnline())&&n.canRun(),j=()=>kx(n.networkMode)&&n.canRun(),v=L=>{h()||(c==null||c(),d.resolve(L))},T=L=>{h()||(c==null||c(),d.reject(L))},E=()=>new Promise(L=>{var U;c=_=>{(h()||y())&&L(_)},(U=n.onPause)==null||U.call(n)}).then(()=>{var L;c=void 0,h()||(L=n.onContinue)==null||L.call(n)}),B=()=>{if(h())return;let L;const U=o===0?n.initialPromise:void 0;try{L=U??n.fn()}catch(_){L=Promise.reject(_)}Promise.resolve(L).then(v).catch(_=>{var k;if(h())return;const J=n.retry??(Qn?0:3),M=n.retryDelay??uy,D=typeof M=="function"?M(o,_):M,w=J===!0||typeof J=="number"&&o<J||typeof J=="function"&&J(o,_);if(r||!w){T(_);return}o++,(k=n.onFail)==null||k.call(n,o,_),ey(D).then(()=>y()?void 0:E()).then(()=>{r?T(_):B()})})};return{promise:d,status:()=>d.status,cancel:m,continue:()=>(c==null||c(),d),cancelRetry:x,continueRetry:p,canStart:j,start:()=>(j()?B():E().then(B),d)}}var Rn,Ex,Hx=(Ex=class{constructor(){he(this,Rn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cd(this.gcTime)&&ie(this,Rn,zn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Qn?1/0:300*1e3))}clearGcTimeout(){S(this,Rn)&&(zn.clearTimeout(S(this,Rn)),ie(this,Rn,void 0))}},Rn=new WeakMap,Ex),Dn,Ds,Sl,kn,wt,Fr,Un,Al,xa,Cx,oy=(Cx=class extends Hx{constructor(r){super();he(this,Al);he(this,Dn);he(this,Ds);he(this,Sl);he(this,kn);he(this,wt);he(this,Fr);he(this,Un);ie(this,Un,!1),ie(this,Fr,r.defaultOptions),this.setOptions(r.options),this.observers=[],ie(this,kn,r.client),ie(this,Sl,S(this,kn).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,ie(this,Dn,Pp(this.options)),this.state=r.state??S(this,Dn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var r;return(r=S(this,wt))==null?void 0:r.promise}setOptions(r){if(this.options={...S(this,Fr),...r},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const o=Pp(this.options);o.data!==void 0&&(this.setState(Ip(o.data,o.dataUpdatedAt)),ie(this,Dn,o))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Sl).remove(this)}setData(r,o){const c=fd(this.state.data,r,this.options);return ze(this,Al,xa).call(this,{data:c,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt,manual:o==null?void 0:o.manual}),c}setState(r,o){ze(this,Al,xa).call(this,{type:"setState",state:r,setStateOptions:o})}cancel(r){var c,d;const o=(c=S(this,wt))==null?void 0:c.promise;return(d=S(this,wt))==null||d.cancel(r),o?o.then(Gt).catch(Gt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Dn))}isActive(){return this.observers.some(r=>El(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===_d||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>cn(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!_x(this.state.dataUpdatedAt,r)}onFocus(){var o;const r=this.observers.find(c=>c.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(o=S(this,wt))==null||o.continue()}onOnline(){var o;const r=this.observers.find(c=>c.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(o=S(this,wt))==null||o.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),S(this,Sl).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(o=>o!==r),this.observers.length||(S(this,wt)&&(S(this,Un)?S(this,wt).cancel({revert:!0}):S(this,wt).cancelRetry()),this.scheduleGc()),S(this,Sl).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ze(this,Al,xa).call(this,{type:"invalidate"})}async fetch(r,o){var p,y,j,v,T,E,B,L,U,_,J,M;if(this.state.fetchStatus!=="idle"&&((p=S(this,wt))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(o!=null&&o.cancelRefetch))this.cancel({silent:!0});else if(S(this,wt))return S(this,wt).continueRetry(),S(this,wt).promise}if(r&&this.setOptions(r),!this.options.queryFn){const D=this.observers.find(w=>w.options.queryFn);D&&this.setOptions(D.options)}const c=new AbortController,d=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(ie(this,Un,!0),c.signal)})},h=()=>{const D=Dx(this.options,o),k=(()=>{const A={client:S(this,kn),queryKey:this.queryKey,meta:this.meta};return d(A),A})();return ie(this,Un,!1),this.options.persister?this.options.persister(D,k,this):D(k)},x=(()=>{const D={fetchOptions:o,options:this.options,queryKey:this.queryKey,client:S(this,kn),state:this.state,fetchFn:h};return d(D),D})();(y=this.options.behavior)==null||y.onFetch(x,this),ie(this,Ds,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((j=x.fetchOptions)==null?void 0:j.meta))&&ze(this,Al,xa).call(this,{type:"fetch",meta:(v=x.fetchOptions)==null?void 0:v.meta}),ie(this,wt,Ux({initialPromise:o==null?void 0:o.initialPromise,fn:x.fetchFn,onCancel:D=>{D instanceof md&&D.revert&&this.setState({...S(this,Ds),fetchStatus:"idle"}),c.abort()},onFail:(D,w)=>{ze(this,Al,xa).call(this,{type:"failed",failureCount:D,error:w})},onPause:()=>{ze(this,Al,xa).call(this,{type:"pause"})},onContinue:()=>{ze(this,Al,xa).call(this,{type:"continue"})},retry:x.options.retry,retryDelay:x.options.retryDelay,networkMode:x.options.networkMode,canRun:()=>!0}));try{const D=await S(this,wt).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(E=(T=S(this,Sl).config).onSuccess)==null||E.call(T,D,this),(L=(B=S(this,Sl).config).onSettled)==null||L.call(B,D,this.state.error,this),D}catch(D){if(D instanceof md){if(D.silent)return S(this,wt).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw ze(this,Al,xa).call(this,{type:"error",error:D}),(_=(U=S(this,Sl).config).onError)==null||_.call(U,D,this),(M=(J=S(this,Sl).config).onSettled)==null||M.call(J,this.state.data,D,this),D}finally{this.scheduleGc()}}},Dn=new WeakMap,Ds=new WeakMap,Sl=new WeakMap,kn=new WeakMap,wt=new WeakMap,Fr=new WeakMap,Un=new WeakMap,Al=new WeakSet,xa=function(r){const o=c=>{switch(r.type){case"failed":return{...c,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...c,fetchStatus:"paused"};case"continue":return{...c,fetchStatus:"fetching"};case"fetch":return{...c,...qx(c.data,this.options),fetchMeta:r.meta??null};case"success":const d={...c,...Ip(r.data,r.dataUpdatedAt),dataUpdateCount:c.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ie(this,Ds,r.manual?d:void 0),d;case"error":const h=r.error;return{...c,error:h,errorUpdateCount:c.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:c.fetchFailureCount+1,fetchFailureReason:h,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...c,isInvalidated:!0};case"setState":return{...c,...r.state}}};this.state=o(this.state),Et.batch(()=>{this.observers.forEach(c=>{c.onQueryUpdate()}),S(this,Sl).notify({query:this,type:"updated",action:r})})},Cx);function qx(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kx(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Ip(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Pp(n){const r=typeof n.initialData=="function"?n.initialData():n.initialData,o=r!==void 0,c=o?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:o?c??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var Ft,Be,Wr,Qt,Hn,ks,ga,an,Ir,Us,Hs,qn,Ln,nn,qs,Ze,Kr,pd,xd,gd,vd,yd,bd,jd,Lx,Tx,cy=(Tx=class extends Vs{constructor(r,o){super();he(this,Ze);he(this,Ft);he(this,Be);he(this,Wr);he(this,Qt);he(this,Hn);he(this,ks);he(this,ga);he(this,an);he(this,Ir);he(this,Us);he(this,Hs);he(this,qn);he(this,Ln);he(this,nn);he(this,qs,new Set);this.options=o,ie(this,Ft,r),ie(this,an,null),ie(this,ga,hd()),this.bindMethods(),this.setOptions(o)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,Be).addObserver(this),ex(S(this,Be),this.options)?ze(this,Ze,Kr).call(this):this.updateResult(),ze(this,Ze,vd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nd(S(this,Be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nd(S(this,Be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ze(this,Ze,yd).call(this),ze(this,Ze,bd).call(this),S(this,Be).removeObserver(this)}setOptions(r){const o=this.options,c=S(this,Be);if(this.options=S(this,Ft).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof El(this.options.enabled,S(this,Be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ze(this,Ze,jd).call(this),S(this,Be).setOptions(this.options),o._defaulted&&!zu(this.options,o)&&S(this,Ft).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,Be),observer:this});const d=this.hasListeners();d&&tx(S(this,Be),c,this.options,o)&&ze(this,Ze,Kr).call(this),this.updateResult(),d&&(S(this,Be)!==c||El(this.options.enabled,S(this,Be))!==El(o.enabled,S(this,Be))||cn(this.options.staleTime,S(this,Be))!==cn(o.staleTime,S(this,Be)))&&ze(this,Ze,pd).call(this);const h=ze(this,Ze,xd).call(this);d&&(S(this,Be)!==c||El(this.options.enabled,S(this,Be))!==El(o.enabled,S(this,Be))||h!==S(this,nn))&&ze(this,Ze,gd).call(this,h)}getOptimisticResult(r){const o=S(this,Ft).getQueryCache().build(S(this,Ft),r),c=this.createResult(o,r);return fy(this,c)&&(ie(this,Qt,c),ie(this,ks,this.options),ie(this,Hn,S(this,Be).state)),c}getCurrentResult(){return S(this,Qt)}trackResult(r,o){return new Proxy(r,{get:(c,d)=>(this.trackProp(d),o==null||o(d),d==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&S(this,ga).status==="pending"&&S(this,ga).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(c,d))})}trackProp(r){S(this,qs).add(r)}getCurrentQuery(){return S(this,Be)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const o=S(this,Ft).defaultQueryOptions(r),c=S(this,Ft).getQueryCache().build(S(this,Ft),o);return c.fetch().then(()=>this.createResult(c,o))}fetch(r){return ze(this,Ze,Kr).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,Qt)))}createResult(r,o){var R;const c=S(this,Be),d=this.options,h=S(this,Qt),m=S(this,Hn),x=S(this,ks),y=r!==c?r.state:S(this,Wr),{state:j}=r;let v={...j},T=!1,E;if(o._optimisticResults){const F=this.hasListeners(),se=!F&&ex(r,o),I=F&&tx(r,c,o,d);(se||I)&&(v={...v,...qx(j.data,r.options)}),o._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:B,errorUpdatedAt:L,status:U}=v;E=v.data;let _=!1;if(o.placeholderData!==void 0&&E===void 0&&U==="pending"){let F;h!=null&&h.isPlaceholderData&&o.placeholderData===(x==null?void 0:x.placeholderData)?(F=h.data,_=!0):F=typeof o.placeholderData=="function"?o.placeholderData((R=S(this,Hs))==null?void 0:R.state.data,S(this,Hs)):o.placeholderData,F!==void 0&&(U="success",E=fd(h==null?void 0:h.data,F,o),T=!0)}if(o.select&&E!==void 0&&!_)if(h&&E===(m==null?void 0:m.data)&&o.select===S(this,Ir))E=S(this,Us);else try{ie(this,Ir,o.select),E=o.select(E),E=fd(h==null?void 0:h.data,E,o),ie(this,Us,E),ie(this,an,null)}catch(F){ie(this,an,F)}S(this,an)&&(B=S(this,an),E=S(this,Us),L=Date.now(),U="error");const J=v.fetchStatus==="fetching",M=U==="pending",D=U==="error",w=M&&J,k=E!==void 0,Y={status:U,fetchStatus:v.fetchStatus,isPending:M,isSuccess:U==="success",isError:D,isInitialLoading:w,isLoading:w,data:E,dataUpdatedAt:v.dataUpdatedAt,error:B,errorUpdatedAt:L,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>y.dataUpdateCount||v.errorUpdateCount>y.errorUpdateCount,isFetching:J,isRefetching:J&&!M,isLoadingError:D&&!k,isPaused:v.fetchStatus==="paused",isPlaceholderData:T,isRefetchError:D&&k,isStale:kd(r,o),refetch:this.refetch,promise:S(this,ga),isEnabled:El(o.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const F=Y.data!==void 0,se=Y.status==="error"&&!F,I=pe=>{se?pe.reject(Y.error):F&&pe.resolve(Y.data)},re=()=>{const pe=ie(this,ga,Y.promise=hd());I(pe)},ve=S(this,ga);switch(ve.status){case"pending":r.queryHash===c.queryHash&&I(ve);break;case"fulfilled":(se||Y.data!==ve.value)&&re();break;case"rejected":(!se||Y.error!==ve.reason)&&re();break}}return Y}updateResult(){const r=S(this,Qt),o=this.createResult(S(this,Be),this.options);if(ie(this,Hn,S(this,Be).state),ie(this,ks,this.options),S(this,Hn).data!==void 0&&ie(this,Hs,S(this,Be)),zu(o,r))return;ie(this,Qt,o);const c=()=>{if(!r)return!0;const{notifyOnChangeProps:d}=this.options,h=typeof d=="function"?d():d;if(h==="all"||!h&&!S(this,qs).size)return!0;const m=new Set(h??S(this,qs));return this.options.throwOnError&&m.add("error"),Object.keys(S(this,Qt)).some(x=>{const p=x;return S(this,Qt)[p]!==r[p]&&m.has(p)})};ze(this,Ze,Lx).call(this,{listeners:c()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ze(this,Ze,vd).call(this)}},Ft=new WeakMap,Be=new WeakMap,Wr=new WeakMap,Qt=new WeakMap,Hn=new WeakMap,ks=new WeakMap,ga=new WeakMap,an=new WeakMap,Ir=new WeakMap,Us=new WeakMap,Hs=new WeakMap,qn=new WeakMap,Ln=new WeakMap,nn=new WeakMap,qs=new WeakMap,Ze=new WeakSet,Kr=function(r){ze(this,Ze,jd).call(this);let o=S(this,Be).fetch(this.options,r);return r!=null&&r.throwOnError||(o=o.catch(Gt)),o},pd=function(){ze(this,Ze,yd).call(this);const r=cn(this.options.staleTime,S(this,Be));if(Qn||S(this,Qt).isStale||!cd(r))return;const c=_x(S(this,Qt).dataUpdatedAt,r)+1;ie(this,qn,zn.setTimeout(()=>{S(this,Qt).isStale||this.updateResult()},c))},xd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,Be)):this.options.refetchInterval)??!1},gd=function(r){ze(this,Ze,bd).call(this),ie(this,nn,r),!(Qn||El(this.options.enabled,S(this,Be))===!1||!cd(S(this,nn))||S(this,nn)===0)&&ie(this,Ln,zn.setInterval(()=>{(this.options.refetchIntervalInBackground||Dd.isFocused())&&ze(this,Ze,Kr).call(this)},S(this,nn)))},vd=function(){ze(this,Ze,pd).call(this),ze(this,Ze,gd).call(this,ze(this,Ze,xd).call(this))},yd=function(){S(this,qn)&&(zn.clearTimeout(S(this,qn)),ie(this,qn,void 0))},bd=function(){S(this,Ln)&&(zn.clearInterval(S(this,Ln)),ie(this,Ln,void 0))},jd=function(){const r=S(this,Ft).getQueryCache().build(S(this,Ft),this.options);if(r===S(this,Be))return;const o=S(this,Be);ie(this,Be,r),ie(this,Wr,r.state),this.hasListeners()&&(o==null||o.removeObserver(this),r.addObserver(this))},Lx=function(r){Et.batch(()=>{r.listeners&&this.listeners.forEach(o=>{o(S(this,Qt))}),S(this,Ft).getQueryCache().notify({query:S(this,Be),type:"observerResultsUpdated"})})},Tx);function dy(n,r){return El(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&r.retryOnMount===!1)}function ex(n,r){return dy(n,r)||n.state.data!==void 0&&Nd(n,r,r.refetchOnMount)}function Nd(n,r,o){if(El(r.enabled,n)!==!1&&cn(r.staleTime,n)!=="static"){const c=typeof o=="function"?o(n):o;return c==="always"||c!==!1&&kd(n,r)}return!1}function tx(n,r,o,c){return(n!==r||El(c.enabled,n)===!1)&&(!o.suspense||n.state.status!=="error")&&kd(n,o)}function kd(n,r){return El(r.enabled,n)!==!1&&n.isStaleByTime(cn(r.staleTime,n))}function fy(n,r){return!zu(n.getCurrentResult(),r)}function lx(n){return{onFetch:(r,o)=>{var j,v,T,E,B;const c=r.options,d=(T=(v=(j=r.fetchOptions)==null?void 0:j.meta)==null?void 0:v.fetchMore)==null?void 0:T.direction,h=((E=r.state.data)==null?void 0:E.pages)||[],m=((B=r.state.data)==null?void 0:B.pageParams)||[];let x={pages:[],pageParams:[]},p=0;const y=async()=>{let L=!1;const U=M=>{ay(M,()=>r.signal,()=>L=!0)},_=Dx(r.options,r.fetchOptions),J=async(M,D,w)=>{if(L)return Promise.reject();if(D==null&&M.pages.length)return Promise.resolve(M);const A=(()=>{const se={client:r.client,queryKey:r.queryKey,pageParam:D,direction:w?"backward":"forward",meta:r.options.meta};return U(se),se})(),Y=await _(A),{maxPages:R}=r.options,F=w?ly:ty;return{pages:F(M.pages,Y,R),pageParams:F(M.pageParams,D,R)}};if(d&&h.length){const M=d==="backward",D=M?hy:ax,w={pages:h,pageParams:m},k=D(c,w);x=await J(w,k,M)}else{const M=n??h.length;do{const D=p===0?m[0]??c.initialPageParam:ax(c,x);if(p>0&&D==null)break;x=await J(x,D),p++}while(p<M)}return x};r.options.persister?r.fetchFn=()=>{var L,U;return(U=(L=r.options).persister)==null?void 0:U.call(L,y,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},o)}:r.fetchFn=y}}}function ax(n,{pages:r,pageParams:o}){const c=r.length-1;return r.length>0?n.getNextPageParam(r[c],r,o[c],o):void 0}function hy(n,{pages:r,pageParams:o}){var c;return r.length>0?(c=n.getPreviousPageParam)==null?void 0:c.call(n,r[0],r,o[0],o):void 0}var Pr,Yl,qt,Bn,Xl,Pa,wx,my=(wx=class extends Hx{constructor(r){super();he(this,Xl);he(this,Pr);he(this,Yl);he(this,qt);he(this,Bn);ie(this,Pr,r.client),this.mutationId=r.mutationId,ie(this,qt,r.mutationCache),ie(this,Yl,[]),this.state=r.state||Bx(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){S(this,Yl).includes(r)||(S(this,Yl).push(r),this.clearGcTimeout(),S(this,qt).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){ie(this,Yl,S(this,Yl).filter(o=>o!==r)),this.scheduleGc(),S(this,qt).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){S(this,Yl).length||(this.state.status==="pending"?this.scheduleGc():S(this,qt).remove(this))}continue(){var r;return((r=S(this,Bn))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var m,x,p,y,j,v,T,E,B,L,U,_,J,M,D,w,k,A;const o=()=>{ze(this,Xl,Pa).call(this,{type:"continue"})},c={client:S(this,Pr),meta:this.options.meta,mutationKey:this.options.mutationKey};ie(this,Bn,Ux({fn:()=>this.options.mutationFn?this.options.mutationFn(r,c):Promise.reject(new Error("No mutationFn found")),onFail:(Y,R)=>{ze(this,Xl,Pa).call(this,{type:"failed",failureCount:Y,error:R})},onPause:()=>{ze(this,Xl,Pa).call(this,{type:"pause"})},onContinue:o,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,qt).canRun(this)}));const d=this.state.status==="pending",h=!S(this,Bn).canStart();try{if(d)o();else{ze(this,Xl,Pa).call(this,{type:"pending",variables:r,isPaused:h}),S(this,qt).config.onMutate&&await S(this,qt).config.onMutate(r,this,c);const R=await((x=(m=this.options).onMutate)==null?void 0:x.call(m,r,c));R!==this.state.context&&ze(this,Xl,Pa).call(this,{type:"pending",context:R,variables:r,isPaused:h})}const Y=await S(this,Bn).start();return await((y=(p=S(this,qt).config).onSuccess)==null?void 0:y.call(p,Y,r,this.state.context,this,c)),await((v=(j=this.options).onSuccess)==null?void 0:v.call(j,Y,r,this.state.context,c)),await((E=(T=S(this,qt).config).onSettled)==null?void 0:E.call(T,Y,null,this.state.variables,this.state.context,this,c)),await((L=(B=this.options).onSettled)==null?void 0:L.call(B,Y,null,r,this.state.context,c)),ze(this,Xl,Pa).call(this,{type:"success",data:Y}),Y}catch(Y){try{await((_=(U=S(this,qt).config).onError)==null?void 0:_.call(U,Y,r,this.state.context,this,c))}catch(R){Promise.reject(R)}try{await((M=(J=this.options).onError)==null?void 0:M.call(J,Y,r,this.state.context,c))}catch(R){Promise.reject(R)}try{await((w=(D=S(this,qt).config).onSettled)==null?void 0:w.call(D,void 0,Y,this.state.variables,this.state.context,this,c))}catch(R){Promise.reject(R)}try{await((A=(k=this.options).onSettled)==null?void 0:A.call(k,void 0,Y,r,this.state.context,c))}catch(R){Promise.reject(R)}throw ze(this,Xl,Pa).call(this,{type:"error",error:Y}),Y}finally{S(this,qt).runNext(this)}}},Pr=new WeakMap,Yl=new WeakMap,qt=new WeakMap,Bn=new WeakMap,Xl=new WeakSet,Pa=function(r){const o=c=>{switch(r.type){case"failed":return{...c,failureCount:r.failureCount,failureReason:r.error};case"pause":return{...c,isPaused:!0};case"continue":return{...c,isPaused:!1};case"pending":return{...c,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...c,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...c,data:void 0,error:r.error,failureCount:c.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=o(this.state),Et.batch(()=>{S(this,Yl).forEach(c=>{c.onMutationUpdate(r)}),S(this,qt).notify({mutation:this,type:"updated",action:r})})},wx);function Bx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var va,zl,ei,Mx,py=(Mx=class extends Vs{constructor(r={}){super();he(this,va);he(this,zl);he(this,ei);this.config=r,ie(this,va,new Set),ie(this,zl,new Map),ie(this,ei,0)}build(r,o,c){const d=new my({client:r,mutationCache:this,mutationId:++Su(this,ei)._,options:r.defaultMutationOptions(o),state:c});return this.add(d),d}add(r){S(this,va).add(r);const o=Eu(r);if(typeof o=="string"){const c=S(this,zl).get(o);c?c.push(r):S(this,zl).set(o,[r])}this.notify({type:"added",mutation:r})}remove(r){if(S(this,va).delete(r)){const o=Eu(r);if(typeof o=="string"){const c=S(this,zl).get(o);if(c)if(c.length>1){const d=c.indexOf(r);d!==-1&&c.splice(d,1)}else c[0]===r&&S(this,zl).delete(o)}}this.notify({type:"removed",mutation:r})}canRun(r){const o=Eu(r);if(typeof o=="string"){const c=S(this,zl).get(o),d=c==null?void 0:c.find(h=>h.state.status==="pending");return!d||d===r}else return!0}runNext(r){var c;const o=Eu(r);if(typeof o=="string"){const d=(c=S(this,zl).get(o))==null?void 0:c.find(h=>h!==r&&h.state.isPaused);return(d==null?void 0:d.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Et.batch(()=>{S(this,va).forEach(r=>{this.notify({type:"removed",mutation:r})}),S(this,va).clear(),S(this,zl).clear()})}getAll(){return Array.from(S(this,va))}find(r){const o={exact:!0,...r};return this.getAll().find(c=>$p(o,c))}findAll(r={}){return this.getAll().filter(o=>$p(r,o))}notify(r){Et.batch(()=>{this.listeners.forEach(o=>{o(r)})})}resumePausedMutations(){const r=this.getAll().filter(o=>o.state.isPaused);return Et.batch(()=>Promise.all(r.map(o=>o.continue().catch(Gt))))}},va=new WeakMap,zl=new WeakMap,ei=new WeakMap,Mx);function Eu(n){var r;return(r=n.options.scope)==null?void 0:r.id}var ya,sn,Wt,ba,Na,Mu,Sd,Ox,xy=(Ox=class extends Vs{constructor(o,c){super();he(this,Na);he(this,ya);he(this,sn);he(this,Wt);he(this,ba);ie(this,ya,o),this.setOptions(c),this.bindMethods(),ze(this,Na,Mu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(o){var d;const c=this.options;this.options=S(this,ya).defaultMutationOptions(o),zu(this.options,c)||S(this,ya).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,Wt),observer:this}),c!=null&&c.mutationKey&&this.options.mutationKey&&Gn(c.mutationKey)!==Gn(this.options.mutationKey)?this.reset():((d=S(this,Wt))==null?void 0:d.state.status)==="pending"&&S(this,Wt).setOptions(this.options)}onUnsubscribe(){var o;this.hasListeners()||(o=S(this,Wt))==null||o.removeObserver(this)}onMutationUpdate(o){ze(this,Na,Mu).call(this),ze(this,Na,Sd).call(this,o)}getCurrentResult(){return S(this,sn)}reset(){var o;(o=S(this,Wt))==null||o.removeObserver(this),ie(this,Wt,void 0),ze(this,Na,Mu).call(this),ze(this,Na,Sd).call(this)}mutate(o,c){var d;return ie(this,ba,c),(d=S(this,Wt))==null||d.removeObserver(this),ie(this,Wt,S(this,ya).getMutationCache().build(S(this,ya),this.options)),S(this,Wt).addObserver(this),S(this,Wt).execute(o)}},ya=new WeakMap,sn=new WeakMap,Wt=new WeakMap,ba=new WeakMap,Na=new WeakSet,Mu=function(){var c;const o=((c=S(this,Wt))==null?void 0:c.state)??Bx();ie(this,sn,{...o,isPending:o.status==="pending",isSuccess:o.status==="success",isError:o.status==="error",isIdle:o.status==="idle",mutate:this.mutate,reset:this.reset})},Sd=function(o){Et.batch(()=>{var c,d,h,m,x,p,y,j;if(S(this,ba)&&this.hasListeners()){const v=S(this,sn).variables,T=S(this,sn).context,E={client:S(this,ya),meta:this.options.meta,mutationKey:this.options.mutationKey};if((o==null?void 0:o.type)==="success"){try{(d=(c=S(this,ba)).onSuccess)==null||d.call(c,o.data,v,T,E)}catch(B){Promise.reject(B)}try{(m=(h=S(this,ba)).onSettled)==null||m.call(h,o.data,null,v,T,E)}catch(B){Promise.reject(B)}}else if((o==null?void 0:o.type)==="error"){try{(p=(x=S(this,ba)).onError)==null||p.call(x,o.error,v,T,E)}catch(B){Promise.reject(B)}try{(j=(y=S(this,ba)).onSettled)==null||j.call(y,void 0,o.error,v,T,E)}catch(B){Promise.reject(B)}}}this.listeners.forEach(v=>{v(S(this,sn))})})},Ox),Vl,Ax,gy=(Ax=class extends Vs{constructor(r={}){super();he(this,Vl);this.config=r,ie(this,Vl,new Map)}build(r,o,c){const d=o.queryKey,h=o.queryHash??zd(d,o);let m=this.get(h);return m||(m=new oy({client:r,queryKey:d,queryHash:h,options:r.defaultQueryOptions(o),state:c,defaultOptions:r.getQueryDefaults(d)}),this.add(m)),m}add(r){S(this,Vl).has(r.queryHash)||(S(this,Vl).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const o=S(this,Vl).get(r.queryHash);o&&(r.destroy(),o===r&&S(this,Vl).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){Et.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return S(this,Vl).get(r)}getAll(){return[...S(this,Vl).values()]}find(r){const o={exact:!0,...r};return this.getAll().find(c=>Jp(o,c))}findAll(r={}){const o=this.getAll();return Object.keys(r).length>0?o.filter(c=>Jp(r,c)):o}notify(r){Et.batch(()=>{this.listeners.forEach(o=>{o(r)})})}onFocus(){Et.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){Et.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},Vl=new WeakMap,Ax),ot,rn,un,Ls,Bs,on,Qs,Gs,zx,vy=(zx=class{constructor(n={}){he(this,ot);he(this,rn);he(this,un);he(this,Ls);he(this,Bs);he(this,on);he(this,Qs);he(this,Gs);ie(this,ot,n.queryCache||new gy),ie(this,rn,n.mutationCache||new py),ie(this,un,n.defaultOptions||{}),ie(this,Ls,new Map),ie(this,Bs,new Map),ie(this,on,0)}mount(){Su(this,on)._++,S(this,on)===1&&(ie(this,Qs,Dd.subscribe(async n=>{n&&(await this.resumePausedMutations(),S(this,ot).onFocus())})),ie(this,Gs,_u.subscribe(async n=>{n&&(await this.resumePausedMutations(),S(this,ot).onOnline())})))}unmount(){var n,r;Su(this,on)._--,S(this,on)===0&&((n=S(this,Qs))==null||n.call(this),ie(this,Qs,void 0),(r=S(this,Gs))==null||r.call(this),ie(this,Gs,void 0))}isFetching(n){return S(this,ot).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return S(this,rn).findAll({...n,status:"pending"}).length}getQueryData(n){var o;const r=this.defaultQueryOptions({queryKey:n});return(o=S(this,ot).get(r.queryHash))==null?void 0:o.state.data}ensureQueryData(n){const r=this.defaultQueryOptions(n),o=S(this,ot).build(this,r),c=o.state.data;return c===void 0?this.fetchQuery(n):(n.revalidateIfStale&&o.isStaleByTime(cn(r.staleTime,o))&&this.prefetchQuery(r),Promise.resolve(c))}getQueriesData(n){return S(this,ot).findAll(n).map(({queryKey:r,state:o})=>{const c=o.data;return[r,c]})}setQueryData(n,r,o){const c=this.defaultQueryOptions({queryKey:n}),d=S(this,ot).get(c.queryHash),h=d==null?void 0:d.state.data,m=Iv(r,h);if(m!==void 0)return S(this,ot).build(this,c).setData(m,{...o,manual:!0})}setQueriesData(n,r,o){return Et.batch(()=>S(this,ot).findAll(n).map(({queryKey:c})=>[c,this.setQueryData(c,r,o)]))}getQueryState(n){var o;const r=this.defaultQueryOptions({queryKey:n});return(o=S(this,ot).get(r.queryHash))==null?void 0:o.state}removeQueries(n){const r=S(this,ot);Et.batch(()=>{r.findAll(n).forEach(o=>{r.remove(o)})})}resetQueries(n,r){const o=S(this,ot);return Et.batch(()=>(o.findAll(n).forEach(c=>{c.reset()}),this.refetchQueries({type:"active",...n},r)))}cancelQueries(n,r={}){const o={revert:!0,...r},c=Et.batch(()=>S(this,ot).findAll(n).map(d=>d.cancel(o)));return Promise.all(c).then(Gt).catch(Gt)}invalidateQueries(n,r={}){return Et.batch(()=>(S(this,ot).findAll(n).forEach(o=>{o.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},r)))}refetchQueries(n,r={}){const o={...r,cancelRefetch:r.cancelRefetch??!0},c=Et.batch(()=>S(this,ot).findAll(n).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let h=d.fetch(void 0,o);return o.throwOnError||(h=h.catch(Gt)),d.state.fetchStatus==="paused"?Promise.resolve():h}));return Promise.all(c).then(Gt)}fetchQuery(n){const r=this.defaultQueryOptions(n);r.retry===void 0&&(r.retry=!1);const o=S(this,ot).build(this,r);return o.isStaleByTime(cn(r.staleTime,o))?o.fetch(r):Promise.resolve(o.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Gt).catch(Gt)}fetchInfiniteQuery(n){return n.behavior=lx(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Gt).catch(Gt)}ensureInfiniteQueryData(n){return n.behavior=lx(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return _u.isOnline()?S(this,rn).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,ot)}getMutationCache(){return S(this,rn)}getDefaultOptions(){return S(this,un)}setDefaultOptions(n){ie(this,un,n)}setQueryDefaults(n,r){S(this,Ls).set(Gn(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...S(this,Ls).values()],o={};return r.forEach(c=>{Zr(n,c.queryKey)&&Object.assign(o,c.defaultOptions)}),o}setMutationDefaults(n,r){S(this,Bs).set(Gn(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...S(this,Bs).values()],o={};return r.forEach(c=>{Zr(n,c.mutationKey)&&Object.assign(o,c.defaultOptions)}),o}defaultQueryOptions(n){if(n._defaulted)return n;const r={...S(this,un).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return r.queryHash||(r.queryHash=zd(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===_d&&(r.enabled=!1),r}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...S(this,un).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){S(this,ot).clear(),S(this,rn).clear()}},ot=new WeakMap,rn=new WeakMap,un=new WeakMap,Ls=new WeakMap,Bs=new WeakMap,on=new WeakMap,Qs=new WeakMap,Gs=new WeakMap,zx),Qx=b.createContext(void 0),ti=n=>{const r=b.useContext(Qx);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},yy=({client:n,children:r})=>(b.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),s.jsx(Qx.Provider,{value:n,children:r})),Gx=b.createContext(!1),by=()=>b.useContext(Gx);Gx.Provider;function jy(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var Ny=b.createContext(jy()),Sy=()=>b.useContext(Ny),Ey=(n,r,o)=>{const c=o!=null&&o.state.error&&typeof n.throwOnError=="function"?Rd(n.throwOnError,[o.state.error,o]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||c)&&(r.isReset()||(n.retryOnMount=!1))},Cy=n=>{b.useEffect(()=>{n.clearReset()},[n])},Ty=({result:n,errorResetBoundary:r,throwOnError:o,query:c,suspense:d})=>n.isError&&!r.isReset()&&!n.isFetching&&c&&(d&&n.data===void 0||Rd(o,[n.error,c])),wy=n=>{if(n.suspense){const o=d=>d==="static"?d:Math.max(d??1e3,1e3),c=n.staleTime;n.staleTime=typeof c=="function"?(...d)=>o(c(...d)):o(c),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},My=(n,r)=>n.isLoading&&n.isFetching&&!r,Oy=(n,r)=>(n==null?void 0:n.suspense)&&r.isPending,nx=(n,r,o)=>r.fetchOptimistic(n).catch(()=>{o.clearReset()});function Ay(n,r,o){var T,E,B,L;const c=by(),d=Sy(),h=ti(),m=h.defaultQueryOptions(n);(E=(T=h.getDefaultOptions().queries)==null?void 0:T._experimental_beforeQuery)==null||E.call(T,m);const x=h.getQueryCache().get(m.queryHash);m._optimisticResults=c?"isRestoring":"optimistic",wy(m),Ey(m,d,x),Cy(d);const p=!h.getQueryCache().get(m.queryHash),[y]=b.useState(()=>new r(h,m)),j=y.getOptimisticResult(m),v=!c&&n.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(U=>{const _=v?y.subscribe(Et.batchCalls(U)):Gt;return y.updateResult(),_},[y,v]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),b.useEffect(()=>{y.setOptions(m)},[m,y]),Oy(m,j))throw nx(m,y,d);if(Ty({result:j,errorResetBoundary:d,throwOnError:m.throwOnError,query:x,suspense:m.suspense}))throw j.error;if((L=(B=h.getDefaultOptions().queries)==null?void 0:B._experimental_afterQuery)==null||L.call(B,m,j),m.experimental_prefetchInRender&&!Qn&&My(j,c)){const U=p?nx(m,y,d):x==null?void 0:x.promise;U==null||U.catch(Gt).finally(()=>{y.updateResult()})}return m.notifyOnChangeProps?j:y.trackResult(j)}function Cl(n,r){return Ay(n,cy)}function Ed(n,r){const o=ti(),[c]=b.useState(()=>new xy(o,n));b.useEffect(()=>{c.setOptions(n)},[c,n]);const d=b.useSyncExternalStore(b.useCallback(m=>c.subscribe(Et.batchCalls(m)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),h=b.useCallback((m,x)=>{c.mutate(m,x).catch(Gt)},[c]);if(d.error&&Rd(c.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:h,mutateAsync:d.mutate}}const zy=new vy({defaultOptions:{queries:{staleTime:5e3,retry:1}}});/**
50
+ * react-router v7.13.0
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var sx="popstate";function _y(n={}){function r(c,d){let{pathname:h,search:m,hash:x}=c.location;return Cd("",{pathname:h,search:m,hash:x},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function o(c,d){return typeof d=="string"?d:Jr(d)}return Dy(r,o,null,n)}function st(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Rl(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Ry(){return Math.random().toString(36).substring(2,10)}function rx(n,r){return{usr:n.state,key:n.key,idx:r}}function Cd(n,r,o=null,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?Ks(r):r,state:o,key:r&&r.key||c||Ry()}}function Jr({pathname:n="/",search:r="",hash:o=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function Ks(n){let r={};if(n){let o=n.indexOf("#");o>=0&&(r.hash=n.substring(o),n=n.substring(0,o));let c=n.indexOf("?");c>=0&&(r.search=n.substring(c),n=n.substring(0,c)),n&&(r.pathname=n)}return r}function Dy(n,r,o,c={}){let{window:d=document.defaultView,v5Compat:h=!1}=c,m=d.history,x="POP",p=null,y=j();y==null&&(y=0,m.replaceState({...m.state,idx:y},""));function j(){return(m.state||{idx:null}).idx}function v(){x="POP";let U=j(),_=U==null?null:U-y;y=U,p&&p({action:x,location:L.location,delta:_})}function T(U,_){x="PUSH";let J=Cd(L.location,U,_);y=j()+1;let M=rx(J,y),D=L.createHref(J);try{m.pushState(M,"",D)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;d.location.assign(D)}h&&p&&p({action:x,location:L.location,delta:1})}function E(U,_){x="REPLACE";let J=Cd(L.location,U,_);y=j();let M=rx(J,y),D=L.createHref(J);m.replaceState(M,"",D),h&&p&&p({action:x,location:L.location,delta:0})}function B(U){return ky(U)}let L={get action(){return x},get location(){return n(d,m)},listen(U){if(p)throw new Error("A history only accepts one active listener");return d.addEventListener(sx,v),p=U,()=>{d.removeEventListener(sx,v),p=null}},createHref(U){return r(d,U)},createURL:B,encodeLocation(U){let _=B(U);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:T,replace:E,go(U){return m.go(U)}};return L}function ky(n,r=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),st(o,"No window.location.(origin|href) available to create URL");let c=typeof n=="string"?n:Jr(n);return c=c.replace(/ $/,"%20"),!r&&c.startsWith("//")&&(c=o+c),new URL(c,o)}function Yx(n,r,o="/"){return Uy(n,r,o,!1)}function Uy(n,r,o,c){let d=typeof r=="string"?Ks(r):r,h=Sa(d.pathname||"/",o);if(h==null)return null;let m=Xx(n);Hy(m);let x=null;for(let p=0;x==null&&p<m.length;++p){let y=Jy(h);x=Ky(m[p],y,c)}return x}function Xx(n,r=[],o=[],c="",d=!1){let h=(m,x,p=d,y)=>{let j={relativePath:y===void 0?m.path||"":y,caseSensitive:m.caseSensitive===!0,childrenIndex:x,route:m};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(c)&&p)return;st(j.relativePath.startsWith(c),`Absolute route path "${j.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(c.length)}let v=ja([c,j.relativePath]),T=o.concat(j);m.children&&m.children.length>0&&(st(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),Xx(m.children,r,T,v,p)),!(m.path==null&&!m.index)&&r.push({path:v,score:Xy(v,m.index),routesMeta:T})};return n.forEach((m,x)=>{var p;if(m.path===""||!((p=m.path)!=null&&p.includes("?")))h(m,x);else for(let y of Vx(m.path))h(m,x,!0,y)}),r}function Vx(n){let r=n.split("/");if(r.length===0)return[];let[o,...c]=r,d=o.endsWith("?"),h=o.replace(/\?$/,"");if(c.length===0)return d?[h,""]:[h];let m=Vx(c.join("/")),x=[];return x.push(...m.map(p=>p===""?h:[h,p].join("/"))),d&&x.push(...m),x.map(p=>n.startsWith("/")&&p===""?"/":p)}function Hy(n){n.sort((r,o)=>r.score!==o.score?o.score-r.score:Vy(r.routesMeta.map(c=>c.childrenIndex),o.routesMeta.map(c=>c.childrenIndex)))}var qy=/^:[\w-]+$/,Ly=3,By=2,Qy=1,Gy=10,Yy=-2,ix=n=>n==="*";function Xy(n,r){let o=n.split("/"),c=o.length;return o.some(ix)&&(c+=Yy),r&&(c+=By),o.filter(d=>!ix(d)).reduce((d,h)=>d+(qy.test(h)?Ly:h===""?Qy:Gy),c)}function Vy(n,r){return n.length===r.length&&n.slice(0,-1).every((c,d)=>c===r[d])?n[n.length-1]-r[r.length-1]:0}function Ky(n,r,o=!1){let{routesMeta:c}=n,d={},h="/",m=[];for(let x=0;x<c.length;++x){let p=c[x],y=x===c.length-1,j=h==="/"?r:r.slice(h.length)||"/",v=Ru({path:p.relativePath,caseSensitive:p.caseSensitive,end:y},j),T=p.route;if(!v&&y&&o&&!c[c.length-1].route.index&&(v=Ru({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},j)),!v)return null;Object.assign(d,v.params),m.push({params:d,pathname:ja([h,v.pathname]),pathnameBase:Iy(ja([h,v.pathnameBase])),route:T}),v.pathnameBase!=="/"&&(h=ja([h,v.pathnameBase]))}return m}function Ru(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[o,c]=Zy(n.path,n.caseSensitive,n.end),d=r.match(o);if(!d)return null;let h=d[0],m=h.replace(/(.)\/+$/,"$1"),x=d.slice(1);return{params:c.reduce((y,{paramName:j,isOptional:v},T)=>{if(j==="*"){let B=x[T]||"";m=h.slice(0,h.length-B.length).replace(/(.)\/+$/,"$1")}const E=x[T];return v&&!E?y[j]=void 0:y[j]=(E||"").replace(/%2F/g,"/"),y},{}),pathname:h,pathnameBase:m,pattern:n}}function Zy(n,r=!1,o=!0){Rl(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let c=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,x,p)=>(c.push({paramName:x,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(c.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,r?void 0:"i"),c]}function Jy(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Rl(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function Sa(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,c=n.charAt(o);return c&&c!=="/"?null:n.slice(o)||"/"}var $y=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Fy(n,r="/"){let{pathname:o,search:c="",hash:d=""}=typeof n=="string"?Ks(n):n,h;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?h=ux(o.substring(1),"/"):h=ux(o,r)):h=r,{pathname:h,search:Py(c),hash:eb(d)}}function ux(n,r){let o=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(d=>{d===".."?o.length>1&&o.pop():d!=="."&&o.push(d)}),o.length>1?o.join("/"):"/"}function sd(n,r,o,c){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Wy(n){return n.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function Ud(n){let r=Wy(n);return r.map((o,c)=>c===r.length-1?o.pathname:o.pathnameBase)}function Hd(n,r,o,c=!1){let d;typeof n=="string"?d=Ks(n):(d={...n},st(!d.pathname||!d.pathname.includes("?"),sd("?","pathname","search",d)),st(!d.pathname||!d.pathname.includes("#"),sd("#","pathname","hash",d)),st(!d.search||!d.search.includes("#"),sd("#","search","hash",d)));let h=n===""||d.pathname==="",m=h?"/":d.pathname,x;if(m==null)x=o;else{let v=r.length-1;if(!c&&m.startsWith("..")){let T=m.split("/");for(;T[0]==="..";)T.shift(),v-=1;d.pathname=T.join("/")}x=v>=0?r[v]:"/"}let p=Fy(d,x),y=m&&m!=="/"&&m.endsWith("/"),j=(h||m===".")&&o.endsWith("/");return!p.pathname.endsWith("/")&&(y||j)&&(p.pathname+="/"),p}var ja=n=>n.join("/").replace(/\/\/+/g,"/"),Iy=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Py=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,eb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,tb=class{constructor(n,r,o,c=!1){this.status=n,this.statusText=r||"",this.internal=c,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function lb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function ab(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Kx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Zx(n,r){let o=n;if(typeof o!="string"||!$y.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let c=o,d=!1;if(Kx)try{let h=new URL(window.location.href),m=o.startsWith("//")?new URL(h.protocol+o):new URL(o),x=Sa(m.pathname,r);m.origin===h.origin&&x!=null?o=x+m.search+m.hash:d=!0}catch{Rl(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:d,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Jx=["POST","PUT","PATCH","DELETE"];new Set(Jx);var nb=["GET",...Jx];new Set(nb);var Zs=b.createContext(null);Zs.displayName="DataRouter";var Hu=b.createContext(null);Hu.displayName="DataRouterState";var sb=b.createContext(!1),$x=b.createContext({isTransitioning:!1});$x.displayName="ViewTransition";var rb=b.createContext(new Map);rb.displayName="Fetchers";var ib=b.createContext(null);ib.displayName="Await";var ul=b.createContext(null);ul.displayName="Navigation";var li=b.createContext(null);li.displayName="Location";var Zl=b.createContext({outlet:null,matches:[],isDataRoute:!1});Zl.displayName="Route";var qd=b.createContext(null);qd.displayName="RouteError";var Fx="REACT_ROUTER_ERROR",ub="REDIRECT",ob="ROUTE_ERROR_RESPONSE";function cb(n){if(n.startsWith(`${Fx}:${ub}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function db(n){if(n.startsWith(`${Fx}:${ob}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new tb(r.status,r.statusText,r.data)}catch{}}function fb(n,{relative:r}={}){st(Js(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:c}=b.useContext(ul),{hash:d,pathname:h,search:m}=ai(n,{relative:r}),x=h;return o!=="/"&&(x=h==="/"?o:ja([o,h])),c.createHref({pathname:x,search:m,hash:d})}function Js(){return b.useContext(li)!=null}function fn(){return st(Js(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(li).location}var Wx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ix(n){b.useContext(ul).static||b.useLayoutEffect(n)}function Px(){let{isDataRoute:n}=b.useContext(Zl);return n?Cb():hb()}function hb(){st(Js(),"useNavigate() may be used only in the context of a <Router> component.");let n=b.useContext(Zs),{basename:r,navigator:o}=b.useContext(ul),{matches:c}=b.useContext(Zl),{pathname:d}=fn(),h=JSON.stringify(Ud(c)),m=b.useRef(!1);return Ix(()=>{m.current=!0}),b.useCallback((p,y={})=>{if(Rl(m.current,Wx),!m.current)return;if(typeof p=="number"){o.go(p);return}let j=Hd(p,JSON.parse(h),d,y.relative==="path");n==null&&r!=="/"&&(j.pathname=j.pathname==="/"?r:ja([r,j.pathname])),(y.replace?o.replace:o.push)(j,y.state,y)},[r,o,h,d,n])}b.createContext(null);function ai(n,{relative:r}={}){let{matches:o}=b.useContext(Zl),{pathname:c}=fn(),d=JSON.stringify(Ud(o));return b.useMemo(()=>Hd(n,JSON.parse(d),c,r==="path"),[n,d,c,r])}function mb(n,r){return eg(n,r)}function eg(n,r,o,c,d){var J;st(Js(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:h}=b.useContext(ul),{matches:m}=b.useContext(Zl),x=m[m.length-1],p=x?x.params:{},y=x?x.pathname:"/",j=x?x.pathnameBase:"/",v=x&&x.route;{let M=v&&v.path||"";lg(y,!v||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${M}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${M}"> to <Route path="${M==="/"?"*":`${M}/*`}">.`)}let T=fn(),E;if(r){let M=typeof r=="string"?Ks(r):r;st(j==="/"||((J=M.pathname)==null?void 0:J.startsWith(j)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${j}" but pathname "${M.pathname}" was given in the \`location\` prop.`),E=M}else E=T;let B=E.pathname||"/",L=B;if(j!=="/"){let M=j.replace(/^\//,"").split("/");L="/"+B.replace(/^\//,"").split("/").slice(M.length).join("/")}let U=Yx(n,{pathname:L});Rl(v||U!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),Rl(U==null||U[U.length-1].route.element!==void 0||U[U.length-1].route.Component!==void 0||U[U.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=yb(U&&U.map(M=>Object.assign({},M,{params:Object.assign({},p,M.params),pathname:ja([j,h.encodeLocation?h.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?j:ja([j,h.encodeLocation?h.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),m,o,c,d);return r&&_?b.createElement(li.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...E},navigationType:"POP"}},_):_}function pb(){let n=Eb(),r=lb(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),o=n instanceof Error?n.stack:null,c="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:c},h={padding:"2px 4px",backgroundColor:c},m=null;return console.error("Error handled by React Router default ErrorBoundary:",n),m=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:h},"ErrorBoundary")," or"," ",b.createElement("code",{style:h},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},r),o?b.createElement("pre",{style:d},o):null,m)}var xb=b.createElement(pb,null),tg=class extends b.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const o=db(n.digest);o&&(n=o)}let r=n!==void 0?b.createElement(Zl.Provider,{value:this.props.routeContext},b.createElement(qd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?b.createElement(gb,{error:n},r):r}};tg.contextType=sb;var rd=new WeakMap;function gb({children:n,error:r}){let{basename:o}=b.useContext(ul);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let c=cb(r.digest);if(c){let d=rd.get(r);if(d)throw d;let h=Zx(c.location,o);if(Kx&&!rd.get(r))if(h.isExternal||c.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:c.replace}));throw rd.set(r,m),m}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return n}function vb({routeContext:n,match:r,children:o}){let c=b.useContext(Zs);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(Zl.Provider,{value:n},o)}function yb(n,r=[],o=null,c=null,d=null){if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let h=n,m=o==null?void 0:o.errors;if(m!=null){let j=h.findIndex(v=>v.route.id&&(m==null?void 0:m[v.route.id])!==void 0);st(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),h=h.slice(0,Math.min(h.length,j+1))}let x=!1,p=-1;if(o)for(let j=0;j<h.length;j++){let v=h[j];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(p=j),v.route.id){let{loaderData:T,errors:E}=o,B=v.route.loader&&!T.hasOwnProperty(v.route.id)&&(!E||E[v.route.id]===void 0);if(v.route.lazy||B){x=!0,p>=0?h=h.slice(0,p+1):h=[h[0]];break}}}let y=o&&c?(j,v)=>{var T,E;c(j,{location:o.location,params:((E=(T=o.matches)==null?void 0:T[0])==null?void 0:E.params)??{},unstable_pattern:ab(o.matches),errorInfo:v})}:void 0;return h.reduceRight((j,v,T)=>{let E,B=!1,L=null,U=null;o&&(E=m&&v.route.id?m[v.route.id]:void 0,L=v.route.errorElement||xb,x&&(p<0&&T===0?(lg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),B=!0,U=null):p===T&&(B=!0,U=v.route.hydrateFallbackElement||null)));let _=r.concat(h.slice(0,T+1)),J=()=>{let M;return E?M=L:B?M=U:v.route.Component?M=b.createElement(v.route.Component,null):v.route.element?M=v.route.element:M=j,b.createElement(vb,{match:v,routeContext:{outlet:j,matches:_,isDataRoute:o!=null},children:M})};return o&&(v.route.ErrorBoundary||v.route.errorElement||T===0)?b.createElement(tg,{location:o.location,revalidation:o.revalidation,component:L,error:E,children:J(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:y}):J()},null)}function Ld(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function bb(n){let r=b.useContext(Zs);return st(r,Ld(n)),r}function jb(n){let r=b.useContext(Hu);return st(r,Ld(n)),r}function Nb(n){let r=b.useContext(Zl);return st(r,Ld(n)),r}function Bd(n){let r=Nb(n),o=r.matches[r.matches.length-1];return st(o.route.id,`${n} can only be used on routes that contain a unique "id"`),o.route.id}function Sb(){return Bd("useRouteId")}function Eb(){var c;let n=b.useContext(qd),r=jb("useRouteError"),o=Bd("useRouteError");return n!==void 0?n:(c=r.errors)==null?void 0:c[o]}function Cb(){let{router:n}=bb("useNavigate"),r=Bd("useNavigate"),o=b.useRef(!1);return Ix(()=>{o.current=!0}),b.useCallback(async(d,h={})=>{Rl(o.current,Wx),o.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:r,...h}))},[n,r])}var ox={};function lg(n,r,o){!r&&!ox[n]&&(ox[n]=!0,Rl(!1,o))}b.memo(Tb);function Tb({routes:n,future:r,state:o,onError:c}){return eg(n,void 0,o,c,r)}function wb({to:n,replace:r,state:o,relative:c}){st(Js(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=b.useContext(ul);Rl(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:h}=b.useContext(Zl),{pathname:m}=fn(),x=Px(),p=Hd(n,Ud(h),m,c==="path"),y=JSON.stringify(p);return b.useEffect(()=>{x(JSON.parse(y),{replace:r,state:o,relative:c})},[x,y,c,r,o]),null}function Gl(n){st(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Mb({basename:n="/",children:r=null,location:o,navigationType:c="POP",navigator:d,static:h=!1,unstable_useTransitions:m}){st(!Js(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let x=n.replace(/^\/*/,"/"),p=b.useMemo(()=>({basename:x,navigator:d,static:h,unstable_useTransitions:m,future:{}}),[x,d,h,m]);typeof o=="string"&&(o=Ks(o));let{pathname:y="/",search:j="",hash:v="",state:T=null,key:E="default"}=o,B=b.useMemo(()=>{let L=Sa(y,x);return L==null?null:{location:{pathname:L,search:j,hash:v,state:T,key:E},navigationType:c}},[x,y,j,v,T,E,c]);return Rl(B!=null,`<Router basename="${x}"> is not able to match the URL "${y}${j}${v}" because it does not start with the basename, so the <Router> won't render anything.`),B==null?null:b.createElement(ul.Provider,{value:p},b.createElement(li.Provider,{children:r,value:B}))}function Ob({children:n,location:r}){return mb(Td(n),r)}function Td(n,r=[]){let o=[];return b.Children.forEach(n,(c,d)=>{if(!b.isValidElement(c))return;let h=[...r,d];if(c.type===b.Fragment){o.push.apply(o,Td(c.props.children,h));return}st(c.type===Gl,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),st(!c.props.index||!c.props.children,"An index route cannot have child routes.");let m={id:c.props.id||h.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(m.children=Td(c.props.children,h)),o.push(m)}),o}var Ou="get",Au="application/x-www-form-urlencoded";function qu(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Ab(n){return qu(n)&&n.tagName.toLowerCase()==="button"}function zb(n){return qu(n)&&n.tagName.toLowerCase()==="form"}function _b(n){return qu(n)&&n.tagName.toLowerCase()==="input"}function Rb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Db(n,r){return n.button===0&&(!r||r==="_self")&&!Rb(n)}var Cu=null;function kb(){if(Cu===null)try{new FormData(document.createElement("form"),0),Cu=!1}catch{Cu=!0}return Cu}var Ub=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function id(n){return n!=null&&!Ub.has(n)?(Rl(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Au}"`),null):n}function Hb(n,r){let o,c,d,h,m;if(zb(n)){let x=n.getAttribute("action");c=x?Sa(x,r):null,o=n.getAttribute("method")||Ou,d=id(n.getAttribute("enctype"))||Au,h=new FormData(n)}else if(Ab(n)||_b(n)&&(n.type==="submit"||n.type==="image")){let x=n.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||x.getAttribute("action");if(c=p?Sa(p,r):null,o=n.getAttribute("formmethod")||x.getAttribute("method")||Ou,d=id(n.getAttribute("formenctype"))||id(x.getAttribute("enctype"))||Au,h=new FormData(x,n),!kb()){let{name:y,type:j,value:v}=n;if(j==="image"){let T=y?`${y}.`:"";h.append(`${T}x`,"0"),h.append(`${T}y`,"0")}else y&&h.append(y,v)}}else{if(qu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Ou,c=null,d=Au,m=n}return h&&d==="text/plain"&&(m=h,h=void 0),{action:c,method:o.toLowerCase(),encType:d,formData:h,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Qd(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function qb(n,r,o,c){let d=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return o?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${c}`:d.pathname=`${d.pathname}.${c}`:d.pathname==="/"?d.pathname=`_root.${c}`:r&&Sa(d.pathname,r)==="/"?d.pathname=`${r.replace(/\/$/,"")}/_root.${c}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${c}`,d}async function Lb(n,r){if(n.id in r)return r[n.id];try{let o=await import(n.module);return r[n.id]=o,o}catch(o){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Bb(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Qb(n,r,o){let c=await Promise.all(n.map(async d=>{let h=r.routes[d.route.id];if(h){let m=await Lb(h,o);return m.links?m.links():[]}return[]}));return Vb(c.flat(1).filter(Bb).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function cx(n,r,o,c,d,h){let m=(p,y)=>o[y]?p.route.id!==o[y].route.id:!0,x=(p,y)=>{var j;return o[y].pathname!==p.pathname||((j=o[y].route.path)==null?void 0:j.endsWith("*"))&&o[y].params["*"]!==p.params["*"]};return h==="assets"?r.filter((p,y)=>m(p,y)||x(p,y)):h==="data"?r.filter((p,y)=>{var v;let j=c.routes[p.route.id];if(!j||!j.hasLoader)return!1;if(m(p,y)||x(p,y))return!0;if(p.route.shouldRevalidate){let T=p.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((v=o[0])==null?void 0:v.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof T=="boolean")return T}return!0}):[]}function Gb(n,r,{includeHydrateFallback:o}={}){return Yb(n.map(c=>{let d=r.routes[c.route.id];if(!d)return[];let h=[d.module];return d.clientActionModule&&(h=h.concat(d.clientActionModule)),d.clientLoaderModule&&(h=h.concat(d.clientLoaderModule)),o&&d.hydrateFallbackModule&&(h=h.concat(d.hydrateFallbackModule)),d.imports&&(h=h.concat(d.imports)),h}).flat(1))}function Yb(n){return[...new Set(n)]}function Xb(n){let r={},o=Object.keys(n).sort();for(let c of o)r[c]=n[c];return r}function Vb(n,r){let o=new Set;return new Set(r),n.reduce((c,d)=>{let h=JSON.stringify(Xb(d));return o.has(h)||(o.add(h),c.push({key:h,link:d})),c},[])}function ag(){let n=b.useContext(Zs);return Qd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Kb(){let n=b.useContext(Hu);return Qd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Gd=b.createContext(void 0);Gd.displayName="FrameworkContext";function ng(){let n=b.useContext(Gd);return Qd(n,"You must render this element inside a <HydratedRouter> element"),n}function Zb(n,r){let o=b.useContext(Gd),[c,d]=b.useState(!1),[h,m]=b.useState(!1),{onFocus:x,onBlur:p,onMouseEnter:y,onMouseLeave:j,onTouchStart:v}=r,T=b.useRef(null);b.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let L=_=>{_.forEach(J=>{m(J.isIntersecting)})},U=new IntersectionObserver(L,{threshold:.5});return T.current&&U.observe(T.current),()=>{U.disconnect()}}},[n]),b.useEffect(()=>{if(c){let L=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(L)}}},[c]);let E=()=>{d(!0)},B=()=>{d(!1),m(!1)};return o?n!=="intent"?[h,T,{}]:[h,T,{onFocus:Xr(x,E),onBlur:Xr(p,B),onMouseEnter:Xr(y,E),onMouseLeave:Xr(j,B),onTouchStart:Xr(v,E)}]:[!1,T,{}]}function Xr(n,r){return o=>{n&&n(o),o.defaultPrevented||r(o)}}function Jb({page:n,...r}){let{router:o}=ag(),c=b.useMemo(()=>Yx(o.routes,n,o.basename),[o.routes,n,o.basename]);return c?b.createElement(Fb,{page:n,matches:c,...r}):null}function $b(n){let{manifest:r,routeModules:o}=ng(),[c,d]=b.useState([]);return b.useEffect(()=>{let h=!1;return Qb(n,r,o).then(m=>{h||d(m)}),()=>{h=!0}},[n,r,o]),c}function Fb({page:n,matches:r,...o}){let c=fn(),{future:d,manifest:h,routeModules:m}=ng(),{basename:x}=ag(),{loaderData:p,matches:y}=Kb(),j=b.useMemo(()=>cx(n,r,y,h,c,"data"),[n,r,y,h,c]),v=b.useMemo(()=>cx(n,r,y,h,c,"assets"),[n,r,y,h,c]),T=b.useMemo(()=>{if(n===c.pathname+c.search+c.hash)return[];let L=new Set,U=!1;if(r.forEach(J=>{var D;let M=h.routes[J.route.id];!M||!M.hasLoader||(!j.some(w=>w.route.id===J.route.id)&&J.route.id in p&&((D=m[J.route.id])!=null&&D.shouldRevalidate)||M.hasClientLoader?U=!0:L.add(J.route.id))}),L.size===0)return[];let _=qb(n,x,d.unstable_trailingSlashAwareDataRequests,"data");return U&&L.size>0&&_.searchParams.set("_routes",r.filter(J=>L.has(J.route.id)).map(J=>J.route.id).join(",")),[_.pathname+_.search]},[x,d.unstable_trailingSlashAwareDataRequests,p,c,h,j,r,n,m]),E=b.useMemo(()=>Gb(v,h),[v,h]),B=$b(v);return b.createElement(b.Fragment,null,T.map(L=>b.createElement("link",{key:L,rel:"prefetch",as:"fetch",href:L,...o})),E.map(L=>b.createElement("link",{key:L,rel:"modulepreload",href:L,...o})),B.map(({key:L,link:U})=>b.createElement("link",{key:L,nonce:o.nonce,...U,crossOrigin:U.crossOrigin??o.crossOrigin})))}function Wb(...n){return r=>{n.forEach(o=>{typeof o=="function"?o(r):o!=null&&(o.current=r)})}}var Ib=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ib&&(window.__reactRouterVersion="7.13.0")}catch{}function Pb({basename:n,children:r,unstable_useTransitions:o,window:c}){let d=b.useRef();d.current==null&&(d.current=_y({window:c,v5Compat:!0}));let h=d.current,[m,x]=b.useState({action:h.action,location:h.location}),p=b.useCallback(y=>{o===!1?x(y):b.startTransition(()=>x(y))},[o]);return b.useLayoutEffect(()=>h.listen(p),[h,p]),b.createElement(Mb,{basename:n,children:r,location:m.location,navigationType:m.action,navigator:h,unstable_useTransitions:o})}var sg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rg=b.forwardRef(function({onClick:r,discover:o="render",prefetch:c="none",relative:d,reloadDocument:h,replace:m,state:x,target:p,to:y,preventScrollReset:j,viewTransition:v,unstable_defaultShouldRevalidate:T,...E},B){let{basename:L,unstable_useTransitions:U}=b.useContext(ul),_=typeof y=="string"&&sg.test(y),J=Zx(y,L);y=J.to;let M=fb(y,{relative:d}),[D,w,k]=Zb(c,E),A=l1(y,{replace:m,state:x,target:p,preventScrollReset:j,relative:d,viewTransition:v,unstable_defaultShouldRevalidate:T,unstable_useTransitions:U});function Y(F){r&&r(F),F.defaultPrevented||A(F)}let R=b.createElement("a",{...E,...k,href:J.absoluteURL||M,onClick:J.isExternal||h?r:Y,ref:Wb(B,w),target:p,"data-discover":!_&&o==="render"?"true":void 0});return D&&!_?b.createElement(b.Fragment,null,R,b.createElement(Jb,{page:M})):R});rg.displayName="Link";var ig=b.forwardRef(function({"aria-current":r="page",caseSensitive:o=!1,className:c="",end:d=!1,style:h,to:m,viewTransition:x,children:p,...y},j){let v=ai(m,{relative:y.relative}),T=fn(),E=b.useContext(Hu),{navigator:B,basename:L}=b.useContext(ul),U=E!=null&&i1(v)&&x===!0,_=B.encodeLocation?B.encodeLocation(v).pathname:v.pathname,J=T.pathname,M=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;o||(J=J.toLowerCase(),M=M?M.toLowerCase():null,_=_.toLowerCase()),M&&L&&(M=Sa(M,L)||M);const D=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let w=J===_||!d&&J.startsWith(_)&&J.charAt(D)==="/",k=M!=null&&(M===_||!d&&M.startsWith(_)&&M.charAt(_.length)==="/"),A={isActive:w,isPending:k,isTransitioning:U},Y=w?r:void 0,R;typeof c=="function"?R=c(A):R=[c,w?"active":null,k?"pending":null,U?"transitioning":null].filter(Boolean).join(" ");let F=typeof h=="function"?h(A):h;return b.createElement(rg,{...y,"aria-current":Y,className:R,ref:j,style:F,to:m,viewTransition:x},typeof p=="function"?p(A):p)});ig.displayName="NavLink";var e1=b.forwardRef(({discover:n="render",fetcherKey:r,navigate:o,reloadDocument:c,replace:d,state:h,method:m=Ou,action:x,onSubmit:p,relative:y,preventScrollReset:j,viewTransition:v,unstable_defaultShouldRevalidate:T,...E},B)=>{let{unstable_useTransitions:L}=b.useContext(ul),U=s1(),_=r1(x,{relative:y}),J=m.toLowerCase()==="get"?"get":"post",M=typeof x=="string"&&sg.test(x),D=w=>{if(p&&p(w),w.defaultPrevented)return;w.preventDefault();let k=w.nativeEvent.submitter,A=(k==null?void 0:k.getAttribute("formmethod"))||m,Y=()=>U(k||w.currentTarget,{fetcherKey:r,method:A,navigate:o,replace:d,state:h,relative:y,preventScrollReset:j,viewTransition:v,unstable_defaultShouldRevalidate:T});L&&o!==!1?b.startTransition(()=>Y()):Y()};return b.createElement("form",{ref:B,method:J,action:_,onSubmit:c?p:D,...E,"data-discover":!M&&n==="render"?"true":void 0})});e1.displayName="Form";function t1(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ug(n){let r=b.useContext(Zs);return st(r,t1(n)),r}function l1(n,{target:r,replace:o,state:c,preventScrollReset:d,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:x,unstable_useTransitions:p}={}){let y=Px(),j=fn(),v=ai(n,{relative:h});return b.useCallback(T=>{if(Db(T,r)){T.preventDefault();let E=o!==void 0?o:Jr(j)===Jr(v),B=()=>y(n,{replace:E,state:c,preventScrollReset:d,relative:h,viewTransition:m,unstable_defaultShouldRevalidate:x});p?b.startTransition(()=>B()):B()}},[j,y,v,o,c,r,n,d,h,m,x,p])}var a1=0,n1=()=>`__${String(++a1)}__`;function s1(){let{router:n}=ug("useSubmit"),{basename:r}=b.useContext(ul),o=Sb(),c=n.fetch,d=n.navigate;return b.useCallback(async(h,m={})=>{let{action:x,method:p,encType:y,formData:j,body:v}=Hb(h,r);if(m.navigate===!1){let T=m.fetcherKey||n1();await c(T,o,m.action||x,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:j,body:v,formMethod:m.method||p,formEncType:m.encType||y,flushSync:m.flushSync})}else await d(m.action||x,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:j,body:v,formMethod:m.method||p,formEncType:m.encType||y,replace:m.replace,state:m.state,fromRouteId:o,flushSync:m.flushSync,viewTransition:m.viewTransition})},[c,d,r,o])}function r1(n,{relative:r}={}){let{basename:o}=b.useContext(ul),c=b.useContext(Zl);st(c,"useFormAction must be used inside a RouteContext");let[d]=c.matches.slice(-1),h={...ai(n||".",{relative:r})},m=fn();if(n==null){h.search=m.search;let x=new URLSearchParams(h.search),p=x.getAll("index");if(p.some(j=>j==="")){x.delete("index"),p.filter(v=>v).forEach(v=>x.append("index",v));let j=x.toString();h.search=j?`?${j}`:""}}return(!n||n===".")&&d.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(h.pathname=h.pathname==="/"?o:ja([o,h.pathname])),Jr(h)}function i1(n,{relative:r}={}){let o=b.useContext($x);st(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=ug("useViewTransitionState"),d=ai(n,{relative:r});if(!o.isTransitioning)return!1;let h=Sa(o.currentLocation.pathname,c)||o.currentLocation.pathname,m=Sa(o.nextLocation.pathname,c)||o.nextLocation.pathname;return Ru(d.pathname,m)!=null||Ru(d.pathname,h)!=null}/**
61
+ * @license lucide-react v0.474.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const u1=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),og=(...n)=>n.filter((r,o,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===o).join(" ").trim();/**
66
+ * @license lucide-react v0.474.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */var o1={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"};/**
71
+ * @license lucide-react v0.474.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const c1=b.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:d="",children:h,iconNode:m,...x},p)=>b.createElement("svg",{ref:p,...o1,width:r,height:r,stroke:n,strokeWidth:c?Number(o)*24/Number(r):o,className:og("lucide",d),...x},[...m.map(([y,j])=>b.createElement(y,j)),...Array.isArray(h)?h:[h]]));/**
76
+ * @license lucide-react v0.474.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const Pe=(n,r)=>{const o=b.forwardRef(({className:c,...d},h)=>b.createElement(c1,{ref:h,iconNode:r,className:og(`lucide-${u1(n)}`,c),...d}));return o.displayName=`${n}`,o};/**
81
+ * @license lucide-react v0.474.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const d1=[["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"}]],cg=Pe("Activity",d1);/**
86
+ * @license lucide-react v0.474.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const f1=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],h1=Pe("ArrowLeftRight",f1);/**
91
+ * @license lucide-react v0.474.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const m1=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],p1=Pe("ArrowLeft",m1);/**
96
+ * @license lucide-react v0.474.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const x1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],$r=Pe("ArrowRight",x1);/**
101
+ * @license lucide-react v0.474.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const g1=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],dg=Pe("Brain",g1);/**
106
+ * @license lucide-react v0.474.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const v1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],y1=Pe("Check",v1);/**
111
+ * @license lucide-react v0.474.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const b1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ys=Pe("ChevronDown",b1);/**
116
+ * @license lucide-react v0.474.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const j1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],N1=Pe("ChevronLeft",j1);/**
121
+ * @license lucide-react v0.474.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const S1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Kl=Pe("ChevronRight",S1);/**
126
+ * @license lucide-react v0.474.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const E1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],C1=Pe("ChevronUp",E1);/**
131
+ * @license lucide-react v0.474.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const T1=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],fg=Pe("ChevronsDownUp",T1);/**
136
+ * @license lucide-react v0.474.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const w1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],hg=Pe("ChevronsUpDown",w1);/**
141
+ * @license lucide-react v0.474.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const M1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],dx=Pe("Clock",M1);/**
146
+ * @license lucide-react v0.474.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const O1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],A1=Pe("Copy",O1);/**
151
+ * @license lucide-react v0.474.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const z1=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],mg=Pe("DollarSign",z1);/**
156
+ * @license lucide-react v0.474.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const _1=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],As=Pe("FlaskConical",_1);/**
161
+ * @license lucide-react v0.474.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const R1=[["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:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Yd=Pe("Layers",R1);/**
166
+ * @license lucide-react v0.474.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const D1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],k1=Pe("LoaderCircle",D1);/**
171
+ * @license lucide-react v0.474.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const U1=[["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"}]],pg=Pe("MessageSquare",U1);/**
176
+ * @license lucide-react v0.474.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const H1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],q1=Pe("Pencil",H1);/**
181
+ * @license lucide-react v0.474.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const L1=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Xd=Pe("Play",L1);/**
186
+ * @license lucide-react v0.474.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const B1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Q1=Pe("Plus",B1);/**
191
+ * @license lucide-react v0.474.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const G1=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Y1=Pe("Search",G1);/**
196
+ * @license lucide-react v0.474.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const X1=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],V1=Pe("Send",X1);/**
201
+ * @license lucide-react v0.474.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const K1=[["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:"m9 12 2 2 4-4",key:"dzmm74"}]],Z1=Pe("ShieldCheck",K1);/**
206
+ * @license lucide-react v0.474.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const J1=[["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"}]],xg=Pe("Trash2",J1);/**
211
+ * @license lucide-react v0.474.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const $1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],gg=Pe("Users",$1);/**
216
+ * @license lucide-react v0.474.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const F1=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],vg=Pe("Wrench",F1);function ne(...n){return n.filter(Boolean).join(" ")}function dt(n){return n===0?"$0.00":n<.01?`$${n.toFixed(4)}`:`$${n.toFixed(2)}`}function ft(n){return n<1e3?`${Math.round(n)}ms`:n<6e4?`${(n/1e3).toFixed(1)}s`:`${(n/6e4).toFixed(1)}m`}function _l(n){return n.toLocaleString()}function ni(n,r=80){const o=c=>c.length<=r?c:c.slice(0,r-3)+"…";if(typeof n=="string")return o(n);if(typeof n=="object"&&n!==null&&!Array.isArray(n)){const c=n;for(const d of["question","prompt","text","input","query","message","content","name","title"])if(typeof c[d]=="string"&&c[d].length>0)return o(c[d]);for(const d of Object.values(c))if(typeof d=="string"&&d.length>0)return o(d)}return o(JSON.stringify(n))}function W1(n){switch(n){case"running":return"text-blue-500";case"completed":return"text-green-500";case"failed":return"text-red-500";case"waiting":return"text-amber-500";default:return"text-gray-500"}}const I1=[{to:"/playground",label:"Playground",icon:pg},{to:"/workflows",label:"Workflows",icon:Xd},{to:"/traces",label:"Traces",icon:cg},{to:"/costs",label:"Costs",icon:mg},{to:"/memory",label:"Memory",icon:dg},{to:"/sessions",label:"Sessions",icon:gg},{to:"/tools",label:"Tools",icon:vg},{to:"/evals",label:"Evals",icon:As}];function P1(){return s.jsxs("aside",{className:"w-56 border-r border-[hsl(var(--border))] bg-[hsl(var(--card))] flex flex-col h-screen",children:[s.jsx("div",{className:"p-4 border-b border-[hsl(var(--border))]",children:s.jsx("h1",{className:"text-lg font-semibold tracking-tight",children:"Axl Studio"})}),s.jsx("nav",{className:"flex-1 p-2 space-y-0.5",children:I1.map(({to:n,label:r,icon:o})=>s.jsxs(ig,{to:n,className:({isActive:c})=>ne("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm transition-colors",c?"bg-[hsl(var(--accent))] text-[hsl(var(--accent-foreground))] font-medium":"text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))]"),children:[s.jsx(o,{size:16}),r]},n))}),s.jsx("div",{className:"p-4 border-t border-[hsl(var(--border))] text-xs text-[hsl(var(--muted-foreground))]",children:"@axlsdk/studio"})]})}function Xs({title:n,description:r,actions:o,children:c}){return s.jsxs("div",{className:"flex flex-col h-screen",children:[s.jsxs("header",{className:"flex items-center justify-between px-6 py-4 border-b border-[hsl(var(--border))]",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-semibold",children:n}),r&&s.jsx("p",{className:"text-sm text-[hsl(var(--muted-foreground))] mt-0.5",children:r})]}),o&&s.jsx("div",{className:"flex items-center gap-2",children:o})]}),s.jsx("main",{className:"flex-1 overflow-auto p-6",children:c})]})}function rl({title:n,description:r,icon:o}){return s.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[o&&s.jsx("div",{className:"mb-3 text-[hsl(var(--muted-foreground))]",children:o}),s.jsx("h3",{className:"text-sm font-medium text-[hsl(var(--foreground))]",children:n}),r&&s.jsx("p",{className:"text-sm text-[hsl(var(--muted-foreground))] mt-1 max-w-sm",children:r})]})}function ej({text:n,className:r}){return s.jsxs("div",{className:`whitespace-pre-wrap ${r??""}`,children:[n,s.jsx("span",{className:"animate-pulse",children:"|"})]})}function yg(n){if(n==null)return"null";if(Array.isArray(n))return"array";const r=typeof n;return r==="object"?"object":r==="number"?"number":r==="boolean"?"boolean":"string"}function tj(n,r){if(r==="array"){const o=n;return o.length===0?"[]":`[${o.length}]`}if(r==="object"){const o=Object.keys(n);return o.length===0?"{}":o.length<=4?`{ ${o.join(", ")} }`:`{ ${o.slice(0,3).join(", ")}, …${o.length-3} more }`}return""}function lj(n,r){return r==="array"?n.map((o,c)=>[c,o]):r==="object"?Object.entries(n):[]}const sl={key:"text-[hsl(var(--foreground))]",string:"text-emerald-700 dark:text-emerald-400",number:"text-blue-600 dark:text-blue-400",boolean:"text-amber-600 dark:text-amber-400",null:"text-[hsl(var(--muted-foreground))] italic",punct:"text-[hsl(var(--muted-foreground))]"},Vr="w-3.5 shrink-0 flex items-center justify-center pt-0.5",bg="inline-flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-md border border-[hsl(var(--border))] text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer";function aj({text:n}){const[r,o]=b.useState(!1),c=b.useRef(void 0);b.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]);const d=b.useCallback(h=>{h.stopPropagation(),navigator.clipboard.writeText(n),o(!0),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>o(!1),2e3)},[n]);return s.jsxs("button",{onClick:d,className:bg,children:[r?s.jsx(y1,{size:10,className:"text-emerald-500"}):s.jsx(A1,{size:10}),r?"Copied":"Copy"]})}function nj({value:n,type:r}){if(r==="null")return s.jsx("span",{className:sl.null,children:"null"});if(r==="boolean")return s.jsx("span",{className:sl.boolean,children:String(n)});if(r==="number")return s.jsx("span",{className:sl.number,children:String(n)});if(r==="string"){const o=n;return o.includes(`
221
+ `)&&o.length>80?s.jsxs("span",{className:sl.string,children:['"',o,'"']}):s.jsxs("span",{className:sl.string,children:['"',o,'"']})}return null}const Tu=100,sj=b.memo(function n({value:r,label:o,depth:c,expandDepth:d,isLast:h}){const m=yg(r),x=m==="object"||m==="array",[p,y]=b.useState(c<d),[j,v]=b.useState(!1),T=h?"":",",E=o!=null?typeof o=="number"?s.jsxs("span",{className:sl.punct,children:[o,": "]}):s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:sl.key,children:['"',o,'"']}),s.jsx("span",{className:sl.punct,children:": "})]}):null;if(!x)return s.jsxs("div",{className:"flex items-start leading-relaxed hover:bg-[hsl(var(--accent))]/40 rounded",children:[s.jsx("span",{className:Vr}),s.jsxs("span",{children:[E,s.jsx(nj,{value:r,type:m}),s.jsx("span",{className:sl.punct,children:T})]})]});const B=lj(r,m),L=m==="array"?"[":"{",U=m==="array"?"]":"}";return B.length===0?s.jsxs("div",{className:"flex items-start leading-relaxed",children:[s.jsx("span",{className:Vr}),s.jsxs("span",{children:[E,s.jsxs("span",{className:sl.punct,children:[L,U,T]})]})]}):s.jsxs("div",{children:[s.jsxs("div",{className:ne("flex items-start leading-relaxed hover:bg-[hsl(var(--accent))]/40 rounded cursor-pointer",p&&"hidden"),onClick:()=>y(!0),children:[s.jsx("span",{className:Vr,children:s.jsx(Kl,{size:10,className:"text-[hsl(var(--muted-foreground))]"})}),s.jsxs("span",{children:[E,s.jsxs("span",{className:sl.punct,children:[tj(r,m),T]})]})]}),s.jsxs("div",{className:ne(!p&&"hidden"),children:[s.jsxs("div",{className:"flex items-start leading-relaxed hover:bg-[hsl(var(--accent))]/40 rounded cursor-pointer",onClick:()=>y(!1),children:[s.jsx("span",{className:Vr,children:s.jsx(Kl,{size:10,className:"text-[hsl(var(--muted-foreground))] rotate-90 transition-transform"})}),s.jsxs("span",{children:[E,s.jsx("span",{className:sl.punct,children:L})]})]}),s.jsxs("div",{className:"pl-5 border-l border-[hsl(var(--border))]/40 ml-1.5",children:[(j?B:B.slice(0,Tu)).map(([_,J],M,D)=>s.jsx(n,{value:J,label:_,depth:c+1,expandDepth:d,isLast:!j&&B.length>Tu?!1:M===D.length-1},typeof _=="number"?_:String(_))),!j&&B.length>Tu&&s.jsxs("button",{onClick:_=>{_.stopPropagation(),v(!0)},className:"text-[10px] text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] py-1 transition-colors",children:["Show all ",B.length," items (",B.length-Tu," more)"]})]}),s.jsxs("div",{className:"flex items-start leading-relaxed",children:[s.jsx("span",{className:Vr}),s.jsxs("span",{className:sl.punct,children:[U,T]})]})]})]})});function Mt({data:n,defaultExpandDepth:r,maxHeight:o,className:c,collapsed:d}){const h=r??(d?0:2),m=o??"24rem",x=JSON.stringify(n,null,2),[p,y]=b.useState(0),[j,v]=b.useState(h),T=j===1/0,E=b.useCallback(()=>{v(U=>U===1/0?0:1/0),y(U=>U+1)},[]),B=yg(n),L=B==="object"||B==="array";return s.jsxs("div",{className:ne("relative group/json",c),children:[s.jsxs("div",{className:"absolute top-2 right-2 flex items-center gap-1 opacity-0 group-hover/json:opacity-100 transition-opacity z-10",children:[L&&s.jsxs("button",{onClick:U=>{U.stopPropagation(),E()},className:bg,children:[T?s.jsx(fg,{size:10}):s.jsx(hg,{size:10}),T?"Collapse":"Expand"]}),s.jsx(aj,{text:x})]}),s.jsx("div",{className:"text-xs font-mono overflow-auto rounded-lg bg-[hsl(var(--secondary))] p-3",style:{maxHeight:m},children:s.jsx(sj,{value:n,depth:0,expandDepth:j,isLast:!0},p)})]})}const rj=(window.__AXL_STUDIO_BASE__??"")+"/api";async function rt(n,r){const c=await(await fetch(`${rj}${n}`,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r})).json();if(!c.ok)throw new Error(c.error.message);return c.data}const ij=()=>rt("/workflows"),uj=n=>rt(`/workflows/${encodeURIComponent(n)}`),oj=(n,r,o=!1)=>rt(`/workflows/${encodeURIComponent(n)}/execute`,{method:"POST",body:JSON.stringify({input:r,stream:o})}),cj=()=>rt("/executions"),dj=()=>rt("/sessions"),fj=n=>rt(`/sessions/${encodeURIComponent(n)}`),hj=n=>rt(`/sessions/${encodeURIComponent(n)}`,{method:"DELETE"}),mj=()=>rt("/agents"),pj=()=>rt("/tools"),xj=n=>rt(`/tools/${encodeURIComponent(n)}`),gj=(n,r)=>rt(`/tools/${encodeURIComponent(n)}/test`,{method:"POST",body:JSON.stringify({input:r})}),vj=n=>rt(`/memory/${encodeURIComponent(n)}`),yj=(n,r,o)=>rt(`/memory/${encodeURIComponent(n)}/${encodeURIComponent(r)}`,{method:"PUT",body:JSON.stringify({value:o})}),bj=(n,r)=>rt(`/memory/${encodeURIComponent(n)}/${encodeURIComponent(r)}`,{method:"DELETE"}),jj=(n,r,o)=>rt("/memory/search",{method:"POST",body:JSON.stringify({query:n,scope:r,limit:o})}),Nj=()=>rt("/costs"),Sj=()=>rt("/costs/reset",{method:"POST"}),Ej=()=>rt("/evals"),Cj=()=>rt("/evals/history"),Tj=(n,r)=>rt(`/evals/${encodeURIComponent(n)}/run`,{method:"POST",body:r!=null&&r.runs&&r.runs>1?JSON.stringify({runs:r.runs}):void 0}),wj=(n,r)=>rt(`/evals/${encodeURIComponent(n)}/rescore`,{method:"POST",body:JSON.stringify({resultId:r})}),Mj=(n,r,o)=>rt("/evals/compare",{method:"POST",body:JSON.stringify({baseline:n,candidate:r,options:o})}),Oj=(n,r,o)=>rt("/playground/chat",{method:"POST",body:JSON.stringify({message:n,sessionId:r,agent:o})});class Aj{constructor(){Qr(this,"ws",null);Qr(this,"listeners",new Map);Qr(this,"reconnectTimer",null);Qr(this,"url");const r=window.location.protocol==="https:"?"wss:":"ws:",o=window.__AXL_STUDIO_BASE__??"";this.url=`${r}//${window.location.host}${o}/ws`}connect(){var r;((r=this.ws)==null?void 0:r.readyState)!==WebSocket.OPEN&&(this.ws=new WebSocket(this.url),this.ws.onopen=()=>{for(const o of this.listeners.keys())this.send({type:"subscribe",channel:o})},this.ws.onmessage=o=>{try{const c=JSON.parse(o.data);if(c.type==="event"&&c.channel){const d=this.listeners.get(c.channel);if(d)for(const m of d)m(c.data);const h=c.channel.indexOf(":");if(h>0){const m=c.channel.substring(0,h)+":*",x=this.listeners.get(m);if(x)for(const p of x)p(c.data)}}}catch{}},this.ws.onclose=()=>{this.scheduleReconnect()},this.ws.onerror=()=>{var o;(o=this.ws)==null||o.close()})}scheduleReconnect(){this.reconnectTimer||(this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},2e3))}send(r){var o;((o=this.ws)==null?void 0:o.readyState)===WebSocket.OPEN&&this.ws.send(JSON.stringify(r))}subscribe(r,o){let c=this.listeners.get(r);return c||(c=new Set,this.listeners.set(r,c),this.send({type:"subscribe",channel:r})),c.add(o),this.connect(),()=>{c.delete(o),c.size===0&&(this.listeners.delete(r),this.send({type:"unsubscribe",channel:r}))}}disconnect(){var r;this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),(r=this.ws)==null||r.close(),this.ws=null}}const zj=new Aj;function Vd(n,r){const o=b.useRef(r);o.current=r,b.useEffect(()=>{if(n)return zj.subscribe(n,c=>o.current(c))},[n])}const fx={tokens:"",events:[],done:!1,error:null,result:null};function jg(n){const[r,o]=b.useState(fx),c=b.useRef(null);b.useEffect(()=>{n!==c.current&&(c.current=n,n&&o(fx))},[n]);const d=b.useCallback(h=>{const m=h;o(x=>{switch(m.type){case"token":return{...x,tokens:x.tokens+m.data,events:[...x.events,m]};case"done":return{...x,done:!0,result:m.data,events:[...x.events,m]};case"error":return{...x,done:!0,error:m.message,events:[...x.events,m]};default:return{...x,events:[...x.events,m]}}})},[]);return Vd(n?`execution:${n}`:null,d),r}function _j(){const[n,r]=b.useState([]),[o,c]=b.useState(""),[d,h]=b.useState(null),[m,x]=b.useState(null),[p,y]=b.useState(""),[j,v]=b.useState(!1),[T,E]=b.useState(0),[B,L]=b.useState({input:0,output:0}),U=b.useRef(null),_=b.useRef(0),{data:J=[]}=Cl({queryKey:["agents"],queryFn:mj}),M=jg(m);b.useEffect(()=>{M.tokens&&j&&r(A=>{const Y=A[A.length-1];return(Y==null?void 0:Y.role)==="assistant"?[...A.slice(0,-1),{...Y,content:M.tokens}]:[...A,{role:"assistant",content:M.tokens}]}),M.done&&(v(!1),x(null),M.error&&r(A=>{const Y=A[A.length-1];return(Y==null?void 0:Y.role)==="assistant"&&!Y.content?[...A.slice(0,-1),{role:"assistant",content:`Error: ${M.error}`}]:[...A,{role:"assistant",content:`Error: ${M.error}`}]}))},[M.tokens,M.done,M.error,j]),b.useEffect(()=>{const A=[],Y=[],R=[];for(const F of M.events){if(F.type==="tool_call"&&A.push({name:F.name,args:F.args,callId:F.callId}),F.type==="tool_result"){const se=F.callId?A.find(I=>I.callId===F.callId):A.find(I=>I.name===F.name&&!I.result);se&&(se.result=F.result)}F.type==="handoff"&&Y.push({source:F.source,target:F.target,mode:F.mode??"oneway"}),F.type==="tool_approval"&&R.push({tool:F.name,approved:F.approved})}(A.length>0||Y.length>0||R.length>0)&&r(F=>{const se=F[F.length-1];return(se==null?void 0:se.role)==="assistant"?[...F.slice(0,-1),{...se,toolCalls:A.length>0?A:se.toolCalls,handoffs:Y.length>0?Y:se.handoffs,approvals:R.length>0?R:se.approvals}]:F})},[M.events]),b.useEffect(()=>{const A=M.events.slice(_.current);if(A.length===0)return;_.current=M.events.length;let Y=0,R=0,F=0;for(const se of A)se.type==="agent_end"&&se.cost&&(Y+=se.cost),se.type==="step"&&se.data.tokens&&(R+=se.data.tokens.input??0,F+=se.data.tokens.output??0);Y>0&&E(se=>se+Y),(R>0||F>0)&&L(se=>({input:se.input+R,output:se.output+F}))},[M.events]),b.useEffect(()=>{var A;(A=U.current)==null||A.scrollIntoView({behavior:"smooth"})},[n]);const D=b.useCallback(async()=>{if(!o.trim()||j)return;const A=o.trim();c(""),r(Y=>[...Y,{role:"user",content:A}]),v(!0);try{const Y=await Oj(A,d??void 0,p||void 0);h(Y.sessionId),x(Y.executionId)}catch(Y){v(!1),r(R=>[...R,{role:"assistant",content:`Error: ${Y instanceof Error?Y.message:String(Y)}`}])}},[o,j,d,p]),w=A=>{A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),D())},k=T>0||B.input>0;return s.jsx(Xs,{title:"Agent Playground",description:"Chat with registered agents in real-time",actions:s.jsxs("div",{className:"flex items-center gap-2",children:[k&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[T>0&&s.jsx("span",{className:"px-1.5 py-0.5 rounded text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))]",children:dt(T)}),B.input>0&&s.jsxs("span",{className:"px-1.5 py-0.5 rounded text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))]",children:[_l(B.input+B.output)," tok"]})]}),J.length>0&&s.jsxs("select",{value:p,onChange:A=>y(A.target.value),className:"px-2 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[s.jsx("option",{value:"",children:"Default agent"}),J.map(A=>s.jsx("option",{value:A.name,children:A.name},A.name))]}),s.jsx("button",{onClick:()=>{r([]),h(null),x(null),E(0),L({input:0,output:0})},className:"px-3 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))]",children:"New Chat"})]}),children:s.jsxs("div",{className:"flex flex-col h-full max-w-3xl mx-auto",children:[s.jsxs("div",{className:"flex-1 overflow-auto space-y-4 pb-4",children:[n.length===0&&s.jsx(rl,{title:"Start a conversation",description:"Type a message below to chat with an agent. Tool calls, handoffs, and streaming responses will be displayed in real-time."}),n.map((A,Y)=>s.jsx("div",{className:`flex ${A.role==="user"?"justify-end":"justify-start"}`,children:s.jsxs("div",{className:`max-w-[80%] rounded-xl px-4 py-2.5 text-sm ${A.role==="user"?"bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]":"bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))]"}`,children:[A.role==="assistant"&&j&&Y===n.length-1?s.jsx(ej,{text:A.content}):s.jsx("div",{className:"whitespace-pre-wrap",children:A.content}),A.handoffs&&A.handoffs.length>0&&s.jsx("div",{className:"mt-2 space-y-1 border-t border-[hsl(var(--border))] pt-2",children:A.handoffs.map((R,F)=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s.jsx($r,{size:12,className:"text-amber-500"}),s.jsx("span",{className:"font-medium",children:R.source}),s.jsx($r,{size:10}),s.jsx("span",{className:"font-medium",children:R.target}),s.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:["(",R.mode,")"]})]},F))}),A.approvals&&A.approvals.length>0&&s.jsx("div",{className:"mt-2 space-y-1 border-t border-[hsl(var(--border))] pt-2",children:A.approvals.map((R,F)=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s.jsx(Z1,{size:12,className:R.approved?"text-green-500":"text-red-500"}),s.jsxs("span",{children:["Tool ",s.jsx("span",{className:"font-mono",children:R.tool}),":"," ",R.approved?"approved":"denied"]})]},F))}),A.toolCalls&&A.toolCalls.length>0&&s.jsx("div",{className:"mt-2 space-y-2 border-t border-[hsl(var(--border))] pt-2",children:A.toolCalls.map((R,F)=>s.jsxs("div",{className:"text-xs",children:[s.jsxs("div",{className:"font-medium mb-1",children:["Tool: ",R.name]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"text-[hsl(var(--muted-foreground))]",children:"Input:"}),s.jsx(Mt,{data:R.args,collapsed:!0}),R.result!==void 0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"text-[hsl(var(--muted-foreground))]",children:"Output:"}),s.jsx(Mt,{data:R.result,collapsed:!0})]})]})]},F))})]})},Y)),s.jsx("div",{ref:U})]}),s.jsx("div",{className:"border-t border-[hsl(var(--border))] pt-4",children:s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx("textarea",{value:o,onChange:A=>c(A.target.value),onKeyDown:w,placeholder:"Type a message...",rows:1,className:"flex-1 px-3 py-2.5 text-sm rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))] resize-none focus:outline-none focus:ring-2 focus:ring-[hsl(var(--ring))]"}),s.jsx("button",{onClick:D,disabled:!o.trim()||j,className:"p-2.5 rounded-xl bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] hover:opacity-90 disabled:opacity-50 transition-opacity",children:s.jsx(V1,{size:16})})]})})]})})}function Ng({value:n,onChange:r,placeholder:o,className:c}){const[d,h]=b.useState(!1),[m,x]=b.useState(null),p=b.useRef(null),y=b.useCallback(v=>{const T=v.target.value;r(T);try{T.trim()&&JSON.parse(T),x(null)}catch(E){x(E instanceof Error?E.message:"Invalid JSON")}},[r]);b.useEffect(()=>{var v;d&&((v=p.current)==null||v.focus())},[d]);let j=null;try{j=n.trim()?JSON.parse(n):{}}catch{}return j===null||d?s.jsxs("div",{className:c,children:[s.jsx("textarea",{ref:p,value:n,onChange:y,onBlur:()=>{m||h(!1)},placeholder:o??"{}",className:"w-full h-40 p-3 text-xs font-mono rounded-xl bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] border-none resize-y focus:outline-none focus:ring-2 focus:ring-[hsl(var(--ring))]",spellCheck:!1}),m&&s.jsx("p",{className:"text-xs text-red-500 mt-1",children:m})]}):s.jsx("div",{className:c,children:s.jsxs("div",{children:[s.jsx(Mt,{data:j,maxHeight:"12rem"}),s.jsxs("button",{onClick:()=>h(!0),className:"mt-1.5 inline-flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-md text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",children:[s.jsx(q1,{size:10}),"Edit"]})]})})}function Sg({schema:n,onSubmit:r,submitLabel:o="Submit",className:c}){const[d,h]=b.useState({}),m=n.properties??{},x=new Set(n.required??[]),p=b.useCallback(y=>{y.preventDefault();const j={};for(const[v,T]of Object.entries(m)){const E=d[v]??"";if(!(!E&&!x.has(v)))if(T.type==="number")j[v]=Number(E);else if(T.type==="boolean")j[v]=E==="true";else if(T.type==="object"||T.type==="array")try{j[v]=JSON.parse(E)}catch{j[v]=E}else j[v]=E}r(j)},[d,m,x,r]);return s.jsxs("form",{onSubmit:p,className:`space-y-3 ${c??""}`,children:[Object.entries(m).map(([y,j])=>s.jsxs("div",{children:[s.jsxs("label",{className:"block text-xs font-medium text-[hsl(var(--foreground))] mb-1",children:[y,x.has(y)&&s.jsx("span",{className:"text-red-500 ml-0.5",children:"*"}),j.description&&s.jsxs("span",{className:"text-[hsl(var(--muted-foreground))] font-normal ml-1",children:["- ",j.description]})]}),j.enum?s.jsxs("select",{value:d[y]??"",onChange:v=>h({...d,[y]:v.target.value}),className:"w-full px-2 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[s.jsx("option",{value:"",children:"Select..."}),j.enum.map(v=>s.jsx("option",{value:v,children:v},v))]}):j.type==="boolean"?s.jsxs("select",{value:d[y]??"",onChange:v=>h({...d,[y]:v.target.value}),className:"w-full px-2 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[s.jsx("option",{value:"",children:"Select..."}),s.jsx("option",{value:"true",children:"true"}),s.jsx("option",{value:"false",children:"false"})]}):s.jsx("input",{type:j.type==="number"?"number":"text",value:d[y]??"",onChange:v=>h({...d,[y]:v.target.value}),placeholder:j.type??"string",className:"w-full px-2 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] bg-[hsl(var(--background))]"})]},y)),s.jsx("button",{type:"submit",className:"px-4 py-2 text-sm font-medium rounded-md bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] hover:opacity-90 transition-opacity",children:o})]})}function Eg({status:n,className:r}){return s.jsxs("span",{className:ne("inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium",W1(n),n==="running"&&"animate-pulse",r),children:[s.jsx("span",{className:ne("w-1.5 h-1.5 rounded-full",n==="running"&&"bg-blue-500",n==="completed"&&"bg-green-500",n==="failed"&&"bg-red-500",n==="waiting"&&"bg-amber-500")}),n]})}function ct({label:n,value:r,subtitle:o,subtitleColor:c,accent:d,tint:h,badge:m}){return s.jsxs("div",{className:ne("px-4 py-3.5 rounded-xl",h||"bg-[hsl(var(--card))] border border-[hsl(var(--border))]"),children:[s.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:n}),m?s.jsx("div",{className:"mt-1",children:m}):s.jsx("p",{className:ne("text-2xl font-semibold mt-1 font-mono tracking-tight",d),children:r}),o&&s.jsx("p",{className:ne("text-xs mt-0.5",c??"text-[hsl(var(--muted-foreground))]"),children:o})]})}const Rj={agent_call:"bg-blue-500",tool_call:"bg-purple-500",tool_call_complete:"bg-purple-400",workflow_start:"bg-green-500",workflow_complete:"bg-green-400",handoff:"bg-amber-500",await_human:"bg-red-500",vote_start:"bg-cyan-500",spawn:"bg-indigo-500"};function Du(n){return Rj[n]??"bg-slate-500"}function Cg(n){const r=n.type;return r==="workflow_start"||r==="workflow_complete"?0:r==="agent_call"||r==="spawn"||r==="vote_start"?1:r==="tool_call"||r==="tool_call_complete"||r==="handoff"?2:1}function Dj(){const[n,r]=b.useState(""),[o,c]=b.useState("{}"),[d,h]=b.useState(!0),[m,x]=b.useState(null),[p,y]=b.useState(void 0),[j,v]=b.useState(null),[T,E]=b.useState("idle"),{data:B=[]}=Cl({queryKey:["workflows"],queryFn:ij}),{data:L}=Cl({queryKey:["workflow",n],queryFn:()=>uj(n),enabled:!!n}),U=jg(m),_=b.useCallback(async R=>{if(n){y(void 0),v(null),E("running");try{const F=await oj(n,R,!0);F.streaming&&F.executionId?x(F.executionId):(y(F.result),E("completed"))}catch(F){v(F instanceof Error?F.message:String(F)),E("failed")}}},[n]),J=b.useCallback(()=>{try{const R=JSON.parse(o);_(R)}catch(R){v(R instanceof Error?R.message:String(R)),E("failed")}},[o,_]),M=b.useCallback(R=>{_(R)},[_]);b.useEffect(()=>{U.done&&T==="running"&&(E(U.error?"failed":"completed"),U.error&&v(U.error),U.result!==void 0&&y(U.result),x(null))},[U.done,U.error,U.result,T]);const D=U.events.filter(R=>R.type==="step").map(R=>R.data),w=!!(L!=null&&L.inputSchema),k=Math.max(...D.map(R=>R.duration??0),1),A=D.reduce((R,F)=>R+(F.duration??0),0),Y=D.reduce((R,F)=>R+(F.cost??0),0);return s.jsxs("div",{className:"flex flex-col h-screen",children:[s.jsxs("header",{className:"shrink-0 flex items-center justify-between px-6 py-4 border-b border-[hsl(var(--border))]",children:[s.jsx("h2",{className:"text-xl font-semibold",children:"Workflows"}),B.length>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("select",{value:n,onChange:R=>{r(R.target.value),c("{}"),y(void 0),v(null),E("idle")},className:"px-3 py-1.5 text-sm rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))] min-w-[180px]",children:[s.jsx("option",{value:"",children:"Select workflow…"}),B.map(R=>s.jsx("option",{value:R.name,children:R.name},R.name))]}),s.jsxs("button",{onClick:J,disabled:!n||T==="running",className:ne("inline-flex items-center gap-1.5 px-4 py-1.5 text-sm font-medium rounded-lg transition-all","bg-[hsl(var(--foreground))] text-[hsl(var(--background))]","hover:opacity-90 disabled:opacity-40"),children:[s.jsx(Xd,{size:12,className:T==="running"?"animate-spin":""}),T==="running"?"Running…":"Run"]})]})]}),s.jsxs("div",{className:"flex-1 min-h-0 flex border-t border-[hsl(var(--border))]",children:[s.jsxs("div",{className:"w-[400px] xl:w-[480px] shrink-0 border-r border-[hsl(var(--border))] overflow-y-auto p-5 space-y-4",children:[w&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>h(!0),className:ne("px-3 py-1 text-xs rounded-lg transition-colors",d?"bg-[hsl(var(--foreground))] text-[hsl(var(--background))]":"text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]"),children:"Form"}),s.jsx("button",{onClick:()=>h(!1),className:ne("px-3 py-1 text-xs rounded-lg transition-colors",d?"text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]":"bg-[hsl(var(--foreground))] text-[hsl(var(--background))]"),children:"JSON"})]}),w&&d?s.jsx(Sg,{schema:L.inputSchema,onSubmit:M,submitLabel:T==="running"?"Running…":"Execute"}):s.jsxs("div",{children:[s.jsx("label",{className:"block text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-2",children:"Input (JSON)"}),s.jsx(Ng,{value:o,onChange:c})]}),(L==null?void 0:L.outputSchema)!=null&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-2",children:"Output Schema"}),s.jsx(Mt,{data:L.outputSchema,collapsed:!0})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-5",children:T==="idle"?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(rl,{icon:s.jsx(As,{size:32}),title:"No execution",description:"Select a workflow and click Run to see results."})}):s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[s.jsx(ct,{label:"Status",badge:s.jsx(Eg,{status:T})}),s.jsx(ct,{label:"Steps",value:String(D.length)}),s.jsx(ct,{label:"Duration",value:A>0?ft(A):"—"}),s.jsx(ct,{label:"Cost",value:Y>0?dt(Y):"—"})]}),j&&s.jsx("div",{className:"p-4 rounded-xl bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 text-sm",children:j}),p!==void 0&&s.jsxs("div",{children:[s.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-2",children:"Result"}),s.jsx(Mt,{data:p})]}),D.length>0&&s.jsxs("div",{children:[s.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-2",children:"Timeline"}),s.jsx("div",{className:"space-y-1",children:D.map((R,F)=>{const se=Cg(R);return s.jsxs("details",{className:"group",children:[s.jsxs("summary",{className:"flex items-center gap-2 px-3 py-1.5 text-xs rounded-xl bg-[hsl(var(--secondary))] cursor-pointer hover:bg-[hsl(var(--accent))]",style:{marginLeft:`${se*16}px`},children:[s.jsxs("span",{className:"font-mono text-[hsl(var(--muted-foreground))] w-8",children:["#",R.step]}),s.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${Du(R.type)}`}),s.jsx("span",{className:"font-medium w-24 truncate",children:R.type}),R.agent&&s.jsx("span",{className:"text-blue-600 dark:text-blue-400 w-24 truncate",children:R.agent}),R.tool&&s.jsx("span",{className:"text-purple-600 dark:text-purple-400 w-24 truncate",children:R.tool}),s.jsx("div",{className:"flex-1 h-3 bg-[hsl(var(--background))] rounded overflow-hidden",children:R.duration!=null&&R.duration>0&&s.jsx("div",{className:`h-full rounded ${Du(R.type)}`,style:{width:`${Math.max(R.duration/k*100,2)}%`,opacity:.7}})}),R.duration!=null&&s.jsx("span",{className:"text-[10px] font-mono text-[hsl(var(--muted-foreground))]",children:ft(R.duration)})]}),s.jsxs("div",{className:"mt-1 mb-2 p-3 rounded-xl bg-[hsl(var(--card))] border border-[hsl(var(--border))]",style:{marginLeft:`${se*16+32}px`},children:[R.model&&s.jsxs("p",{className:"text-xs mb-1",children:[s.jsx("strong",{children:"Model:"})," ",R.model]}),R.tokens&&s.jsxs("p",{className:"text-xs mb-1",children:[s.jsx("strong",{children:"Tokens:"})," in=",R.tokens.input," out=",R.tokens.output,R.tokens.reasoning?` reasoning=${R.tokens.reasoning}`:""]}),R.data!=null&&s.jsx(Mt,{data:R.data,collapsed:!0})]})]},F)})})]}),T==="running"&&D.length===0&&s.jsxs("div",{className:"flex items-center justify-center py-12 text-sm text-[hsl(var(--muted-foreground))]",children:[s.jsx(As,{size:16,className:"animate-pulse mr-2"}),"Executing workflow…"]})]})})]})]})}function Os({cost:n,className:r}){return s.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))] ${r??""}`,children:dt(n)})}function kj({ms:n,className:r}){return s.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))] ${r??""}`,children:ft(n)})}const Uj={running:"border-l-blue-500",completed:"border-l-green-500",failed:"border-l-red-500"};function Hj(n){const r=new Date(n),o=new Date;return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()&&r.getDate()===o.getDate()?r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}):r.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function qj(){const[n,r]=b.useState(null),[o,c]=b.useState([]),[d,h]=b.useState(""),[m,x]=b.useState(""),[p,y]=b.useState(new Set),{data:j=[],refetch:v}=Cl({queryKey:["executions"],queryFn:cj,refetchInterval:3e3});Vd("trace:*",b.useCallback(w=>{c(k=>[...k.slice(-200),w])},[]));const T=n?n.steps:o;let E=T;d&&(E=E.filter(w=>w.type===d)),m&&(E=E.filter(w=>w.agent===m));const B=[...new Set(T.map(w=>w.type))],L=[...new Set(T.map(w=>w.agent).filter(Boolean))],U=Math.max(...E.map(w=>w.duration??0),1),_=w=>{y(k=>{const A=new Set(k);return A.has(w)?A.delete(w):A.add(w),A})},J=()=>{const w=E.map((k,A)=>k.step??A);y(new Set(w))},M=()=>{y(new Set)},D=b.useMemo(()=>{if(!n)return null;const w=[...new Set(n.steps.map(k=>k.model).filter(Boolean))];return{duration:n.duration,eventCount:n.steps.length,cost:n.totalCost,models:w}},[n]);return s.jsxs("div",{className:"flex flex-col h-screen",children:[s.jsxs("header",{className:"shrink-0 flex items-center justify-between px-6 py-4 border-b border-[hsl(var(--border))]",children:[s.jsx("h2",{className:"text-xl font-semibold",children:"Trace Explorer"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("select",{value:d,onChange:w=>h(w.target.value),className:"px-2 py-1.5 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[s.jsx("option",{value:"",children:"All types"}),B.map(w=>s.jsx("option",{value:w,children:w},w))]}),L.length>0&&s.jsxs("select",{value:m,onChange:w=>x(w.target.value),className:"px-2 py-1.5 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[s.jsx("option",{value:"",children:"All agents"}),L.map(w=>s.jsx("option",{value:w,children:w},w))]}),s.jsx("button",{onClick:()=>{v(),c([])},className:"px-3 py-1.5 text-sm rounded-lg border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))]",children:"Refresh"})]})]}),s.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[s.jsxs("div",{className:"lg:col-span-1 space-y-2",children:[s.jsx("h3",{className:"text-sm font-medium mb-2",children:"Executions"}),s.jsxs("button",{onClick:()=>{r(null),y(new Set)},className:ne("w-full text-left px-3 py-2 text-xs rounded-xl border",n?"border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]":"border-[hsl(var(--primary))] bg-[hsl(var(--accent))]"),children:["Live Events (",o.length,")"]}),j.map(w=>s.jsxs("button",{onClick:()=>{r(w),y(new Set)},className:ne("w-full text-left px-3 py-2.5 text-xs rounded-xl border border-l-[3px] transition-colors",Uj[w.status]??"border-l-slate-400",(n==null?void 0:n.executionId)===w.executionId?"border-[hsl(var(--primary))] bg-[hsl(var(--accent))]":"border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]"),children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-medium truncate",children:w.workflow}),s.jsx(Eg,{status:w.status})]}),s.jsxs("div",{className:"flex items-center justify-between mt-1",children:[s.jsxs("span",{className:"text-[hsl(var(--muted-foreground))] truncate",children:[w.executionId.slice(0,8),"… | ",w.steps.length," steps"]}),w.totalCost>0&&s.jsx(Os,{cost:w.totalCost})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-1 text-[10px] text-[hsl(var(--muted-foreground))]",children:[s.jsx("span",{children:Hj(w.startedAt)}),w.duration>0&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-[hsl(var(--border))]",children:"·"}),s.jsx("span",{children:ft(w.duration)})]})]})]},w.executionId)),j.length===0&&s.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No executions yet"})]}),s.jsxs("div",{className:"lg:col-span-3",children:[D&&s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-4",children:[s.jsx(ct,{label:"Duration",value:ft(D.duration)}),s.jsx(ct,{label:"Events",value:String(D.eventCount)}),s.jsx(ct,{label:"Cost",value:D.cost>0?dt(D.cost):"—"}),s.jsx(ct,{label:"Model",value:D.models.length>0?D.models[0]:"—",subtitle:D.models.length>1?`+${D.models.length-1} more`:void 0})]}),(n==null?void 0:n.status)==="completed"&&n.result!=null&&s.jsxs("div",{className:"mb-4",children:[s.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-2",children:"Result"}),s.jsx(Mt,{data:n.result})]}),s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:[E.length," events"]}),E.length>0&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsxs("button",{onClick:J,className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded-md hover:bg-[hsl(var(--accent))] text-[hsl(var(--muted-foreground))]",title:"Expand all",children:[s.jsx(hg,{size:12}),"Expand"]}),s.jsxs("button",{onClick:M,className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded-md hover:bg-[hsl(var(--accent))] text-[hsl(var(--muted-foreground))]",title:"Collapse all",children:[s.jsx(fg,{size:12}),"Collapse"]})]})]}),E.length===0?s.jsx(rl,{icon:s.jsx(cg,{size:32}),title:"No trace events",description:"Execute a workflow to see trace events here."}):s.jsx("div",{className:"space-y-1",children:E.map((w,k)=>{const A=Cg(w),Y=w.step??k,R=p.has(Y);return s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>_(Y),className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs rounded-xl bg-[hsl(var(--secondary))] cursor-pointer hover:bg-[hsl(var(--accent))] text-left",style:{marginLeft:`${A*16}px`},children:[R?s.jsx(Ys,{size:12,className:"shrink-0 text-[hsl(var(--muted-foreground))]"}):s.jsx(Kl,{size:12,className:"shrink-0 text-[hsl(var(--muted-foreground))]"}),s.jsxs("span",{className:"font-mono text-[hsl(var(--muted-foreground))] w-8",children:["#",w.step!=null?w.step:k]}),s.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${Du(w.type)}`}),s.jsx("span",{className:"font-medium w-28 truncate",children:w.type}),w.agent&&s.jsx("span",{className:"text-blue-600 dark:text-blue-400 w-28 truncate",children:w.agent}),w.tool&&s.jsx("span",{className:"text-purple-600 dark:text-purple-400 w-28 truncate",children:w.tool}),s.jsx("div",{className:"flex-1 h-3 bg-[hsl(var(--background))] rounded overflow-hidden",children:w.duration!=null&&w.duration>0&&s.jsx("div",{className:`h-full rounded ${Du(w.type)}`,style:{width:`${Math.max(w.duration/U*100,2)}%`,opacity:.7}})}),w.duration!=null&&s.jsx(kj,{ms:w.duration}),w.cost!=null&&w.cost>0&&s.jsx(Os,{cost:w.cost})]}),R&&s.jsxs("div",{className:"mt-1 mb-2 p-3 rounded-xl bg-[hsl(var(--card))] border border-[hsl(var(--border))]",style:{marginLeft:`${A*16+32}px`},children:[w.model&&s.jsxs("p",{className:"text-xs mb-1",children:[s.jsx("strong",{children:"Model:"})," ",w.model]}),w.promptVersion&&s.jsxs("p",{className:"text-xs mb-1",children:[s.jsx("strong",{children:"Version:"})," ",w.promptVersion]}),w.tokens&&s.jsxs("p",{className:"text-xs mb-1",children:[s.jsx("strong",{children:"Tokens:"})," in=",w.tokens.input," out=",w.tokens.output,w.tokens.reasoning?` reasoning=${w.tokens.reasoning}`:""]}),w.data!=null&&s.jsx(Mt,{data:w.data,collapsed:!0})]})]},Y)})})]})]})})]})}function Lj({tokens:n,label:r,className:o}){return s.jsxs("span",{className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--secondary-foreground))] ${o??""}`,children:[r&&s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:r}),_l(n)]})}function Bj(){const[n,r]=b.useState(null),{data:o,refetch:c}=Cl({queryKey:["costs"],queryFn:Nj});Vd("costs",b.useCallback(x=>{r(x)},[]));const d=n??o,h=async()=>{await Sj(),r(null),c()};if(!d)return s.jsx(Xs,{title:"Cost Dashboard",description:"Track spending across agents, models, and workflows",children:s.jsx(rl,{icon:s.jsx(mg,{size:32}),title:"No cost data",description:"Execute workflows to see cost data."})});const m=d.totalTokens.reasoning>0;return s.jsxs(Xs,{title:"Cost Dashboard",description:"Track spending across agents, models, and workflows",actions:s.jsx("button",{onClick:h,className:"px-3 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))]",children:"Reset"}),children:[s.jsxs("div",{className:ne("grid grid-cols-1 sm:grid-cols-2 gap-3 mb-8",m?"lg:grid-cols-4":"lg:grid-cols-3"),children:[s.jsx(ct,{label:"Total Cost",value:dt(d.totalCost),subtitle:"all time"}),s.jsx(ct,{label:"Input Tokens",value:_l(d.totalTokens.input),subtitle:"prompt"}),s.jsx(ct,{label:"Output Tokens",value:_l(d.totalTokens.output),subtitle:"completion"}),m&&s.jsx(ct,{label:"Reasoning Tokens",value:_l(d.totalTokens.reasoning),subtitle:"thinking"})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium mb-3",children:"Cost by Agent"}),Object.keys(d.byAgent).length===0?s.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No agent data"}):s.jsx(ud,{headers:["Agent","Calls","Cost"],rows:Object.entries(d.byAgent).sort(([,x],[,p])=>p.cost-x.cost).map(([x,p])=>({key:x,cells:[s.jsx("span",{className:"font-mono",children:x}),s.jsx("span",{children:p.calls}),s.jsx(Os,{cost:p.cost})],cost:p.cost})),maxCost:Math.max(...Object.values(d.byAgent).map(x=>x.cost))})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium mb-3",children:"Cost by Model"}),Object.keys(d.byModel).length===0?s.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No model data"}):s.jsx(ud,{headers:["Model","Calls","Tokens","Cost"],rows:Object.entries(d.byModel).sort(([,x],[,p])=>p.cost-x.cost).map(([x,p])=>({key:x,cells:[s.jsx("span",{className:"font-mono",children:x}),s.jsx("span",{children:p.calls}),s.jsx(Lj,{tokens:p.tokens.input+p.tokens.output}),s.jsx(Os,{cost:p.cost})],cost:p.cost})),maxCost:Math.max(...Object.values(d.byModel).map(x=>x.cost))})]}),s.jsxs("div",{className:"lg:col-span-2",children:[s.jsx("h3",{className:"text-sm font-medium mb-3",children:"Cost by Workflow"}),Object.keys(d.byWorkflow).length===0?s.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No workflow data"}):s.jsx(ud,{headers:["Workflow","Executions","Total Cost","Avg Cost"],rows:Object.entries(d.byWorkflow).sort(([,x],[,p])=>p.cost-x.cost).map(([x,p])=>({key:x,cells:[s.jsx("span",{className:"font-mono",children:x}),s.jsx("span",{children:p.executions}),s.jsx(Os,{cost:p.cost}),s.jsx(Os,{cost:p.executions>0?p.cost/p.executions:0})],cost:p.cost})),maxCost:Math.max(...Object.values(d.byWorkflow).map(x=>x.cost))})]})]})]})}function ud({headers:n,rows:r,maxCost:o}){return s.jsx("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsx("tr",{className:"border-b border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:n.map((c,d)=>s.jsx("th",{className:ne("py-2 px-3 font-medium",d===0?"text-left":"text-right"),children:c},c))})}),s.jsx("tbody",{children:r.map(c=>s.jsx("tr",{className:"border-b last:border-b-0 border-[hsl(var(--border))]",children:c.cells.map((d,h)=>s.jsxs("td",{className:ne("py-2 px-3 relative",h===0?"text-left":"text-right"),children:[h===c.cells.length-1&&o>0&&s.jsx("div",{className:"absolute inset-y-0 right-0 bg-[hsl(var(--primary)/0.08)] rounded-sm",style:{width:`${c.cost/o*100}%`}}),s.jsx("span",{className:"relative",children:d})]},h))},c.key))})]})})}function Qj(){const[n,r]=b.useState("session"),[o,c]=b.useState(""),[d,h]=b.useState("{}"),[m,x]=b.useState(!1),[p,y]=b.useState(""),[j,v]=b.useState(null),[T,E]=b.useState(null),B=ti(),{data:L=[]}=Cl({queryKey:["memory",n],queryFn:()=>vj(n)}),U=Ed({mutationFn:({key:w,value:k})=>yj(n,w,k),onSuccess:()=>{B.invalidateQueries({queryKey:["memory",n]}),x(!1),c(""),h("{}")}}),_=Ed({mutationFn:w=>bj(n,w),onSuccess:()=>{B.invalidateQueries({queryKey:["memory",n]}),E(null)}}),J=b.useCallback(async()=>{if(!p.trim())return;const w=await jj(p,n);v(w.results)},[p,n]),M=b.useCallback(()=>{if(o.trim())try{const w=JSON.parse(d);U.mutate({key:o,value:w})}catch{U.mutate({key:o,value:d})}},[o,d,U]),D=b.useCallback(w=>{T===w?_.mutate(w):E(w)},[T,_]);return s.jsxs(Xs,{title:"Memory Browser",description:"View and manage agent memory entries",actions:s.jsxs("button",{onClick:()=>x(!m),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-md bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] hover:opacity-90",children:[s.jsx(Q1,{size:14}),"Add Entry"]}),children:[s.jsxs("div",{className:"flex items-center gap-0 mb-4 border-b border-[hsl(var(--border))]",children:[["session","global"].map(w=>s.jsx("button",{onClick:()=>{r(w),v(null),E(null)},className:ne("px-3 py-2.5 text-sm -mb-px border-b-2 transition-colors",n===w?"border-[hsl(var(--foreground))] text-[hsl(var(--foreground))] font-medium":"border-transparent text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]"),children:w.charAt(0).toUpperCase()+w.slice(1)},w)),s.jsx("div",{className:"flex-1"}),s.jsxs("div",{className:"flex items-center gap-1 -mb-px pb-2",children:[s.jsx("input",{value:p,onChange:w=>y(w.target.value),onKeyDown:w=>w.key==="Enter"&&J(),placeholder:"Semantic search...",className:"px-2 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] bg-[hsl(var(--background))] w-48"}),s.jsx("button",{onClick:J,className:"p-1.5 rounded-md hover:bg-[hsl(var(--accent))]",children:s.jsx(Y1,{size:14})})]})]}),m&&s.jsxs("div",{className:"mb-4 p-4 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] space-y-3",children:[s.jsx("input",{value:o,onChange:w=>c(w.target.value),placeholder:"Key",className:"w-full px-2 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] bg-[hsl(var(--background))]"}),s.jsx(Ng,{value:d,onChange:h,placeholder:"Value (JSON)"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:M,disabled:!o.trim(),className:"px-3 py-1.5 text-sm rounded-md bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] hover:opacity-90 disabled:opacity-50",children:"Save"}),s.jsx("button",{onClick:()=>x(!1),className:"px-3 py-1.5 text-sm rounded-md border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))]",children:"Cancel"})]})]}),j&&s.jsxs("div",{className:"mb-4 p-4 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[s.jsx("h3",{className:"text-sm font-medium mb-2",children:"Search Results"}),j.length===0?s.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No results found"}):s.jsx(Mt,{data:j})]}),L.length===0?s.jsx(rl,{icon:s.jsx(dg,{size:32}),title:"No memory entries",description:`No entries in the ${n} scope. Use ctx.remember() in workflows or add entries manually.`}):s.jsx("div",{className:"space-y-2",children:L.map(w=>s.jsxs("div",{className:"p-3 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-sm font-mono font-medium",children:w.key}),s.jsx("div",{className:"flex items-center gap-1",children:T===w.key?s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>D(w.key),className:"px-2 py-0.5 text-xs rounded bg-[hsl(var(--destructive))] text-[hsl(var(--destructive-foreground))]",children:"Confirm"}),s.jsx("button",{onClick:()=>E(null),className:"px-2 py-0.5 text-xs rounded border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))]",children:"Cancel"})]}):s.jsx("button",{onClick:()=>D(w.key),className:"p-1 rounded hover:bg-[hsl(var(--destructive))] hover:text-[hsl(var(--destructive-foreground))] text-[hsl(var(--muted-foreground))]",children:s.jsx(xg,{size:14})})})]}),s.jsx(Mt,{data:w.value,collapsed:!0})]},w.key))})]})}function Gj(n){try{return JSON.parse(n)}catch{return n}}function Yj(n,r){if(r==="assistant"){const o=n.trim();if(o.startsWith("{")||o.startsWith("["))try{const c=JSON.parse(o);return s.jsx(Mt,{data:c,collapsed:!0})}catch{}}return s.jsx("div",{className:"whitespace-pre-wrap",children:n})}function Xj(){const[n,r]=b.useState(null),[o,c]=b.useState(null),[d,h]=b.useState(null),m=ti(),{data:x=[]}=Cl({queryKey:["sessions"],queryFn:dj,refetchInterval:5e3}),{data:p}=Cl({queryKey:["session",n],queryFn:()=>fj(n),enabled:!!n}),y=Ed({mutationFn:hj,onSuccess:()=>{m.invalidateQueries({queryKey:["sessions"]}),r(null),h(null)}}),j=p!=null&&p.history?o!==null?p.history.slice(0,o+1):p.history:[];return s.jsx(Xs,{title:"Session Manager",description:"Browse active sessions, replay conversations, and view handoff chains",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("h3",{className:"text-sm font-medium mb-2",children:["Sessions (",x.length,")"]}),x.length===0?s.jsx(rl,{icon:s.jsx(gg,{size:24}),title:"No sessions",description:"Sessions are created when using runtime.session()"}):x.map(v=>s.jsxs("button",{onClick:()=>{r(v.id),c(null)},className:`w-full text-left px-3 py-2.5 text-xs rounded-xl border transition-colors ${n===v.id?"border-[hsl(var(--primary))] bg-[hsl(var(--accent))]":"border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]"}`,children:[s.jsx("div",{className:"font-mono truncate text-[11px]",title:v.id,children:v.id}),s.jsxs("div",{className:"flex items-center gap-1.5 text-[hsl(var(--muted-foreground))] mt-1",children:[s.jsx(pg,{size:11}),s.jsxs("span",{children:[v.messageCount," message",v.messageCount!==1?"s":""]})]})]},v.id))]}),s.jsx("div",{className:"lg:col-span-2",children:p?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-medium font-mono",children:p.id}),s.jsxs("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:[p.history.length," messages"]})]}),d===p.id?s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("button",{onClick:()=>y.mutate(p.id),className:"px-2 py-1 text-xs rounded-md bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:hover:bg-red-800",children:"Confirm"}),s.jsx("button",{onClick:()=>h(null),className:"px-2 py-1 text-xs rounded-md border border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]",children:"Cancel"})]}):s.jsxs("button",{onClick:()=>h(p.id),className:"flex items-center gap-1 px-2 py-1 text-xs rounded-md border border-red-300 text-red-600 hover:bg-red-50 dark:border-red-800 dark:text-red-400 dark:hover:bg-red-950",children:[s.jsx(xg,{size:12}),"Delete"]})]}),p.handoffHistory&&p.handoffHistory.length>0&&s.jsxs("div",{children:[s.jsx("h4",{className:"text-xs font-medium mb-2",children:"Handoff Chain"}),s.jsx("div",{className:"flex items-center gap-1 flex-wrap",children:p.handoffHistory.map((v,T)=>s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"px-2 py-0.5 text-xs rounded bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300",children:v.source}),s.jsx($r,{size:12,className:"text-[hsl(var(--muted-foreground))]"}),s.jsx("span",{className:"px-2 py-0.5 text-xs rounded bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300",children:v.target}),s.jsxs("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:["(",v.mode,")"]}),T<p.handoffHistory.length-1&&s.jsx("span",{className:"mx-1 text-[hsl(var(--muted-foreground))]",children:"|"})]},T))})]}),p.history.length>1&&s.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] p-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"text-xs font-medium",children:"Replay"}),s.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))] font-mono",children:o!==null?`${o+1} / ${p.history.length}`:`${p.history.length} / ${p.history.length}`})]}),s.jsx("input",{type:"range",min:0,max:p.history.length-1,value:o??p.history.length-1,onChange:v=>c(Number(v.target.value)),className:"w-full h-1.5 rounded-full appearance-none cursor-pointer bg-[hsl(var(--secondary))] [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-3.5 [&::-webkit-slider-thumb]:h-3.5 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-[hsl(var(--primary))] [&::-webkit-slider-thumb]:shadow-sm [&::-moz-range-thumb]:w-3.5 [&::-moz-range-thumb]:h-3.5 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-[hsl(var(--primary))] [&::-moz-range-thumb]:border-0"}),s.jsxs("div",{className:"flex justify-between mt-1",children:[s.jsx("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))]",children:"Start"}),s.jsx("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))]",children:"Latest"})]})]}),s.jsx("div",{className:"space-y-3",children:j.map((v,T)=>s.jsxs("div",{className:`p-3 rounded-xl text-sm ${v.role==="user"?"bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))] ml-8":v.role==="assistant"?"bg-[hsl(var(--secondary))] mr-8":"bg-[hsl(var(--muted))] text-xs font-mono"}`,children:[s.jsx("div",{className:"text-xs font-medium mb-1 opacity-70",children:v.role}),Yj(v.content,v.role),v.tool_calls&&v.tool_calls.length>0&&s.jsx("div",{className:"mt-2 space-y-1",children:v.tool_calls.map(E=>s.jsxs("details",{className:"text-xs",children:[s.jsx("summary",{className:"cursor-pointer font-mono",children:E.function.name}),s.jsx(Mt,{data:Gj(E.function.arguments),collapsed:!0})]},E.id))})]},T))})]}):s.jsx(rl,{title:"Select a session",description:"Click a session to view its history"})})]})})}function Vj(){const[n,r]=b.useState(null),[o,c]=b.useState(void 0),[d,h]=b.useState(null),[m,x]=b.useState(!1),[p,y]=b.useState(!1),{data:j=[]}=Cl({queryKey:["tools"],queryFn:pj}),{data:v}=Cl({queryKey:["tool",n],queryFn:()=>xj(n),enabled:!!n}),T=b.useCallback(async E=>{if(n){c(null),h(null),x(!0);try{const B=await gj(n,E);c(B.result)}catch(B){h(B instanceof Error?B.message:String(B))}finally{x(!1)}}},[n]);return s.jsx(Xs,{title:"Tool Inspector",description:"View tool schemas and test tools directly",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("h3",{className:"text-sm font-medium mb-2",children:["Tools (",j.length,")"]}),j.length===0?s.jsx(rl,{icon:s.jsx(vg,{size:24}),title:"No tools",description:"Register tools with runtime.registerTool()"}):j.map(E=>s.jsxs("button",{onClick:()=>{r(E.name),c(void 0),h(null),y(!1)},className:`w-full text-left px-3 py-2 text-xs rounded-xl border ${n===E.name?"border-[hsl(var(--primary))] bg-[hsl(var(--accent))]":"border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]"}`,children:[s.jsx("div",{className:"font-medium",children:E.name}),s.jsx("div",{className:"text-[hsl(var(--muted-foreground))] mt-0.5 truncate",children:E.description}),s.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[E.sensitive&&s.jsx("span",{className:"px-1 py-0.5 rounded bg-amber-100 dark:bg-amber-900 text-amber-700 dark:text-amber-300 text-[10px]",children:"sensitive"}),E.requireApproval&&s.jsx("span",{className:"px-1 py-0.5 rounded bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300 text-[10px]",children:"approval"})]})]},E.name))]}),s.jsx("div",{className:"lg:col-span-2",children:n?v?s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium",children:v.name}),s.jsx("p",{className:"text-sm text-[hsl(var(--muted-foreground))]",children:v.description})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v.sensitive&&s.jsx("span",{className:"px-2 py-1 text-xs rounded-md bg-amber-100 dark:bg-amber-900 text-amber-700 dark:text-amber-300",children:"Sensitive"}),v.requireApproval&&s.jsx("span",{className:"px-2 py-1 text-xs rounded-md bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300",children:"Requires Approval"}),v.retry.attempts&&v.retry.attempts>1&&s.jsxs("span",{className:"px-2 py-1 text-xs rounded-md bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300",children:["Retry: ",v.retry.attempts,"x ",v.retry.backoff]}),v.hasHooks&&v.hooks&&s.jsxs("span",{className:"px-2 py-1 text-xs rounded-md bg-purple-100 dark:bg-purple-900 text-purple-700 dark:text-purple-300",children:["Hooks:"," ",[v.hooks.hasBefore&&"before",v.hooks.hasAfter&&"after"].filter(Boolean).join(" + ")]})]}),s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>y(!p),className:"flex items-center gap-1.5 text-sm font-medium text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors",children:[s.jsx(Kl,{size:14,className:ne("transition-transform",p&&"rotate-90")}),"View raw schema"]}),p&&s.jsx("div",{className:"mt-2",children:s.jsx(Mt,{data:v.inputSchema})})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-2",children:"Test Tool"}),s.jsx("div",{className:"rounded-xl border border-[hsl(var(--border))] p-4 bg-[hsl(var(--card))]",children:s.jsx(Sg,{schema:v.inputSchema,onSubmit:T,submitLabel:m?"Running...":"Run Tool"})})]}),o!==void 0&&s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-2",children:"Result"}),s.jsx("div",{className:"rounded-xl border border-[hsl(var(--border))] p-4 bg-[hsl(var(--card))]",children:s.jsx(Mt,{data:o})})]}),d&&s.jsx("div",{className:"p-3 rounded-xl bg-red-50 dark:bg-red-950 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 text-sm",children:d})]}):s.jsxs("div",{className:"flex items-center gap-2 text-sm text-[hsl(var(--muted-foreground))]",children:[s.jsx(k1,{size:16,className:"animate-spin"}),"Loading tool details..."]}):s.jsx(rl,{title:"Select a tool",description:"Click a tool to view its schema and test it"})})]})})}function ku(n){return n>=.8?"bg-emerald-100 dark:bg-emerald-900/50 text-emerald-700 dark:text-emerald-300":n>=.5?"bg-amber-100 dark:bg-amber-900/40 text-amber-700 dark:text-amber-300":"bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-300"}function Lu(n){return n>=.8?"bg-emerald-500 dark:bg-emerald-400":n>=.5?"bg-amber-500 dark:bg-amber-400":"bg-red-500 dark:bg-red-400"}function Nt(n){return n>=.8?"text-emerald-600 dark:text-emerald-400":n>=.5?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"}function hx(n){return n>=.8?"bg-emerald-50/60 dark:bg-emerald-950/20":n>=.5?"bg-amber-50/60 dark:bg-amber-950/20":"bg-red-50/60 dark:bg-red-950/20"}function Kj(n){var r;return Array.isArray((r=n.metadata)==null?void 0:r.models)?n.metadata.models.filter(o=>typeof o=="string"):[]}function Ea(n){var r;return Array.isArray((r=n.metadata)==null?void 0:r.models)?n.metadata.models.filter(o=>typeof o=="string"):[]}function dn(n){var c;const r=(c=n.metadata)==null?void 0:c.modelCounts;if(!r||typeof r!="object")return null;const o={};for(const[d,h]of Object.entries(r))typeof h=="number"&&(o[d]=h);return Object.keys(o).length>0?o:null}function il(n){const r=n.indexOf(":");return r>=0?n.slice(r+1):n}function Tg(n){var c;const r=(c=n.metadata)==null?void 0:c.tokens;if(!r||typeof r!="object")return null;const o=r;return typeof o.input!="number"?null:{input:o.input,output:typeof o.output=="number"?o.output:0,reasoning:typeof o.reasoning=="number"?o.reasoning:0}}function Zj(n){var o;const r=(o=n.metadata)==null?void 0:o.agentCalls;return typeof r=="number"?r:0}function wd(n){const r={input:0,output:0,reasoning:0};for(const o of n.items){const c=Tg(o);c&&(r.input+=c.input,r.output+=c.output,r.reasoning+=c.reasoning)}return r}function Kd(n){const r=new Map;for(const o of n){const c=o.data,d=dn(c);if(d)for(const[h,m]of Object.entries(d))r.set(h,(r.get(h)??0)+m);else for(const h of Ea(c))r.set(h,(r.get(h)??0)+1)}return[...r.entries()].sort((o,c)=>c[1]-o[1])}function mx(n){const r={input:0,output:0,reasoning:0};for(const o of n){const c=wd(o);r.input+=c.input,r.output+=c.output,r.reasoning+=c.reasoning}return r}function px(n){return n.reduce((r,o)=>r+o.totalCost,0)}function Jj({summary:n,items:r,totalCost:o,scorerTypes:c}){const d=n.scorers?Object.entries(n.scorers):[];return d.length===0&&!n.timing&&o<=0?null:s.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[s.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))]",children:s.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Scorer Summary"})}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-[hsl(var(--border))]",children:[s.jsx("th",{className:"text-left px-4 py-2 font-medium w-48",children:"Metric"}),s.jsx("th",{className:"px-4 py-2 w-28"}),s.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"Mean"}),s.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"P50"}),s.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"P95"}),s.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"Min"}),s.jsx("th",{className:"text-right px-3 py-2 font-medium",children:"Max"})]})}),s.jsxs("tbody",{children:[d.map(([h,m])=>{const x=r.some(p=>!p.error&&p.scores[h]!=null);return s.jsxs("tr",{className:"border-b border-[hsl(var(--border))] last:border-b-0",children:[s.jsxs("td",{className:"px-4 py-2.5 font-mono text-[hsl(var(--foreground))]",children:[h,(c==null?void 0:c[h])==="llm"&&s.jsx("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-medium rounded bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400 align-middle",title:"LLM scorer — scores may vary between runs",children:"LLM"})]}),x?s.jsxs(s.Fragment,{children:[s.jsx("td",{className:"px-4 py-2.5",children:s.jsx("div",{className:"h-2 bg-[hsl(var(--secondary))] rounded-full overflow-hidden",children:s.jsx("div",{className:ne("h-full rounded-full transition-all",Lu(m.mean)),style:{width:`${m.mean*100}%`}})})}),s.jsx("td",{className:ne("px-3 py-2.5 text-right font-mono font-medium",Nt(m.mean)),children:m.mean.toFixed(3)}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:m.p50.toFixed(3)}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:m.p95.toFixed(3)}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:m.min.toFixed(3)}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:m.max.toFixed(3)})]}):s.jsx("td",{colSpan:6,className:"px-3 py-2.5 text-center text-[hsl(var(--muted-foreground))]",children:"No valid scores"})]},h)}),n.timing&&s.jsxs("tr",{className:"border-t border-[hsl(var(--border))]",children:[s.jsx("td",{className:"px-4 py-2.5 font-mono text-[hsl(var(--muted-foreground))]",children:"Timing"}),s.jsx("td",{className:"px-4 py-2.5"}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ft(n.timing.mean)}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ft(n.timing.p50)}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ft(n.timing.p95)}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ft(n.timing.min)}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ft(n.timing.max)})]})]})]})}),o>0&&s.jsx("div",{className:"px-4 py-2 border-t border-[hsl(var(--border))] bg-[hsl(var(--muted))]/50",children:s.jsxs("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:["Total cost: ",s.jsx("span",{className:"font-mono font-medium",children:dt(o)})]})})]})}function $j({items:n,scorerNames:r,onSelectItem:o,errorFilter:c,onErrorFilterChange:d,scorerFilter:h,onScorerFilterChange:m,threshold:x,onThresholdChange:p,sortField:y,onSortFieldChange:j,sortDir:v,onSortDirChange:T}){const E=x!==""?parseFloat(x):null,B=c!=="all"||h!==""&&E!=null&&!isNaN(E),L=b.useMemo(()=>n.map((M,D)=>({item:M,index:D})),[n]),U=b.useMemo(()=>{let M=L;return c==="errors"?M=M.filter(({item:D})=>!!D.error):c==="no-errors"&&(M=M.filter(({item:D})=>!D.error)),h&&E!=null&&!isNaN(E)&&(M=M.filter(({item:D})=>{const w=D.scores[h];return w!=null&&w<E})),M},[L,c,h,E]),_=b.useMemo(()=>{const M=[...U],D=v==="asc"?1:-1;return M.sort((w,k)=>{let A,Y;return y==="index"?(A=w.index,Y=k.index):y==="duration"?(A=w.item.duration??1/0,Y=k.item.duration??1/0):y==="cost"?(A=w.item.cost??1/0,Y=k.item.cost??1/0):(A=w.item.scores[y]??-1/0,Y=k.item.scores[y]??-1/0),(A-Y)*D}),M},[U,y,v]),J=[{value:"index",label:"Item #"},{value:"duration",label:"Duration"},{value:"cost",label:"Cost"},...r.map(M=>({value:M,label:M}))];return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"All Items"}),s.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))] font-mono tabular-nums",children:B?`${U.length} of ${n.length}`:String(n.length)}),B&&s.jsx("button",{onClick:()=>{d("all"),m(""),p("")},className:"text-xs text-[hsl(var(--primary))] hover:underline cursor-pointer",children:"Reset"})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsxs("select",{value:c,onChange:M=>d(M.target.value),className:"px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[s.jsx("option",{value:"all",children:"All"}),s.jsx("option",{value:"errors",children:"Errors"}),s.jsx("option",{value:"no-errors",children:"Passed"})]}),r.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("select",{value:h,onChange:M=>m(M.target.value),className:"px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[s.jsx("option",{value:"",children:"Score filter…"}),r.map(M=>s.jsx("option",{value:M,children:M},M))]}),h&&s.jsx("input",{type:"number",step:"0.1",min:"0",max:"1",placeholder:"< threshold",value:x,onChange:M=>p(M.target.value),className:"w-20 px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]"})]}),s.jsx("div",{className:"w-px h-4 bg-[hsl(var(--border))]"}),s.jsx("select",{value:y,onChange:M=>j(M.target.value),className:"px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:J.map(M=>s.jsx("option",{value:M.value,children:M.label},M.value))}),s.jsx("button",{onClick:()=>T(v==="asc"?"desc":"asc"),className:"px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",title:v==="asc"?"Ascending":"Descending",children:v==="asc"?"↑":"↓"})]})]}),_.length===0&&B&&s.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))] py-6 text-center",children:"No items match the current filters."}),_.length>0&&s.jsx("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"bg-[hsl(var(--muted))]",children:[s.jsx("th",{className:"text-left px-3 py-2.5 font-medium w-10",children:"#"}),s.jsx("th",{className:"text-left px-3 py-2.5 font-medium min-w-[180px]",children:"Input"}),r.map(M=>s.jsx("th",{className:"text-right px-2 py-2.5 font-medium font-mono max-w-24 truncate",title:M,children:M},M)),s.jsx("th",{className:"text-right px-3 py-2.5 font-medium w-16",children:"Duration"}),s.jsx("th",{className:"text-right px-3 py-2.5 font-medium w-16",children:"Cost"}),s.jsx("th",{className:"w-8"})]})}),s.jsx("tbody",{children:_.map(({item:M,index:D})=>s.jsxs("tr",{onClick:()=>o(D),className:"border-t border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))] cursor-pointer transition-colors group",children:[s.jsxs("td",{className:"px-3 py-2 font-mono text-[hsl(var(--muted-foreground))]",children:[D+1,M.error&&s.jsx("span",{className:"ml-1 text-red-500",title:"Workflow error",children:"!"}),!M.error&&M.scorerErrors&&M.scorerErrors.length>0&&s.jsx("span",{className:"ml-1 text-amber-500",title:"Scorer errors",children:"!"})]}),s.jsx("td",{className:"px-3 py-2 max-w-xs",children:s.jsx("span",{className:"text-[11px] leading-tight text-[hsl(var(--muted-foreground))] truncate block group-hover:text-[hsl(var(--foreground))] transition-colors",children:ni(M.input)})}),r.map(w=>{const k=M.scores[w];return s.jsx("td",{className:"text-right px-2 py-2 font-mono",children:k!=null?s.jsx("span",{className:ne("font-medium tabular-nums",Nt(k)),children:k.toFixed(2)}):s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"—"})},w)}),s.jsx("td",{className:"text-right px-3 py-2 font-mono text-[hsl(var(--muted-foreground))]",children:M.duration!=null?ft(M.duration):"—"}),s.jsx("td",{className:"text-right px-3 py-2 font-mono text-[hsl(var(--muted-foreground))]",children:M.cost!=null&&M.cost>0?dt(M.cost):"—"}),s.jsx("td",{className:"px-2 py-2",children:s.jsx(Kl,{size:12,className:"text-[hsl(var(--muted-foreground))] opacity-0 group-hover:opacity-60 transition-opacity"})})]},D))})]})})})]})}const xx=300;function Fj({text:n}){const[r,o]=b.useState(!1),c=n.length>xx;return s.jsxs("div",{children:[s.jsx("pre",{className:"text-xs font-mono p-3 rounded-lg bg-[hsl(var(--secondary))] overflow-auto max-h-96 whitespace-pre-wrap leading-relaxed",children:c&&!r?n.slice(0,xx)+"…":n}),c&&s.jsx("button",{onClick:()=>o(!r),className:"text-xs text-[hsl(var(--primary))] hover:underline mt-1.5 cursor-pointer",children:r?"Show less":"Show more"})]})}function od({label:n,data:r}){return s.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[s.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))]/50 border-b border-[hsl(var(--border))]",children:s.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:n})}),s.jsx("div",{className:"p-4",children:s.jsx(Mt,{data:r,collapsed:!0})})]})}function Wj({item:n,itemIndex:r,scorerNames:o,onBack:c}){const d=n.scorerErrors??[],h=Kj(n),m=Tg(n),x=Zj(n),p=n.cost??0,y=n.scorerCost??0,j=p+y;return s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("nav",{className:"flex items-center gap-1.5 text-sm",children:[s.jsx("button",{onClick:c,className:"text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors cursor-pointer",children:"Overview"}),s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"/"}),s.jsxs("span",{className:"font-medium",children:["Item #",r+1]}),n.error&&s.jsx("span",{className:"ml-1 inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-950/30",children:"Error"})]}),s.jsxs("div",{className:"flex items-center gap-2 text-xs text-[hsl(var(--muted-foreground))] font-mono",children:[h.length>0&&h.map(v=>s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] text-[10px] font-medium",title:v,children:il(v)},v)),m&&s.jsxs("span",{title:`Input: ${m.input.toLocaleString()} Output: ${m.output.toLocaleString()}${m.reasoning?` Reasoning: ${m.reasoning.toLocaleString()}`:""}`,children:[(m.input+m.output+m.reasoning).toLocaleString()," tok"]}),x>1&&s.jsxs("span",{title:`${x} agent calls for this item`,children:[x," calls"]}),n.duration!=null&&s.jsx("span",{children:ft(n.duration)}),j>0&&s.jsx("span",{children:dt(j)})]})]}),o.length>0&&s.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 py-3 px-4 rounded-xl bg-[hsl(var(--muted))]/50",children:o.map(v=>{const T=n.scores[v];return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:v}),T!=null?s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-12 h-1.5 bg-[hsl(var(--secondary))] rounded-full overflow-hidden",children:s.jsx("div",{className:ne("h-full rounded-full",Lu(T)),style:{width:`${T*100}%`}})}),s.jsx("span",{className:ne("text-xs font-mono font-medium tabular-nums",Nt(T)),children:T.toFixed(2)})]}):s.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))] font-mono",children:"—"})]},v)})}),n.error&&s.jsx("div",{className:"p-3 rounded-xl bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 text-xs font-mono",children:n.error}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3",children:[s.jsx(od,{label:"Input",data:n.input}),s.jsx(od,{label:"Output",data:n.output})]}),n.annotations!=null&&s.jsx(od,{label:"Expected (Annotations)",data:n.annotations}),j>0&&p>0&&y>0&&s.jsxs("div",{className:"flex items-center gap-3 text-xs text-[hsl(var(--muted-foreground))] font-mono",children:[s.jsxs("span",{children:["Workflow: ",dt(p)]}),s.jsx("span",{children:"+"}),s.jsxs("span",{children:["Scoring: ",dt(y)]}),s.jsx("span",{children:"="}),s.jsx("span",{className:"font-medium text-[hsl(var(--foreground))]",children:dt(j)})]}),o.length>0&&s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Scorer Results"}),o.map(v=>{var L;const T=n.scores[v],E=(L=n.scoreDetails)==null?void 0:L[v],B=d.find(U=>U.includes(`"${v}"`));return s.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 bg-[hsl(var(--muted))]/50",children:[s.jsx("span",{className:"font-mono text-xs font-medium",children:v}),T!=null&&s.jsx("span",{className:ne("px-2 py-0.5 rounded-full text-xs font-mono font-medium",ku(T)),children:T.toFixed(3)}),T==null&&!B&&s.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-mono bg-[hsl(var(--secondary))] text-[hsl(var(--muted-foreground))]",children:"null"}),s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[(E==null?void 0:E.duration)!=null&&s.jsx("span",{className:"text-xs font-mono text-[hsl(var(--muted-foreground))]",children:ft(E.duration)}),(E==null?void 0:E.cost)!=null&&E.cost>0&&s.jsx("span",{className:"text-xs font-mono text-[hsl(var(--muted-foreground))]",children:dt(E.cost)})]})]}),((E==null?void 0:E.metadata)||B)&&s.jsxs("div",{className:"px-4 py-3 space-y-2",children:[(E==null?void 0:E.metadata)&&typeof E.metadata.reasoning=="string"&&E.metadata.reasoning.length>0&&s.jsxs("div",{children:[s.jsx("span",{className:"text-[11px] font-medium text-[hsl(var(--muted-foreground))] block mb-1.5 uppercase tracking-wider",children:"Reasoning"}),s.jsx(Fj,{text:E.metadata.reasoning})]}),(E==null?void 0:E.metadata)&&(()=>{const U=Object.keys(E.metadata).filter(J=>J!=="reasoning");if(U.length===0)return null;const _={};for(const J of U)_[J]=E.metadata[J];return s.jsxs("div",{children:[s.jsx("span",{className:"text-[11px] font-medium text-[hsl(var(--muted-foreground))] block mb-1.5 uppercase tracking-wider",children:"Metadata"}),s.jsx(Mt,{data:_,collapsed:!0})]})})(),B&&s.jsx("div",{className:"text-xs text-amber-600 dark:text-amber-400 font-mono p-2.5 rounded-lg bg-amber-50 dark:bg-amber-950/30",children:B})]})]},v)})]})]})}function Ij(n,r){const o=r.map(c=>n.scores[c]).filter(c=>c!=null);return o.length===0?null:o.reduce((c,d)=>c+d,0)/o.length}function Pj({items:n,scorerNames:r,selectedIndex:o,onSelectItem:c,onDeselectItem:d}){const h=b.useMemo(()=>n.map((x,p)=>({item:x,index:p,avg:Ij(x,r),label:ni(x.input,60)})),[n,r]),m=n.filter(x=>x.error).length;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsx("div",{className:"shrink-0 px-4 py-3 border-b border-[hsl(var(--border))]",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("button",{onClick:d,className:ne("text-xs font-medium transition-colors cursor-pointer",o==null?"text-[hsl(var(--foreground))]":"text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]"),children:[n.length," items"]}),m>0?s.jsxs("span",{className:"text-[10px] font-medium text-red-600 dark:text-red-400",children:[m," failed"]}):s.jsx("span",{className:"text-[10px] font-medium text-emerald-600 dark:text-emerald-400",children:"all passed"})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto",children:h.map(({item:x,index:p,avg:y,label:j})=>{const v=o===p;return s.jsxs("button",{onClick:()=>c(p),className:ne("w-full text-left px-4 py-2.5 flex items-center gap-3 border-b border-[hsl(var(--border))]/50 transition-colors group cursor-pointer",v?"bg-[hsl(var(--accent))] border-l-2 border-l-[hsl(var(--foreground))]":"hover:bg-[hsl(var(--accent))]/50 border-l-2 border-l-transparent"),children:[s.jsx("span",{className:ne("text-[10px] font-mono w-5 shrink-0",v?"text-[hsl(var(--foreground))] font-medium":"text-[hsl(var(--muted-foreground))]"),children:p+1}),s.jsx("span",{className:ne("flex-1 text-xs truncate leading-snug",v?"text-[hsl(var(--foreground))]":"text-[hsl(var(--muted-foreground))] group-hover:text-[hsl(var(--foreground))]"),children:j}),x.error&&s.jsx("span",{className:"text-[10px] text-red-500 shrink-0",title:"Workflow error",children:"!"}),!x.error&&x.scorerErrors&&x.scorerErrors.length>0&&s.jsx("span",{className:"text-[10px] text-amber-500 shrink-0",title:"Scorer errors",children:"!"}),y!=null?s.jsx("span",{className:ne("text-[11px] font-mono font-medium shrink-0 tabular-nums",Nt(y)),children:y.toFixed(2)}):s.jsx("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))] shrink-0",children:"-"}),s.jsx(Kl,{size:12,className:ne("shrink-0 transition-all",v?"text-[hsl(var(--foreground))] opacity-100":"text-[hsl(var(--muted-foreground))] opacity-0 group-hover:opacity-60")})]},p)})})]})}function eN({name:n,scores:r,mean:o}){return r.length===0?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"w-28 text-xs font-mono truncate text-[hsl(var(--muted-foreground))]",title:n,children:n}),s.jsx("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"No valid scores"})]}):s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"w-28 text-xs font-mono truncate",title:n,children:n}),s.jsxs("div",{className:"flex-1 h-5 relative bg-[hsl(var(--secondary))] rounded",children:[[.25,.5,.75].map(c=>s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-[hsl(var(--border))]",style:{left:`${c*100}%`}},c)),r.map((c,d)=>s.jsx("div",{className:ne("absolute w-1 top-[3px] bottom-[3px] rounded-sm",Lu(c)),style:{left:`${Math.max(1,Math.min(99,c*100))}%`,transform:"translateX(-50%)",opacity:.45},title:c.toFixed(3)},d)),s.jsx("div",{className:"absolute top-0 bottom-0 w-0.5 bg-[hsl(var(--foreground))]",style:{left:`${o*100}%`,opacity:.3},title:`Mean: ${o.toFixed(3)}`})]}),s.jsx("span",{className:"w-12 text-xs font-mono text-right text-[hsl(var(--muted-foreground))] tabular-nums",children:o.toFixed(3)})]})}function tN({items:n,scorerNames:r}){const o=b.useMemo(()=>r.map(c=>{const d=[];for(const m of n){const x=m.scores[c];x!=null&&!m.error&&d.push(x)}const h=d.length>0?d.reduce((m,x)=>m+x,0)/d.length:0;return{name:c,scores:d,mean:h}}),[n,r]);return r.length===0?null:s.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[s.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))]",children:s.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Score Distribution"})}),s.jsxs("div",{className:"p-4 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsx("span",{className:"w-28"}),s.jsxs("div",{className:"flex-1 flex justify-between text-[10px] font-mono text-[hsl(var(--muted-foreground))]",children:[s.jsx("span",{children:"0"}),s.jsx("span",{children:"0.25"}),s.jsx("span",{children:"0.5"}),s.jsx("span",{children:"0.75"}),s.jsx("span",{children:"1.0"})]}),s.jsx("span",{className:"w-12"})]}),o.map(c=>s.jsx(eN,{name:c.name,scores:c.scores,mean:c.mean},c.name))]})]})}function wu({field:n,current:r,dir:o,onSort:c,align:d,className:h,children:m}){const x=r===n;return s.jsxs("th",{className:ne(d==="right"?"text-right":"text-left","px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",h,d==="left"&&"px-4"),onClick:()=>c(n),children:[m,x&&s.jsx("span",{className:"ml-0.5",children:o==="desc"?"▼":"▲"})]})}function lN({baseline:n,candidate:r,scorerNames:o,baselineRuns:c,candidateRuns:d,scorerTypes:h}){const[m,x]=b.useState(o[0]??""),[p,y]=b.useState("delta"),[j,v]=b.useState("desc"),[T,E]=b.useState(!1),B=c&&c.length>1||d&&d.length>1,L=(c==null?void 0:c.length)??1,U=(d==null?void 0:d.length)??1,[_,J]=b.useState(null),M=k=>{p===k?v(A=>A==="desc"?"asc":"desc"):(y(k),v(k==="index"?"asc":"desc"))},D=Math.min(n.items.length,r.items.length),w=b.useMemo(()=>{var Y,R,F,se;const k=[],A=Math.min((c==null?void 0:c.length)??0,(d==null?void 0:d.length)??0);for(let I=0;I<D;I++){const re=n.items[I].scores[m]??null,ve=r.items[I].scores[m]??null,pe=re!=null&&ve!=null?ve-re:0;let G;if(A>1){G=[];for(let W=0;W<A;W++){const ee=(R=(Y=c[W])==null?void 0:Y.items[I])==null?void 0:R.scores[m],fe=(se=(F=d[W])==null?void 0:F.items[I])==null?void 0:se.scores[m];ee!=null&&fe!=null&&G.push(fe-ee)}}k.push({index:I,input:n.items[I].input,baselineScore:re,candidateScore:ve,delta:pe,runDeltas:G})}return k.sort((I,re)=>{let ve,pe;switch(p){case"index":ve=I.index,pe=re.index;break;case"baseline":ve=I.baselineScore??-1,pe=re.baselineScore??-1;break;case"candidate":ve=I.candidateScore??-1,pe=re.candidateScore??-1;break;case"delta":default:ve=Math.abs(I.delta),pe=Math.abs(re.delta);break}return j==="desc"?pe-ve:ve-pe}),k},[n,r,m,p,j,D,c,d]);return o.length===0||D===0?null:s.jsxs("div",{className:"border border-[hsl(var(--border))] rounded-xl overflow-hidden",children:[s.jsxs("button",{onClick:()=>E(k=>!k),className:"w-full flex items-center gap-2 px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",children:[T?s.jsx(Kl,{className:"h-3.5 w-3.5 text-[hsl(var(--muted-foreground))]"}):s.jsx(Ys,{className:"h-3.5 w-3.5 text-[hsl(var(--muted-foreground))]"}),s.jsxs("h3",{className:"text-xs font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:["All Items (",D,")",B&&s.jsxs("span",{className:"normal-case tracking-normal font-normal ml-1.5 opacity-70",children:["—"," scores averaged across"," ",L===U?`${L} runs`:`${L} / ${U} runs`]})]})]}),!T&&s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center gap-1.5 px-4 py-2 border-b border-[hsl(var(--border))] bg-[hsl(var(--card))] flex-wrap",children:o.map(k=>s.jsxs("button",{onClick:()=>x(k),className:ne("px-2 py-1 text-[11px] font-mono rounded-md transition-colors cursor-pointer",m===k?"bg-[hsl(var(--foreground))] text-[hsl(var(--background))] font-medium":"bg-[hsl(var(--secondary))] text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--foreground))]"),children:[k,(h==null?void 0:h[k])==="llm"&&s.jsx("span",{className:"ml-1 text-[8px] opacity-70",children:"LLM"})]},k))}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-[hsl(var(--border))]",children:[s.jsx(wu,{field:"index",current:p,dir:j,onSort:M,align:"left",className:"w-10",children:"#"}),s.jsx("th",{className:"text-left px-3 py-2 font-medium",children:"Input"}),s.jsxs(wu,{field:"baseline",current:p,dir:j,onSort:M,align:"right",children:["Baseline",B&&L>1&&s.jsxs("span",{className:"font-normal opacity-60 ml-0.5",children:["(",L,")"]})]}),s.jsxs(wu,{field:"candidate",current:p,dir:j,onSort:M,align:"right",children:["Candidate",B&&U>1&&s.jsxs("span",{className:"font-normal opacity-60 ml-0.5",children:["(",U,")"]})]}),s.jsx(wu,{field:"delta",current:p,dir:j,onSort:M,align:"right",children:"Delta"})]})}),s.jsx("tbody",{children:w.map(k=>{const A=_===k.index,Y=k.delta>0?"text-emerald-600 dark:text-emerald-400":k.delta<0?"text-red-600 dark:text-red-400":"text-[hsl(var(--muted-foreground))]";return s.jsxs("tr",{className:ne("border-b border-[hsl(var(--border))] last:border-b-0 cursor-pointer hover:bg-[hsl(var(--accent))] transition-colors",A&&"bg-[hsl(var(--accent))]"),children:[s.jsx("td",{className:"px-4 py-2.5 font-mono text-[hsl(var(--muted-foreground))]",onClick:()=>J(A?null:k.index),children:k.index+1}),s.jsx("td",{className:"px-3 py-2.5 max-w-xs truncate",onClick:()=>J(A?null:k.index),children:ni(k.input)}),s.jsx("td",{className:ne("px-3 py-2.5 text-right font-mono",k.baselineScore!=null?Nt(k.baselineScore):"text-[hsl(var(--muted-foreground))]"),onClick:()=>J(A?null:k.index),children:k.baselineScore!=null?k.baselineScore.toFixed(3):"—"}),s.jsx("td",{className:ne("px-3 py-2.5 text-right font-mono",k.candidateScore!=null?Nt(k.candidateScore):"text-[hsl(var(--muted-foreground))]"),onClick:()=>J(A?null:k.index),children:k.candidateScore!=null?k.candidateScore.toFixed(3):"—"}),s.jsxs("td",{className:ne("px-3 py-2.5 text-right",Y),onClick:()=>J(A?null:k.index),children:[s.jsx("div",{className:"font-mono",children:k.delta!==0?`${k.delta>0?"+":""}${k.delta.toFixed(3)}`:"—"}),k.runDeltas&&k.runDeltas.length>1&&s.jsxs("div",{className:"flex items-center justify-end gap-0.5 mt-1",title:k.runDeltas.map((R,F)=>`Run ${F+1}: ${R>=0?"+":""}${R.toFixed(3)}`).join(", "),children:[k.runDeltas.map((R,F)=>s.jsx("div",{className:ne("w-1.5 h-1.5 rounded-full",R<0?"bg-red-500 dark:bg-red-400":R>0?"bg-emerald-500 dark:bg-emerald-400":"bg-[hsl(var(--muted-foreground))]")},F)),s.jsxs("span",{className:"text-[9px] text-[hsl(var(--muted-foreground))] ml-0.5",children:[k.runDeltas.filter(R=>k.delta<0?R<0:R>0).length,"/",k.runDeltas.length]})]})]})]},k.index)})})]})}),_!=null&&_<n.items.length&&_<r.items.length&&s.jsx(wg,{baselineItem:n.items[_],candidateItem:r.items[_],scorer:m,baselineRunItems:c==null?void 0:c.map(k=>k.items[_]).filter(Boolean),candidateRunItems:d==null?void 0:d.map(k=>k.items[_]).filter(Boolean)})]})]})}function aN({text:n,children:r}){return s.jsxs("span",{className:"relative group/tip cursor-help",children:[r,s.jsx("span",{className:"invisible group-hover/tip:visible absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 px-2.5 py-1.5 text-[10px] leading-snug rounded-md bg-[hsl(var(--foreground))] text-[hsl(var(--background))] whitespace-normal w-56 z-50 shadow-md pointer-events-none",children:n})]})}function gx({value:n,percent:r,invert:o,format:c}){const d=o?n<0:n>0,h=o?n>0:n<0,m=d?"text-emerald-600 dark:text-emerald-400":h?"text-red-600 dark:text-red-400":"text-[hsl(var(--muted-foreground))]",x=c?`${n>0?"+":n<0?"-":""}${c(Math.abs(n))}`:`${n>0?"+":""}${Math.abs(n)<100?n.toFixed(3):n.toFixed(0)}`,p=`${r>0?"+":""}${r.toFixed(1)}%`;return s.jsx("td",{className:ne("px-3 py-2.5 text-right",m),children:s.jsxs("div",{className:"font-mono",children:[x," (",p,")"]})})}function vx(n){return(n>=0?"+":"")+n.toFixed(4)}function nN({compareResult:n,baseline:r,candidate:o,isGroupComparison:c,baselineRuns:d,candidateRuns:h}){var F,se;const[m,x]=b.useState(null),[p,y]=b.useState("delta"),[j,v]=b.useState("desc"),[T,E]=b.useState({}),B=(I,re)=>{(m==null?void 0:m.type)===I&&(m==null?void 0:m.index)===re?x(null):x({type:I,index:re})},L=((F=r==null?void 0:r.metadata)==null?void 0:F.scorerTypes)??((se=o==null?void 0:o.metadata)==null?void 0:se.scorerTypes),U=(d==null?void 0:d.length)??1,_=(h==null?void 0:h.length)??1,J=c?`averaged across ${U===_?`${U} runs`:`${U} / ${_} runs`}`:null,M=b.useMemo(()=>{const I=Object.entries(n.scorers);return I.sort((re,ve)=>{if(p==="delta"){const W=re[1].significant===!0?1:0,ee=ve[1].significant===!0?1:0;if(W!==ee)return ee-W}let pe,G;switch(p){case"metric":return j==="asc"?re[0].localeCompare(ve[0]):ve[0].localeCompare(re[0]);case"baseline":pe=re[1].baselineMean,G=ve[1].baselineMean;break;case"candidate":pe=re[1].candidateMean,G=ve[1].candidateMean;break;case"delta":default:pe=Math.abs(re[1].delta),G=Math.abs(ve[1].delta);break}return j==="desc"?G-pe:pe-G}),I},[n.scorers,p,j]),D=M.some(([,I])=>I.ci!=null),w=I=>{p===I?v(re=>re==="desc"?"asc":"desc"):(y(I),v("desc"))},k=I=>p===I?j==="desc"?" ▼":" ▲":"",A=M.filter(([,I])=>I.significant===!0).length,Y=n.regressions.length,R=n.improvements.length;return s.jsxs("div",{className:"space-y-6",children:[M.length>0&&(()=>{const I=M.some(([,W])=>W.significant===!0&&W.delta<0),re=M.some(([,W])=>W.significant===!0&&W.delta>0),ve=n.regressions.length>0,pe=M.every(([,W])=>W.significant===!1),G=(W,ee)=>{const fe=ee.delta<0?ee.pRegression!=null?`${Math.round(ee.pRegression*100)}%`:null:ee.pImprovement!=null?`${Math.round(ee.pImprovement*100)}%`:null,Se=`${ee.delta>0?"+":""}${ee.delta.toFixed(3)}`;return`${W} ${Se}${fe?` (${fe} probability)`:""}`};if(I){const W=M.filter(([,ee])=>ee.significant===!0&&ee.delta<0);return s.jsxs("div",{className:"flex items-start gap-2.5 px-4 py-3 rounded-xl border border-red-200 dark:border-red-900 bg-red-50 dark:bg-red-950/30",children:[s.jsx("div",{className:"h-6 w-6 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center shrink-0 mt-0.5",children:s.jsx("span",{className:"text-red-600 dark:text-red-400 text-xs font-bold",children:"✕"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200",children:"Significant regression detected"}),s.jsx("p",{className:"text-xs text-red-600 dark:text-red-400 mt-0.5",children:W.map(([ee,fe])=>G(ee,fe)).join("; ")})]})]})}if(re){const W=M.filter(([,ee])=>ee.significant===!0&&ee.delta>0);return s.jsxs("div",{className:"flex items-start gap-2.5 px-4 py-3 rounded-xl border border-emerald-200 dark:border-emerald-900 bg-emerald-50 dark:bg-emerald-950/30",children:[s.jsx("div",{className:"h-6 w-6 rounded-full bg-emerald-100 dark:bg-emerald-900/50 flex items-center justify-center shrink-0 mt-0.5",children:s.jsx("span",{className:"text-emerald-600 dark:text-emerald-400 text-xs font-bold",children:"✓"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-emerald-800 dark:text-emerald-200",children:"Significant improvement detected"}),s.jsx("p",{className:"text-xs text-emerald-600 dark:text-emerald-400 mt-0.5",children:W.map(([ee,fe])=>G(ee,fe)).join("; ")})]})]})}return ve&&pe?s.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 rounded-xl border border-amber-200 dark:border-amber-900 bg-amber-50 dark:bg-amber-950/30",children:[s.jsx("div",{className:"h-6 w-6 rounded-full bg-amber-100 dark:bg-amber-900/50 flex items-center justify-center shrink-0",children:s.jsx("span",{className:"text-amber-600 dark:text-amber-400 text-xs font-bold",children:"~"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:[n.regressions.length," item regressions, but not statistically significant"]}),s.jsx("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:c?"Even with pooled multi-run data, the score differences are within normal variation.":"Score differences are within normal LLM variation. Consider multi-run for stronger confidence."})]})]}):s.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--muted))]",children:[s.jsx("div",{className:"h-6 w-6 rounded-full bg-emerald-100 dark:bg-emerald-900/50 flex items-center justify-center shrink-0",children:s.jsx("span",{className:"text-emerald-600 dark:text-emerald-400 text-xs font-bold",children:"✓"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"No significant changes"}),s.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:"Scores are stable between baseline and candidate"})]})]})})(),(()=>{const I=(Qe,Lt)=>{const ol=Lt&&Lt.length>0?Lt:Qe?[Qe]:[],at=new Set;for(const Ot of ol)for(const ht of Ea(Ot))at.add(ht);return[...at]},re=d&&d.length>0?d:r?[r]:[],ve=h&&h.length>0?h:o?[o]:[],pe=I(r,d),G=I(o,h),W=mx(re),ee=mx(ve),fe=W.input+W.output+W.reasoning,Se=ee.input+ee.output+ee.reasoning,C=px(re),V=px(ve),le=pe.length>0||G.length>0,ue=fe>0&&Se>0,ye=C>0||V>0;if(!le&&!ue&&!ye)return null;const be=new Set(pe),ae=new Set(G),Me=be.size!==ae.size||pe.some(Qe=>!ae.has(Qe)),Ee=fe>0?(Se-fe)/fe*100:0;return s.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 rounded-lg bg-[hsl(var(--muted))]/50 text-xs flex-wrap",children:[le&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-[hsl(var(--muted-foreground))] uppercase tracking-wider text-[10px] font-medium shrink-0",children:"Models"}),s.jsx("div",{className:"flex items-center gap-1.5",children:pe.length>0?pe.map(Qe=>s.jsx("span",{className:"px-1.5 py-0.5 rounded border border-[hsl(var(--border))] bg-[hsl(var(--background))] font-mono",title:Qe,children:il(Qe)},Qe)):s.jsx("span",{className:"text-[hsl(var(--muted-foreground))] italic",children:"unknown"})}),s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"→"}),s.jsx("div",{className:"flex items-center gap-1.5",children:G.length>0?G.map(Qe=>s.jsx("span",{className:ne("px-1.5 py-0.5 rounded font-mono",Me?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"border border-[hsl(var(--border))] bg-[hsl(var(--background))]"),title:Qe,children:il(Qe)},Qe)):s.jsx("span",{className:"text-[hsl(var(--muted-foreground))] italic",children:"unknown"})}),Me&&s.jsx("span",{className:"text-[10px] font-medium text-blue-600 dark:text-blue-400",children:"changed"})]}),ue&&s.jsxs(s.Fragment,{children:[le&&s.jsx("span",{className:"text-[hsl(var(--border))]",children:"|"}),s.jsx("span",{className:"text-[hsl(var(--muted-foreground))] uppercase tracking-wider text-[10px] font-medium shrink-0",children:"Tokens"}),s.jsx("span",{className:"font-mono",children:fe.toLocaleString()}),s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"→"}),s.jsx("span",{className:"font-mono",children:Se.toLocaleString()}),Math.abs(Ee)>=1&&s.jsxs("span",{className:ne("text-[10px] font-medium",Ee>0?"text-red-600 dark:text-red-400":"text-emerald-600 dark:text-emerald-400"),children:[Ee>0?"+":"",Ee.toFixed(0),"%"]})]}),ye&&s.jsxs(s.Fragment,{children:[(le||ue)&&s.jsx("span",{className:"text-[hsl(var(--border))]",children:"|"}),s.jsx("span",{className:"text-[hsl(var(--muted-foreground))] uppercase tracking-wider text-[10px] font-medium shrink-0",children:"Cost"}),s.jsx("span",{className:"font-mono",children:dt(C)}),s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"→"}),s.jsx("span",{className:"font-mono",children:dt(V)}),C>0&&V>0&&(()=>{const Qe=(V-C)/C*100;return Math.abs(Qe)>=1?s.jsxs("span",{className:ne("text-[10px] font-medium",Qe>0?"text-red-600 dark:text-red-400":"text-emerald-600 dark:text-emerald-400"),children:[Qe>0?"+":"",Qe.toFixed(0),"%"]}):null})()]})]})})(),s.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[s.jsxs("div",{className:"px-3 py-2 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Significant"}),s.jsx("div",{className:"text-lg font-semibold mt-0.5",children:A})]}),s.jsxs("div",{className:"px-3 py-2 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Regressions"}),s.jsx("div",{className:ne("text-lg font-semibold mt-0.5",Y>0?"text-red-600 dark:text-red-400":""),children:Y})]}),s.jsxs("div",{className:"px-3 py-2 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Improvements"}),s.jsx("div",{className:ne("text-lg font-semibold mt-0.5",R>0?"text-emerald-600 dark:text-emerald-400":""),children:R})]}),n.cost&&s.jsxs("div",{className:"px-3 py-2 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Cost Delta"}),s.jsxs("div",{className:ne("text-lg font-semibold mt-0.5",n.cost.delta>0?"text-red-600 dark:text-red-400":n.cost.delta<0?"text-emerald-600 dark:text-emerald-400":""),children:[n.cost.delta>0?"+":"",dt(Math.abs(n.cost.delta))]})]})]}),M.length>0&&s.jsxs("div",{className:"border border-[hsl(var(--border))] rounded-xl overflow-hidden",children:[s.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))]",children:s.jsxs("h3",{className:"text-xs font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:["Scorer Comparison",J&&s.jsxs("span",{className:"normal-case tracking-normal font-normal ml-1.5 opacity-70",children:["—"," ",J]})]})}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-[hsl(var(--border))]",children:[s.jsxs("th",{className:"text-left px-4 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>w("metric"),children:["Metric",k("metric")]}),s.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>w("baseline"),children:["Baseline",c&&U>1&&s.jsxs("span",{className:"font-normal opacity-60 ml-0.5",children:["(",U,")"]}),k("baseline")]}),s.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>w("candidate"),children:["Candidate",c&&_>1&&s.jsxs("span",{className:"font-normal opacity-60 ml-0.5",children:["(",_,")"]}),k("candidate")]}),s.jsx("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>w("delta"),children:D?s.jsxs(aN,{text:"Score delta with 95% confidence interval via paired bootstrap. If the CI excludes zero and the effect exceeds the practical threshold, the difference is significant (shown with a colored left border).",children:["Delta",k("delta")]}):s.jsxs(s.Fragment,{children:["Delta",k("delta")]})})]})}),s.jsxs("tbody",{children:[M.map(([I,re])=>{const ve=re.delta>0?"+":(re.delta<0,""),pe=re.delta>0?"text-emerald-600 dark:text-emerald-400":re.delta<0?"text-red-600 dark:text-red-400":"text-[hsl(var(--muted-foreground))]";return s.jsxs("tr",{className:ne("border-b border-[hsl(var(--border))] last:border-b-0",re.significant===!0&&re.delta<0&&"border-l-[3px] border-l-red-500",re.significant===!0&&re.delta>0&&"border-l-[3px] border-l-emerald-500"),children:[s.jsxs("td",{className:"px-4 py-2.5 font-mono",children:[I,(L==null?void 0:L[I])==="llm"&&s.jsx("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-medium rounded bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400 align-middle",title:"LLM scorer — scores may vary between runs",children:"LLM"})]}),s.jsx("td",{className:ne("px-3 py-2.5 text-right font-mono",Nt(re.baselineMean)),children:re.baselineMean.toFixed(3)}),s.jsx("td",{className:ne("px-3 py-2.5 text-right font-mono",Nt(re.candidateMean)),children:re.candidateMean.toFixed(3)}),s.jsxs("td",{className:"px-3 py-2.5 text-right",children:[s.jsxs("div",{className:ne("font-mono",pe),children:[ve,Math.abs(re.delta).toFixed(3)," (",ve,Math.abs(re.deltaPercent).toFixed(1),"%)"]}),re.ci&&s.jsxs("div",{className:"font-mono text-[10px] text-[hsl(var(--muted-foreground))] mt-0.5",children:["CI [",vx(re.ci.lower),", ",vx(re.ci.upper),"]"]}),re.pRegression!=null&&re.pImprovement!=null&&(()=>{const G=re.pRegression??0,W=re.pImprovement??0;if(G===0&&W===0)return null;let ee,fe,Se;if(G>W)fe=G,ee="regression",Se=Math.round(fe*100)>=95?"text-red-600 dark:text-red-400":"text-[hsl(var(--muted-foreground))]";else if(W>G)fe=W,ee="improvement",Se=Math.round(fe*100)>=95?"text-emerald-600 dark:text-emerald-400":"text-[hsl(var(--muted-foreground))]";else return null;const C=Math.round(fe*100);return s.jsxs("div",{className:ne("text-[10px] mt-0.5",Se),children:[C,"% probability of ",ee,re.n!=null&&s.jsxs("span",{className:"opacity-60 ml-1",children:["(n=",re.n,")"]})]})})()]})]},I)}),n.timing&&s.jsxs("tr",{className:"border-t-2 border-[hsl(var(--border))]",children:[s.jsx("td",{className:"px-4 py-2.5 font-mono text-[hsl(var(--muted-foreground))]",children:"Timing (mean)"}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ft(n.timing.baselineMean)}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:ft(n.timing.candidateMean)}),s.jsx(gx,{value:n.timing.delta,percent:n.timing.deltaPercent,invert:!0,format:ft})]}),n.cost!=null&&s.jsxs("tr",{className:"border-t border-[hsl(var(--border))]",children:[s.jsx("td",{className:"px-4 py-2.5 font-mono text-[hsl(var(--muted-foreground))]",children:"Cost (total)"}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:dt(n.cost.baselineTotal)}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:dt(n.cost.candidateTotal)}),s.jsx(gx,{value:n.cost.delta,percent:n.cost.deltaPercent,invert:!0,format:dt})]})]})]})})]}),[{type:"regression",items:n.regressions,borderColor:"border-red-200 dark:border-red-900",bgColor:"bg-red-50 dark:bg-red-950/30",textColor:"text-red-700 dark:text-red-300",deltaColor:"text-red-600 dark:text-red-400",label:"Regressions",direction:-1},{type:"improvement",items:n.improvements,borderColor:"border-emerald-200 dark:border-emerald-900",bgColor:"bg-emerald-50 dark:bg-emerald-950/30",textColor:"text-emerald-700 dark:text-emerald-300",deltaColor:"text-emerald-600 dark:text-emerald-400",label:"Improvements",direction:1}].filter(I=>I.items.length>0).map(I=>{const re=d&&h&&d.length>1,ve=re?Math.min(d.length,h.length):0,pe=I.items.map((ae,Me)=>{var Qe,Lt,ol,at;let Ee=0;if(re)for(let Ot=0;Ot<ve;Ot++){const ht=(Lt=(Qe=d[Ot])==null?void 0:Qe.items[ae.itemIndex])==null?void 0:Lt.scores[ae.scorer],cl=(at=(ol=h[Ot])==null?void 0:ol.items[ae.itemIndex])==null?void 0:at.scores[ae.scorer];ht!=null&&cl!=null&&(I.direction<0?cl<ht:cl>ht)&&Ee++}return{...ae,originalIndex:Me,consistentCount:Ee,totalRuns:ve}});re?pe.sort((ae,Me)=>Me.consistentCount-ae.consistentCount||Math.abs(Me.delta)-Math.abs(ae.delta)):pe.sort((ae,Me)=>Math.abs(Me.delta)-Math.abs(ae.delta));const G=[...new Set(I.items.map(ae=>ae.scorer))],W=G.length===1?G[0]:null,ee=new Map;for(const ae of pe)ee.has(ae.scorer)||ee.set(ae.scorer,[]),ee.get(ae.scorer).push(ae);const fe=ae=>{const Me=(m==null?void 0:m.type)===I.type&&m.index===ae.originalIndex,Ee=r==null?void 0:r.items[ae.itemIndex],Qe=o==null?void 0:o.items[ae.itemIndex],Lt=ae.input?ni(ae.input,40):`Item #${ae.itemIndex+1}`,ol=re?ae.consistentCount===ve?"":ae.consistentCount===0?"opacity-40":"opacity-65":"";return s.jsxs("div",{className:ol,children:[s.jsxs("button",{onClick:()=>B(I.type,ae.originalIndex),className:"w-full text-left flex items-center gap-3 px-4 py-2.5 text-xs hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",children:[re&&s.jsxs("span",{className:ne("shrink-0 text-[10px] font-mono font-medium px-1.5 py-0.5 rounded",ae.consistentCount===ve?I.type==="regression"?"bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-300":"bg-emerald-100 dark:bg-emerald-900/40 text-emerald-700 dark:text-emerald-300":"bg-[hsl(var(--muted))] text-[hsl(var(--muted-foreground))]"),children:[ae.consistentCount,"/",ve]}),s.jsxs("span",{className:"min-w-0 truncate flex-1",children:[s.jsxs("span",{className:"font-mono text-[hsl(var(--muted-foreground))]",children:["#",ae.itemIndex+1]})," ",s.jsx("span",{children:Lt})]}),s.jsxs("span",{className:ne("font-mono shrink-0",I.deltaColor),children:[ae.baselineScore.toFixed(2)," ","→"," ",ae.candidateScore.toFixed(2)," ",s.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:["(",ae.delta>0?"+":"",ae.delta.toFixed(2),")"]})]})]}),Me&&Ee&&Qe&&s.jsx(wg,{baselineItem:Ee,candidateItem:Qe,scorer:ae.scorer,baselineRunItems:d==null?void 0:d.map(at=>at.items[ae.itemIndex]).filter(Boolean),candidateRunItems:h==null?void 0:h.map(at=>at.items[ae.itemIndex]).filter(Boolean)})]},ae.originalIndex)},Se=5;let C,V;if(re){const ae=Math.ceil(ve/2);C=pe.filter(Me=>Me.consistentCount>=ae),V=pe.filter(Me=>Me.consistentCount<ae)}else C=pe.slice(0,Se),V=pe.slice(Se);const le=T[I.type]??!1,ue=re?`${V.length} likely noise (minority of runs)`:`${V.length} more`,ye=ae=>{const Me=new Map;for(const Ee of ae)Me.has(Ee.scorer)||Me.set(Ee.scorer,[]),Me.get(Ee.scorer).push(Ee);return Me},be=ae=>{if(W)return s.jsx("div",{className:"divide-y divide-[hsl(var(--border))]",children:ae.map(fe)});const Me=ye(ae);return s.jsx("div",{children:[...Me.entries()].map(([Ee,Qe])=>s.jsxs("div",{children:[s.jsxs("div",{className:ne("px-4 py-2 border-b border-t border-[hsl(var(--border))]",I.type==="regression"?"bg-red-50/30 dark:bg-red-950/5":"bg-emerald-50/30 dark:bg-emerald-950/5"),children:[s.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:Ee}),s.jsxs("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))] ml-1.5",children:["(",Qe.length,")"]})]}),s.jsx("div",{className:"divide-y divide-[hsl(var(--border))]",children:Qe.map(fe)})]},Ee))})};return s.jsxs("div",{className:ne("border rounded-lg overflow-hidden",I.borderColor),children:[s.jsx("div",{className:ne("px-4 py-2.5 border-b",I.bgColor,I.borderColor),children:s.jsxs("h3",{className:ne("text-xs font-medium",I.textColor),children:[I.label," (",C.length,V.length>0?` + ${V.length} noise`:"",")",J&&s.jsxs("span",{className:"font-normal opacity-70 ml-1",children:[" — ","scores ",J]})]})}),C.length>0?be(C):s.jsxs("div",{className:"px-4 py-3 text-xs text-[hsl(var(--muted-foreground))]",children:["No reliable ",I.label.toLowerCase()," detected (all within noise)."]}),V.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:()=>E(ae=>({...ae,[I.type]:!le})),className:"w-full flex items-center justify-center gap-1.5 px-4 py-2 text-[11px] font-medium text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors border-t border-dashed border-[hsl(var(--border))] cursor-pointer",children:[le?s.jsx(C1,{className:"h-3 w-3"}):s.jsx(Ys,{className:"h-3 w-3"}),le?"Hide":"Show"," ",ue]}),le&&be(V)]})]},I.type)}),r&&o&&s.jsx(lN,{baseline:r,candidate:o,scorerNames:M.map(([I])=>I),baselineRuns:d??void 0,candidateRuns:h??void 0,scorerTypes:L})]})}function yx({label:n,item:r,scorer:o}){var h,m;const c=(h=r.scoreDetails)==null?void 0:h[o],d=typeof((m=c==null?void 0:c.metadata)==null?void 0:m.reasoning)=="string"?c.metadata.reasoning:null;return s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsx("h5",{className:"font-medium text-[hsl(var(--muted-foreground))] uppercase tracking-wider text-[10px]",children:n}),s.jsx(Mt,{data:r.output,collapsed:!0}),(c==null?void 0:c.score)!=null&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"Score:"}),s.jsx("span",{className:ne("px-2 py-0.5 rounded-full font-mono font-medium",ku(c.score)),children:c.score.toFixed(3)})]}),d&&s.jsxs("div",{children:[s.jsx("span",{className:"font-medium text-[hsl(var(--muted-foreground))] text-[10px] uppercase tracking-wider block mb-1",children:"Reasoning"}),s.jsx("pre",{className:"text-xs font-mono p-2 rounded-md bg-[hsl(var(--secondary))] overflow-auto max-h-48 whitespace-pre-wrap leading-relaxed",children:d})]})]})}function wg({baselineItem:n,candidateItem:r,scorer:o,baselineRunItems:c,candidateRunItems:d}){var E,B,L,U;const[h,m]=b.useState(0),x=c&&c.length>1||d&&d.length>1,p=Math.max((c==null?void 0:c.length)??1,(d==null?void 0:d.length)??1),y=x&&c?c[h]??n:n,j=x&&d?d[h]??r:r,v=(B=(E=n.scoreDetails)==null?void 0:E[o])==null?void 0:B.score,T=(U=(L=r.scoreDetails)==null?void 0:L[o])==null?void 0:U.score;return s.jsxs("div",{className:"border-t border-[hsl(var(--border))] bg-[hsl(var(--card))] text-xs",children:[x&&(v!=null||T!=null)&&s.jsxs("div",{className:"flex items-center gap-4 px-4 py-2 border-b border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[s.jsxs("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:["Mean across ",p," runs"]}),s.jsxs("div",{className:"flex items-center gap-3",children:[v!=null&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"Baseline:"}),s.jsx("span",{className:ne("font-mono font-medium",Nt(v)),children:v.toFixed(3)})]}),T!=null&&s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"Candidate:"}),s.jsx("span",{className:ne("font-mono font-medium",Nt(T)),children:T.toFixed(3)})]}),v!=null&&T!=null&&s.jsxs("span",{className:ne("font-mono",T-v>0?"text-emerald-600 dark:text-emerald-400":T-v<0?"text-red-600 dark:text-red-400":"text-[hsl(var(--muted-foreground))]"),children:["(",T-v>0?"+":"",(T-v).toFixed(3),")"]})]})]}),x&&s.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-[hsl(var(--border))] bg-[hsl(var(--muted))]",children:[s.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Run"}),s.jsx("div",{className:"flex items-center gap-0.5",children:Array.from({length:p},(_,J)=>s.jsx("button",{onClick:()=>m(J),className:ne("px-2 py-0.5 rounded text-[10px] font-mono transition-colors cursor-pointer",J===h?"bg-[hsl(var(--foreground))] text-[hsl(var(--background))]":"text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]"),children:J+1},J))}),s.jsxs("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))] ml-auto",children:["Showing output and reasoning from run ",h+1," of ",p]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-0",children:[s.jsx("div",{className:"border-r border-[hsl(var(--border))]",children:s.jsx(yx,{label:"Baseline",item:y,scorer:o})}),s.jsx(yx,{label:"Candidate",item:j,scorer:o})]})]})}function Uu(n){const r=Date.now()-n;return r<6e4?"just now":r<36e5?`${Math.floor(r/6e4)}m ago`:r<864e5?`${Math.floor(r/36e5)}h ago`:new Date(n).toLocaleDateString()}function Zd(n){return n.data.dataset??""}function sN(n){var r;return(r=n.data.metadata)==null?void 0:r.runGroupId}function rN(n){var d;const r=new Map,o=[];for(const h of n){const m=sN(h);m?(r.has(m)||r.set(m,[]),r.get(m).push(h)):o.push(h)}const c=[];for(const[h,m]of r){const x=m[0].data,p=Object.keys(((d=x.summary)==null?void 0:d.scorers)??{}),y={};for(const j of p){const v=m.map(T=>{var E,B,L;return((L=(B=(E=T.data.summary)==null?void 0:E.scorers)==null?void 0:B[j])==null?void 0:L.mean)??0});y[j]={mean:v.reduce((T,E)=>T+E,0)/v.length}}c.push({type:"group",groupId:h,entries:m.sort((j,v)=>v.timestamp-j.timestamp),evalName:m[0].eval,timestamp:Math.max(...m.map(j=>j.timestamp)),dataset:Zd(m[0]),runCount:m.length,aggregateScorers:y})}for(const h of o)c.push({type:"single",entry:h});return c.sort((h,m)=>{const x=h.type==="group"?h.timestamp:h.entry.timestamp;return(m.type==="group"?m.timestamp:m.entry.timestamp)-x}),c}function Jd({scorers:n}){const r=Object.entries(n);return r.length===0?null:s.jsx("div",{className:"flex items-center gap-0.5 shrink-0",children:r.map(([o,c])=>s.jsx("div",{className:"relative h-3.5 w-4 rounded-sm bg-[hsl(var(--muted))] overflow-hidden",title:`${o}: ${c.mean.toFixed(3)}`,children:s.jsx("div",{className:ne("absolute bottom-0 left-0 right-0 rounded-sm",Lu(c.mean)),style:{height:`${Math.max(0,Math.min(100,c.mean*100))}%`}})},o))})}function Md({data:n}){var c;const r=(c=n.summary)==null?void 0:c.scorers;if(!r)return null;const o={};for(const[d,h]of Object.entries(r))o[d]={mean:h.mean};return s.jsx(Jd,{scorers:o})}function iN({selection:n,history:r,pickerItems:o,placeholder:c}){if(!n)return s.jsx("span",{className:"text-sm text-[hsl(var(--muted-foreground))]",children:c});if(n.groupIds&&n.groupIds.length>1){const p=o.find(y=>y.type==="group"&&y.entries.some(j=>j.id===n.id));if(p&&p.type==="group"){const y=Kd(p.entries);return s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx(Jd,{scorers:p.aggregateScorers}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-sm font-medium truncate",children:p.evalName}),s.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-medium bg-violet-100 dark:bg-violet-900/40 text-violet-700 dark:text-violet-300",children:[s.jsx(Yd,{className:"h-2.5 w-2.5"}),p.runCount," runs"]}),y.map(([j,v])=>s.jsxs("span",{className:"px-1 py-0.5 rounded bg-[hsl(var(--secondary))] font-mono text-[9px]",title:`${j} — ${v} calls`,children:[il(j)," ",s.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:["(",v,")"]})]},j))]}),s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-[hsl(var(--muted-foreground))]",children:[s.jsx(dx,{className:"h-2.5 w-2.5"}),Uu(p.timestamp)]})]})]})}}const d=r.find(p=>p.id===n.id);if(!d)return s.jsx("span",{className:"text-sm text-[hsl(var(--muted-foreground))]",children:c});const h=d.data,m=Ea(h),x=dn(h);return s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx(Md,{data:h}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-sm font-medium truncate",children:d.eval}),m.map(p=>s.jsxs("span",{className:"px-1 py-0.5 rounded bg-[hsl(var(--secondary))] font-mono text-[9px]",title:x?`${p} — ${x[p]} calls`:p,children:[il(p),x&&s.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:[" (",x[p],")"]})]},p))]}),s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-[hsl(var(--muted-foreground))]",children:[s.jsx(dx,{className:"h-2.5 w-2.5"}),Uu(d.timestamp),s.jsx("span",{className:"opacity-50",children:"·"}),s.jsx("span",{className:"font-mono",children:d.id.slice(0,8)})]})]})]})}function bx({label:n,selection:r,pickerItems:o,disabledSelection:c,history:d,onChange:h,filterDataset:m}){const[x,p]=b.useState(!1),[y,j]=b.useState(null),v=b.useRef(null);b.useEffect(()=>{function B(L){v.current&&!v.current.contains(L.target)&&(p(!1),j(null))}return x&&document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[x]);const T=m?o.filter(B=>B.type==="group"?B.dataset===m:Zd(B.entry)===m):o,E=new Set((c==null?void 0:c.groupIds)??(c?[c.id]:[]));return s.jsxs("div",{ref:v,className:"flex-1 min-w-0 relative",children:[s.jsx("label",{className:"block text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))] mb-1.5",children:n}),s.jsxs("button",{onClick:()=>{p(!x),j(null)},className:ne("w-full px-3 py-2 rounded-lg border text-left flex items-center justify-between gap-2 transition-colors min-h-[44px] cursor-pointer",x?"border-[hsl(var(--foreground))] ring-1 ring-[hsl(var(--foreground))]":"border-[hsl(var(--input))] hover:border-[hsl(var(--foreground))/30]","bg-[hsl(var(--background))]"),children:[s.jsx(iN,{selection:r,history:d,pickerItems:o,placeholder:`Select ${n.toLowerCase()}...`}),s.jsx(Ys,{className:ne("h-3.5 w-3.5 shrink-0 text-[hsl(var(--muted-foreground))] transition-transform",x&&"rotate-180")})]}),x&&s.jsx("div",{className:"absolute z-50 top-full left-0 right-0 mt-1 max-h-72 overflow-y-auto rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--background))] shadow-lg",children:T.length===0?s.jsx("div",{className:"px-3 py-4 text-xs text-center text-[hsl(var(--muted-foreground))]",children:"No matching runs"}):T.map(B=>{var M;if(B.type==="group"){const D=y===B.groupId,w=(M=r==null?void 0:r.groupIds)==null?void 0:M.some(k=>B.entries.some(A=>A.id===k));return s.jsxs("div",{className:"border-b border-[hsl(var(--border))] last:border-b-0",children:[s.jsxs("div",{className:"flex items-stretch",children:[s.jsxs("button",{onClick:()=>{h({id:B.entries[0].id,groupIds:B.entries.map(k=>k.id)}),p(!1),j(null)},className:ne("flex-1 text-left px-3 py-2.5 flex items-center gap-2.5 transition-colors cursor-pointer",w?"bg-[hsl(var(--accent))]":"hover:bg-[hsl(var(--accent))]"),children:[s.jsx(Jd,{scorers:B.aggregateScorers}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium truncate",children:B.evalName}),s.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[9px] font-medium bg-violet-100 dark:bg-violet-900/40 text-violet-700 dark:text-violet-300",children:[s.jsx(Yd,{className:"h-2 w-2"}),B.runCount," runs"]}),Kd(B.entries).map(([k,A])=>s.jsxs("span",{className:"px-1 py-0.5 rounded bg-[hsl(var(--secondary))] font-mono text-[9px]",title:`${k} — ${A} calls`,children:[il(k)," ",s.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:["(",A,")"]})]},k))]}),s.jsxs("div",{className:"text-[10px] text-[hsl(var(--muted-foreground))]",children:[Uu(B.timestamp),s.jsxs("span",{className:"opacity-50",children:[" ","·"," "]}),"pooled comparison"]})]}),w&&s.jsx("div",{className:"shrink-0 h-1.5 w-1.5 rounded-full bg-[hsl(var(--foreground))]"})]}),s.jsx("button",{onClick:k=>{k.stopPropagation(),j(D?null:B.groupId)},className:"shrink-0 w-8 flex items-center justify-center border-l border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",title:D?"Hide individual runs":"Show individual runs",children:D?s.jsx(Ys,{className:"h-3 w-3 text-[hsl(var(--muted-foreground))]"}):s.jsx(Kl,{className:"h-3 w-3 text-[hsl(var(--muted-foreground))]"})})]}),D&&B.entries.map(k=>{var F;const A=k.data,Y=(r==null?void 0:r.id)===k.id&&!(r!=null&&r.groupIds),R=E.has(k.id);return s.jsxs("button",{onClick:()=>{h({id:k.id}),p(!1),j(null)},disabled:R,className:ne("w-full text-left pl-8 pr-3 py-2 flex items-center gap-2.5 transition-colors border-t border-[hsl(var(--border))] cursor-pointer","bg-[hsl(var(--muted))]/30",Y?"bg-[hsl(var(--accent))]":"hover:bg-[hsl(var(--accent))]",R&&"opacity-30 cursor-not-allowed"),children:[s.jsx(Md,{data:A}),s.jsx("div",{className:"min-w-0 flex-1",children:s.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-[hsl(var(--muted-foreground))]",children:[s.jsxs("span",{children:["Run ",(((F=A.metadata)==null?void 0:F.runIndex)??0)+1]}),s.jsx("span",{className:"opacity-50",children:"·"}),s.jsx("span",{className:"font-mono",children:k.id.slice(0,8)}),(()=>{const se=dn(A);return Ea(A).map(I=>s.jsxs("span",{className:"px-1 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] font-mono text-[9px]",title:se?`${I} — ${se[I]} calls`:I,children:[il(I),se&&s.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:[" ","(",se[I],")"]})]},I))})()]})}),Y&&s.jsx("div",{className:"shrink-0 h-1.5 w-1.5 rounded-full bg-[hsl(var(--foreground))]"})]},k.id)})]},B.groupId)}const{entry:L}=B,U=L.data,_=(r==null?void 0:r.id)===L.id,J=E.has(L.id);return s.jsxs("button",{onClick:()=>{h({id:L.id}),p(!1),j(null)},disabled:J,className:ne("w-full text-left px-3 py-2.5 flex items-center gap-2.5 transition-colors border-b border-[hsl(var(--border))] last:border-b-0 cursor-pointer",_?"bg-[hsl(var(--accent))]":"hover:bg-[hsl(var(--accent))]",J&&"opacity-30 cursor-not-allowed"),children:[s.jsx(Md,{data:U}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium truncate",children:L.eval}),(()=>{const D=dn(U);return Ea(U).map(w=>s.jsxs("span",{className:"px-1 py-0.5 rounded bg-[hsl(var(--secondary))] font-mono text-[9px]",title:D?`${w} — ${D[w]} calls`:w,children:[il(w),D&&s.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:[" ","(",D[w],")"]})]},w))})()]}),s.jsxs("div",{className:"text-[10px] text-[hsl(var(--muted-foreground))]",children:[Uu(L.timestamp),s.jsxs("span",{className:"opacity-50",children:[" ","·"," "]}),s.jsx("span",{className:"font-mono",children:L.id.slice(0,8)}),s.jsxs("span",{className:"opacity-50",children:[" ","·"," "]}),U.summary.count," items"]})]}),_&&s.jsx("div",{className:"shrink-0 h-1.5 w-1.5 rounded-full bg-[hsl(var(--foreground))]"})]},L.id)})})]})}function uN({history:n,baselineSelection:r,candidateSelection:o,onBaselineChange:c,onCandidateChange:d,onCompare:h,comparing:m}){const x=b.useMemo(()=>rN(n),[n]),p=r?n.find(v=>v.id===r.id):null,y=p?Zd(p):null,j=r!=null&&o!=null&&r.id!==o.id&&!m;return s.jsx("div",{className:"space-y-3",children:s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx(bx,{label:"Baseline",selection:r,pickerItems:x,disabledSelection:o,history:n,onChange:c,filterDataset:null}),s.jsx("button",{onClick:()=>{if(r&&o){const v=r;c(o),d(v)}},disabled:!r||!o,className:"shrink-0 p-2 rounded-lg border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] disabled:opacity-30 transition-colors mb-[1px] cursor-pointer",title:"Swap baseline and candidate",children:s.jsx(h1,{className:"h-3.5 w-3.5 text-[hsl(var(--muted-foreground))]"})}),s.jsx(bx,{label:"Candidate",selection:o,pickerItems:x,disabledSelection:r,history:n,onChange:d,filterDataset:y}),s.jsx("button",{onClick:h,disabled:!j,className:ne("shrink-0 px-5 py-2 text-sm font-medium rounded-lg transition-all cursor-pointer","bg-[hsl(var(--foreground))] text-[hsl(var(--background))]","hover:opacity-90 disabled:opacity-40"),children:m?"Comparing…":"Compare"})]})})}function oN({currentIndex:n,totalRuns:r,aggregate:o,onIndexChange:c}){const d=n===-1,h=n>-1,m=n<r-1;return s.jsx("div",{className:"px-6",children:s.jsxs("div",{className:"flex items-center justify-between px-4 py-2 rounded-lg bg-[hsl(var(--muted))]",children:[s.jsx("button",{onClick:()=>c(n-1),disabled:!h,className:"p-1 rounded hover:bg-[hsl(var(--accent))] disabled:opacity-30 transition-colors cursor-pointer",children:s.jsx(N1,{size:16})}),s.jsxs("div",{className:"text-center",children:[s.jsx("span",{className:"text-sm font-medium",children:d?`Aggregate (${r} runs)`:`Run ${n+1} of ${r}`}),!d&&s.jsx("button",{onClick:()=>c(-1),className:"ml-3 text-xs text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] underline transition-colors cursor-pointer",children:"View aggregate"}),d&&(()=>{const x=Object.values(o.scorers),p=x.reduce((y,j)=>y+j.mean,0)/Math.max(x.length,1);return s.jsxs("div",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:["Overall mean: ",p.toFixed(3)," across ",x.length," scorer",x.length!==1?"s":""]})})()]}),s.jsx("button",{onClick:()=>c(n+1),disabled:!m,className:"p-1 rounded hover:bg-[hsl(var(--accent))] disabled:opacity-30 transition-colors cursor-pointer",children:s.jsx(Kl,{size:16})})]})})}function cN(n){var h;const r={},o=[];for(const m of n){const x=m.data;if(!((h=x.summary)!=null&&h.scorers))continue;const p=[];for(const[y,j]of Object.entries(x.summary.scorers))r[y]||(r[y]=[]),r[y].push(j.mean),p.push(j.mean);p.length>0&&o.push(p.reduce((y,j)=>y+j,0)/p.length)}const c={};for(const[m,x]of Object.entries(r)){const p=x.reduce((j,v)=>j+v,0)/x.length,y=x.length>1?Math.sqrt(x.reduce((j,v)=>j+(v-p)**2,0)/(x.length-1)):0;c[m]={mean:p,std:y}}let d=null;if(o.length>0){const m=o.reduce((p,y)=>p+y,0)/o.length,x=o.length>1?Math.sqrt(o.reduce((p,y)=>p+(y-m)**2,0)/(o.length-1)):0;d={mean:m,std:x}}return{scorers:c,overall:d}}function dN({history:n,evalFilter:r,onEvalFilterChange:o,onSelect:c,onSelectGroup:d,onRescore:h,expandedGroups:m,onToggleGroup:x}){const[p,y]=b.useState(null),j=[...new Set(n.map(_=>_.eval))].sort(),v=b.useMemo(()=>r?n.filter(_=>_.eval===r):n,[n,r]),{rows:T,scorerCols:E}=b.useMemo(()=>{var w,k;const _=new Map,J=[];for(const A of v){const R=(w=A.data.metadata)==null?void 0:w.runGroupId;R?(_.has(R)||_.set(R,[]),_.get(R).push(A)):J.push(A)}const M=[];for(const[A,Y]of _)Y.sort((R,F)=>F.timestamp-R.timestamp),Y.length===1?M.push({type:"entry",entry:Y[0]}):M.push({type:"group",groupId:A,entries:Y,evalName:Y[0].eval,newestTimestamp:Y[0].timestamp});for(const A of J)M.push({type:"entry",entry:A});M.sort((A,Y)=>{const R=A.type==="group"?A.newestTimestamp:A.entry.timestamp;return(Y.type==="group"?Y.newestTimestamp:Y.entry.timestamp)-R});const D=new Set;for(const A of v){const Y=A.data;if((k=Y.summary)!=null&&k.scorers)for(const R of Object.keys(Y.summary.scorers))D.add(R)}return{rows:M,scorerCols:[...D].sort()}},[v]),B=b.useMemo(()=>{var J;const _={};for(const M of v){const w=(J=M.data.metadata)==null?void 0:J.scorerTypes;w&&Object.assign(_,w)}return _},[v]),L=8+E.length+(h?1:0),U=(_,J,M)=>{const D=_.data,w=p===_.id;return s.jsxs(b.Fragment,{children:[s.jsxs("tr",{"data-entry-id":_.id,className:ne("border-t border-[hsl(var(--border))] cursor-pointer hover:bg-[hsl(var(--accent))] transition-colors",M&&!J&&"bg-[hsl(var(--accent))]/30",w&&"bg-[hsl(var(--accent))]/40"),onClick:()=>y(w?null:_.id),children:[s.jsx("td",{className:ne("px-3 py-2.5 font-mono",J&&"pl-9"),children:s.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[J&&s.jsx("span",{className:"inline-block w-1 h-3 mr-0.5 rounded-sm bg-[hsl(var(--border))]"}),_.eval]})}),s.jsx("td",{className:"px-3 py-2.5",children:(()=>{const k=Ea(D);if(k.length===0)return s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"});const A=dn(D);return s.jsx("span",{className:"inline-flex items-center gap-1 flex-wrap",children:k.map(Y=>s.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] font-mono text-[10px]",title:A?`${Y} — ${A[Y]} calls`:Y,children:[il(Y),A&&A[Y]!=null&&s.jsxs("span",{className:"ml-0.5 text-[hsl(var(--muted-foreground))]",children:["(",A[Y],")"]})]},Y))})})()}),s.jsx("td",{className:"px-3 py-2.5 text-[hsl(var(--muted-foreground))]",children:new Date(_.timestamp).toLocaleString()}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono",children:D.summary.count}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono",children:D.summary.failures>0?s.jsx("span",{className:"text-red-600 dark:text-red-400",children:D.summary.failures}):s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"0"})}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:D.duration>0?ft(D.duration):"-"}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:D.totalCost>0?dt(D.totalCost):"-"}),(()=>{var Y;const k=Object.values(((Y=D.summary)==null?void 0:Y.scorers)??{}).map(R=>R.mean),A=k.length>0?k.reduce((R,F)=>R+F,0)/k.length:null;return s.jsx("td",{className:"px-3 py-2.5 text-right font-mono font-medium border-l border-[hsl(var(--border))]",children:A!=null?s.jsx("span",{className:Nt(A),children:A.toFixed(3)}):s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"})})})(),E.map(k=>{var Y,R;const A=(R=(Y=D.summary)==null?void 0:Y.scorers)==null?void 0:R[k];return s.jsx("td",{className:"px-3 py-2.5 text-right font-mono",children:A?s.jsxs("div",{children:[s.jsx("span",{className:Nt(A.mean),children:A.mean.toFixed(3)}),A.min!==A.max&&s.jsxs("div",{className:"text-[9px] text-[hsl(var(--muted-foreground))]",children:[A.min.toFixed(2),"–",A.max.toFixed(2)]})]}):s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"})},k)}),h&&s.jsx("td",{className:"px-3 py-2.5"})]}),w&&(()=>{var Y,R,F;const k=(Y=D.metadata)==null?void 0:Y.scorerTypes,A=(R=D.metadata)==null?void 0:R.originalId;return s.jsx("tr",{className:"border-t border-[hsl(var(--border))] bg-[hsl(var(--muted))]/50",children:s.jsx("td",{colSpan:L,className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-4 text-[10px] text-[hsl(var(--muted-foreground))] flex-wrap",children:[s.jsxs("span",{children:["ID: ",s.jsx("span",{className:"font-mono",children:D.id.slice(0,8)})]}),s.jsxs("span",{children:["Dataset:"," ",s.jsx("span",{className:"font-medium text-[hsl(var(--foreground))]",children:D.dataset})]}),s.jsxs("span",{children:["Workflow:"," ",s.jsx("span",{className:"font-medium text-[hsl(var(--foreground))]",children:D.workflow})]}),(()=>{const se=Ea(D);if(se.length===0)return null;const I=dn(D);return s.jsx("span",{className:"inline-flex items-center gap-1",children:se.map(re=>s.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] font-mono",title:I?`${re} — ${I[re]} calls`:re,children:[il(re),I&&I[re]!=null&&s.jsxs("span",{className:"ml-0.5 text-[hsl(var(--muted-foreground))]",children:["(",I[re],")"]})]},re))})})(),!!((F=D.metadata)!=null&&F.rescored)&&s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400",children:"Rescored"}),A&&s.jsxs("span",{children:["from"," ",s.jsx("button",{onClick:se=>{se.stopPropagation(),y(A),requestAnimationFrame(()=>{var I;(I=document.querySelector(`[data-entry-id="${CSS.escape(A)}"]`))==null||I.scrollIntoView({behavior:"smooth",block:"center"})})},className:"font-mono underline hover:text-[hsl(var(--foreground))] transition-colors cursor-pointer",children:A.slice(0,8)})]}),k&&Object.keys(k).length>0&&s.jsxs("span",{className:"inline-flex items-center gap-1.5",children:["Scorers:",Object.entries(k).sort(([se],[I])=>se.localeCompare(I)).map(([se,I])=>s.jsx("span",{className:ne("px-1.5 py-0.5 rounded font-mono cursor-default",I==="llm"?"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400":"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"),title:I==="llm"?`${se} — LLM scorer (scores may vary between runs)`:`${se} — deterministic scorer`,children:se},se))]})]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[h&&s.jsx("button",{onClick:se=>{se.stopPropagation(),h(_.eval,_.id)},className:"px-2.5 py-1 text-[10px] font-medium rounded border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",title:"Re-run scorers on saved outputs without re-executing the workflow",children:"Rescore"}),s.jsxs("button",{onClick:se=>{se.stopPropagation(),c(D)},className:"inline-flex items-center gap-1 px-2.5 py-1 text-[10px] font-medium rounded border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",title:"Open full run details in the Run tab",children:["View Details",s.jsx($r,{size:10})]})]})]})})})})()]},_.id)};return s.jsxs("div",{children:[j.length>1&&s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsxs("select",{value:r,onChange:_=>o(_.target.value),className:"px-2 py-1 text-xs rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]",children:[s.jsx("option",{value:"",children:"All evals"}),j.map(_=>s.jsx("option",{value:_,children:_},_))]}),r&&s.jsxs("span",{className:"text-xs text-[hsl(var(--muted-foreground))]",children:[v.length," run",v.length!==1?"s":""]})]}),s.jsx("div",{className:"border border-[hsl(var(--border))] rounded-xl overflow-hidden",children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"bg-[hsl(var(--muted))]",children:[s.jsx("th",{className:"text-left px-3 py-2.5 font-medium",children:"Eval"}),s.jsx("th",{className:"text-left px-3 py-2.5 font-medium",children:"Model"}),s.jsx("th",{className:"text-left px-3 py-2.5 font-medium",children:"Timestamp"}),s.jsx("th",{className:"text-right px-3 py-2.5 font-medium",children:"Items"}),s.jsx("th",{className:"text-right px-3 py-2.5 font-medium",children:"Failures"}),s.jsx("th",{className:"text-right px-3 py-2.5 font-medium",children:"Duration"}),s.jsx("th",{className:"text-right px-3 py-2.5 font-medium",children:"Cost"}),s.jsx("th",{className:"text-right px-3 py-2.5 font-medium border-l border-[hsl(var(--border))]",children:"Overall"}),E.map(_=>s.jsxs("th",{className:"text-right px-3 py-2.5 font-medium font-mono whitespace-nowrap",title:_,children:[_,B[_]==="llm"&&s.jsx("span",{className:"ml-1 px-1 py-0.5 text-[9px] font-medium rounded bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400 align-middle",title:"LLM scorer — scores may vary between runs",children:"LLM"})]},_)),h&&s.jsx("th",{className:"px-3 py-2.5 font-medium w-8"})]})}),s.jsx("tbody",{children:T.map((_,J)=>{if(_.type==="group"){const M=m.has(_.groupId),D=cN(_.entries),w=D.scorers,k=_.entries.reduce((R,F)=>R+F.data.summary.count,0),A=_.entries.reduce((R,F)=>R+F.data.duration,0),Y=_.entries.reduce((R,F)=>R+F.data.totalCost,0);return s.jsxs(b.Fragment,{children:[s.jsxs("tr",{className:ne("border-t border-[hsl(var(--border))] cursor-pointer hover:bg-[hsl(var(--accent))] transition-colors",J===0&&"bg-[hsl(var(--accent))]/30"),onClick:()=>x(_.groupId),children:[s.jsx("td",{className:"px-3 py-2.5 font-mono",children:s.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[s.jsx("span",{className:"shrink-0 p-0.5 -m-0.5",children:M?s.jsx(Ys,{size:14}):s.jsx(Kl,{size:14})}),_.evalName]})}),s.jsx("td",{className:"px-3 py-2.5",children:(()=>{const R=Kd(_.entries);return R.length===0?s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"}):s.jsx("span",{className:"inline-flex items-center gap-1 flex-wrap",children:R.map(([F,se])=>s.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] font-mono text-[10px]",title:`${F} — ${se} calls`,children:[il(F),s.jsxs("span",{className:"ml-0.5 text-[hsl(var(--muted-foreground))]",children:["(",se,")"]})]},F))})})()}),s.jsx("td",{className:"px-3 py-2.5 text-[hsl(var(--muted-foreground))]",children:new Date(_.newestTimestamp).toLocaleString()}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono",children:k}),s.jsx("td",{className:"px-3 py-2.5 text-right",children:s.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded-md bg-[hsl(var(--secondary))] text-[hsl(var(--muted-foreground))]",children:[s.jsx(Yd,{size:10}),_.entries.length," runs"]})}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:A>0?ft(A):"-"}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono text-[hsl(var(--muted-foreground))]",children:Y>0?dt(Y):"-"}),s.jsx("td",{className:"px-3 py-2.5 text-right font-mono font-medium border-l border-[hsl(var(--border))]",children:D.overall?s.jsxs("span",{className:Nt(D.overall.mean),children:[D.overall.mean.toFixed(3),D.overall.std>0&&s.jsxs("span",{className:"text-[hsl(var(--muted-foreground))] font-normal",children:[" ± ",D.overall.std.toFixed(3)]})]}):s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"})}),E.map(R=>{const F=w[R];return s.jsx("td",{className:"px-3 py-2.5 text-right font-mono",children:F?s.jsxs("span",{className:Nt(F.mean),children:[F.mean.toFixed(3),s.jsxs("span",{className:"text-[hsl(var(--muted-foreground))]",children:[" "," ± ",F.std.toFixed(3)]})]}):s.jsx("span",{className:"text-[hsl(var(--muted-foreground))]",children:"-"})},R)}),h&&s.jsx("td",{className:"px-3 py-2.5"})]}),M&&s.jsxs(s.Fragment,{children:[d&&s.jsx("tr",{className:"border-t border-[hsl(var(--border))] bg-[hsl(var(--muted))]/50",children:s.jsx("td",{colSpan:L,className:"px-4 py-2.5",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))]",children:[_.entries.length," runs in this group"]}),s.jsxs("button",{onClick:R=>{R.stopPropagation(),d(_.entries)},className:"inline-flex items-center gap-1 px-2.5 py-1 text-[10px] font-medium rounded border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",title:"View combined statistics across all runs in this group",children:["View Aggregate",s.jsx($r,{size:10})]})]})})}),_.entries.map(R=>U(R,!0,!1))]})]},_.groupId)}return U(_.entry,!1,J===0)})})]})})})]})}function fN(){var Is,Jn,wa,ci,Ps;const n=ti(),[r,o]=b.useState("run"),[c,d]=b.useState(""),[h,m]=b.useState(!1),[x,p]=b.useState(null),[y,j]=b.useState(null),[v,T]=b.useState(null),[E,B]=b.useState(1),[L,U]=b.useState(-1),[_,J]=b.useState(new Set),[M,D]=b.useState(null),[w,k]=b.useState(0),[A,Y]=b.useState(null),[R,F]=b.useState("all"),[se,I]=b.useState(""),[re,ve]=b.useState(""),[pe,G]=b.useState("index"),[W,ee]=b.useState("asc"),[fe,Se]=b.useState("mean"),[C,V]=b.useState("asc"),[le,ue]=b.useState(""),[ye,be]=b.useState(!1),[ae,Me]=b.useState(null),[Ee,Qe]=b.useState(null),[Lt,ol]=b.useState(null),[at,Ot]=b.useState(null),[ht,cl]=b.useState(null),[Bu,si]=b.useState(null),[$s,Fs]=b.useState(null),{data:Ca=[]}=Cl({queryKey:["evals"],queryFn:Ej}),{data:Ct=[]}=Cl({queryKey:["evalHistory"],queryFn:Cj});b.useEffect(()=>{var Ce;if(at||ht||Ct.length<2)return;const P=Ct[0].eval,te=Ct.filter(Ke=>Ke.eval===P);if(te.length<2)return;const oe=new Set,Re=[];for(const Ke of te){const Oe=(Ce=Ke.data.metadata)==null?void 0:Ce.runGroupId,ge=Oe??Ke.id;if(!oe.has(ge)){if(oe.add(ge),Oe){const je=te.filter(Te=>{var Ue;return((Ue=Te.data.metadata)==null?void 0:Ue.runGroupId)===Oe}).map(Te=>Te.id);Re.push({id:je[0],groupIds:je})}else Re.push({id:Ke.id});if(Re.length>=2)break}}Re.length>=2&&(cl(Re[0]),Ot(Re[1]))},[Ct,at,ht]);const Dl=Ca.find(P=>P.name===c),_e=x==null?void 0:x._multiRun,Ws=_e!=null&&L===-1,Ge=_e&&L>=0?_e.allRuns[L]:x;b.useEffect(()=>{T(null)},[L]);const ri=b.useCallback(async()=>{if(c){m(!0),j(null),p(null),T(null),U(-1);try{const P=await Tj(c,E>1?{runs:E}:void 0);p(P),n.invalidateQueries({queryKey:["evalHistory"]})}catch(P){j(P instanceof Error?P.message:String(P))}finally{m(!1)}}},[c,E,n]),Yn=b.useCallback(async()=>{if(!(!at||!ht)){be(!0),Me(null);try{const P=Oe=>{if(Oe.groupIds&&Oe.groupIds.length>1){const je=Oe.groupIds.map(Te=>Ct.find(Ue=>Ue.id===Te));if(je.some(Te=>!Te))throw new Error("Selected run no longer exists in history");return je.map(Te=>Te.data)}const ge=Ct.find(je=>je.id===Oe.id);if(!ge)throw new Error("Selected run no longer exists in history");return ge.data},te=P(at),oe=P(ht),Re=Oe=>{var Tl;const ge=Ct.find(mt=>mt.id===Oe.id);if(!ge)return null;const je=ge.data;if(!Oe.groupIds||Oe.groupIds.length<=1)return je;const Te=Oe.groupIds.map(mt=>{var fl;return(fl=Ct.find(Yt=>Yt.id===mt))==null?void 0:fl.data}).filter(mt=>mt!=null),Ue=Math.min(...Te.map(mt=>mt.items.length)),$l=Object.keys(((Tl=je.summary)==null?void 0:Tl.scorers)??{}),Ma=Array.from({length:Ue},(mt,fl)=>{const Yt={},Fl={};for(const Wl of $l){const Hl=Te.map(Oa=>{var hn;return(hn=Oa.items[fl])==null?void 0:hn.scores[Wl]}).filter(Oa=>Oa!=null),pt=Hl.length>0?Math.round(Hl.reduce((Oa,hn)=>Oa+hn,0)/Hl.length*1e3)/1e3:null;Yt[Wl]=pt,Fl[Wl]={score:pt}}return{...je.items[fl],scores:Yt,scoreDetails:Fl}});return{...je,items:Ma}};Qe(Re(at)),ol(Re(ht));const Ce=Oe=>!Oe.groupIds||Oe.groupIds.length<=1?null:Oe.groupIds.map(ge=>{var je;return(je=Ct.find(Te=>Te.id===ge))==null?void 0:je.data}).filter(ge=>ge!=null);si(Ce(at)),Fs(Ce(ht));const Ke=await Mj(te,oe);Me(Ke)}catch(P){j(P instanceof Error?P.message:String(P))}finally{be(!1)}}},[Ct,at,ht]),Qu=b.useCallback(async(P,te)=>{j(null);try{const oe=await wj(P,te);p(oe),T(null),U(-1),o("run"),n.invalidateQueries({queryKey:["evalHistory"]})}catch(oe){j(oe instanceof Error?oe.message:String(oe))}},[n]),ii=b.useCallback(P=>{J(te=>{const oe=new Set(te);return oe.has(P)?oe.delete(P):oe.add(P),oe})},[]),Xn=(Is=x==null?void 0:x.metadata)==null?void 0:Is.scorerTypes,Vn=(Jn=Ge==null?void 0:Ge.summary)!=null&&Jn.scorers?Object.keys(Ge.summary.scorers):[],dl=(wa=Ge==null?void 0:Ge.summary)!=null&&wa.scorers?Object.entries(Ge.summary.scorers):[],At=dl.length>0?dl.reduce((P,[,te])=>P+te.mean,0)/dl.length:0,Ut=_e?Object.entries(_e.aggregate.scorers):[],zt=Ut.length>0?Ut.reduce((P,[,te])=>P+te.mean,0)/Ut.length:0,Gu=b.useMemo(()=>{if(!_e)return 0;const P=_e.allRuns,te=Object.keys(_e.aggregate.scorers);if(te.length===0||P.length<=1)return 0;const oe=P.map(Ce=>{const Ke=te.map(Oe=>{var ge,je,Te;return(Te=(je=(ge=Ce.summary)==null?void 0:ge.scorers)==null?void 0:je[Oe])==null?void 0:Te.mean}).filter(Oe=>Oe!=null);return Ke.length>0?Ke.reduce((Oe,ge)=>Oe+ge,0)/Ke.length:0}),Re=oe.reduce((Ce,Ke)=>Ce+Ke,0)/oe.length;return Math.sqrt(oe.reduce((Ce,Ke)=>Ce+(Ke-Re)**2,0)/(oe.length-1))},[_e]),ui=_e?_e.allRuns.reduce((P,te)=>P+te.duration,0):0,oi=_e?_e.allRuns.reduce((P,te)=>P+te.totalCost,0):0,Kn=b.useMemo(()=>{if(!_e)return[];const P=Object.entries(_e.aggregate.scorers);return P.sort((te,oe)=>{let Re,Ce;switch(fe){case"scorer":return C==="asc"?te[0].localeCompare(oe[0]):oe[0].localeCompare(te[0]);case"mean":Re=te[1].mean,Ce=oe[1].mean;break;case"std":Re=te[1].std,Ce=oe[1].std;break;case"min":Re=te[1].min,Ce=oe[1].min;break;case"max":default:Re=te[1].max,Ce=oe[1].max;break}return C==="desc"?Ce-Re:Re-Ce}),P},[_e,fe,C]),kl=P=>{fe===P?V(te=>te==="desc"?"asc":"desc"):(Se(P),V("asc"))},Ul=P=>fe===P?C==="desc"?" ▼":" ▲":"",Jl=(P,te)=>{if(te===0)return"text-[hsl(var(--muted-foreground))]";const oe=P/te;return oe<.02?"text-[hsl(var(--muted-foreground))]":oe<=.05?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"},Zn=5,Ta=b.useMemo(()=>{var Re;if(!Ws||!x)return[];const P=x.items,te=Object.keys(((Re=x.summary)==null?void 0:Re.scorers)??{});if(te.length===0||P.length===0)return[];const oe=P.map((Ce,Ke)=>{const Oe=te.map(je=>Ce.scores[je]).filter(je=>je!=null),ge=Oe.length>0?Oe.reduce((je,Te)=>je+Te,0)/Oe.length:1;return{item:Ce,index:Ke,avgScore:ge,scores:Ce.scores}});return oe.sort((Ce,Ke)=>Ce.avgScore-Ke.avgScore),oe.slice(0,Zn)},[Ws,x]),Yu=["run","history","compare"];return s.jsxs("div",{className:"flex flex-col h-screen",children:[s.jsxs("header",{className:"shrink-0 flex items-center justify-between px-6 py-4 border-b border-[hsl(var(--border))]",children:[s.jsx("h2",{className:"text-xl font-semibold",children:"Evals"}),Ca.length>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("select",{value:c,onChange:P=>d(P.target.value),className:"px-3 py-1.5 text-sm rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))] min-w-[180px]",children:[s.jsx("option",{value:"",children:"Select eval…"}),Ca.map(P=>s.jsx("option",{value:P.name,children:P.name},P.name))]}),s.jsxs("button",{onClick:ri,disabled:!c||h,className:ne("inline-flex items-center gap-1.5 px-4 py-1.5 text-sm font-medium rounded-lg transition-all cursor-pointer","bg-[hsl(var(--foreground))] text-[hsl(var(--background))]","hover:opacity-90 disabled:opacity-40"),children:[s.jsx(Xd,{size:12,className:h?"animate-spin":""}),h?"Running…":"Run"]}),s.jsx("input",{type:"number",min:1,max:25,value:E,onChange:P=>B(Math.max(1,Math.min(25,parseInt(P.target.value)||1))),className:"w-14 px-2 py-1.5 text-sm text-center rounded-lg border border-[hsl(var(--input))] bg-[hsl(var(--background))]",title:"Number of runs"})]})]}),s.jsxs("div",{role:"tablist",className:"shrink-0 flex items-center gap-1 px-6 border-b border-[hsl(var(--border))]",children:[Yu.map(P=>s.jsx("button",{role:"tab","aria-selected":r===P,onClick:()=>o(P),className:ne("px-3 py-2.5 text-sm -mb-px border-b-2 transition-colors cursor-pointer",r===P?"border-[hsl(var(--foreground))] text-[hsl(var(--foreground))] font-medium":"border-transparent text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))]"),children:P.charAt(0).toUpperCase()+P.slice(1)},P)),Dl&&r==="run"&&s.jsxs("div",{className:"ml-auto flex items-center gap-2 py-2",children:[s.jsx("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))] uppercase tracking-wider",children:Dl.workflow}),s.jsx("span",{className:"text-[hsl(var(--border))]",children:"/"}),s.jsx("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))] uppercase tracking-wider",children:Dl.dataset}),s.jsx("span",{className:"text-[hsl(var(--border))]",children:"/"}),s.jsxs("span",{className:"text-[10px] text-[hsl(var(--muted-foreground))]",children:[Dl.scorers.length," scorer",Dl.scorers.length!==1?"s":""]})]})]}),r==="run"&&s.jsx("div",{className:"flex-1 min-h-0 flex flex-col",children:Ca.length===0?s.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:s.jsx(rl,{icon:s.jsx(As,{size:32}),title:"No evals registered",description:"Define evals with defineEval() and load them via the evals middleware option or runtime.registerEval()."})}):y?s.jsx("div",{className:"p-6",children:s.jsx("div",{className:"p-4 rounded-xl bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 text-sm",children:y})}):x?s.jsxs(s.Fragment,{children:[A==="history"&&s.jsx("div",{className:"shrink-0 px-6 pt-4",children:s.jsxs("button",{onClick:()=>{o("history"),Y(null)},className:"inline-flex items-center gap-1.5 text-xs text-[hsl(var(--muted-foreground))] hover:text-[hsl(var(--foreground))] transition-colors cursor-pointer",children:[s.jsx(p1,{size:14}),"Back to History"]})}),_e&&s.jsx("div",{className:"shrink-0 pt-4",children:s.jsx(oN,{currentIndex:L,totalRuns:_e.allRuns.length,aggregate:_e.aggregate,onIndexChange:U})}),Ws?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"shrink-0 px-6 py-4",children:[s.jsxs("div",{className:"flex items-start justify-between mb-3",children:[s.jsx("div",{className:"flex-1",children:(()=>{const P=x?Ea(x):[];if(P.length===0)return null;const te=x?dn(x):null;return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:P.length>1?"Models":"Model"}),P.map(oe=>s.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] text-[10px] font-mono font-medium",title:te?`${oe} — ${te[oe]} calls`:oe,children:[il(oe),te&&te[oe]!=null&&s.jsxs("span",{className:"ml-1 text-[hsl(var(--muted-foreground))] font-normal",children:["(",te[oe],")"]})]},oe))]})})()}),s.jsx("button",{onClick:()=>{var te;const P=(te=x==null?void 0:x.metadata)==null?void 0:te.runGroupId;if(P){const oe=Ct.filter(Re=>{var Ce;return((Ce=Re.data.metadata)==null?void 0:Ce.runGroupId)===P}).map(Re=>Re.id);oe.length>0&&cl({id:oe[0],groupIds:oe})}else if(x){const oe=Ct.find(Re=>Re.id===x.id);oe&&cl({id:oe.id})}o("compare")},className:"px-3 py-1.5 text-xs font-medium rounded-lg border border-[hsl(var(--input))] hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",children:"Compare with previous..."})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3",children:[s.jsx(ct,{label:"Runs",value:String(_e.aggregate.runCount),subtitle:"individual runs"}),s.jsx(ct,{label:"Mean Score",value:Ut.length>0?zt.toFixed(3):"—",accent:Ut.length>0?Nt(zt):void 0,tint:Ut.length>0?hx(zt):void 0,subtitle:Ut.length>0?`± ${Gu.toFixed(3)} across runs`:"across all scorers"}),s.jsx(ct,{label:"Total Duration",value:ui>0?ft(ui):"—",subtitle:"all runs combined"}),s.jsx(ct,{label:"Total Cost",value:oi>0?dt(oi):"—",subtitle:"all runs combined"}),(()=>{const P=_e.allRuns,te={input:0,output:0,reasoning:0};for(const Re of P){const Ce=wd(Re);te.input+=Ce.input,te.output+=Ce.output,te.reasoning+=Ce.reasoning}const oe=te.input+te.output+te.reasoning;return oe>0?s.jsx(ct,{label:"Total Tokens",value:_l(oe),subtitle:`${_l(te.input)} in / ${_l(te.output)} out`}):null})()]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto px-6 pb-6 space-y-6",children:[s.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[s.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))]",children:s.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Per-Scorer Aggregate"})}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-[hsl(var(--border))]",children:[s.jsxs("th",{className:"text-left px-4 py-2 font-medium w-48 cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>kl("scorer"),children:["Scorer",Ul("scorer")]}),s.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>kl("mean"),children:["Mean",Ul("mean")]}),s.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>kl("std"),children:["Std",Ul("std")]}),s.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>kl("min"),children:["Min",Ul("min")]}),s.jsxs("th",{className:"text-right px-3 py-2 font-medium cursor-pointer select-none hover:text-[hsl(var(--foreground))]",onClick:()=>kl("max"),children:["Max",Ul("max")]})]})}),s.jsx("tbody",{children:Kn.map(([P,te])=>s.jsxs("tr",{className:"border-b border-[hsl(var(--border))] last:border-b-0",children:[s.jsxs("td",{className:"px-4 py-2.5 font-mono",children:[P,(Xn==null?void 0:Xn[P])==="llm"&&s.jsx("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-medium rounded bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400 align-middle",title:"LLM scorer — scores may vary between runs",children:"LLM"})]}),s.jsx("td",{className:ne("px-3 py-2.5 text-right font-mono font-medium",Nt(te.mean)),children:te.mean.toFixed(3)}),s.jsx("td",{className:ne("px-3 py-2.5 text-right font-mono",Jl(te.std,te.mean)),children:te.std.toFixed(3)}),s.jsx("td",{className:ne("px-3 py-2.5 text-right font-mono",Nt(te.min)),children:te.min.toFixed(3)}),s.jsx("td",{className:ne("px-3 py-2.5 text-right font-mono",Nt(te.max)),children:te.max.toFixed(3)})]},P))})]})})]}),Ta.length>0&&s.jsxs("div",{className:"rounded-xl border border-[hsl(var(--border))] overflow-hidden",children:[s.jsx("div",{className:"px-4 py-2.5 bg-[hsl(var(--muted))] border-b border-[hsl(var(--border))]",children:s.jsx("h3",{className:"text-[11px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Lowest Scoring Items"})}),s.jsx("div",{className:"divide-y divide-[hsl(var(--border))]",children:Ta.map(({item:P,index:te,avgScore:oe,scores:Re})=>{var je;const Ce=M===te,Ke=_e==null?void 0:_e.allRuns,Oe=(Ke==null?void 0:Ke.length)??0,ge=Ce&&Ke?(je=Ke[w])==null?void 0:je.items[te]:null;return s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>{D(Ce?null:te),k(0)},className:ne("w-full text-left px-4 py-3 flex items-center gap-3 hover:bg-[hsl(var(--accent))] transition-colors cursor-pointer",Ce&&"bg-[hsl(var(--accent))]"),children:[s.jsxs("span",{className:"shrink-0 text-[10px] font-mono text-[hsl(var(--muted-foreground))] w-6 text-right",children:["#",te+1]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs truncate",children:ni(P.input,60)}),s.jsx("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:Object.entries(Re).map(([Te,Ue])=>Ue!=null?s.jsxs("span",{className:ne("inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-mono",ku(Ue)),title:Te,children:[Te,": ",Ue.toFixed(2)]},Te):null)})]}),s.jsx("span",{className:ne("shrink-0 text-xs font-mono font-medium",Nt(oe)),children:oe.toFixed(3)})]}),Ce&&s.jsxs("div",{className:"border-t border-[hsl(var(--border))] bg-[hsl(var(--card))] text-xs",children:[Oe>1&&s.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-[hsl(var(--border))] bg-[hsl(var(--muted))]",children:[s.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:"Run"}),s.jsx("div",{className:"flex items-center gap-0.5",children:Array.from({length:Oe},(Te,Ue)=>s.jsx("button",{onClick:()=>k(Ue),className:ne("px-2 py-0.5 rounded text-[10px] font-mono transition-colors cursor-pointer",Ue===w?"bg-[hsl(var(--foreground))] text-[hsl(var(--background))]":"text-[hsl(var(--muted-foreground))] hover:bg-[hsl(var(--accent))]"),children:Ue+1},Ue))})]}),s.jsxs("div",{className:"p-4 space-y-3",children:[ge&&s.jsx("div",{className:"flex items-center gap-1.5 flex-wrap",children:Object.entries(ge.scores).map(([Te,Ue])=>Ue!=null?s.jsxs("span",{className:ne("inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-mono",ku(Ue)),children:[Te,": ",Ue.toFixed(3)]},Te):null)}),s.jsxs("div",{children:[s.jsx("span",{className:"font-medium text-[hsl(var(--muted-foreground))] text-[10px] uppercase tracking-wider block mb-1",children:"Output"}),s.jsx(Mt,{data:(ge==null?void 0:ge.output)??P.output,collapsed:!0})]}),(ge==null?void 0:ge.scoreDetails)&&Object.entries(ge.scoreDetails).map(([Te,Ue])=>{var Ma;const $l=typeof((Ma=Ue==null?void 0:Ue.metadata)==null?void 0:Ma.reasoning)=="string"?Ue.metadata.reasoning:null;return $l?s.jsxs("div",{children:[s.jsxs("span",{className:"font-medium text-[hsl(var(--muted-foreground))] text-[10px] uppercase tracking-wider block mb-1",children:[Te," reasoning"]}),s.jsx("pre",{className:"text-xs font-mono p-2 rounded-md bg-[hsl(var(--secondary))] overflow-auto max-h-32 whitespace-pre-wrap leading-relaxed",children:$l})]},Te):null})]})]})]},te)})})]})]})]}):Ge?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"shrink-0 px-6 py-4",children:[(()=>{const P=Ea(Ge);if(P.length===0)return null;const te=dn(Ge);return s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx("span",{className:"text-[10px] font-medium uppercase tracking-wider text-[hsl(var(--muted-foreground))]",children:P.length>1?"Models":"Model"}),P.map(oe=>s.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-[hsl(var(--secondary))] text-[hsl(var(--foreground))] text-[10px] font-mono font-medium",title:te?`${oe} — ${te[oe]} calls`:oe,children:[il(oe),te&&te[oe]!=null&&s.jsxs("span",{className:"ml-1 text-[hsl(var(--muted-foreground))] font-normal",children:["(",te[oe],")"]})]},oe))]})})(),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3",children:[s.jsx(ct,{label:"Items",value:String(Ge.summary.count),subtitle:Ge.summary.failures>0?`${Ge.summary.failures} failed`:"all passed",subtitleColor:Ge.summary.failures>0?"text-red-600 dark:text-red-400":"text-emerald-600 dark:text-emerald-400"}),s.jsx(ct,{label:"Mean Score",value:dl.length>0?At.toFixed(3):"—",accent:dl.length>0?Nt(At):void 0,tint:dl.length>0?hx(At):void 0,subtitle:"across all scorers"}),s.jsx(ct,{label:"Duration",value:Ge.summary.timing?ft(Ge.summary.timing.mean):ft(Ge.duration),subtitle:Ge.summary.timing?`p95 ${ft(Ge.summary.timing.p95)}`:"total"}),s.jsx(ct,{label:"Cost",value:Ge.totalCost>0?dt(Ge.totalCost):"—",subtitle:"total"}),(()=>{const P=wd(Ge),te=P.input+P.output+P.reasoning;return te>0?s.jsx(ct,{label:"Tokens",value:_l(te),subtitle:`${_l(P.input)} in / ${_l(P.output)} out`}):null})()]})]}),s.jsxs("div",{className:"flex flex-1 min-h-0 border-t border-[hsl(var(--border))]",children:[s.jsx("div",{className:"w-[340px] xl:w-[380px] shrink-0 border-r border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:s.jsx(Pj,{items:Ge.items,scorerNames:Vn,selectedIndex:v,onSelectItem:T,onDeselectItem:()=>T(null)})}),s.jsx("div",{className:"flex-1 overflow-y-auto",children:v!=null?s.jsx("div",{className:"p-6",children:s.jsx(Wj,{item:Ge.items[v],itemIndex:v,scorerNames:Vn,onBack:()=>T(null)})}):s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsx(Jj,{summary:Ge.summary,items:Ge.items,totalCost:Ge.totalCost,scorerTypes:Xn}),s.jsx(tN,{items:Ge.items,scorerNames:Vn}),Ge.items.length>0&&s.jsx($j,{items:Ge.items,scorerNames:Vn,onSelectItem:T,errorFilter:R,onErrorFilterChange:F,scorerFilter:se,onScorerFilterChange:I,threshold:re,onThresholdChange:ve,sortField:pe,onSortFieldChange:G,sortDir:W,onSortDirChange:ee})]})})]})]}):null]}):h?s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(As,{size:28,className:"text-[hsl(var(--muted-foreground))]"}),s.jsx("div",{className:"absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full bg-emerald-500 animate-ping"}),s.jsx("div",{className:"absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full bg-emerald-500"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-sm font-medium",children:"Running evaluation…"}),s.jsx("p",{className:"text-xs text-[hsl(var(--muted-foreground))] mt-1",children:Dl?`${Dl.dataset} · ${Dl.scorers.length} scorers`:c})]})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(rl,{icon:s.jsx(As,{size:32}),title:"No results",description:"Select an eval and run it to see results."})})}),r==="history"&&s.jsx("div",{className:"flex-1 overflow-auto p-6",children:Ct.length===0?s.jsx(rl,{title:"No eval history",description:"Run evaluations to build history."}):s.jsx(dN,{history:Ct,evalFilter:le,onEvalFilterChange:ue,onSelect:P=>{p(P),T(null),U(-1),Y("history"),o("run")},onSelectGroup:P=>{var ge,je;const te=P.map(Te=>Te.data),oe=te[0],Re=Object.keys(((ge=oe.summary)==null?void 0:ge.scorers)??{}),Ce={};for(const Te of Re){const Ue=te.map(Tl=>{var mt,fl,Yt;return((Yt=(fl=(mt=Tl.summary)==null?void 0:mt.scorers)==null?void 0:fl[Te])==null?void 0:Yt.mean)??0}),$l=Ue.reduce((Tl,mt)=>Tl+mt,0)/Ue.length,Ma=Ue.length>1?Math.sqrt(Ue.reduce((Tl,mt)=>Tl+(mt-$l)**2,0)/(Ue.length-1)):0;Ce[Te]={mean:Math.round($l*1e3)/1e3,std:Math.round(Ma*1e3)/1e3,min:Math.round(Math.min(...Ue)*1e3)/1e3,max:Math.round(Math.max(...Ue)*1e3)/1e3}}const Ke={runGroupId:((je=oe.metadata)==null?void 0:je.runGroupId)??"",runCount:te.length,scorers:Ce},Oe={...oe,_multiRun:{aggregate:Ke,allRuns:te}};p(Oe),T(null),U(-1),Y("history"),o("run")},onRescore:Qu,expandedGroups:_,onToggleGroup:ii})}),r==="compare"&&s.jsx("div",{className:"flex-1 overflow-auto p-6",children:s.jsx("div",{className:"space-y-4",children:Ct.length<2?s.jsx(rl,{title:"Need at least 2 eval runs",description:"Run evaluations to compare results."}):s.jsxs(s.Fragment,{children:[s.jsx(uN,{history:Ct,baselineSelection:at,candidateSelection:ht,onBaselineChange:Ot,onCandidateChange:cl,onCompare:Yn,comparing:ye}),ae&&s.jsx(nN,{compareResult:ae,baseline:Ee,candidate:Lt,isGroupComparison:(((ci=at==null?void 0:at.groupIds)==null?void 0:ci.length)??0)>1||(((Ps=ht==null?void 0:ht.groupIds)==null?void 0:Ps.length)??0)>1,baselineRuns:Bu,candidateRuns:$s})]})})})]})}function hN(){return s.jsx(Pb,{basename:window.__AXL_STUDIO_BASE__||"/",children:s.jsxs("div",{className:"flex h-screen overflow-hidden",children:[s.jsx(P1,{}),s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsxs(Ob,{children:[s.jsx(Gl,{path:"/playground",element:s.jsx(_j,{})}),s.jsx(Gl,{path:"/workflows",element:s.jsx(Dj,{})}),s.jsx(Gl,{path:"/traces",element:s.jsx(qj,{})}),s.jsx(Gl,{path:"/costs",element:s.jsx(Bj,{})}),s.jsx(Gl,{path:"/memory",element:s.jsx(Qj,{})}),s.jsx(Gl,{path:"/sessions",element:s.jsx(Xj,{})}),s.jsx(Gl,{path:"/tools",element:s.jsx(Vj,{})}),s.jsx(Gl,{path:"/evals",element:s.jsx(fN,{})}),s.jsx(Gl,{path:"*",element:s.jsx(wb,{to:"/playground",replace:!0})})]})})]})})}Jv.createRoot(document.getElementById("root")).render(s.jsx(b.StrictMode,{children:s.jsx(yy,{client:zy,children:s.jsx(hN,{})})}));