agentv 4.12.6 → 4.12.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.
- package/dist/{chunk-QYXM32WE.js → chunk-EQBJ2C4W.js} +2 -2
- package/dist/{chunk-QYXM32WE.js.map → chunk-EQBJ2C4W.js.map} +1 -1
- package/dist/{chunk-BOFV2GTT.js → chunk-XHMMSUQ7.js} +3 -3
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{interactive-MXG34JBR.js → interactive-MHHMVB2S.js} +2 -2
- package/dist/studio/assets/{index-CFlLDFI8.js → index-BrRXeh8A.js} +11 -11
- package/dist/studio/assets/{index-D74g07Nj.js → index-Cec2pUpS.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-BOFV2GTT.js.map → chunk-XHMMSUQ7.js.map} +0 -0
- /package/dist/{interactive-MXG34JBR.js.map → interactive-MHHMVB2S.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var W0=n=>{throw TypeError(n)};var
|
|
1
|
+
var W0=n=>{throw TypeError(n)};var Po=(n,l,i)=>l.has(n)||W0("Cannot "+i);var _=(n,l,i)=>(Po(n,l,"read from private field"),i?i.call(n):l.get(n)),ce=(n,l,i)=>l.has(n)?W0("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(n):l.set(n,i),ae=(n,l,i,r)=>(Po(n,l,"write to private field"),r?r.call(n,i):l.set(n,i),i),xe=(n,l,i)=>(Po(n,l,"access private method"),i);var hu=(n,l,i,r)=>({set _(o){ae(n,l,o,i)},get _(){return _(n,l,r)}});(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function i(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(o){if(o.ep)return;o.ep=!0;const d=i(o);fetch(o.href,d)}})();function Vv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Fo={exports:{}},Ni={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var W0=n=>{throw TypeError(n)};var Fo=(n,l,i)=>l.has(n)||W0("Cannot "+i);var _=(
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ey;function Xv(){if(ey)return
|
|
9
|
+
*/var ey;function Xv(){if(ey)return Ni;ey=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var g in o)g!=="key"&&(d[g]=o[g])}else d=o;return o=d.ref,{$$typeof:n,type:r,key:h,ref:o!==void 0?o:null,props:d}}return Ni.Fragment=l,Ni.jsx=i,Ni.jsxs=i,Ni}var ty;function kv(){return ty||(ty=1,Fo.exports=Xv()),Fo.exports}var f=kv(),Jo={exports:{}},ye={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var W0=n=>{throw TypeError(n)};var Fo=(n,l,i)=>l.has(n)||W0("Cannot "+i);var _=(
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var ay;function Zv(){if(ay)return ye;ay=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function j(T){return T===null||typeof T!="object"?null:(T=S&&T[S]||T["@@iterator"],typeof T=="function"?T:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function A(T,G,ee){this.props=T,this.context=G,this.refs=C,this.updater=ee||N}A.prototype.isReactComponent={},A.prototype.setState=function(T,G){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,G,"setState")},A.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function $(){}$.prototype=A.prototype;function Z(T,G,ee){this.props=T,this.context=G,this.refs=C,this.updater=ee||N}var L=Z.prototype=new $;L.constructor=Z,E(L,A.prototype),L.isPureReactComponent=!0;var X=Array.isArray;function W(){}var P={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function J(T,G,ee){var q=ee.ref;return{$$typeof:n,type:T,key:G,ref:q!==void 0?q:null,props:ee}}function V(T,G){return J(T.type,G,T.props)}function I(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function se(T){var G={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(ee){return G[ee]})}var le=/\/+/g;function ue(T,G){return typeof T=="object"&&T!==null&&T.key!=null?se(""+T.key):G.toString(36)}function ne(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(W,W):(T.status="pending",T.then(function(G){T.status==="pending"&&(T.status="fulfilled",T.value=G)},function(G){T.status==="pending"&&(T.status="rejected",T.reason=G)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function O(T,G,ee,q,de){var ve=typeof T;(ve==="undefined"||ve==="boolean")&&(T=null);var be=!1;if(T===null)be=!0;else switch(ve){case"bigint":case"string":case"number":be=!0;break;case"object":switch(T.$$typeof){case n:case l:be=!0;break;case v:return be=T._init,O(be(T._payload),G,ee,q,de)}}if(be)return de=de(T),be=q===""?"."+ue(T,0):q,X(de)?(ee="",be!=null&&(ee=be.replace(le,"$&/")+"/"),O(de,G,ee,"",function(ua){return ua})):de!=null&&(I(de)&&(de=V(de,ee+(de.key==null||T&&T.key===de.key?"":(""+de.key).replace(le,"$&/")+"/")+be)),G.push(de)),1;be=0;var Pe=q===""?".":q+":";if(X(T))for(var He=0;He<T.length;He++)q=T[He],ve=Pe+ue(q,He),be+=O(q,G,ee,ve,de);else if(He=j(T),typeof He=="function")for(T=He.call(T),He=0;!(q=T.next()).done;)q=q.value,ve=Pe+ue(q,He++),be+=O(q,G,ee,ve,de);else if(ve==="object"){if(typeof T.then=="function")return O(ne(T),G,ee,q,de);throw G=String(T),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return be}function Y(T,G,ee){if(T==null)return T;var q=[],de=0;return O(T,q,"","",function(ve){return G.call(ee,ve,de++)}),q}function te(T){if(T._status===-1){var G=T._result;G=G(),G.then(function(ee){(T._status===0||T._status===-1)&&(T._status=1,T._result=ee)},function(ee){(T._status===0||T._status===-1)&&(T._status=2,T._result=ee)}),T._status===-1&&(T._status=0,T._result=G)}if(T._status===1)return T._result.default;throw T._result}var me=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},oe={map:Y,forEach:function(T,G,ee){Y(T,function(){G.apply(this,arguments)},ee)},count:function(T){var G=0;return Y(T,function(){G++}),G},toArray:function(T){return Y(T,function(G){return G})||[]},only:function(T){if(!I(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return ye.Activity=x,ye.Children=oe,ye.Component=A,ye.Fragment=i,ye.Profiler=o,ye.PureComponent=Z,ye.StrictMode=r,ye.Suspense=p,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,ye.__COMPILER_RUNTIME={__proto__:null,c:function(T){return P.H.useMemoCache(T)}},ye.cache=function(T){return function(){return T.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(T,G,ee){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var q=E({},T.props),de=T.key;if(G!=null)for(ve in G.key!==void 0&&(de=""+G.key),G)!F.call(G,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&G.ref===void 0||(q[ve]=G[ve]);var ve=arguments.length-2;if(ve===1)q.children=ee;else if(1<ve){for(var be=Array(ve),Pe=0;Pe<ve;Pe++)be[Pe]=arguments[Pe+2];q.children=be}return J(T.type,de,q)},ye.createContext=function(T){return T={$$typeof:h,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:d,_context:T},T},ye.createElement=function(T,G,ee){var q,de={},ve=null;if(G!=null)for(q in G.key!==void 0&&(ve=""+G.key),G)F.call(G,q)&&q!=="key"&&q!=="__self"&&q!=="__source"&&(de[q]=G[q]);var be=arguments.length-2;if(be===1)de.children=ee;else if(1<be){for(var Pe=Array(be),He=0;He<be;He++)Pe[He]=arguments[He+2];de.children=Pe}if(T&&T.defaultProps)for(q in be=T.defaultProps,be)de[q]===void 0&&(de[q]=be[q]);return J(T,ve,de)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(T){return{$$typeof:g,render:T}},ye.isValidElement=I,ye.lazy=function(T){return{$$typeof:v,_payload:{_status:-1,_result:T},_init:te}},ye.memo=function(T,G){return{$$typeof:m,type:T,compare:G===void 0?null:G}},ye.startTransition=function(T){var G=P.T,ee={};P.T=ee;try{var q=T(),de=P.S;de!==null&&de(ee,q),typeof q=="object"&&q!==null&&typeof q.then=="function"&&q.then(W,me)}catch(ve){me(ve)}finally{G!==null&&ee.types!==null&&(G.types=ee.types),P.T=G}},ye.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},ye.use=function(T){return P.H.use(T)},ye.useActionState=function(T,G,ee){return P.H.useActionState(T,G,ee)},ye.useCallback=function(T,G){return P.H.useCallback(T,G)},ye.useContext=function(T){return P.H.useContext(T)},ye.useDebugValue=function(){},ye.useDeferredValue=function(T,G){return P.H.useDeferredValue(T,G)},ye.useEffect=function(T,G){return P.H.useEffect(T,G)},ye.useEffectEvent=function(T){return P.H.useEffectEvent(T)},ye.useId=function(){return P.H.useId()},ye.useImperativeHandle=function(T,G,ee){return P.H.useImperativeHandle(T,G,ee)},ye.useInsertionEffect=function(T,G){return P.H.useInsertionEffect(T,G)},ye.useLayoutEffect=function(T,G){return P.H.useLayoutEffect(T,G)},ye.useMemo=function(T,G){return P.H.useMemo(T,G)},ye.useOptimistic=function(T,G){return P.H.useOptimistic(T,G)},ye.useReducer=function(T,G,ee){return P.H.useReducer(T,G,ee)},ye.useRef=function(T){return P.H.useRef(T)},ye.useState=function(T){return P.H.useState(T)},ye.useSyncExternalStore=function(T,G,ee){return P.H.useSyncExternalStore(T,G,ee)},ye.useTransition=function(){return P.H.useTransition()},ye.version="19.2.4",ye}var ny;function Xi(){return ny||(ny=1,
|
|
17
|
+
*/var ay;function Zv(){if(ay)return ye;ay=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function j(T){return T===null||typeof T!="object"?null:(T=S&&T[S]||T["@@iterator"],typeof T=="function"?T:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function A(T,G,ee){this.props=T,this.context=G,this.refs=C,this.updater=ee||N}A.prototype.isReactComponent={},A.prototype.setState=function(T,G){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,G,"setState")},A.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function $(){}$.prototype=A.prototype;function Z(T,G,ee){this.props=T,this.context=G,this.refs=C,this.updater=ee||N}var L=Z.prototype=new $;L.constructor=Z,E(L,A.prototype),L.isPureReactComponent=!0;var X=Array.isArray;function W(){}var P={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function J(T,G,ee){var q=ee.ref;return{$$typeof:n,type:T,key:G,ref:q!==void 0?q:null,props:ee}}function V(T,G){return J(T.type,G,T.props)}function I(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function se(T){var G={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(ee){return G[ee]})}var le=/\/+/g;function ue(T,G){return typeof T=="object"&&T!==null&&T.key!=null?se(""+T.key):G.toString(36)}function ne(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(W,W):(T.status="pending",T.then(function(G){T.status==="pending"&&(T.status="fulfilled",T.value=G)},function(G){T.status==="pending"&&(T.status="rejected",T.reason=G)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function O(T,G,ee,q,de){var ve=typeof T;(ve==="undefined"||ve==="boolean")&&(T=null);var be=!1;if(T===null)be=!0;else switch(ve){case"bigint":case"string":case"number":be=!0;break;case"object":switch(T.$$typeof){case n:case l:be=!0;break;case v:return be=T._init,O(be(T._payload),G,ee,q,de)}}if(be)return de=de(T),be=q===""?"."+ue(T,0):q,X(de)?(ee="",be!=null&&(ee=be.replace(le,"$&/")+"/"),O(de,G,ee,"",function(ua){return ua})):de!=null&&(I(de)&&(de=V(de,ee+(de.key==null||T&&T.key===de.key?"":(""+de.key).replace(le,"$&/")+"/")+be)),G.push(de)),1;be=0;var Pe=q===""?".":q+":";if(X(T))for(var He=0;He<T.length;He++)q=T[He],ve=Pe+ue(q,He),be+=O(q,G,ee,ve,de);else if(He=j(T),typeof He=="function")for(T=He.call(T),He=0;!(q=T.next()).done;)q=q.value,ve=Pe+ue(q,He++),be+=O(q,G,ee,ve,de);else if(ve==="object"){if(typeof T.then=="function")return O(ne(T),G,ee,q,de);throw G=String(T),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return be}function Y(T,G,ee){if(T==null)return T;var q=[],de=0;return O(T,q,"","",function(ve){return G.call(ee,ve,de++)}),q}function te(T){if(T._status===-1){var G=T._result;G=G(),G.then(function(ee){(T._status===0||T._status===-1)&&(T._status=1,T._result=ee)},function(ee){(T._status===0||T._status===-1)&&(T._status=2,T._result=ee)}),T._status===-1&&(T._status=0,T._result=G)}if(T._status===1)return T._result.default;throw T._result}var me=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},oe={map:Y,forEach:function(T,G,ee){Y(T,function(){G.apply(this,arguments)},ee)},count:function(T){var G=0;return Y(T,function(){G++}),G},toArray:function(T){return Y(T,function(G){return G})||[]},only:function(T){if(!I(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return ye.Activity=x,ye.Children=oe,ye.Component=A,ye.Fragment=i,ye.Profiler=o,ye.PureComponent=Z,ye.StrictMode=r,ye.Suspense=p,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,ye.__COMPILER_RUNTIME={__proto__:null,c:function(T){return P.H.useMemoCache(T)}},ye.cache=function(T){return function(){return T.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(T,G,ee){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var q=E({},T.props),de=T.key;if(G!=null)for(ve in G.key!==void 0&&(de=""+G.key),G)!F.call(G,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&G.ref===void 0||(q[ve]=G[ve]);var ve=arguments.length-2;if(ve===1)q.children=ee;else if(1<ve){for(var be=Array(ve),Pe=0;Pe<ve;Pe++)be[Pe]=arguments[Pe+2];q.children=be}return J(T.type,de,q)},ye.createContext=function(T){return T={$$typeof:h,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:d,_context:T},T},ye.createElement=function(T,G,ee){var q,de={},ve=null;if(G!=null)for(q in G.key!==void 0&&(ve=""+G.key),G)F.call(G,q)&&q!=="key"&&q!=="__self"&&q!=="__source"&&(de[q]=G[q]);var be=arguments.length-2;if(be===1)de.children=ee;else if(1<be){for(var Pe=Array(be),He=0;He<be;He++)Pe[He]=arguments[He+2];de.children=Pe}if(T&&T.defaultProps)for(q in be=T.defaultProps,be)de[q]===void 0&&(de[q]=be[q]);return J(T,ve,de)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(T){return{$$typeof:g,render:T}},ye.isValidElement=I,ye.lazy=function(T){return{$$typeof:v,_payload:{_status:-1,_result:T},_init:te}},ye.memo=function(T,G){return{$$typeof:m,type:T,compare:G===void 0?null:G}},ye.startTransition=function(T){var G=P.T,ee={};P.T=ee;try{var q=T(),de=P.S;de!==null&&de(ee,q),typeof q=="object"&&q!==null&&typeof q.then=="function"&&q.then(W,me)}catch(ve){me(ve)}finally{G!==null&&ee.types!==null&&(G.types=ee.types),P.T=G}},ye.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},ye.use=function(T){return P.H.use(T)},ye.useActionState=function(T,G,ee){return P.H.useActionState(T,G,ee)},ye.useCallback=function(T,G){return P.H.useCallback(T,G)},ye.useContext=function(T){return P.H.useContext(T)},ye.useDebugValue=function(){},ye.useDeferredValue=function(T,G){return P.H.useDeferredValue(T,G)},ye.useEffect=function(T,G){return P.H.useEffect(T,G)},ye.useEffectEvent=function(T){return P.H.useEffectEvent(T)},ye.useId=function(){return P.H.useId()},ye.useImperativeHandle=function(T,G,ee){return P.H.useImperativeHandle(T,G,ee)},ye.useInsertionEffect=function(T,G){return P.H.useInsertionEffect(T,G)},ye.useLayoutEffect=function(T,G){return P.H.useLayoutEffect(T,G)},ye.useMemo=function(T,G){return P.H.useMemo(T,G)},ye.useOptimistic=function(T,G){return P.H.useOptimistic(T,G)},ye.useReducer=function(T,G,ee){return P.H.useReducer(T,G,ee)},ye.useRef=function(T){return P.H.useRef(T)},ye.useState=function(T){return P.H.useState(T)},ye.useSyncExternalStore=function(T,G,ee){return P.H.useSyncExternalStore(T,G,ee)},ye.useTransition=function(){return P.H.useTransition()},ye.version="19.2.4",ye}var ny;function Xi(){return ny||(ny=1,Jo.exports=Zv()),Jo.exports}var Q=Xi();const zi=Vv(Q);var Io={exports:{}},Ri={},Wo={exports:{}},ef={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var W0=n=>{throw TypeError(n)};var Fo=(n,l,i)=>l.has(n)||W0("Cannot "+i);var _=(
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var sy;function $v(){return sy||(sy=1,(function(n){function l(O,Y){var te=O.length;O.push(Y);e:for(;0<te;){var me=te-1>>>1,oe=O[me];if(0<o(oe,Y))O[me]=Y,O[te]=oe,te=me;else break e}}function i(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var Y=O[0],te=O.pop();if(te!==Y){O[0]=te;e:for(var me=0,oe=O.length,T=oe>>>1;me<T;){var G=2*(me+1)-1,ee=O[G],q=G+1,de=O[q];if(0>o(ee,te))q<oe&&0>o(de,ee)?(O[me]=de,O[q]=te,me=q):(O[me]=ee,O[G]=te,me=G);else if(q<oe&&0>o(de,te))O[me]=de,O[q]=te,me=q;else break e}}return Y}function o(O,Y){var te=O.sortIndex-Y.sortIndex;return te!==0?te:O.id-Y.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,g=h.now();n.unstable_now=function(){return h.now()-g}}var p=[],m=[],v=1,x=null,S=3,j=!1,N=!1,E=!1,C=!1,A=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;function L(O){for(var Y=i(m);Y!==null;){if(Y.callback===null)r(m);else if(Y.startTime<=O)r(m),Y.sortIndex=Y.expirationTime,l(p,Y);else break;Y=i(m)}}function X(O){if(E=!1,L(O),!N)if(i(p)!==null)N=!0,W||(W=!0,se());else{var Y=i(m);Y!==null&&ne(X,Y.startTime-O)}}var W=!1,P=-1,F=5,J=-1;function V(){return C?!0:!(n.unstable_now()-J<F)}function I(){if(C=!1,W){var O=n.unstable_now();J=O;var Y=!0;try{e:{N=!1,E&&(E=!1,$(P),P=-1),j=!0;var te=S;try{t:{for(L(O),x=i(p);x!==null&&!(x.expirationTime>O&&V());){var me=x.callback;if(typeof me=="function"){x.callback=null,S=x.priorityLevel;var oe=me(x.expirationTime<=O);if(O=n.unstable_now(),typeof oe=="function"){x.callback=oe,L(O),Y=!0;break t}x===i(p)&&r(p),L(O)}else r(p);x=i(p)}if(x!==null)Y=!0;else{var T=i(m);T!==null&&ne(X,T.startTime-O),Y=!1}}break e}finally{x=null,S=te,j=!1}Y=void 0}}finally{Y?se():W=!1}}}var se;if(typeof Z=="function")se=function(){Z(I)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,ue=le.port2;le.port1.onmessage=I,se=function(){ue.postMessage(null)}}else se=function(){A(I,0)};function ne(O,Y){P=A(function(){O(n.unstable_now())},Y)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<O?Math.floor(1e3/O):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(O){switch(S){case 1:case 2:case 3:var Y=3;break;default:Y=S}var te=S;S=Y;try{return O()}finally{S=te}},n.unstable_requestPaint=function(){C=!0},n.unstable_runWithPriority=function(O,Y){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var te=S;S=O;try{return Y()}finally{S=te}},n.unstable_scheduleCallback=function(O,Y,te){var me=n.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?me+te:me):te=me,O){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=te+oe,O={id:v++,callback:Y,priorityLevel:O,startTime:te,expirationTime:oe,sortIndex:-1},te>me?(O.sortIndex=te,l(m,O),i(p)===null&&O===i(m)&&(E?($(P),P=-1):E=!0,ne(X,te-me))):(O.sortIndex=oe,l(p,O),N||j||(N=!0,W||(W=!0,se()))),O},n.unstable_shouldYield=V,n.unstable_wrapCallback=function(O){var Y=S;return function(){var te=S;S=Y;try{return O.apply(this,arguments)}finally{S=te}}}})(
|
|
25
|
+
*/var sy;function $v(){return sy||(sy=1,(function(n){function l(O,Y){var te=O.length;O.push(Y);e:for(;0<te;){var me=te-1>>>1,oe=O[me];if(0<o(oe,Y))O[me]=Y,O[te]=oe,te=me;else break e}}function i(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var Y=O[0],te=O.pop();if(te!==Y){O[0]=te;e:for(var me=0,oe=O.length,T=oe>>>1;me<T;){var G=2*(me+1)-1,ee=O[G],q=G+1,de=O[q];if(0>o(ee,te))q<oe&&0>o(de,ee)?(O[me]=de,O[q]=te,me=q):(O[me]=ee,O[G]=te,me=G);else if(q<oe&&0>o(de,te))O[me]=de,O[q]=te,me=q;else break e}}return Y}function o(O,Y){var te=O.sortIndex-Y.sortIndex;return te!==0?te:O.id-Y.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,g=h.now();n.unstable_now=function(){return h.now()-g}}var p=[],m=[],v=1,x=null,S=3,j=!1,N=!1,E=!1,C=!1,A=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;function L(O){for(var Y=i(m);Y!==null;){if(Y.callback===null)r(m);else if(Y.startTime<=O)r(m),Y.sortIndex=Y.expirationTime,l(p,Y);else break;Y=i(m)}}function X(O){if(E=!1,L(O),!N)if(i(p)!==null)N=!0,W||(W=!0,se());else{var Y=i(m);Y!==null&&ne(X,Y.startTime-O)}}var W=!1,P=-1,F=5,J=-1;function V(){return C?!0:!(n.unstable_now()-J<F)}function I(){if(C=!1,W){var O=n.unstable_now();J=O;var Y=!0;try{e:{N=!1,E&&(E=!1,$(P),P=-1),j=!0;var te=S;try{t:{for(L(O),x=i(p);x!==null&&!(x.expirationTime>O&&V());){var me=x.callback;if(typeof me=="function"){x.callback=null,S=x.priorityLevel;var oe=me(x.expirationTime<=O);if(O=n.unstable_now(),typeof oe=="function"){x.callback=oe,L(O),Y=!0;break t}x===i(p)&&r(p),L(O)}else r(p);x=i(p)}if(x!==null)Y=!0;else{var T=i(m);T!==null&&ne(X,T.startTime-O),Y=!1}}break e}finally{x=null,S=te,j=!1}Y=void 0}}finally{Y?se():W=!1}}}var se;if(typeof Z=="function")se=function(){Z(I)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,ue=le.port2;le.port1.onmessage=I,se=function(){ue.postMessage(null)}}else se=function(){A(I,0)};function ne(O,Y){P=A(function(){O(n.unstable_now())},Y)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<O?Math.floor(1e3/O):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(O){switch(S){case 1:case 2:case 3:var Y=3;break;default:Y=S}var te=S;S=Y;try{return O()}finally{S=te}},n.unstable_requestPaint=function(){C=!0},n.unstable_runWithPriority=function(O,Y){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var te=S;S=O;try{return Y()}finally{S=te}},n.unstable_scheduleCallback=function(O,Y,te){var me=n.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?me+te:me):te=me,O){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=te+oe,O={id:v++,callback:Y,priorityLevel:O,startTime:te,expirationTime:oe,sortIndex:-1},te>me?(O.sortIndex=te,l(m,O),i(p)===null&&O===i(m)&&(E?($(P),P=-1):E=!0,ne(X,te-me))):(O.sortIndex=oe,l(p,O),N||j||(N=!0,W||(W=!0,se()))),O},n.unstable_shouldYield=V,n.unstable_wrapCallback=function(O){var Y=S;return function(){var te=S;S=Y;try{return O.apply(this,arguments)}finally{S=te}}}})(ef)),ef}var ly;function Pv(){return ly||(ly=1,Wo.exports=$v()),Wo.exports}var tf={exports:{}},yt={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ var W0=n=>{throw TypeError(n)};var Fo=(n,l,i)=>l.has(n)||W0("Cannot "+i);var _=(
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var iy;function Fv(){if(iy)return yt;iy=1;var n=Xi();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function d(p,m,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:x==null?null:""+x,children:p,containerInfo:m,implementation:v}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yt.createPortal=function(p,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return d(p,m,null,v)},yt.flushSync=function(p){var m=h.T,v=r.p;try{if(h.T=null,r.p=2,p)return p()}finally{h.T=m,r.p=v,r.d.f()}},yt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},yt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},yt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var v=m.as,x=g(v,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,j=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:j}):v==="script"&&r.d.X(p,{crossOrigin:x,integrity:S,fetchPriority:j,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},yt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=g(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},yt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,x=g(v,m.crossOrigin);r.d.L(p,v,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},yt.preloadModule=function(p,m){if(typeof p=="string")if(m){var v=g(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},yt.requestFormReset=function(p){r.d.r(p)},yt.unstable_batchedUpdates=function(p,m){return p(m)},yt.useFormState=function(p,m,v){return h.H.useFormState(p,m,v)},yt.useFormStatus=function(){return h.H.useHostTransitionStatus()},yt.version="19.2.4",yt}var ry;function hg(){if(ry)return
|
|
33
|
+
*/var iy;function Fv(){if(iy)return yt;iy=1;var n=Xi();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function d(p,m,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:x==null?null:""+x,children:p,containerInfo:m,implementation:v}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yt.createPortal=function(p,m){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return d(p,m,null,v)},yt.flushSync=function(p){var m=h.T,v=r.p;try{if(h.T=null,r.p=2,p)return p()}finally{h.T=m,r.p=v,r.d.f()}},yt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},yt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},yt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var v=m.as,x=g(v,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,j=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;v==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:j}):v==="script"&&r.d.X(p,{crossOrigin:x,integrity:S,fetchPriority:j,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},yt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var v=g(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},yt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var v=m.as,x=g(v,m.crossOrigin);r.d.L(p,v,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},yt.preloadModule=function(p,m){if(typeof p=="string")if(m){var v=g(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},yt.requestFormReset=function(p){r.d.r(p)},yt.unstable_batchedUpdates=function(p,m){return p(m)},yt.useFormState=function(p,m,v){return h.H.useFormState(p,m,v)},yt.useFormStatus=function(){return h.H.useHostTransitionStatus()},yt.version="19.2.4",yt}var ry;function hg(){if(ry)return tf.exports;ry=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(l){console.error(l)}}return n(),tf.exports=Fv(),tf.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,15 +38,15 @@ var W0=n=>{throw TypeError(n)};var Fo=(n,l,i)=>l.has(n)||W0("Cannot "+i);var _=(
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var uy;function Jv(){if(uy)return
|
|
41
|
+
*/var uy;function Jv(){if(uy)return Ri;uy=1;var n=Pv(),l=Xi(),i=hg();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(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 g(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(d(e)!==e)throw Error(r(188))}function m(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,s=t;;){var u=a.return;if(u===null)break;var c=u.alternate;if(c===null){if(s=u.return,s!==null){a=s;continue}break}if(u.child===c.child){for(c=u.child;c;){if(c===a)return p(u),e;if(c===s)return p(u),t;c=c.sibling}throw Error(r(188))}if(a.return!==s.return)a=u,s=c;else{for(var y=!1,b=u.child;b;){if(b===a){y=!0,a=u,s=c;break}if(b===s){y=!0,s=u,a=c;break}b=b.sibling}if(!y){for(b=c.child;b;){if(b===a){y=!0,a=c,s=u;break}if(b===s){y=!0,s=c,a=u;break}b=b.sibling}if(!y)throw Error(r(189))}}if(a.alternate!==s)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,S=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),V=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case A:return"Profiler";case C:return"StrictMode";case X:return"Suspense";case W:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case Z:return e.displayName||"Context";case $:return(e._context.displayName||"Context")+".Consumer";case L:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:ue(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var ne=Array.isArray,O=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},me=[],oe=-1;function T(e){return{current:e}}function G(e){0>oe||(e.current=me[oe],me[oe]=null,oe--)}function ee(e,t){oe++,me[oe]=e.current,e.current=t}var q=T(null),de=T(null),ve=T(null),be=T(null);function Pe(e,t){switch(ee(ve,t),ee(de,e),ee(q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?j0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=j0(t),e=N0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(q),ee(q,e)}function He(){G(q),G(de),G(ve)}function ua(e){e.memoizedState!==null&&ee(be,e);var t=q.current,a=N0(t,e.type);t!==a&&(ee(de,e),ee(q,a))}function xa(e){de.current===e&&(G(q),G(de)),be.current===e&&(G(be),vi._currentValue=te)}var Ss,Cl;function va(e){if(Ss===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ss=t&&t[1]||"",Cl=-1<a.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Ss+e+
|
|
43
|
+
`+Ss+e+Cl}var js=!1;function Ns(e,t){if(!e||js)return"";js=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var k=function(){throw Error()};if(Object.defineProperty(k.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(k,[])}catch(B){var U=B}Reflect.construct(e,[],k)}else{try{k.call()}catch(B){U=B}e.call(k.prototype)}}else{try{throw Error()}catch(B){U=B}(k=e())&&typeof k.catch=="function"&&k.catch(function(){})}}catch(B){if(B&&U&&typeof B.stack=="string")return[B.stack,U.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),y=c[0],b=c[1];if(y&&b){var R=y.split(`
|
|
44
44
|
`),D=b.split(`
|
|
45
45
|
`);for(u=s=0;s<R.length&&!R[s].includes("DetermineComponentFrameRoot");)s++;for(;u<D.length&&!D[u].includes("DetermineComponentFrameRoot");)u++;if(s===R.length||u===D.length)for(s=R.length-1,u=D.length-1;1<=s&&0<=u&&R[s]!==D[u];)u--;for(;1<=s&&0<=u;s--,u--)if(R[s]!==D[u]){if(s!==1||u!==1)do if(s--,u--,0>u||R[s]!==D[u]){var H=`
|
|
46
46
|
`+R[s].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=s&&0<=u);break}}}finally{js=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?va(a):""}function Za(e,t){switch(e.tag){case 26:case 27:case 5:return va(e.type);case 16:return va("Lazy");case 13:return e.child!==t&&t!==null?va("Suspense Fallback"):va("Suspense");case 19:return va("SuspenseList");case 0:case 15:return Ns(e.type,!1);case 11:return Ns(e.type.render,!1);case 1:return Ns(e.type,!0);case 31:return va("Activity");default:return""}}function Rs(e){try{var t="",a=null;do t+=Za(e,a),a=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
47
|
Error generating stack: `+s.message+`
|
|
48
|
-
`+s.stack}}var aa=Object.prototype.hasOwnProperty,Cl=n.unstable_scheduleCallback,_s=n.unstable_cancelCallback,Uu=n.unstable_shouldYield,$i=n.unstable_requestPaint,Se=n.unstable_now,mt=n.unstable_getCurrentPriorityLevel,ca=n.unstable_ImmediatePriority,Pi=n.unstable_UserBlockingPriority,Fi=n.unstable_NormalPriority,_p=n.unstable_LowPriority,ad=n.unstable_IdlePriority,Ep=n.log,Tp=n.unstable_setDisableYieldValue,wl=null,Ot=null;function $a(e){if(typeof Ep=="function"&&Tp(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(wl,e)}catch{}}var zt=Math.clz32?Math.clz32:wp,Mp=Math.log,Cp=Math.LN2;function wp(e){return e>>>=0,e===0?32:31-(Mp(e)/Cp|0)|0}var Ji=256,Ii=262144,Wi=4194304;function Bn(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 er(e,t,a){var s=e.pendingLanes;if(s===0)return 0;var u=0,c=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~c,s!==0?u=Bn(s):(y&=b,y!==0?u=Bn(y):a||(a=b&~e,a!==0&&(u=Bn(a))))):(b=s&~c,b!==0?u=Bn(b):y!==0?u=Bn(y):a||(a=s&~e,a!==0&&(u=Bn(a)))),u===0?0:t!==0&&t!==u&&(t&c)===0&&(c=u&-u,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:u}function Al(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ap(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 nd(){var e=Wi;return Wi<<=1,(Wi&62914560)===0&&(Wi=4194304),e}function Bu(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ol(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Op(e,t,a,s,u,c){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var b=e.entanglements,R=e.expirationTimes,D=e.hiddenUpdates;for(a=y&~a;0<a;){var H=31-zt(a),k=1<<H;b[H]=0,R[H]=-1;var U=D[H];if(U!==null)for(D[H]=null,H=0;H<U.length;H++){var B=U[H];B!==null&&(B.lane&=-536870913)}a&=~k}s!==0&&sd(e,s,0),c!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=c&~(y&~t))}function sd(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-zt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&261930}function ld(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-zt(a),u=1<<s;u&t|e[s]&t&&(e[s]|=t),a&=~u}}function id(e,t){var a=t&-t;return a=(a&42)!==0?1:qu(a),(a&(e.suspendedLanes|t))!==0?0:a}function qu(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 Hu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function rd(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:k0(e.type))}function ud(e,t){var a=Y.p;try{return Y.p=e,t()}finally{Y.p=a}}var Pa=Math.random().toString(36).slice(2),rt="__reactFiber$"+Pa,jt="__reactProps$"+Pa,Es="__reactContainer$"+Pa,Qu="__reactEvents$"+Pa,zp="__reactListeners$"+Pa,Dp="__reactHandles$"+Pa,cd="__reactResources$"+Pa,zl="__reactMarker$"+Pa;function Yu(e){delete e[rt],delete e[jt],delete e[Qu],delete e[zp],delete e[Dp]}function Ts(e){var t=e[rt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Es]||a[rt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=w0(e);e!==null;){if(a=e[rt])return a;e=w0(e)}return t}e=a,a=e.parentNode}return null}function Ms(e){if(e=e[rt]||e[Es]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Dl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Cs(e){var t=e[cd];return t||(t=e[cd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[zl]=!0}var od=new Set,fd={};function qn(e,t){ws(e,t),ws(e+"Capture",t)}function ws(e,t){for(fd[e]=t,e=0;e<t.length;e++)od.add(t[e])}var Lp=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]*$"),dd={},hd={};function Up(e){return aa.call(hd,e)?!0:aa.call(dd,e)?!1:Lp.test(e)?hd[e]=!0:(dd[e]=!0,!1)}function tr(e,t,a){if(Up(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ar(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ba(e,t,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+s)}}function Kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function md(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Bp(e,t,a){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,c=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(y){a=""+y,c.call(this,y)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gu(e){if(!e._valueTracker){var t=md(e)?"checked":"value";e._valueTracker=Bp(e,t,""+e[t])}}function yd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=md(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function nr(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 qp=/[\n"\\]/g;function Vt(e){return e.replace(qp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ku(e,t,a,s,u,c,y,b){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Kt(t)):e.value!==""+Kt(t)&&(e.value=""+Kt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Vu(e,y,Kt(t)):a!=null?Vu(e,y,Kt(a)):s!=null&&e.removeAttribute("value"),u==null&&c!=null&&(e.defaultChecked=!!c),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Kt(b):e.removeAttribute("name")}function gd(e,t,a,s,u,c,y,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Gu(e);return}a=a!=null?""+Kt(a):"",t=t!=null?""+Kt(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??u,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Gu(e)}function Vu(e,t,a){t==="number"&&nr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function As(e,t,a,s){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&s&&(e[a].defaultSelected=!0)}else{for(a=""+Kt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,s&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function pd(e,t,a){if(t!=null&&(t=""+Kt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Kt(a):""}function xd(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error(r(92));if(ne(s)){if(1<s.length)throw Error(r(93));s=s[0]}a=s}a==null&&(a=""),t=a}a=Kt(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s),Gu(e)}function Os(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Hp=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 vd(e,t,a){var s=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,a):typeof a!="number"||a===0||Hp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function bd(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var u in t)s=t[u],t.hasOwnProperty(u)&&a[u]!==s&&vd(e,u,s)}else for(var c in t)t.hasOwnProperty(c)&&vd(e,c,t[c])}function Xu(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 Qp=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"]]),Yp=/^[\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 sr(e){return Yp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Sa(){}var ku=null;function Zu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zs=null,Ds=null;function Sd(e){var t=Ms(e);if(t&&(e=t.stateNode)){var a=e[jt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ku(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Vt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var s=a[t];if(s!==e&&s.form===e.form){var u=s[jt]||null;if(!u)throw Error(r(90));Ku(s,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)s=a[t],s.form===e.form&&yd(s)}break e;case"textarea":pd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&As(e,!!a.multiple,t,!1)}}}var $u=!1;function jd(e,t,a){if($u)return e(t,a);$u=!0;try{var s=e(t);return s}finally{if($u=!1,(zs!==null||Ds!==null)&&(Xr(),zs&&(t=zs,e=Ds,Ds=zs=null,Sd(t),e)))for(t=0;t<e.length;t++)Sd(e[t])}}function Ll(e,t){var a=e.stateNode;if(a===null)return null;var s=a[jt]||null;if(s===null)return null;a=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pu=!1;if(ja)try{var Ul={};Object.defineProperty(Ul,"passive",{get:function(){Pu=!0}}),window.addEventListener("test",Ul,Ul),window.removeEventListener("test",Ul,Ul)}catch{Pu=!1}var Fa=null,Fu=null,lr=null;function Nd(){if(lr)return lr;var e,t=Fu,a=t.length,s,u="value"in Fa?Fa.value:Fa.textContent,c=u.length;for(e=0;e<a&&t[e]===u[e];e++);var y=a-e;for(s=1;s<=y&&t[a-s]===u[c-s];s++);return lr=u.slice(e,1<s?1-s:void 0)}function ir(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 rr(){return!0}function Rd(){return!1}function Nt(e){function t(a,s,u,c,y){this._reactName=a,this._targetInst=u,this.type=s,this.nativeEvent=c,this.target=y,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?rr:Rd,this.isPropagationStopped=Rd,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var Hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ur=Nt(Hn),Bl=x({},Hn,{view:0,detail:0}),Gp=Nt(Bl),Ju,Iu,ql,cr=x({},Bl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ec,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!==ql&&(ql&&e.type==="mousemove"?(Ju=e.screenX-ql.screenX,Iu=e.screenY-ql.screenY):Iu=Ju=0,ql=e),Ju)},movementY:function(e){return"movementY"in e?e.movementY:Iu}}),_d=Nt(cr),Kp=x({},cr,{dataTransfer:0}),Vp=Nt(Kp),Xp=x({},Bl,{relatedTarget:0}),Wu=Nt(Xp),kp=x({},Hn,{animationName:0,elapsedTime:0,pseudoElement:0}),Zp=Nt(kp),$p=x({},Hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Pp=Nt($p),Fp=x({},Hn,{data:0}),Ed=Nt(Fp),Jp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ip={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"},Wp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ex(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wp[e])?!!t[e]:!1}function ec(){return ex}var tx=x({},Bl,{key:function(e){if(e.key){var t=Jp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ir(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ip[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ec,charCode:function(e){return e.type==="keypress"?ir(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ir(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ax=Nt(tx),nx=x({},cr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=Nt(nx),sx=x({},Bl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ec}),lx=Nt(sx),ix=x({},Hn,{propertyName:0,elapsedTime:0,pseudoElement:0}),rx=Nt(ix),ux=x({},cr,{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}),cx=Nt(ux),ox=x({},Hn,{newState:0,oldState:0}),fx=Nt(ox),dx=[9,13,27,32],tc=ja&&"CompositionEvent"in window,Hl=null;ja&&"documentMode"in document&&(Hl=document.documentMode);var hx=ja&&"TextEvent"in window&&!Hl,Md=ja&&(!tc||Hl&&8<Hl&&11>=Hl),Cd=" ",wd=!1;function Ad(e,t){switch(e){case"keyup":return dx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Od(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ls=!1;function mx(e,t){switch(e){case"compositionend":return Od(t);case"keypress":return t.which!==32?null:(wd=!0,Cd);case"textInput":return e=t.data,e===Cd&&wd?null:e;default:return null}}function yx(e,t){if(Ls)return e==="compositionend"||!tc&&Ad(e,t)?(e=Nd(),lr=Fu=Fa=null,Ls=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Md&&t.locale!=="ko"?null:t.data;default:return null}}var gx={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 zd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gx[e.type]:t==="textarea"}function Dd(e,t,a,s){zs?Ds?Ds.push(s):Ds=[s]:zs=s,t=Ir(t,"onChange"),0<t.length&&(a=new ur("onChange","change",null,a,s),e.push({event:a,listeners:t}))}var Ql=null,Yl=null;function px(e){g0(e,0)}function or(e){var t=Dl(e);if(yd(t))return e}function Ld(e,t){if(e==="change")return t}var Ud=!1;if(ja){var ac;if(ja){var nc="oninput"in document;if(!nc){var Bd=document.createElement("div");Bd.setAttribute("oninput","return;"),nc=typeof Bd.oninput=="function"}ac=nc}else ac=!1;Ud=ac&&(!document.documentMode||9<document.documentMode)}function qd(){Ql&&(Ql.detachEvent("onpropertychange",Hd),Yl=Ql=null)}function Hd(e){if(e.propertyName==="value"&&or(Yl)){var t=[];Dd(t,Yl,e,Zu(e)),jd(px,t)}}function xx(e,t,a){e==="focusin"?(qd(),Ql=t,Yl=a,Ql.attachEvent("onpropertychange",Hd)):e==="focusout"&&qd()}function vx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return or(Yl)}function bx(e,t){if(e==="click")return or(t)}function Sx(e,t){if(e==="input"||e==="change")return or(t)}function jx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:jx;function Gl(e,t){if(Dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var u=a[s];if(!aa.call(t,u)||!Dt(e[u],t[u]))return!1}return!0}function Qd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yd(e,t){var a=Qd(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Qd(a)}}function Gd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=nr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=nr(e.document)}return t}function sc(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 Nx=ja&&"documentMode"in document&&11>=document.documentMode,Us=null,lc=null,Kl=null,ic=!1;function Vd(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ic||Us==null||Us!==nr(s)||(s=Us,"selectionStart"in s&&sc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Kl&&Gl(Kl,s)||(Kl=s,s=Ir(lc,"onSelect"),0<s.length&&(t=new ur("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=Us)))}function Qn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Bs={animationend:Qn("Animation","AnimationEnd"),animationiteration:Qn("Animation","AnimationIteration"),animationstart:Qn("Animation","AnimationStart"),transitionrun:Qn("Transition","TransitionRun"),transitionstart:Qn("Transition","TransitionStart"),transitioncancel:Qn("Transition","TransitionCancel"),transitionend:Qn("Transition","TransitionEnd")},rc={},Xd={};ja&&(Xd=document.createElement("div").style,"AnimationEvent"in window||(delete Bs.animationend.animation,delete Bs.animationiteration.animation,delete Bs.animationstart.animation),"TransitionEvent"in window||delete Bs.transitionend.transition);function Yn(e){if(rc[e])return rc[e];if(!Bs[e])return e;var t=Bs[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Xd)return rc[e]=t[a];return e}var kd=Yn("animationend"),Zd=Yn("animationiteration"),$d=Yn("animationstart"),Rx=Yn("transitionrun"),_x=Yn("transitionstart"),Ex=Yn("transitioncancel"),Pd=Yn("transitionend"),Fd=new Map,uc="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(" ");uc.push("scrollEnd");function na(e,t){Fd.set(e,t),qn(t,[e])}var fr=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)},Xt=[],qs=0,cc=0;function dr(){for(var e=qs,t=cc=qs=0;t<e;){var a=Xt[t];Xt[t++]=null;var s=Xt[t];Xt[t++]=null;var u=Xt[t];Xt[t++]=null;var c=Xt[t];if(Xt[t++]=null,s!==null&&u!==null){var y=s.pending;y===null?u.next=u:(u.next=y.next,y.next=u),s.pending=u}c!==0&&Jd(a,u,c)}}function hr(e,t,a,s){Xt[qs++]=e,Xt[qs++]=t,Xt[qs++]=a,Xt[qs++]=s,cc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function oc(e,t,a,s){return hr(e,t,a,s),mr(e)}function Gn(e,t){return hr(e,null,null,t),mr(e)}function Jd(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var u=!1,c=e.return;c!==null;)c.childLanes|=a,s=c.alternate,s!==null&&(s.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(u=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,u&&t!==null&&(u=31-zt(a),e=c.hiddenUpdates,s=e[u],s===null?e[u]=[t]:s.push(t),t.lane=a|536870912),c):null}function mr(e){if(50<fi)throw fi=0,bo=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Hs={};function Tx(e,t,a,s){this.tag=e,this.key=a,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,t,a,s){return new Tx(e,t,a,s)}function fc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Na(e,t){var a=e.alternate;return a===null?(a=Lt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Id(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yr(e,t,a,s,u,c){var y=0;if(s=e,typeof e=="function")fc(e)&&(y=1);else if(typeof e=="string")y=Ov(e,a,q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=Lt(31,a,t,u),e.elementType=J,e.lanes=c,e;case E:return Kn(a.children,u,c,t);case C:y=8,u|=24;break;case A:return e=Lt(12,a,t,u|2),e.elementType=A,e.lanes=c,e;case X:return e=Lt(13,a,t,u),e.elementType=X,e.lanes=c,e;case W:return e=Lt(19,a,t,u),e.elementType=W,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z:y=10;break e;case $:y=9;break e;case L:y=11;break e;case P:y=14;break e;case F:y=16,s=null;break e}y=29,a=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=Lt(y,a,t,u),t.elementType=e,t.type=s,t.lanes=c,t}function Kn(e,t,a,s){return e=Lt(7,e,s,t),e.lanes=a,e}function dc(e,t,a){return e=Lt(6,e,null,t),e.lanes=a,e}function Wd(e){var t=Lt(18,null,null,0);return t.stateNode=e,t}function hc(e,t,a){return t=Lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var eh=new WeakMap;function kt(e,t){if(typeof e=="object"&&e!==null){var a=eh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Rs(t)},eh.set(e,t),t)}return{value:e,source:t,stack:Rs(t)}}var Qs=[],Ys=0,gr=null,Vl=0,Zt=[],$t=0,Ja=null,oa=1,fa="";function Ra(e,t){Qs[Ys++]=Vl,Qs[Ys++]=gr,gr=e,Vl=t}function th(e,t,a){Zt[$t++]=oa,Zt[$t++]=fa,Zt[$t++]=Ja,Ja=e;var s=oa;e=fa;var u=32-zt(s)-1;s&=~(1<<u),a+=1;var c=32-zt(t)+u;if(30<c){var y=u-u%5;c=(s&(1<<y)-1).toString(32),s>>=y,u-=y,oa=1<<32-zt(t)+u|a<<u|s,fa=c+e}else oa=1<<c|a<<u|s,fa=e}function mc(e){e.return!==null&&(Ra(e,1),th(e,1,0))}function yc(e){for(;e===gr;)gr=Qs[--Ys],Qs[Ys]=null,Vl=Qs[--Ys],Qs[Ys]=null;for(;e===Ja;)Ja=Zt[--$t],Zt[$t]=null,fa=Zt[--$t],Zt[$t]=null,oa=Zt[--$t],Zt[$t]=null}function ah(e,t){Zt[$t++]=oa,Zt[$t++]=fa,Zt[$t++]=Ja,oa=t.id,fa=t.overflow,Ja=e}var ut=null,Qe=null,Te=!1,Ia=null,Pt=!1,gc=Error(r(519));function Wa(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xl(kt(t,e)),gc}function nh(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[rt]=e,t[jt]=s,a){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(a=0;a<hi.length;a++)Ne(hi[a],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),gd(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),xd(t,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||s.suppressHydrationWarning===!0||b0(t.textContent,a)?(s.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),s.onScroll!=null&&Ne("scroll",t),s.onScrollEnd!=null&&Ne("scrollend",t),s.onClick!=null&&(t.onclick=Sa),t=!0):t=!1,t||Wa(e,!0)}function sh(e){for(ut=e.return;ut;)switch(ut.tag){case 5:case 31:case 13:Pt=!1;return;case 27:case 3:Pt=!0;return;default:ut=ut.return}}function Gs(e){if(e!==ut)return!1;if(!Te)return sh(e),Te=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Lo(e.type,e.memoizedProps)),a=!a),a&&Qe&&Wa(e),sh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=C0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=C0(e)}else t===27?(t=Qe,mn(e.type)?(e=Qo,Qo=null,Qe=e):Qe=t):Qe=ut?Jt(e.stateNode.nextSibling):null;return!0}function Vn(){Qe=ut=null,Te=!1}function pc(){var e=Ia;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Ia=null),e}function Xl(e){Ia===null?Ia=[e]:Ia.push(e)}var xc=T(null),Xn=null,_a=null;function en(e,t,a){ee(xc,t._currentValue),t._currentValue=a}function Ea(e){e._currentValue=xc.current,G(xc)}function vc(e,t,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===a)break;e=e.return}}function bc(e,t,a,s){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var c=u.dependencies;if(c!==null){var y=u.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=u;for(var R=0;R<t.length;R++)if(b.context===t[R]){c.lanes|=a,b=c.alternate,b!==null&&(b.lanes|=a),vc(c.return,a,e),s||(y=null);break e}c=b.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(r(341));y.lanes|=a,c=y.alternate,c!==null&&(c.lanes|=a),vc(y,a,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function Ks(e,t,a,s){e=null;for(var u=t,c=!1;u!==null;){if(!c){if((u.flags&524288)!==0)c=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var b=u.type;Dt(u.pendingProps.value,y.value)||(e!==null?e.push(b):e=[b])}}else if(u===be.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(xi):e=[xi])}u=u.return}e!==null&&bc(t,e,a,s),t.flags|=262144}function pr(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function kn(e){Xn=e,_a=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ct(e){return lh(Xn,e)}function xr(e,t){return Xn===null&&kn(e),lh(e,t)}function lh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},_a===null){if(e===null)throw Error(r(308));_a=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _a=_a.next=t;return a}var Mx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Cx=n.unstable_scheduleCallback,wx=n.unstable_NormalPriority,Ie={$$typeof:Z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sc(){return{controller:new Mx,data:new Map,refCount:0}}function kl(e){e.refCount--,e.refCount===0&&Cx(wx,function(){e.controller.abort()})}var Zl=null,jc=0,Vs=0,Xs=null;function Ax(e,t){if(Zl===null){var a=Zl=[];jc=0,Vs=Eo(),Xs={status:"pending",value:void 0,then:function(s){a.push(s)}}}return jc++,t.then(ih,ih),t}function ih(){if(--jc===0&&Zl!==null){Xs!==null&&(Xs.status="fulfilled");var e=Zl;Zl=null,Vs=0,Xs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ox(e,t){var a=[],s={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(s.status="rejected",s.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),s}var rh=O.S;O.S=function(e,t){Vm=Se(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ax(e,t),rh!==null&&rh(e,t)};var Zn=T(null);function Nc(){var e=Zn.current;return e!==null?e:qe.pooledCache}function vr(e,t){t===null?ee(Zn,Zn.current):ee(Zn,t.pool)}function uh(){var e=Nc();return e===null?null:{parent:Ie._currentValue,pool:e}}var ks=Error(r(460)),Rc=Error(r(474)),br=Error(r(542)),Sr={then:function(){}};function ch(e){return e=e.status,e==="fulfilled"||e==="rejected"}function oh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Sa,Sa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,dh(e),e;default:if(typeof t.status=="string")t.then(Sa,Sa);else{if(e=qe,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=s}},function(s){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,dh(e),e}throw Pn=t,ks}}function $n(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Pn=a,ks):a}}var Pn=null;function fh(){if(Pn===null)throw Error(r(459));var e=Pn;return Pn=null,e}function dh(e){if(e===ks||e===br)throw Error(r(483))}var Zs=null,$l=0;function jr(e){var t=$l;return $l+=1,Zs===null&&(Zs=[]),oh(Zs,e,t)}function Pl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Nr(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function hh(e){function t(w,M){if(e){var z=w.deletions;z===null?(w.deletions=[M],w.flags|=16):z.push(M)}}function a(w,M){if(!e)return null;for(;M!==null;)t(w,M),M=M.sibling;return null}function s(w){for(var M=new Map;w!==null;)w.key!==null?M.set(w.key,w):M.set(w.index,w),w=w.sibling;return M}function u(w,M){return w=Na(w,M),w.index=0,w.sibling=null,w}function c(w,M,z){return w.index=z,e?(z=w.alternate,z!==null?(z=z.index,z<M?(w.flags|=67108866,M):z):(w.flags|=67108866,M)):(w.flags|=1048576,M)}function y(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function b(w,M,z,K){return M===null||M.tag!==6?(M=dc(z,w.mode,K),M.return=w,M):(M=u(M,z),M.return=w,M)}function R(w,M,z,K){var fe=z.type;return fe===E?H(w,M,z.props.children,K,z.key):M!==null&&(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===F&&$n(fe)===M.type)?(M=u(M,z.props),Pl(M,z),M.return=w,M):(M=yr(z.type,z.key,z.props,null,w.mode,K),Pl(M,z),M.return=w,M)}function D(w,M,z,K){return M===null||M.tag!==4||M.stateNode.containerInfo!==z.containerInfo||M.stateNode.implementation!==z.implementation?(M=hc(z,w.mode,K),M.return=w,M):(M=u(M,z.children||[]),M.return=w,M)}function H(w,M,z,K,fe){return M===null||M.tag!==7?(M=Kn(z,w.mode,K,fe),M.return=w,M):(M=u(M,z),M.return=w,M)}function k(w,M,z){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=dc(""+M,w.mode,z),M.return=w,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case j:return z=yr(M.type,M.key,M.props,null,w.mode,z),Pl(z,M),z.return=w,z;case N:return M=hc(M,w.mode,z),M.return=w,M;case F:return M=$n(M),k(w,M,z)}if(ne(M)||se(M))return M=Kn(M,w.mode,z,null),M.return=w,M;if(typeof M.then=="function")return k(w,jr(M),z);if(M.$$typeof===Z)return k(w,xr(w,M),z);Nr(w,M)}return null}function U(w,M,z,K){var fe=M!==null?M.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return fe!==null?null:b(w,M,""+z,K);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case j:return z.key===fe?R(w,M,z,K):null;case N:return z.key===fe?D(w,M,z,K):null;case F:return z=$n(z),U(w,M,z,K)}if(ne(z)||se(z))return fe!==null?null:H(w,M,z,K,null);if(typeof z.then=="function")return U(w,M,jr(z),K);if(z.$$typeof===Z)return U(w,M,xr(w,z),K);Nr(w,z)}return null}function B(w,M,z,K,fe){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return w=w.get(z)||null,b(M,w,""+K,fe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case j:return w=w.get(K.key===null?z:K.key)||null,R(M,w,K,fe);case N:return w=w.get(K.key===null?z:K.key)||null,D(M,w,K,fe);case F:return K=$n(K),B(w,M,z,K,fe)}if(ne(K)||se(K))return w=w.get(z)||null,H(M,w,K,fe,null);if(typeof K.then=="function")return B(w,M,z,jr(K),fe);if(K.$$typeof===Z)return B(w,M,z,xr(M,K),fe);Nr(M,K)}return null}function ie(w,M,z,K){for(var fe=null,Ce=null,re=M,pe=M=0,_e=null;re!==null&&pe<z.length;pe++){re.index>pe?(_e=re,re=null):_e=re.sibling;var we=U(w,re,z[pe],K);if(we===null){re===null&&(re=_e);break}e&&re&&we.alternate===null&&t(w,re),M=c(we,M,pe),Ce===null?fe=we:Ce.sibling=we,Ce=we,re=_e}if(pe===z.length)return a(w,re),Te&&Ra(w,pe),fe;if(re===null){for(;pe<z.length;pe++)re=k(w,z[pe],K),re!==null&&(M=c(re,M,pe),Ce===null?fe=re:Ce.sibling=re,Ce=re);return Te&&Ra(w,pe),fe}for(re=s(re);pe<z.length;pe++)_e=B(re,w,pe,z[pe],K),_e!==null&&(e&&_e.alternate!==null&&re.delete(_e.key===null?pe:_e.key),M=c(_e,M,pe),Ce===null?fe=_e:Ce.sibling=_e,Ce=_e);return e&&re.forEach(function(vn){return t(w,vn)}),Te&&Ra(w,pe),fe}function he(w,M,z,K){if(z==null)throw Error(r(151));for(var fe=null,Ce=null,re=M,pe=M=0,_e=null,we=z.next();re!==null&&!we.done;pe++,we=z.next()){re.index>pe?(_e=re,re=null):_e=re.sibling;var vn=U(w,re,we.value,K);if(vn===null){re===null&&(re=_e);break}e&&re&&vn.alternate===null&&t(w,re),M=c(vn,M,pe),Ce===null?fe=vn:Ce.sibling=vn,Ce=vn,re=_e}if(we.done)return a(w,re),Te&&Ra(w,pe),fe;if(re===null){for(;!we.done;pe++,we=z.next())we=k(w,we.value,K),we!==null&&(M=c(we,M,pe),Ce===null?fe=we:Ce.sibling=we,Ce=we);return Te&&Ra(w,pe),fe}for(re=s(re);!we.done;pe++,we=z.next())we=B(re,w,pe,we.value,K),we!==null&&(e&&we.alternate!==null&&re.delete(we.key===null?pe:we.key),M=c(we,M,pe),Ce===null?fe=we:Ce.sibling=we,Ce=we);return e&&re.forEach(function(Kv){return t(w,Kv)}),Te&&Ra(w,pe),fe}function Be(w,M,z,K){if(typeof z=="object"&&z!==null&&z.type===E&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case j:e:{for(var fe=z.key;M!==null;){if(M.key===fe){if(fe=z.type,fe===E){if(M.tag===7){a(w,M.sibling),K=u(M,z.props.children),K.return=w,w=K;break e}}else if(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===F&&$n(fe)===M.type){a(w,M.sibling),K=u(M,z.props),Pl(K,z),K.return=w,w=K;break e}a(w,M);break}else t(w,M);M=M.sibling}z.type===E?(K=Kn(z.props.children,w.mode,K,z.key),K.return=w,w=K):(K=yr(z.type,z.key,z.props,null,w.mode,K),Pl(K,z),K.return=w,w=K)}return y(w);case N:e:{for(fe=z.key;M!==null;){if(M.key===fe)if(M.tag===4&&M.stateNode.containerInfo===z.containerInfo&&M.stateNode.implementation===z.implementation){a(w,M.sibling),K=u(M,z.children||[]),K.return=w,w=K;break e}else{a(w,M);break}else t(w,M);M=M.sibling}K=hc(z,w.mode,K),K.return=w,w=K}return y(w);case F:return z=$n(z),Be(w,M,z,K)}if(ne(z))return ie(w,M,z,K);if(se(z)){if(fe=se(z),typeof fe!="function")throw Error(r(150));return z=fe.call(z),he(w,M,z,K)}if(typeof z.then=="function")return Be(w,M,jr(z),K);if(z.$$typeof===Z)return Be(w,M,xr(w,z),K);Nr(w,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,M!==null&&M.tag===6?(a(w,M.sibling),K=u(M,z),K.return=w,w=K):(a(w,M),K=dc(z,w.mode,K),K.return=w,w=K),y(w)):a(w,M)}return function(w,M,z,K){try{$l=0;var fe=Be(w,M,z,K);return Zs=null,fe}catch(re){if(re===ks||re===br)throw re;var Ce=Lt(29,re,null,w.mode);return Ce.lanes=K,Ce.return=w,Ce}finally{}}}var Fn=hh(!0),mh=hh(!1),tn=!1;function _c(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ec(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 an(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function nn(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ae&2)!==0){var u=s.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),s.pending=t,t=mr(e),Jd(e,null,a),t}return hr(e,s,t,a),mr(e)}function Fl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,ld(e,a)}}function Tc(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var u=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?u=c=y:c=c.next=y,a=a.next}while(a!==null);c===null?u=c=t:c=c.next=t}else u=c=t;a={baseState:s.baseState,firstBaseUpdate:u,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Mc=!1;function Jl(){if(Mc){var e=Xs;if(e!==null)throw e}}function Il(e,t,a,s){Mc=!1;var u=e.updateQueue;tn=!1;var c=u.firstBaseUpdate,y=u.lastBaseUpdate,b=u.shared.pending;if(b!==null){u.shared.pending=null;var R=b,D=R.next;R.next=null,y===null?c=D:y.next=D,y=R;var H=e.alternate;H!==null&&(H=H.updateQueue,b=H.lastBaseUpdate,b!==y&&(b===null?H.firstBaseUpdate=D:b.next=D,H.lastBaseUpdate=R))}if(c!==null){var k=u.baseState;y=0,H=D=R=null,b=c;do{var U=b.lane&-536870913,B=U!==b.lane;if(B?(Re&U)===U:(s&U)===U){U!==0&&U===Vs&&(Mc=!0),H!==null&&(H=H.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ie=e,he=b;U=t;var Be=a;switch(he.tag){case 1:if(ie=he.payload,typeof ie=="function"){k=ie.call(Be,k,U);break e}k=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=he.payload,U=typeof ie=="function"?ie.call(Be,k,U):ie,U==null)break e;k=x({},k,U);break e;case 2:tn=!0}}U=b.callback,U!==null&&(e.flags|=64,B&&(e.flags|=8192),B=u.callbacks,B===null?u.callbacks=[U]:B.push(U))}else B={lane:U,tag:b.tag,payload:b.payload,callback:b.callback,next:null},H===null?(D=H=B,R=k):H=H.next=B,y|=U;if(b=b.next,b===null){if(b=u.shared.pending,b===null)break;B=b,b=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);H===null&&(R=k),u.baseState=R,u.firstBaseUpdate=D,u.lastBaseUpdate=H,c===null&&(u.shared.lanes=0),cn|=y,e.lanes=y,e.memoizedState=k}}function yh(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function gh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)yh(a[e],t)}var $s=T(null),Rr=T(0);function ph(e,t){e=La,ee(Rr,e),ee($s,t),La=e|t.baseLanes}function Cc(){ee(Rr,La),ee($s,$s.current)}function wc(){La=Rr.current,G($s),G(Rr)}var Ut=T(null),Ft=null;function sn(e){var t=e.alternate;ee(Fe,Fe.current&1),ee(Ut,e),Ft===null&&(t===null||$s.current!==null||t.memoizedState!==null)&&(Ft=e)}function Ac(e){ee(Fe,Fe.current),ee(Ut,e),Ft===null&&(Ft=e)}function xh(e){e.tag===22?(ee(Fe,Fe.current),ee(Ut,e),Ft===null&&(Ft=e)):ln()}function ln(){ee(Fe,Fe.current),ee(Ut,Ut.current)}function Bt(e){G(Ut),Ft===e&&(Ft=null),G(Fe)}var Fe=T(0);function _r(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||qo(a)||Ho(a)))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 Ta=0,ge=null,Le=null,We=null,Er=!1,Ps=!1,Jn=!1,Tr=0,Wl=0,Fs=null,zx=0;function ke(){throw Error(r(321))}function Oc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Dt(e[a],t[a]))return!1;return!0}function zc(e,t,a,s,u,c){return Ta=c,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?tm:$c,Jn=!1,c=a(s,u),Jn=!1,Ps&&(c=bh(t,a,s,u)),vh(e),c}function vh(e){O.H=ai;var t=Le!==null&&Le.next!==null;if(Ta=0,We=Le=ge=null,Er=!1,Wl=0,Fs=null,t)throw Error(r(300));e===null||et||(e=e.dependencies,e!==null&&pr(e)&&(et=!0))}function bh(e,t,a,s){ge=e;var u=0;do{if(Ps&&(Fs=null),Wl=0,Ps=!1,25<=u)throw Error(r(301));if(u+=1,We=Le=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}O.H=am,c=t(a,s)}while(Ps);return c}function Dx(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?ei(t):t,e=e.useState()[0],(Le!==null?Le.memoizedState:null)!==e&&(ge.flags|=1024),t}function Dc(){var e=Tr!==0;return Tr=0,e}function Lc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Uc(e){if(Er){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Er=!1}Ta=0,We=Le=ge=null,Ps=!1,Wl=Tr=0,Fs=null}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?ge.memoizedState=We=e:We=We.next=e,We}function Je(){if(Le===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=We===null?ge.memoizedState:We.next;if(t!==null)We=t,Le=e;else{if(e===null)throw ge.alternate===null?Error(r(467)):Error(r(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},We===null?ge.memoizedState=We=e:We=We.next=e}return We}function Mr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ei(e){var t=Wl;return Wl+=1,Fs===null&&(Fs=[]),e=oh(Fs,e,t),t=ge,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?tm:$c),e}function Cr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ei(e);if(e.$$typeof===Z)return ct(e)}throw Error(r(438,String(e)))}function Bc(e){var t=null,a=ge.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=ge.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Mr(),ge.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),s=0;s<e;s++)a[s]=V;return t.index++,a}function Ma(e,t){return typeof t=="function"?t(e):t}function wr(e){var t=Je();return qc(t,Le,e)}function qc(e,t,a){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=a;var u=e.baseQueue,c=s.pending;if(c!==null){if(u!==null){var y=u.next;u.next=c.next,c.next=y}t.baseQueue=u=c,s.pending=null}if(c=e.baseState,u===null)e.memoizedState=c;else{t=u.next;var b=y=null,R=null,D=t,H=!1;do{var k=D.lane&-536870913;if(k!==D.lane?(Re&k)===k:(Ta&k)===k){var U=D.revertLane;if(U===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),k===Vs&&(H=!0);else if((Ta&U)===U){D=D.next,U===Vs&&(H=!0);continue}else k={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},R===null?(b=R=k,y=c):R=R.next=k,ge.lanes|=U,cn|=U;k=D.action,Jn&&a(c,k),c=D.hasEagerState?D.eagerState:a(c,k)}else U={lane:k,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},R===null?(b=R=U,y=c):R=R.next=U,ge.lanes|=k,cn|=k;D=D.next}while(D!==null&&D!==t);if(R===null?y=c:R.next=b,!Dt(c,e.memoizedState)&&(et=!0,H&&(a=Xs,a!==null)))throw a;e.memoizedState=c,e.baseState=y,e.baseQueue=R,s.lastRenderedState=c}return u===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Hc(e){var t=Je(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var s=a.dispatch,u=a.pending,c=t.memoizedState;if(u!==null){a.pending=null;var y=u=u.next;do c=e(c,y.action),y=y.next;while(y!==u);Dt(c,t.memoizedState)||(et=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,s]}function Sh(e,t,a){var s=ge,u=Je(),c=Te;if(c){if(a===void 0)throw Error(r(407));a=a()}else a=t();var y=!Dt((Le||u).memoizedState,a);if(y&&(u.memoizedState=a,et=!0),u=u.queue,Gc(Rh.bind(null,s,u,e),[e]),u.getSnapshot!==t||y||We!==null&&We.memoizedState.tag&1){if(s.flags|=2048,Js(9,{destroy:void 0},Nh.bind(null,s,u,a,t),null),qe===null)throw Error(r(349));c||(Ta&127)!==0||jh(s,t,a)}return a}function jh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ge.updateQueue,t===null?(t=Mr(),ge.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Nh(e,t,a,s){t.value=a,t.getSnapshot=s,_h(t)&&Eh(e)}function Rh(e,t,a){return a(function(){_h(t)&&Eh(e)})}function _h(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Dt(e,a)}catch{return!0}}function Eh(e){var t=Gn(e,2);t!==null&&Mt(t,e,2)}function Qc(e){var t=xt();if(typeof e=="function"){var a=e;if(e=a(),Jn){$a(!0);try{a()}finally{$a(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:e},t}function Th(e,t,a,s){return e.baseState=a,qc(e,Le,typeof s=="function"?s:Ma)}function Lx(e,t,a,s,u){if(zr(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){c.listeners.push(y)}};O.T!==null?a(!0):c.isTransition=!1,s(c),a=t.pending,a===null?(c.next=t.pending=c,Mh(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Mh(e,t){var a=t.action,s=t.payload,u=e.state;if(t.isTransition){var c=O.T,y={};O.T=y;try{var b=a(u,s),R=O.S;R!==null&&R(y,b),Ch(e,t,b)}catch(D){Yc(e,t,D)}finally{c!==null&&y.types!==null&&(c.types=y.types),O.T=c}}else try{c=a(u,s),Ch(e,t,c)}catch(D){Yc(e,t,D)}}function Ch(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){wh(e,t,s)},function(s){return Yc(e,t,s)}):wh(e,t,a)}function wh(e,t,a){t.status="fulfilled",t.value=a,Ah(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Mh(e,a)))}function Yc(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,Ah(t),t=t.next;while(t!==s)}e.action=null}function Ah(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Oh(e,t){return t}function zh(e,t){if(Te){var a=qe.formState;if(a!==null){e:{var s=ge;if(Te){if(Qe){t:{for(var u=Qe,c=Pt;u.nodeType!==8;){if(!c){u=null;break t}if(u=Jt(u.nextSibling),u===null){u=null;break t}}c=u.data,u=c==="F!"||c==="F"?u:null}if(u){Qe=Jt(u.nextSibling),s=u.data==="F!";break e}}Wa(s)}s=!1}s&&(t=a[0])}}return a=xt(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oh,lastRenderedState:t},a.queue=s,a=Ih.bind(null,ge,s),s.dispatch=a,s=Qc(!1),c=Zc.bind(null,ge,!1,s.queue),s=xt(),u={state:t,dispatch:null,action:e,pending:null},s.queue=u,a=Lx.bind(null,ge,u,c,a),u.dispatch=a,s.memoizedState=e,[t,a,!1]}function Dh(e){var t=Je();return Lh(t,Le,e)}function Lh(e,t,a){if(t=qc(e,t,Oh)[0],e=wr(Ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=ei(t)}catch(y){throw y===ks?br:y}else s=t;t=Je();var u=t.queue,c=u.dispatch;return a!==t.memoizedState&&(ge.flags|=2048,Js(9,{destroy:void 0},Ux.bind(null,u,a),null)),[s,c,e]}function Ux(e,t){e.action=t}function Uh(e){var t=Je(),a=Le;if(a!==null)return Lh(t,a,e);Je(),t=t.memoizedState,a=Je();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function Js(e,t,a,s){return e={tag:e,create:a,deps:s,inst:t,next:null},t=ge.updateQueue,t===null&&(t=Mr(),ge.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,t.lastEffect=e),e}function Bh(){return Je().memoizedState}function Ar(e,t,a,s){var u=xt();ge.flags|=e,u.memoizedState=Js(1|t,{destroy:void 0},a,s===void 0?null:s)}function Or(e,t,a,s){var u=Je();s=s===void 0?null:s;var c=u.memoizedState.inst;Le!==null&&s!==null&&Oc(s,Le.memoizedState.deps)?u.memoizedState=Js(t,c,a,s):(ge.flags|=e,u.memoizedState=Js(1|t,c,a,s))}function qh(e,t){Ar(8390656,8,e,t)}function Gc(e,t){Or(2048,8,e,t)}function Bx(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=Mr(),ge.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Hh(e){var t=Je().memoizedState;return Bx({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Qh(e,t){return Or(4,2,e,t)}function Yh(e,t){return Or(4,4,e,t)}function Gh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kh(e,t,a){a=a!=null?a.concat([e]):null,Or(4,4,Gh.bind(null,t,e),a)}function Kc(){}function Vh(e,t){var a=Je();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&Oc(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function Xh(e,t){var a=Je();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&Oc(t,s[1]))return s[0];if(s=e(),Jn){$a(!0);try{e()}finally{$a(!1)}}return a.memoizedState=[s,t],s}function Vc(e,t,a){return a===void 0||(Ta&1073741824)!==0&&(Re&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=km(),ge.lanes|=e,cn|=e,a)}function kh(e,t,a,s){return Dt(a,t)?a:$s.current!==null?(e=Vc(e,a,s),Dt(e,t)||(et=!0),e):(Ta&42)===0||(Ta&1073741824)!==0&&(Re&261930)===0?(et=!0,e.memoizedState=a):(e=km(),ge.lanes|=e,cn|=e,t)}function Zh(e,t,a,s,u){var c=Y.p;Y.p=c!==0&&8>c?c:8;var y=O.T,b={};O.T=b,Zc(e,!1,t,a);try{var R=u(),D=O.S;if(D!==null&&D(b,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var H=Ox(R,s);ti(e,t,H,Qt(e))}else ti(e,t,s,Qt(e))}catch(k){ti(e,t,{then:function(){},status:"rejected",reason:k},Qt())}finally{Y.p=c,y!==null&&b.types!==null&&(y.types=b.types),O.T=y}}function qx(){}function Xc(e,t,a,s){if(e.tag!==5)throw Error(r(476));var u=$h(e).queue;Zh(e,u,t,te,a===null?qx:function(){return Ph(e),a(s)})}function $h(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:te},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ph(e){var t=$h(e);t.next===null&&(t=e.alternate.memoizedState),ti(e,t.next.queue,{},Qt())}function kc(){return ct(xi)}function Fh(){return Je().memoizedState}function Jh(){return Je().memoizedState}function Hx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Qt();e=an(a);var s=nn(t,e,a);s!==null&&(Mt(s,t,a),Fl(s,t,a)),t={cache:Sc()},e.payload=t;return}t=t.return}}function Qx(e,t,a){var s=Qt();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},zr(e)?Wh(t,a):(a=oc(e,t,a,s),a!==null&&(Mt(a,e,s),em(a,t,s)))}function Ih(e,t,a){var s=Qt();ti(e,t,a,s)}function ti(e,t,a,s){var u={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(zr(e))Wh(t,u);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var y=t.lastRenderedState,b=c(y,a);if(u.hasEagerState=!0,u.eagerState=b,Dt(b,y))return hr(e,t,u,0),qe===null&&dr(),!1}catch{}finally{}if(a=oc(e,t,u,s),a!==null)return Mt(a,e,s),em(a,t,s),!0}return!1}function Zc(e,t,a,s){if(s={lane:2,revertLane:Eo(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},zr(e)){if(t)throw Error(r(479))}else t=oc(e,a,s,2),t!==null&&Mt(t,e,2)}function zr(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Wh(e,t){Ps=Er=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function em(e,t,a){if((a&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,ld(e,a)}}var ai={readContext:ct,use:Cr,useCallback:ke,useContext:ke,useEffect:ke,useImperativeHandle:ke,useLayoutEffect:ke,useInsertionEffect:ke,useMemo:ke,useReducer:ke,useRef:ke,useState:ke,useDebugValue:ke,useDeferredValue:ke,useTransition:ke,useSyncExternalStore:ke,useId:ke,useHostTransitionStatus:ke,useFormState:ke,useActionState:ke,useOptimistic:ke,useMemoCache:ke,useCacheRefresh:ke};ai.useEffectEvent=ke;var tm={readContext:ct,use:Cr,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:qh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ar(4194308,4,Gh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ar(4194308,4,e,t)},useInsertionEffect:function(e,t){Ar(4,2,e,t)},useMemo:function(e,t){var a=xt();t=t===void 0?null:t;var s=e();if(Jn){$a(!0);try{e()}finally{$a(!1)}}return a.memoizedState=[s,t],s},useReducer:function(e,t,a){var s=xt();if(a!==void 0){var u=a(t);if(Jn){$a(!0);try{a(t)}finally{$a(!1)}}}else u=t;return s.memoizedState=s.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},s.queue=e,e=e.dispatch=Qx.bind(null,ge,e),[s.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:function(e){e=Qc(e);var t=e.queue,a=Ih.bind(null,ge,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Kc,useDeferredValue:function(e,t){var a=xt();return Vc(a,e,t)},useTransition:function(){var e=Qc(!1);return e=Zh.bind(null,ge,e.queue,!0,!1),xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var s=ge,u=xt();if(Te){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),qe===null)throw Error(r(349));(Re&127)!==0||jh(s,t,a)}u.memoizedState=a;var c={value:a,getSnapshot:t};return u.queue=c,qh(Rh.bind(null,s,c,e),[e]),s.flags|=2048,Js(9,{destroy:void 0},Nh.bind(null,s,c,a,t),null),a},useId:function(){var e=xt(),t=qe.identifierPrefix;if(Te){var a=fa,s=oa;a=(s&~(1<<32-zt(s)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Tr++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=zx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:kc,useFormState:zh,useActionState:zh,useOptimistic:function(e){var t=xt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Zc.bind(null,ge,!0,a),a.dispatch=t,[e,t]},useMemoCache:Bc,useCacheRefresh:function(){return xt().memoizedState=Hx.bind(null,ge)},useEffectEvent:function(e){var t=xt(),a={impl:e};return t.memoizedState=a,function(){if((Ae&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},$c={readContext:ct,use:Cr,useCallback:Vh,useContext:ct,useEffect:Gc,useImperativeHandle:Kh,useInsertionEffect:Qh,useLayoutEffect:Yh,useMemo:Xh,useReducer:wr,useRef:Bh,useState:function(){return wr(Ma)},useDebugValue:Kc,useDeferredValue:function(e,t){var a=Je();return kh(a,Le.memoizedState,e,t)},useTransition:function(){var e=wr(Ma)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ei(e),t]},useSyncExternalStore:Sh,useId:Fh,useHostTransitionStatus:kc,useFormState:Dh,useActionState:Dh,useOptimistic:function(e,t){var a=Je();return Th(a,Le,e,t)},useMemoCache:Bc,useCacheRefresh:Jh};$c.useEffectEvent=Hh;var am={readContext:ct,use:Cr,useCallback:Vh,useContext:ct,useEffect:Gc,useImperativeHandle:Kh,useInsertionEffect:Qh,useLayoutEffect:Yh,useMemo:Xh,useReducer:Hc,useRef:Bh,useState:function(){return Hc(Ma)},useDebugValue:Kc,useDeferredValue:function(e,t){var a=Je();return Le===null?Vc(a,e,t):kh(a,Le.memoizedState,e,t)},useTransition:function(){var e=Hc(Ma)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ei(e),t]},useSyncExternalStore:Sh,useId:Fh,useHostTransitionStatus:kc,useFormState:Uh,useActionState:Uh,useOptimistic:function(e,t){var a=Je();return Le!==null?Th(a,Le,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Bc,useCacheRefresh:Jh};am.useEffectEvent=Hh;function Pc(e,t,a,s){t=e.memoizedState,a=a(s,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Fc={enqueueSetState:function(e,t,a){e=e._reactInternals;var s=Qt(),u=an(s);u.payload=t,a!=null&&(u.callback=a),t=nn(e,u,s),t!==null&&(Mt(t,e,s),Fl(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=Qt(),u=an(s);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=nn(e,u,s),t!==null&&(Mt(t,e,s),Fl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Qt(),s=an(a);s.tag=2,t!=null&&(s.callback=t),t=nn(e,s,a),t!==null&&(Mt(t,e,a),Fl(t,e,a))}};function nm(e,t,a,s,u,c,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,c,y):t.prototype&&t.prototype.isPureReactComponent?!Gl(a,s)||!Gl(u,c):!0}function sm(e,t,a,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,s),t.state!==e&&Fc.enqueueReplaceState(t,t.state,null)}function In(e,t){var a=t;if("ref"in t){a={};for(var s in t)s!=="ref"&&(a[s]=t[s])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function lm(e){fr(e)}function im(e){console.error(e)}function rm(e){fr(e)}function Dr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function um(e,t,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Jc(e,t,a){return a=an(a),a.tag=3,a.payload={element:null},a.callback=function(){Dr(e,t)},a}function cm(e){return e=an(e),e.tag=3,e}function om(e,t,a,s){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var c=s.value;e.payload=function(){return u(c)},e.callback=function(){um(t,a,s)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){um(t,a,s),typeof u!="function"&&(on===null?on=new Set([this]):on.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function Yx(e,t,a,s,u){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&Ks(t,a,u,!0),a=Ut.current,a!==null){switch(a.tag){case 31:case 13:return Ft===null?kr():a.alternate===null&&Ze===0&&(Ze=3),a.flags&=-257,a.flags|=65536,a.lanes=u,s===Sr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),No(e,s,u)),!1;case 22:return a.flags|=65536,s===Sr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([s]):a.add(s)),No(e,s,u)),!1}throw Error(r(435,a.tag))}return No(e,s,u),kr(),!1}if(Te)return t=Ut.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,s!==gc&&(e=Error(r(422),{cause:s}),Xl(kt(e,a)))):(s!==gc&&(t=Error(r(423),{cause:s}),Xl(kt(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,s=kt(s,a),u=Jc(e.stateNode,s,u),Tc(e,u),Ze!==4&&(Ze=2)),!1;var c=Error(r(520),{cause:s});if(c=kt(c,a),oi===null?oi=[c]:oi.push(c),Ze!==4&&(Ze=2),t===null)return!0;s=kt(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=Jc(a.stateNode,s,e),Tc(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(on===null||!on.has(c))))return a.flags|=65536,u&=-u,a.lanes|=u,u=cm(u),om(u,e,a,s),Tc(a,u),!1}a=a.return}while(a!==null);return!1}var Ic=Error(r(461)),et=!1;function ot(e,t,a,s){t.child=e===null?mh(t,null,a,s):Fn(t,e.child,a,s)}function fm(e,t,a,s,u){a=a.render;var c=t.ref;if("ref"in s){var y={};for(var b in s)b!=="ref"&&(y[b]=s[b])}else y=s;return kn(t),s=zc(e,t,a,y,c,u),b=Dc(),e!==null&&!et?(Lc(e,t,u),Ca(e,t,u)):(Te&&b&&mc(t),t.flags|=1,ot(e,t,s,u),t.child)}function dm(e,t,a,s,u){if(e===null){var c=a.type;return typeof c=="function"&&!fc(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,hm(e,t,c,s,u)):(e=yr(a.type,null,s,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!io(e,u)){var y=c.memoizedProps;if(a=a.compare,a=a!==null?a:Gl,a(y,s)&&e.ref===t.ref)return Ca(e,t,u)}return t.flags|=1,e=Na(c,s),e.ref=t.ref,e.return=t,t.child=e}function hm(e,t,a,s,u){if(e!==null){var c=e.memoizedProps;if(Gl(c,s)&&e.ref===t.ref)if(et=!1,t.pendingProps=s=c,io(e,u))(e.flags&131072)!==0&&(et=!0);else return t.lanes=e.lanes,Ca(e,t,u)}return Wc(e,t,a,s,u)}function mm(e,t,a,s){var u=s.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(s=t.child=e.child,u=0;s!==null;)u=u|s.lanes|s.childLanes,s=s.sibling;s=u&~c}else s=0,t.child=null;return ym(e,t,c,a,s)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vr(t,c!==null?c.cachePool:null),c!==null?ph(t,c):Cc(),xh(t);else return s=t.lanes=536870912,ym(e,t,c!==null?c.baseLanes|a:a,a,s)}else c!==null?(vr(t,c.cachePool),ph(t,c),ln(),t.memoizedState=null):(e!==null&&vr(t,null),Cc(),ln());return ot(e,t,u,a),t.child}function ni(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ym(e,t,a,s,u){var c=Nc();return c=c===null?null:{parent:Ie._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&vr(t,null),Cc(),xh(t),e!==null&&Ks(e,t,s,!0),t.childLanes=u,null}function Lr(e,t){return t=Br({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gm(e,t,a){return Fn(t,e.child,null,a),e=Lr(t,t.pendingProps),e.flags|=2,Bt(t),t.memoizedState=null,e}function Gx(e,t,a){var s=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(s.mode==="hidden")return e=Lr(t,s),t.lanes=536870912,ni(null,e);if(Ac(t),(e=Qe)?(e=M0(e,Pt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ja!==null?{id:oa,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},a=Wd(e),a.return=t,t.child=a,ut=t,Qe=null)):e=null,e===null)throw Wa(t);return t.lanes=536870912,null}return Lr(t,s)}var c=e.memoizedState;if(c!==null){var y=c.dehydrated;if(Ac(t),u)if(t.flags&256)t.flags&=-257,t=gm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(et||Ks(e,t,a,!1),u=(a&e.childLanes)!==0,et||u){if(s=qe,s!==null&&(y=id(s,a),y!==0&&y!==c.retryLane))throw c.retryLane=y,Gn(e,y),Mt(s,e,y),Ic;kr(),t=gm(e,t,a)}else e=c.treeContext,Qe=Jt(y.nextSibling),ut=t,Te=!0,Ia=null,Pt=!1,e!==null&&ah(t,e),t=Lr(t,s),t.flags|=4096;return t}return e=Na(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ur(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Wc(e,t,a,s,u){return kn(t),a=zc(e,t,a,s,void 0,u),s=Dc(),e!==null&&!et?(Lc(e,t,u),Ca(e,t,u)):(Te&&s&&mc(t),t.flags|=1,ot(e,t,a,u),t.child)}function pm(e,t,a,s,u,c){return kn(t),t.updateQueue=null,a=bh(t,s,a,u),vh(e),s=Dc(),e!==null&&!et?(Lc(e,t,c),Ca(e,t,c)):(Te&&s&&mc(t),t.flags|=1,ot(e,t,a,c),t.child)}function xm(e,t,a,s,u){if(kn(t),t.stateNode===null){var c=Hs,y=a.contextType;typeof y=="object"&&y!==null&&(c=ct(y)),c=new a(s,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Fc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=s,c.state=t.memoizedState,c.refs={},_c(t),y=a.contextType,c.context=typeof y=="object"&&y!==null?ct(y):Hs,c.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(Pc(t,a,y,s),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(y=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),y!==c.state&&Fc.enqueueReplaceState(c,c.state,null),Il(t,s,c,u),Jl(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,R=In(a,b);c.props=R;var D=c.context,H=a.contextType;y=Hs,typeof H=="object"&&H!==null&&(y=ct(H));var k=a.getDerivedStateFromProps;H=typeof k=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,H||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||D!==y)&&sm(t,c,s,y),tn=!1;var U=t.memoizedState;c.state=U,Il(t,s,c,u),Jl(),D=t.memoizedState,b||U!==D||tn?(typeof k=="function"&&(Pc(t,a,k,s),D=t.memoizedState),(R=tn||nm(t,a,R,s,U,D,y))?(H||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=D),c.props=s,c.state=D,c.context=y,s=R):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{c=t.stateNode,Ec(e,t),y=t.memoizedProps,H=In(a,y),c.props=H,k=t.pendingProps,U=c.context,D=a.contextType,R=Hs,typeof D=="object"&&D!==null&&(R=ct(D)),b=a.getDerivedStateFromProps,(D=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y!==k||U!==R)&&sm(t,c,s,R),tn=!1,U=t.memoizedState,c.state=U,Il(t,s,c,u),Jl();var B=t.memoizedState;y!==k||U!==B||tn||e!==null&&e.dependencies!==null&&pr(e.dependencies)?(typeof b=="function"&&(Pc(t,a,b,s),B=t.memoizedState),(H=tn||nm(t,a,H,s,U,B,R)||e!==null&&e.dependencies!==null&&pr(e.dependencies))?(D||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,B,R),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,B,R)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=B),c.props=s,c.state=B,c.context=R,s=H):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),s=!1)}return c=s,Ur(e,t),s=(t.flags&128)!==0,c||s?(c=t.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&s?(t.child=Fn(t,e.child,null,u),t.child=Fn(t,null,a,u)):ot(e,t,a,u),t.memoizedState=c.state,e=t.child):e=Ca(e,t,u),e}function vm(e,t,a,s){return Vn(),t.flags|=256,ot(e,t,a,s),t.child}var eo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function to(e){return{baseLanes:e,cachePool:uh()}}function ao(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ht),e}function bm(e,t,a){var s=t.pendingProps,u=!1,c=(t.flags&128)!==0,y;if((y=c)||(y=e!==null&&e.memoizedState===null?!1:(Fe.current&2)!==0),y&&(u=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(u?sn(t):ln(),(e=Qe)?(e=M0(e,Pt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ja!==null?{id:oa,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},a=Wd(e),a.return=t,t.child=a,ut=t,Qe=null)):e=null,e===null)throw Wa(t);return Ho(e)?t.lanes=32:t.lanes=536870912,null}var b=s.children;return s=s.fallback,u?(ln(),u=t.mode,b=Br({mode:"hidden",children:b},u),s=Kn(s,u,a,null),b.return=t,s.return=t,b.sibling=s,t.child=b,s=t.child,s.memoizedState=to(a),s.childLanes=ao(e,y,a),t.memoizedState=eo,ni(null,s)):(sn(t),no(t,b))}var R=e.memoizedState;if(R!==null&&(b=R.dehydrated,b!==null)){if(c)t.flags&256?(sn(t),t.flags&=-257,t=so(e,t,a)):t.memoizedState!==null?(ln(),t.child=e.child,t.flags|=128,t=null):(ln(),b=s.fallback,u=t.mode,s=Br({mode:"visible",children:s.children},u),b=Kn(b,u,a,null),b.flags|=2,s.return=t,b.return=t,s.sibling=b,t.child=s,Fn(t,e.child,null,a),s=t.child,s.memoizedState=to(a),s.childLanes=ao(e,y,a),t.memoizedState=eo,t=ni(null,s));else if(sn(t),Ho(b)){if(y=b.nextSibling&&b.nextSibling.dataset,y)var D=y.dgst;y=D,s=Error(r(419)),s.stack="",s.digest=y,Xl({value:s,source:null,stack:null}),t=so(e,t,a)}else if(et||Ks(e,t,a,!1),y=(a&e.childLanes)!==0,et||y){if(y=qe,y!==null&&(s=id(y,a),s!==0&&s!==R.retryLane))throw R.retryLane=s,Gn(e,s),Mt(y,e,s),Ic;qo(b)||kr(),t=so(e,t,a)}else qo(b)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,Qe=Jt(b.nextSibling),ut=t,Te=!0,Ia=null,Pt=!1,e!==null&&ah(t,e),t=no(t,s.children),t.flags|=4096);return t}return u?(ln(),b=s.fallback,u=t.mode,R=e.child,D=R.sibling,s=Na(R,{mode:"hidden",children:s.children}),s.subtreeFlags=R.subtreeFlags&65011712,D!==null?b=Na(D,b):(b=Kn(b,u,a,null),b.flags|=2),b.return=t,s.return=t,s.sibling=b,t.child=s,ni(null,s),s=t.child,b=e.child.memoizedState,b===null?b=to(a):(u=b.cachePool,u!==null?(R=Ie._currentValue,u=u.parent!==R?{parent:R,pool:R}:u):u=uh(),b={baseLanes:b.baseLanes|a,cachePool:u}),s.memoizedState=b,s.childLanes=ao(e,y,a),t.memoizedState=eo,ni(e.child,s)):(sn(t),a=e.child,e=a.sibling,a=Na(a,{mode:"visible",children:s.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function no(e,t){return t=Br({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Br(e,t){return e=Lt(22,e,null,t),e.lanes=0,e}function so(e,t,a){return Fn(t,e.child,null,a),e=no(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sm(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),vc(e.return,t,a)}function lo(e,t,a,s,u,c){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:u,treeForkCount:c}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=a,y.tailMode=u,y.treeForkCount=c)}function jm(e,t,a){var s=t.pendingProps,u=s.revealOrder,c=s.tail;s=s.children;var y=Fe.current,b=(y&2)!==0;if(b?(y=y&1|2,t.flags|=128):y&=1,ee(Fe,y),ot(e,t,s,a),s=Te?Vl:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sm(e,a,t);else if(e.tag===19)Sm(e,a,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(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&_r(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),lo(t,!1,u,a,c,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&_r(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}lo(t,!0,a,null,c,s);break;case"together":lo(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ca(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),cn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ks(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=Na(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Na(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function io(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pr(e)))}function Kx(e,t,a){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),en(t,Ie,e.memoizedState.cache),Vn();break;case 27:case 5:ua(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:en(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ac(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(sn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?bm(e,t,a):(sn(t),e=Ca(e,t,a),e!==null?e.sibling:null);sn(t);break;case 19:var u=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(Ks(e,t,a,!1),s=(a&t.childLanes)!==0),u){if(s)return jm(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ee(Fe,Fe.current),s)break;return null;case 22:return t.lanes=0,mm(e,t,a,t.pendingProps);case 24:en(t,Ie,e.memoizedState.cache)}return Ca(e,t,a)}function Nm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)et=!0;else{if(!io(e,a)&&(t.flags&128)===0)return et=!1,Kx(e,t,a);et=(e.flags&131072)!==0}else et=!1,Te&&(t.flags&1048576)!==0&&th(t,Vl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=$n(t.elementType),t.type=e,typeof e=="function")fc(e)?(s=In(e,s),t.tag=1,t=xm(null,t,e,s,a)):(t.tag=0,t=Wc(null,t,e,s,a));else{if(e!=null){var u=e.$$typeof;if(u===L){t.tag=11,t=fm(null,t,e,s,a);break e}else if(u===P){t.tag=14,t=dm(null,t,e,s,a);break e}}throw t=ue(e)||e,Error(r(306,t,""))}}return t;case 0:return Wc(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,u=In(s,t.pendingProps),xm(e,t,s,u,a);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var c=t.memoizedState;u=c.element,Ec(e,t),Il(t,s,null,a);var y=t.memoizedState;if(s=y.cache,en(t,Ie,s),s!==c.cache&&bc(t,[Ie],a,!0),Jl(),s=y.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=vm(e,t,s,a);break e}else if(s!==u){u=kt(Error(r(424)),t),Xl(u),t=vm(e,t,s,a);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(Qe=Jt(e.firstChild),ut=t,Te=!0,Ia=null,Pt=!0,a=mh(t,null,s,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Vn(),s===u){t=Ca(e,t,a);break e}ot(e,t,s,a)}t=t.child}return t;case 26:return Ur(e,t),e===null?(a=D0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Te||(a=t.type,e=t.pendingProps,s=Wr(ve.current).createElement(a),s[rt]=t,s[jt]=e,ft(s,a,e),st(s),t.stateNode=s):t.memoizedState=D0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ua(t),e===null&&Te&&(s=t.stateNode=A0(t.type,t.pendingProps,ve.current),ut=t,Pt=!0,u=Qe,mn(t.type)?(Qo=u,Qe=Jt(s.firstChild)):Qe=u),ot(e,t,t.pendingProps.children,a),Ur(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((u=s=Qe)&&(s=vv(s,t.type,t.pendingProps,Pt),s!==null?(t.stateNode=s,ut=t,Qe=Jt(s.firstChild),Pt=!1,u=!0):u=!1),u||Wa(t)),ua(t),u=t.type,c=t.pendingProps,y=e!==null?e.memoizedProps:null,s=c.children,Lo(u,c)?s=null:y!==null&&Lo(u,y)&&(t.flags|=32),t.memoizedState!==null&&(u=zc(e,t,Dx,null,null,a),xi._currentValue=u),Ur(e,t),ot(e,t,s,a),t.child;case 6:return e===null&&Te&&((e=a=Qe)&&(a=bv(a,t.pendingProps,Pt),a!==null?(t.stateNode=a,ut=t,Qe=null,e=!0):e=!1),e||Wa(t)),null;case 13:return bm(e,t,a);case 4:return Pe(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Fn(t,null,s,a):ot(e,t,s,a),t.child;case 11:return fm(e,t,t.type,t.pendingProps,a);case 7:return ot(e,t,t.pendingProps,a),t.child;case 8:return ot(e,t,t.pendingProps.children,a),t.child;case 12:return ot(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.pendingProps,en(t,t.type,s.value),ot(e,t,s.children,a),t.child;case 9:return u=t.type._context,s=t.pendingProps.children,kn(t),u=ct(u),s=s(u),t.flags|=1,ot(e,t,s,a),t.child;case 14:return dm(e,t,t.type,t.pendingProps,a);case 15:return hm(e,t,t.type,t.pendingProps,a);case 19:return jm(e,t,a);case 31:return Gx(e,t,a);case 22:return mm(e,t,a,t.pendingProps);case 24:return kn(t),s=ct(Ie),e===null?(u=Nc(),u===null&&(u=qe,c=Sc(),u.pooledCache=c,c.refCount++,c!==null&&(u.pooledCacheLanes|=a),u=c),t.memoizedState={parent:s,cache:u},_c(t),en(t,Ie,u)):((e.lanes&a)!==0&&(Ec(e,t),Il(t,null,null,a),Jl()),u=e.memoizedState,c=t.memoizedState,u.parent!==s?(u={parent:s,cache:s},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),en(t,Ie,s)):(s=c.cache,en(t,Ie,s),s!==u.cache&&bc(t,[Ie],a,!0))),ot(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function wa(e){e.flags|=4}function ro(e,t,a,s,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Fm())e.flags|=8192;else throw Pn=Sr,Rc}else e.flags&=-16777217}function Rm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!H0(t))if(Fm())e.flags|=8192;else throw Pn=Sr,Rc}function qr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nd():536870912,e.lanes|=t,tl|=t)}function si(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,s|=u.subtreeFlags&65011712,s|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,s|=u.subtreeFlags,s|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=s,e.childLanes=a,t}function Vx(e,t,a){var s=t.pendingProps;switch(yc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ea(Ie),He(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Gs(t)?wa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,pc())),Ye(t),null;case 26:var u=t.type,c=t.memoizedState;return e===null?(wa(t),c!==null?(Ye(t),Rm(t,c)):(Ye(t),ro(t,u,null,s,a))):c?c!==e.memoizedState?(wa(t),Ye(t),Rm(t,c)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&wa(t),Ye(t),ro(t,u,e,s,a)),null;case 27:if(xa(t),a=ve.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&wa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}e=q.current,Gs(t)?nh(t):(e=A0(u,s,a),t.stateNode=e,wa(t))}return Ye(t),null;case 5:if(xa(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&wa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}if(c=q.current,Gs(t))nh(t);else{var y=Wr(ve.current);switch(c){case 1:c=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:c=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":c=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":c=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":c=y.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?y.createElement(u,{is:s.is}):y.createElement(u)}}c[rt]=t,c[jt]=s;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)c.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=c;e:switch(ft(c,u,s),u){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&wa(t)}}return Ye(t),ro(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&wa(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=ve.current,Gs(t)){if(e=t.stateNode,a=t.memoizedProps,s=null,u=ut,u!==null)switch(u.tag){case 27:case 5:s=u.memoizedProps}e[rt]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||b0(e.nodeValue,a)),e||Wa(t,!0)}else e=Wr(e).createTextNode(s),e[rt]=t,t.stateNode=e}return Ye(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(s=Gs(t),a!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[rt]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else a=pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Bt(t),t):(Bt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ye(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Gs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[rt]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),u=!1}else u=pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Bt(t),t):(Bt(t),null)}return Bt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=s!==null,e=e!==null&&e.memoizedState!==null,a&&(s=t.child,u=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(u=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==u&&(s.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),qr(t,t.updateQueue),Ye(t),null);case 4:return He(),e===null&&wo(t.stateNode.containerInfo),Ye(t),null;case 10:return Ea(t.type),Ye(t),null;case 19:if(G(Fe),s=t.memoizedState,s===null)return Ye(t),null;if(u=(t.flags&128)!==0,c=s.rendering,c===null)if(u)si(s,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=_r(e),c!==null){for(t.flags|=128,si(s,!1),e=c.updateQueue,t.updateQueue=e,qr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Id(a,e),a=a.sibling;return ee(Fe,Fe.current&1|2),Te&&Ra(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Se()>Kr&&(t.flags|=128,u=!0,si(s,!1),t.lanes=4194304)}else{if(!u)if(e=_r(c),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,qr(t,e),si(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Te)return Ye(t),null}else 2*Se()-s.renderingStartTime>Kr&&a!==536870912&&(t.flags|=128,u=!0,si(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(e=s.last,e!==null?e.sibling=c:t.child=c,s.last=c)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Se(),e.sibling=null,a=Fe.current,ee(Fe,u?a&1|2:a&1),Te&&Ra(t,s.treeForkCount),e):(Ye(t),null);case 22:case 23:return Bt(t),wc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(a&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),a=t.updateQueue,a!==null&&qr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==a&&(t.flags|=2048),e!==null&&G(Zn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ea(Ie),Ye(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Xx(e,t){switch(yc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ea(Ie),He(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xa(t),null;case 31:if(t.memoizedState!==null){if(Bt(t),t.alternate===null)throw Error(r(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Bt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Fe),null;case 4:return He(),null;case 10:return Ea(t.type),null;case 22:case 23:return Bt(t),wc(),e!==null&&G(Zn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ea(Ie),null;case 25:return null;default:return null}}function _m(e,t){switch(yc(t),t.tag){case 3:Ea(Ie),He();break;case 26:case 27:case 5:xa(t);break;case 4:He();break;case 31:t.memoizedState!==null&&Bt(t);break;case 13:Bt(t);break;case 19:G(Fe);break;case 10:Ea(t.type);break;case 22:case 23:Bt(t),wc(),e!==null&&G(Zn);break;case 24:Ea(Ie)}}function li(e,t){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var u=s.next;a=u;do{if((a.tag&e)===e){s=void 0;var c=a.create,y=a.inst;s=c(),y.destroy=s}a=a.next}while(a!==u)}}catch(b){De(t,t.return,b)}}function rn(e,t,a){try{var s=t.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var c=u.next;s=c;do{if((s.tag&e)===e){var y=s.inst,b=y.destroy;if(b!==void 0){y.destroy=void 0,u=t;var R=a,D=b;try{D()}catch(H){De(u,R,H)}}}s=s.next}while(s!==c)}}catch(H){De(t,t.return,H)}}function Em(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{gh(t,a)}catch(s){De(e,e.return,s)}}}function Tm(e,t,a){a.props=In(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){De(e,t,s)}}function ii(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(u){De(e,t,u)}}function da(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(u){De(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){De(e,t,u)}else a.current=null}function Mm(e){var t=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(u){De(e,e.return,u)}}function uo(e,t,a){try{var s=e.stateNode;hv(s,e.type,a,t),s[jt]=t}catch(u){De(e,e.return,u)}}function Cm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&mn(e.type)||e.tag===4}function co(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cm(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&&mn(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 oo(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Sa));else if(s!==4&&(s===27&&mn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(oo(e,t,a),e=e.sibling;e!==null;)oo(e,t,a),e=e.sibling}function Hr(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(s!==4&&(s===27&&mn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Hr(e,t,a),e=e.sibling;e!==null;)Hr(e,t,a),e=e.sibling}function wm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);ft(t,s,a),t[rt]=e,t[jt]=a}catch(c){De(e,e.return,c)}}var Aa=!1,tt=!1,fo=!1,Am=typeof WeakSet=="function"?WeakSet:Set,lt=null;function kx(e,t){if(e=e.containerInfo,zo=iu,e=Kd(e),sc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var u=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var y=0,b=-1,R=-1,D=0,H=0,k=e,U=null;t:for(;;){for(var B;k!==a||u!==0&&k.nodeType!==3||(b=y+u),k!==c||s!==0&&k.nodeType!==3||(R=y+s),k.nodeType===3&&(y+=k.nodeValue.length),(B=k.firstChild)!==null;)U=k,k=B;for(;;){if(k===e)break t;if(U===a&&++D===u&&(b=y),U===c&&++H===s&&(R=y),(B=k.nextSibling)!==null)break;k=U,U=k.parentNode}k=B}a=b===-1||R===-1?null:{start:b,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Do={focusedElem:e,selectionRange:a},iu=!1,lt=t;lt!==null;)if(t=lt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,lt=e;else for(;lt!==null;){switch(t=lt,c=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(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,u=c.memoizedProps,c=c.memoizedState,s=a.stateNode;try{var ie=In(a.type,u);e=s.getSnapshotBeforeUpdate(ie,c),s.__reactInternalSnapshotBeforeUpdate=e}catch(he){De(a,a.return,he)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Bo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Bo(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,lt=e;break}lt=t.return}}function Om(e,t,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:za(e,a),s&4&&li(5,a);break;case 1:if(za(e,a),s&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){De(a,a.return,y)}else{var u=In(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){De(a,a.return,y)}}s&64&&Em(a),s&512&&ii(a,a.return);break;case 3:if(za(e,a),s&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{gh(e,t)}catch(y){De(a,a.return,y)}}break;case 27:t===null&&s&4&&wm(a);case 26:case 5:za(e,a),t===null&&s&4&&Mm(a),s&512&&ii(a,a.return);break;case 12:za(e,a);break;case 31:za(e,a),s&4&&Lm(e,a);break;case 13:za(e,a),s&4&&Um(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=tv.bind(null,a),Sv(e,a))));break;case 22:if(s=a.memoizedState!==null||Aa,!s){t=t!==null&&t.memoizedState!==null||tt,u=Aa;var c=tt;Aa=s,(tt=t)&&!c?Da(e,a,(a.subtreeFlags&8772)!==0):za(e,a),Aa=u,tt=c}break;case 30:break;default:za(e,a)}}function zm(e){var t=e.alternate;t!==null&&(e.alternate=null,zm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Yu(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 Ge=null,Rt=!1;function Oa(e,t,a){for(a=a.child;a!==null;)Dm(e,t,a),a=a.sibling}function Dm(e,t,a){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(wl,a)}catch{}switch(a.tag){case 26:tt||da(a,t),Oa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:tt||da(a,t);var s=Ge,u=Rt;mn(a.type)&&(Ge=a.stateNode,Rt=!1),Oa(e,t,a),yi(a.stateNode),Ge=s,Rt=u;break;case 5:tt||da(a,t);case 6:if(s=Ge,u=Rt,Ge=null,Oa(e,t,a),Ge=s,Rt=u,Ge!==null)if(Rt)try{(Ge.nodeType===9?Ge.body:Ge.nodeName==="HTML"?Ge.ownerDocument.body:Ge).removeChild(a.stateNode)}catch(c){De(a,t,c)}else try{Ge.removeChild(a.stateNode)}catch(c){De(a,t,c)}break;case 18:Ge!==null&&(Rt?(e=Ge,E0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),cl(e)):E0(Ge,a.stateNode));break;case 4:s=Ge,u=Rt,Ge=a.stateNode.containerInfo,Rt=!0,Oa(e,t,a),Ge=s,Rt=u;break;case 0:case 11:case 14:case 15:rn(2,a,t),tt||rn(4,a,t),Oa(e,t,a);break;case 1:tt||(da(a,t),s=a.stateNode,typeof s.componentWillUnmount=="function"&&Tm(a,t,s)),Oa(e,t,a);break;case 21:Oa(e,t,a);break;case 22:tt=(s=tt)||a.memoizedState!==null,Oa(e,t,a),tt=s;break;default:Oa(e,t,a)}}function Lm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{cl(e)}catch(a){De(t,t.return,a)}}}function Um(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{cl(e)}catch(a){De(t,t.return,a)}}function Zx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Am),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Am),t;default:throw Error(r(435,e.tag))}}function Qr(e,t){var a=Zx(e);t.forEach(function(s){if(!a.has(s)){a.add(s);var u=av.bind(null,e,s);s.then(u,u)}})}function _t(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var u=a[s],c=e,y=t,b=y;e:for(;b!==null;){switch(b.tag){case 27:if(mn(b.type)){Ge=b.stateNode,Rt=!1;break e}break;case 5:Ge=b.stateNode,Rt=!1;break e;case 3:case 4:Ge=b.stateNode.containerInfo,Rt=!0;break e}b=b.return}if(Ge===null)throw Error(r(160));Dm(c,y,u),Ge=null,Rt=!1,c=u.alternate,c!==null&&(c.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bm(t,e),t=t.sibling}var sa=null;function Bm(e,t){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_t(t,e),Et(e),s&4&&(rn(3,e,e.return),li(3,e),rn(5,e,e.return));break;case 1:_t(t,e),Et(e),s&512&&(tt||a===null||da(a,a.return)),s&64&&Aa&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var u=sa;if(_t(t,e),Et(e),s&512&&(tt||a===null||da(a,a.return)),s&4){var c=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(s){case"title":c=u.getElementsByTagName("title")[0],(!c||c[zl]||c[rt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=u.createElement(s),u.head.insertBefore(c,u.querySelector("head > title"))),ft(c,s,a),c[rt]=e,st(c),s=c;break e;case"link":var y=B0("link","href",u).get(s+(a.href||""));if(y){for(var b=0;b<y.length;b++)if(c=y[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(b,1);break t}}c=u.createElement(s),ft(c,s,a),u.head.appendChild(c);break;case"meta":if(y=B0("meta","content",u).get(s+(a.content||""))){for(b=0;b<y.length;b++)if(c=y[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(b,1);break t}}c=u.createElement(s),ft(c,s,a),u.head.appendChild(c);break;default:throw Error(r(468,s))}c[rt]=e,st(c),s=c}e.stateNode=s}else q0(u,e.type,e.stateNode);else e.stateNode=U0(u,s,e.memoizedProps);else c!==s?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,s===null?q0(u,e.type,e.stateNode):U0(u,s,e.memoizedProps)):s===null&&e.stateNode!==null&&uo(e,e.memoizedProps,a.memoizedProps)}break;case 27:_t(t,e),Et(e),s&512&&(tt||a===null||da(a,a.return)),a!==null&&s&4&&uo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(_t(t,e),Et(e),s&512&&(tt||a===null||da(a,a.return)),e.flags&32){u=e.stateNode;try{Os(u,"")}catch(ie){De(e,e.return,ie)}}s&4&&e.stateNode!=null&&(u=e.memoizedProps,uo(e,u,a!==null?a.memoizedProps:u)),s&1024&&(fo=!0);break;case 6:if(_t(t,e),Et(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(ie){De(e,e.return,ie)}}break;case 3:if(au=null,u=sa,sa=eu(t.containerInfo),_t(t,e),sa=u,Et(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{cl(t.containerInfo)}catch(ie){De(e,e.return,ie)}fo&&(fo=!1,qm(e));break;case 4:s=sa,sa=eu(e.stateNode.containerInfo),_t(t,e),Et(e),sa=s;break;case 12:_t(t,e),Et(e);break;case 31:_t(t,e),Et(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qr(e,s)));break;case 13:_t(t,e),Et(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Gr=Se()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qr(e,s)));break;case 22:u=e.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,D=Aa,H=tt;if(Aa=D||u,tt=H||R,_t(t,e),tt=H,Aa=D,Et(e),s&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||R||Aa||tt||Wn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){R=a=t;try{if(c=R.stateNode,u)y=c.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{b=R.stateNode;var k=R.memoizedProps.style,U=k!=null&&k.hasOwnProperty("display")?k.display:null;b.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ie){De(R,R.return,ie)}}}else if(t.tag===6){if(a===null){R=t;try{R.stateNode.nodeValue=u?"":R.memoizedProps}catch(ie){De(R,R.return,ie)}}}else if(t.tag===18){if(a===null){R=t;try{var B=R.stateNode;u?T0(B,!0):T0(R.stateNode,!1)}catch(ie){De(R,R.return,ie)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Qr(e,a))));break;case 19:_t(t,e),Et(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qr(e,s)));break;case 30:break;case 21:break;default:_t(t,e),Et(e)}}function Et(e){var t=e.flags;if(t&2){try{for(var a,s=e.return;s!==null;){if(Cm(s)){a=s;break}s=s.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var u=a.stateNode,c=co(e);Hr(e,c,u);break;case 5:var y=a.stateNode;a.flags&32&&(Os(y,""),a.flags&=-33);var b=co(e);Hr(e,b,y);break;case 3:case 4:var R=a.stateNode.containerInfo,D=co(e);oo(e,D,R);break;default:throw Error(r(161))}}catch(H){De(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function za(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Om(e,t.alternate,t),t=t.sibling}function Wn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:rn(4,t,t.return),Wn(t);break;case 1:da(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Tm(t,t.return,a),Wn(t);break;case 27:yi(t.stateNode);case 26:case 5:da(t,t.return),Wn(t);break;case 22:t.memoizedState===null&&Wn(t);break;case 30:Wn(t);break;default:Wn(t)}e=e.sibling}}function Da(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,u=e,c=t,y=c.flags;switch(c.tag){case 0:case 11:case 15:Da(u,c,a),li(4,c);break;case 1:if(Da(u,c,a),s=c,u=s.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(D){De(s,s.return,D)}if(s=c,u=s.updateQueue,u!==null){var b=s.stateNode;try{var R=u.shared.hiddenCallbacks;if(R!==null)for(u.shared.hiddenCallbacks=null,u=0;u<R.length;u++)yh(R[u],b)}catch(D){De(s,s.return,D)}}a&&y&64&&Em(c),ii(c,c.return);break;case 27:wm(c);case 26:case 5:Da(u,c,a),a&&s===null&&y&4&&Mm(c),ii(c,c.return);break;case 12:Da(u,c,a);break;case 31:Da(u,c,a),a&&y&4&&Lm(u,c);break;case 13:Da(u,c,a),a&&y&4&&Um(u,c);break;case 22:c.memoizedState===null&&Da(u,c,a),ii(c,c.return);break;case 30:break;default:Da(u,c,a)}t=t.sibling}}function ho(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&kl(a))}function mo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&kl(e))}function la(e,t,a,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hm(e,t,a,s),t=t.sibling}function Hm(e,t,a,s){var u=t.flags;switch(t.tag){case 0:case 11:case 15:la(e,t,a,s),u&2048&&li(9,t);break;case 1:la(e,t,a,s);break;case 3:la(e,t,a,s),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&kl(e)));break;case 12:if(u&2048){la(e,t,a,s),e=t.stateNode;try{var c=t.memoizedProps,y=c.id,b=c.onPostCommit;typeof b=="function"&&b(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){De(t,t.return,R)}}else la(e,t,a,s);break;case 31:la(e,t,a,s);break;case 13:la(e,t,a,s);break;case 23:break;case 22:c=t.stateNode,y=t.alternate,t.memoizedState!==null?c._visibility&2?la(e,t,a,s):ri(e,t):c._visibility&2?la(e,t,a,s):(c._visibility|=2,Is(e,t,a,s,(t.subtreeFlags&10256)!==0||!1)),u&2048&&ho(y,t);break;case 24:la(e,t,a,s),u&2048&&mo(t.alternate,t);break;default:la(e,t,a,s)}}function Is(e,t,a,s,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,y=t,b=a,R=s,D=y.flags;switch(y.tag){case 0:case 11:case 15:Is(c,y,b,R,u),li(8,y);break;case 23:break;case 22:var H=y.stateNode;y.memoizedState!==null?H._visibility&2?Is(c,y,b,R,u):ri(c,y):(H._visibility|=2,Is(c,y,b,R,u)),u&&D&2048&&ho(y.alternate,y);break;case 24:Is(c,y,b,R,u),u&&D&2048&&mo(y.alternate,y);break;default:Is(c,y,b,R,u)}t=t.sibling}}function ri(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,s=t,u=s.flags;switch(s.tag){case 22:ri(a,s),u&2048&&ho(s.alternate,s);break;case 24:ri(a,s),u&2048&&mo(s.alternate,s);break;default:ri(a,s)}t=t.sibling}}var ui=8192;function Ws(e,t,a){if(e.subtreeFlags&ui)for(e=e.child;e!==null;)Qm(e,t,a),e=e.sibling}function Qm(e,t,a){switch(e.tag){case 26:Ws(e,t,a),e.flags&ui&&e.memoizedState!==null&&zv(a,sa,e.memoizedState,e.memoizedProps);break;case 5:Ws(e,t,a);break;case 3:case 4:var s=sa;sa=eu(e.stateNode.containerInfo),Ws(e,t,a),sa=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=ui,ui=16777216,Ws(e,t,a),ui=s):Ws(e,t,a));break;default:Ws(e,t,a)}}function Ym(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 ci(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];lt=s,Km(s,e)}Ym(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gm(e),e=e.sibling}function Gm(e){switch(e.tag){case 0:case 11:case 15:ci(e),e.flags&2048&&rn(9,e,e.return);break;case 3:ci(e);break;case 12:ci(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Yr(e)):ci(e);break;default:ci(e)}}function Yr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];lt=s,Km(s,e)}Ym(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:rn(8,t,t.return),Yr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Yr(t));break;default:Yr(t)}e=e.sibling}}function Km(e,t){for(;lt!==null;){var a=lt;switch(a.tag){case 0:case 11:case 15:rn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:kl(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,lt=s;else e:for(a=e;lt!==null;){s=lt;var u=s.sibling,c=s.return;if(zm(s),s===a){lt=null;break e}if(u!==null){u.return=c,lt=u;break e}lt=c}}}var $x={getCacheForType:function(e){var t=ct(Ie),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return ct(Ie).controller.signal}},Px=typeof WeakMap=="function"?WeakMap:Map,Ae=0,qe=null,je=null,Re=0,ze=0,qt=null,un=!1,el=!1,yo=!1,La=0,Ze=0,cn=0,es=0,go=0,Ht=0,tl=0,oi=null,Tt=null,po=!1,Gr=0,Vm=0,Kr=1/0,Vr=null,on=null,at=0,fn=null,al=null,Ua=0,xo=0,vo=null,Xm=null,fi=0,bo=null;function Qt(){return(Ae&2)!==0&&Re!==0?Re&-Re:O.T!==null?Eo():rd()}function km(){if(Ht===0)if((Re&536870912)===0||Te){var e=Ii;Ii<<=1,(Ii&3932160)===0&&(Ii=262144),Ht=e}else Ht=536870912;return e=Ut.current,e!==null&&(e.flags|=32),Ht}function Mt(e,t,a){(e===qe&&(ze===2||ze===9)||e.cancelPendingCommit!==null)&&(nl(e,0),dn(e,Re,Ht,!1)),Ol(e,a),((Ae&2)===0||e!==qe)&&(e===qe&&((Ae&2)===0&&(es|=a),Ze===4&&dn(e,Re,Ht,!1)),ha(e))}function Zm(e,t,a){if((Ae&6)!==0)throw Error(r(327));var s=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Al(e,t),u=s?Ix(e,t):jo(e,t,!0),c=s;do{if(u===0){el&&!s&&dn(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!Fx(a)){u=jo(e,t,!1),c=!1;continue}if(u===2){if(c=t,e.errorRecoveryDisabledLanes&c)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var b=e;u=oi;var R=b.current.memoizedState.isDehydrated;if(R&&(nl(b,y).flags|=256),y=jo(b,y,!1),y!==2){if(yo&&!R){b.errorRecoveryDisabledLanes|=c,es|=c,u=4;break e}c=Tt,Tt=u,c!==null&&(Tt===null?Tt=c:Tt.push.apply(Tt,c))}u=y}if(c=!1,u!==2)continue}}if(u===1){nl(e,0),dn(e,t,0,!0);break}e:{switch(s=e,c=u,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:dn(s,t,Ht,!un);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=Gr+300-Se(),10<u)){if(dn(s,t,Ht,!un),er(s,0,!0)!==0)break e;Ua=t,s.timeoutHandle=R0($m.bind(null,s,a,Tt,Vr,po,t,Ht,es,tl,un,c,"Throttled",-0,0),u);break e}$m(s,a,Tt,Vr,po,t,Ht,es,tl,un,c,null,-0,0)}}break}while(!0);ha(e)}function $m(e,t,a,s,u,c,y,b,R,D,H,k,U,B){if(e.timeoutHandle=-1,k=t.subtreeFlags,k&8192||(k&16785408)===16785408){k={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Sa},Qm(t,c,k);var ie=(c&62914560)===c?Gr-Se():(c&4194048)===c?Vm-Se():0;if(ie=Dv(k,ie),ie!==null){Ua=c,e.cancelPendingCommit=ie(a0.bind(null,e,t,c,a,s,u,y,b,R,H,k,null,U,B)),dn(e,c,y,!D);return}}a0(e,t,c,a,s,u,y,b,R)}function Fx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var u=a[s],c=u.getSnapshot;u=u.value;try{if(!Dt(c(),u))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 dn(e,t,a,s){t&=~go,t&=~es,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var u=t;0<u;){var c=31-zt(u),y=1<<c;s[c]=-1,u&=~y}a!==0&&sd(e,a,t)}function Xr(){return(Ae&6)===0?(di(0),!1):!0}function So(){if(je!==null){if(ze===0)var e=je.return;else e=je,_a=Xn=null,Uc(e),Zs=null,$l=0,e=je;for(;e!==null;)_m(e.alternate,e),e=e.return;je=null}}function nl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,gv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ua=0,So(),qe=e,je=a=Na(e.current,null),Re=t,ze=0,qt=null,un=!1,el=Al(e,t),yo=!1,tl=Ht=go=es=cn=Ze=0,Tt=oi=null,po=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var u=31-zt(s),c=1<<u;t|=e[u],s&=~c}return La=t,dr(),a}function Pm(e,t){ge=null,O.H=ai,t===ks||t===br?(t=fh(),ze=3):t===Rc?(t=fh(),ze=4):ze=t===Ic?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qt=t,je===null&&(Ze=1,Dr(e,kt(t,e.current)))}function Fm(){var e=Ut.current;return e===null?!0:(Re&4194048)===Re?Ft===null:(Re&62914560)===Re||(Re&536870912)!==0?e===Ft:!1}function Jm(){var e=O.H;return O.H=ai,e===null?ai:e}function Im(){var e=O.A;return O.A=$x,e}function kr(){Ze=4,un||(Re&4194048)!==Re&&Ut.current!==null||(el=!0),(cn&134217727)===0&&(es&134217727)===0||qe===null||dn(qe,Re,Ht,!1)}function jo(e,t,a){var s=Ae;Ae|=2;var u=Jm(),c=Im();(qe!==e||Re!==t)&&(Vr=null,nl(e,t)),t=!1;var y=Ze;e:do try{if(ze!==0&&je!==null){var b=je,R=qt;switch(ze){case 8:So(),y=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(t=!0);var D=ze;if(ze=0,qt=null,sl(e,b,R,D),a&&el){y=0;break e}break;default:D=ze,ze=0,qt=null,sl(e,b,R,D)}}Jx(),y=Ze;break}catch(H){Pm(e,H)}while(!0);return t&&e.shellSuspendCounter++,_a=Xn=null,Ae=s,O.H=u,O.A=c,je===null&&(qe=null,Re=0,dr()),y}function Jx(){for(;je!==null;)Wm(je)}function Ix(e,t){var a=Ae;Ae|=2;var s=Jm(),u=Im();qe!==e||Re!==t?(Vr=null,Kr=Se()+500,nl(e,t)):el=Al(e,t);e:do try{if(ze!==0&&je!==null){t=je;var c=qt;t:switch(ze){case 1:ze=0,qt=null,sl(e,t,c,1);break;case 2:case 9:if(ch(c)){ze=0,qt=null,e0(t);break}t=function(){ze!==2&&ze!==9||qe!==e||(ze=7),ha(e)},c.then(t,t);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:ch(c)?(ze=0,qt=null,e0(t)):(ze=0,qt=null,sl(e,t,c,7));break;case 5:var y=null;switch(je.tag){case 26:y=je.memoizedState;case 5:case 27:var b=je;if(y?H0(y):b.stateNode.complete){ze=0,qt=null;var R=b.sibling;if(R!==null)je=R;else{var D=b.return;D!==null?(je=D,Zr(D)):je=null}break t}}ze=0,qt=null,sl(e,t,c,5);break;case 6:ze=0,qt=null,sl(e,t,c,6);break;case 8:So(),Ze=6;break e;default:throw Error(r(462))}}Wx();break}catch(H){Pm(e,H)}while(!0);return _a=Xn=null,O.H=s,O.A=u,Ae=a,je!==null?0:(qe=null,Re=0,dr(),Ze)}function Wx(){for(;je!==null&&!Uu();)Wm(je)}function Wm(e){var t=Nm(e.alternate,e,La);e.memoizedProps=e.pendingProps,t===null?Zr(e):je=t}function e0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=pm(a,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=pm(a,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:Uc(t);default:_m(a,t),t=je=Id(t,La),t=Nm(a,t,La)}e.memoizedProps=e.pendingProps,t===null?Zr(e):je=t}function sl(e,t,a,s){_a=Xn=null,Uc(t),Zs=null,$l=0;var u=t.return;try{if(Yx(e,u,t,a,Re)){Ze=1,Dr(e,kt(a,e.current)),je=null;return}}catch(c){if(u!==null)throw je=u,c;Ze=1,Dr(e,kt(a,e.current)),je=null;return}t.flags&32768?(Te||s===1?e=!0:el||(Re&536870912)!==0?e=!1:(un=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ut.current,s!==null&&s.tag===13&&(s.flags|=16384))),t0(t,e)):Zr(t)}function Zr(e){var t=e;do{if((t.flags&32768)!==0){t0(t,un);return}e=t.return;var a=Vx(t.alternate,t,La);if(a!==null){je=a;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Ze===0&&(Ze=5)}function t0(e,t){do{var a=Xx(e.alternate,e);if(a!==null){a.flags&=32767,je=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=a}while(e!==null);Ze=6,je=null}function a0(e,t,a,s,u,c,y,b,R){e.cancelPendingCommit=null;do $r();while(at!==0);if((Ae&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=cc,Op(e,a,c,y,b,R),e===qe&&(je=qe=null,Re=0),al=t,fn=e,Ua=a,xo=c,vo=u,Xm=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,nv(Fi,function(){return r0(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=O.T,O.T=null,u=Y.p,Y.p=2,y=Ae,Ae|=4;try{kx(e,t,a)}finally{Ae=y,Y.p=u,O.T=s}}at=1,n0(),s0(),l0()}}function n0(){if(at===1){at=0;var e=fn,t=al,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null;var s=Y.p;Y.p=2;var u=Ae;Ae|=4;try{Bm(t,e);var c=Do,y=Kd(e.containerInfo),b=c.focusedElem,R=c.selectionRange;if(y!==b&&b&&b.ownerDocument&&Gd(b.ownerDocument.documentElement,b)){if(R!==null&&sc(b)){var D=R.start,H=R.end;if(H===void 0&&(H=D),"selectionStart"in b)b.selectionStart=D,b.selectionEnd=Math.min(H,b.value.length);else{var k=b.ownerDocument||document,U=k&&k.defaultView||window;if(U.getSelection){var B=U.getSelection(),ie=b.textContent.length,he=Math.min(R.start,ie),Be=R.end===void 0?he:Math.min(R.end,ie);!B.extend&&he>Be&&(y=Be,Be=he,he=y);var w=Yd(b,he),M=Yd(b,Be);if(w&&M&&(B.rangeCount!==1||B.anchorNode!==w.node||B.anchorOffset!==w.offset||B.focusNode!==M.node||B.focusOffset!==M.offset)){var z=k.createRange();z.setStart(w.node,w.offset),B.removeAllRanges(),he>Be?(B.addRange(z),B.extend(M.node,M.offset)):(z.setEnd(M.node,M.offset),B.addRange(z))}}}}for(k=[],B=b;B=B.parentNode;)B.nodeType===1&&k.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<k.length;b++){var K=k[b];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}iu=!!zo,Do=zo=null}finally{Ae=u,Y.p=s,O.T=a}}e.current=t,at=2}}function s0(){if(at===2){at=0;var e=fn,t=al,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=O.T,O.T=null;var s=Y.p;Y.p=2;var u=Ae;Ae|=4;try{Om(e,t.alternate,t)}finally{Ae=u,Y.p=s,O.T=a}}at=3}}function l0(){if(at===4||at===3){at=0,$i();var e=fn,t=al,a=Ua,s=Xm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,al=fn=null,i0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(on=null),Hu(a),t=t.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(wl,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=O.T,u=Y.p,Y.p=2,O.T=null;try{for(var c=e.onRecoverableError,y=0;y<s.length;y++){var b=s[y];c(b.value,{componentStack:b.stack})}}finally{O.T=t,Y.p=u}}(Ua&3)!==0&&$r(),ha(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===bo?fi++:(fi=0,bo=e):fi=0,di(0)}}function i0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,kl(t)))}function $r(){return n0(),s0(),l0(),r0()}function r0(){if(at!==5)return!1;var e=fn,t=xo;xo=0;var a=Hu(Ua),s=O.T,u=Y.p;try{Y.p=32>a?32:a,O.T=null,a=vo,vo=null;var c=fn,y=Ua;if(at=0,al=fn=null,Ua=0,(Ae&6)!==0)throw Error(r(331));var b=Ae;if(Ae|=4,Gm(c.current),Hm(c,c.current,y,a),Ae=b,di(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(wl,c)}catch{}return!0}finally{Y.p=u,O.T=s,i0(e,t)}}function u0(e,t,a){t=kt(a,t),t=Jc(e.stateNode,t,2),e=nn(e,t,2),e!==null&&(Ol(e,2),ha(e))}function De(e,t,a){if(e.tag===3)u0(e,e,a);else for(;t!==null;){if(t.tag===3){u0(t,e,a);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(on===null||!on.has(s))){e=kt(a,e),a=cm(2),s=nn(t,a,2),s!==null&&(om(a,s,t,e),Ol(s,2),ha(s));break}}t=t.return}}function No(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new Px;var u=new Set;s.set(t,u)}else u=s.get(t),u===void 0&&(u=new Set,s.set(t,u));u.has(a)||(yo=!0,u.add(a),e=ev.bind(null,e,t,a),t.then(e,e))}function ev(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qe===e&&(Re&a)===a&&(Ze===4||Ze===3&&(Re&62914560)===Re&&300>Se()-Gr?(Ae&2)===0&&nl(e,0):go|=a,tl===Re&&(tl=0)),ha(e)}function c0(e,t){t===0&&(t=nd()),e=Gn(e,t),e!==null&&(Ol(e,t),ha(e))}function tv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),c0(e,a)}function av(e,t){var a=0;switch(e.tag){case 31:case 13:var s=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),c0(e,a)}function nv(e,t){return Cl(e,t)}var Pr=null,ll=null,Ro=!1,Fr=!1,_o=!1,hn=0;function ha(e){e!==ll&&e.next===null&&(ll===null?Pr=ll=e:ll=ll.next=e),Fr=!0,Ro||(Ro=!0,lv())}function di(e,t){if(!_o&&Fr){_o=!0;do for(var a=!1,s=Pr;s!==null;){if(e!==0){var u=s.pendingLanes;if(u===0)var c=0;else{var y=s.suspendedLanes,b=s.pingedLanes;c=(1<<31-zt(42|e)+1)-1,c&=u&~(y&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,h0(s,c))}else c=Re,c=er(s,s===qe?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||Al(s,c)||(a=!0,h0(s,c));s=s.next}while(a);_o=!1}}function sv(){o0()}function o0(){Fr=Ro=!1;var e=0;hn!==0&&yv()&&(e=hn);for(var t=Se(),a=null,s=Pr;s!==null;){var u=s.next,c=f0(s,t);c===0?(s.next=null,a===null?Pr=u:a.next=u,u===null&&(ll=a)):(a=s,(e!==0||(c&3)!==0)&&(Fr=!0)),s=u}at!==0&&at!==5||di(e),hn!==0&&(hn=0)}function f0(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,u=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var y=31-zt(c),b=1<<y,R=u[y];R===-1?((b&a)===0||(b&s)!==0)&&(u[y]=Ap(b,t)):R<=t&&(e.expiredLanes|=b),c&=~b}if(t=qe,a=Re,a=er(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===t&&(ze===2||ze===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&_s(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Al(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(s!==null&&_s(s),Hu(a)){case 2:case 8:a=Pi;break;case 32:a=Fi;break;case 268435456:a=ad;break;default:a=Fi}return s=d0.bind(null,e),a=Cl(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&s!==null&&_s(s),e.callbackPriority=2,e.callbackNode=null,2}function d0(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if($r()&&e.callbackNode!==a)return null;var s=Re;return s=er(e,e===qe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Zm(e,s,t),f0(e,Se()),e.callbackNode!=null&&e.callbackNode===a?d0.bind(null,e):null)}function h0(e,t){if($r())return null;Zm(e,t,!0)}function lv(){pv(function(){(Ae&6)!==0?Cl(ca,sv):o0()})}function Eo(){if(hn===0){var e=Vs;e===0&&(e=Ji,Ji<<=1,(Ji&261888)===0&&(Ji=256)),hn=e}return hn}function m0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:sr(""+e)}function y0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function iv(e,t,a,s,u){if(t==="submit"&&a&&a.stateNode===u){var c=m0((u[jt]||null).action),y=s.submitter;y&&(t=(t=y[jt]||null)?m0(t.formAction):y.getAttribute("formAction"),t!==null&&(c=t,y=null));var b=new ur("action","action",null,s,u);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(hn!==0){var R=y?y0(u,y):new FormData(u);Xc(a,{pending:!0,data:R,method:u.method,action:c},null,R)}}else typeof c=="function"&&(b.preventDefault(),R=y?y0(u,y):new FormData(u),Xc(a,{pending:!0,data:R,method:u.method,action:c},c,R))},currentTarget:u}]})}}for(var To=0;To<uc.length;To++){var Mo=uc[To],rv=Mo.toLowerCase(),uv=Mo[0].toUpperCase()+Mo.slice(1);na(rv,"on"+uv)}na(kd,"onAnimationEnd"),na(Zd,"onAnimationIteration"),na($d,"onAnimationStart"),na("dblclick","onDoubleClick"),na("focusin","onFocus"),na("focusout","onBlur"),na(Rx,"onTransitionRun"),na(_x,"onTransitionStart"),na(Ex,"onTransitionCancel"),na(Pd,"onTransitionEnd"),ws("onMouseEnter",["mouseout","mouseover"]),ws("onMouseLeave",["mouseout","mouseover"]),ws("onPointerEnter",["pointerout","pointerover"]),ws("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hi="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(" "),cv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hi));function g0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],u=s.event;s=s.listeners;e:{var c=void 0;if(t)for(var y=s.length-1;0<=y;y--){var b=s[y],R=b.instance,D=b.currentTarget;if(b=b.listener,R!==c&&u.isPropagationStopped())break e;c=b,u.currentTarget=D;try{c(u)}catch(H){fr(H)}u.currentTarget=null,c=R}else for(y=0;y<s.length;y++){if(b=s[y],R=b.instance,D=b.currentTarget,b=b.listener,R!==c&&u.isPropagationStopped())break e;c=b,u.currentTarget=D;try{c(u)}catch(H){fr(H)}u.currentTarget=null,c=R}}}}function Ne(e,t){var a=t[Qu];a===void 0&&(a=t[Qu]=new Set);var s=e+"__bubble";a.has(s)||(p0(t,e,2,!1),a.add(s))}function Co(e,t,a){var s=0;t&&(s|=4),p0(a,e,s,t)}var Jr="_reactListening"+Math.random().toString(36).slice(2);function wo(e){if(!e[Jr]){e[Jr]=!0,od.forEach(function(a){a!=="selectionchange"&&(cv.has(a)||Co(a,!1,e),Co(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jr]||(t[Jr]=!0,Co("selectionchange",!1,t))}}function p0(e,t,a,s){switch(k0(t)){case 2:var u=Bv;break;case 8:u=qv;break;default:u=Xo}a=u.bind(null,t,a,e),u=void 0,!Pu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),s?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function Ao(e,t,a,s,u){var c=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var b=s.stateNode.containerInfo;if(b===u)break;if(y===4)for(y=s.return;y!==null;){var R=y.tag;if((R===3||R===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;b!==null;){if(y=Ts(b),y===null)return;if(R=y.tag,R===5||R===6||R===26||R===27){s=c=y;continue e}b=b.parentNode}}s=s.return}jd(function(){var D=c,H=Zu(a),k=[];e:{var U=Fd.get(e);if(U!==void 0){var B=ur,ie=e;switch(e){case"keypress":if(ir(a)===0)break e;case"keydown":case"keyup":B=ax;break;case"focusin":ie="focus",B=Wu;break;case"focusout":ie="blur",B=Wu;break;case"beforeblur":case"afterblur":B=Wu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=_d;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=Vp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=lx;break;case kd:case Zd:case $d:B=Zp;break;case Pd:B=rx;break;case"scroll":case"scrollend":B=Gp;break;case"wheel":B=cx;break;case"copy":case"cut":case"paste":B=Pp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Td;break;case"toggle":case"beforetoggle":B=fx}var he=(t&4)!==0,Be=!he&&(e==="scroll"||e==="scrollend"),w=he?U!==null?U+"Capture":null:U;he=[];for(var M=D,z;M!==null;){var K=M;if(z=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||z===null||w===null||(K=Ll(M,w),K!=null&&he.push(mi(M,K,z))),Be)break;M=M.return}0<he.length&&(U=new B(U,ie,null,a,H),k.push({event:U,listeners:he}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",U&&a!==ku&&(ie=a.relatedTarget||a.fromElement)&&(Ts(ie)||ie[Es]))break e;if((B||U)&&(U=H.window===H?H:(U=H.ownerDocument)?U.defaultView||U.parentWindow:window,B?(ie=a.relatedTarget||a.toElement,B=D,ie=ie?Ts(ie):null,ie!==null&&(Be=d(ie),he=ie.tag,ie!==Be||he!==5&&he!==27&&he!==6)&&(ie=null)):(B=null,ie=D),B!==ie)){if(he=_d,K="onMouseLeave",w="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(he=Td,K="onPointerLeave",w="onPointerEnter",M="pointer"),Be=B==null?U:Dl(B),z=ie==null?U:Dl(ie),U=new he(K,M+"leave",B,a,H),U.target=Be,U.relatedTarget=z,K=null,Ts(H)===D&&(he=new he(w,M+"enter",ie,a,H),he.target=z,he.relatedTarget=Be,K=he),Be=K,B&&ie)t:{for(he=ov,w=B,M=ie,z=0,K=w;K;K=he(K))z++;K=0;for(var fe=M;fe;fe=he(fe))K++;for(;0<z-K;)w=he(w),z--;for(;0<K-z;)M=he(M),K--;for(;z--;){if(w===M||M!==null&&w===M.alternate){he=w;break t}w=he(w),M=he(M)}he=null}else he=null;B!==null&&x0(k,U,B,he,!1),ie!==null&&Be!==null&&x0(k,Be,ie,he,!0)}}e:{if(U=D?Dl(D):window,B=U.nodeName&&U.nodeName.toLowerCase(),B==="select"||B==="input"&&U.type==="file")var Ce=Ld;else if(zd(U))if(Ud)Ce=Sx;else{Ce=vx;var re=xx}else B=U.nodeName,!B||B.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?D&&Xu(D.elementType)&&(Ce=Ld):Ce=bx;if(Ce&&(Ce=Ce(e,D))){Dd(k,Ce,a,H);break e}re&&re(e,U,D),e==="focusout"&&D&&U.type==="number"&&D.memoizedProps.value!=null&&Vu(U,"number",U.value)}switch(re=D?Dl(D):window,e){case"focusin":(zd(re)||re.contentEditable==="true")&&(Us=re,lc=D,Kl=null);break;case"focusout":Kl=lc=Us=null;break;case"mousedown":ic=!0;break;case"contextmenu":case"mouseup":case"dragend":ic=!1,Vd(k,a,H);break;case"selectionchange":if(Nx)break;case"keydown":case"keyup":Vd(k,a,H)}var pe;if(tc)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else Ls?Ad(e,a)&&(_e="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(_e="onCompositionStart");_e&&(Md&&a.locale!=="ko"&&(Ls||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Ls&&(pe=Nd()):(Fa=H,Fu="value"in Fa?Fa.value:Fa.textContent,Ls=!0)),re=Ir(D,_e),0<re.length&&(_e=new Ed(_e,e,null,a,H),k.push({event:_e,listeners:re}),pe?_e.data=pe:(pe=Od(a),pe!==null&&(_e.data=pe)))),(pe=hx?mx(e,a):yx(e,a))&&(_e=Ir(D,"onBeforeInput"),0<_e.length&&(re=new Ed("onBeforeInput","beforeinput",null,a,H),k.push({event:re,listeners:_e}),re.data=pe)),iv(k,e,D,a,H)}g0(k,t)})}function mi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ir(e,t){for(var a=t+"Capture",s=[];e!==null;){var u=e,c=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||c===null||(u=Ll(e,a),u!=null&&s.unshift(mi(e,u,c)),u=Ll(e,t),u!=null&&s.push(mi(e,u,c))),e.tag===3)return s;e=e.return}return[]}function ov(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function x0(e,t,a,s,u){for(var c=t._reactName,y=[];a!==null&&a!==s;){var b=a,R=b.alternate,D=b.stateNode;if(b=b.tag,R!==null&&R===s)break;b!==5&&b!==26&&b!==27||D===null||(R=D,u?(D=Ll(a,c),D!=null&&y.unshift(mi(a,D,R))):u||(D=Ll(a,c),D!=null&&y.push(mi(a,D,R)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var fv=/\r\n?/g,dv=/\u0000|\uFFFD/g;function v0(e){return(typeof e=="string"?e:""+e).replace(fv,`
|
|
49
|
-
`).replace(dv,"")}function b0(e,t){return t=v0(t),v0(e)===t}function Ue(e,t,a,s,u,c){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Os(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Os(e,""+s);break;case"className":ar(e,"class",s);break;case"tabIndex":ar(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":ar(e,a,s);break;case"style":bd(e,s,c);break;case"data":if(t!=="object"){ar(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=sr(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"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 c=="function"&&(a==="formAction"?(t!=="input"&&Ue(e,t,"name",u.name,u,null),Ue(e,t,"formEncType",u.formEncType,u,null),Ue(e,t,"formMethod",u.formMethod,u,null),Ue(e,t,"formTarget",u.formTarget,u,null)):(Ue(e,t,"encType",u.encType,u,null),Ue(e,t,"method",u.method,u,null),Ue(e,t,"target",u.target,u,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=sr(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=Sa);break;case"onScroll":s!=null&&Ne("scroll",e);break;case"onScrollEnd":s!=null&&Ne("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=sr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":Ne("beforetoggle",e),Ne("toggle",e),tr(e,"popover",s);break;case"xlinkActuate":ba(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ba(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ba(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ba(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ba(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ba(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ba(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ba(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ba(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":tr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Qp.get(a)||a,tr(e,a,s))}}function Oo(e,t,a,s,u,c){switch(a){case"style":bd(e,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof s=="string"?Os(e,s):(typeof s=="number"||typeof s=="bigint")&&Os(e,""+s);break;case"onScroll":s!=null&&Ne("scroll",e);break;case"onScrollEnd":s!=null&&Ne("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Sa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!fd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),c=e[jt]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,u),typeof s=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,u);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):tr(e,a,s)}}}function ft(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("load",e);var s=!1,u=!1,c;for(c in a)if(a.hasOwnProperty(c)){var y=a[c];if(y!=null)switch(c){case"src":s=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,c,y,a,null)}}u&&Ue(e,t,"srcSet",a.srcSet,a,null),s&&Ue(e,t,"src",a.src,a,null);return;case"input":Ne("invalid",e);var b=c=y=u=null,R=null,D=null;for(s in a)if(a.hasOwnProperty(s)){var H=a[s];if(H!=null)switch(s){case"name":u=H;break;case"type":y=H;break;case"checked":R=H;break;case"defaultChecked":D=H;break;case"value":c=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:Ue(e,t,s,H,a,null)}}gd(e,c,b,R,D,y,u,!1);return;case"select":Ne("invalid",e),s=y=c=null;for(u in a)if(a.hasOwnProperty(u)&&(b=a[u],b!=null))switch(u){case"value":c=b;break;case"defaultValue":y=b;break;case"multiple":s=b;default:Ue(e,t,u,b,a,null)}t=c,a=y,e.multiple=!!s,t!=null?As(e,!!s,t,!1):a!=null&&As(e,!!s,a,!0);return;case"textarea":Ne("invalid",e),c=u=s=null;for(y in a)if(a.hasOwnProperty(y)&&(b=a[y],b!=null))switch(y){case"value":s=b;break;case"defaultValue":u=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:Ue(e,t,y,b,a,null)}xd(e,s,u,c);return;case"option":for(R in a)if(a.hasOwnProperty(R)&&(s=a[R],s!=null))switch(R){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ue(e,t,R,s,a,null)}return;case"dialog":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(s=0;s<hi.length;s++)Ne(hi[s],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("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(D in a)if(a.hasOwnProperty(D)&&(s=a[D],s!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,D,s,a,null)}return;default:if(Xu(t)){for(H in a)a.hasOwnProperty(H)&&(s=a[H],s!==void 0&&Oo(e,t,H,s,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(s=a[b],s!=null&&Ue(e,t,b,s,a,null))}function hv(e,t,a,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,c=null,y=null,b=null,R=null,D=null,H=null;for(B in a){var k=a[B];if(a.hasOwnProperty(B)&&k!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":R=k;default:s.hasOwnProperty(B)||Ue(e,t,B,null,s,k)}}for(var U in s){var B=s[U];if(k=a[U],s.hasOwnProperty(U)&&(B!=null||k!=null))switch(U){case"type":c=B;break;case"name":u=B;break;case"checked":D=B;break;case"defaultChecked":H=B;break;case"value":y=B;break;case"defaultValue":b=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,t));break;default:B!==k&&Ue(e,t,U,B,s,k)}}Ku(e,y,b,R,D,H,c,u);return;case"select":B=y=b=U=null;for(c in a)if(R=a[c],a.hasOwnProperty(c)&&R!=null)switch(c){case"value":break;case"multiple":B=R;default:s.hasOwnProperty(c)||Ue(e,t,c,null,s,R)}for(u in s)if(c=s[u],R=a[u],s.hasOwnProperty(u)&&(c!=null||R!=null))switch(u){case"value":U=c;break;case"defaultValue":b=c;break;case"multiple":y=c;default:c!==R&&Ue(e,t,u,c,s,R)}t=b,a=y,s=B,U!=null?As(e,!!a,U,!1):!!s!=!!a&&(t!=null?As(e,!!a,t,!0):As(e,!!a,a?[]:"",!1));return;case"textarea":B=U=null;for(b in a)if(u=a[b],a.hasOwnProperty(b)&&u!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Ue(e,t,b,null,s,u)}for(y in s)if(u=s[y],c=a[y],s.hasOwnProperty(y)&&(u!=null||c!=null))switch(y){case"value":U=u;break;case"defaultValue":B=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==c&&Ue(e,t,y,u,s,c)}pd(e,U,B);return;case"option":for(var ie in a)if(U=a[ie],a.hasOwnProperty(ie)&&U!=null&&!s.hasOwnProperty(ie))switch(ie){case"selected":e.selected=!1;break;default:Ue(e,t,ie,null,s,U)}for(R in s)if(U=s[R],B=a[R],s.hasOwnProperty(R)&&U!==B&&(U!=null||B!=null))switch(R){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ue(e,t,R,U,s,B)}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 he in a)U=a[he],a.hasOwnProperty(he)&&U!=null&&!s.hasOwnProperty(he)&&Ue(e,t,he,null,s,U);for(D in s)if(U=s[D],B=a[D],s.hasOwnProperty(D)&&U!==B&&(U!=null||B!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ue(e,t,D,U,s,B)}return;default:if(Xu(t)){for(var Be in a)U=a[Be],a.hasOwnProperty(Be)&&U!==void 0&&!s.hasOwnProperty(Be)&&Oo(e,t,Be,void 0,s,U);for(H in s)U=s[H],B=a[H],!s.hasOwnProperty(H)||U===B||U===void 0&&B===void 0||Oo(e,t,H,U,s,B);return}}for(var w in a)U=a[w],a.hasOwnProperty(w)&&U!=null&&!s.hasOwnProperty(w)&&Ue(e,t,w,null,s,U);for(k in s)U=s[k],B=a[k],!s.hasOwnProperty(k)||U===B||U==null&&B==null||Ue(e,t,k,U,s,B)}function S0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var u=a[s],c=u.transferSize,y=u.initiatorType,b=u.duration;if(c&&b&&S0(y)){for(y=0,b=u.responseEnd,s+=1;s<a.length;s++){var R=a[s],D=R.startTime;if(D>b)break;var H=R.transferSize,k=R.initiatorType;H&&S0(k)&&(R=R.responseEnd,y+=H*(R<b?1:(b-D)/(R-D)))}if(--s,t+=8*(c+y)/(u.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 zo=null,Do=null;function Wr(e){return e.nodeType===9?e:e.ownerDocument}function j0(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 N0(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 Lo(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 Uo=null;function yv(){var e=window.event;return e&&e.type==="popstate"?e===Uo?!1:(Uo=e,!0):(Uo=null,!1)}var R0=typeof setTimeout=="function"?setTimeout:void 0,gv=typeof clearTimeout=="function"?clearTimeout:void 0,_0=typeof Promise=="function"?Promise:void 0,pv=typeof queueMicrotask=="function"?queueMicrotask:typeof _0<"u"?function(e){return _0.resolve(null).then(e).catch(xv)}:R0;function xv(e){setTimeout(function(){throw e})}function mn(e){return e==="head"}function E0(e,t){var a=t,s=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(s===0){e.removeChild(u),cl(t);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")yi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,yi(a);for(var c=a.firstChild;c;){var y=c.nextSibling,b=c.nodeName;c[zl]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=y}}else a==="body"&&yi(e.ownerDocument.body);a=u}while(a);cl(t)}function T0(e,t){var a=e;e=0;do{var s=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=s}while(a)}function Bo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Bo(a),Yu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function vv(e,t,a,s){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[zl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Jt(e.nextSibling),e===null)break}return null}function bv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Jt(e.nextSibling),e===null))return null;return e}function M0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Jt(e.nextSibling),e===null))return null;return e}function qo(e){return e.data==="$?"||e.data==="$~"}function Ho(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Sv(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var s=function(){t(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Jt(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 Qo=null;function C0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Jt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function w0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function A0(e,t,a){switch(t=Wr(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function yi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Yu(e)}var It=new Map,O0=new Set;function eu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ba=Y.d;Y.d={f:jv,r:Nv,D:Rv,C:_v,L:Ev,m:Tv,X:Cv,S:Mv,M:wv};function jv(){var e=Ba.f(),t=Xr();return e||t}function Nv(e){var t=Ms(e);t!==null&&t.tag===5&&t.type==="form"?Ph(t):Ba.r(e)}var il=typeof document>"u"?null:document;function z0(e,t,a){var s=il;if(s&&typeof t=="string"&&t){var u=Vt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),O0.has(u)||(O0.add(u),e={rel:e,crossOrigin:a,href:t},s.querySelector(u)===null&&(t=s.createElement("link"),ft(t,"link",e),st(t),s.head.appendChild(t)))}}function Rv(e){Ba.D(e),z0("dns-prefetch",e,null)}function _v(e,t){Ba.C(e,t),z0("preconnect",e,t)}function Ev(e,t,a){Ba.L(e,t,a);var s=il;if(s&&e&&t){var u='link[rel="preload"][as="'+Vt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Vt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Vt(a.imageSizes)+'"]')):u+='[href="'+Vt(e)+'"]';var c=u;switch(t){case"style":c=rl(e);break;case"script":c=ul(e)}It.has(c)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),It.set(c,e),s.querySelector(u)!==null||t==="style"&&s.querySelector(gi(c))||t==="script"&&s.querySelector(pi(c))||(t=s.createElement("link"),ft(t,"link",e),st(t),s.head.appendChild(t)))}}function Tv(e,t){Ba.m(e,t);var a=il;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Vt(s)+'"][href="'+Vt(e)+'"]',c=u;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=ul(e)}if(!It.has(c)&&(e=x({rel:"modulepreload",href:e},t),It.set(c,e),a.querySelector(u)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(pi(c)))return}s=a.createElement("link"),ft(s,"link",e),st(s),a.head.appendChild(s)}}}function Mv(e,t,a){Ba.S(e,t,a);var s=il;if(s&&e){var u=Cs(s).hoistableStyles,c=rl(e);t=t||"default";var y=u.get(c);if(!y){var b={loading:0,preload:null};if(y=s.querySelector(gi(c)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=It.get(c))&&Yo(e,a);var R=y=s.createElement("link");st(R),ft(R,"link",e),R._p=new Promise(function(D,H){R.onload=D,R.onerror=H}),R.addEventListener("load",function(){b.loading|=1}),R.addEventListener("error",function(){b.loading|=2}),b.loading|=4,tu(y,t,s)}y={type:"stylesheet",instance:y,count:1,state:b},u.set(c,y)}}}function Cv(e,t){Ba.X(e,t);var a=il;if(a&&e){var s=Cs(a).hoistableScripts,u=ul(e),c=s.get(u);c||(c=a.querySelector(pi(u)),c||(e=x({src:e,async:!0},t),(t=It.get(u))&&Go(e,t),c=a.createElement("script"),st(c),ft(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(u,c))}}function wv(e,t){Ba.M(e,t);var a=il;if(a&&e){var s=Cs(a).hoistableScripts,u=ul(e),c=s.get(u);c||(c=a.querySelector(pi(u)),c||(e=x({src:e,async:!0,type:"module"},t),(t=It.get(u))&&Go(e,t),c=a.createElement("script"),st(c),ft(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(u,c))}}function D0(e,t,a,s){var u=(u=ve.current)?eu(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=rl(a.href),a=Cs(u).hoistableStyles,s=a.get(t),s||(s={type:"style",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=rl(a.href);var c=Cs(u).hoistableStyles,y=c.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,y),(c=u.querySelector(gi(e)))&&!c._p&&(y.instance=c,y.state.loading=5),It.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},It.set(e,a),c||Av(u,e,a,y.state))),t&&s===null)throw Error(r(528,""));return y}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ul(a),a=Cs(u).hoistableScripts,s=a.get(t),s||(s={type:"script",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function rl(e){return'href="'+Vt(e)+'"'}function gi(e){return'link[rel="stylesheet"]['+e+"]"}function L0(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Av(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),ft(t,"link",a),st(t),e.head.appendChild(t))}function ul(e){return'[src="'+Vt(e)+'"]'}function pi(e){return"script[async]"+e}function U0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Vt(a.href)+'"]');if(s)return t.instance=s,st(s),s;var u=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),st(s),ft(s,"style",u),tu(s,a.precedence,e),t.instance=s;case"stylesheet":u=rl(a.href);var c=e.querySelector(gi(u));if(c)return t.state.loading|=4,t.instance=c,st(c),c;s=L0(a),(u=It.get(u))&&Yo(s,u),c=(e.ownerDocument||e).createElement("link"),st(c);var y=c;return y._p=new Promise(function(b,R){y.onload=b,y.onerror=R}),ft(c,"link",s),t.state.loading|=4,tu(c,a.precedence,e),t.instance=c;case"script":return c=ul(a.src),(u=e.querySelector(pi(c)))?(t.instance=u,st(u),u):(s=a,(u=It.get(c))&&(s=x({},a),Go(s,u)),e=e.ownerDocument||e,u=e.createElement("script"),st(u),ft(u,"link",s),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,tu(s,a.precedence,e));return t.instance}function tu(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=s.length?s[s.length-1]:null,c=u,y=0;y<s.length;y++){var b=s[y];if(b.dataset.precedence===t)c=b;else if(c!==u)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Yo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Go(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var au=null;function B0(e,t,a){if(au===null){var s=new Map,u=au=new Map;u.set(a,s)}else u=au,s=u.get(a),s||(s=new Map,u.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var c=a[u];if(!(c[zl]||c[rt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var y=c.getAttribute(t)||"";y=e+y;var b=s.get(y);b?b.push(c):s.set(y,[c])}}return s}function q0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Ov(e,t,a){if(a===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 H0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function zv(e,t,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=rl(s.href),c=t.querySelector(gi(u));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=nu.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,st(c);return}c=t.ownerDocument||t,s=L0(s),(u=It.get(u))&&Yo(s,u),c=c.createElement("link"),st(c);var y=c;y._p=new Promise(function(b,R){y.onload=b,y.onerror=R}),ft(c,"link",s),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=nu.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Ko=0;function Dv(e,t){return e.stylesheets&&e.count===0&&lu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var s=setTimeout(function(){if(e.stylesheets&&lu(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Ko===0&&(Ko=62500*mv());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lu(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Ko?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(u)}}:null}function nu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var su=null;function lu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,su=new Map,t.forEach(Lv,e),su=null,nu.call(e))}function Lv(e,t){if(!(t.state.loading&4)){var a=su.get(e);if(a)var s=a.get(null);else{a=new Map,su.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<u.length;c++){var y=u[c];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),s=y)}s&&a.set(null,s)}u=t.instance,y=u.getAttribute("data-precedence"),c=a.get(y)||s,c===s&&a.set(null,u),a.set(y,u),this.count++,s=nu.bind(this),u.addEventListener("load",s),u.addEventListener("error",s),c?c.parentNode.insertBefore(u,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var xi={$$typeof:Z,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Uv(e,t,a,s,u,c,y,b,R){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=Bu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.hiddenUpdates=Bu(null),this.identifierPrefix=s,this.onUncaughtError=u,this.onCaughtError=c,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Q0(e,t,a,s,u,c,y,b,R,D,H,k){return e=new Uv(e,t,a,y,R,D,H,k,b),t=1,c===!0&&(t|=24),c=Lt(3,null,null,t),e.current=c,c.stateNode=e,t=Sc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:s,isDehydrated:a,cache:t},_c(c),e}function Y0(e){return e?(e=Hs,e):Hs}function G0(e,t,a,s,u,c){u=Y0(u),s.context===null?s.context=u:s.pendingContext=u,s=an(t),s.payload={element:a},c=c===void 0?null:c,c!==null&&(s.callback=c),a=nn(e,s,t),a!==null&&(Mt(a,e,t),Fl(a,e,t))}function K0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Vo(e,t){K0(e,t),(e=e.alternate)&&K0(e,t)}function V0(e){if(e.tag===13||e.tag===31){var t=Gn(e,67108864);t!==null&&Mt(t,e,67108864),Vo(e,67108864)}}function X0(e){if(e.tag===13||e.tag===31){var t=Qt();t=qu(t);var a=Gn(e,t);a!==null&&Mt(a,e,t),Vo(e,t)}}var iu=!0;function Bv(e,t,a,s){var u=O.T;O.T=null;var c=Y.p;try{Y.p=2,Xo(e,t,a,s)}finally{Y.p=c,O.T=u}}function qv(e,t,a,s){var u=O.T;O.T=null;var c=Y.p;try{Y.p=8,Xo(e,t,a,s)}finally{Y.p=c,O.T=u}}function Xo(e,t,a,s){if(iu){var u=ko(s);if(u===null)Ao(e,t,s,ru,a),Z0(e,s);else if(Qv(u,e,t,a,s))s.stopPropagation();else if(Z0(e,s),t&4&&-1<Hv.indexOf(e)){for(;u!==null;){var c=Ms(u);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var y=Bn(c.pendingLanes);if(y!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;y;){var R=1<<31-zt(y);b.entanglements[1]|=R,y&=~R}ha(c),(Ae&6)===0&&(Kr=Se()+500,di(0))}}break;case 31:case 13:b=Gn(c,2),b!==null&&Mt(b,c,2),Xr(),Vo(c,2)}if(c=ko(s),c===null&&Ao(e,t,s,ru,a),c===u)break;u=c}u!==null&&s.stopPropagation()}else Ao(e,t,s,null,a)}}function ko(e){return e=Zu(e),Zo(e)}var ru=null;function Zo(e){if(ru=null,e=Ts(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=g(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ru=e,null}function k0(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(mt()){case ca:return 2;case Pi:return 8;case Fi:case _p:return 32;case ad:return 268435456;default:return 32}default:return 32}}var $o=!1,yn=null,gn=null,pn=null,vi=new Map,bi=new Map,xn=[],Hv="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 Z0(e,t){switch(e){case"focusin":case"focusout":yn=null;break;case"dragenter":case"dragleave":gn=null;break;case"mouseover":case"mouseout":pn=null;break;case"pointerover":case"pointerout":vi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bi.delete(t.pointerId)}}function Si(e,t,a,s,u,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:c,targetContainers:[u]},t!==null&&(t=Ms(t),t!==null&&V0(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Qv(e,t,a,s,u){switch(t){case"focusin":return yn=Si(yn,e,t,a,s,u),!0;case"dragenter":return gn=Si(gn,e,t,a,s,u),!0;case"mouseover":return pn=Si(pn,e,t,a,s,u),!0;case"pointerover":var c=u.pointerId;return vi.set(c,Si(vi.get(c)||null,e,t,a,s,u)),!0;case"gotpointercapture":return c=u.pointerId,bi.set(c,Si(bi.get(c)||null,e,t,a,s,u)),!0}return!1}function $0(e){var t=Ts(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,ud(e.priority,function(){X0(a)});return}}else if(t===31){if(t=g(a),t!==null){e.blockedOn=t,ud(e.priority,function(){X0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ko(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);ku=s,a.target.dispatchEvent(s),ku=null}else return t=Ms(a),t!==null&&V0(t),e.blockedOn=a,!1;t.shift()}return!0}function P0(e,t,a){uu(e)&&a.delete(t)}function Yv(){$o=!1,yn!==null&&uu(yn)&&(yn=null),gn!==null&&uu(gn)&&(gn=null),pn!==null&&uu(pn)&&(pn=null),vi.forEach(P0),bi.forEach(P0)}function cu(e,t){e.blockedOn===t&&(e.blockedOn=null,$o||($o=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Yv)))}var ou=null;function F0(e){ou!==e&&(ou=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ou===e&&(ou=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],u=e[t+2];if(typeof s!="function"){if(Zo(s||a)===null)continue;break}var c=Ms(a);c!==null&&(e.splice(t,3),t-=3,Xc(c,{pending:!0,data:u,method:a.method,action:s},s,u))}}))}function cl(e){function t(R){return cu(R,e)}yn!==null&&cu(yn,e),gn!==null&&cu(gn,e),pn!==null&&cu(pn,e),vi.forEach(t),bi.forEach(t);for(var a=0;a<xn.length;a++){var s=xn[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<xn.length&&(a=xn[0],a.blockedOn===null);)$0(a),a.blockedOn===null&&xn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var u=a[s],c=a[s+1],y=u[jt]||null;if(typeof c=="function")y||F0(a);else if(y){var b=null;if(c&&c.hasAttribute("formAction")){if(u=c,y=c[jt]||null)b=y.formAction;else if(Zo(u)!==null)continue}else b=y.action;typeof b=="function"?a[s+1]=b:(a.splice(s,3),s-=3),F0(a)}}}function J0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function Po(e){this._internalRoot=e}fu.prototype.render=Po.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,s=Qt();G0(a,s,e,t,null,null)},fu.prototype.unmount=Po.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;G0(e.current,2,null,e,null,null),Xr(),t[Es]=null}};function fu(e){this._internalRoot=e}fu.prototype.unstable_scheduleHydration=function(e){if(e){var t=rd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<xn.length&&t!==0&&t<xn[a].priority;a++);xn.splice(a,0,e),a===0&&$0(e)}};var I0=l.version;if(I0!=="19.2.4")throw Error(r(527,I0,"19.2.4"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var Gv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!du.isDisabled&&du.supportsFiber)try{wl=du.inject(Gv),Ot=du}catch{}}return Ni.createRoot=function(e,t){if(!o(e))throw Error(r(299));var a=!1,s="",u=lm,c=im,y=rm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Q0(e,1,!1,null,null,a,s,null,u,c,y,J0),e[Es]=t.current,wo(e),new Po(t)},Ni.hydrateRoot=function(e,t,a){if(!o(e))throw Error(r(299));var s=!1,u="",c=lm,y=im,b=rm,R=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),t=Q0(e,1,!0,t,a??null,s,u,R,c,y,b,J0),t.context=Y0(null),a=t.current,s=Qt(),s=qu(s),u=an(s),u.callback=null,nn(a,u,s),a=s,t.current.lanes=a,Ol(t,a),ha(t),e[Es]=t.current,wo(e),new fu(t)},Ni.version="19.2.4",Ni}var cy;function Iv(){if(cy)return Wo.exports;cy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Wo.exports=Jv(),Wo.exports}var Wv=Iv(),Tl=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(){}},ls,jn,hl,ag,eb=(ag=class extends Tl{constructor(){super();ce(this,ls);ce(this,jn);ce(this,hl);ae(this,hl,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){_(this,jn)||this.setEventListener(_(this,hl))}onUnsubscribe(){var l;this.hasListeners()||((l=_(this,jn))==null||l.call(this),ae(this,jn,void 0))}setEventListener(l){var i;ae(this,hl,l),(i=_(this,jn))==null||i.call(this),ae(this,jn,l(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(l){_(this,ls)!==l&&(ae(this,ls,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(i=>{i(l)})}isFocused(){var l;return typeof _(this,ls)=="boolean"?_(this,ls):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},ls=new WeakMap,jn=new WeakMap,hl=new WeakMap,ag),Hf=new eb,tb={setTimeout:(n,l)=>setTimeout(n,l),clearTimeout:n=>clearTimeout(n),setInterval:(n,l)=>setInterval(n,l),clearInterval:n=>clearInterval(n)},Nn,qf,ng,ab=(ng=class{constructor(){ce(this,Nn,tb);ce(this,qf,!1)}setTimeoutProvider(n){ae(this,Nn,n)}setTimeout(n,l){return _(this,Nn).setTimeout(n,l)}clearTimeout(n){_(this,Nn).clearTimeout(n)}setInterval(n,l){return _(this,Nn).setInterval(n,l)}clearInterval(n){_(this,Nn).clearInterval(n)}},Nn=new WeakMap,qf=new WeakMap,ng),as=new ab;function nb(n){setTimeout(n,0)}var sb=typeof window>"u"||"Deno"in globalThis;function bt(){}function lb(n,l){return typeof n=="function"?n(l):n}function vf(n){return typeof n=="number"&&n>=0&&n!==1/0}function mg(n,l){return Math.max(n+(l||0)-Date.now(),0)}function zn(n,l){return typeof n=="function"?n(l):n}function ea(n,l){return typeof n=="function"?n(l):n}function oy(n,l){const{type:i="all",exact:r,fetchStatus:o,predicate:d,queryKey:h,stale:g}=n;if(h){if(r){if(l.queryHash!==Qf(h,l.options))return!1}else if(!zi(l.queryKey,h))return!1}if(i!=="all"){const p=l.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof g=="boolean"&&l.isStale()!==g||o&&o!==l.state.fetchStatus||d&&!d(l))}function fy(n,l){const{exact:i,status:r,predicate:o,mutationKey:d}=n;if(d){if(!l.options.mutationKey)return!1;if(i){if(ps(l.options.mutationKey)!==ps(d))return!1}else if(!zi(l.options.mutationKey,d))return!1}return!(r&&l.state.status!==r||o&&!o(l))}function Qf(n,l){return((l==null?void 0:l.queryKeyHashFn)||ps)(n)}function ps(n){return JSON.stringify(n,(l,i)=>bf(i)?Object.keys(i).sort().reduce((r,o)=>(r[o]=i[o],r),{}):i)}function zi(n,l){return n===l?!0:typeof n!=typeof l?!1:n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(l).every(i=>zi(n[i],l[i])):!1}var ib=Object.prototype.hasOwnProperty;function yg(n,l,i=0){if(n===l)return n;if(i>500)return l;const r=dy(n)&&dy(l);if(!r&&!(bf(n)&&bf(l)))return l;const d=(r?n:Object.keys(n)).length,h=r?l:Object.keys(l),g=h.length,p=r?new Array(g):{};let m=0;for(let v=0;v<g;v++){const x=r?v:h[v],S=n[x],j=l[x];if(S===j){p[x]=S,(r?v<d:ib.call(n,x))&&m++;continue}if(S===null||j===null||typeof S!="object"||typeof j!="object"){p[x]=j;continue}const N=yg(S,j,i+1);p[x]=N,N===S&&m++}return d===g&&m===d?n:p}function Nu(n,l){if(!l||Object.keys(n).length!==Object.keys(l).length)return!1;for(const i in n)if(n[i]!==l[i])return!1;return!0}function dy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function bf(n){if(!hy(n))return!1;const l=n.constructor;if(l===void 0)return!0;const i=l.prototype;return!(!hy(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function hy(n){return Object.prototype.toString.call(n)==="[object Object]"}function rb(n){return new Promise(l=>{as.setTimeout(l,n)})}function Sf(n,l,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,l):i.structuralSharing!==!1?yg(n,l):l}function ub(n,l,i=0){const r=[...n,l];return i&&r.length>i?r.slice(1):r}function cb(n,l,i=0){const r=[l,...n];return i&&r.length>i?r.slice(0,-1):r}var Yf=Symbol();function gg(n,l){return!n.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!n.queryFn||n.queryFn===Yf?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Gf(n,l){return typeof n=="function"?n(...l):!!n}function ob(n,l,i){let r=!1,o;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(o??(o=l()),r||(r=!0,o.aborted?i():o.addEventListener("abort",i,{once:!0})),o)}),n}var Di=(()=>{let n=()=>sb;return{isServer(){return n()},setIsServer(l){n=l}}})();function jf(){let n,l;const i=new Promise((o,d)=>{n=o,l=d});i.status="pending",i.catch(()=>{});function r(o){Object.assign(i,o),delete i.resolve,delete i.reject}return i.resolve=o=>{r({status:"fulfilled",value:o}),n(o)},i.reject=o=>{r({status:"rejected",reason:o}),l(o)},i}var fb=nb;function db(){let n=[],l=0,i=g=>{g()},r=g=>{g()},o=fb;const d=g=>{l?n.push(g):o(()=>{i(g)})},h=()=>{const g=n;n=[],g.length&&o(()=>{r(()=>{g.forEach(p=>{i(p)})})})};return{batch:g=>{let p;l++;try{p=g()}finally{l--,l||h()}return p},batchCalls:g=>(...p)=>{d(()=>{g(...p)})},schedule:d,setNotifyFunction:g=>{i=g},setBatchNotifyFunction:g=>{r=g},setScheduler:g=>{o=g}}}var nt=db(),ml,Rn,yl,sg,hb=(sg=class extends Tl{constructor(){super();ce(this,ml,!0);ce(this,Rn);ce(this,yl);ae(this,yl,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l(!0),r=()=>l(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){_(this,Rn)||this.setEventListener(_(this,yl))}onUnsubscribe(){var l;this.hasListeners()||((l=_(this,Rn))==null||l.call(this),ae(this,Rn,void 0))}setEventListener(l){var i;ae(this,yl,l),(i=_(this,Rn))==null||i.call(this),ae(this,Rn,l(this.setOnline.bind(this)))}setOnline(l){_(this,ml)!==l&&(ae(this,ml,l),this.listeners.forEach(r=>{r(l)}))}isOnline(){return _(this,ml)}},ml=new WeakMap,Rn=new WeakMap,yl=new WeakMap,sg),Ru=new hb;function mb(n){return Math.min(1e3*2**n,3e4)}function pg(n){return(n??"online")==="online"?Ru.isOnline():!0}var Nf=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function xg(n){let l=!1,i=0,r;const o=jf(),d=()=>o.status!=="pending",h=E=>{var C;if(!d()){const A=new Nf(E);S(A),(C=n.onCancel)==null||C.call(n,A)}},g=()=>{l=!0},p=()=>{l=!1},m=()=>Hf.isFocused()&&(n.networkMode==="always"||Ru.isOnline())&&n.canRun(),v=()=>pg(n.networkMode)&&n.canRun(),x=E=>{d()||(r==null||r(),o.resolve(E))},S=E=>{d()||(r==null||r(),o.reject(E))},j=()=>new Promise(E=>{var C;r=A=>{(d()||m())&&E(A)},(C=n.onPause)==null||C.call(n)}).then(()=>{var E;r=void 0,d()||(E=n.onContinue)==null||E.call(n)}),N=()=>{if(d())return;let E;const C=i===0?n.initialPromise:void 0;try{E=C??n.fn()}catch(A){E=Promise.reject(A)}Promise.resolve(E).then(x).catch(A=>{var W;if(d())return;const $=n.retry??(Di.isServer()?0:3),Z=n.retryDelay??mb,L=typeof Z=="function"?Z(i,A):Z,X=$===!0||typeof $=="number"&&i<$||typeof $=="function"&&$(i,A);if(l||!X){S(A);return}i++,(W=n.onFail)==null||W.call(n,i,A),rb(L).then(()=>m()?void 0:j()).then(()=>{l?S(A):N()})})};return{promise:o,status:()=>o.status,cancel:h,continue:()=>(r==null||r(),o),cancelRetry:g,continueRetry:p,canStart:v,start:()=>(v()?N():j().then(N),o)}}var is,lg,vg=(lg=class{constructor(){ce(this,is)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vf(this.gcTime)&&ae(this,is,as.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Di.isServer()?1/0:300*1e3))}clearGcTimeout(){_(this,is)&&(as.clearTimeout(_(this,is)),ae(this,is,void 0))}},is=new WeakMap,lg),rs,gl,Wt,us,it,Qi,cs,Yt,bg,qa,ig,yb=(ig=class extends vg{constructor(l){super();ce(this,Yt);ce(this,rs);ce(this,gl);ce(this,Wt);ce(this,us);ce(this,it);ce(this,Qi);ce(this,cs);ae(this,cs,!1),ae(this,Qi,l.defaultOptions),this.setOptions(l.options),this.observers=[],ae(this,us,l.client),ae(this,Wt,_(this,us).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,ae(this,rs,yy(this.options)),this.state=l.state??_(this,rs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var l;return(l=_(this,it))==null?void 0:l.promise}setOptions(l){if(this.options={..._(this,Qi),...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=yy(this.options);i.data!==void 0&&(this.setState(my(i.data,i.dataUpdatedAt)),ae(this,rs,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,Wt).remove(this)}setData(l,i){const r=Sf(this.state.data,l,this.options);return xe(this,Yt,qa).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(l,i){xe(this,Yt,qa).call(this,{type:"setState",state:l,setStateOptions:i})}cancel(l){var r,o;const i=(r=_(this,it))==null?void 0:r.promise;return(o=_(this,it))==null||o.cancel(l),i?i.then(bt).catch(bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return _(this,rs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(l=>ea(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>zn(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!mg(this.state.dataUpdatedAt,l)}onFocus(){var i;const l=this.observers.find(r=>r.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(i=_(this,it))==null||i.continue()}onOnline(){var i;const l=this.observers.find(r=>r.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(i=_(this,it))==null||i.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),_(this,Wt).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(i=>i!==l),this.observers.length||(_(this,it)&&(_(this,cs)||xe(this,Yt,bg).call(this)?_(this,it).cancel({revert:!0}):_(this,it).cancelRetry()),this.scheduleGc()),_(this,Wt).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xe(this,Yt,qa).call(this,{type:"invalidate"})}async fetch(l,i){var p,m,v,x,S,j,N,E,C,A,$,Z;if(this.state.fetchStatus!=="idle"&&((p=_(this,it))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(_(this,it))return _(this,it).continueRetry(),_(this,it).promise}if(l&&this.setOptions(l),!this.options.queryFn){const L=this.observers.find(X=>X.options.queryFn);L&&this.setOptions(L.options)}const r=new AbortController,o=L=>{Object.defineProperty(L,"signal",{enumerable:!0,get:()=>(ae(this,cs,!0),r.signal)})},d=()=>{const L=gg(this.options,i),W=(()=>{const P={client:_(this,us),queryKey:this.queryKey,meta:this.meta};return o(P),P})();return ae(this,cs,!1),this.options.persister?this.options.persister(L,W,this):L(W)},g=(()=>{const L={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:_(this,us),state:this.state,fetchFn:d};return o(L),L})();(m=this.options.behavior)==null||m.onFetch(g,this),ae(this,gl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=g.fetchOptions)==null?void 0:v.meta))&&xe(this,Yt,qa).call(this,{type:"fetch",meta:(x=g.fetchOptions)==null?void 0:x.meta}),ae(this,it,xg({initialPromise:i==null?void 0:i.initialPromise,fn:g.fetchFn,onCancel:L=>{L instanceof Nf&&L.revert&&this.setState({..._(this,gl),fetchStatus:"idle"}),r.abort()},onFail:(L,X)=>{xe(this,Yt,qa).call(this,{type:"failed",failureCount:L,error:X})},onPause:()=>{xe(this,Yt,qa).call(this,{type:"pause"})},onContinue:()=>{xe(this,Yt,qa).call(this,{type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay,networkMode:g.options.networkMode,canRun:()=>!0}));try{const L=await _(this,it).start();if(L===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(L),(j=(S=_(this,Wt).config).onSuccess)==null||j.call(S,L,this),(E=(N=_(this,Wt).config).onSettled)==null||E.call(N,L,this.state.error,this),L}catch(L){if(L instanceof Nf){if(L.silent)return _(this,it).promise;if(L.revert){if(this.state.data===void 0)throw L;return this.state.data}}throw xe(this,Yt,qa).call(this,{type:"error",error:L}),(A=(C=_(this,Wt).config).onError)==null||A.call(C,L,this),(Z=($=_(this,Wt).config).onSettled)==null||Z.call($,this.state.data,L,this),L}finally{this.scheduleGc()}}},rs=new WeakMap,gl=new WeakMap,Wt=new WeakMap,us=new WeakMap,it=new WeakMap,Qi=new WeakMap,cs=new WeakMap,Yt=new WeakSet,bg=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},qa=function(l){const i=r=>{switch(l.type){case"failed":return{...r,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Sg(r.data,this.options),fetchMeta:l.meta??null};case"success":const o={...r,...my(l.data,l.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ae(this,gl,l.manual?o:void 0),o;case"error":const d=l.error;return{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...l.state}}};this.state=i(this.state),nt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),_(this,Wt).notify({query:this,type:"updated",action:l})})},ig);function Sg(n,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pg(l.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function my(n,l){return{data:n,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function yy(n){const l=typeof n.initialData=="function"?n.initialData():n.initialData,i=l!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Ct,Me,Yi,vt,os,pl,Ha,_n,Gi,xl,vl,fs,ds,En,bl,Oe,wi,Rf,_f,Ef,Tf,Mf,Cf,wf,jg,rg,gb=(rg=class extends Tl{constructor(l,i){super();ce(this,Oe);ce(this,Ct);ce(this,Me);ce(this,Yi);ce(this,vt);ce(this,os);ce(this,pl);ce(this,Ha);ce(this,_n);ce(this,Gi);ce(this,xl);ce(this,vl);ce(this,fs);ce(this,ds);ce(this,En);ce(this,bl,new Set);this.options=i,ae(this,Ct,l),ae(this,_n,null),ae(this,Ha,jf()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,Me).addObserver(this),gy(_(this,Me),this.options)?xe(this,Oe,wi).call(this):this.updateResult(),xe(this,Oe,Tf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Af(_(this,Me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Af(_(this,Me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xe(this,Oe,Mf).call(this),xe(this,Oe,Cf).call(this),_(this,Me).removeObserver(this)}setOptions(l){const i=this.options,r=_(this,Me);if(this.options=_(this,Ct).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ea(this.options.enabled,_(this,Me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xe(this,Oe,wf).call(this),_(this,Me).setOptions(this.options),i._defaulted&&!Nu(this.options,i)&&_(this,Ct).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,Me),observer:this});const o=this.hasListeners();o&&py(_(this,Me),r,this.options,i)&&xe(this,Oe,wi).call(this),this.updateResult(),o&&(_(this,Me)!==r||ea(this.options.enabled,_(this,Me))!==ea(i.enabled,_(this,Me))||zn(this.options.staleTime,_(this,Me))!==zn(i.staleTime,_(this,Me)))&&xe(this,Oe,Rf).call(this);const d=xe(this,Oe,_f).call(this);o&&(_(this,Me)!==r||ea(this.options.enabled,_(this,Me))!==ea(i.enabled,_(this,Me))||d!==_(this,En))&&xe(this,Oe,Ef).call(this,d)}getOptimisticResult(l){const i=_(this,Ct).getQueryCache().build(_(this,Ct),l),r=this.createResult(i,l);return xb(this,r)&&(ae(this,vt,r),ae(this,pl,this.options),ae(this,os,_(this,Me).state)),r}getCurrentResult(){return _(this,vt)}trackResult(l,i){return new Proxy(l,{get:(r,o)=>(this.trackProp(o),i==null||i(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&_(this,Ha).status==="pending"&&_(this,Ha).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(l){_(this,bl).add(l)}getCurrentQuery(){return _(this,Me)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const i=_(this,Ct).defaultQueryOptions(l),r=_(this,Ct).getQueryCache().build(_(this,Ct),i);return r.fetch().then(()=>this.createResult(r,i))}fetch(l){return xe(this,Oe,wi).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,vt)))}createResult(l,i){var J;const r=_(this,Me),o=this.options,d=_(this,vt),h=_(this,os),g=_(this,pl),m=l!==r?l.state:_(this,Yi),{state:v}=l;let x={...v},S=!1,j;if(i._optimisticResults){const V=this.hasListeners(),I=!V&&gy(l,i),se=V&&py(l,r,i,o);(I||se)&&(x={...x,...Sg(v.data,l.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:N,errorUpdatedAt:E,status:C}=x;j=x.data;let A=!1;if(i.placeholderData!==void 0&&j===void 0&&C==="pending"){let V;d!=null&&d.isPlaceholderData&&i.placeholderData===(g==null?void 0:g.placeholderData)?(V=d.data,A=!0):V=typeof i.placeholderData=="function"?i.placeholderData((J=_(this,vl))==null?void 0:J.state.data,_(this,vl)):i.placeholderData,V!==void 0&&(C="success",j=Sf(d==null?void 0:d.data,V,i),S=!0)}if(i.select&&j!==void 0&&!A)if(d&&j===(h==null?void 0:h.data)&&i.select===_(this,Gi))j=_(this,xl);else try{ae(this,Gi,i.select),j=i.select(j),j=Sf(d==null?void 0:d.data,j,i),ae(this,xl,j),ae(this,_n,null)}catch(V){ae(this,_n,V)}_(this,_n)&&(N=_(this,_n),j=_(this,xl),E=Date.now(),C="error");const $=x.fetchStatus==="fetching",Z=C==="pending",L=C==="error",X=Z&&$,W=j!==void 0,F={status:C,fetchStatus:x.fetchStatus,isPending:Z,isSuccess:C==="success",isError:L,isInitialLoading:X,isLoading:X,data:j,dataUpdatedAt:x.dataUpdatedAt,error:N,errorUpdatedAt:E,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:l.isFetched(),isFetchedAfterMount:x.dataUpdateCount>m.dataUpdateCount||x.errorUpdateCount>m.errorUpdateCount,isFetching:$,isRefetching:$&&!Z,isLoadingError:L&&!W,isPaused:x.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:L&&W,isStale:Kf(l,i),refetch:this.refetch,promise:_(this,Ha),isEnabled:ea(i.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const V=F.data!==void 0,I=F.status==="error"&&!V,se=ne=>{I?ne.reject(F.error):V&&ne.resolve(F.data)},le=()=>{const ne=ae(this,Ha,F.promise=jf());se(ne)},ue=_(this,Ha);switch(ue.status){case"pending":l.queryHash===r.queryHash&&se(ue);break;case"fulfilled":(I||F.data!==ue.value)&&le();break;case"rejected":(!I||F.error!==ue.reason)&&le();break}}return F}updateResult(){const l=_(this,vt),i=this.createResult(_(this,Me),this.options);if(ae(this,os,_(this,Me).state),ae(this,pl,this.options),_(this,os).data!==void 0&&ae(this,vl,_(this,Me)),Nu(i,l))return;ae(this,vt,i);const r=()=>{if(!l)return!0;const{notifyOnChangeProps:o}=this.options,d=typeof o=="function"?o():o;if(d==="all"||!d&&!_(this,bl).size)return!0;const h=new Set(d??_(this,bl));return this.options.throwOnError&&h.add("error"),Object.keys(_(this,vt)).some(g=>{const p=g;return _(this,vt)[p]!==l[p]&&h.has(p)})};xe(this,Oe,jg).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xe(this,Oe,Tf).call(this)}},Ct=new WeakMap,Me=new WeakMap,Yi=new WeakMap,vt=new WeakMap,os=new WeakMap,pl=new WeakMap,Ha=new WeakMap,_n=new WeakMap,Gi=new WeakMap,xl=new WeakMap,vl=new WeakMap,fs=new WeakMap,ds=new WeakMap,En=new WeakMap,bl=new WeakMap,Oe=new WeakSet,wi=function(l){xe(this,Oe,wf).call(this);let i=_(this,Me).fetch(this.options,l);return l!=null&&l.throwOnError||(i=i.catch(bt)),i},Rf=function(){xe(this,Oe,Mf).call(this);const l=zn(this.options.staleTime,_(this,Me));if(Di.isServer()||_(this,vt).isStale||!vf(l))return;const r=mg(_(this,vt).dataUpdatedAt,l)+1;ae(this,fs,as.setTimeout(()=>{_(this,vt).isStale||this.updateResult()},r))},_f=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,Me)):this.options.refetchInterval)??!1},Ef=function(l){xe(this,Oe,Cf).call(this),ae(this,En,l),!(Di.isServer()||ea(this.options.enabled,_(this,Me))===!1||!vf(_(this,En))||_(this,En)===0)&&ae(this,ds,as.setInterval(()=>{(this.options.refetchIntervalInBackground||Hf.isFocused())&&xe(this,Oe,wi).call(this)},_(this,En)))},Tf=function(){xe(this,Oe,Rf).call(this),xe(this,Oe,Ef).call(this,xe(this,Oe,_f).call(this))},Mf=function(){_(this,fs)&&(as.clearTimeout(_(this,fs)),ae(this,fs,void 0))},Cf=function(){_(this,ds)&&(as.clearInterval(_(this,ds)),ae(this,ds,void 0))},wf=function(){const l=_(this,Ct).getQueryCache().build(_(this,Ct),this.options);if(l===_(this,Me))return;const i=_(this,Me);ae(this,Me,l),ae(this,Yi,l.state),this.hasListeners()&&(i==null||i.removeObserver(this),l.addObserver(this))},jg=function(l){nt.batch(()=>{l.listeners&&this.listeners.forEach(i=>{i(_(this,vt))}),_(this,Ct).getQueryCache().notify({query:_(this,Me),type:"observerResultsUpdated"})})},rg);function pb(n,l){return ea(l.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&l.retryOnMount===!1)}function gy(n,l){return pb(n,l)||n.state.data!==void 0&&Af(n,l,l.refetchOnMount)}function Af(n,l,i){if(ea(l.enabled,n)!==!1&&zn(l.staleTime,n)!=="static"){const r=typeof i=="function"?i(n):i;return r==="always"||r!==!1&&Kf(n,l)}return!1}function py(n,l,i,r){return(n!==l||ea(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Kf(n,i)}function Kf(n,l){return ea(l.enabled,n)!==!1&&n.isStaleByTime(zn(l.staleTime,n))}function xb(n,l){return!Nu(n.getCurrentResult(),l)}function xy(n){return{onFetch:(l,i)=>{var v,x,S,j,N;const r=l.options,o=(S=(x=(v=l.fetchOptions)==null?void 0:v.meta)==null?void 0:x.fetchMore)==null?void 0:S.direction,d=((j=l.state.data)==null?void 0:j.pages)||[],h=((N=l.state.data)==null?void 0:N.pageParams)||[];let g={pages:[],pageParams:[]},p=0;const m=async()=>{let E=!1;const C=Z=>{ob(Z,()=>l.signal,()=>E=!0)},A=gg(l.options,l.fetchOptions),$=async(Z,L,X)=>{if(E)return Promise.reject();if(L==null&&Z.pages.length)return Promise.resolve(Z);const P=(()=>{const I={client:l.client,queryKey:l.queryKey,pageParam:L,direction:X?"backward":"forward",meta:l.options.meta};return C(I),I})(),F=await A(P),{maxPages:J}=l.options,V=X?cb:ub;return{pages:V(Z.pages,F,J),pageParams:V(Z.pageParams,L,J)}};if(o&&d.length){const Z=o==="backward",L=Z?vb:vy,X={pages:d,pageParams:h},W=L(r,X);g=await $(X,W,Z)}else{const Z=n??d.length;do{const L=p===0?h[0]??r.initialPageParam:vy(r,g);if(p>0&&L==null)break;g=await $(g,L),p++}while(p<Z)}return g};l.options.persister?l.fetchFn=()=>{var E,C;return(C=(E=l.options).persister)==null?void 0:C.call(E,m,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},i)}:l.fetchFn=m}}}function vy(n,{pages:l,pageParams:i}){const r=l.length-1;return l.length>0?n.getNextPageParam(l[r],l,i[r],i):void 0}function vb(n,{pages:l,pageParams:i}){var r;return l.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,l[0],l,i[0],i):void 0}var Ki,ya,gt,hs,ga,bn,ug,bb=(ug=class extends vg{constructor(l){super();ce(this,ga);ce(this,Ki);ce(this,ya);ce(this,gt);ce(this,hs);ae(this,Ki,l.client),this.mutationId=l.mutationId,ae(this,gt,l.mutationCache),ae(this,ya,[]),this.state=l.state||Ng(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){_(this,ya).includes(l)||(_(this,ya).push(l),this.clearGcTimeout(),_(this,gt).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){ae(this,ya,_(this,ya).filter(i=>i!==l)),this.scheduleGc(),_(this,gt).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){_(this,ya).length||(this.state.status==="pending"?this.scheduleGc():_(this,gt).remove(this))}continue(){var l;return((l=_(this,hs))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var h,g,p,m,v,x,S,j,N,E,C,A,$,Z,L,X,W,P;const i=()=>{xe(this,ga,bn).call(this,{type:"continue"})},r={client:_(this,Ki),meta:this.options.meta,mutationKey:this.options.mutationKey};ae(this,hs,xg({fn:()=>this.options.mutationFn?this.options.mutationFn(l,r):Promise.reject(new Error("No mutationFn found")),onFail:(F,J)=>{xe(this,ga,bn).call(this,{type:"failed",failureCount:F,error:J})},onPause:()=>{xe(this,ga,bn).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,gt).canRun(this)}));const o=this.state.status==="pending",d=!_(this,hs).canStart();try{if(o)i();else{xe(this,ga,bn).call(this,{type:"pending",variables:l,isPaused:d}),_(this,gt).config.onMutate&&await _(this,gt).config.onMutate(l,this,r);const J=await((g=(h=this.options).onMutate)==null?void 0:g.call(h,l,r));J!==this.state.context&&xe(this,ga,bn).call(this,{type:"pending",context:J,variables:l,isPaused:d})}const F=await _(this,hs).start();return await((m=(p=_(this,gt).config).onSuccess)==null?void 0:m.call(p,F,l,this.state.context,this,r)),await((x=(v=this.options).onSuccess)==null?void 0:x.call(v,F,l,this.state.context,r)),await((j=(S=_(this,gt).config).onSettled)==null?void 0:j.call(S,F,null,this.state.variables,this.state.context,this,r)),await((E=(N=this.options).onSettled)==null?void 0:E.call(N,F,null,l,this.state.context,r)),xe(this,ga,bn).call(this,{type:"success",data:F}),F}catch(F){try{await((A=(C=_(this,gt).config).onError)==null?void 0:A.call(C,F,l,this.state.context,this,r))}catch(J){Promise.reject(J)}try{await((Z=($=this.options).onError)==null?void 0:Z.call($,F,l,this.state.context,r))}catch(J){Promise.reject(J)}try{await((X=(L=_(this,gt).config).onSettled)==null?void 0:X.call(L,void 0,F,this.state.variables,this.state.context,this,r))}catch(J){Promise.reject(J)}try{await((P=(W=this.options).onSettled)==null?void 0:P.call(W,void 0,F,l,this.state.context,r))}catch(J){Promise.reject(J)}throw xe(this,ga,bn).call(this,{type:"error",error:F}),F}finally{_(this,gt).runNext(this)}}},Ki=new WeakMap,ya=new WeakMap,gt=new WeakMap,hs=new WeakMap,ga=new WeakSet,bn=function(l){const i=r=>{switch(l.type){case"failed":return{...r,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...r,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:l.error,failureCount:r.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=i(this.state),nt.batch(()=>{_(this,ya).forEach(r=>{r.onMutationUpdate(l)}),_(this,gt).notify({mutation:this,type:"updated",action:l})})},ug);function Ng(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qa,ia,Vi,cg,Sb=(cg=class extends Tl{constructor(l={}){super();ce(this,Qa);ce(this,ia);ce(this,Vi);this.config=l,ae(this,Qa,new Set),ae(this,ia,new Map),ae(this,Vi,0)}build(l,i,r){const o=new bb({client:l,mutationCache:this,mutationId:++hu(this,Vi)._,options:l.defaultMutationOptions(i),state:r});return this.add(o),o}add(l){_(this,Qa).add(l);const i=mu(l);if(typeof i=="string"){const r=_(this,ia).get(i);r?r.push(l):_(this,ia).set(i,[l])}this.notify({type:"added",mutation:l})}remove(l){if(_(this,Qa).delete(l)){const i=mu(l);if(typeof i=="string"){const r=_(this,ia).get(i);if(r)if(r.length>1){const o=r.indexOf(l);o!==-1&&r.splice(o,1)}else r[0]===l&&_(this,ia).delete(i)}}this.notify({type:"removed",mutation:l})}canRun(l){const i=mu(l);if(typeof i=="string"){const r=_(this,ia).get(i),o=r==null?void 0:r.find(d=>d.state.status==="pending");return!o||o===l}else return!0}runNext(l){var r;const i=mu(l);if(typeof i=="string"){const o=(r=_(this,ia).get(i))==null?void 0:r.find(d=>d!==l&&d.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nt.batch(()=>{_(this,Qa).forEach(l=>{this.notify({type:"removed",mutation:l})}),_(this,Qa).clear(),_(this,ia).clear()})}getAll(){return Array.from(_(this,Qa))}find(l){const i={exact:!0,...l};return this.getAll().find(r=>fy(i,r))}findAll(l={}){return this.getAll().filter(i=>fy(l,i))}notify(l){nt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}resumePausedMutations(){const l=this.getAll().filter(i=>i.state.isPaused);return nt.batch(()=>Promise.all(l.map(i=>i.continue().catch(bt))))}},Qa=new WeakMap,ia=new WeakMap,Vi=new WeakMap,cg);function mu(n){var l;return(l=n.options.scope)==null?void 0:l.id}var Ya,Tn,wt,Ga,Xa,xu,Of,og,jb=(og=class extends Tl{constructor(i,r){super();ce(this,Xa);ce(this,Ya);ce(this,Tn);ce(this,wt);ce(this,Ga);ae(this,Ya,i),this.setOptions(r),this.bindMethods(),xe(this,Xa,xu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var o;const r=this.options;this.options=_(this,Ya).defaultMutationOptions(i),Nu(this.options,r)||_(this,Ya).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,wt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ps(r.mutationKey)!==ps(this.options.mutationKey)?this.reset():((o=_(this,wt))==null?void 0:o.state.status)==="pending"&&_(this,wt).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=_(this,wt))==null||i.removeObserver(this)}onMutationUpdate(i){xe(this,Xa,xu).call(this),xe(this,Xa,Of).call(this,i)}getCurrentResult(){return _(this,Tn)}reset(){var i;(i=_(this,wt))==null||i.removeObserver(this),ae(this,wt,void 0),xe(this,Xa,xu).call(this),xe(this,Xa,Of).call(this)}mutate(i,r){var o;return ae(this,Ga,r),(o=_(this,wt))==null||o.removeObserver(this),ae(this,wt,_(this,Ya).getMutationCache().build(_(this,Ya),this.options)),_(this,wt).addObserver(this),_(this,wt).execute(i)}},Ya=new WeakMap,Tn=new WeakMap,wt=new WeakMap,Ga=new WeakMap,Xa=new WeakSet,xu=function(){var r;const i=((r=_(this,wt))==null?void 0:r.state)??Ng();ae(this,Tn,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Of=function(i){nt.batch(()=>{var r,o,d,h,g,p,m,v;if(_(this,Ga)&&this.hasListeners()){const x=_(this,Tn).variables,S=_(this,Tn).context,j={client:_(this,Ya),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(o=(r=_(this,Ga)).onSuccess)==null||o.call(r,i.data,x,S,j)}catch(N){Promise.reject(N)}try{(h=(d=_(this,Ga)).onSettled)==null||h.call(d,i.data,null,x,S,j)}catch(N){Promise.reject(N)}}else if((i==null?void 0:i.type)==="error"){try{(p=(g=_(this,Ga)).onError)==null||p.call(g,i.error,x,S,j)}catch(N){Promise.reject(N)}try{(v=(m=_(this,Ga)).onSettled)==null||v.call(m,void 0,i.error,x,S,j)}catch(N){Promise.reject(N)}}}this.listeners.forEach(x=>{x(_(this,Tn))})})},og),pa,fg,Nb=(fg=class extends Tl{constructor(l={}){super();ce(this,pa);this.config=l,ae(this,pa,new Map)}build(l,i,r){const o=i.queryKey,d=i.queryHash??Qf(o,i);let h=this.get(d);return h||(h=new yb({client:l,queryKey:o,queryHash:d,options:l.defaultQueryOptions(i),state:r,defaultOptions:l.getQueryDefaults(o)}),this.add(h)),h}add(l){_(this,pa).has(l.queryHash)||(_(this,pa).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const i=_(this,pa).get(l.queryHash);i&&(l.destroy(),i===l&&_(this,pa).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){nt.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return _(this,pa).get(l)}getAll(){return[..._(this,pa).values()]}find(l){const i={exact:!0,...l};return this.getAll().find(r=>oy(i,r))}findAll(l={}){const i=this.getAll();return Object.keys(l).length>0?i.filter(r=>oy(l,r)):i}notify(l){nt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}onFocus(){nt.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){nt.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},pa=new WeakMap,fg),$e,Mn,Cn,Sl,jl,wn,Nl,Rl,dg,Rb=(dg=class{constructor(n={}){ce(this,$e);ce(this,Mn);ce(this,Cn);ce(this,Sl);ce(this,jl);ce(this,wn);ce(this,Nl);ce(this,Rl);ae(this,$e,n.queryCache||new Nb),ae(this,Mn,n.mutationCache||new Sb),ae(this,Cn,n.defaultOptions||{}),ae(this,Sl,new Map),ae(this,jl,new Map),ae(this,wn,0)}mount(){hu(this,wn)._++,_(this,wn)===1&&(ae(this,Nl,Hf.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,$e).onFocus())})),ae(this,Rl,Ru.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,$e).onOnline())})))}unmount(){var n,l;hu(this,wn)._--,_(this,wn)===0&&((n=_(this,Nl))==null||n.call(this),ae(this,Nl,void 0),(l=_(this,Rl))==null||l.call(this),ae(this,Rl,void 0))}isFetching(n){return _(this,$e).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return _(this,Mn).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=_(this,$e).get(l.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const l=this.defaultQueryOptions(n),i=_(this,$e).build(this,l),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(zn(l.staleTime,i))&&this.prefetchQuery(l),Promise.resolve(r))}getQueriesData(n){return _(this,$e).findAll(n).map(({queryKey:l,state:i})=>{const r=i.data;return[l,r]})}setQueryData(n,l,i){const r=this.defaultQueryOptions({queryKey:n}),o=_(this,$e).get(r.queryHash),d=o==null?void 0:o.state.data,h=lb(l,d);if(h!==void 0)return _(this,$e).build(this,r).setData(h,{...i,manual:!0})}setQueriesData(n,l,i){return nt.batch(()=>_(this,$e).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,l,i)]))}getQueryState(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=_(this,$e).get(l.queryHash))==null?void 0:i.state}removeQueries(n){const l=_(this,$e);nt.batch(()=>{l.findAll(n).forEach(i=>{l.remove(i)})})}resetQueries(n,l){const i=_(this,$e);return nt.batch(()=>(i.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},l)))}cancelQueries(n,l={}){const i={revert:!0,...l},r=nt.batch(()=>_(this,$e).findAll(n).map(o=>o.cancel(i)));return Promise.all(r).then(bt).catch(bt)}invalidateQueries(n,l={}){return nt.batch(()=>(_(this,$e).findAll(n).forEach(i=>{i.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"},l)))}refetchQueries(n,l={}){const i={...l,cancelRefetch:l.cancelRefetch??!0},r=nt.batch(()=>_(this,$e).findAll(n).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let d=o.fetch(void 0,i);return i.throwOnError||(d=d.catch(bt)),o.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(bt)}fetchQuery(n){const l=this.defaultQueryOptions(n);l.retry===void 0&&(l.retry=!1);const i=_(this,$e).build(this,l);return i.isStaleByTime(zn(l.staleTime,i))?i.fetch(l):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(bt).catch(bt)}fetchInfiniteQuery(n){return n.behavior=xy(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(bt).catch(bt)}ensureInfiniteQueryData(n){return n.behavior=xy(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Ru.isOnline()?_(this,Mn).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,$e)}getMutationCache(){return _(this,Mn)}getDefaultOptions(){return _(this,Cn)}setDefaultOptions(n){ae(this,Cn,n)}setQueryDefaults(n,l){_(this,Sl).set(ps(n),{queryKey:n,defaultOptions:l})}getQueryDefaults(n){const l=[..._(this,Sl).values()],i={};return l.forEach(r=>{zi(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,l){_(this,jl).set(ps(n),{mutationKey:n,defaultOptions:l})}getMutationDefaults(n){const l=[..._(this,jl).values()],i={};return l.forEach(r=>{zi(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const l={..._(this,Cn).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return l.queryHash||(l.queryHash=Qf(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===Yf&&(l.enabled=!1),l}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{..._(this,Cn).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){_(this,$e).clear(),_(this,Mn).clear()}},$e=new WeakMap,Mn=new WeakMap,Cn=new WeakMap,Sl=new WeakMap,jl=new WeakMap,wn=new WeakMap,Nl=new WeakMap,Rl=new WeakMap,dg),Rg=Q.createContext(void 0),Un=n=>{const l=Q.useContext(Rg);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},_b=({client:n,children:l})=>(Q.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(Rg.Provider,{value:n,children:l})),_g=Q.createContext(!1),Eb=()=>Q.useContext(_g);_g.Provider;function Tb(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var Mb=Q.createContext(Tb()),Cb=()=>Q.useContext(Mb),wb=(n,l,i)=>{const r=i!=null&&i.state.error&&typeof n.throwOnError=="function"?Gf(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||r)&&(l.isReset()||(n.retryOnMount=!1))},Ab=n=>{Q.useEffect(()=>{n.clearReset()},[n])},Ob=({result:n,errorResetBoundary:l,throwOnError:i,query:r,suspense:o})=>n.isError&&!l.isReset()&&!n.isFetching&&r&&(o&&n.data===void 0||Gf(i,[n.error,r])),zb=n=>{if(n.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...o)=>i(r(...o)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Db=(n,l)=>n.isLoading&&n.isFetching&&!l,Lb=(n,l)=>(n==null?void 0:n.suspense)&&l.isPending,by=(n,l,i)=>l.fetchOptimistic(n).catch(()=>{i.clearReset()});function Ub(n,l,i){var S,j,N,E;const r=Eb(),o=Cb(),d=Un(),h=d.defaultQueryOptions(n);(j=(S=d.getDefaultOptions().queries)==null?void 0:S._experimental_beforeQuery)==null||j.call(S,h);const g=d.getQueryCache().get(h.queryHash);h._optimisticResults=r?"isRestoring":"optimistic",zb(h),wb(h,o,g),Ab(o);const p=!d.getQueryCache().get(h.queryHash),[m]=Q.useState(()=>new l(d,h)),v=m.getOptimisticResult(h),x=!r&&n.subscribed!==!1;if(Q.useSyncExternalStore(Q.useCallback(C=>{const A=x?m.subscribe(nt.batchCalls(C)):bt;return m.updateResult(),A},[m,x]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),Q.useEffect(()=>{m.setOptions(h)},[h,m]),Lb(h,v))throw by(h,m,o);if(Ob({result:v,errorResetBoundary:o,throwOnError:h.throwOnError,query:g,suspense:h.suspense}))throw v.error;if((E=(N=d.getDefaultOptions().queries)==null?void 0:N._experimental_afterQuery)==null||E.call(N,h,v),h.experimental_prefetchInRender&&!Di.isServer()&&Db(v,r)){const C=p?by(h,m,o):g==null?void 0:g.promise;C==null||C.catch(bt).finally(()=>{m.updateResult()})}return h.notifyOnChangeProps?v:m.trackResult(v)}function Ve(n,l){return Ub(n,gb)}function Bb(n,l){const i=Un(),[r]=Q.useState(()=>new jb(i,n));Q.useEffect(()=>{r.setOptions(n)},[r,n]);const o=Q.useSyncExternalStore(Q.useCallback(h=>r.subscribe(nt.batchCalls(h)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),d=Q.useCallback((h,g)=>{r.mutate(h,g).catch(bt)},[r]);if(o.error&&Gf(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:d,mutateAsync:o.mutate}}var Ai=typeof window<"u"?Q.useLayoutEffect:Q.useEffect;function nf(n){const l=Q.useRef({value:n,prev:null}),i=l.current.value;return n!==i&&(l.current={value:n,prev:i}),l.current.prev}function qb(n,l,i={},r={}){Q.useEffect(()=>{if(!n.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([d])=>{l(d)},i);return o.observe(n.current),()=>{o.disconnect()}},[l,i,r.disabled,n])}function Hb(n){const l=Q.useRef(null);return Q.useImperativeHandle(n,()=>l.current,[]),l}var Eg=!1;function Li(n){return n[n.length-1]}function Qb(n){return typeof n=="function"}function An(n,l){return Qb(n)?n(l):n}var Yb=Object.prototype.hasOwnProperty,Sy=Object.prototype.propertyIsEnumerable,Gb=()=>Object.create(null),ts=(n,l)=>Ka(n,l,Gb);function Ka(n,l,i=()=>({}),r=0){if(n===l)return n;if(r>500)return l;const o=l,d=Ry(n)&&Ry(o);if(!d&&!(_l(n)&&_l(o)))return o;const h=d?n:jy(n);if(!h)return o;const g=d?o:jy(o);if(!g)return o;const p=h.length,m=g.length,v=d?new Array(m):i();let x=0;for(let S=0;S<m;S++){const j=d?S:g[S],N=n[j],E=o[j];if(N===E){v[j]=N,(d?S<p:Yb.call(n,j))&&x++;continue}if(N===null||E===null||typeof N!="object"||typeof E!="object"){v[j]=E;continue}const C=Ka(N,E,i,r+1);v[j]=C,C===N&&x++}return p===m&&x===p?n:v}function jy(n){const l=Object.getOwnPropertyNames(n);for(const o of l)if(!Sy.call(n,o))return!1;const i=Object.getOwnPropertySymbols(n);if(i.length===0)return l;const r=l;for(const o of i){if(!Sy.call(n,o))return!1;r.push(o)}return r}function _l(n){if(!Ny(n))return!1;const l=n.constructor;if(typeof l>"u")return!0;const i=l.prototype;return!(!Ny(i)||!i.hasOwnProperty("isPrototypeOf"))}function Ny(n){return Object.prototype.toString.call(n)==="[object Object]"}function Ry(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ms(n,l,i){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(Array.isArray(n)&&Array.isArray(l)){if(n.length!==l.length)return!1;for(let r=0,o=n.length;r<o;r++)if(!ms(n[r],l[r],i))return!1;return!0}if(_l(n)&&_l(l)){const r=(i==null?void 0:i.ignoreUndefined)??!0;if(i!=null&&i.partial){for(const h in l)if((!r||l[h]!==void 0)&&!ms(n[h],l[h],i))return!1;return!0}let o=0;if(!r)o=Object.keys(n).length;else for(const h in n)n[h]!==void 0&&o++;let d=0;for(const h in l)if((!r||l[h]!==void 0)&&(d++,d>o||!ms(n[h],l[h],i)))return!1;return o===d}return!1}function El(n){let l,i;const r=new Promise((o,d)=>{l=o,i=d});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,l(o),n==null||n(o)},r.reject=o=>{r.status="rejected",i(o)},r}function Ui(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function Kb(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function _y(n){let l;try{l=decodeURI(n)}catch{l=n.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return Kb(l)}var Vb=["http:","https:","mailto:","tel:"];function _u(n,l){if(!n)return!1;try{const i=new URL(n);return!l.has(i.protocol)}catch{return!1}}function Ri(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const l=/%25|%5C/gi;let i=0,r="",o;for(;(o=l.exec(n))!==null;)r+=_y(n.slice(i,o.index))+o[0],i=l.lastIndex;r=r+_y(i?n.slice(i):n);let d=!1;return r.startsWith("//")&&(d=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:d}}function Xb(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function kb(n,l){if(n===l)return!0;if(n.length!==l.length)return!1;for(let i=0;i<n.length;i++)if(n[i]!==l[i])return!1;return!0}function Va(){throw new Error("Invariant failed")}function Bi(n){const l=new Map;let i,r;const o=d=>{d.next&&(d.prev?(d.prev.next=d.next,d.next.prev=d.prev,d.next=void 0,r&&(r.next=d,d.prev=r)):(d.next.prev=void 0,i=d.next,d.next=void 0,r&&(d.prev=r,r.next=d)),r=d)};return{get(d){const h=l.get(d);if(h)return o(h),h.value},set(d,h){if(l.size>=n&&i){const p=i;l.delete(p.key),p.next&&(i=p.next,p.next.prev=void 0),p===r&&(r=void 0)}const g=l.get(d);if(g)g.value=h,o(g);else{const p={key:d,value:h,prev:r};r&&(r.next=p),r=p,i||(i=p),l.set(d,p)}},clear(){l.clear(),i=void 0,r=void 0}}}var ns=4,Tg=5;function Zb(n){const l=n.indexOf("{");if(l===-1)return null;const i=n.indexOf("}",l);return i===-1||l+1>=n.length?null:[l,i]}function Vf(n,l,i=new Uint16Array(6)){const r=n.indexOf("/",l),o=r===-1?n.length:r,d=n.substring(l,o);if(!d||!d.includes("$"))return i[0]=0,i[1]=l,i[2]=l,i[3]=o,i[4]=o,i[5]=o,i;if(d==="$"){const g=n.length;return i[0]=2,i[1]=l,i[2]=l,i[3]=g,i[4]=g,i[5]=g,i}if(d.charCodeAt(0)===36)return i[0]=1,i[1]=l,i[2]=l+1,i[3]=o,i[4]=o,i[5]=o,i;const h=Zb(d);if(h){const[g,p]=h,m=d.charCodeAt(g+1);if(m===45){if(g+2<d.length&&d.charCodeAt(g+2)===36){const v=g+3,x=p;if(v<x)return i[0]=3,i[1]=l+g,i[2]=l+v,i[3]=l+x,i[4]=l+p+1,i[5]=o,i}}else if(m===36){const v=g+1,x=g+2;return x===p?(i[0]=2,i[1]=l+g,i[2]=l+v,i[3]=l+x,i[4]=l+p+1,i[5]=n.length,i):(i[0]=1,i[1]=l+g,i[2]=l+x,i[3]=l+p,i[4]=l+p+1,i[5]=o,i)}}return i[0]=0,i[1]=l,i[2]=l,i[3]=o,i[4]=o,i[5]=o,i}function zu(n,l,i,r,o,d,h){var p,m,v,x,S,j,N,E,C,A,$,Z,L;h==null||h(i);let g=r;{const X=i.fullPath??i.from,W=X.length,P=((p=i.options)==null?void 0:p.caseSensitive)??n,F=!!((v=(m=i.options)==null?void 0:m.params)!=null&&v.parse&&((S=(x=i.options)==null?void 0:x.skipRouteOnParseError)!=null&&S.params));for(;g<W;){const V=Vf(X,g,l);let I;const se=g,le=V[5];switch(g=le+1,d++,V[0]){case 0:{const ue=X.substring(V[2],V[3]);if(P){const ne=(j=o.static)==null?void 0:j.get(ue);if(ne)I=ne;else{o.static??(o.static=new Map);const O=ss(i.fullPath??i.from);O.parent=o,O.depth=d,I=O,o.static.set(ue,O)}}else{const ne=ue.toLowerCase(),O=(N=o.staticInsensitive)==null?void 0:N.get(ne);if(O)I=O;else{o.staticInsensitive??(o.staticInsensitive=new Map);const Y=ss(i.fullPath??i.from);Y.parent=o,Y.depth=d,I=Y,o.staticInsensitive.set(ne,Y)}}break}case 1:{const ue=X.substring(se,V[1]),ne=X.substring(V[4],le),O=P&&!!(ue||ne),Y=ue?O?ue:ue.toLowerCase():void 0,te=ne?O?ne:ne.toLowerCase():void 0,me=!F&&((E=o.dynamic)==null?void 0:E.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===O&&oe.prefix===Y&&oe.suffix===te));if(me)I=me;else{const oe=lf(1,i.fullPath??i.from,O,Y,te);I=oe,oe.depth=d,oe.parent=o,o.dynamic??(o.dynamic=[]),o.dynamic.push(oe)}break}case 3:{const ue=X.substring(se,V[1]),ne=X.substring(V[4],le),O=P&&!!(ue||ne),Y=ue?O?ue:ue.toLowerCase():void 0,te=ne?O?ne:ne.toLowerCase():void 0,me=!F&&((C=o.optional)==null?void 0:C.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===O&&oe.prefix===Y&&oe.suffix===te));if(me)I=me;else{const oe=lf(3,i.fullPath??i.from,O,Y,te);I=oe,oe.parent=o,oe.depth=d,o.optional??(o.optional=[]),o.optional.push(oe)}break}case 2:{const ue=X.substring(se,V[1]),ne=X.substring(V[4],le),O=P&&!!(ue||ne),Y=ue?O?ue:ue.toLowerCase():void 0,te=ne?O?ne:ne.toLowerCase():void 0,me=lf(2,i.fullPath??i.from,O,Y,te);I=me,me.parent=o,me.depth=d,o.wildcard??(o.wildcard=[]),o.wildcard.push(me)}}o=I}if(F&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const V=ss(i.fullPath??i.from);V.kind=Tg,V.parent=o,d++,V.depth=d,o.pathless??(o.pathless=[]),o.pathless.push(V),o=V}const J=(i.path||!i.children)&&!i.isRoot;if(J&&X.endsWith("/")){const V=ss(i.fullPath??i.from);V.kind=ns,V.parent=o,d++,V.depth=d,o.index=V,o=V}o.parse=(($=(A=i.options)==null?void 0:A.params)==null?void 0:$.parse)??null,o.skipOnParamError=F,o.parsingPriority=((L=(Z=i.options)==null?void 0:Z.skipRouteOnParseError)==null?void 0:L.priority)??0,J&&!o.route&&(o.route=i,o.fullPath=i.fullPath??i.from)}if(i.children)for(const X of i.children)zu(n,l,X,g,o,d,h)}function sf(n,l){if(n.skipOnParamError&&!l.skipOnParamError)return-1;if(!n.skipOnParamError&&l.skipOnParamError)return 1;if(n.skipOnParamError&&l.skipOnParamError&&(n.parsingPriority||l.parsingPriority))return l.parsingPriority-n.parsingPriority;if(n.prefix&&l.prefix&&n.prefix!==l.prefix){if(n.prefix.startsWith(l.prefix))return-1;if(l.prefix.startsWith(n.prefix))return 1}if(n.suffix&&l.suffix&&n.suffix!==l.suffix){if(n.suffix.endsWith(l.suffix))return-1;if(l.suffix.endsWith(n.suffix))return 1}return n.prefix&&!l.prefix?-1:!n.prefix&&l.prefix?1:n.suffix&&!l.suffix?-1:!n.suffix&&l.suffix?1:n.caseSensitive&&!l.caseSensitive?-1:!n.caseSensitive&&l.caseSensitive?1:0}function Sn(n){var l,i,r;if(n.pathless)for(const o of n.pathless)Sn(o);if(n.static)for(const o of n.static.values())Sn(o);if(n.staticInsensitive)for(const o of n.staticInsensitive.values())Sn(o);if((l=n.dynamic)!=null&&l.length){n.dynamic.sort(sf);for(const o of n.dynamic)Sn(o)}if((i=n.optional)!=null&&i.length){n.optional.sort(sf);for(const o of n.optional)Sn(o)}if((r=n.wildcard)!=null&&r.length){n.wildcard.sort(sf);for(const o of n.wildcard)Sn(o)}}function ss(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function lf(n,l,i,r,o){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:l,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:i,prefix:r,suffix:o}}function $b(n,l){const i=ss("/"),r=new Uint16Array(6);for(const o of n)zu(!1,r,o,1,i,0);Sn(i),l.masksTree=i,l.flatCache=Bi(1e3)}function Pb(n,l){n||(n="/");const i=l.flatCache.get(n);if(i)return i;const r=Xf(n,l.masksTree);return l.flatCache.set(n,r),r}function Fb(n,l,i,r,o){n||(n="/"),r||(r="/");const d=l?`case\0${n}`:n;let h=o.singleCache.get(d);return h||(h=ss("/"),zu(l,new Uint16Array(6),{from:n},1,h,0),o.singleCache.set(d,h)),Xf(r,h,i)}function Jb(n,l,i=!1){const r=i?n:`nofuzz\0${n}`,o=l.matchCache.get(r);if(o!==void 0)return o;n||(n="/");let d;try{d=Xf(n,l.segmentTree,i)}catch(h){if(h instanceof URIError)d=null;else throw h}return d&&(d.branch=eS(d.route)),l.matchCache.set(r,d),d}function Ib(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function Wb(n,l=!1,i){const r=ss(n.fullPath),o=new Uint16Array(6),d={},h={};let g=0;return zu(l,o,n,1,r,0,p=>{if(i==null||i(p,g),p.id in d&&Va(),d[p.id]=p,g!==0&&p.path){const m=Ib(p.fullPath);(!h[m]||p.fullPath.endsWith("/"))&&(h[m]=p)}g++}),Sn(r),{processedTree:{segmentTree:r,singleCache:Bi(1e3),matchCache:Bi(1e3),flatCache:null,masksTree:null},routesById:d,routesByPath:h}}function Xf(n,l,i=!1){const r=n.split("/"),o=aS(n,r,l,i);if(!o)return null;const[d]=Mg(n,r,o);return{route:o.node.route,rawParams:d,parsedParams:o.parsedParams}}function Mg(n,l,i){var v,x,S,j,N,E,C,A,$,Z;const r=tS(i.node);let o=null;const d=Object.create(null);let h=((v=i.extract)==null?void 0:v.part)??0,g=((x=i.extract)==null?void 0:x.node)??0,p=((S=i.extract)==null?void 0:S.path)??0,m=((j=i.extract)==null?void 0:j.segment)??0;for(;g<r.length;h++,g++,p++,m++){const L=r[g];if(L.kind===ns)break;if(L.kind===Tg){m--,h--,p--;continue}const X=l[h],W=p;if(X&&(p+=X.length),L.kind===1){o??(o=i.node.fullPath.split("/"));const P=o[m],F=((N=L.prefix)==null?void 0:N.length)??0;if(P.charCodeAt(F)===123){const J=((E=L.suffix)==null?void 0:E.length)??0,V=P.substring(F+2,P.length-J-1),I=X.substring(F,X.length-J);d[V]=decodeURIComponent(I)}else{const J=P.substring(1);d[J]=decodeURIComponent(X)}}else if(L.kind===3){if(i.skipped&1<<g){h--,p=W-1;continue}o??(o=i.node.fullPath.split("/"));const P=o[m],F=((C=L.prefix)==null?void 0:C.length)??0,J=((A=L.suffix)==null?void 0:A.length)??0,V=P.substring(F+3,P.length-J-1),I=L.suffix||L.prefix?X.substring(F,X.length-J):X;I&&(d[V]=decodeURIComponent(I))}else if(L.kind===2){const P=L,F=n.substring(W+((($=P.prefix)==null?void 0:$.length)??0),n.length-(((Z=P.suffix)==null?void 0:Z.length)??0)),J=decodeURIComponent(F);d["*"]=J,d._splat=J;break}}return i.rawParams&&Object.assign(d,i.rawParams),[d,{part:h,node:g,path:p,segment:m}]}function eS(n){const l=[n];for(;n.parentRoute;)n=n.parentRoute,l.push(n);return l.reverse(),l}function tS(n){const l=Array(n.depth+1);do l[n.depth]=n,n=n.parent;while(n);return l}function aS(n,l,i,r){if(n==="/"&&i.index)return{node:i.index,skipped:0};const o=!Li(l),d=o&&n!=="/",h=l.length-(o?1:0),g=[{node:i,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let p=null,m=null,v=null;for(;g.length;){const x=g.pop(),{node:S,index:j,skipped:N,depth:E,statics:C,dynamics:A,optionals:$}=x;let{extract:Z,rawParams:L,parsedParams:X}=x;if(S.skipOnParamError){if(!rf(n,l,x))continue;L=x.rawParams,Z=x.extract,X=x.parsedParams}r&&S.route&&S.kind!==ns&&_i(m,x)&&(m=x);const W=j===h;if(W&&(S.route&&!d&&_i(v,x)&&(v=x),!S.optional&&!S.wildcard&&!S.index&&!S.pathless))continue;const P=W?void 0:l[j];let F;if(W&&S.index){const J={node:S.index,index:j,skipped:N,depth:E+1,statics:C,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X};let V=!0;if(S.index.skipOnParamError&&(rf(n,l,J)||(V=!1)),V){if(C===h&&!A&&!$&&!N)return J;_i(v,J)&&(v=J)}}if(S.wildcard&&_i(p,x))for(const J of S.wildcard){const{prefix:V,suffix:I}=J;if(V&&(W||!(J.caseSensitive?P:F??(F=P.toLowerCase())).startsWith(V)))continue;if(I){if(W)continue;const le=l.slice(j).join("/").slice(-I.length);if((J.caseSensitive?le:le.toLowerCase())!==I)continue}const se={node:J,index:h,skipped:N,depth:E,statics:C,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X};if(!(J.skipOnParamError&&!rf(n,l,se))){p=se;break}}if(S.optional){const J=N|1<<E,V=E+1;for(let I=S.optional.length-1;I>=0;I--){const se=S.optional[I];g.push({node:se,index:j,skipped:J,depth:V,statics:C,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X})}if(!W)for(let I=S.optional.length-1;I>=0;I--){const se=S.optional[I],{prefix:le,suffix:ue}=se;if(le||ue){const ne=se.caseSensitive?P:F??(F=P.toLowerCase());if(le&&!ne.startsWith(le)||ue&&!ne.endsWith(ue))continue}g.push({node:se,index:j+1,skipped:N,depth:V,statics:C,dynamics:A,optionals:$+1,extract:Z,rawParams:L,parsedParams:X})}}if(!W&&S.dynamic&&P)for(let J=S.dynamic.length-1;J>=0;J--){const V=S.dynamic[J],{prefix:I,suffix:se}=V;if(I||se){const le=V.caseSensitive?P:F??(F=P.toLowerCase());if(I&&!le.startsWith(I)||se&&!le.endsWith(se))continue}g.push({node:V,index:j+1,skipped:N,depth:E+1,statics:C,dynamics:A+1,optionals:$,extract:Z,rawParams:L,parsedParams:X})}if(!W&&S.staticInsensitive){const J=S.staticInsensitive.get(F??(F=P.toLowerCase()));J&&g.push({node:J,index:j+1,skipped:N,depth:E+1,statics:C+1,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X})}if(!W&&S.static){const J=S.static.get(P);J&&g.push({node:J,index:j+1,skipped:N,depth:E+1,statics:C+1,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X})}if(S.pathless){const J=E+1;for(let V=S.pathless.length-1;V>=0;V--){const I=S.pathless[V];g.push({node:I,index:j,skipped:N,depth:J,statics:C,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X})}}}if(v&&p)return _i(p,v)?v:p;if(v)return v;if(p)return p;if(r&&m){let x=m.index;for(let j=0;j<m.index;j++)x+=l[j].length;const S=x===n.length?"/":n.slice(x);return m.rawParams??(m.rawParams=Object.create(null)),m.rawParams["**"]=decodeURIComponent(S),m}return null}function rf(n,l,i){try{const[r,o]=Mg(n,l,i);i.rawParams=r,i.extract=o;const d=i.node.parse(r);return i.parsedParams=Object.assign(Object.create(null),i.parsedParams,d),!0}catch{return null}}function _i(n,l){return n?l.statics>n.statics||l.statics===n.statics&&(l.dynamics>n.dynamics||l.dynamics===n.dynamics&&(l.optionals>n.optionals||l.optionals===n.optionals&&((l.node.kind===ns)>(n.node.kind===ns)||l.node.kind===ns==(n.node.kind===ns)&&l.depth>n.depth))):!0}function vu(n){return kf(n.filter(l=>l!==void 0).join("/"))}function kf(n){return n.replace(/\/{2,}/g,"/")}function Cg(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function Dn(n){const l=n.length;return l>1&&n[l-1]==="/"?n.replace(/\/{1,}$/,""):n}function wg(n){return Dn(Cg(n))}function Eu(n,l){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${l}/`?n.slice(0,-1):n}function nS(n,l,i){return Eu(n,i)===Eu(l,i)}function sS({base:n,to:l,trailingSlash:i="never",cache:r}){const o=l.startsWith("/"),d=!o&&l===".";let h;if(r){h=o?l:d?n:n+"\0"+l;const x=r.get(h);if(x)return x}let g;if(d)g=n.split("/");else if(o)g=l.split("/");else{for(g=n.split("/");g.length>1&&Li(g)==="";)g.pop();const x=l.split("/");for(let S=0,j=x.length;S<j;S++){const N=x[S];N===""?S?S===j-1&&g.push(N):g=[N]:N===".."?g.pop():N==="."||g.push(N)}}g.length>1&&(Li(g)===""?i==="never"&&g.pop():i==="always"&&g.push(""));let p,m="";for(let x=0;x<g.length;x++){x>0&&(m+="/");const S=g[x];if(!S)continue;p=Vf(S,0,p);const j=p[0];if(j===0){m+=S;continue}const N=p[5],E=S.substring(0,p[1]),C=S.substring(p[4],N),A=S.substring(p[2],p[3]);j===1?m+=E||C?`${E}{$${A}}${C}`:`$${A}`:j===2?m+=E||C?`${E}{$}${C}`:"$":m+=`${E}{-$${A}}${C}`}m=kf(m);const v=m||"/";return h&&r&&r.set(h,v),v}function lS(n){const l=new Map(n.map(o=>[encodeURIComponent(o),o])),i=Array.from(l.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(i,"g");return o=>o.replace(r,d=>l.get(d)??d)}function uf(n,l,i){const r=l[n];return typeof r!="string"?r:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>Ty(o,i)).join("/"):Ty(r,i)}function Ey({path:n,params:l,decoder:i,...r}){let o=!1;const d=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:d,isMissingParams:o};if(!n.includes("$"))return{interpolatedPath:n,usedParams:d,isMissingParams:o};const h=n.length;let g=0,p,m="";for(;g<h;){const v=g;p=Vf(n,v,p);const x=p[5];if(g=x+1,v===x)continue;const S=p[0];if(S===0){m+="/"+n.substring(v,x);continue}if(S===2){const j=l._splat;d._splat=j,d["*"]=j;const N=n.substring(v,p[1]),E=n.substring(p[4],x);if(!j){o=!0,(N||E)&&(m+="/"+N+E);continue}const C=uf("_splat",l,i);m+="/"+N+C+E;continue}if(S===1){const j=n.substring(p[2],p[3]);!o&&!(j in l)&&(o=!0),d[j]=l[j];const N=n.substring(v,p[1]),E=n.substring(p[4],x),C=uf(j,l,i)??"undefined";m+="/"+N+C+E;continue}if(S===3){const j=n.substring(p[2],p[3]),N=l[j];if(N==null)continue;d[j]=N;const E=n.substring(v,p[1]),C=n.substring(p[4],x),A=uf(j,l,i)??"";m+="/"+E+A+C;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:d,interpolatedPath:m||"/",isMissingParams:o}}function Ty(n,l){const i=encodeURIComponent(n);return(l==null?void 0:l(i))??i}function St(n){return!!(n!=null&&n.isNotFound)}function iS(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var rS="tsr-scroll-restoration-v1_3";function uS(){const n=iS();if(!n)return null;let l={};try{const r=JSON.parse(n.getItem("tsr-scroll-restoration-v1_3")||"{}");_l(r)&&(l=r)}catch{}return{get state(){return l},set:r=>{l=An(r,l)||l},persist:()=>{try{n.setItem(rS,JSON.stringify(l))}catch{}}}}var My=uS(),cS=n=>n.state.__TSR_key||n.href;function oS(n){const l=[];let i;for(;i=n.parentNode;)l.push(`${n.tagName}:nth-child(${Array.prototype.indexOf.call(i.children,n)+1})`),n=i;return`${l.reverse().join(" > ")}`.toLowerCase()}var yu=!1,Ei="window",Cy="data-scroll-restoration-id";function fS(n,l){if(!My)return;const i=My;if((n.options.scrollRestoration??!1)&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup||!i)return;n.isScrollRestorationSetup=!0,yu=!1;const r=n.options.getScrollRestorationKey||cS,o=new Map;window.history.scrollRestoration="manual";const d=g=>{if(!(yu||!n.isScrollRestoring))if(g.target===document||g.target===window)o.set(Ei,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=g.target;o.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},h=g=>{var m;if(!n.isScrollRestoring||!g||o.size===0||!i)return;const p=(m=i.state)[g]||(m[g]={});for(const[v,x]of o){let S;if(v===Ei)S=Ei;else if(v.isConnected){const j=v.getAttribute(Cy);S=j?`[${Cy}="${j}"]`:oS(v)}S&&(p[S]=x)}};document.addEventListener("scroll",d,!0),n.subscribe("onBeforeLoad",g=>{h(g.fromLocation?r(g.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{h(r(n.stores.resolvedLocation.state??n.stores.location.state)),i.persist()}),n.subscribe("onRendered",g=>{var x;const p=r(g.toLocation),m=n.options.scrollRestorationBehavior,v=n.options.scrollToTopSelectors;if(o.clear(),!n.resetNextScroll){n.resetNextScroll=!0;return}if(!(typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))){yu=!0;try{const S=n.isScrollRestoring?i.state[p]:void 0;let j=!1;if(S)for(const N in S){const E=S[N];if(!_l(E))continue;const{scrollX:C,scrollY:A}=E;if(!(!Number.isFinite(C)||!Number.isFinite(A))){if(N===Ei)window.scrollTo({top:A,left:C,behavior:m}),j=!0;else if(N){let $;try{$=document.querySelector(N)}catch{continue}$&&($.scrollLeft=C,$.scrollTop=A,j=!0)}}}if(!j){const N=n.history.location.hash.slice(1);if(N){const E=((x=window.history.state)==null?void 0:x.__hashScrollIntoViewOptions)??!0;if(E){const C=document.getElementById(N);C&&C.scrollIntoView(E)}}else{const E={top:0,left:0,behavior:m};if(window.scrollTo(E),v)for(const C of v){if(C===Ei)continue;const A=typeof C=="function"?C():document.querySelector(C);A&&A.scrollTo(E)}}}}finally{yu=!1}n.isScrollRestoring&&i.set(S=>(S[p]||(S[p]={}),S))}})}function dS(n,l=String){const i=new URLSearchParams;for(const r in n){const o=n[r];o!==void 0&&i.set(r,l(o))}return i.toString()}function cf(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function hS(n){const l=new URLSearchParams(n),i=Object.create(null);for(const[r,o]of l.entries()){const d=i[r];d==null?i[r]=cf(o):Array.isArray(d)?d.push(cf(o)):i[r]=[d,cf(o)]}return i}var mS=gS(JSON.parse),yS=pS(JSON.stringify,JSON.parse);function gS(n){return l=>{l[0]==="?"&&(l=l.substring(1));const i=hS(l);for(const r in i){const o=i[r];if(typeof o=="string")try{i[r]=n(o)}catch{}}return i}}function pS(n,l){const i=typeof l=="function";function r(o){if(typeof o=="object"&&o!==null)try{return n(o)}catch{}else if(i&&typeof o=="string")try{return l(o),n(o)}catch{}return o}return o=>{const d=dS(o,r);return d?`?${d}`:""}}var ys="__root__";function xS(n){if(n.statusCode=n.statusCode||n.code||307,!n._builtLocation&&!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const l=new Headers(n.headers);n.href&&l.get("Location")===null&&l.set("Location",n.href);const i=new Response(null,{status:n.statusCode,headers:l});if(i.options=n,n.throw)throw i;return i}function At(n){return n instanceof Response&&!!n.options}function vS(n){return{input:({url:l})=>{for(const i of n)l=zf(i,l);return l},output:({url:l})=>{for(let i=n.length-1;i>=0;i--)l=Ag(n[i],l);return l}}}function bS(n){const l=wg(n.basepath),i=`/${l}`,r=`${i}/`,o=n.caseSensitive?i:i.toLowerCase(),d=n.caseSensitive?r:r.toLowerCase();return{input:({url:h})=>{const g=n.caseSensitive?h.pathname:h.pathname.toLowerCase();return g===o?h.pathname="/":g.startsWith(d)&&(h.pathname=h.pathname.slice(i.length)),h},output:({url:h})=>(h.pathname=vu(["/",l,h.pathname]),h)}}function zf(n,l){var r;const i=(r=n==null?void 0:n.input)==null?void 0:r.call(n,{url:l});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return l}function Ag(n,l){var r;const i=(r=n==null?void 0:n.output)==null?void 0:r.call(n,{url:l});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return l}function SS(n,l){const{createMutableStore:i,createReadonlyStore:r,batch:o,init:d}=l,h=new Map,g=new Map,p=new Map,m=i(n.status),v=i(n.loadedAt),x=i(n.isLoading),S=i(n.isTransitioning),j=i(n.location),N=i(n.resolvedLocation),E=i(n.statusCode),C=i(n.redirect),A=i([]),$=i([]),Z=i([]),L=r(()=>of(h,A.state)),X=r(()=>of(g,$.state)),W=r(()=>of(p,Z.state)),P=r(()=>A.state[0]),F=r(()=>A.state.some(Y=>{var te;return((te=h.get(Y))==null?void 0:te.state.status)==="pending"})),J=r(()=>{var Y;return{locationHref:j.state.href,resolvedLocationHref:(Y=N.state)==null?void 0:Y.href,status:m.state}}),V=r(()=>({status:m.state,loadedAt:v.state,isLoading:x.state,isTransitioning:S.state,matches:L.state,location:j.state,resolvedLocation:N.state,statusCode:E.state,redirect:C.state})),I=Bi(64);function se(Y){let te=I.get(Y);return te||(te=r(()=>{const me=A.state;for(const oe of me){const T=h.get(oe);if(T&&T.routeId===Y)return T.state}}),I.set(Y,te)),te}const le={status:m,loadedAt:v,isLoading:x,isTransitioning:S,location:j,resolvedLocation:N,statusCode:E,redirect:C,matchesId:A,pendingMatchesId:$,cachedMatchesId:Z,activeMatchesSnapshot:L,pendingMatchesSnapshot:X,cachedMatchesSnapshot:W,firstMatchId:P,hasPendingMatches:F,matchRouteReactivity:J,activeMatchStoresById:h,pendingMatchStoresById:g,cachedMatchStoresById:p,__store:V,getMatchStoreByRouteId:se,setActiveMatches:ue,setPendingMatches:ne,setCachedMatches:O};ue(n.matches),d==null||d(le);function ue(Y){ff(Y,h,A,i,o)}function ne(Y){ff(Y,g,$,i,o)}function O(Y){ff(Y,p,Z,i,o)}return le}function of(n,l){const i=[];for(const r of l){const o=n.get(r);o&&i.push(o.state)}return i}function ff(n,l,i,r,o){const d=n.map(g=>g.id),h=new Set(d);o(()=>{for(const g of l.keys())h.has(g)||l.delete(g);for(const g of n){const p=l.get(g.id);if(!p){const m=r(g);m.routeId=g.routeId,l.set(g.id,m);continue}p.routeId=g.routeId,p.state!==g&&p.setState(()=>g)}kb(i.state,d)||i.setState(()=>d)})}var Df=n=>{var l;if(!n.rendered)return n.rendered=!0,(l=n.onReady)==null?void 0:l.call(n)},jS=n=>n.stores.matchesId.state.some(l=>{var i;return(i=n.stores.activeMatchStoresById.get(l))==null?void 0:i.state._forcePending}),Du=(n,l)=>!!(n.preload&&!n.router.stores.activeMatchStoresById.has(l)),gs=(n,l,i=!0)=>{const r={...n.router.options.context??{}},o=i?l:l-1;for(let d=0;d<=o;d++){const h=n.matches[d];if(!h)continue;const g=n.router.getMatch(h.id);g&&Object.assign(r,g.__routeContext,g.__beforeLoadContext)}return r},wy=(n,l)=>{if(!n.matches.length)return;const i=l.routeId,r=n.matches.findIndex(h=>h.routeId===n.router.routeTree.id),o=r>=0?r:0;let d=i?n.matches.findIndex(h=>h.routeId===i):n.firstBadMatchIndex??n.matches.length-1;d<0&&(d=o);for(let h=d;h>=0;h--){const g=n.matches[h];if(n.router.looseRoutesById[g.routeId].options.notFoundComponent)return h}return i?d:o},On=(n,l,i)=>{var r,o,d;if(!(!At(i)&&!St(i)))throw At(i)&&i.redirectHandled&&!i.options.reloadDocument||(l&&((r=l._nonReactive.beforeLoadPromise)==null||r.resolve(),(o=l._nonReactive.loaderPromise)==null||o.resolve(),l._nonReactive.beforeLoadPromise=void 0,l._nonReactive.loaderPromise=void 0,l._nonReactive.error=i,n.updateMatch(l.id,h=>({...h,status:At(i)?"redirected":h.status==="pending"?"success":h.status,context:gs(n,l.index),isFetching:!1,error:i})),St(i)&&!i.routeId&&(i.routeId=l.routeId),(d=l._nonReactive.loadPromise)==null||d.resolve()),At(i)&&(n.rendered=!0,i.options._fromLocation=n.location,i.redirectHandled=!0,i=n.router.resolveRedirect(i))),i},Og=(n,l)=>{const i=n.router.getMatch(l);return!!(!i||i._nonReactive.dehydrated)},Ay=(n,l,i)=>{const r=gs(n,i);n.updateMatch(l,o=>({...o,context:r}))},Ti=(n,l,i,r)=>{var g,p;const{id:o,routeId:d}=n.matches[l],h=n.router.looseRoutesById[d];if(i instanceof Promise)throw i;i.routerCode=r,n.firstBadMatchIndex??(n.firstBadMatchIndex=l),On(n,n.router.getMatch(o),i);try{(p=(g=h.options).onError)==null||p.call(g,i)}catch(m){i=m,On(n,n.router.getMatch(o),i)}n.updateMatch(o,m=>{var v,x;return(v=m._nonReactive.beforeLoadPromise)==null||v.resolve(),m._nonReactive.beforeLoadPromise=void 0,(x=m._nonReactive.loadPromise)==null||x.resolve(),{...m,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!n.preload&&!At(i)&&!St(i)&&(n.serialError??(n.serialError=i))},zg=(n,l,i,r)=>{var d;if(r._nonReactive.pendingTimeout!==void 0)return;const o=i.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!Du(n,l)&&(i.options.loader||i.options.beforeLoad||Lg(i))&&typeof o=="number"&&o!==1/0&&(i.options.pendingComponent??((d=n.router.options)==null?void 0:d.defaultPendingComponent))){const h=setTimeout(()=>{Df(n)},o);r._nonReactive.pendingTimeout=h}},NS=(n,l,i)=>{const r=n.router.getMatch(l);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;zg(n,l,i,r);const o=()=>{const d=n.router.getMatch(l);d.preload&&(d.status==="redirected"||d.status==="notFound")&&On(n,d,d.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},RS=(n,l,i,r)=>{const o=n.router.getMatch(l);let d=o._nonReactive.loadPromise;o._nonReactive.loadPromise=El(()=>{d==null||d.resolve(),d=void 0});const{paramsError:h,searchError:g}=o;h&&Ti(n,i,h,"PARSE_PARAMS"),g&&Ti(n,i,g,"VALIDATE_SEARCH"),zg(n,l,r,o);const p=new AbortController;let m=!1;const v=()=>{m||(m=!0,n.updateMatch(l,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:p})))},x=()=>{var L;(L=o._nonReactive.beforeLoadPromise)==null||L.resolve(),o._nonReactive.beforeLoadPromise=void 0,n.updateMatch(l,X=>({...X,isFetching:!1}))};if(!r.options.beforeLoad){n.router.batch(()=>{v(),x()});return}o._nonReactive.beforeLoadPromise=El();const S={...gs(n,i,!1),...o.__routeContext},{search:j,params:N,cause:E}=o,C=Du(n,l),A={search:j,abortController:p,params:N,preload:C,context:S,location:n.location,navigate:L=>n.router.navigate({...L,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:C?"preload":E,matches:n.matches,routeId:r.id,...n.router.options.additionalContext},$=L=>{if(L===void 0){n.router.batch(()=>{v(),x()});return}(At(L)||St(L))&&(v(),Ti(n,i,L,"BEFORE_LOAD")),n.router.batch(()=>{v(),n.updateMatch(l,X=>({...X,__beforeLoadContext:L})),x()})};let Z;try{if(Z=r.options.beforeLoad(A),Ui(Z))return v(),Z.catch(L=>{Ti(n,i,L,"BEFORE_LOAD")}).then($)}catch(L){v(),Ti(n,i,L,"BEFORE_LOAD")}$(Z)},_S=(n,l)=>{const{id:i,routeId:r}=n.matches[l],o=n.router.looseRoutesById[r],d=()=>g(),h=()=>RS(n,i,l,o),g=()=>{if(Og(n,i))return;const p=NS(n,i,o);return Ui(p)?p.then(h):h()};return d()},ES=(n,l,i)=>{var d,h,g,p,m,v;const r=n.router.getMatch(l);if(!r||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const o={ssr:n.router.options.ssr,matches:n.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(h=(d=i.options).head)==null?void 0:h.call(d,o),(p=(g=i.options).scripts)==null?void 0:p.call(g,o),(v=(m=i.options).headers)==null?void 0:v.call(m,o)]).then(([x,S,j])=>({meta:x==null?void 0:x.meta,links:x==null?void 0:x.links,headScripts:x==null?void 0:x.scripts,headers:j,scripts:S,styles:x==null?void 0:x.styles}))},Dg=(n,l,i,r,o)=>{const d=l[r-1],{params:h,loaderDeps:g,abortController:p,cause:m}=n.router.getMatch(i),v=gs(n,r),x=Du(n,i);return{params:h,deps:g,preload:!!x,parentMatchPromise:d,abortController:p,context:v,location:n.location,navigate:S=>n.router.navigate({...S,_fromLocation:n.location}),cause:x?"preload":m,route:o,...n.router.options.additionalContext}},Oy=async(n,l,i,r,o)=>{var d,h,g,p,m;try{const v=n.router.getMatch(i);try{(!(Eg??n.router.isServer)||v.ssr===!0)&&qi(o);const x=o.options.loader,S=typeof x=="function"?x:x==null?void 0:x.handler,j=S==null?void 0:S(Dg(n,l,i,r,o)),N=!!S&&Ui(j);if((N||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||v._nonReactive.minPendingPromise)&&n.updateMatch(i,C=>({...C,isFetching:"loader"})),S){const C=N?await j:j;On(n,n.router.getMatch(i),C),C!==void 0&&n.updateMatch(i,A=>({...A,loaderData:C}))}o._lazyPromise&&await o._lazyPromise;const E=v._nonReactive.minPendingPromise;E&&await E,o._componentsPromise&&await o._componentsPromise,n.updateMatch(i,C=>({...C,error:void 0,context:gs(n,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(x){let S=x;if((S==null?void 0:S.name)==="AbortError"){if(v.abortController.signal.aborted){(d=v._nonReactive.loaderPromise)==null||d.resolve(),v._nonReactive.loaderPromise=void 0;return}n.updateMatch(i,N=>({...N,status:N.status==="pending"?"success":N.status,isFetching:!1,context:gs(n,r)}));return}const j=v._nonReactive.minPendingPromise;j&&await j,St(x)&&await((g=(h=o.options.notFoundComponent)==null?void 0:h.preload)==null?void 0:g.call(h)),On(n,n.router.getMatch(i),x);try{(m=(p=o.options).onError)==null||m.call(p,x)}catch(N){S=N,On(n,n.router.getMatch(i),N)}!At(S)&&!St(S)&&await qi(o,["errorComponent"]),n.updateMatch(i,N=>({...N,error:S,context:gs(n,r),status:"error",isFetching:!1}))}}catch(v){const x=n.router.getMatch(i);x&&(x._nonReactive.loaderPromise=void 0),On(n,x,v)}},TS=async(n,l,i)=>{var j,N,E,C;async function r(A,$,Z,L,X){const W=Date.now()-$.updatedAt,P=A?X.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:X.options.staleTime??n.router.options.defaultStaleTime??0,F=X.options.shouldReload,J=typeof F=="function"?F(Dg(n,l,o,i,X)):F,{status:V,invalid:I}=L,se=W>=P&&(!!n.forceStaleReload||L.cause==="enter"||Z!==void 0&&Z!==L.id);h=V==="success"&&(I||(J??se)),A&&X.options.preload===!1||(h&&!n.sync&&v?(g=!0,(async()=>{var le,ue;try{await Oy(n,l,o,i,X);const ne=n.router.getMatch(o);(le=ne._nonReactive.loaderPromise)==null||le.resolve(),(ue=ne._nonReactive.loadPromise)==null||ue.resolve(),ne._nonReactive.loaderPromise=void 0,ne._nonReactive.loadPromise=void 0}catch(ne){At(ne)&&await n.router.navigate(ne.options)}})()):V!=="success"||h?await Oy(n,l,o,i,X):Ay(n,o,i))}const{id:o,routeId:d}=n.matches[i];let h=!1,g=!1;const p=n.router.looseRoutesById[d],m=p.options.loader,v=((typeof m=="function"||m==null?void 0:m.staleReloadMode)??n.router.options.defaultStaleReloadMode)!=="blocking";if(Og(n,o)){if(!n.router.getMatch(o))return n.matches[i];Ay(n,o,i)}else{const A=n.router.getMatch(o),$=n.router.stores.matchesId.state[i],Z=((j=$&&n.router.stores.activeMatchStoresById.get($)||null)==null?void 0:j.routeId)===d?$:(N=n.router.stores.activeMatchesSnapshot.state.find(X=>X.routeId===d))==null?void 0:N.id,L=Du(n,o);if(A._nonReactive.loaderPromise){if(A.status==="success"&&!n.sync&&!A.preload&&v)return A;await A._nonReactive.loaderPromise;const X=n.router.getMatch(o),W=X._nonReactive.error||X.error;W&&On(n,X,W),X.status==="pending"&&await r(L,A,Z,X,p)}else{const X=L&&!n.router.stores.activeMatchStoresById.has(o),W=n.router.getMatch(o);W._nonReactive.loaderPromise=El(),X!==W.preload&&n.updateMatch(o,P=>({...P,preload:X})),await r(L,A,Z,W,p)}}const x=n.router.getMatch(o);g||((E=x._nonReactive.loaderPromise)==null||E.resolve(),(C=x._nonReactive.loadPromise)==null||C.resolve(),x._nonReactive.loadPromise=void 0),clearTimeout(x._nonReactive.pendingTimeout),x._nonReactive.pendingTimeout=void 0,g||(x._nonReactive.loaderPromise=void 0),x._nonReactive.dehydrated=void 0;const S=g?x.isFetching:!1;return S!==x.isFetching||x.invalid!==!1?(n.updateMatch(o,A=>({...A,isFetching:S,invalid:!1})),n.router.getMatch(o)):x};async function zy(n){var S,j;const l=n,i=[];jS(l.router)&&Df(l);let r;for(let N=0;N<l.matches.length;N++){try{const E=_S(l,N);Ui(E)&&await E}catch(E){if(At(E))throw E;if(St(E))r=E;else if(!l.preload)throw E;break}if(l.serialError)break}const o=l.firstBadMatchIndex??l.matches.length,d=r&&!l.preload?wy(l,r):void 0,h=r&&l.preload?0:d!==void 0?Math.min(d+1,o):o;let g,p;for(let N=0;N<h;N++)i.push(TS(l,i,N));try{await Promise.all(i)}catch{const N=await Promise.allSettled(i);for(const E of N){if(E.status!=="rejected")continue;const C=E.reason;if(At(C))throw C;St(C)?g??(g=C):p??(p=C)}if(p!==void 0)throw p}const m=g??(r&&!l.preload?r:void 0);let v=l.serialError?l.firstBadMatchIndex??0:l.matches.length-1;if(!m&&r&&l.preload)return l.matches;if(m){const N=wy(l,m);N===void 0&&Va();const E=l.matches[N],C=l.router.looseRoutesById[E.routeId],A=(S=l.router.options)==null?void 0:S.defaultNotFoundComponent;!C.options.notFoundComponent&&A&&(C.options.notFoundComponent=A),m.routeId=E.routeId;const $=E.routeId===l.router.routeTree.id;l.updateMatch(E.id,Z=>({...Z,...$?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),v=N,await qi(C,["notFoundComponent"])}else if(!l.preload){const N=l.matches[0];N.globalNotFound||(j=l.router.getMatch(N.id))!=null&&j.globalNotFound&&l.updateMatch(N.id,E=>({...E,globalNotFound:!1,error:void 0}))}if(l.serialError&&l.firstBadMatchIndex!==void 0){const N=l.router.looseRoutesById[l.matches[l.firstBadMatchIndex].routeId];await qi(N,["errorComponent"])}for(let N=0;N<=v;N++){const{id:E,routeId:C}=l.matches[N],A=l.router.looseRoutesById[C];try{const $=ES(l,E,A);if($){const Z=await $;l.updateMatch(E,L=>({...L,...Z}))}}catch($){console.error(`Error executing head for route ${C}:`,$)}}const x=Df(l);if(Ui(x)&&await x,m)throw m;if(l.serialError&&!l.preload&&!l.onReady)throw l.serialError;return l.matches}function Dy(n,l){const i=l.map(r=>{var o,d;return(d=(o=n.options[r])==null?void 0:o.preload)==null?void 0:d.call(o)}).filter(Boolean);if(i.length!==0)return Promise.all(i)}function qi(n,l=bu){!n._lazyLoaded&&n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(r=>{const{id:o,...d}=r.options;Object.assign(n.options,d),n._lazyLoaded=!0,n._lazyPromise=void 0}):n._lazyLoaded=!0);const i=()=>n._componentsLoaded?void 0:l===bu?(()=>{if(n._componentsPromise===void 0){const r=Dy(n,bu);r?n._componentsPromise=r.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():Dy(n,l);return n._lazyPromise?n._lazyPromise.then(i):i()}function Lg(n){var l;for(const i of bu)if((l=n.options[i])!=null&&l.preload)return!0;return!1}var bu=["component","errorComponent","pendingComponent","notFoundComponent"],Ln="__TSR_index",Ly="popstate",Uy="beforeunload";function MS(n){let l=n.getLocation();const i=new Set,r=h=>{l=n.getLocation(),i.forEach(g=>g({location:l,action:h}))},o=h=>{n.notifyOnIndexChange??!0?r(h):l=n.getLocation()},d=async({task:h,navigateOpts:g,...p})=>{var x,S;if((g==null?void 0:g.ignoreBlocker)??!1){h();return}const m=((x=n.getBlockers)==null?void 0:x.call(n))??[],v=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&v)for(const j of m){const N=Tu(p.path,p.state);if(await j.blockerFn({currentLocation:l,nextLocation:N,action:p.type})){(S=n.onBlocked)==null||S.call(n);return}}h()};return{get location(){return l},get length(){return n.getLength()},subscribers:i,subscribe:h=>(i.add(h),()=>{i.delete(h)}),push:(h,g,p)=>{const m=l.state[Ln];g=By(m+1,g),d({task:()=>{n.pushState(h,g),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:g})},replace:(h,g,p)=>{const m=l.state[Ln];g=By(m,g),d({task:()=>{n.replaceState(h,g),r({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:h,state:g})},go:(h,g)=>{d({task:()=>{n.go(h),o({type:"GO",index:h})},navigateOpts:g,type:"GO"})},back:h=>{d({task:()=>{n.back((h==null?void 0:h.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:h,type:"BACK"})},forward:h=>{d({task:()=>{n.forward((h==null?void 0:h.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:h,type:"FORWARD"})},canGoBack:()=>l.state[Ln]!==0,createHref:h=>n.createHref(h),block:h=>{var p;if(!n.setBlockers)return()=>{};const g=((p=n.getBlockers)==null?void 0:p.call(n))??[];return n.setBlockers([...g,h]),()=>{var v,x;const m=((v=n.getBlockers)==null?void 0:v.call(n))??[];(x=n.setBlockers)==null||x.call(n,m.filter(S=>S!==h))}},flush:()=>{var h;return(h=n.flush)==null?void 0:h.call(n)},destroy:()=>{var h;return(h=n.destroy)==null?void 0:h.call(n)},notify:r}}function By(n,l){l||(l={});const i=Zf();return{...l,key:i,__TSR_key:i,[Ln]:n}}function CS(n){var F,J;const l=typeof document<"u"?window:void 0,i=l.history.pushState,r=l.history.replaceState;let o=[];const d=()=>o,h=V=>o=V,g=(V=>V),p=(()=>Tu(`${l.location.pathname}${l.location.search}${l.location.hash}`,l.history.state));if(!((F=l.history.state)!=null&&F.__TSR_key)&&!((J=l.history.state)!=null&&J.key)){const V=Zf();l.history.replaceState({[Ln]:0,key:V,__TSR_key:V},"")}let m=p(),v,x=!1,S=!1,j=!1,N=!1;const E=()=>m;let C,A;const $=()=>{C&&(P._ignoreSubscribers=!0,(C.isPush?l.history.pushState:l.history.replaceState)(C.state,"",C.href),P._ignoreSubscribers=!1,C=void 0,A=void 0,v=void 0)},Z=(V,I,se)=>{const le=g(I);A||(v=m),m=Tu(I,se),C={href:le,state:se,isPush:(C==null?void 0:C.isPush)||V==="push"},A||(A=Promise.resolve().then(()=>$()))},L=V=>{m=p(),P.notify({type:V})},X=async()=>{if(S){S=!1;return}const V=p(),I=V.state[Ln]-m.state[Ln],se=I===1,le=I===-1,ue=!se&&!le||x;x=!1;const ne=ue?"GO":le?"BACK":"FORWARD",O=ue?{type:"GO",index:I}:{type:le?"BACK":"FORWARD"};if(j)j=!1;else{const Y=d();if(typeof document<"u"&&Y.length){for(const te of Y)if(await te.blockerFn({currentLocation:m,nextLocation:V,action:ne})){S=!0,l.history.go(1),P.notify(O);return}}}m=p(),P.notify(O)},W=V=>{if(N){N=!1;return}let I=!1;const se=d();if(typeof document<"u"&&se.length)for(const le of se){const ue=le.enableBeforeUnload??!0;if(ue===!0){I=!0;break}if(typeof ue=="function"&&ue()===!0){I=!0;break}}if(I)return V.preventDefault(),V.returnValue=""},P=MS({getLocation:E,getLength:()=>l.history.length,pushState:(V,I)=>Z("push",V,I),replaceState:(V,I)=>Z("replace",V,I),back:V=>(V&&(j=!0),N=!0,l.history.back()),forward:V=>{V&&(j=!0),N=!0,l.history.forward()},go:V=>{x=!0,l.history.go(V)},createHref:V=>g(V),flush:$,destroy:()=>{l.history.pushState=i,l.history.replaceState=r,l.removeEventListener(Uy,W,{capture:!0}),l.removeEventListener(Ly,X)},onBlocked:()=>{v&&m!==v&&(m=v)},getBlockers:d,setBlockers:h,notifyOnIndexChange:!1});return l.addEventListener(Uy,W,{capture:!0}),l.addEventListener(Ly,X),l.history.pushState=function(...V){const I=i.apply(l.history,V);return P._ignoreSubscribers||L("PUSH"),I},l.history.replaceState=function(...V){const I=r.apply(l.history,V);return P._ignoreSubscribers||L("REPLACE"),I},P}function wS(n){let l=n.replace(/[\x00-\x1f\x7f]/g,"");return l.startsWith("//")&&(l="/"+l.replace(/^\/+/,"")),l}function Tu(n,l){const i=wS(n),r=i.indexOf("#"),o=i.indexOf("?"),d=Zf();return{href:i,pathname:i.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:i.length),hash:r>-1?i.substring(r):"",search:o>-1?i.slice(o,r===-1?void 0:r):"",state:l||{[Ln]:0,key:d,__TSR_key:d}}}function Zf(){return(Math.random()+1).toString(36).substring(7)}function dl(n,l){const i=l,r=n;return{fromLocation:i,toLocation:r,pathChanged:(i==null?void 0:i.pathname)!==r.pathname,hrefChanged:(i==null?void 0:i.href)!==r.href,hashChanged:(i==null?void 0:i.hash)!==r.hash}}var AS=class{constructor(n,l){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=i=>i(),this.update=i=>{var v;const r=this.options,o=this.basepath??(r==null?void 0:r.basepath)??"/",d=this.basepath===void 0,h=r==null?void 0:r.rewrite;if(this.options={...r,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=lS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=CS()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let x;this.resolvePathCache=Bi(1e3),x=this.buildRouteTree(),this.setRoutes(x)}if(!this.stores&&this.latestLocation){const x=this.getStoreConfig(this);this.batch=x.batch,this.stores=SS(zS(this.latestLocation),x),fS(this)}let g=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(d||o!==p||h!==m){this.basepath=p;const x=[],S=wg(p);S&&S!=="/"&&x.push(bS({basepath:p})),m&&x.push(m),this.rewrite=x.length===0?void 0:x.length===1?x[0]:vS(x),this.history&&this.updateLatestLocation(),g=!0}g&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((v=window.CSS)==null?void 0:v.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=Wb(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&$b(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,r)=>{const o={eventType:i,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=i=>{this.subscribers.forEach(r=>{r.eventType===i.type&&r.fn(i)})},this.parseLocation=(i,r)=>{const o=({pathname:p,search:m,hash:v,href:x,state:S})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const A=this.options.parseSearch(m),$=this.options.stringifySearch(A);return{href:p+$+v,publicHref:x,pathname:Ri(p).path,external:!1,searchStr:$,search:ts(r==null?void 0:r.search,A),hash:Ri(v.slice(1)).path,state:Ka(r==null?void 0:r.state,S)}}const j=new URL(x,this.origin),N=zf(this.rewrite,j),E=this.options.parseSearch(N.search),C=this.options.stringifySearch(E);return N.search=C,{href:N.href.replace(N.origin,""),publicHref:x,pathname:Ri(N.pathname).path,external:!!this.rewrite&&N.origin!==this.origin,searchStr:C,search:ts(r==null?void 0:r.search,E),hash:Ri(N.hash.slice(1)).path,state:Ka(r==null?void 0:r.state,S)}},d=o(i),{__tempLocation:h,__tempKey:g}=d.state;if(h&&(!g||g===this.tempLocationKey)){const p=o(h);return p.state.key=d.state.key,p.state.__TSR_key=d.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:d}}return d},this.resolvePathWithBase=(i,r)=>sS({base:i,to:kf(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,r,o)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},o):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>DS({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const r=this.getMatch(i);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(i=>{this.cancelMatch(i)}),this.stores.matchesId.state.forEach(i=>{var o;if(this.stores.pendingMatchStoresById.has(i))return;const r=(o=this.stores.activeMatchStoresById.get(i))==null?void 0:o.state;r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(i)})},this.buildLocation=i=>{const r=(d={})=>{var V,I;const h=d._fromLocation||this.pendingBuiltLocation||this.latestLocation,g=this.matchRoutesLightweight(h);d.from;const p=d.unsafeRelative==="path"?h.pathname:d.from??g.fullPath,m=this.resolvePathWithBase(p,"."),v=g.search,x=Object.assign(Object.create(null),g.params),S=d.to?this.resolvePathWithBase(m,`${d.to}`):this.resolvePathWithBase(m,"."),j=d.params===!1||d.params===null?Object.create(null):(d.params??!0)===!0?x:Object.assign(x,An(d.params,x)),N=this.getMatchedRoutes(S);let E=N.matchedRoutes;if((!N.foundRoute||N.foundRoute.path!=="/"&&N.routeParams["**"])&&this.options.notFoundRoute&&(E=[...E,this.options.notFoundRoute]),Object.keys(j).length>0)for(const se of E){const le=((V=se.options.params)==null?void 0:V.stringify)??se.options.stringifyParams;if(le)try{Object.assign(j,le(j))}catch{}}const C=i.leaveParams?S:Ri(Ey({path:S,params:j,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=v;if(i._includeValidateSearch&&((I=this.options.search)!=null&&I.strict)){const se={};E.forEach(le=>{if(le.options.validateSearch)try{Object.assign(se,Su(le.options.validateSearch,{...se,...A}))}catch{}}),A=se}A=LS({search:A,dest:d,destRoutes:E,_includeValidateSearch:i._includeValidateSearch}),A=ts(v,A);const $=this.options.stringifySearch(A),Z=d.hash===!0?h.hash:d.hash?An(d.hash,h.hash):void 0,L=Z?`#${Z}`:"";let X=d.state===!0?h.state:d.state?An(d.state,h.state):{};X=Ka(h.state,X);const W=`${C}${$}${L}`;let P,F,J=!1;if(this.rewrite){const se=new URL(W,this.origin),le=Ag(this.rewrite,se);P=se.href.replace(se.origin,""),le.origin!==this.origin?(F=le.href,J=!0):F=le.pathname+le.search+le.hash}else P=Xb(W),F=P;return{publicHref:F,href:P,pathname:C,search:A,searchStr:$,state:X,hash:Z??"",external:J,unmaskOnReload:d.unmaskOnReload}},o=(d={},h)=>{const g=r(d);let p=h?r(h):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const v=Pb(g.pathname,this.processedTree);if(v){Object.assign(m,v.rawParams);const{from:x,params:S,...j}=v.route,N=S===!1||S===null?Object.create(null):(S??!0)===!0?m:Object.assign(m,An(S,m));h={from:i.from,...j,params:N},p=r(h)}}}return p&&(g.maskedLocation=p),g};return i.mask?o(i,{from:i.from,...i.mask}):o(i)},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...o})=>{const d=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(v=>{o.state[v]=this.latestLocation.state[v]});const m=ms(o.state,this.latestLocation.state);return p.forEach(v=>{delete o.state[v]}),m},h=Dn(this.latestLocation.href)===Dn(o.href);let g=this.commitLocationPromise;if(this.commitLocationPromise=El(()=>{g==null||g.resolve(),g=void 0}),h&&d())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...v}=o;p&&(v={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...v,search:v.searchStr,state:{...v.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(v.unmaskOnReload??this.options.unmaskOnReload??!1)&&(v.state.__tempKey=this.tempLocationKey)),v.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,this.history[o.replace?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:r,hashScrollIntoView:o,viewTransition:d,ignoreBlocker:h,href:g,...p}={})=>{if(g){const x=this.history.location.state.__TSR_index,S=Tu(g,{__TSR_index:i?x:x+1}),j=new URL(S.pathname,this.origin);p.to=zf(this.rewrite,j).pathname,p.search=this.options.parseSearch(S.search),p.hash=S.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const v=this.commitLocation({...m,viewTransition:d,replace:i,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:h});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),v},this.navigate=async({to:i,reloadDocument:r,href:o,publicHref:d,...h})=>{var p,m;let g=!1;if(o)try{new URL(`${o}`),g=!0}catch{}if(g&&!r&&(r=!0),r){if(i!==void 0||!o){const x=this.buildLocation({to:i,...h});o=o??x.publicHref,d=d??x.publicHref}const v=!g&&d?d:o;if(_u(v,this.protocolAllowlist))return Promise.resolve();if(!h.ignoreBlocker){const x=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const S of x)if(S!=null&&S.blockerFn&&await S.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return h.replace?window.location.replace(v):window.location.href=v,Promise.resolve()}return this.buildAndCommitLocation({...h,href:o,to:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatchesSnapshot.state.filter(o=>!i.some(d=>d.id===o.id));this.batch(()=>{this.stores.status.setState(()=>"pending"),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(i),this.stores.setCachedMatches(r)})},this.load=async i=>{let r,o,d;const h=this.stores.resolvedLocation.state??this.stores.location.state;for(d=new Promise(p=>{this.startTransition(async()=>{var m;try{this.beforeLoad();const v=this.latestLocation,x=this.stores.resolvedLocation.state,S=dl(v,x);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...S}),this.emit({type:"onBeforeLoad",...S}),await zy({router:this,sync:i==null?void 0:i.sync,forceStaleReload:h.href===v.href,matches:this.stores.pendingMatchesSnapshot.state,location:v,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var A,$;let j=null,N=null,E=null,C=null;this.batch(()=>{const Z=this.stores.pendingMatchesSnapshot.state,L=Z.length,X=this.stores.activeMatchesSnapshot.state;j=L?X.filter(F=>!this.stores.pendingMatchStoresById.has(F.id)):null;const W=new Set;for(const F of this.stores.pendingMatchStoresById.values())F.routeId&&W.add(F.routeId);const P=new Set;for(const F of this.stores.activeMatchStoresById.values())F.routeId&&P.add(F.routeId);N=L?X.filter(F=>!W.has(F.routeId)):null,E=L?Z.filter(F=>!P.has(F.routeId)):null,C=L?Z.filter(F=>P.has(F.routeId)):X,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),L&&(this.stores.setActiveMatches(Z),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...j.filter(F=>F.status!=="error"&&F.status!=="notFound"&&F.status!=="redirected")]),this.clearExpiredCache())});for(const[Z,L]of[[N,"onLeave"],[E,"onEnter"],[C,"onStay"]])if(Z)for(const X of Z)($=(A=this.looseRoutesById[X.routeId].options)[L])==null||$.call(A,X)})})}})}catch(v){At(v)?(r=v,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):St(v)&&(o=v);const x=r?r.status:o?404:this.stores.activeMatchesSnapshot.state.some(S=>S.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>x),this.stores.redirect.setState(()=>r)})}this.latestLoadPromise===d&&((m=this.commitLocationPromise)==null||m.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=d,await d;this.latestLoadPromise&&d!==this.latestLoadPromise;)await this.latestLoadPromise;let g;this.hasNotFoundMatch()?g=404:this.stores.activeMatchesSnapshot.state.some(p=>p.status==="error")&&(g=500),g!==void 0&&this.stores.statusCode.setState(()=>g)},this.startViewTransition=i=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const d=this.latestLocation,h=this.stores.resolvedLocation.state,g=typeof r.types=="function"?r.types(dl(d,h)):r.types;if(g===!1){i();return}o={update:i,types:g}}else o=i;document.startViewTransition(o)}else i()},this.updateMatch=(i,r)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStoresById.get(i);if(o){o.setState(r);return}const d=this.stores.activeMatchStoresById.get(i);if(d){d.setState(r);return}const h=this.stores.cachedMatchStoresById.get(i);if(h){const g=r(h.state);g.status==="redirected"?this.stores.cachedMatchStoresById.delete(i)&&this.stores.cachedMatchesId.setState(p=>p.filter(m=>m!==i)):h.setState(()=>g)}})},this.getMatch=i=>{var r,o,d;return((r=this.stores.cachedMatchStoresById.get(i))==null?void 0:r.state)??((o=this.stores.pendingMatchStoresById.get(i))==null?void 0:o.state)??((d=this.stores.activeMatchStoresById.get(i))==null?void 0:d.state)},this.invalidate=i=>{const r=o=>{var d;return((d=i==null?void 0:i.filter)==null?void 0:d.call(i,o))??!0?{...o,invalid:!0,...i!=null&&i.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o};return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(r)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(r)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(r))}),this.shouldViewTransition=!1,this.load({sync:i==null?void 0:i.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const r=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const o=i.options._builtLocation??this.buildLocation(i.options),d=this.getParsedLocationHref(o);i.options.href=d,i.headers.set("Location",d)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const d=o.pathname+o.search+o.hash;i.options.href=d,i.headers.set("Location",d)}}catch{}if(i.options.href&&!i.options._builtLocation&&_u(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const r=i==null?void 0:i.filter;r!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(o=>!r(o))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const i=Date.now(),r=o=>{const d=this.looseRoutesById[o.routeId];if(!d.options.loader)return!0;const h=(o.preload?d.options.preloadGcTime??this.options.defaultPreloadGcTime:d.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:i-o.updatedAt>=h};this.clearCache({filter:r})},this.loadRouteChunk=qi,this.preloadRoute=async i=>{const r=i._builtLocation??this.buildLocation(i);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:i});const d=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),h=new Set([...d,...this.stores.cachedMatchesId.state]),g=o.filter(p=>!h.has(p.id));if(g.length){const p=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...p,...g])}try{return o=await zy({router:this,matches:o,location:r,preload:!0,updateMatch:(p,m)=>{d.has(p)?o=o.map(v=>v.id===p?m(v):v):this.updateMatch(p,m)}}),o}catch(p){if(At(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:r});St(p)||console.error(p);return}},this.matchRoute=(i,r)=>{const o={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},d=this.buildLocation(o);if(r!=null&&r.pending&&this.stores.status.state!=="pending")return!1;const h=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.state:r.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,g=Fb(d.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,h.pathname,this.processedTree);return!g||i.params&&!ms(g.rawParams,i.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?ms(h.search,d.search,{partial:!0})?g.rawParams:!1:g.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(i=>i.status==="notFound"||i.globalNotFound),this.getStoreConfig=l,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??yS,parseSearch:n.parseSearch??mS,protocolAllowlist:n.protocolAllowlist??Vb}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:n,routesByPath:l,processedTree:i}){this.routesById=n,this.routesByPath=l,this.processedTree=i;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(n){return n!=null&&n.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,l){var x,S;const i=this.getMatchedRoutes(n.pathname),{foundRoute:r,routeParams:o,parsedParams:d}=i;let{matchedRoutes:h}=i,g=!1;(r?r.path!=="/"&&o["**"]:Dn(n.pathname))&&(this.options.notFoundRoute?h=[...h,this.options.notFoundRoute]:g=!0);const p=g?BS(this.options.notFoundMode,h):void 0,m=new Array(h.length),v=new Map;for(const j of this.stores.activeMatchStoresById.values())j.routeId&&v.set(j.routeId,j.state);for(let j=0;j<h.length;j++){const N=h[j],E=m[j-1];let C,A,$;{const ne=(E==null?void 0:E.search)??n.search,O=(E==null?void 0:E._strictSearch)??void 0;try{const Y=Su(N.options.validateSearch,{...ne})??void 0;C={...ne,...Y},A={...O,...Y},$=void 0}catch(Y){let te=Y;if(Y instanceof Mu||(te=new Mu(Y.message,{cause:Y})),l!=null&&l.throwOnError)throw te;C=ne,A={},$=te}}const Z=((S=(x=N.options).loaderDeps)==null?void 0:S.call(x,{search:C}))??"",L=Z?JSON.stringify(Z):"",{interpolatedPath:X,usedParams:W}=Ey({path:N.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),P=N.id+X+L,F=this.getMatch(P),J=v.get(N.id),V=(F==null?void 0:F._strictParams)??W;let I;if(!F)try{qy(N,W,d,V)}catch(ne){if(St(ne)||At(ne)?I=ne:I=new OS(ne.message,{cause:ne}),l!=null&&l.throwOnError)throw I}Object.assign(o,V);const se=J?"stay":"enter";let le;if(F)le={...F,cause:se,params:(J==null?void 0:J.params)??o,_strictParams:V,search:ts(J?J.search:F.search,C),_strictSearch:A};else{const ne=N.options.loader||N.options.beforeLoad||N.lazyFn||Lg(N)?"pending":"success";le={id:P,ssr:N.options.ssr,index:j,routeId:N.id,params:(J==null?void 0:J.params)??o,_strictParams:V,pathname:X,updatedAt:Date.now(),search:J?ts(J.search,C):C,_strictSearch:A,searchError:void 0,status:ne,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:El()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:se,loaderDeps:J?Ka(J.loaderDeps,Z):Z,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:N.options.staticData||{},fullPath:N.fullPath}}l!=null&&l.preload||(le.globalNotFound=p===N.id),le.searchError=$;const ue=this.getParentContext(E);le.context={...ue,...le.__routeContext,...le.__beforeLoadContext},m[j]=le}for(let j=0;j<m.length;j++){const N=m[j],E=this.looseRoutesById[N.routeId],C=this.getMatch(N.id),A=v.get(N.routeId);if(N.params=A?ts(A.params,o):o,!C){const $=m[j-1],Z=this.getParentContext($);if(E.options.context){const L={deps:N.loaderDeps,params:N.params,context:Z??{},location:n,navigate:X=>this.navigate({...X,_fromLocation:n}),buildLocation:this.buildLocation,cause:N.cause,abortController:N.abortController,preload:!!N.preload,matches:m,routeId:E.id};N.__routeContext=E.options.context(L)??void 0}N.context={...Z,...N.__routeContext,...N.__beforeLoadContext}}}return m}matchRoutesLightweight(n){var v;const{matchedRoutes:l,routeParams:i,parsedParams:r}=this.getMatchedRoutes(n.pathname),o=Li(l),d={...n.search};for(const x of l)try{Object.assign(d,Su(x.options.validateSearch,d))}catch{}const h=Li(this.stores.matchesId.state),g=h&&((v=this.stores.activeMatchStoresById.get(h))==null?void 0:v.state),p=g&&g.routeId===o.id&&g.pathname===n.pathname;let m;if(p)m=g.params;else{const x=Object.assign(Object.create(null),i);for(const S of l)try{qy(S,i,r??{},x)}catch{}m=x}return{matchedRoutes:l,fullPath:o.fullPath,search:d,params:m}}},Mu=class extends Error{},OS=class extends Error{};function zS(n){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:n,matches:[],statusCode:200}}function Su(n,l){if(n==null)return{};if("~standard"in n){const i=n["~standard"].validate(l);if(i instanceof Promise)throw new Mu("Async validation not supported");if(i.issues)throw new Mu(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in n?n.parse(l):typeof n=="function"?n(l):{}}function DS({pathname:n,routesById:l,processedTree:i}){const r=Object.create(null),o=Dn(n);let d,h;const g=Jb(o,i,!0);return g&&(d=g.route,Object.assign(r,g.rawParams),h=Object.assign(Object.create(null),g.parsedParams)),{matchedRoutes:(g==null?void 0:g.branch)||[l.__root__],routeParams:r,foundRoute:d,parsedParams:h}}function LS({search:n,dest:l,destRoutes:i,_includeValidateSearch:r}){return US(i)(n,l,r??!1)}function US(n){var o;const l={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const d of n){if("search"in d.options)(o=d.options.search)!=null&&o.middlewares&&l.middlewares.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const h=({search:g,next:p})=>{let m=g;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(m=d.options.preSearchFilters.reduce((x,S)=>S(x),g));const v=p(m);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((x,S)=>S(x),v):v};l.middlewares.push(h)}if(d.options.validateSearch){const h=({search:g,next:p})=>{const m=p(g);if(!l._includeValidateSearch)return m;try{return{...m,...Su(d.options.validateSearch,m)??void 0}}catch{return m}};l.middlewares.push(h)}}const i=({search:d})=>{const h=l.dest;return h.search?h.search===!0?d:An(h.search,d):{}};l.middlewares.push(i);const r=(d,h,g)=>{if(d>=g.length)return h;const p=g[d];return p({search:h,next:v=>r(d+1,v,g)})};return function(h,g,p){return l.dest=g,l._includeValidateSearch=p,r(0,h,l.middlewares)}}function BS(n,l){if(n!=="root")for(let i=l.length-1;i>=0;i--){const r=l[i];if(r.children)return r.id}return ys}function qy(n,l,i,r){var d;const o=((d=n.options.params)==null?void 0:d.parse)??n.options.parseParams;if(o)if(n.options.skipRouteOnParseError)for(const h in l)h in i&&(r[h]=i[h]);else{const h=o(r);Object.assign(r,h)}}var qS="Error preloading route! ☝️",Ug=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=l=>{var p,m;this.originalIndex=l.originalIndex;const i=this.options,r=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),r?this._path=ys:this.parentRoute||Va();let o=r?ys:i==null?void 0:i.path;o&&o!=="/"&&(o=Cg(o));const d=(i==null?void 0:i.id)||o;let h=r?ys:vu([this.parentRoute.id==="__root__"?"":this.parentRoute.id,d]);o==="__root__"&&(o="/"),h!=="__root__"&&(h=vu(["/",h]));const g=h==="__root__"?"/":vu([this.parentRoute.fullPath,o]);this._path=o,this._id=h,this._fullPath=g,this._to=Dn(g)},this.addChildren=l=>this._addFileChildren(l),this._addFileChildren=l=>(Array.isArray(l)&&(this.children=l),typeof l=="object"&&l!==null&&(this.children=Object.values(l)),this),this._addFileTypes=()=>this,this.updateLoader=l=>(Object.assign(this.options,l),this),this.update=l=>(Object.assign(this.options,l),this),this.lazy=l=>(this.lazyFn=l,this),this.redirect=l=>xS({from:this.fullPath,...l}),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},HS=class extends Ug{constructor(n){super(n)}};function QS(n){if(typeof document<"u"&&document.querySelector){const l=n.stores.location.state,i=l.state.__hashScrollIntoViewOptions??!0;if(i&&l.hash!==""){const r=document.getElementById(l.hash);r&&r.scrollIntoView(i)}}}function $f(n){const l=n.errorComponent??Pf;return f.jsx(YS,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:i,reset:r})=>i?Q.createElement(l,{error:i,reset:r}):n.children})}var YS=class extends Q.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n){return{resetKey:n.getResetKey()}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidUpdate(n,l){l.error&&l.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(n,l){this.props.onCatch&&this.props.onCatch(n,l)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function Pf({error:n}){const[l,i]=Q.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(r=>!r),children:l?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),l?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?f.jsx("code",{children:n.message}):null})}):null]})}function GS({children:n,fallback:l=null}){return Bg()?f.jsx(Oi.Fragment,{children:n}):f.jsx(Oi.Fragment,{children:l})}function Bg(){return Oi.useSyncExternalStore(KS,()=>!0,()=>!1)}function KS(){return()=>{}}var qg=Q.createContext(null);function pt(n){return Q.useContext(qg)}var Lu=Q.createContext(void 0),VS=Q.createContext(void 0),Ke=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(Ke||{});function XS({update:n,notify:l,unwatched:i}){return{link:r,unlink:o,propagate:d,checkDirty:h,shallowPropagate:g};function r(m,v,x){const S=v.depsTail;if(S!==void 0&&S.dep===m)return;const j=S!==void 0?S.nextDep:v.deps;if(j!==void 0&&j.dep===m){j.version=x,v.depsTail=j;return}const N=m.subsTail;if(N!==void 0&&N.version===x&&N.sub===v)return;const E=v.depsTail=m.subsTail={version:x,dep:m,sub:v,prevDep:S,nextDep:j,prevSub:N,nextSub:void 0};j!==void 0&&(j.prevDep=E),S!==void 0?S.nextDep=E:v.deps=E,N!==void 0?N.nextSub=E:m.subs=E}function o(m,v=m.sub){const x=m.dep,S=m.prevDep,j=m.nextDep,N=m.nextSub,E=m.prevSub;return j!==void 0?j.prevDep=S:v.depsTail=S,S!==void 0?S.nextDep=j:v.deps=j,N!==void 0?N.prevSub=E:x.subsTail=E,E!==void 0?E.nextSub=N:(x.subs=N)===void 0&&i(x),j}function d(m){let v=m.nextSub,x;e:do{const S=m.sub;let j=S.flags;if(j&60?j&12?j&4?!(j&48)&&p(m,S)?(S.flags=j|40,j&=1):j=0:S.flags=j&-9|32:j=0:S.flags=j|32,j&2&&l(S),j&1){const N=S.subs;if(N!==void 0){const E=(m=N).nextSub;E!==void 0&&(x={value:v,prev:x},v=E);continue}}if((m=v)!==void 0){v=m.nextSub;continue}for(;x!==void 0;)if(m=x.value,x=x.prev,m!==void 0){v=m.nextSub;continue e}break}while(!0)}function h(m,v){let x,S=0,j=!1;e:do{const N=m.dep,E=N.flags;if(v.flags&16)j=!0;else if((E&17)===17){if(n(N)){const C=N.subs;C.nextSub!==void 0&&g(C),j=!0}}else if((E&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(x={value:m,prev:x}),m=N.deps,v=N,++S;continue}if(!j){const C=m.nextDep;if(C!==void 0){m=C;continue}}for(;S--;){const C=v.subs,A=C.nextSub!==void 0;if(A?(m=x.value,x=x.prev):m=C,j){if(n(v)){A&&g(C),v=m.sub;continue}j=!1}else v.flags&=-33;v=m.sub;const $=m.nextDep;if($!==void 0){m=$;continue e}}return j}while(!0)}function g(m){do{const v=m.sub,x=v.flags;(x&48)===32&&(v.flags=x|16,(x&6)===2&&l(v))}while((m=m.nextSub)!==void 0)}function p(m,v){let x=v.depsTail;for(;x!==void 0;){if(x===m)return!0;x=x.prevDep}return!1}}function Ff(n,l,i){var d,h,g;const r=typeof n=="object",o=r?n:void 0;return{next:(d=r?n.next:n)==null?void 0:d.bind(o),error:(h=r?n.error:l)==null?void 0:h.bind(o),complete:(g=r?n.complete:i)==null?void 0:g.bind(o)}}const Lf=[];let ju=0;const{link:Hy,unlink:kS,propagate:ZS,checkDirty:Hg,shallowPropagate:Qy}=XS({update(n){return n._update()},notify(n){Lf[Uf++]=n,n.flags&=~Ke.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=Ke.Mutable|Ke.Dirty,Cu(n))}});let gu=0,Uf=0,ma,Bf=0;function Qg(n){try{++Bf,n()}finally{--Bf||Yg()}}function Cu(n){const l=n.depsTail;let i=l!==void 0?l.nextDep:n.deps;for(;i!==void 0;)i=kS(i,n)}function Yg(){if(!(Bf>0)){for(;gu<Uf;){const n=Lf[gu];Lf[gu++]=void 0,n.notify()}gu=0,Uf=0}}function Gg(n,l){const i=typeof n=="function",r=n,o={_snapshot:i?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?Ke.None:Ke.Mutable,get(){return ma!==void 0&&Hy(o,ma,ju),o._snapshot},subscribe(d){const h=Ff(d),g={current:!1},p=$S(()=>{var m;o.get(),g.current?(m=h.next)==null||m.call(h,o._snapshot):g.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(d){const h=ma,g=Object.is;if(i)ma=o,++ju,o.depsTail=void 0;else if(d===void 0)return!1;i&&(o.flags=Ke.Mutable|Ke.RecursedCheck);try{const p=o._snapshot,m=typeof d=="function"?d(p):d===void 0&&i?r(p):d;return p===void 0||!g(p,m)?(o._snapshot=m,!0):!1}finally{ma=h,i&&(o.flags&=~Ke.RecursedCheck),Cu(o)}}};return i?(o.flags=Ke.Mutable|Ke.Dirty,o.get=function(){const d=o.flags;if(d&Ke.Dirty||d&Ke.Pending&&Hg(o.deps,o)){if(o._update()){const h=o.subs;h!==void 0&&Qy(h)}}else d&Ke.Pending&&(o.flags=d&~Ke.Pending);return ma!==void 0&&Hy(o,ma,ju),o._snapshot}):o.set=function(d){if(o._update(d)){const h=o.subs;h!==void 0&&(ZS(h),Qy(h),Yg())}},o}function $S(n){const l=()=>{const r=ma;ma=i,++ju,i.depsTail=void 0,i.flags=Ke.Watching|Ke.RecursedCheck;try{return n()}finally{ma=r,i.flags&=~Ke.RecursedCheck,Cu(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ke.Watching|Ke.RecursedCheck,notify(){const r=this.flags;r&Ke.Dirty||r&Ke.Pending&&Hg(this.deps,this)?l():this.flags=Ke.Watching},stop(){this.flags=Ke.None,this.depsTail=void 0,Cu(this)}};return l(),i}class PS{constructor(l){this.atom=Gg(l)}setState(l){this.atom.set(l)}get state(){return this.atom.get()}get(){return this.state}subscribe(l){return this.atom.subscribe(Ff(l))}}class FS{constructor(l){this.atom=Gg(l)}get state(){return this.atom.get()}get(){return this.state}subscribe(l){return this.atom.subscribe(Ff(l))}}function Yy(n){return typeof n=="function"?new FS(n):new PS(n)}var df={exports:{}},hf={},mf={exports:{}},yf={};/**
|
|
48
|
+
`+s.stack}}var aa=Object.prototype.hasOwnProperty,wl=n.unstable_scheduleCallback,_s=n.unstable_cancelCallback,Lu=n.unstable_shouldYield,$i=n.unstable_requestPaint,Se=n.unstable_now,mt=n.unstable_getCurrentPriorityLevel,ca=n.unstable_ImmediatePriority,Pi=n.unstable_UserBlockingPriority,Fi=n.unstable_NormalPriority,_p=n.unstable_LowPriority,ad=n.unstable_IdlePriority,Ep=n.log,Tp=n.unstable_setDisableYieldValue,Al=null,Ot=null;function $a(e){if(typeof Ep=="function"&&Tp(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(Al,e)}catch{}}var zt=Math.clz32?Math.clz32:wp,Mp=Math.log,Cp=Math.LN2;function wp(e){return e>>>=0,e===0?32:31-(Mp(e)/Cp|0)|0}var Ji=256,Ii=262144,Wi=4194304;function Bn(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 er(e,t,a){var s=e.pendingLanes;if(s===0)return 0;var u=0,c=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var b=s&134217727;return b!==0?(s=b&~c,s!==0?u=Bn(s):(y&=b,y!==0?u=Bn(y):a||(a=b&~e,a!==0&&(u=Bn(a))))):(b=s&~c,b!==0?u=Bn(b):y!==0?u=Bn(y):a||(a=s&~e,a!==0&&(u=Bn(a)))),u===0?0:t!==0&&t!==u&&(t&c)===0&&(c=u&-u,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:u}function Ol(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ap(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 nd(){var e=Wi;return Wi<<=1,(Wi&62914560)===0&&(Wi=4194304),e}function Uu(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function zl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Op(e,t,a,s,u,c){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var b=e.entanglements,R=e.expirationTimes,D=e.hiddenUpdates;for(a=y&~a;0<a;){var H=31-zt(a),k=1<<H;b[H]=0,R[H]=-1;var U=D[H];if(U!==null)for(D[H]=null,H=0;H<U.length;H++){var B=U[H];B!==null&&(B.lane&=-536870913)}a&=~k}s!==0&&sd(e,s,0),c!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=c&~(y&~t))}function sd(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-zt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&261930}function ld(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-zt(a),u=1<<s;u&t|e[s]&t&&(e[s]|=t),a&=~u}}function id(e,t){var a=t&-t;return a=(a&42)!==0?1:Bu(a),(a&(e.suspendedLanes|t))!==0?0:a}function Bu(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 qu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function rd(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:k0(e.type))}function ud(e,t){var a=Y.p;try{return Y.p=e,t()}finally{Y.p=a}}var Pa=Math.random().toString(36).slice(2),rt="__reactFiber$"+Pa,jt="__reactProps$"+Pa,Es="__reactContainer$"+Pa,Hu="__reactEvents$"+Pa,zp="__reactListeners$"+Pa,Dp="__reactHandles$"+Pa,cd="__reactResources$"+Pa,Dl="__reactMarker$"+Pa;function Qu(e){delete e[rt],delete e[jt],delete e[Hu],delete e[zp],delete e[Dp]}function Ts(e){var t=e[rt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Es]||a[rt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=w0(e);e!==null;){if(a=e[rt])return a;e=w0(e)}return t}e=a,a=e.parentNode}return null}function Ms(e){if(e=e[rt]||e[Es]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ll(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Cs(e){var t=e[cd];return t||(t=e[cd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[Dl]=!0}var od=new Set,fd={};function qn(e,t){ws(e,t),ws(e+"Capture",t)}function ws(e,t){for(fd[e]=t,e=0;e<t.length;e++)od.add(t[e])}var Lp=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]*$"),dd={},hd={};function Up(e){return aa.call(hd,e)?!0:aa.call(dd,e)?!1:Lp.test(e)?hd[e]=!0:(dd[e]=!0,!1)}function tr(e,t,a){if(Up(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ar(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ba(e,t,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+s)}}function Kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function md(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Bp(e,t,a){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,c=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(y){a=""+y,c.call(this,y)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yu(e){if(!e._valueTracker){var t=md(e)?"checked":"value";e._valueTracker=Bp(e,t,""+e[t])}}function yd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=md(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function nr(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 qp=/[\n"\\]/g;function Vt(e){return e.replace(qp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gu(e,t,a,s,u,c,y,b){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Kt(t)):e.value!==""+Kt(t)&&(e.value=""+Kt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Ku(e,y,Kt(t)):a!=null?Ku(e,y,Kt(a)):s!=null&&e.removeAttribute("value"),u==null&&c!=null&&(e.defaultChecked=!!c),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Kt(b):e.removeAttribute("name")}function gd(e,t,a,s,u,c,y,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Yu(e);return}a=a!=null?""+Kt(a):"",t=t!=null?""+Kt(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}s=s??u,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=b?e.checked:!!s,e.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Yu(e)}function Ku(e,t,a){t==="number"&&nr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function As(e,t,a,s){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&s&&(e[a].defaultSelected=!0)}else{for(a=""+Kt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,s&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function pd(e,t,a){if(t!=null&&(t=""+Kt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Kt(a):""}function xd(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error(r(92));if(ne(s)){if(1<s.length)throw Error(r(93));s=s[0]}a=s}a==null&&(a=""),t=a}a=Kt(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s),Yu(e)}function Os(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Hp=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 vd(e,t,a){var s=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,a):typeof a!="number"||a===0||Hp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function bd(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var u in t)s=t[u],t.hasOwnProperty(u)&&a[u]!==s&&vd(e,u,s)}else for(var c in t)t.hasOwnProperty(c)&&vd(e,c,t[c])}function Vu(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 Qp=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"]]),Yp=/^[\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 sr(e){return Yp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Sa(){}var Xu=null;function ku(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zs=null,Ds=null;function Sd(e){var t=Ms(e);if(t&&(e=t.stateNode)){var a=e[jt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Vt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var s=a[t];if(s!==e&&s.form===e.form){var u=s[jt]||null;if(!u)throw Error(r(90));Gu(s,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)s=a[t],s.form===e.form&&yd(s)}break e;case"textarea":pd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&As(e,!!a.multiple,t,!1)}}}var Zu=!1;function jd(e,t,a){if(Zu)return e(t,a);Zu=!0;try{var s=e(t);return s}finally{if(Zu=!1,(zs!==null||Ds!==null)&&(Xr(),zs&&(t=zs,e=Ds,Ds=zs=null,Sd(t),e)))for(t=0;t<e.length;t++)Sd(e[t])}}function Ul(e,t){var a=e.stateNode;if(a===null)return null;var s=a[jt]||null;if(s===null)return null;a=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$u=!1;if(ja)try{var Bl={};Object.defineProperty(Bl,"passive",{get:function(){$u=!0}}),window.addEventListener("test",Bl,Bl),window.removeEventListener("test",Bl,Bl)}catch{$u=!1}var Fa=null,Pu=null,lr=null;function Nd(){if(lr)return lr;var e,t=Pu,a=t.length,s,u="value"in Fa?Fa.value:Fa.textContent,c=u.length;for(e=0;e<a&&t[e]===u[e];e++);var y=a-e;for(s=1;s<=y&&t[a-s]===u[c-s];s++);return lr=u.slice(e,1<s?1-s:void 0)}function ir(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 rr(){return!0}function Rd(){return!1}function Nt(e){function t(a,s,u,c,y){this._reactName=a,this._targetInst=u,this.type=s,this.nativeEvent=c,this.target=y,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?rr:Rd,this.isPropagationStopped=Rd,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var Hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ur=Nt(Hn),ql=x({},Hn,{view:0,detail:0}),Gp=Nt(ql),Fu,Ju,Hl,cr=x({},ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wu,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!==Hl&&(Hl&&e.type==="mousemove"?(Fu=e.screenX-Hl.screenX,Ju=e.screenY-Hl.screenY):Ju=Fu=0,Hl=e),Fu)},movementY:function(e){return"movementY"in e?e.movementY:Ju}}),_d=Nt(cr),Kp=x({},cr,{dataTransfer:0}),Vp=Nt(Kp),Xp=x({},ql,{relatedTarget:0}),Iu=Nt(Xp),kp=x({},Hn,{animationName:0,elapsedTime:0,pseudoElement:0}),Zp=Nt(kp),$p=x({},Hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Pp=Nt($p),Fp=x({},Hn,{data:0}),Ed=Nt(Fp),Jp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ip={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"},Wp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ex(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wp[e])?!!t[e]:!1}function Wu(){return ex}var tx=x({},ql,{key:function(e){if(e.key){var t=Jp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ir(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ip[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wu,charCode:function(e){return e.type==="keypress"?ir(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ir(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ax=Nt(tx),nx=x({},cr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=Nt(nx),sx=x({},ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wu}),lx=Nt(sx),ix=x({},Hn,{propertyName:0,elapsedTime:0,pseudoElement:0}),rx=Nt(ix),ux=x({},cr,{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}),cx=Nt(ux),ox=x({},Hn,{newState:0,oldState:0}),fx=Nt(ox),dx=[9,13,27,32],ec=ja&&"CompositionEvent"in window,Ql=null;ja&&"documentMode"in document&&(Ql=document.documentMode);var hx=ja&&"TextEvent"in window&&!Ql,Md=ja&&(!ec||Ql&&8<Ql&&11>=Ql),Cd=" ",wd=!1;function Ad(e,t){switch(e){case"keyup":return dx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Od(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ls=!1;function mx(e,t){switch(e){case"compositionend":return Od(t);case"keypress":return t.which!==32?null:(wd=!0,Cd);case"textInput":return e=t.data,e===Cd&&wd?null:e;default:return null}}function yx(e,t){if(Ls)return e==="compositionend"||!ec&&Ad(e,t)?(e=Nd(),lr=Pu=Fa=null,Ls=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Md&&t.locale!=="ko"?null:t.data;default:return null}}var gx={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 zd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gx[e.type]:t==="textarea"}function Dd(e,t,a,s){zs?Ds?Ds.push(s):Ds=[s]:zs=s,t=Ir(t,"onChange"),0<t.length&&(a=new ur("onChange","change",null,a,s),e.push({event:a,listeners:t}))}var Yl=null,Gl=null;function px(e){g0(e,0)}function or(e){var t=Ll(e);if(yd(t))return e}function Ld(e,t){if(e==="change")return t}var Ud=!1;if(ja){var tc;if(ja){var ac="oninput"in document;if(!ac){var Bd=document.createElement("div");Bd.setAttribute("oninput","return;"),ac=typeof Bd.oninput=="function"}tc=ac}else tc=!1;Ud=tc&&(!document.documentMode||9<document.documentMode)}function qd(){Yl&&(Yl.detachEvent("onpropertychange",Hd),Gl=Yl=null)}function Hd(e){if(e.propertyName==="value"&&or(Gl)){var t=[];Dd(t,Gl,e,ku(e)),jd(px,t)}}function xx(e,t,a){e==="focusin"?(qd(),Yl=t,Gl=a,Yl.attachEvent("onpropertychange",Hd)):e==="focusout"&&qd()}function vx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return or(Gl)}function bx(e,t){if(e==="click")return or(t)}function Sx(e,t){if(e==="input"||e==="change")return or(t)}function jx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:jx;function Kl(e,t){if(Dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var u=a[s];if(!aa.call(t,u)||!Dt(e[u],t[u]))return!1}return!0}function Qd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yd(e,t){var a=Qd(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Qd(a)}}function Gd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=nr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=nr(e.document)}return t}function nc(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 Nx=ja&&"documentMode"in document&&11>=document.documentMode,Us=null,sc=null,Vl=null,lc=!1;function Vd(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;lc||Us==null||Us!==nr(s)||(s=Us,"selectionStart"in s&&nc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Vl&&Kl(Vl,s)||(Vl=s,s=Ir(sc,"onSelect"),0<s.length&&(t=new ur("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=Us)))}function Qn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Bs={animationend:Qn("Animation","AnimationEnd"),animationiteration:Qn("Animation","AnimationIteration"),animationstart:Qn("Animation","AnimationStart"),transitionrun:Qn("Transition","TransitionRun"),transitionstart:Qn("Transition","TransitionStart"),transitioncancel:Qn("Transition","TransitionCancel"),transitionend:Qn("Transition","TransitionEnd")},ic={},Xd={};ja&&(Xd=document.createElement("div").style,"AnimationEvent"in window||(delete Bs.animationend.animation,delete Bs.animationiteration.animation,delete Bs.animationstart.animation),"TransitionEvent"in window||delete Bs.transitionend.transition);function Yn(e){if(ic[e])return ic[e];if(!Bs[e])return e;var t=Bs[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Xd)return ic[e]=t[a];return e}var kd=Yn("animationend"),Zd=Yn("animationiteration"),$d=Yn("animationstart"),Rx=Yn("transitionrun"),_x=Yn("transitionstart"),Ex=Yn("transitioncancel"),Pd=Yn("transitionend"),Fd=new Map,rc="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(" ");rc.push("scrollEnd");function na(e,t){Fd.set(e,t),qn(t,[e])}var fr=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)},Xt=[],qs=0,uc=0;function dr(){for(var e=qs,t=uc=qs=0;t<e;){var a=Xt[t];Xt[t++]=null;var s=Xt[t];Xt[t++]=null;var u=Xt[t];Xt[t++]=null;var c=Xt[t];if(Xt[t++]=null,s!==null&&u!==null){var y=s.pending;y===null?u.next=u:(u.next=y.next,y.next=u),s.pending=u}c!==0&&Jd(a,u,c)}}function hr(e,t,a,s){Xt[qs++]=e,Xt[qs++]=t,Xt[qs++]=a,Xt[qs++]=s,uc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function cc(e,t,a,s){return hr(e,t,a,s),mr(e)}function Gn(e,t){return hr(e,null,null,t),mr(e)}function Jd(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var u=!1,c=e.return;c!==null;)c.childLanes|=a,s=c.alternate,s!==null&&(s.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(u=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,u&&t!==null&&(u=31-zt(a),e=c.hiddenUpdates,s=e[u],s===null?e[u]=[t]:s.push(t),t.lane=a|536870912),c):null}function mr(e){if(50<di)throw di=0,vo=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Hs={};function Tx(e,t,a,s){this.tag=e,this.key=a,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,t,a,s){return new Tx(e,t,a,s)}function oc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Na(e,t){var a=e.alternate;return a===null?(a=Lt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Id(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yr(e,t,a,s,u,c){var y=0;if(s=e,typeof e=="function")oc(e)&&(y=1);else if(typeof e=="string")y=Ov(e,a,q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=Lt(31,a,t,u),e.elementType=J,e.lanes=c,e;case E:return Kn(a.children,u,c,t);case C:y=8,u|=24;break;case A:return e=Lt(12,a,t,u|2),e.elementType=A,e.lanes=c,e;case X:return e=Lt(13,a,t,u),e.elementType=X,e.lanes=c,e;case W:return e=Lt(19,a,t,u),e.elementType=W,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z:y=10;break e;case $:y=9;break e;case L:y=11;break e;case P:y=14;break e;case F:y=16,s=null;break e}y=29,a=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=Lt(y,a,t,u),t.elementType=e,t.type=s,t.lanes=c,t}function Kn(e,t,a,s){return e=Lt(7,e,s,t),e.lanes=a,e}function fc(e,t,a){return e=Lt(6,e,null,t),e.lanes=a,e}function Wd(e){var t=Lt(18,null,null,0);return t.stateNode=e,t}function dc(e,t,a){return t=Lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var eh=new WeakMap;function kt(e,t){if(typeof e=="object"&&e!==null){var a=eh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Rs(t)},eh.set(e,t),t)}return{value:e,source:t,stack:Rs(t)}}var Qs=[],Ys=0,gr=null,Xl=0,Zt=[],$t=0,Ja=null,oa=1,fa="";function Ra(e,t){Qs[Ys++]=Xl,Qs[Ys++]=gr,gr=e,Xl=t}function th(e,t,a){Zt[$t++]=oa,Zt[$t++]=fa,Zt[$t++]=Ja,Ja=e;var s=oa;e=fa;var u=32-zt(s)-1;s&=~(1<<u),a+=1;var c=32-zt(t)+u;if(30<c){var y=u-u%5;c=(s&(1<<y)-1).toString(32),s>>=y,u-=y,oa=1<<32-zt(t)+u|a<<u|s,fa=c+e}else oa=1<<c|a<<u|s,fa=e}function hc(e){e.return!==null&&(Ra(e,1),th(e,1,0))}function mc(e){for(;e===gr;)gr=Qs[--Ys],Qs[Ys]=null,Xl=Qs[--Ys],Qs[Ys]=null;for(;e===Ja;)Ja=Zt[--$t],Zt[$t]=null,fa=Zt[--$t],Zt[$t]=null,oa=Zt[--$t],Zt[$t]=null}function ah(e,t){Zt[$t++]=oa,Zt[$t++]=fa,Zt[$t++]=Ja,oa=t.id,fa=t.overflow,Ja=e}var ut=null,Qe=null,Te=!1,Ia=null,Pt=!1,yc=Error(r(519));function Wa(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw kl(kt(t,e)),yc}function nh(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[rt]=e,t[jt]=s,a){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(a=0;a<mi.length;a++)Ne(mi[a],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),gd(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),xd(t,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||s.suppressHydrationWarning===!0||b0(t.textContent,a)?(s.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),s.onScroll!=null&&Ne("scroll",t),s.onScrollEnd!=null&&Ne("scrollend",t),s.onClick!=null&&(t.onclick=Sa),t=!0):t=!1,t||Wa(e,!0)}function sh(e){for(ut=e.return;ut;)switch(ut.tag){case 5:case 31:case 13:Pt=!1;return;case 27:case 3:Pt=!0;return;default:ut=ut.return}}function Gs(e){if(e!==ut)return!1;if(!Te)return sh(e),Te=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Do(e.type,e.memoizedProps)),a=!a),a&&Qe&&Wa(e),sh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=C0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=C0(e)}else t===27?(t=Qe,mn(e.type)?(e=Ho,Ho=null,Qe=e):Qe=t):Qe=ut?Jt(e.stateNode.nextSibling):null;return!0}function Vn(){Qe=ut=null,Te=!1}function gc(){var e=Ia;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Ia=null),e}function kl(e){Ia===null?Ia=[e]:Ia.push(e)}var pc=T(null),Xn=null,_a=null;function en(e,t,a){ee(pc,t._currentValue),t._currentValue=a}function Ea(e){e._currentValue=pc.current,G(pc)}function xc(e,t,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===a)break;e=e.return}}function vc(e,t,a,s){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var c=u.dependencies;if(c!==null){var y=u.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=u;for(var R=0;R<t.length;R++)if(b.context===t[R]){c.lanes|=a,b=c.alternate,b!==null&&(b.lanes|=a),xc(c.return,a,e),s||(y=null);break e}c=b.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(r(341));y.lanes|=a,c=y.alternate,c!==null&&(c.lanes|=a),xc(y,a,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function Ks(e,t,a,s){e=null;for(var u=t,c=!1;u!==null;){if(!c){if((u.flags&524288)!==0)c=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var b=u.type;Dt(u.pendingProps.value,y.value)||(e!==null?e.push(b):e=[b])}}else if(u===be.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(vi):e=[vi])}u=u.return}e!==null&&vc(t,e,a,s),t.flags|=262144}function pr(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function kn(e){Xn=e,_a=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ct(e){return lh(Xn,e)}function xr(e,t){return Xn===null&&kn(e),lh(e,t)}function lh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},_a===null){if(e===null)throw Error(r(308));_a=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _a=_a.next=t;return a}var Mx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Cx=n.unstable_scheduleCallback,wx=n.unstable_NormalPriority,Ie={$$typeof:Z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bc(){return{controller:new Mx,data:new Map,refCount:0}}function Zl(e){e.refCount--,e.refCount===0&&Cx(wx,function(){e.controller.abort()})}var $l=null,Sc=0,Vs=0,Xs=null;function Ax(e,t){if($l===null){var a=$l=[];Sc=0,Vs=_o(),Xs={status:"pending",value:void 0,then:function(s){a.push(s)}}}return Sc++,t.then(ih,ih),t}function ih(){if(--Sc===0&&$l!==null){Xs!==null&&(Xs.status="fulfilled");var e=$l;$l=null,Vs=0,Xs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ox(e,t){var a=[],s={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(s.status="rejected",s.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),s}var rh=O.S;O.S=function(e,t){Vm=Se(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ax(e,t),rh!==null&&rh(e,t)};var Zn=T(null);function jc(){var e=Zn.current;return e!==null?e:qe.pooledCache}function vr(e,t){t===null?ee(Zn,Zn.current):ee(Zn,t.pool)}function uh(){var e=jc();return e===null?null:{parent:Ie._currentValue,pool:e}}var ks=Error(r(460)),Nc=Error(r(474)),br=Error(r(542)),Sr={then:function(){}};function ch(e){return e=e.status,e==="fulfilled"||e==="rejected"}function oh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Sa,Sa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,dh(e),e;default:if(typeof t.status=="string")t.then(Sa,Sa);else{if(e=qe,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=s}},function(s){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,dh(e),e}throw Pn=t,ks}}function $n(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Pn=a,ks):a}}var Pn=null;function fh(){if(Pn===null)throw Error(r(459));var e=Pn;return Pn=null,e}function dh(e){if(e===ks||e===br)throw Error(r(483))}var Zs=null,Pl=0;function jr(e){var t=Pl;return Pl+=1,Zs===null&&(Zs=[]),oh(Zs,e,t)}function Fl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Nr(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function hh(e){function t(w,M){if(e){var z=w.deletions;z===null?(w.deletions=[M],w.flags|=16):z.push(M)}}function a(w,M){if(!e)return null;for(;M!==null;)t(w,M),M=M.sibling;return null}function s(w){for(var M=new Map;w!==null;)w.key!==null?M.set(w.key,w):M.set(w.index,w),w=w.sibling;return M}function u(w,M){return w=Na(w,M),w.index=0,w.sibling=null,w}function c(w,M,z){return w.index=z,e?(z=w.alternate,z!==null?(z=z.index,z<M?(w.flags|=67108866,M):z):(w.flags|=67108866,M)):(w.flags|=1048576,M)}function y(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function b(w,M,z,K){return M===null||M.tag!==6?(M=fc(z,w.mode,K),M.return=w,M):(M=u(M,z),M.return=w,M)}function R(w,M,z,K){var fe=z.type;return fe===E?H(w,M,z.props.children,K,z.key):M!==null&&(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===F&&$n(fe)===M.type)?(M=u(M,z.props),Fl(M,z),M.return=w,M):(M=yr(z.type,z.key,z.props,null,w.mode,K),Fl(M,z),M.return=w,M)}function D(w,M,z,K){return M===null||M.tag!==4||M.stateNode.containerInfo!==z.containerInfo||M.stateNode.implementation!==z.implementation?(M=dc(z,w.mode,K),M.return=w,M):(M=u(M,z.children||[]),M.return=w,M)}function H(w,M,z,K,fe){return M===null||M.tag!==7?(M=Kn(z,w.mode,K,fe),M.return=w,M):(M=u(M,z),M.return=w,M)}function k(w,M,z){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=fc(""+M,w.mode,z),M.return=w,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case j:return z=yr(M.type,M.key,M.props,null,w.mode,z),Fl(z,M),z.return=w,z;case N:return M=dc(M,w.mode,z),M.return=w,M;case F:return M=$n(M),k(w,M,z)}if(ne(M)||se(M))return M=Kn(M,w.mode,z,null),M.return=w,M;if(typeof M.then=="function")return k(w,jr(M),z);if(M.$$typeof===Z)return k(w,xr(w,M),z);Nr(w,M)}return null}function U(w,M,z,K){var fe=M!==null?M.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return fe!==null?null:b(w,M,""+z,K);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case j:return z.key===fe?R(w,M,z,K):null;case N:return z.key===fe?D(w,M,z,K):null;case F:return z=$n(z),U(w,M,z,K)}if(ne(z)||se(z))return fe!==null?null:H(w,M,z,K,null);if(typeof z.then=="function")return U(w,M,jr(z),K);if(z.$$typeof===Z)return U(w,M,xr(w,z),K);Nr(w,z)}return null}function B(w,M,z,K,fe){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return w=w.get(z)||null,b(M,w,""+K,fe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case j:return w=w.get(K.key===null?z:K.key)||null,R(M,w,K,fe);case N:return w=w.get(K.key===null?z:K.key)||null,D(M,w,K,fe);case F:return K=$n(K),B(w,M,z,K,fe)}if(ne(K)||se(K))return w=w.get(z)||null,H(M,w,K,fe,null);if(typeof K.then=="function")return B(w,M,z,jr(K),fe);if(K.$$typeof===Z)return B(w,M,z,xr(M,K),fe);Nr(M,K)}return null}function ie(w,M,z,K){for(var fe=null,Ce=null,re=M,pe=M=0,_e=null;re!==null&&pe<z.length;pe++){re.index>pe?(_e=re,re=null):_e=re.sibling;var we=U(w,re,z[pe],K);if(we===null){re===null&&(re=_e);break}e&&re&&we.alternate===null&&t(w,re),M=c(we,M,pe),Ce===null?fe=we:Ce.sibling=we,Ce=we,re=_e}if(pe===z.length)return a(w,re),Te&&Ra(w,pe),fe;if(re===null){for(;pe<z.length;pe++)re=k(w,z[pe],K),re!==null&&(M=c(re,M,pe),Ce===null?fe=re:Ce.sibling=re,Ce=re);return Te&&Ra(w,pe),fe}for(re=s(re);pe<z.length;pe++)_e=B(re,w,pe,z[pe],K),_e!==null&&(e&&_e.alternate!==null&&re.delete(_e.key===null?pe:_e.key),M=c(_e,M,pe),Ce===null?fe=_e:Ce.sibling=_e,Ce=_e);return e&&re.forEach(function(vn){return t(w,vn)}),Te&&Ra(w,pe),fe}function he(w,M,z,K){if(z==null)throw Error(r(151));for(var fe=null,Ce=null,re=M,pe=M=0,_e=null,we=z.next();re!==null&&!we.done;pe++,we=z.next()){re.index>pe?(_e=re,re=null):_e=re.sibling;var vn=U(w,re,we.value,K);if(vn===null){re===null&&(re=_e);break}e&&re&&vn.alternate===null&&t(w,re),M=c(vn,M,pe),Ce===null?fe=vn:Ce.sibling=vn,Ce=vn,re=_e}if(we.done)return a(w,re),Te&&Ra(w,pe),fe;if(re===null){for(;!we.done;pe++,we=z.next())we=k(w,we.value,K),we!==null&&(M=c(we,M,pe),Ce===null?fe=we:Ce.sibling=we,Ce=we);return Te&&Ra(w,pe),fe}for(re=s(re);!we.done;pe++,we=z.next())we=B(re,w,pe,we.value,K),we!==null&&(e&&we.alternate!==null&&re.delete(we.key===null?pe:we.key),M=c(we,M,pe),Ce===null?fe=we:Ce.sibling=we,Ce=we);return e&&re.forEach(function(Kv){return t(w,Kv)}),Te&&Ra(w,pe),fe}function Be(w,M,z,K){if(typeof z=="object"&&z!==null&&z.type===E&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case j:e:{for(var fe=z.key;M!==null;){if(M.key===fe){if(fe=z.type,fe===E){if(M.tag===7){a(w,M.sibling),K=u(M,z.props.children),K.return=w,w=K;break e}}else if(M.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===F&&$n(fe)===M.type){a(w,M.sibling),K=u(M,z.props),Fl(K,z),K.return=w,w=K;break e}a(w,M);break}else t(w,M);M=M.sibling}z.type===E?(K=Kn(z.props.children,w.mode,K,z.key),K.return=w,w=K):(K=yr(z.type,z.key,z.props,null,w.mode,K),Fl(K,z),K.return=w,w=K)}return y(w);case N:e:{for(fe=z.key;M!==null;){if(M.key===fe)if(M.tag===4&&M.stateNode.containerInfo===z.containerInfo&&M.stateNode.implementation===z.implementation){a(w,M.sibling),K=u(M,z.children||[]),K.return=w,w=K;break e}else{a(w,M);break}else t(w,M);M=M.sibling}K=dc(z,w.mode,K),K.return=w,w=K}return y(w);case F:return z=$n(z),Be(w,M,z,K)}if(ne(z))return ie(w,M,z,K);if(se(z)){if(fe=se(z),typeof fe!="function")throw Error(r(150));return z=fe.call(z),he(w,M,z,K)}if(typeof z.then=="function")return Be(w,M,jr(z),K);if(z.$$typeof===Z)return Be(w,M,xr(w,z),K);Nr(w,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,M!==null&&M.tag===6?(a(w,M.sibling),K=u(M,z),K.return=w,w=K):(a(w,M),K=fc(z,w.mode,K),K.return=w,w=K),y(w)):a(w,M)}return function(w,M,z,K){try{Pl=0;var fe=Be(w,M,z,K);return Zs=null,fe}catch(re){if(re===ks||re===br)throw re;var Ce=Lt(29,re,null,w.mode);return Ce.lanes=K,Ce.return=w,Ce}finally{}}}var Fn=hh(!0),mh=hh(!1),tn=!1;function Rc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _c(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 an(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function nn(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ae&2)!==0){var u=s.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),s.pending=t,t=mr(e),Jd(e,null,a),t}return hr(e,s,t,a),mr(e)}function Jl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,ld(e,a)}}function Ec(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var u=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?u=c=y:c=c.next=y,a=a.next}while(a!==null);c===null?u=c=t:c=c.next=t}else u=c=t;a={baseState:s.baseState,firstBaseUpdate:u,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Tc=!1;function Il(){if(Tc){var e=Xs;if(e!==null)throw e}}function Wl(e,t,a,s){Tc=!1;var u=e.updateQueue;tn=!1;var c=u.firstBaseUpdate,y=u.lastBaseUpdate,b=u.shared.pending;if(b!==null){u.shared.pending=null;var R=b,D=R.next;R.next=null,y===null?c=D:y.next=D,y=R;var H=e.alternate;H!==null&&(H=H.updateQueue,b=H.lastBaseUpdate,b!==y&&(b===null?H.firstBaseUpdate=D:b.next=D,H.lastBaseUpdate=R))}if(c!==null){var k=u.baseState;y=0,H=D=R=null,b=c;do{var U=b.lane&-536870913,B=U!==b.lane;if(B?(Re&U)===U:(s&U)===U){U!==0&&U===Vs&&(Tc=!0),H!==null&&(H=H.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ie=e,he=b;U=t;var Be=a;switch(he.tag){case 1:if(ie=he.payload,typeof ie=="function"){k=ie.call(Be,k,U);break e}k=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=he.payload,U=typeof ie=="function"?ie.call(Be,k,U):ie,U==null)break e;k=x({},k,U);break e;case 2:tn=!0}}U=b.callback,U!==null&&(e.flags|=64,B&&(e.flags|=8192),B=u.callbacks,B===null?u.callbacks=[U]:B.push(U))}else B={lane:U,tag:b.tag,payload:b.payload,callback:b.callback,next:null},H===null?(D=H=B,R=k):H=H.next=B,y|=U;if(b=b.next,b===null){if(b=u.shared.pending,b===null)break;B=b,b=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);H===null&&(R=k),u.baseState=R,u.firstBaseUpdate=D,u.lastBaseUpdate=H,c===null&&(u.shared.lanes=0),cn|=y,e.lanes=y,e.memoizedState=k}}function yh(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function gh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)yh(a[e],t)}var $s=T(null),Rr=T(0);function ph(e,t){e=La,ee(Rr,e),ee($s,t),La=e|t.baseLanes}function Mc(){ee(Rr,La),ee($s,$s.current)}function Cc(){La=Rr.current,G($s),G(Rr)}var Ut=T(null),Ft=null;function sn(e){var t=e.alternate;ee(Fe,Fe.current&1),ee(Ut,e),Ft===null&&(t===null||$s.current!==null||t.memoizedState!==null)&&(Ft=e)}function wc(e){ee(Fe,Fe.current),ee(Ut,e),Ft===null&&(Ft=e)}function xh(e){e.tag===22?(ee(Fe,Fe.current),ee(Ut,e),Ft===null&&(Ft=e)):ln()}function ln(){ee(Fe,Fe.current),ee(Ut,Ut.current)}function Bt(e){G(Ut),Ft===e&&(Ft=null),G(Fe)}var Fe=T(0);function _r(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Bo(a)||qo(a)))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 Ta=0,ge=null,Le=null,We=null,Er=!1,Ps=!1,Jn=!1,Tr=0,ei=0,Fs=null,zx=0;function ke(){throw Error(r(321))}function Ac(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Dt(e[a],t[a]))return!1;return!0}function Oc(e,t,a,s,u,c){return Ta=c,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?tm:Zc,Jn=!1,c=a(s,u),Jn=!1,Ps&&(c=bh(t,a,s,u)),vh(e),c}function vh(e){O.H=ni;var t=Le!==null&&Le.next!==null;if(Ta=0,We=Le=ge=null,Er=!1,ei=0,Fs=null,t)throw Error(r(300));e===null||et||(e=e.dependencies,e!==null&&pr(e)&&(et=!0))}function bh(e,t,a,s){ge=e;var u=0;do{if(Ps&&(Fs=null),ei=0,Ps=!1,25<=u)throw Error(r(301));if(u+=1,We=Le=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}O.H=am,c=t(a,s)}while(Ps);return c}function Dx(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?ti(t):t,e=e.useState()[0],(Le!==null?Le.memoizedState:null)!==e&&(ge.flags|=1024),t}function zc(){var e=Tr!==0;return Tr=0,e}function Dc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Lc(e){if(Er){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Er=!1}Ta=0,We=Le=ge=null,Ps=!1,ei=Tr=0,Fs=null}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?ge.memoizedState=We=e:We=We.next=e,We}function Je(){if(Le===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=We===null?ge.memoizedState:We.next;if(t!==null)We=t,Le=e;else{if(e===null)throw ge.alternate===null?Error(r(467)):Error(r(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},We===null?ge.memoizedState=We=e:We=We.next=e}return We}function Mr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ti(e){var t=ei;return ei+=1,Fs===null&&(Fs=[]),e=oh(Fs,e,t),t=ge,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?tm:Zc),e}function Cr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ti(e);if(e.$$typeof===Z)return ct(e)}throw Error(r(438,String(e)))}function Uc(e){var t=null,a=ge.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=ge.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Mr(),ge.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),s=0;s<e;s++)a[s]=V;return t.index++,a}function Ma(e,t){return typeof t=="function"?t(e):t}function wr(e){var t=Je();return Bc(t,Le,e)}function Bc(e,t,a){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=a;var u=e.baseQueue,c=s.pending;if(c!==null){if(u!==null){var y=u.next;u.next=c.next,c.next=y}t.baseQueue=u=c,s.pending=null}if(c=e.baseState,u===null)e.memoizedState=c;else{t=u.next;var b=y=null,R=null,D=t,H=!1;do{var k=D.lane&-536870913;if(k!==D.lane?(Re&k)===k:(Ta&k)===k){var U=D.revertLane;if(U===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),k===Vs&&(H=!0);else if((Ta&U)===U){D=D.next,U===Vs&&(H=!0);continue}else k={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},R===null?(b=R=k,y=c):R=R.next=k,ge.lanes|=U,cn|=U;k=D.action,Jn&&a(c,k),c=D.hasEagerState?D.eagerState:a(c,k)}else U={lane:k,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},R===null?(b=R=U,y=c):R=R.next=U,ge.lanes|=k,cn|=k;D=D.next}while(D!==null&&D!==t);if(R===null?y=c:R.next=b,!Dt(c,e.memoizedState)&&(et=!0,H&&(a=Xs,a!==null)))throw a;e.memoizedState=c,e.baseState=y,e.baseQueue=R,s.lastRenderedState=c}return u===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function qc(e){var t=Je(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var s=a.dispatch,u=a.pending,c=t.memoizedState;if(u!==null){a.pending=null;var y=u=u.next;do c=e(c,y.action),y=y.next;while(y!==u);Dt(c,t.memoizedState)||(et=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,s]}function Sh(e,t,a){var s=ge,u=Je(),c=Te;if(c){if(a===void 0)throw Error(r(407));a=a()}else a=t();var y=!Dt((Le||u).memoizedState,a);if(y&&(u.memoizedState=a,et=!0),u=u.queue,Yc(Rh.bind(null,s,u,e),[e]),u.getSnapshot!==t||y||We!==null&&We.memoizedState.tag&1){if(s.flags|=2048,Js(9,{destroy:void 0},Nh.bind(null,s,u,a,t),null),qe===null)throw Error(r(349));c||(Ta&127)!==0||jh(s,t,a)}return a}function jh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ge.updateQueue,t===null?(t=Mr(),ge.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Nh(e,t,a,s){t.value=a,t.getSnapshot=s,_h(t)&&Eh(e)}function Rh(e,t,a){return a(function(){_h(t)&&Eh(e)})}function _h(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Dt(e,a)}catch{return!0}}function Eh(e){var t=Gn(e,2);t!==null&&Mt(t,e,2)}function Hc(e){var t=xt();if(typeof e=="function"){var a=e;if(e=a(),Jn){$a(!0);try{a()}finally{$a(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:e},t}function Th(e,t,a,s){return e.baseState=a,Bc(e,Le,typeof s=="function"?s:Ma)}function Lx(e,t,a,s,u){if(zr(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){c.listeners.push(y)}};O.T!==null?a(!0):c.isTransition=!1,s(c),a=t.pending,a===null?(c.next=t.pending=c,Mh(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Mh(e,t){var a=t.action,s=t.payload,u=e.state;if(t.isTransition){var c=O.T,y={};O.T=y;try{var b=a(u,s),R=O.S;R!==null&&R(y,b),Ch(e,t,b)}catch(D){Qc(e,t,D)}finally{c!==null&&y.types!==null&&(c.types=y.types),O.T=c}}else try{c=a(u,s),Ch(e,t,c)}catch(D){Qc(e,t,D)}}function Ch(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){wh(e,t,s)},function(s){return Qc(e,t,s)}):wh(e,t,a)}function wh(e,t,a){t.status="fulfilled",t.value=a,Ah(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Mh(e,a)))}function Qc(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,Ah(t),t=t.next;while(t!==s)}e.action=null}function Ah(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Oh(e,t){return t}function zh(e,t){if(Te){var a=qe.formState;if(a!==null){e:{var s=ge;if(Te){if(Qe){t:{for(var u=Qe,c=Pt;u.nodeType!==8;){if(!c){u=null;break t}if(u=Jt(u.nextSibling),u===null){u=null;break t}}c=u.data,u=c==="F!"||c==="F"?u:null}if(u){Qe=Jt(u.nextSibling),s=u.data==="F!";break e}}Wa(s)}s=!1}s&&(t=a[0])}}return a=xt(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oh,lastRenderedState:t},a.queue=s,a=Ih.bind(null,ge,s),s.dispatch=a,s=Hc(!1),c=kc.bind(null,ge,!1,s.queue),s=xt(),u={state:t,dispatch:null,action:e,pending:null},s.queue=u,a=Lx.bind(null,ge,u,c,a),u.dispatch=a,s.memoizedState=e,[t,a,!1]}function Dh(e){var t=Je();return Lh(t,Le,e)}function Lh(e,t,a){if(t=Bc(e,t,Oh)[0],e=wr(Ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=ti(t)}catch(y){throw y===ks?br:y}else s=t;t=Je();var u=t.queue,c=u.dispatch;return a!==t.memoizedState&&(ge.flags|=2048,Js(9,{destroy:void 0},Ux.bind(null,u,a),null)),[s,c,e]}function Ux(e,t){e.action=t}function Uh(e){var t=Je(),a=Le;if(a!==null)return Lh(t,a,e);Je(),t=t.memoizedState,a=Je();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function Js(e,t,a,s){return e={tag:e,create:a,deps:s,inst:t,next:null},t=ge.updateQueue,t===null&&(t=Mr(),ge.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,t.lastEffect=e),e}function Bh(){return Je().memoizedState}function Ar(e,t,a,s){var u=xt();ge.flags|=e,u.memoizedState=Js(1|t,{destroy:void 0},a,s===void 0?null:s)}function Or(e,t,a,s){var u=Je();s=s===void 0?null:s;var c=u.memoizedState.inst;Le!==null&&s!==null&&Ac(s,Le.memoizedState.deps)?u.memoizedState=Js(t,c,a,s):(ge.flags|=e,u.memoizedState=Js(1|t,c,a,s))}function qh(e,t){Ar(8390656,8,e,t)}function Yc(e,t){Or(2048,8,e,t)}function Bx(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=Mr(),ge.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Hh(e){var t=Je().memoizedState;return Bx({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Qh(e,t){return Or(4,2,e,t)}function Yh(e,t){return Or(4,4,e,t)}function Gh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kh(e,t,a){a=a!=null?a.concat([e]):null,Or(4,4,Gh.bind(null,t,e),a)}function Gc(){}function Vh(e,t){var a=Je();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&Ac(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function Xh(e,t){var a=Je();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&Ac(t,s[1]))return s[0];if(s=e(),Jn){$a(!0);try{e()}finally{$a(!1)}}return a.memoizedState=[s,t],s}function Kc(e,t,a){return a===void 0||(Ta&1073741824)!==0&&(Re&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=km(),ge.lanes|=e,cn|=e,a)}function kh(e,t,a,s){return Dt(a,t)?a:$s.current!==null?(e=Kc(e,a,s),Dt(e,t)||(et=!0),e):(Ta&42)===0||(Ta&1073741824)!==0&&(Re&261930)===0?(et=!0,e.memoizedState=a):(e=km(),ge.lanes|=e,cn|=e,t)}function Zh(e,t,a,s,u){var c=Y.p;Y.p=c!==0&&8>c?c:8;var y=O.T,b={};O.T=b,kc(e,!1,t,a);try{var R=u(),D=O.S;if(D!==null&&D(b,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var H=Ox(R,s);ai(e,t,H,Qt(e))}else ai(e,t,s,Qt(e))}catch(k){ai(e,t,{then:function(){},status:"rejected",reason:k},Qt())}finally{Y.p=c,y!==null&&b.types!==null&&(y.types=b.types),O.T=y}}function qx(){}function Vc(e,t,a,s){if(e.tag!==5)throw Error(r(476));var u=$h(e).queue;Zh(e,u,t,te,a===null?qx:function(){return Ph(e),a(s)})}function $h(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:te},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ph(e){var t=$h(e);t.next===null&&(t=e.alternate.memoizedState),ai(e,t.next.queue,{},Qt())}function Xc(){return ct(vi)}function Fh(){return Je().memoizedState}function Jh(){return Je().memoizedState}function Hx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Qt();e=an(a);var s=nn(t,e,a);s!==null&&(Mt(s,t,a),Jl(s,t,a)),t={cache:bc()},e.payload=t;return}t=t.return}}function Qx(e,t,a){var s=Qt();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},zr(e)?Wh(t,a):(a=cc(e,t,a,s),a!==null&&(Mt(a,e,s),em(a,t,s)))}function Ih(e,t,a){var s=Qt();ai(e,t,a,s)}function ai(e,t,a,s){var u={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(zr(e))Wh(t,u);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var y=t.lastRenderedState,b=c(y,a);if(u.hasEagerState=!0,u.eagerState=b,Dt(b,y))return hr(e,t,u,0),qe===null&&dr(),!1}catch{}finally{}if(a=cc(e,t,u,s),a!==null)return Mt(a,e,s),em(a,t,s),!0}return!1}function kc(e,t,a,s){if(s={lane:2,revertLane:_o(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},zr(e)){if(t)throw Error(r(479))}else t=cc(e,a,s,2),t!==null&&Mt(t,e,2)}function zr(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Wh(e,t){Ps=Er=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function em(e,t,a){if((a&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,ld(e,a)}}var ni={readContext:ct,use:Cr,useCallback:ke,useContext:ke,useEffect:ke,useImperativeHandle:ke,useLayoutEffect:ke,useInsertionEffect:ke,useMemo:ke,useReducer:ke,useRef:ke,useState:ke,useDebugValue:ke,useDeferredValue:ke,useTransition:ke,useSyncExternalStore:ke,useId:ke,useHostTransitionStatus:ke,useFormState:ke,useActionState:ke,useOptimistic:ke,useMemoCache:ke,useCacheRefresh:ke};ni.useEffectEvent=ke;var tm={readContext:ct,use:Cr,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:qh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ar(4194308,4,Gh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ar(4194308,4,e,t)},useInsertionEffect:function(e,t){Ar(4,2,e,t)},useMemo:function(e,t){var a=xt();t=t===void 0?null:t;var s=e();if(Jn){$a(!0);try{e()}finally{$a(!1)}}return a.memoizedState=[s,t],s},useReducer:function(e,t,a){var s=xt();if(a!==void 0){var u=a(t);if(Jn){$a(!0);try{a(t)}finally{$a(!1)}}}else u=t;return s.memoizedState=s.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},s.queue=e,e=e.dispatch=Qx.bind(null,ge,e),[s.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:function(e){e=Hc(e);var t=e.queue,a=Ih.bind(null,ge,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Gc,useDeferredValue:function(e,t){var a=xt();return Kc(a,e,t)},useTransition:function(){var e=Hc(!1);return e=Zh.bind(null,ge,e.queue,!0,!1),xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var s=ge,u=xt();if(Te){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),qe===null)throw Error(r(349));(Re&127)!==0||jh(s,t,a)}u.memoizedState=a;var c={value:a,getSnapshot:t};return u.queue=c,qh(Rh.bind(null,s,c,e),[e]),s.flags|=2048,Js(9,{destroy:void 0},Nh.bind(null,s,c,a,t),null),a},useId:function(){var e=xt(),t=qe.identifierPrefix;if(Te){var a=fa,s=oa;a=(s&~(1<<32-zt(s)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Tr++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=zx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Xc,useFormState:zh,useActionState:zh,useOptimistic:function(e){var t=xt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=kc.bind(null,ge,!0,a),a.dispatch=t,[e,t]},useMemoCache:Uc,useCacheRefresh:function(){return xt().memoizedState=Hx.bind(null,ge)},useEffectEvent:function(e){var t=xt(),a={impl:e};return t.memoizedState=a,function(){if((Ae&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Zc={readContext:ct,use:Cr,useCallback:Vh,useContext:ct,useEffect:Yc,useImperativeHandle:Kh,useInsertionEffect:Qh,useLayoutEffect:Yh,useMemo:Xh,useReducer:wr,useRef:Bh,useState:function(){return wr(Ma)},useDebugValue:Gc,useDeferredValue:function(e,t){var a=Je();return kh(a,Le.memoizedState,e,t)},useTransition:function(){var e=wr(Ma)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ti(e),t]},useSyncExternalStore:Sh,useId:Fh,useHostTransitionStatus:Xc,useFormState:Dh,useActionState:Dh,useOptimistic:function(e,t){var a=Je();return Th(a,Le,e,t)},useMemoCache:Uc,useCacheRefresh:Jh};Zc.useEffectEvent=Hh;var am={readContext:ct,use:Cr,useCallback:Vh,useContext:ct,useEffect:Yc,useImperativeHandle:Kh,useInsertionEffect:Qh,useLayoutEffect:Yh,useMemo:Xh,useReducer:qc,useRef:Bh,useState:function(){return qc(Ma)},useDebugValue:Gc,useDeferredValue:function(e,t){var a=Je();return Le===null?Kc(a,e,t):kh(a,Le.memoizedState,e,t)},useTransition:function(){var e=qc(Ma)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ti(e),t]},useSyncExternalStore:Sh,useId:Fh,useHostTransitionStatus:Xc,useFormState:Uh,useActionState:Uh,useOptimistic:function(e,t){var a=Je();return Le!==null?Th(a,Le,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Uc,useCacheRefresh:Jh};am.useEffectEvent=Hh;function $c(e,t,a,s){t=e.memoizedState,a=a(s,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Pc={enqueueSetState:function(e,t,a){e=e._reactInternals;var s=Qt(),u=an(s);u.payload=t,a!=null&&(u.callback=a),t=nn(e,u,s),t!==null&&(Mt(t,e,s),Jl(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=Qt(),u=an(s);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=nn(e,u,s),t!==null&&(Mt(t,e,s),Jl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Qt(),s=an(a);s.tag=2,t!=null&&(s.callback=t),t=nn(e,s,a),t!==null&&(Mt(t,e,a),Jl(t,e,a))}};function nm(e,t,a,s,u,c,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,c,y):t.prototype&&t.prototype.isPureReactComponent?!Kl(a,s)||!Kl(u,c):!0}function sm(e,t,a,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,s),t.state!==e&&Pc.enqueueReplaceState(t,t.state,null)}function In(e,t){var a=t;if("ref"in t){a={};for(var s in t)s!=="ref"&&(a[s]=t[s])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function lm(e){fr(e)}function im(e){console.error(e)}function rm(e){fr(e)}function Dr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function um(e,t,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Fc(e,t,a){return a=an(a),a.tag=3,a.payload={element:null},a.callback=function(){Dr(e,t)},a}function cm(e){return e=an(e),e.tag=3,e}function om(e,t,a,s){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var c=s.value;e.payload=function(){return u(c)},e.callback=function(){um(t,a,s)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){um(t,a,s),typeof u!="function"&&(on===null?on=new Set([this]):on.add(this));var b=s.stack;this.componentDidCatch(s.value,{componentStack:b!==null?b:""})})}function Yx(e,t,a,s,u){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&Ks(t,a,u,!0),a=Ut.current,a!==null){switch(a.tag){case 31:case 13:return Ft===null?kr():a.alternate===null&&Ze===0&&(Ze=3),a.flags&=-257,a.flags|=65536,a.lanes=u,s===Sr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),jo(e,s,u)),!1;case 22:return a.flags|=65536,s===Sr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([s]):a.add(s)),jo(e,s,u)),!1}throw Error(r(435,a.tag))}return jo(e,s,u),kr(),!1}if(Te)return t=Ut.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,s!==yc&&(e=Error(r(422),{cause:s}),kl(kt(e,a)))):(s!==yc&&(t=Error(r(423),{cause:s}),kl(kt(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,s=kt(s,a),u=Fc(e.stateNode,s,u),Ec(e,u),Ze!==4&&(Ze=2)),!1;var c=Error(r(520),{cause:s});if(c=kt(c,a),fi===null?fi=[c]:fi.push(c),Ze!==4&&(Ze=2),t===null)return!0;s=kt(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=Fc(a.stateNode,s,e),Ec(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(on===null||!on.has(c))))return a.flags|=65536,u&=-u,a.lanes|=u,u=cm(u),om(u,e,a,s),Ec(a,u),!1}a=a.return}while(a!==null);return!1}var Jc=Error(r(461)),et=!1;function ot(e,t,a,s){t.child=e===null?mh(t,null,a,s):Fn(t,e.child,a,s)}function fm(e,t,a,s,u){a=a.render;var c=t.ref;if("ref"in s){var y={};for(var b in s)b!=="ref"&&(y[b]=s[b])}else y=s;return kn(t),s=Oc(e,t,a,y,c,u),b=zc(),e!==null&&!et?(Dc(e,t,u),Ca(e,t,u)):(Te&&b&&hc(t),t.flags|=1,ot(e,t,s,u),t.child)}function dm(e,t,a,s,u){if(e===null){var c=a.type;return typeof c=="function"&&!oc(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,hm(e,t,c,s,u)):(e=yr(a.type,null,s,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!lo(e,u)){var y=c.memoizedProps;if(a=a.compare,a=a!==null?a:Kl,a(y,s)&&e.ref===t.ref)return Ca(e,t,u)}return t.flags|=1,e=Na(c,s),e.ref=t.ref,e.return=t,t.child=e}function hm(e,t,a,s,u){if(e!==null){var c=e.memoizedProps;if(Kl(c,s)&&e.ref===t.ref)if(et=!1,t.pendingProps=s=c,lo(e,u))(e.flags&131072)!==0&&(et=!0);else return t.lanes=e.lanes,Ca(e,t,u)}return Ic(e,t,a,s,u)}function mm(e,t,a,s){var u=s.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(s=t.child=e.child,u=0;s!==null;)u=u|s.lanes|s.childLanes,s=s.sibling;s=u&~c}else s=0,t.child=null;return ym(e,t,c,a,s)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vr(t,c!==null?c.cachePool:null),c!==null?ph(t,c):Mc(),xh(t);else return s=t.lanes=536870912,ym(e,t,c!==null?c.baseLanes|a:a,a,s)}else c!==null?(vr(t,c.cachePool),ph(t,c),ln(),t.memoizedState=null):(e!==null&&vr(t,null),Mc(),ln());return ot(e,t,u,a),t.child}function si(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ym(e,t,a,s,u){var c=jc();return c=c===null?null:{parent:Ie._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&vr(t,null),Mc(),xh(t),e!==null&&Ks(e,t,s,!0),t.childLanes=u,null}function Lr(e,t){return t=Br({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gm(e,t,a){return Fn(t,e.child,null,a),e=Lr(t,t.pendingProps),e.flags|=2,Bt(t),t.memoizedState=null,e}function Gx(e,t,a){var s=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(s.mode==="hidden")return e=Lr(t,s),t.lanes=536870912,si(null,e);if(wc(t),(e=Qe)?(e=M0(e,Pt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ja!==null?{id:oa,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},a=Wd(e),a.return=t,t.child=a,ut=t,Qe=null)):e=null,e===null)throw Wa(t);return t.lanes=536870912,null}return Lr(t,s)}var c=e.memoizedState;if(c!==null){var y=c.dehydrated;if(wc(t),u)if(t.flags&256)t.flags&=-257,t=gm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(et||Ks(e,t,a,!1),u=(a&e.childLanes)!==0,et||u){if(s=qe,s!==null&&(y=id(s,a),y!==0&&y!==c.retryLane))throw c.retryLane=y,Gn(e,y),Mt(s,e,y),Jc;kr(),t=gm(e,t,a)}else e=c.treeContext,Qe=Jt(y.nextSibling),ut=t,Te=!0,Ia=null,Pt=!1,e!==null&&ah(t,e),t=Lr(t,s),t.flags|=4096;return t}return e=Na(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ur(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Ic(e,t,a,s,u){return kn(t),a=Oc(e,t,a,s,void 0,u),s=zc(),e!==null&&!et?(Dc(e,t,u),Ca(e,t,u)):(Te&&s&&hc(t),t.flags|=1,ot(e,t,a,u),t.child)}function pm(e,t,a,s,u,c){return kn(t),t.updateQueue=null,a=bh(t,s,a,u),vh(e),s=zc(),e!==null&&!et?(Dc(e,t,c),Ca(e,t,c)):(Te&&s&&hc(t),t.flags|=1,ot(e,t,a,c),t.child)}function xm(e,t,a,s,u){if(kn(t),t.stateNode===null){var c=Hs,y=a.contextType;typeof y=="object"&&y!==null&&(c=ct(y)),c=new a(s,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Pc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=s,c.state=t.memoizedState,c.refs={},Rc(t),y=a.contextType,c.context=typeof y=="object"&&y!==null?ct(y):Hs,c.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&($c(t,a,y,s),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(y=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),y!==c.state&&Pc.enqueueReplaceState(c,c.state,null),Wl(t,s,c,u),Il(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,R=In(a,b);c.props=R;var D=c.context,H=a.contextType;y=Hs,typeof H=="object"&&H!==null&&(y=ct(H));var k=a.getDerivedStateFromProps;H=typeof k=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,H||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||D!==y)&&sm(t,c,s,y),tn=!1;var U=t.memoizedState;c.state=U,Wl(t,s,c,u),Il(),D=t.memoizedState,b||U!==D||tn?(typeof k=="function"&&($c(t,a,k,s),D=t.memoizedState),(R=tn||nm(t,a,R,s,U,D,y))?(H||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=D),c.props=s,c.state=D,c.context=y,s=R):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{c=t.stateNode,_c(e,t),y=t.memoizedProps,H=In(a,y),c.props=H,k=t.pendingProps,U=c.context,D=a.contextType,R=Hs,typeof D=="object"&&D!==null&&(R=ct(D)),b=a.getDerivedStateFromProps,(D=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y!==k||U!==R)&&sm(t,c,s,R),tn=!1,U=t.memoizedState,c.state=U,Wl(t,s,c,u),Il();var B=t.memoizedState;y!==k||U!==B||tn||e!==null&&e.dependencies!==null&&pr(e.dependencies)?(typeof b=="function"&&($c(t,a,b,s),B=t.memoizedState),(H=tn||nm(t,a,H,s,U,B,R)||e!==null&&e.dependencies!==null&&pr(e.dependencies))?(D||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,B,R),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,B,R)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=B),c.props=s,c.state=B,c.context=R,s=H):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),s=!1)}return c=s,Ur(e,t),s=(t.flags&128)!==0,c||s?(c=t.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&s?(t.child=Fn(t,e.child,null,u),t.child=Fn(t,null,a,u)):ot(e,t,a,u),t.memoizedState=c.state,e=t.child):e=Ca(e,t,u),e}function vm(e,t,a,s){return Vn(),t.flags|=256,ot(e,t,a,s),t.child}var Wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function eo(e){return{baseLanes:e,cachePool:uh()}}function to(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ht),e}function bm(e,t,a){var s=t.pendingProps,u=!1,c=(t.flags&128)!==0,y;if((y=c)||(y=e!==null&&e.memoizedState===null?!1:(Fe.current&2)!==0),y&&(u=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(u?sn(t):ln(),(e=Qe)?(e=M0(e,Pt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ja!==null?{id:oa,overflow:fa}:null,retryLane:536870912,hydrationErrors:null},a=Wd(e),a.return=t,t.child=a,ut=t,Qe=null)):e=null,e===null)throw Wa(t);return qo(e)?t.lanes=32:t.lanes=536870912,null}var b=s.children;return s=s.fallback,u?(ln(),u=t.mode,b=Br({mode:"hidden",children:b},u),s=Kn(s,u,a,null),b.return=t,s.return=t,b.sibling=s,t.child=b,s=t.child,s.memoizedState=eo(a),s.childLanes=to(e,y,a),t.memoizedState=Wc,si(null,s)):(sn(t),ao(t,b))}var R=e.memoizedState;if(R!==null&&(b=R.dehydrated,b!==null)){if(c)t.flags&256?(sn(t),t.flags&=-257,t=no(e,t,a)):t.memoizedState!==null?(ln(),t.child=e.child,t.flags|=128,t=null):(ln(),b=s.fallback,u=t.mode,s=Br({mode:"visible",children:s.children},u),b=Kn(b,u,a,null),b.flags|=2,s.return=t,b.return=t,s.sibling=b,t.child=s,Fn(t,e.child,null,a),s=t.child,s.memoizedState=eo(a),s.childLanes=to(e,y,a),t.memoizedState=Wc,t=si(null,s));else if(sn(t),qo(b)){if(y=b.nextSibling&&b.nextSibling.dataset,y)var D=y.dgst;y=D,s=Error(r(419)),s.stack="",s.digest=y,kl({value:s,source:null,stack:null}),t=no(e,t,a)}else if(et||Ks(e,t,a,!1),y=(a&e.childLanes)!==0,et||y){if(y=qe,y!==null&&(s=id(y,a),s!==0&&s!==R.retryLane))throw R.retryLane=s,Gn(e,s),Mt(y,e,s),Jc;Bo(b)||kr(),t=no(e,t,a)}else Bo(b)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,Qe=Jt(b.nextSibling),ut=t,Te=!0,Ia=null,Pt=!1,e!==null&&ah(t,e),t=ao(t,s.children),t.flags|=4096);return t}return u?(ln(),b=s.fallback,u=t.mode,R=e.child,D=R.sibling,s=Na(R,{mode:"hidden",children:s.children}),s.subtreeFlags=R.subtreeFlags&65011712,D!==null?b=Na(D,b):(b=Kn(b,u,a,null),b.flags|=2),b.return=t,s.return=t,s.sibling=b,t.child=s,si(null,s),s=t.child,b=e.child.memoizedState,b===null?b=eo(a):(u=b.cachePool,u!==null?(R=Ie._currentValue,u=u.parent!==R?{parent:R,pool:R}:u):u=uh(),b={baseLanes:b.baseLanes|a,cachePool:u}),s.memoizedState=b,s.childLanes=to(e,y,a),t.memoizedState=Wc,si(e.child,s)):(sn(t),a=e.child,e=a.sibling,a=Na(a,{mode:"visible",children:s.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function ao(e,t){return t=Br({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Br(e,t){return e=Lt(22,e,null,t),e.lanes=0,e}function no(e,t,a){return Fn(t,e.child,null,a),e=ao(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sm(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),xc(e.return,t,a)}function so(e,t,a,s,u,c){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:u,treeForkCount:c}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=a,y.tailMode=u,y.treeForkCount=c)}function jm(e,t,a){var s=t.pendingProps,u=s.revealOrder,c=s.tail;s=s.children;var y=Fe.current,b=(y&2)!==0;if(b?(y=y&1|2,t.flags|=128):y&=1,ee(Fe,y),ot(e,t,s,a),s=Te?Xl:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sm(e,a,t);else if(e.tag===19)Sm(e,a,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(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&_r(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),so(t,!1,u,a,c,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&_r(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}so(t,!0,a,null,c,s);break;case"together":so(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ca(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),cn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ks(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=Na(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Na(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function lo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pr(e)))}function Kx(e,t,a){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),en(t,Ie,e.memoizedState.cache),Vn();break;case 27:case 5:ua(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:en(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,wc(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(sn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?bm(e,t,a):(sn(t),e=Ca(e,t,a),e!==null?e.sibling:null);sn(t);break;case 19:var u=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(Ks(e,t,a,!1),s=(a&t.childLanes)!==0),u){if(s)return jm(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ee(Fe,Fe.current),s)break;return null;case 22:return t.lanes=0,mm(e,t,a,t.pendingProps);case 24:en(t,Ie,e.memoizedState.cache)}return Ca(e,t,a)}function Nm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)et=!0;else{if(!lo(e,a)&&(t.flags&128)===0)return et=!1,Kx(e,t,a);et=(e.flags&131072)!==0}else et=!1,Te&&(t.flags&1048576)!==0&&th(t,Xl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=$n(t.elementType),t.type=e,typeof e=="function")oc(e)?(s=In(e,s),t.tag=1,t=xm(null,t,e,s,a)):(t.tag=0,t=Ic(null,t,e,s,a));else{if(e!=null){var u=e.$$typeof;if(u===L){t.tag=11,t=fm(null,t,e,s,a);break e}else if(u===P){t.tag=14,t=dm(null,t,e,s,a);break e}}throw t=ue(e)||e,Error(r(306,t,""))}}return t;case 0:return Ic(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,u=In(s,t.pendingProps),xm(e,t,s,u,a);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var c=t.memoizedState;u=c.element,_c(e,t),Wl(t,s,null,a);var y=t.memoizedState;if(s=y.cache,en(t,Ie,s),s!==c.cache&&vc(t,[Ie],a,!0),Il(),s=y.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=vm(e,t,s,a);break e}else if(s!==u){u=kt(Error(r(424)),t),kl(u),t=vm(e,t,s,a);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(Qe=Jt(e.firstChild),ut=t,Te=!0,Ia=null,Pt=!0,a=mh(t,null,s,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Vn(),s===u){t=Ca(e,t,a);break e}ot(e,t,s,a)}t=t.child}return t;case 26:return Ur(e,t),e===null?(a=D0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Te||(a=t.type,e=t.pendingProps,s=Wr(ve.current).createElement(a),s[rt]=t,s[jt]=e,ft(s,a,e),st(s),t.stateNode=s):t.memoizedState=D0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ua(t),e===null&&Te&&(s=t.stateNode=A0(t.type,t.pendingProps,ve.current),ut=t,Pt=!0,u=Qe,mn(t.type)?(Ho=u,Qe=Jt(s.firstChild)):Qe=u),ot(e,t,t.pendingProps.children,a),Ur(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((u=s=Qe)&&(s=vv(s,t.type,t.pendingProps,Pt),s!==null?(t.stateNode=s,ut=t,Qe=Jt(s.firstChild),Pt=!1,u=!0):u=!1),u||Wa(t)),ua(t),u=t.type,c=t.pendingProps,y=e!==null?e.memoizedProps:null,s=c.children,Do(u,c)?s=null:y!==null&&Do(u,y)&&(t.flags|=32),t.memoizedState!==null&&(u=Oc(e,t,Dx,null,null,a),vi._currentValue=u),Ur(e,t),ot(e,t,s,a),t.child;case 6:return e===null&&Te&&((e=a=Qe)&&(a=bv(a,t.pendingProps,Pt),a!==null?(t.stateNode=a,ut=t,Qe=null,e=!0):e=!1),e||Wa(t)),null;case 13:return bm(e,t,a);case 4:return Pe(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Fn(t,null,s,a):ot(e,t,s,a),t.child;case 11:return fm(e,t,t.type,t.pendingProps,a);case 7:return ot(e,t,t.pendingProps,a),t.child;case 8:return ot(e,t,t.pendingProps.children,a),t.child;case 12:return ot(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.pendingProps,en(t,t.type,s.value),ot(e,t,s.children,a),t.child;case 9:return u=t.type._context,s=t.pendingProps.children,kn(t),u=ct(u),s=s(u),t.flags|=1,ot(e,t,s,a),t.child;case 14:return dm(e,t,t.type,t.pendingProps,a);case 15:return hm(e,t,t.type,t.pendingProps,a);case 19:return jm(e,t,a);case 31:return Gx(e,t,a);case 22:return mm(e,t,a,t.pendingProps);case 24:return kn(t),s=ct(Ie),e===null?(u=jc(),u===null&&(u=qe,c=bc(),u.pooledCache=c,c.refCount++,c!==null&&(u.pooledCacheLanes|=a),u=c),t.memoizedState={parent:s,cache:u},Rc(t),en(t,Ie,u)):((e.lanes&a)!==0&&(_c(e,t),Wl(t,null,null,a),Il()),u=e.memoizedState,c=t.memoizedState,u.parent!==s?(u={parent:s,cache:s},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),en(t,Ie,s)):(s=c.cache,en(t,Ie,s),s!==u.cache&&vc(t,[Ie],a,!0))),ot(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function wa(e){e.flags|=4}function io(e,t,a,s,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Fm())e.flags|=8192;else throw Pn=Sr,Nc}else e.flags&=-16777217}function Rm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!H0(t))if(Fm())e.flags|=8192;else throw Pn=Sr,Nc}function qr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?nd():536870912,e.lanes|=t,tl|=t)}function li(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,s|=u.subtreeFlags&65011712,s|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,s|=u.subtreeFlags,s|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=s,e.childLanes=a,t}function Vx(e,t,a){var s=t.pendingProps;switch(mc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ea(Ie),He(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Gs(t)?wa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gc())),Ye(t),null;case 26:var u=t.type,c=t.memoizedState;return e===null?(wa(t),c!==null?(Ye(t),Rm(t,c)):(Ye(t),io(t,u,null,s,a))):c?c!==e.memoizedState?(wa(t),Ye(t),Rm(t,c)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&wa(t),Ye(t),io(t,u,e,s,a)),null;case 27:if(xa(t),a=ve.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&wa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}e=q.current,Gs(t)?nh(t):(e=A0(u,s,a),t.stateNode=e,wa(t))}return Ye(t),null;case 5:if(xa(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&wa(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return Ye(t),null}if(c=q.current,Gs(t))nh(t);else{var y=Wr(ve.current);switch(c){case 1:c=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:c=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":c=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":c=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":c=y.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?y.createElement(u,{is:s.is}):y.createElement(u)}}c[rt]=t,c[jt]=s;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)c.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=c;e:switch(ft(c,u,s),u){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&wa(t)}}return Ye(t),io(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&wa(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=ve.current,Gs(t)){if(e=t.stateNode,a=t.memoizedProps,s=null,u=ut,u!==null)switch(u.tag){case 27:case 5:s=u.memoizedProps}e[rt]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||b0(e.nodeValue,a)),e||Wa(t,!0)}else e=Wr(e).createTextNode(s),e[rt]=t,t.stateNode=e}return Ye(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(s=Gs(t),a!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[rt]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else a=gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Bt(t),t):(Bt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ye(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Gs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[rt]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),u=!1}else u=gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Bt(t),t):(Bt(t),null)}return Bt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=s!==null,e=e!==null&&e.memoizedState!==null,a&&(s=t.child,u=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(u=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==u&&(s.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),qr(t,t.updateQueue),Ye(t),null);case 4:return He(),e===null&&Co(t.stateNode.containerInfo),Ye(t),null;case 10:return Ea(t.type),Ye(t),null;case 19:if(G(Fe),s=t.memoizedState,s===null)return Ye(t),null;if(u=(t.flags&128)!==0,c=s.rendering,c===null)if(u)li(s,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=_r(e),c!==null){for(t.flags|=128,li(s,!1),e=c.updateQueue,t.updateQueue=e,qr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Id(a,e),a=a.sibling;return ee(Fe,Fe.current&1|2),Te&&Ra(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Se()>Kr&&(t.flags|=128,u=!0,li(s,!1),t.lanes=4194304)}else{if(!u)if(e=_r(c),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,qr(t,e),li(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Te)return Ye(t),null}else 2*Se()-s.renderingStartTime>Kr&&a!==536870912&&(t.flags|=128,u=!0,li(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(e=s.last,e!==null?e.sibling=c:t.child=c,s.last=c)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Se(),e.sibling=null,a=Fe.current,ee(Fe,u?a&1|2:a&1),Te&&Ra(t,s.treeForkCount),e):(Ye(t),null);case 22:case 23:return Bt(t),Cc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(a&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),a=t.updateQueue,a!==null&&qr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==a&&(t.flags|=2048),e!==null&&G(Zn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ea(Ie),Ye(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Xx(e,t){switch(mc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ea(Ie),He(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xa(t),null;case 31:if(t.memoizedState!==null){if(Bt(t),t.alternate===null)throw Error(r(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Bt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Fe),null;case 4:return He(),null;case 10:return Ea(t.type),null;case 22:case 23:return Bt(t),Cc(),e!==null&&G(Zn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ea(Ie),null;case 25:return null;default:return null}}function _m(e,t){switch(mc(t),t.tag){case 3:Ea(Ie),He();break;case 26:case 27:case 5:xa(t);break;case 4:He();break;case 31:t.memoizedState!==null&&Bt(t);break;case 13:Bt(t);break;case 19:G(Fe);break;case 10:Ea(t.type);break;case 22:case 23:Bt(t),Cc(),e!==null&&G(Zn);break;case 24:Ea(Ie)}}function ii(e,t){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var u=s.next;a=u;do{if((a.tag&e)===e){s=void 0;var c=a.create,y=a.inst;s=c(),y.destroy=s}a=a.next}while(a!==u)}}catch(b){De(t,t.return,b)}}function rn(e,t,a){try{var s=t.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var c=u.next;s=c;do{if((s.tag&e)===e){var y=s.inst,b=y.destroy;if(b!==void 0){y.destroy=void 0,u=t;var R=a,D=b;try{D()}catch(H){De(u,R,H)}}}s=s.next}while(s!==c)}}catch(H){De(t,t.return,H)}}function Em(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{gh(t,a)}catch(s){De(e,e.return,s)}}}function Tm(e,t,a){a.props=In(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){De(e,t,s)}}function ri(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(u){De(e,t,u)}}function da(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(u){De(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){De(e,t,u)}else a.current=null}function Mm(e){var t=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(u){De(e,e.return,u)}}function ro(e,t,a){try{var s=e.stateNode;hv(s,e.type,a,t),s[jt]=t}catch(u){De(e,e.return,u)}}function Cm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&mn(e.type)||e.tag===4}function uo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cm(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&&mn(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 co(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Sa));else if(s!==4&&(s===27&&mn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(co(e,t,a),e=e.sibling;e!==null;)co(e,t,a),e=e.sibling}function Hr(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(s!==4&&(s===27&&mn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Hr(e,t,a),e=e.sibling;e!==null;)Hr(e,t,a),e=e.sibling}function wm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);ft(t,s,a),t[rt]=e,t[jt]=a}catch(c){De(e,e.return,c)}}var Aa=!1,tt=!1,oo=!1,Am=typeof WeakSet=="function"?WeakSet:Set,lt=null;function kx(e,t){if(e=e.containerInfo,Oo=iu,e=Kd(e),nc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var u=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var y=0,b=-1,R=-1,D=0,H=0,k=e,U=null;t:for(;;){for(var B;k!==a||u!==0&&k.nodeType!==3||(b=y+u),k!==c||s!==0&&k.nodeType!==3||(R=y+s),k.nodeType===3&&(y+=k.nodeValue.length),(B=k.firstChild)!==null;)U=k,k=B;for(;;){if(k===e)break t;if(U===a&&++D===u&&(b=y),U===c&&++H===s&&(R=y),(B=k.nextSibling)!==null)break;k=U,U=k.parentNode}k=B}a=b===-1||R===-1?null:{start:b,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(zo={focusedElem:e,selectionRange:a},iu=!1,lt=t;lt!==null;)if(t=lt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,lt=e;else for(;lt!==null;){switch(t=lt,c=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(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,u=c.memoizedProps,c=c.memoizedState,s=a.stateNode;try{var ie=In(a.type,u);e=s.getSnapshotBeforeUpdate(ie,c),s.__reactInternalSnapshotBeforeUpdate=e}catch(he){De(a,a.return,he)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Uo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Uo(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,lt=e;break}lt=t.return}}function Om(e,t,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:za(e,a),s&4&&ii(5,a);break;case 1:if(za(e,a),s&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){De(a,a.return,y)}else{var u=In(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){De(a,a.return,y)}}s&64&&Em(a),s&512&&ri(a,a.return);break;case 3:if(za(e,a),s&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{gh(e,t)}catch(y){De(a,a.return,y)}}break;case 27:t===null&&s&4&&wm(a);case 26:case 5:za(e,a),t===null&&s&4&&Mm(a),s&512&&ri(a,a.return);break;case 12:za(e,a);break;case 31:za(e,a),s&4&&Lm(e,a);break;case 13:za(e,a),s&4&&Um(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=tv.bind(null,a),Sv(e,a))));break;case 22:if(s=a.memoizedState!==null||Aa,!s){t=t!==null&&t.memoizedState!==null||tt,u=Aa;var c=tt;Aa=s,(tt=t)&&!c?Da(e,a,(a.subtreeFlags&8772)!==0):za(e,a),Aa=u,tt=c}break;case 30:break;default:za(e,a)}}function zm(e){var t=e.alternate;t!==null&&(e.alternate=null,zm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Qu(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 Ge=null,Rt=!1;function Oa(e,t,a){for(a=a.child;a!==null;)Dm(e,t,a),a=a.sibling}function Dm(e,t,a){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Al,a)}catch{}switch(a.tag){case 26:tt||da(a,t),Oa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:tt||da(a,t);var s=Ge,u=Rt;mn(a.type)&&(Ge=a.stateNode,Rt=!1),Oa(e,t,a),gi(a.stateNode),Ge=s,Rt=u;break;case 5:tt||da(a,t);case 6:if(s=Ge,u=Rt,Ge=null,Oa(e,t,a),Ge=s,Rt=u,Ge!==null)if(Rt)try{(Ge.nodeType===9?Ge.body:Ge.nodeName==="HTML"?Ge.ownerDocument.body:Ge).removeChild(a.stateNode)}catch(c){De(a,t,c)}else try{Ge.removeChild(a.stateNode)}catch(c){De(a,t,c)}break;case 18:Ge!==null&&(Rt?(e=Ge,E0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),cl(e)):E0(Ge,a.stateNode));break;case 4:s=Ge,u=Rt,Ge=a.stateNode.containerInfo,Rt=!0,Oa(e,t,a),Ge=s,Rt=u;break;case 0:case 11:case 14:case 15:rn(2,a,t),tt||rn(4,a,t),Oa(e,t,a);break;case 1:tt||(da(a,t),s=a.stateNode,typeof s.componentWillUnmount=="function"&&Tm(a,t,s)),Oa(e,t,a);break;case 21:Oa(e,t,a);break;case 22:tt=(s=tt)||a.memoizedState!==null,Oa(e,t,a),tt=s;break;default:Oa(e,t,a)}}function Lm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{cl(e)}catch(a){De(t,t.return,a)}}}function Um(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{cl(e)}catch(a){De(t,t.return,a)}}function Zx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Am),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Am),t;default:throw Error(r(435,e.tag))}}function Qr(e,t){var a=Zx(e);t.forEach(function(s){if(!a.has(s)){a.add(s);var u=av.bind(null,e,s);s.then(u,u)}})}function _t(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var u=a[s],c=e,y=t,b=y;e:for(;b!==null;){switch(b.tag){case 27:if(mn(b.type)){Ge=b.stateNode,Rt=!1;break e}break;case 5:Ge=b.stateNode,Rt=!1;break e;case 3:case 4:Ge=b.stateNode.containerInfo,Rt=!0;break e}b=b.return}if(Ge===null)throw Error(r(160));Dm(c,y,u),Ge=null,Rt=!1,c=u.alternate,c!==null&&(c.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bm(t,e),t=t.sibling}var sa=null;function Bm(e,t){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_t(t,e),Et(e),s&4&&(rn(3,e,e.return),ii(3,e),rn(5,e,e.return));break;case 1:_t(t,e),Et(e),s&512&&(tt||a===null||da(a,a.return)),s&64&&Aa&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var u=sa;if(_t(t,e),Et(e),s&512&&(tt||a===null||da(a,a.return)),s&4){var c=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(s){case"title":c=u.getElementsByTagName("title")[0],(!c||c[Dl]||c[rt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=u.createElement(s),u.head.insertBefore(c,u.querySelector("head > title"))),ft(c,s,a),c[rt]=e,st(c),s=c;break e;case"link":var y=B0("link","href",u).get(s+(a.href||""));if(y){for(var b=0;b<y.length;b++)if(c=y[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(b,1);break t}}c=u.createElement(s),ft(c,s,a),u.head.appendChild(c);break;case"meta":if(y=B0("meta","content",u).get(s+(a.content||""))){for(b=0;b<y.length;b++)if(c=y[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(b,1);break t}}c=u.createElement(s),ft(c,s,a),u.head.appendChild(c);break;default:throw Error(r(468,s))}c[rt]=e,st(c),s=c}e.stateNode=s}else q0(u,e.type,e.stateNode);else e.stateNode=U0(u,s,e.memoizedProps);else c!==s?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,s===null?q0(u,e.type,e.stateNode):U0(u,s,e.memoizedProps)):s===null&&e.stateNode!==null&&ro(e,e.memoizedProps,a.memoizedProps)}break;case 27:_t(t,e),Et(e),s&512&&(tt||a===null||da(a,a.return)),a!==null&&s&4&&ro(e,e.memoizedProps,a.memoizedProps);break;case 5:if(_t(t,e),Et(e),s&512&&(tt||a===null||da(a,a.return)),e.flags&32){u=e.stateNode;try{Os(u,"")}catch(ie){De(e,e.return,ie)}}s&4&&e.stateNode!=null&&(u=e.memoizedProps,ro(e,u,a!==null?a.memoizedProps:u)),s&1024&&(oo=!0);break;case 6:if(_t(t,e),Et(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(ie){De(e,e.return,ie)}}break;case 3:if(au=null,u=sa,sa=eu(t.containerInfo),_t(t,e),sa=u,Et(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{cl(t.containerInfo)}catch(ie){De(e,e.return,ie)}oo&&(oo=!1,qm(e));break;case 4:s=sa,sa=eu(e.stateNode.containerInfo),_t(t,e),Et(e),sa=s;break;case 12:_t(t,e),Et(e);break;case 31:_t(t,e),Et(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qr(e,s)));break;case 13:_t(t,e),Et(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Gr=Se()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qr(e,s)));break;case 22:u=e.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,D=Aa,H=tt;if(Aa=D||u,tt=H||R,_t(t,e),tt=H,Aa=D,Et(e),s&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||R||Aa||tt||Wn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){R=a=t;try{if(c=R.stateNode,u)y=c.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{b=R.stateNode;var k=R.memoizedProps.style,U=k!=null&&k.hasOwnProperty("display")?k.display:null;b.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ie){De(R,R.return,ie)}}}else if(t.tag===6){if(a===null){R=t;try{R.stateNode.nodeValue=u?"":R.memoizedProps}catch(ie){De(R,R.return,ie)}}}else if(t.tag===18){if(a===null){R=t;try{var B=R.stateNode;u?T0(B,!0):T0(R.stateNode,!1)}catch(ie){De(R,R.return,ie)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Qr(e,a))));break;case 19:_t(t,e),Et(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qr(e,s)));break;case 30:break;case 21:break;default:_t(t,e),Et(e)}}function Et(e){var t=e.flags;if(t&2){try{for(var a,s=e.return;s!==null;){if(Cm(s)){a=s;break}s=s.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var u=a.stateNode,c=uo(e);Hr(e,c,u);break;case 5:var y=a.stateNode;a.flags&32&&(Os(y,""),a.flags&=-33);var b=uo(e);Hr(e,b,y);break;case 3:case 4:var R=a.stateNode.containerInfo,D=uo(e);co(e,D,R);break;default:throw Error(r(161))}}catch(H){De(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function za(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Om(e,t.alternate,t),t=t.sibling}function Wn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:rn(4,t,t.return),Wn(t);break;case 1:da(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Tm(t,t.return,a),Wn(t);break;case 27:gi(t.stateNode);case 26:case 5:da(t,t.return),Wn(t);break;case 22:t.memoizedState===null&&Wn(t);break;case 30:Wn(t);break;default:Wn(t)}e=e.sibling}}function Da(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,u=e,c=t,y=c.flags;switch(c.tag){case 0:case 11:case 15:Da(u,c,a),ii(4,c);break;case 1:if(Da(u,c,a),s=c,u=s.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(D){De(s,s.return,D)}if(s=c,u=s.updateQueue,u!==null){var b=s.stateNode;try{var R=u.shared.hiddenCallbacks;if(R!==null)for(u.shared.hiddenCallbacks=null,u=0;u<R.length;u++)yh(R[u],b)}catch(D){De(s,s.return,D)}}a&&y&64&&Em(c),ri(c,c.return);break;case 27:wm(c);case 26:case 5:Da(u,c,a),a&&s===null&&y&4&&Mm(c),ri(c,c.return);break;case 12:Da(u,c,a);break;case 31:Da(u,c,a),a&&y&4&&Lm(u,c);break;case 13:Da(u,c,a),a&&y&4&&Um(u,c);break;case 22:c.memoizedState===null&&Da(u,c,a),ri(c,c.return);break;case 30:break;default:Da(u,c,a)}t=t.sibling}}function fo(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Zl(a))}function ho(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zl(e))}function la(e,t,a,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hm(e,t,a,s),t=t.sibling}function Hm(e,t,a,s){var u=t.flags;switch(t.tag){case 0:case 11:case 15:la(e,t,a,s),u&2048&&ii(9,t);break;case 1:la(e,t,a,s);break;case 3:la(e,t,a,s),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zl(e)));break;case 12:if(u&2048){la(e,t,a,s),e=t.stateNode;try{var c=t.memoizedProps,y=c.id,b=c.onPostCommit;typeof b=="function"&&b(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){De(t,t.return,R)}}else la(e,t,a,s);break;case 31:la(e,t,a,s);break;case 13:la(e,t,a,s);break;case 23:break;case 22:c=t.stateNode,y=t.alternate,t.memoizedState!==null?c._visibility&2?la(e,t,a,s):ui(e,t):c._visibility&2?la(e,t,a,s):(c._visibility|=2,Is(e,t,a,s,(t.subtreeFlags&10256)!==0||!1)),u&2048&&fo(y,t);break;case 24:la(e,t,a,s),u&2048&&ho(t.alternate,t);break;default:la(e,t,a,s)}}function Is(e,t,a,s,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,y=t,b=a,R=s,D=y.flags;switch(y.tag){case 0:case 11:case 15:Is(c,y,b,R,u),ii(8,y);break;case 23:break;case 22:var H=y.stateNode;y.memoizedState!==null?H._visibility&2?Is(c,y,b,R,u):ui(c,y):(H._visibility|=2,Is(c,y,b,R,u)),u&&D&2048&&fo(y.alternate,y);break;case 24:Is(c,y,b,R,u),u&&D&2048&&ho(y.alternate,y);break;default:Is(c,y,b,R,u)}t=t.sibling}}function ui(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,s=t,u=s.flags;switch(s.tag){case 22:ui(a,s),u&2048&&fo(s.alternate,s);break;case 24:ui(a,s),u&2048&&ho(s.alternate,s);break;default:ui(a,s)}t=t.sibling}}var ci=8192;function Ws(e,t,a){if(e.subtreeFlags&ci)for(e=e.child;e!==null;)Qm(e,t,a),e=e.sibling}function Qm(e,t,a){switch(e.tag){case 26:Ws(e,t,a),e.flags&ci&&e.memoizedState!==null&&zv(a,sa,e.memoizedState,e.memoizedProps);break;case 5:Ws(e,t,a);break;case 3:case 4:var s=sa;sa=eu(e.stateNode.containerInfo),Ws(e,t,a),sa=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=ci,ci=16777216,Ws(e,t,a),ci=s):Ws(e,t,a));break;default:Ws(e,t,a)}}function Ym(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 oi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];lt=s,Km(s,e)}Ym(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gm(e),e=e.sibling}function Gm(e){switch(e.tag){case 0:case 11:case 15:oi(e),e.flags&2048&&rn(9,e,e.return);break;case 3:oi(e);break;case 12:oi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Yr(e)):oi(e);break;default:oi(e)}}function Yr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a];lt=s,Km(s,e)}Ym(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:rn(8,t,t.return),Yr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Yr(t));break;default:Yr(t)}e=e.sibling}}function Km(e,t){for(;lt!==null;){var a=lt;switch(a.tag){case 0:case 11:case 15:rn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Zl(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,lt=s;else e:for(a=e;lt!==null;){s=lt;var u=s.sibling,c=s.return;if(zm(s),s===a){lt=null;break e}if(u!==null){u.return=c,lt=u;break e}lt=c}}}var $x={getCacheForType:function(e){var t=ct(Ie),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return ct(Ie).controller.signal}},Px=typeof WeakMap=="function"?WeakMap:Map,Ae=0,qe=null,je=null,Re=0,ze=0,qt=null,un=!1,el=!1,mo=!1,La=0,Ze=0,cn=0,es=0,yo=0,Ht=0,tl=0,fi=null,Tt=null,go=!1,Gr=0,Vm=0,Kr=1/0,Vr=null,on=null,at=0,fn=null,al=null,Ua=0,po=0,xo=null,Xm=null,di=0,vo=null;function Qt(){return(Ae&2)!==0&&Re!==0?Re&-Re:O.T!==null?_o():rd()}function km(){if(Ht===0)if((Re&536870912)===0||Te){var e=Ii;Ii<<=1,(Ii&3932160)===0&&(Ii=262144),Ht=e}else Ht=536870912;return e=Ut.current,e!==null&&(e.flags|=32),Ht}function Mt(e,t,a){(e===qe&&(ze===2||ze===9)||e.cancelPendingCommit!==null)&&(nl(e,0),dn(e,Re,Ht,!1)),zl(e,a),((Ae&2)===0||e!==qe)&&(e===qe&&((Ae&2)===0&&(es|=a),Ze===4&&dn(e,Re,Ht,!1)),ha(e))}function Zm(e,t,a){if((Ae&6)!==0)throw Error(r(327));var s=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ol(e,t),u=s?Ix(e,t):So(e,t,!0),c=s;do{if(u===0){el&&!s&&dn(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!Fx(a)){u=So(e,t,!1),c=!1;continue}if(u===2){if(c=t,e.errorRecoveryDisabledLanes&c)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var b=e;u=fi;var R=b.current.memoizedState.isDehydrated;if(R&&(nl(b,y).flags|=256),y=So(b,y,!1),y!==2){if(mo&&!R){b.errorRecoveryDisabledLanes|=c,es|=c,u=4;break e}c=Tt,Tt=u,c!==null&&(Tt===null?Tt=c:Tt.push.apply(Tt,c))}u=y}if(c=!1,u!==2)continue}}if(u===1){nl(e,0),dn(e,t,0,!0);break}e:{switch(s=e,c=u,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:dn(s,t,Ht,!un);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=Gr+300-Se(),10<u)){if(dn(s,t,Ht,!un),er(s,0,!0)!==0)break e;Ua=t,s.timeoutHandle=R0($m.bind(null,s,a,Tt,Vr,go,t,Ht,es,tl,un,c,"Throttled",-0,0),u);break e}$m(s,a,Tt,Vr,go,t,Ht,es,tl,un,c,null,-0,0)}}break}while(!0);ha(e)}function $m(e,t,a,s,u,c,y,b,R,D,H,k,U,B){if(e.timeoutHandle=-1,k=t.subtreeFlags,k&8192||(k&16785408)===16785408){k={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Sa},Qm(t,c,k);var ie=(c&62914560)===c?Gr-Se():(c&4194048)===c?Vm-Se():0;if(ie=Dv(k,ie),ie!==null){Ua=c,e.cancelPendingCommit=ie(a0.bind(null,e,t,c,a,s,u,y,b,R,H,k,null,U,B)),dn(e,c,y,!D);return}}a0(e,t,c,a,s,u,y,b,R)}function Fx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var u=a[s],c=u.getSnapshot;u=u.value;try{if(!Dt(c(),u))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 dn(e,t,a,s){t&=~yo,t&=~es,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var u=t;0<u;){var c=31-zt(u),y=1<<c;s[c]=-1,u&=~y}a!==0&&sd(e,a,t)}function Xr(){return(Ae&6)===0?(hi(0),!1):!0}function bo(){if(je!==null){if(ze===0)var e=je.return;else e=je,_a=Xn=null,Lc(e),Zs=null,Pl=0,e=je;for(;e!==null;)_m(e.alternate,e),e=e.return;je=null}}function nl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,gv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ua=0,bo(),qe=e,je=a=Na(e.current,null),Re=t,ze=0,qt=null,un=!1,el=Ol(e,t),mo=!1,tl=Ht=yo=es=cn=Ze=0,Tt=fi=null,go=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var u=31-zt(s),c=1<<u;t|=e[u],s&=~c}return La=t,dr(),a}function Pm(e,t){ge=null,O.H=ni,t===ks||t===br?(t=fh(),ze=3):t===Nc?(t=fh(),ze=4):ze=t===Jc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qt=t,je===null&&(Ze=1,Dr(e,kt(t,e.current)))}function Fm(){var e=Ut.current;return e===null?!0:(Re&4194048)===Re?Ft===null:(Re&62914560)===Re||(Re&536870912)!==0?e===Ft:!1}function Jm(){var e=O.H;return O.H=ni,e===null?ni:e}function Im(){var e=O.A;return O.A=$x,e}function kr(){Ze=4,un||(Re&4194048)!==Re&&Ut.current!==null||(el=!0),(cn&134217727)===0&&(es&134217727)===0||qe===null||dn(qe,Re,Ht,!1)}function So(e,t,a){var s=Ae;Ae|=2;var u=Jm(),c=Im();(qe!==e||Re!==t)&&(Vr=null,nl(e,t)),t=!1;var y=Ze;e:do try{if(ze!==0&&je!==null){var b=je,R=qt;switch(ze){case 8:bo(),y=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(t=!0);var D=ze;if(ze=0,qt=null,sl(e,b,R,D),a&&el){y=0;break e}break;default:D=ze,ze=0,qt=null,sl(e,b,R,D)}}Jx(),y=Ze;break}catch(H){Pm(e,H)}while(!0);return t&&e.shellSuspendCounter++,_a=Xn=null,Ae=s,O.H=u,O.A=c,je===null&&(qe=null,Re=0,dr()),y}function Jx(){for(;je!==null;)Wm(je)}function Ix(e,t){var a=Ae;Ae|=2;var s=Jm(),u=Im();qe!==e||Re!==t?(Vr=null,Kr=Se()+500,nl(e,t)):el=Ol(e,t);e:do try{if(ze!==0&&je!==null){t=je;var c=qt;t:switch(ze){case 1:ze=0,qt=null,sl(e,t,c,1);break;case 2:case 9:if(ch(c)){ze=0,qt=null,e0(t);break}t=function(){ze!==2&&ze!==9||qe!==e||(ze=7),ha(e)},c.then(t,t);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:ch(c)?(ze=0,qt=null,e0(t)):(ze=0,qt=null,sl(e,t,c,7));break;case 5:var y=null;switch(je.tag){case 26:y=je.memoizedState;case 5:case 27:var b=je;if(y?H0(y):b.stateNode.complete){ze=0,qt=null;var R=b.sibling;if(R!==null)je=R;else{var D=b.return;D!==null?(je=D,Zr(D)):je=null}break t}}ze=0,qt=null,sl(e,t,c,5);break;case 6:ze=0,qt=null,sl(e,t,c,6);break;case 8:bo(),Ze=6;break e;default:throw Error(r(462))}}Wx();break}catch(H){Pm(e,H)}while(!0);return _a=Xn=null,O.H=s,O.A=u,Ae=a,je!==null?0:(qe=null,Re=0,dr(),Ze)}function Wx(){for(;je!==null&&!Lu();)Wm(je)}function Wm(e){var t=Nm(e.alternate,e,La);e.memoizedProps=e.pendingProps,t===null?Zr(e):je=t}function e0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=pm(a,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=pm(a,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:Lc(t);default:_m(a,t),t=je=Id(t,La),t=Nm(a,t,La)}e.memoizedProps=e.pendingProps,t===null?Zr(e):je=t}function sl(e,t,a,s){_a=Xn=null,Lc(t),Zs=null,Pl=0;var u=t.return;try{if(Yx(e,u,t,a,Re)){Ze=1,Dr(e,kt(a,e.current)),je=null;return}}catch(c){if(u!==null)throw je=u,c;Ze=1,Dr(e,kt(a,e.current)),je=null;return}t.flags&32768?(Te||s===1?e=!0:el||(Re&536870912)!==0?e=!1:(un=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ut.current,s!==null&&s.tag===13&&(s.flags|=16384))),t0(t,e)):Zr(t)}function Zr(e){var t=e;do{if((t.flags&32768)!==0){t0(t,un);return}e=t.return;var a=Vx(t.alternate,t,La);if(a!==null){je=a;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Ze===0&&(Ze=5)}function t0(e,t){do{var a=Xx(e.alternate,e);if(a!==null){a.flags&=32767,je=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=a}while(e!==null);Ze=6,je=null}function a0(e,t,a,s,u,c,y,b,R){e.cancelPendingCommit=null;do $r();while(at!==0);if((Ae&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=uc,Op(e,a,c,y,b,R),e===qe&&(je=qe=null,Re=0),al=t,fn=e,Ua=a,po=c,xo=u,Xm=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,nv(Fi,function(){return r0(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=O.T,O.T=null,u=Y.p,Y.p=2,y=Ae,Ae|=4;try{kx(e,t,a)}finally{Ae=y,Y.p=u,O.T=s}}at=1,n0(),s0(),l0()}}function n0(){if(at===1){at=0;var e=fn,t=al,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null;var s=Y.p;Y.p=2;var u=Ae;Ae|=4;try{Bm(t,e);var c=zo,y=Kd(e.containerInfo),b=c.focusedElem,R=c.selectionRange;if(y!==b&&b&&b.ownerDocument&&Gd(b.ownerDocument.documentElement,b)){if(R!==null&&nc(b)){var D=R.start,H=R.end;if(H===void 0&&(H=D),"selectionStart"in b)b.selectionStart=D,b.selectionEnd=Math.min(H,b.value.length);else{var k=b.ownerDocument||document,U=k&&k.defaultView||window;if(U.getSelection){var B=U.getSelection(),ie=b.textContent.length,he=Math.min(R.start,ie),Be=R.end===void 0?he:Math.min(R.end,ie);!B.extend&&he>Be&&(y=Be,Be=he,he=y);var w=Yd(b,he),M=Yd(b,Be);if(w&&M&&(B.rangeCount!==1||B.anchorNode!==w.node||B.anchorOffset!==w.offset||B.focusNode!==M.node||B.focusOffset!==M.offset)){var z=k.createRange();z.setStart(w.node,w.offset),B.removeAllRanges(),he>Be?(B.addRange(z),B.extend(M.node,M.offset)):(z.setEnd(M.node,M.offset),B.addRange(z))}}}}for(k=[],B=b;B=B.parentNode;)B.nodeType===1&&k.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<k.length;b++){var K=k[b];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}iu=!!Oo,zo=Oo=null}finally{Ae=u,Y.p=s,O.T=a}}e.current=t,at=2}}function s0(){if(at===2){at=0;var e=fn,t=al,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=O.T,O.T=null;var s=Y.p;Y.p=2;var u=Ae;Ae|=4;try{Om(e,t.alternate,t)}finally{Ae=u,Y.p=s,O.T=a}}at=3}}function l0(){if(at===4||at===3){at=0,$i();var e=fn,t=al,a=Ua,s=Xm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,al=fn=null,i0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(on=null),qu(a),t=t.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(Al,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=O.T,u=Y.p,Y.p=2,O.T=null;try{for(var c=e.onRecoverableError,y=0;y<s.length;y++){var b=s[y];c(b.value,{componentStack:b.stack})}}finally{O.T=t,Y.p=u}}(Ua&3)!==0&&$r(),ha(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===vo?di++:(di=0,vo=e):di=0,hi(0)}}function i0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zl(t)))}function $r(){return n0(),s0(),l0(),r0()}function r0(){if(at!==5)return!1;var e=fn,t=po;po=0;var a=qu(Ua),s=O.T,u=Y.p;try{Y.p=32>a?32:a,O.T=null,a=xo,xo=null;var c=fn,y=Ua;if(at=0,al=fn=null,Ua=0,(Ae&6)!==0)throw Error(r(331));var b=Ae;if(Ae|=4,Gm(c.current),Hm(c,c.current,y,a),Ae=b,hi(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Al,c)}catch{}return!0}finally{Y.p=u,O.T=s,i0(e,t)}}function u0(e,t,a){t=kt(a,t),t=Fc(e.stateNode,t,2),e=nn(e,t,2),e!==null&&(zl(e,2),ha(e))}function De(e,t,a){if(e.tag===3)u0(e,e,a);else for(;t!==null;){if(t.tag===3){u0(t,e,a);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(on===null||!on.has(s))){e=kt(a,e),a=cm(2),s=nn(t,a,2),s!==null&&(om(a,s,t,e),zl(s,2),ha(s));break}}t=t.return}}function jo(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new Px;var u=new Set;s.set(t,u)}else u=s.get(t),u===void 0&&(u=new Set,s.set(t,u));u.has(a)||(mo=!0,u.add(a),e=ev.bind(null,e,t,a),t.then(e,e))}function ev(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,qe===e&&(Re&a)===a&&(Ze===4||Ze===3&&(Re&62914560)===Re&&300>Se()-Gr?(Ae&2)===0&&nl(e,0):yo|=a,tl===Re&&(tl=0)),ha(e)}function c0(e,t){t===0&&(t=nd()),e=Gn(e,t),e!==null&&(zl(e,t),ha(e))}function tv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),c0(e,a)}function av(e,t){var a=0;switch(e.tag){case 31:case 13:var s=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),c0(e,a)}function nv(e,t){return wl(e,t)}var Pr=null,ll=null,No=!1,Fr=!1,Ro=!1,hn=0;function ha(e){e!==ll&&e.next===null&&(ll===null?Pr=ll=e:ll=ll.next=e),Fr=!0,No||(No=!0,lv())}function hi(e,t){if(!Ro&&Fr){Ro=!0;do for(var a=!1,s=Pr;s!==null;){if(e!==0){var u=s.pendingLanes;if(u===0)var c=0;else{var y=s.suspendedLanes,b=s.pingedLanes;c=(1<<31-zt(42|e)+1)-1,c&=u&~(y&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,h0(s,c))}else c=Re,c=er(s,s===qe?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||Ol(s,c)||(a=!0,h0(s,c));s=s.next}while(a);Ro=!1}}function sv(){o0()}function o0(){Fr=No=!1;var e=0;hn!==0&&yv()&&(e=hn);for(var t=Se(),a=null,s=Pr;s!==null;){var u=s.next,c=f0(s,t);c===0?(s.next=null,a===null?Pr=u:a.next=u,u===null&&(ll=a)):(a=s,(e!==0||(c&3)!==0)&&(Fr=!0)),s=u}at!==0&&at!==5||hi(e),hn!==0&&(hn=0)}function f0(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,u=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var y=31-zt(c),b=1<<y,R=u[y];R===-1?((b&a)===0||(b&s)!==0)&&(u[y]=Ap(b,t)):R<=t&&(e.expiredLanes|=b),c&=~b}if(t=qe,a=Re,a=er(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===t&&(ze===2||ze===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&_s(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ol(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(s!==null&&_s(s),qu(a)){case 2:case 8:a=Pi;break;case 32:a=Fi;break;case 268435456:a=ad;break;default:a=Fi}return s=d0.bind(null,e),a=wl(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&s!==null&&_s(s),e.callbackPriority=2,e.callbackNode=null,2}function d0(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if($r()&&e.callbackNode!==a)return null;var s=Re;return s=er(e,e===qe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Zm(e,s,t),f0(e,Se()),e.callbackNode!=null&&e.callbackNode===a?d0.bind(null,e):null)}function h0(e,t){if($r())return null;Zm(e,t,!0)}function lv(){pv(function(){(Ae&6)!==0?wl(ca,sv):o0()})}function _o(){if(hn===0){var e=Vs;e===0&&(e=Ji,Ji<<=1,(Ji&261888)===0&&(Ji=256)),hn=e}return hn}function m0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:sr(""+e)}function y0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function iv(e,t,a,s,u){if(t==="submit"&&a&&a.stateNode===u){var c=m0((u[jt]||null).action),y=s.submitter;y&&(t=(t=y[jt]||null)?m0(t.formAction):y.getAttribute("formAction"),t!==null&&(c=t,y=null));var b=new ur("action","action",null,s,u);e.push({event:b,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(hn!==0){var R=y?y0(u,y):new FormData(u);Vc(a,{pending:!0,data:R,method:u.method,action:c},null,R)}}else typeof c=="function"&&(b.preventDefault(),R=y?y0(u,y):new FormData(u),Vc(a,{pending:!0,data:R,method:u.method,action:c},c,R))},currentTarget:u}]})}}for(var Eo=0;Eo<rc.length;Eo++){var To=rc[Eo],rv=To.toLowerCase(),uv=To[0].toUpperCase()+To.slice(1);na(rv,"on"+uv)}na(kd,"onAnimationEnd"),na(Zd,"onAnimationIteration"),na($d,"onAnimationStart"),na("dblclick","onDoubleClick"),na("focusin","onFocus"),na("focusout","onBlur"),na(Rx,"onTransitionRun"),na(_x,"onTransitionStart"),na(Ex,"onTransitionCancel"),na(Pd,"onTransitionEnd"),ws("onMouseEnter",["mouseout","mouseover"]),ws("onMouseLeave",["mouseout","mouseover"]),ws("onPointerEnter",["pointerout","pointerover"]),ws("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mi="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(" "),cv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mi));function g0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],u=s.event;s=s.listeners;e:{var c=void 0;if(t)for(var y=s.length-1;0<=y;y--){var b=s[y],R=b.instance,D=b.currentTarget;if(b=b.listener,R!==c&&u.isPropagationStopped())break e;c=b,u.currentTarget=D;try{c(u)}catch(H){fr(H)}u.currentTarget=null,c=R}else for(y=0;y<s.length;y++){if(b=s[y],R=b.instance,D=b.currentTarget,b=b.listener,R!==c&&u.isPropagationStopped())break e;c=b,u.currentTarget=D;try{c(u)}catch(H){fr(H)}u.currentTarget=null,c=R}}}}function Ne(e,t){var a=t[Hu];a===void 0&&(a=t[Hu]=new Set);var s=e+"__bubble";a.has(s)||(p0(t,e,2,!1),a.add(s))}function Mo(e,t,a){var s=0;t&&(s|=4),p0(a,e,s,t)}var Jr="_reactListening"+Math.random().toString(36).slice(2);function Co(e){if(!e[Jr]){e[Jr]=!0,od.forEach(function(a){a!=="selectionchange"&&(cv.has(a)||Mo(a,!1,e),Mo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jr]||(t[Jr]=!0,Mo("selectionchange",!1,t))}}function p0(e,t,a,s){switch(k0(t)){case 2:var u=Bv;break;case 8:u=qv;break;default:u=Vo}a=u.bind(null,t,a,e),u=void 0,!$u||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),s?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function wo(e,t,a,s,u){var c=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var b=s.stateNode.containerInfo;if(b===u)break;if(y===4)for(y=s.return;y!==null;){var R=y.tag;if((R===3||R===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;b!==null;){if(y=Ts(b),y===null)return;if(R=y.tag,R===5||R===6||R===26||R===27){s=c=y;continue e}b=b.parentNode}}s=s.return}jd(function(){var D=c,H=ku(a),k=[];e:{var U=Fd.get(e);if(U!==void 0){var B=ur,ie=e;switch(e){case"keypress":if(ir(a)===0)break e;case"keydown":case"keyup":B=ax;break;case"focusin":ie="focus",B=Iu;break;case"focusout":ie="blur",B=Iu;break;case"beforeblur":case"afterblur":B=Iu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=_d;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=Vp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=lx;break;case kd:case Zd:case $d:B=Zp;break;case Pd:B=rx;break;case"scroll":case"scrollend":B=Gp;break;case"wheel":B=cx;break;case"copy":case"cut":case"paste":B=Pp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Td;break;case"toggle":case"beforetoggle":B=fx}var he=(t&4)!==0,Be=!he&&(e==="scroll"||e==="scrollend"),w=he?U!==null?U+"Capture":null:U;he=[];for(var M=D,z;M!==null;){var K=M;if(z=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||z===null||w===null||(K=Ul(M,w),K!=null&&he.push(yi(M,K,z))),Be)break;M=M.return}0<he.length&&(U=new B(U,ie,null,a,H),k.push({event:U,listeners:he}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",U&&a!==Xu&&(ie=a.relatedTarget||a.fromElement)&&(Ts(ie)||ie[Es]))break e;if((B||U)&&(U=H.window===H?H:(U=H.ownerDocument)?U.defaultView||U.parentWindow:window,B?(ie=a.relatedTarget||a.toElement,B=D,ie=ie?Ts(ie):null,ie!==null&&(Be=d(ie),he=ie.tag,ie!==Be||he!==5&&he!==27&&he!==6)&&(ie=null)):(B=null,ie=D),B!==ie)){if(he=_d,K="onMouseLeave",w="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(he=Td,K="onPointerLeave",w="onPointerEnter",M="pointer"),Be=B==null?U:Ll(B),z=ie==null?U:Ll(ie),U=new he(K,M+"leave",B,a,H),U.target=Be,U.relatedTarget=z,K=null,Ts(H)===D&&(he=new he(w,M+"enter",ie,a,H),he.target=z,he.relatedTarget=Be,K=he),Be=K,B&&ie)t:{for(he=ov,w=B,M=ie,z=0,K=w;K;K=he(K))z++;K=0;for(var fe=M;fe;fe=he(fe))K++;for(;0<z-K;)w=he(w),z--;for(;0<K-z;)M=he(M),K--;for(;z--;){if(w===M||M!==null&&w===M.alternate){he=w;break t}w=he(w),M=he(M)}he=null}else he=null;B!==null&&x0(k,U,B,he,!1),ie!==null&&Be!==null&&x0(k,Be,ie,he,!0)}}e:{if(U=D?Ll(D):window,B=U.nodeName&&U.nodeName.toLowerCase(),B==="select"||B==="input"&&U.type==="file")var Ce=Ld;else if(zd(U))if(Ud)Ce=Sx;else{Ce=vx;var re=xx}else B=U.nodeName,!B||B.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?D&&Vu(D.elementType)&&(Ce=Ld):Ce=bx;if(Ce&&(Ce=Ce(e,D))){Dd(k,Ce,a,H);break e}re&&re(e,U,D),e==="focusout"&&D&&U.type==="number"&&D.memoizedProps.value!=null&&Ku(U,"number",U.value)}switch(re=D?Ll(D):window,e){case"focusin":(zd(re)||re.contentEditable==="true")&&(Us=re,sc=D,Vl=null);break;case"focusout":Vl=sc=Us=null;break;case"mousedown":lc=!0;break;case"contextmenu":case"mouseup":case"dragend":lc=!1,Vd(k,a,H);break;case"selectionchange":if(Nx)break;case"keydown":case"keyup":Vd(k,a,H)}var pe;if(ec)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else Ls?Ad(e,a)&&(_e="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(_e="onCompositionStart");_e&&(Md&&a.locale!=="ko"&&(Ls||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Ls&&(pe=Nd()):(Fa=H,Pu="value"in Fa?Fa.value:Fa.textContent,Ls=!0)),re=Ir(D,_e),0<re.length&&(_e=new Ed(_e,e,null,a,H),k.push({event:_e,listeners:re}),pe?_e.data=pe:(pe=Od(a),pe!==null&&(_e.data=pe)))),(pe=hx?mx(e,a):yx(e,a))&&(_e=Ir(D,"onBeforeInput"),0<_e.length&&(re=new Ed("onBeforeInput","beforeinput",null,a,H),k.push({event:re,listeners:_e}),re.data=pe)),iv(k,e,D,a,H)}g0(k,t)})}function yi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ir(e,t){for(var a=t+"Capture",s=[];e!==null;){var u=e,c=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||c===null||(u=Ul(e,a),u!=null&&s.unshift(yi(e,u,c)),u=Ul(e,t),u!=null&&s.push(yi(e,u,c))),e.tag===3)return s;e=e.return}return[]}function ov(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function x0(e,t,a,s,u){for(var c=t._reactName,y=[];a!==null&&a!==s;){var b=a,R=b.alternate,D=b.stateNode;if(b=b.tag,R!==null&&R===s)break;b!==5&&b!==26&&b!==27||D===null||(R=D,u?(D=Ul(a,c),D!=null&&y.unshift(yi(a,D,R))):u||(D=Ul(a,c),D!=null&&y.push(yi(a,D,R)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var fv=/\r\n?/g,dv=/\u0000|\uFFFD/g;function v0(e){return(typeof e=="string"?e:""+e).replace(fv,`
|
|
49
|
+
`).replace(dv,"")}function b0(e,t){return t=v0(t),v0(e)===t}function Ue(e,t,a,s,u,c){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Os(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Os(e,""+s);break;case"className":ar(e,"class",s);break;case"tabIndex":ar(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":ar(e,a,s);break;case"style":bd(e,s,c);break;case"data":if(t!=="object"){ar(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=sr(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"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 c=="function"&&(a==="formAction"?(t!=="input"&&Ue(e,t,"name",u.name,u,null),Ue(e,t,"formEncType",u.formEncType,u,null),Ue(e,t,"formMethod",u.formMethod,u,null),Ue(e,t,"formTarget",u.formTarget,u,null)):(Ue(e,t,"encType",u.encType,u,null),Ue(e,t,"method",u.method,u,null),Ue(e,t,"target",u.target,u,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=sr(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=Sa);break;case"onScroll":s!=null&&Ne("scroll",e);break;case"onScrollEnd":s!=null&&Ne("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=sr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":Ne("beforetoggle",e),Ne("toggle",e),tr(e,"popover",s);break;case"xlinkActuate":ba(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ba(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ba(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ba(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ba(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ba(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ba(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ba(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ba(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":tr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Qp.get(a)||a,tr(e,a,s))}}function Ao(e,t,a,s,u,c){switch(a){case"style":bd(e,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof s=="string"?Os(e,s):(typeof s=="number"||typeof s=="bigint")&&Os(e,""+s);break;case"onScroll":s!=null&&Ne("scroll",e);break;case"onScrollEnd":s!=null&&Ne("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Sa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!fd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),c=e[jt]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,u),typeof s=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,u);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):tr(e,a,s)}}}function ft(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("load",e);var s=!1,u=!1,c;for(c in a)if(a.hasOwnProperty(c)){var y=a[c];if(y!=null)switch(c){case"src":s=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,c,y,a,null)}}u&&Ue(e,t,"srcSet",a.srcSet,a,null),s&&Ue(e,t,"src",a.src,a,null);return;case"input":Ne("invalid",e);var b=c=y=u=null,R=null,D=null;for(s in a)if(a.hasOwnProperty(s)){var H=a[s];if(H!=null)switch(s){case"name":u=H;break;case"type":y=H;break;case"checked":R=H;break;case"defaultChecked":D=H;break;case"value":c=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:Ue(e,t,s,H,a,null)}}gd(e,c,b,R,D,y,u,!1);return;case"select":Ne("invalid",e),s=y=c=null;for(u in a)if(a.hasOwnProperty(u)&&(b=a[u],b!=null))switch(u){case"value":c=b;break;case"defaultValue":y=b;break;case"multiple":s=b;default:Ue(e,t,u,b,a,null)}t=c,a=y,e.multiple=!!s,t!=null?As(e,!!s,t,!1):a!=null&&As(e,!!s,a,!0);return;case"textarea":Ne("invalid",e),c=u=s=null;for(y in a)if(a.hasOwnProperty(y)&&(b=a[y],b!=null))switch(y){case"value":s=b;break;case"defaultValue":u=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:Ue(e,t,y,b,a,null)}xd(e,s,u,c);return;case"option":for(R in a)if(a.hasOwnProperty(R)&&(s=a[R],s!=null))switch(R){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ue(e,t,R,s,a,null)}return;case"dialog":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(s=0;s<mi.length;s++)Ne(mi[s],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("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(D in a)if(a.hasOwnProperty(D)&&(s=a[D],s!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ue(e,t,D,s,a,null)}return;default:if(Vu(t)){for(H in a)a.hasOwnProperty(H)&&(s=a[H],s!==void 0&&Ao(e,t,H,s,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(s=a[b],s!=null&&Ue(e,t,b,s,a,null))}function hv(e,t,a,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,c=null,y=null,b=null,R=null,D=null,H=null;for(B in a){var k=a[B];if(a.hasOwnProperty(B)&&k!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":R=k;default:s.hasOwnProperty(B)||Ue(e,t,B,null,s,k)}}for(var U in s){var B=s[U];if(k=a[U],s.hasOwnProperty(U)&&(B!=null||k!=null))switch(U){case"type":c=B;break;case"name":u=B;break;case"checked":D=B;break;case"defaultChecked":H=B;break;case"value":y=B;break;case"defaultValue":b=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,t));break;default:B!==k&&Ue(e,t,U,B,s,k)}}Gu(e,y,b,R,D,H,c,u);return;case"select":B=y=b=U=null;for(c in a)if(R=a[c],a.hasOwnProperty(c)&&R!=null)switch(c){case"value":break;case"multiple":B=R;default:s.hasOwnProperty(c)||Ue(e,t,c,null,s,R)}for(u in s)if(c=s[u],R=a[u],s.hasOwnProperty(u)&&(c!=null||R!=null))switch(u){case"value":U=c;break;case"defaultValue":b=c;break;case"multiple":y=c;default:c!==R&&Ue(e,t,u,c,s,R)}t=b,a=y,s=B,U!=null?As(e,!!a,U,!1):!!s!=!!a&&(t!=null?As(e,!!a,t,!0):As(e,!!a,a?[]:"",!1));return;case"textarea":B=U=null;for(b in a)if(u=a[b],a.hasOwnProperty(b)&&u!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Ue(e,t,b,null,s,u)}for(y in s)if(u=s[y],c=a[y],s.hasOwnProperty(y)&&(u!=null||c!=null))switch(y){case"value":U=u;break;case"defaultValue":B=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==c&&Ue(e,t,y,u,s,c)}pd(e,U,B);return;case"option":for(var ie in a)if(U=a[ie],a.hasOwnProperty(ie)&&U!=null&&!s.hasOwnProperty(ie))switch(ie){case"selected":e.selected=!1;break;default:Ue(e,t,ie,null,s,U)}for(R in s)if(U=s[R],B=a[R],s.hasOwnProperty(R)&&U!==B&&(U!=null||B!=null))switch(R){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ue(e,t,R,U,s,B)}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 he in a)U=a[he],a.hasOwnProperty(he)&&U!=null&&!s.hasOwnProperty(he)&&Ue(e,t,he,null,s,U);for(D in s)if(U=s[D],B=a[D],s.hasOwnProperty(D)&&U!==B&&(U!=null||B!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ue(e,t,D,U,s,B)}return;default:if(Vu(t)){for(var Be in a)U=a[Be],a.hasOwnProperty(Be)&&U!==void 0&&!s.hasOwnProperty(Be)&&Ao(e,t,Be,void 0,s,U);for(H in s)U=s[H],B=a[H],!s.hasOwnProperty(H)||U===B||U===void 0&&B===void 0||Ao(e,t,H,U,s,B);return}}for(var w in a)U=a[w],a.hasOwnProperty(w)&&U!=null&&!s.hasOwnProperty(w)&&Ue(e,t,w,null,s,U);for(k in s)U=s[k],B=a[k],!s.hasOwnProperty(k)||U===B||U==null&&B==null||Ue(e,t,k,U,s,B)}function S0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var u=a[s],c=u.transferSize,y=u.initiatorType,b=u.duration;if(c&&b&&S0(y)){for(y=0,b=u.responseEnd,s+=1;s<a.length;s++){var R=a[s],D=R.startTime;if(D>b)break;var H=R.transferSize,k=R.initiatorType;H&&S0(k)&&(R=R.responseEnd,y+=H*(R<b?1:(b-D)/(R-D)))}if(--s,t+=8*(c+y)/(u.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 Oo=null,zo=null;function Wr(e){return e.nodeType===9?e:e.ownerDocument}function j0(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 N0(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 Do(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 Lo=null;function yv(){var e=window.event;return e&&e.type==="popstate"?e===Lo?!1:(Lo=e,!0):(Lo=null,!1)}var R0=typeof setTimeout=="function"?setTimeout:void 0,gv=typeof clearTimeout=="function"?clearTimeout:void 0,_0=typeof Promise=="function"?Promise:void 0,pv=typeof queueMicrotask=="function"?queueMicrotask:typeof _0<"u"?function(e){return _0.resolve(null).then(e).catch(xv)}:R0;function xv(e){setTimeout(function(){throw e})}function mn(e){return e==="head"}function E0(e,t){var a=t,s=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(s===0){e.removeChild(u),cl(t);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")gi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,gi(a);for(var c=a.firstChild;c;){var y=c.nextSibling,b=c.nodeName;c[Dl]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=y}}else a==="body"&&gi(e.ownerDocument.body);a=u}while(a);cl(t)}function T0(e,t){var a=e;e=0;do{var s=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=s}while(a)}function Uo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Uo(a),Qu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function vv(e,t,a,s){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Dl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Jt(e.nextSibling),e===null)break}return null}function bv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Jt(e.nextSibling),e===null))return null;return e}function M0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Jt(e.nextSibling),e===null))return null;return e}function Bo(e){return e.data==="$?"||e.data==="$~"}function qo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Sv(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var s=function(){t(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Jt(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 Ho=null;function C0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Jt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function w0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function A0(e,t,a){switch(t=Wr(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function gi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Qu(e)}var It=new Map,O0=new Set;function eu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ba=Y.d;Y.d={f:jv,r:Nv,D:Rv,C:_v,L:Ev,m:Tv,X:Cv,S:Mv,M:wv};function jv(){var e=Ba.f(),t=Xr();return e||t}function Nv(e){var t=Ms(e);t!==null&&t.tag===5&&t.type==="form"?Ph(t):Ba.r(e)}var il=typeof document>"u"?null:document;function z0(e,t,a){var s=il;if(s&&typeof t=="string"&&t){var u=Vt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),O0.has(u)||(O0.add(u),e={rel:e,crossOrigin:a,href:t},s.querySelector(u)===null&&(t=s.createElement("link"),ft(t,"link",e),st(t),s.head.appendChild(t)))}}function Rv(e){Ba.D(e),z0("dns-prefetch",e,null)}function _v(e,t){Ba.C(e,t),z0("preconnect",e,t)}function Ev(e,t,a){Ba.L(e,t,a);var s=il;if(s&&e&&t){var u='link[rel="preload"][as="'+Vt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Vt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Vt(a.imageSizes)+'"]')):u+='[href="'+Vt(e)+'"]';var c=u;switch(t){case"style":c=rl(e);break;case"script":c=ul(e)}It.has(c)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),It.set(c,e),s.querySelector(u)!==null||t==="style"&&s.querySelector(pi(c))||t==="script"&&s.querySelector(xi(c))||(t=s.createElement("link"),ft(t,"link",e),st(t),s.head.appendChild(t)))}}function Tv(e,t){Ba.m(e,t);var a=il;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Vt(s)+'"][href="'+Vt(e)+'"]',c=u;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=ul(e)}if(!It.has(c)&&(e=x({rel:"modulepreload",href:e},t),It.set(c,e),a.querySelector(u)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(xi(c)))return}s=a.createElement("link"),ft(s,"link",e),st(s),a.head.appendChild(s)}}}function Mv(e,t,a){Ba.S(e,t,a);var s=il;if(s&&e){var u=Cs(s).hoistableStyles,c=rl(e);t=t||"default";var y=u.get(c);if(!y){var b={loading:0,preload:null};if(y=s.querySelector(pi(c)))b.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=It.get(c))&&Qo(e,a);var R=y=s.createElement("link");st(R),ft(R,"link",e),R._p=new Promise(function(D,H){R.onload=D,R.onerror=H}),R.addEventListener("load",function(){b.loading|=1}),R.addEventListener("error",function(){b.loading|=2}),b.loading|=4,tu(y,t,s)}y={type:"stylesheet",instance:y,count:1,state:b},u.set(c,y)}}}function Cv(e,t){Ba.X(e,t);var a=il;if(a&&e){var s=Cs(a).hoistableScripts,u=ul(e),c=s.get(u);c||(c=a.querySelector(xi(u)),c||(e=x({src:e,async:!0},t),(t=It.get(u))&&Yo(e,t),c=a.createElement("script"),st(c),ft(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(u,c))}}function wv(e,t){Ba.M(e,t);var a=il;if(a&&e){var s=Cs(a).hoistableScripts,u=ul(e),c=s.get(u);c||(c=a.querySelector(xi(u)),c||(e=x({src:e,async:!0,type:"module"},t),(t=It.get(u))&&Yo(e,t),c=a.createElement("script"),st(c),ft(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(u,c))}}function D0(e,t,a,s){var u=(u=ve.current)?eu(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=rl(a.href),a=Cs(u).hoistableStyles,s=a.get(t),s||(s={type:"style",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=rl(a.href);var c=Cs(u).hoistableStyles,y=c.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,y),(c=u.querySelector(pi(e)))&&!c._p&&(y.instance=c,y.state.loading=5),It.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},It.set(e,a),c||Av(u,e,a,y.state))),t&&s===null)throw Error(r(528,""));return y}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ul(a),a=Cs(u).hoistableScripts,s=a.get(t),s||(s={type:"script",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function rl(e){return'href="'+Vt(e)+'"'}function pi(e){return'link[rel="stylesheet"]['+e+"]"}function L0(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Av(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),ft(t,"link",a),st(t),e.head.appendChild(t))}function ul(e){return'[src="'+Vt(e)+'"]'}function xi(e){return"script[async]"+e}function U0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Vt(a.href)+'"]');if(s)return t.instance=s,st(s),s;var u=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),st(s),ft(s,"style",u),tu(s,a.precedence,e),t.instance=s;case"stylesheet":u=rl(a.href);var c=e.querySelector(pi(u));if(c)return t.state.loading|=4,t.instance=c,st(c),c;s=L0(a),(u=It.get(u))&&Qo(s,u),c=(e.ownerDocument||e).createElement("link"),st(c);var y=c;return y._p=new Promise(function(b,R){y.onload=b,y.onerror=R}),ft(c,"link",s),t.state.loading|=4,tu(c,a.precedence,e),t.instance=c;case"script":return c=ul(a.src),(u=e.querySelector(xi(c)))?(t.instance=u,st(u),u):(s=a,(u=It.get(c))&&(s=x({},a),Yo(s,u)),e=e.ownerDocument||e,u=e.createElement("script"),st(u),ft(u,"link",s),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,tu(s,a.precedence,e));return t.instance}function tu(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=s.length?s[s.length-1]:null,c=u,y=0;y<s.length;y++){var b=s[y];if(b.dataset.precedence===t)c=b;else if(c!==u)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Qo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var au=null;function B0(e,t,a){if(au===null){var s=new Map,u=au=new Map;u.set(a,s)}else u=au,s=u.get(a),s||(s=new Map,u.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var c=a[u];if(!(c[Dl]||c[rt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var y=c.getAttribute(t)||"";y=e+y;var b=s.get(y);b?b.push(c):s.set(y,[c])}}return s}function q0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Ov(e,t,a){if(a===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 H0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function zv(e,t,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=rl(s.href),c=t.querySelector(pi(u));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=nu.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,st(c);return}c=t.ownerDocument||t,s=L0(s),(u=It.get(u))&&Qo(s,u),c=c.createElement("link"),st(c);var y=c;y._p=new Promise(function(b,R){y.onload=b,y.onerror=R}),ft(c,"link",s),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=nu.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Go=0;function Dv(e,t){return e.stylesheets&&e.count===0&&lu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var s=setTimeout(function(){if(e.stylesheets&&lu(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Go===0&&(Go=62500*mv());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lu(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Go?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(u)}}:null}function nu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var su=null;function lu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,su=new Map,t.forEach(Lv,e),su=null,nu.call(e))}function Lv(e,t){if(!(t.state.loading&4)){var a=su.get(e);if(a)var s=a.get(null);else{a=new Map,su.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<u.length;c++){var y=u[c];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),s=y)}s&&a.set(null,s)}u=t.instance,y=u.getAttribute("data-precedence"),c=a.get(y)||s,c===s&&a.set(null,u),a.set(y,u),this.count++,s=nu.bind(this),u.addEventListener("load",s),u.addEventListener("error",s),c?c.parentNode.insertBefore(u,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var vi={$$typeof:Z,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Uv(e,t,a,s,u,c,y,b,R){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=Uu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uu(0),this.hiddenUpdates=Uu(null),this.identifierPrefix=s,this.onUncaughtError=u,this.onCaughtError=c,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Q0(e,t,a,s,u,c,y,b,R,D,H,k){return e=new Uv(e,t,a,y,R,D,H,k,b),t=1,c===!0&&(t|=24),c=Lt(3,null,null,t),e.current=c,c.stateNode=e,t=bc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:s,isDehydrated:a,cache:t},Rc(c),e}function Y0(e){return e?(e=Hs,e):Hs}function G0(e,t,a,s,u,c){u=Y0(u),s.context===null?s.context=u:s.pendingContext=u,s=an(t),s.payload={element:a},c=c===void 0?null:c,c!==null&&(s.callback=c),a=nn(e,s,t),a!==null&&(Mt(a,e,t),Jl(a,e,t))}function K0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Ko(e,t){K0(e,t),(e=e.alternate)&&K0(e,t)}function V0(e){if(e.tag===13||e.tag===31){var t=Gn(e,67108864);t!==null&&Mt(t,e,67108864),Ko(e,67108864)}}function X0(e){if(e.tag===13||e.tag===31){var t=Qt();t=Bu(t);var a=Gn(e,t);a!==null&&Mt(a,e,t),Ko(e,t)}}var iu=!0;function Bv(e,t,a,s){var u=O.T;O.T=null;var c=Y.p;try{Y.p=2,Vo(e,t,a,s)}finally{Y.p=c,O.T=u}}function qv(e,t,a,s){var u=O.T;O.T=null;var c=Y.p;try{Y.p=8,Vo(e,t,a,s)}finally{Y.p=c,O.T=u}}function Vo(e,t,a,s){if(iu){var u=Xo(s);if(u===null)wo(e,t,s,ru,a),Z0(e,s);else if(Qv(u,e,t,a,s))s.stopPropagation();else if(Z0(e,s),t&4&&-1<Hv.indexOf(e)){for(;u!==null;){var c=Ms(u);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var y=Bn(c.pendingLanes);if(y!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;y;){var R=1<<31-zt(y);b.entanglements[1]|=R,y&=~R}ha(c),(Ae&6)===0&&(Kr=Se()+500,hi(0))}}break;case 31:case 13:b=Gn(c,2),b!==null&&Mt(b,c,2),Xr(),Ko(c,2)}if(c=Xo(s),c===null&&wo(e,t,s,ru,a),c===u)break;u=c}u!==null&&s.stopPropagation()}else wo(e,t,s,null,a)}}function Xo(e){return e=ku(e),ko(e)}var ru=null;function ko(e){if(ru=null,e=Ts(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=g(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ru=e,null}function k0(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(mt()){case ca:return 2;case Pi:return 8;case Fi:case _p:return 32;case ad:return 268435456;default:return 32}default:return 32}}var Zo=!1,yn=null,gn=null,pn=null,bi=new Map,Si=new Map,xn=[],Hv="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 Z0(e,t){switch(e){case"focusin":case"focusout":yn=null;break;case"dragenter":case"dragleave":gn=null;break;case"mouseover":case"mouseout":pn=null;break;case"pointerover":case"pointerout":bi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Si.delete(t.pointerId)}}function ji(e,t,a,s,u,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:c,targetContainers:[u]},t!==null&&(t=Ms(t),t!==null&&V0(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Qv(e,t,a,s,u){switch(t){case"focusin":return yn=ji(yn,e,t,a,s,u),!0;case"dragenter":return gn=ji(gn,e,t,a,s,u),!0;case"mouseover":return pn=ji(pn,e,t,a,s,u),!0;case"pointerover":var c=u.pointerId;return bi.set(c,ji(bi.get(c)||null,e,t,a,s,u)),!0;case"gotpointercapture":return c=u.pointerId,Si.set(c,ji(Si.get(c)||null,e,t,a,s,u)),!0}return!1}function $0(e){var t=Ts(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,ud(e.priority,function(){X0(a)});return}}else if(t===31){if(t=g(a),t!==null){e.blockedOn=t,ud(e.priority,function(){X0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Xo(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Xu=s,a.target.dispatchEvent(s),Xu=null}else return t=Ms(a),t!==null&&V0(t),e.blockedOn=a,!1;t.shift()}return!0}function P0(e,t,a){uu(e)&&a.delete(t)}function Yv(){Zo=!1,yn!==null&&uu(yn)&&(yn=null),gn!==null&&uu(gn)&&(gn=null),pn!==null&&uu(pn)&&(pn=null),bi.forEach(P0),Si.forEach(P0)}function cu(e,t){e.blockedOn===t&&(e.blockedOn=null,Zo||(Zo=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Yv)))}var ou=null;function F0(e){ou!==e&&(ou=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ou===e&&(ou=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],u=e[t+2];if(typeof s!="function"){if(ko(s||a)===null)continue;break}var c=Ms(a);c!==null&&(e.splice(t,3),t-=3,Vc(c,{pending:!0,data:u,method:a.method,action:s},s,u))}}))}function cl(e){function t(R){return cu(R,e)}yn!==null&&cu(yn,e),gn!==null&&cu(gn,e),pn!==null&&cu(pn,e),bi.forEach(t),Si.forEach(t);for(var a=0;a<xn.length;a++){var s=xn[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<xn.length&&(a=xn[0],a.blockedOn===null);)$0(a),a.blockedOn===null&&xn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var u=a[s],c=a[s+1],y=u[jt]||null;if(typeof c=="function")y||F0(a);else if(y){var b=null;if(c&&c.hasAttribute("formAction")){if(u=c,y=c[jt]||null)b=y.formAction;else if(ko(u)!==null)continue}else b=y.action;typeof b=="function"?a[s+1]=b:(a.splice(s,3),s-=3),F0(a)}}}function J0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function $o(e){this._internalRoot=e}fu.prototype.render=$o.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,s=Qt();G0(a,s,e,t,null,null)},fu.prototype.unmount=$o.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;G0(e.current,2,null,e,null,null),Xr(),t[Es]=null}};function fu(e){this._internalRoot=e}fu.prototype.unstable_scheduleHydration=function(e){if(e){var t=rd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<xn.length&&t!==0&&t<xn[a].priority;a++);xn.splice(a,0,e),a===0&&$0(e)}};var I0=l.version;if(I0!=="19.2.4")throw Error(r(527,I0,"19.2.4"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var Gv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!du.isDisabled&&du.supportsFiber)try{Al=du.inject(Gv),Ot=du}catch{}}return Ri.createRoot=function(e,t){if(!o(e))throw Error(r(299));var a=!1,s="",u=lm,c=im,y=rm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Q0(e,1,!1,null,null,a,s,null,u,c,y,J0),e[Es]=t.current,Co(e),new $o(t)},Ri.hydrateRoot=function(e,t,a){if(!o(e))throw Error(r(299));var s=!1,u="",c=lm,y=im,b=rm,R=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),t=Q0(e,1,!0,t,a??null,s,u,R,c,y,b,J0),t.context=Y0(null),a=t.current,s=Qt(),s=Bu(s),u=an(s),u.callback=null,nn(a,u,s),a=s,t.current.lanes=a,zl(t,a),ha(t),e[Es]=t.current,Co(e),new fu(t)},Ri.version="19.2.4",Ri}var cy;function Iv(){if(cy)return Io.exports;cy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Io.exports=Jv(),Io.exports}var Wv=Iv(),Ml=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(){}},ls,jn,hl,ag,eb=(ag=class extends Ml{constructor(){super();ce(this,ls);ce(this,jn);ce(this,hl);ae(this,hl,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){_(this,jn)||this.setEventListener(_(this,hl))}onUnsubscribe(){var l;this.hasListeners()||((l=_(this,jn))==null||l.call(this),ae(this,jn,void 0))}setEventListener(l){var i;ae(this,hl,l),(i=_(this,jn))==null||i.call(this),ae(this,jn,l(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(l){_(this,ls)!==l&&(ae(this,ls,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(i=>{i(l)})}isFocused(){var l;return typeof _(this,ls)=="boolean"?_(this,ls):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},ls=new WeakMap,jn=new WeakMap,hl=new WeakMap,ag),Hf=new eb,tb={setTimeout:(n,l)=>setTimeout(n,l),clearTimeout:n=>clearTimeout(n),setInterval:(n,l)=>setInterval(n,l),clearInterval:n=>clearInterval(n)},Nn,qf,ng,ab=(ng=class{constructor(){ce(this,Nn,tb);ce(this,qf,!1)}setTimeoutProvider(n){ae(this,Nn,n)}setTimeout(n,l){return _(this,Nn).setTimeout(n,l)}clearTimeout(n){_(this,Nn).clearTimeout(n)}setInterval(n,l){return _(this,Nn).setInterval(n,l)}clearInterval(n){_(this,Nn).clearInterval(n)}},Nn=new WeakMap,qf=new WeakMap,ng),as=new ab;function nb(n){setTimeout(n,0)}var sb=typeof window>"u"||"Deno"in globalThis;function bt(){}function lb(n,l){return typeof n=="function"?n(l):n}function xf(n){return typeof n=="number"&&n>=0&&n!==1/0}function mg(n,l){return Math.max(n+(l||0)-Date.now(),0)}function zn(n,l){return typeof n=="function"?n(l):n}function ea(n,l){return typeof n=="function"?n(l):n}function oy(n,l){const{type:i="all",exact:r,fetchStatus:o,predicate:d,queryKey:h,stale:g}=n;if(h){if(r){if(l.queryHash!==Qf(h,l.options))return!1}else if(!Di(l.queryKey,h))return!1}if(i!=="all"){const p=l.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof g=="boolean"&&l.isStale()!==g||o&&o!==l.state.fetchStatus||d&&!d(l))}function fy(n,l){const{exact:i,status:r,predicate:o,mutationKey:d}=n;if(d){if(!l.options.mutationKey)return!1;if(i){if(ps(l.options.mutationKey)!==ps(d))return!1}else if(!Di(l.options.mutationKey,d))return!1}return!(r&&l.state.status!==r||o&&!o(l))}function Qf(n,l){return((l==null?void 0:l.queryKeyHashFn)||ps)(n)}function ps(n){return JSON.stringify(n,(l,i)=>vf(i)?Object.keys(i).sort().reduce((r,o)=>(r[o]=i[o],r),{}):i)}function Di(n,l){return n===l?!0:typeof n!=typeof l?!1:n&&l&&typeof n=="object"&&typeof l=="object"?Object.keys(l).every(i=>Di(n[i],l[i])):!1}var ib=Object.prototype.hasOwnProperty;function yg(n,l,i=0){if(n===l)return n;if(i>500)return l;const r=dy(n)&&dy(l);if(!r&&!(vf(n)&&vf(l)))return l;const d=(r?n:Object.keys(n)).length,h=r?l:Object.keys(l),g=h.length,p=r?new Array(g):{};let m=0;for(let v=0;v<g;v++){const x=r?v:h[v],S=n[x],j=l[x];if(S===j){p[x]=S,(r?v<d:ib.call(n,x))&&m++;continue}if(S===null||j===null||typeof S!="object"||typeof j!="object"){p[x]=j;continue}const N=yg(S,j,i+1);p[x]=N,N===S&&m++}return d===g&&m===d?n:p}function Nu(n,l){if(!l||Object.keys(n).length!==Object.keys(l).length)return!1;for(const i in n)if(n[i]!==l[i])return!1;return!0}function dy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function vf(n){if(!hy(n))return!1;const l=n.constructor;if(l===void 0)return!0;const i=l.prototype;return!(!hy(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function hy(n){return Object.prototype.toString.call(n)==="[object Object]"}function rb(n){return new Promise(l=>{as.setTimeout(l,n)})}function bf(n,l,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,l):i.structuralSharing!==!1?yg(n,l):l}function ub(n,l,i=0){const r=[...n,l];return i&&r.length>i?r.slice(1):r}function cb(n,l,i=0){const r=[l,...n];return i&&r.length>i?r.slice(0,-1):r}var Yf=Symbol();function gg(n,l){return!n.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!n.queryFn||n.queryFn===Yf?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Gf(n,l){return typeof n=="function"?n(...l):!!n}function ob(n,l,i){let r=!1,o;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(o??(o=l()),r||(r=!0,o.aborted?i():o.addEventListener("abort",i,{once:!0})),o)}),n}var Li=(()=>{let n=()=>sb;return{isServer(){return n()},setIsServer(l){n=l}}})();function Sf(){let n,l;const i=new Promise((o,d)=>{n=o,l=d});i.status="pending",i.catch(()=>{});function r(o){Object.assign(i,o),delete i.resolve,delete i.reject}return i.resolve=o=>{r({status:"fulfilled",value:o}),n(o)},i.reject=o=>{r({status:"rejected",reason:o}),l(o)},i}var fb=nb;function db(){let n=[],l=0,i=g=>{g()},r=g=>{g()},o=fb;const d=g=>{l?n.push(g):o(()=>{i(g)})},h=()=>{const g=n;n=[],g.length&&o(()=>{r(()=>{g.forEach(p=>{i(p)})})})};return{batch:g=>{let p;l++;try{p=g()}finally{l--,l||h()}return p},batchCalls:g=>(...p)=>{d(()=>{g(...p)})},schedule:d,setNotifyFunction:g=>{i=g},setBatchNotifyFunction:g=>{r=g},setScheduler:g=>{o=g}}}var nt=db(),ml,Rn,yl,sg,hb=(sg=class extends Ml{constructor(){super();ce(this,ml,!0);ce(this,Rn);ce(this,yl);ae(this,yl,l=>{if(typeof window<"u"&&window.addEventListener){const i=()=>l(!0),r=()=>l(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){_(this,Rn)||this.setEventListener(_(this,yl))}onUnsubscribe(){var l;this.hasListeners()||((l=_(this,Rn))==null||l.call(this),ae(this,Rn,void 0))}setEventListener(l){var i;ae(this,yl,l),(i=_(this,Rn))==null||i.call(this),ae(this,Rn,l(this.setOnline.bind(this)))}setOnline(l){_(this,ml)!==l&&(ae(this,ml,l),this.listeners.forEach(r=>{r(l)}))}isOnline(){return _(this,ml)}},ml=new WeakMap,Rn=new WeakMap,yl=new WeakMap,sg),Ru=new hb;function mb(n){return Math.min(1e3*2**n,3e4)}function pg(n){return(n??"online")==="online"?Ru.isOnline():!0}var jf=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function xg(n){let l=!1,i=0,r;const o=Sf(),d=()=>o.status!=="pending",h=E=>{var C;if(!d()){const A=new jf(E);S(A),(C=n.onCancel)==null||C.call(n,A)}},g=()=>{l=!0},p=()=>{l=!1},m=()=>Hf.isFocused()&&(n.networkMode==="always"||Ru.isOnline())&&n.canRun(),v=()=>pg(n.networkMode)&&n.canRun(),x=E=>{d()||(r==null||r(),o.resolve(E))},S=E=>{d()||(r==null||r(),o.reject(E))},j=()=>new Promise(E=>{var C;r=A=>{(d()||m())&&E(A)},(C=n.onPause)==null||C.call(n)}).then(()=>{var E;r=void 0,d()||(E=n.onContinue)==null||E.call(n)}),N=()=>{if(d())return;let E;const C=i===0?n.initialPromise:void 0;try{E=C??n.fn()}catch(A){E=Promise.reject(A)}Promise.resolve(E).then(x).catch(A=>{var W;if(d())return;const $=n.retry??(Li.isServer()?0:3),Z=n.retryDelay??mb,L=typeof Z=="function"?Z(i,A):Z,X=$===!0||typeof $=="number"&&i<$||typeof $=="function"&&$(i,A);if(l||!X){S(A);return}i++,(W=n.onFail)==null||W.call(n,i,A),rb(L).then(()=>m()?void 0:j()).then(()=>{l?S(A):N()})})};return{promise:o,status:()=>o.status,cancel:h,continue:()=>(r==null||r(),o),cancelRetry:g,continueRetry:p,canStart:v,start:()=>(v()?N():j().then(N),o)}}var is,lg,vg=(lg=class{constructor(){ce(this,is)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xf(this.gcTime)&&ae(this,is,as.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Li.isServer()?1/0:300*1e3))}clearGcTimeout(){_(this,is)&&(as.clearTimeout(_(this,is)),ae(this,is,void 0))}},is=new WeakMap,lg),rs,gl,Wt,us,it,Qi,cs,Yt,bg,qa,ig,yb=(ig=class extends vg{constructor(l){super();ce(this,Yt);ce(this,rs);ce(this,gl);ce(this,Wt);ce(this,us);ce(this,it);ce(this,Qi);ce(this,cs);ae(this,cs,!1),ae(this,Qi,l.defaultOptions),this.setOptions(l.options),this.observers=[],ae(this,us,l.client),ae(this,Wt,_(this,us).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,ae(this,rs,yy(this.options)),this.state=l.state??_(this,rs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var l;return(l=_(this,it))==null?void 0:l.promise}setOptions(l){if(this.options={..._(this,Qi),...l},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=yy(this.options);i.data!==void 0&&(this.setState(my(i.data,i.dataUpdatedAt)),ae(this,rs,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,Wt).remove(this)}setData(l,i){const r=bf(this.state.data,l,this.options);return xe(this,Yt,qa).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(l,i){xe(this,Yt,qa).call(this,{type:"setState",state:l,setStateOptions:i})}cancel(l){var r,o;const i=(r=_(this,it))==null?void 0:r.promise;return(o=_(this,it))==null||o.cancel(l),i?i.then(bt).catch(bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return _(this,rs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(l=>ea(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>zn(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!mg(this.state.dataUpdatedAt,l)}onFocus(){var i;const l=this.observers.find(r=>r.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(i=_(this,it))==null||i.continue()}onOnline(){var i;const l=this.observers.find(r=>r.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(i=_(this,it))==null||i.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),_(this,Wt).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(i=>i!==l),this.observers.length||(_(this,it)&&(_(this,cs)||xe(this,Yt,bg).call(this)?_(this,it).cancel({revert:!0}):_(this,it).cancelRetry()),this.scheduleGc()),_(this,Wt).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xe(this,Yt,qa).call(this,{type:"invalidate"})}async fetch(l,i){var p,m,v,x,S,j,N,E,C,A,$,Z;if(this.state.fetchStatus!=="idle"&&((p=_(this,it))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(_(this,it))return _(this,it).continueRetry(),_(this,it).promise}if(l&&this.setOptions(l),!this.options.queryFn){const L=this.observers.find(X=>X.options.queryFn);L&&this.setOptions(L.options)}const r=new AbortController,o=L=>{Object.defineProperty(L,"signal",{enumerable:!0,get:()=>(ae(this,cs,!0),r.signal)})},d=()=>{const L=gg(this.options,i),W=(()=>{const P={client:_(this,us),queryKey:this.queryKey,meta:this.meta};return o(P),P})();return ae(this,cs,!1),this.options.persister?this.options.persister(L,W,this):L(W)},g=(()=>{const L={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:_(this,us),state:this.state,fetchFn:d};return o(L),L})();(m=this.options.behavior)==null||m.onFetch(g,this),ae(this,gl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=g.fetchOptions)==null?void 0:v.meta))&&xe(this,Yt,qa).call(this,{type:"fetch",meta:(x=g.fetchOptions)==null?void 0:x.meta}),ae(this,it,xg({initialPromise:i==null?void 0:i.initialPromise,fn:g.fetchFn,onCancel:L=>{L instanceof jf&&L.revert&&this.setState({..._(this,gl),fetchStatus:"idle"}),r.abort()},onFail:(L,X)=>{xe(this,Yt,qa).call(this,{type:"failed",failureCount:L,error:X})},onPause:()=>{xe(this,Yt,qa).call(this,{type:"pause"})},onContinue:()=>{xe(this,Yt,qa).call(this,{type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay,networkMode:g.options.networkMode,canRun:()=>!0}));try{const L=await _(this,it).start();if(L===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(L),(j=(S=_(this,Wt).config).onSuccess)==null||j.call(S,L,this),(E=(N=_(this,Wt).config).onSettled)==null||E.call(N,L,this.state.error,this),L}catch(L){if(L instanceof jf){if(L.silent)return _(this,it).promise;if(L.revert){if(this.state.data===void 0)throw L;return this.state.data}}throw xe(this,Yt,qa).call(this,{type:"error",error:L}),(A=(C=_(this,Wt).config).onError)==null||A.call(C,L,this),(Z=($=_(this,Wt).config).onSettled)==null||Z.call($,this.state.data,L,this),L}finally{this.scheduleGc()}}},rs=new WeakMap,gl=new WeakMap,Wt=new WeakMap,us=new WeakMap,it=new WeakMap,Qi=new WeakMap,cs=new WeakMap,Yt=new WeakSet,bg=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},qa=function(l){const i=r=>{switch(l.type){case"failed":return{...r,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Sg(r.data,this.options),fetchMeta:l.meta??null};case"success":const o={...r,...my(l.data,l.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ae(this,gl,l.manual?o:void 0),o;case"error":const d=l.error;return{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...l.state}}};this.state=i(this.state),nt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),_(this,Wt).notify({query:this,type:"updated",action:l})})},ig);function Sg(n,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pg(l.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function my(n,l){return{data:n,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function yy(n){const l=typeof n.initialData=="function"?n.initialData():n.initialData,i=l!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Ct,Me,Yi,vt,os,pl,Ha,_n,Gi,xl,vl,fs,ds,En,bl,Oe,Ai,Nf,Rf,_f,Ef,Tf,Mf,Cf,jg,rg,gb=(rg=class extends Ml{constructor(l,i){super();ce(this,Oe);ce(this,Ct);ce(this,Me);ce(this,Yi);ce(this,vt);ce(this,os);ce(this,pl);ce(this,Ha);ce(this,_n);ce(this,Gi);ce(this,xl);ce(this,vl);ce(this,fs);ce(this,ds);ce(this,En);ce(this,bl,new Set);this.options=i,ae(this,Ct,l),ae(this,_n,null),ae(this,Ha,Sf()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,Me).addObserver(this),gy(_(this,Me),this.options)?xe(this,Oe,Ai).call(this):this.updateResult(),xe(this,Oe,Ef).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wf(_(this,Me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wf(_(this,Me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xe(this,Oe,Tf).call(this),xe(this,Oe,Mf).call(this),_(this,Me).removeObserver(this)}setOptions(l){const i=this.options,r=_(this,Me);if(this.options=_(this,Ct).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ea(this.options.enabled,_(this,Me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xe(this,Oe,Cf).call(this),_(this,Me).setOptions(this.options),i._defaulted&&!Nu(this.options,i)&&_(this,Ct).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,Me),observer:this});const o=this.hasListeners();o&&py(_(this,Me),r,this.options,i)&&xe(this,Oe,Ai).call(this),this.updateResult(),o&&(_(this,Me)!==r||ea(this.options.enabled,_(this,Me))!==ea(i.enabled,_(this,Me))||zn(this.options.staleTime,_(this,Me))!==zn(i.staleTime,_(this,Me)))&&xe(this,Oe,Nf).call(this);const d=xe(this,Oe,Rf).call(this);o&&(_(this,Me)!==r||ea(this.options.enabled,_(this,Me))!==ea(i.enabled,_(this,Me))||d!==_(this,En))&&xe(this,Oe,_f).call(this,d)}getOptimisticResult(l){const i=_(this,Ct).getQueryCache().build(_(this,Ct),l),r=this.createResult(i,l);return xb(this,r)&&(ae(this,vt,r),ae(this,pl,this.options),ae(this,os,_(this,Me).state)),r}getCurrentResult(){return _(this,vt)}trackResult(l,i){return new Proxy(l,{get:(r,o)=>(this.trackProp(o),i==null||i(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&_(this,Ha).status==="pending"&&_(this,Ha).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(l){_(this,bl).add(l)}getCurrentQuery(){return _(this,Me)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const i=_(this,Ct).defaultQueryOptions(l),r=_(this,Ct).getQueryCache().build(_(this,Ct),i);return r.fetch().then(()=>this.createResult(r,i))}fetch(l){return xe(this,Oe,Ai).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,vt)))}createResult(l,i){var J;const r=_(this,Me),o=this.options,d=_(this,vt),h=_(this,os),g=_(this,pl),m=l!==r?l.state:_(this,Yi),{state:v}=l;let x={...v},S=!1,j;if(i._optimisticResults){const V=this.hasListeners(),I=!V&&gy(l,i),se=V&&py(l,r,i,o);(I||se)&&(x={...x,...Sg(v.data,l.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:N,errorUpdatedAt:E,status:C}=x;j=x.data;let A=!1;if(i.placeholderData!==void 0&&j===void 0&&C==="pending"){let V;d!=null&&d.isPlaceholderData&&i.placeholderData===(g==null?void 0:g.placeholderData)?(V=d.data,A=!0):V=typeof i.placeholderData=="function"?i.placeholderData((J=_(this,vl))==null?void 0:J.state.data,_(this,vl)):i.placeholderData,V!==void 0&&(C="success",j=bf(d==null?void 0:d.data,V,i),S=!0)}if(i.select&&j!==void 0&&!A)if(d&&j===(h==null?void 0:h.data)&&i.select===_(this,Gi))j=_(this,xl);else try{ae(this,Gi,i.select),j=i.select(j),j=bf(d==null?void 0:d.data,j,i),ae(this,xl,j),ae(this,_n,null)}catch(V){ae(this,_n,V)}_(this,_n)&&(N=_(this,_n),j=_(this,xl),E=Date.now(),C="error");const $=x.fetchStatus==="fetching",Z=C==="pending",L=C==="error",X=Z&&$,W=j!==void 0,F={status:C,fetchStatus:x.fetchStatus,isPending:Z,isSuccess:C==="success",isError:L,isInitialLoading:X,isLoading:X,data:j,dataUpdatedAt:x.dataUpdatedAt,error:N,errorUpdatedAt:E,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:l.isFetched(),isFetchedAfterMount:x.dataUpdateCount>m.dataUpdateCount||x.errorUpdateCount>m.errorUpdateCount,isFetching:$,isRefetching:$&&!Z,isLoadingError:L&&!W,isPaused:x.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:L&&W,isStale:Kf(l,i),refetch:this.refetch,promise:_(this,Ha),isEnabled:ea(i.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const V=F.data!==void 0,I=F.status==="error"&&!V,se=ne=>{I?ne.reject(F.error):V&&ne.resolve(F.data)},le=()=>{const ne=ae(this,Ha,F.promise=Sf());se(ne)},ue=_(this,Ha);switch(ue.status){case"pending":l.queryHash===r.queryHash&&se(ue);break;case"fulfilled":(I||F.data!==ue.value)&&le();break;case"rejected":(!I||F.error!==ue.reason)&&le();break}}return F}updateResult(){const l=_(this,vt),i=this.createResult(_(this,Me),this.options);if(ae(this,os,_(this,Me).state),ae(this,pl,this.options),_(this,os).data!==void 0&&ae(this,vl,_(this,Me)),Nu(i,l))return;ae(this,vt,i);const r=()=>{if(!l)return!0;const{notifyOnChangeProps:o}=this.options,d=typeof o=="function"?o():o;if(d==="all"||!d&&!_(this,bl).size)return!0;const h=new Set(d??_(this,bl));return this.options.throwOnError&&h.add("error"),Object.keys(_(this,vt)).some(g=>{const p=g;return _(this,vt)[p]!==l[p]&&h.has(p)})};xe(this,Oe,jg).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xe(this,Oe,Ef).call(this)}},Ct=new WeakMap,Me=new WeakMap,Yi=new WeakMap,vt=new WeakMap,os=new WeakMap,pl=new WeakMap,Ha=new WeakMap,_n=new WeakMap,Gi=new WeakMap,xl=new WeakMap,vl=new WeakMap,fs=new WeakMap,ds=new WeakMap,En=new WeakMap,bl=new WeakMap,Oe=new WeakSet,Ai=function(l){xe(this,Oe,Cf).call(this);let i=_(this,Me).fetch(this.options,l);return l!=null&&l.throwOnError||(i=i.catch(bt)),i},Nf=function(){xe(this,Oe,Tf).call(this);const l=zn(this.options.staleTime,_(this,Me));if(Li.isServer()||_(this,vt).isStale||!xf(l))return;const r=mg(_(this,vt).dataUpdatedAt,l)+1;ae(this,fs,as.setTimeout(()=>{_(this,vt).isStale||this.updateResult()},r))},Rf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,Me)):this.options.refetchInterval)??!1},_f=function(l){xe(this,Oe,Mf).call(this),ae(this,En,l),!(Li.isServer()||ea(this.options.enabled,_(this,Me))===!1||!xf(_(this,En))||_(this,En)===0)&&ae(this,ds,as.setInterval(()=>{(this.options.refetchIntervalInBackground||Hf.isFocused())&&xe(this,Oe,Ai).call(this)},_(this,En)))},Ef=function(){xe(this,Oe,Nf).call(this),xe(this,Oe,_f).call(this,xe(this,Oe,Rf).call(this))},Tf=function(){_(this,fs)&&(as.clearTimeout(_(this,fs)),ae(this,fs,void 0))},Mf=function(){_(this,ds)&&(as.clearInterval(_(this,ds)),ae(this,ds,void 0))},Cf=function(){const l=_(this,Ct).getQueryCache().build(_(this,Ct),this.options);if(l===_(this,Me))return;const i=_(this,Me);ae(this,Me,l),ae(this,Yi,l.state),this.hasListeners()&&(i==null||i.removeObserver(this),l.addObserver(this))},jg=function(l){nt.batch(()=>{l.listeners&&this.listeners.forEach(i=>{i(_(this,vt))}),_(this,Ct).getQueryCache().notify({query:_(this,Me),type:"observerResultsUpdated"})})},rg);function pb(n,l){return ea(l.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&l.retryOnMount===!1)}function gy(n,l){return pb(n,l)||n.state.data!==void 0&&wf(n,l,l.refetchOnMount)}function wf(n,l,i){if(ea(l.enabled,n)!==!1&&zn(l.staleTime,n)!=="static"){const r=typeof i=="function"?i(n):i;return r==="always"||r!==!1&&Kf(n,l)}return!1}function py(n,l,i,r){return(n!==l||ea(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Kf(n,i)}function Kf(n,l){return ea(l.enabled,n)!==!1&&n.isStaleByTime(zn(l.staleTime,n))}function xb(n,l){return!Nu(n.getCurrentResult(),l)}function xy(n){return{onFetch:(l,i)=>{var v,x,S,j,N;const r=l.options,o=(S=(x=(v=l.fetchOptions)==null?void 0:v.meta)==null?void 0:x.fetchMore)==null?void 0:S.direction,d=((j=l.state.data)==null?void 0:j.pages)||[],h=((N=l.state.data)==null?void 0:N.pageParams)||[];let g={pages:[],pageParams:[]},p=0;const m=async()=>{let E=!1;const C=Z=>{ob(Z,()=>l.signal,()=>E=!0)},A=gg(l.options,l.fetchOptions),$=async(Z,L,X)=>{if(E)return Promise.reject();if(L==null&&Z.pages.length)return Promise.resolve(Z);const P=(()=>{const I={client:l.client,queryKey:l.queryKey,pageParam:L,direction:X?"backward":"forward",meta:l.options.meta};return C(I),I})(),F=await A(P),{maxPages:J}=l.options,V=X?cb:ub;return{pages:V(Z.pages,F,J),pageParams:V(Z.pageParams,L,J)}};if(o&&d.length){const Z=o==="backward",L=Z?vb:vy,X={pages:d,pageParams:h},W=L(r,X);g=await $(X,W,Z)}else{const Z=n??d.length;do{const L=p===0?h[0]??r.initialPageParam:vy(r,g);if(p>0&&L==null)break;g=await $(g,L),p++}while(p<Z)}return g};l.options.persister?l.fetchFn=()=>{var E,C;return(C=(E=l.options).persister)==null?void 0:C.call(E,m,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},i)}:l.fetchFn=m}}}function vy(n,{pages:l,pageParams:i}){const r=l.length-1;return l.length>0?n.getNextPageParam(l[r],l,i[r],i):void 0}function vb(n,{pages:l,pageParams:i}){var r;return l.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,l[0],l,i[0],i):void 0}var Ki,ya,gt,hs,ga,bn,ug,bb=(ug=class extends vg{constructor(l){super();ce(this,ga);ce(this,Ki);ce(this,ya);ce(this,gt);ce(this,hs);ae(this,Ki,l.client),this.mutationId=l.mutationId,ae(this,gt,l.mutationCache),ae(this,ya,[]),this.state=l.state||Ng(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){_(this,ya).includes(l)||(_(this,ya).push(l),this.clearGcTimeout(),_(this,gt).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){ae(this,ya,_(this,ya).filter(i=>i!==l)),this.scheduleGc(),_(this,gt).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){_(this,ya).length||(this.state.status==="pending"?this.scheduleGc():_(this,gt).remove(this))}continue(){var l;return((l=_(this,hs))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var h,g,p,m,v,x,S,j,N,E,C,A,$,Z,L,X,W,P;const i=()=>{xe(this,ga,bn).call(this,{type:"continue"})},r={client:_(this,Ki),meta:this.options.meta,mutationKey:this.options.mutationKey};ae(this,hs,xg({fn:()=>this.options.mutationFn?this.options.mutationFn(l,r):Promise.reject(new Error("No mutationFn found")),onFail:(F,J)=>{xe(this,ga,bn).call(this,{type:"failed",failureCount:F,error:J})},onPause:()=>{xe(this,ga,bn).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,gt).canRun(this)}));const o=this.state.status==="pending",d=!_(this,hs).canStart();try{if(o)i();else{xe(this,ga,bn).call(this,{type:"pending",variables:l,isPaused:d}),_(this,gt).config.onMutate&&await _(this,gt).config.onMutate(l,this,r);const J=await((g=(h=this.options).onMutate)==null?void 0:g.call(h,l,r));J!==this.state.context&&xe(this,ga,bn).call(this,{type:"pending",context:J,variables:l,isPaused:d})}const F=await _(this,hs).start();return await((m=(p=_(this,gt).config).onSuccess)==null?void 0:m.call(p,F,l,this.state.context,this,r)),await((x=(v=this.options).onSuccess)==null?void 0:x.call(v,F,l,this.state.context,r)),await((j=(S=_(this,gt).config).onSettled)==null?void 0:j.call(S,F,null,this.state.variables,this.state.context,this,r)),await((E=(N=this.options).onSettled)==null?void 0:E.call(N,F,null,l,this.state.context,r)),xe(this,ga,bn).call(this,{type:"success",data:F}),F}catch(F){try{await((A=(C=_(this,gt).config).onError)==null?void 0:A.call(C,F,l,this.state.context,this,r))}catch(J){Promise.reject(J)}try{await((Z=($=this.options).onError)==null?void 0:Z.call($,F,l,this.state.context,r))}catch(J){Promise.reject(J)}try{await((X=(L=_(this,gt).config).onSettled)==null?void 0:X.call(L,void 0,F,this.state.variables,this.state.context,this,r))}catch(J){Promise.reject(J)}try{await((P=(W=this.options).onSettled)==null?void 0:P.call(W,void 0,F,l,this.state.context,r))}catch(J){Promise.reject(J)}throw xe(this,ga,bn).call(this,{type:"error",error:F}),F}finally{_(this,gt).runNext(this)}}},Ki=new WeakMap,ya=new WeakMap,gt=new WeakMap,hs=new WeakMap,ga=new WeakSet,bn=function(l){const i=r=>{switch(l.type){case"failed":return{...r,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...r,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:l.error,failureCount:r.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=i(this.state),nt.batch(()=>{_(this,ya).forEach(r=>{r.onMutationUpdate(l)}),_(this,gt).notify({mutation:this,type:"updated",action:l})})},ug);function Ng(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qa,ia,Vi,cg,Sb=(cg=class extends Ml{constructor(l={}){super();ce(this,Qa);ce(this,ia);ce(this,Vi);this.config=l,ae(this,Qa,new Set),ae(this,ia,new Map),ae(this,Vi,0)}build(l,i,r){const o=new bb({client:l,mutationCache:this,mutationId:++hu(this,Vi)._,options:l.defaultMutationOptions(i),state:r});return this.add(o),o}add(l){_(this,Qa).add(l);const i=mu(l);if(typeof i=="string"){const r=_(this,ia).get(i);r?r.push(l):_(this,ia).set(i,[l])}this.notify({type:"added",mutation:l})}remove(l){if(_(this,Qa).delete(l)){const i=mu(l);if(typeof i=="string"){const r=_(this,ia).get(i);if(r)if(r.length>1){const o=r.indexOf(l);o!==-1&&r.splice(o,1)}else r[0]===l&&_(this,ia).delete(i)}}this.notify({type:"removed",mutation:l})}canRun(l){const i=mu(l);if(typeof i=="string"){const r=_(this,ia).get(i),o=r==null?void 0:r.find(d=>d.state.status==="pending");return!o||o===l}else return!0}runNext(l){var r;const i=mu(l);if(typeof i=="string"){const o=(r=_(this,ia).get(i))==null?void 0:r.find(d=>d!==l&&d.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nt.batch(()=>{_(this,Qa).forEach(l=>{this.notify({type:"removed",mutation:l})}),_(this,Qa).clear(),_(this,ia).clear()})}getAll(){return Array.from(_(this,Qa))}find(l){const i={exact:!0,...l};return this.getAll().find(r=>fy(i,r))}findAll(l={}){return this.getAll().filter(i=>fy(l,i))}notify(l){nt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}resumePausedMutations(){const l=this.getAll().filter(i=>i.state.isPaused);return nt.batch(()=>Promise.all(l.map(i=>i.continue().catch(bt))))}},Qa=new WeakMap,ia=new WeakMap,Vi=new WeakMap,cg);function mu(n){var l;return(l=n.options.scope)==null?void 0:l.id}var Ya,Tn,wt,Ga,Xa,xu,Af,og,jb=(og=class extends Ml{constructor(i,r){super();ce(this,Xa);ce(this,Ya);ce(this,Tn);ce(this,wt);ce(this,Ga);ae(this,Ya,i),this.setOptions(r),this.bindMethods(),xe(this,Xa,xu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var o;const r=this.options;this.options=_(this,Ya).defaultMutationOptions(i),Nu(this.options,r)||_(this,Ya).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,wt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ps(r.mutationKey)!==ps(this.options.mutationKey)?this.reset():((o=_(this,wt))==null?void 0:o.state.status)==="pending"&&_(this,wt).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=_(this,wt))==null||i.removeObserver(this)}onMutationUpdate(i){xe(this,Xa,xu).call(this),xe(this,Xa,Af).call(this,i)}getCurrentResult(){return _(this,Tn)}reset(){var i;(i=_(this,wt))==null||i.removeObserver(this),ae(this,wt,void 0),xe(this,Xa,xu).call(this),xe(this,Xa,Af).call(this)}mutate(i,r){var o;return ae(this,Ga,r),(o=_(this,wt))==null||o.removeObserver(this),ae(this,wt,_(this,Ya).getMutationCache().build(_(this,Ya),this.options)),_(this,wt).addObserver(this),_(this,wt).execute(i)}},Ya=new WeakMap,Tn=new WeakMap,wt=new WeakMap,Ga=new WeakMap,Xa=new WeakSet,xu=function(){var r;const i=((r=_(this,wt))==null?void 0:r.state)??Ng();ae(this,Tn,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Af=function(i){nt.batch(()=>{var r,o,d,h,g,p,m,v;if(_(this,Ga)&&this.hasListeners()){const x=_(this,Tn).variables,S=_(this,Tn).context,j={client:_(this,Ya),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(o=(r=_(this,Ga)).onSuccess)==null||o.call(r,i.data,x,S,j)}catch(N){Promise.reject(N)}try{(h=(d=_(this,Ga)).onSettled)==null||h.call(d,i.data,null,x,S,j)}catch(N){Promise.reject(N)}}else if((i==null?void 0:i.type)==="error"){try{(p=(g=_(this,Ga)).onError)==null||p.call(g,i.error,x,S,j)}catch(N){Promise.reject(N)}try{(v=(m=_(this,Ga)).onSettled)==null||v.call(m,void 0,i.error,x,S,j)}catch(N){Promise.reject(N)}}}this.listeners.forEach(x=>{x(_(this,Tn))})})},og),pa,fg,Nb=(fg=class extends Ml{constructor(l={}){super();ce(this,pa);this.config=l,ae(this,pa,new Map)}build(l,i,r){const o=i.queryKey,d=i.queryHash??Qf(o,i);let h=this.get(d);return h||(h=new yb({client:l,queryKey:o,queryHash:d,options:l.defaultQueryOptions(i),state:r,defaultOptions:l.getQueryDefaults(o)}),this.add(h)),h}add(l){_(this,pa).has(l.queryHash)||(_(this,pa).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const i=_(this,pa).get(l.queryHash);i&&(l.destroy(),i===l&&_(this,pa).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){nt.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return _(this,pa).get(l)}getAll(){return[..._(this,pa).values()]}find(l){const i={exact:!0,...l};return this.getAll().find(r=>oy(i,r))}findAll(l={}){const i=this.getAll();return Object.keys(l).length>0?i.filter(r=>oy(l,r)):i}notify(l){nt.batch(()=>{this.listeners.forEach(i=>{i(l)})})}onFocus(){nt.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){nt.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},pa=new WeakMap,fg),$e,Mn,Cn,Sl,jl,wn,Nl,Rl,dg,Rb=(dg=class{constructor(n={}){ce(this,$e);ce(this,Mn);ce(this,Cn);ce(this,Sl);ce(this,jl);ce(this,wn);ce(this,Nl);ce(this,Rl);ae(this,$e,n.queryCache||new Nb),ae(this,Mn,n.mutationCache||new Sb),ae(this,Cn,n.defaultOptions||{}),ae(this,Sl,new Map),ae(this,jl,new Map),ae(this,wn,0)}mount(){hu(this,wn)._++,_(this,wn)===1&&(ae(this,Nl,Hf.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,$e).onFocus())})),ae(this,Rl,Ru.subscribe(async n=>{n&&(await this.resumePausedMutations(),_(this,$e).onOnline())})))}unmount(){var n,l;hu(this,wn)._--,_(this,wn)===0&&((n=_(this,Nl))==null||n.call(this),ae(this,Nl,void 0),(l=_(this,Rl))==null||l.call(this),ae(this,Rl,void 0))}isFetching(n){return _(this,$e).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return _(this,Mn).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=_(this,$e).get(l.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const l=this.defaultQueryOptions(n),i=_(this,$e).build(this,l),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(zn(l.staleTime,i))&&this.prefetchQuery(l),Promise.resolve(r))}getQueriesData(n){return _(this,$e).findAll(n).map(({queryKey:l,state:i})=>{const r=i.data;return[l,r]})}setQueryData(n,l,i){const r=this.defaultQueryOptions({queryKey:n}),o=_(this,$e).get(r.queryHash),d=o==null?void 0:o.state.data,h=lb(l,d);if(h!==void 0)return _(this,$e).build(this,r).setData(h,{...i,manual:!0})}setQueriesData(n,l,i){return nt.batch(()=>_(this,$e).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,l,i)]))}getQueryState(n){var i;const l=this.defaultQueryOptions({queryKey:n});return(i=_(this,$e).get(l.queryHash))==null?void 0:i.state}removeQueries(n){const l=_(this,$e);nt.batch(()=>{l.findAll(n).forEach(i=>{l.remove(i)})})}resetQueries(n,l){const i=_(this,$e);return nt.batch(()=>(i.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},l)))}cancelQueries(n,l={}){const i={revert:!0,...l},r=nt.batch(()=>_(this,$e).findAll(n).map(o=>o.cancel(i)));return Promise.all(r).then(bt).catch(bt)}invalidateQueries(n,l={}){return nt.batch(()=>(_(this,$e).findAll(n).forEach(i=>{i.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"},l)))}refetchQueries(n,l={}){const i={...l,cancelRefetch:l.cancelRefetch??!0},r=nt.batch(()=>_(this,$e).findAll(n).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let d=o.fetch(void 0,i);return i.throwOnError||(d=d.catch(bt)),o.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(bt)}fetchQuery(n){const l=this.defaultQueryOptions(n);l.retry===void 0&&(l.retry=!1);const i=_(this,$e).build(this,l);return i.isStaleByTime(zn(l.staleTime,i))?i.fetch(l):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(bt).catch(bt)}fetchInfiniteQuery(n){return n.behavior=xy(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(bt).catch(bt)}ensureInfiniteQueryData(n){return n.behavior=xy(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Ru.isOnline()?_(this,Mn).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,$e)}getMutationCache(){return _(this,Mn)}getDefaultOptions(){return _(this,Cn)}setDefaultOptions(n){ae(this,Cn,n)}setQueryDefaults(n,l){_(this,Sl).set(ps(n),{queryKey:n,defaultOptions:l})}getQueryDefaults(n){const l=[..._(this,Sl).values()],i={};return l.forEach(r=>{Di(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,l){_(this,jl).set(ps(n),{mutationKey:n,defaultOptions:l})}getMutationDefaults(n){const l=[..._(this,jl).values()],i={};return l.forEach(r=>{Di(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const l={..._(this,Cn).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return l.queryHash||(l.queryHash=Qf(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===Yf&&(l.enabled=!1),l}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{..._(this,Cn).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){_(this,$e).clear(),_(this,Mn).clear()}},$e=new WeakMap,Mn=new WeakMap,Cn=new WeakMap,Sl=new WeakMap,jl=new WeakMap,wn=new WeakMap,Nl=new WeakMap,Rl=new WeakMap,dg),Rg=Q.createContext(void 0),Un=n=>{const l=Q.useContext(Rg);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},_b=({client:n,children:l})=>(Q.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(Rg.Provider,{value:n,children:l})),_g=Q.createContext(!1),Eb=()=>Q.useContext(_g);_g.Provider;function Tb(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var Mb=Q.createContext(Tb()),Cb=()=>Q.useContext(Mb),wb=(n,l,i)=>{const r=i!=null&&i.state.error&&typeof n.throwOnError=="function"?Gf(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||r)&&(l.isReset()||(n.retryOnMount=!1))},Ab=n=>{Q.useEffect(()=>{n.clearReset()},[n])},Ob=({result:n,errorResetBoundary:l,throwOnError:i,query:r,suspense:o})=>n.isError&&!l.isReset()&&!n.isFetching&&r&&(o&&n.data===void 0||Gf(i,[n.error,r])),zb=n=>{if(n.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...o)=>i(r(...o)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Db=(n,l)=>n.isLoading&&n.isFetching&&!l,Lb=(n,l)=>(n==null?void 0:n.suspense)&&l.isPending,by=(n,l,i)=>l.fetchOptimistic(n).catch(()=>{i.clearReset()});function Ub(n,l,i){var S,j,N,E;const r=Eb(),o=Cb(),d=Un(),h=d.defaultQueryOptions(n);(j=(S=d.getDefaultOptions().queries)==null?void 0:S._experimental_beforeQuery)==null||j.call(S,h);const g=d.getQueryCache().get(h.queryHash);h._optimisticResults=r?"isRestoring":"optimistic",zb(h),wb(h,o,g),Ab(o);const p=!d.getQueryCache().get(h.queryHash),[m]=Q.useState(()=>new l(d,h)),v=m.getOptimisticResult(h),x=!r&&n.subscribed!==!1;if(Q.useSyncExternalStore(Q.useCallback(C=>{const A=x?m.subscribe(nt.batchCalls(C)):bt;return m.updateResult(),A},[m,x]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),Q.useEffect(()=>{m.setOptions(h)},[h,m]),Lb(h,v))throw by(h,m,o);if(Ob({result:v,errorResetBoundary:o,throwOnError:h.throwOnError,query:g,suspense:h.suspense}))throw v.error;if((E=(N=d.getDefaultOptions().queries)==null?void 0:N._experimental_afterQuery)==null||E.call(N,h,v),h.experimental_prefetchInRender&&!Li.isServer()&&Db(v,r)){const C=p?by(h,m,o):g==null?void 0:g.promise;C==null||C.catch(bt).finally(()=>{m.updateResult()})}return h.notifyOnChangeProps?v:m.trackResult(v)}function Ve(n,l){return Ub(n,gb)}function Bb(n,l){const i=Un(),[r]=Q.useState(()=>new jb(i,n));Q.useEffect(()=>{r.setOptions(n)},[r,n]);const o=Q.useSyncExternalStore(Q.useCallback(h=>r.subscribe(nt.batchCalls(h)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),d=Q.useCallback((h,g)=>{r.mutate(h,g).catch(bt)},[r]);if(o.error&&Gf(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:d,mutateAsync:o.mutate}}var Oi=typeof window<"u"?Q.useLayoutEffect:Q.useEffect;function af(n){const l=Q.useRef({value:n,prev:null}),i=l.current.value;return n!==i&&(l.current={value:n,prev:i}),l.current.prev}function qb(n,l,i={},r={}){Q.useEffect(()=>{if(!n.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([d])=>{l(d)},i);return o.observe(n.current),()=>{o.disconnect()}},[l,i,r.disabled,n])}function Hb(n){const l=Q.useRef(null);return Q.useImperativeHandle(n,()=>l.current,[]),l}var Eg=!1;function Ui(n){return n[n.length-1]}function Qb(n){return typeof n=="function"}function An(n,l){return Qb(n)?n(l):n}var Yb=Object.prototype.hasOwnProperty,Sy=Object.prototype.propertyIsEnumerable,Gb=()=>Object.create(null),ts=(n,l)=>Ka(n,l,Gb);function Ka(n,l,i=()=>({}),r=0){if(n===l)return n;if(r>500)return l;const o=l,d=Ry(n)&&Ry(o);if(!d&&!(_l(n)&&_l(o)))return o;const h=d?n:jy(n);if(!h)return o;const g=d?o:jy(o);if(!g)return o;const p=h.length,m=g.length,v=d?new Array(m):i();let x=0;for(let S=0;S<m;S++){const j=d?S:g[S],N=n[j],E=o[j];if(N===E){v[j]=N,(d?S<p:Yb.call(n,j))&&x++;continue}if(N===null||E===null||typeof N!="object"||typeof E!="object"){v[j]=E;continue}const C=Ka(N,E,i,r+1);v[j]=C,C===N&&x++}return p===m&&x===p?n:v}function jy(n){const l=Object.getOwnPropertyNames(n);for(const o of l)if(!Sy.call(n,o))return!1;const i=Object.getOwnPropertySymbols(n);if(i.length===0)return l;const r=l;for(const o of i){if(!Sy.call(n,o))return!1;r.push(o)}return r}function _l(n){if(!Ny(n))return!1;const l=n.constructor;if(typeof l>"u")return!0;const i=l.prototype;return!(!Ny(i)||!i.hasOwnProperty("isPrototypeOf"))}function Ny(n){return Object.prototype.toString.call(n)==="[object Object]"}function Ry(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ms(n,l,i){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(Array.isArray(n)&&Array.isArray(l)){if(n.length!==l.length)return!1;for(let r=0,o=n.length;r<o;r++)if(!ms(n[r],l[r],i))return!1;return!0}if(_l(n)&&_l(l)){const r=(i==null?void 0:i.ignoreUndefined)??!0;if(i!=null&&i.partial){for(const h in l)if((!r||l[h]!==void 0)&&!ms(n[h],l[h],i))return!1;return!0}let o=0;if(!r)o=Object.keys(n).length;else for(const h in n)n[h]!==void 0&&o++;let d=0;for(const h in l)if((!r||l[h]!==void 0)&&(d++,d>o||!ms(n[h],l[h],i)))return!1;return o===d}return!1}function El(n){let l,i;const r=new Promise((o,d)=>{l=o,i=d});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,l(o),n==null||n(o)},r.reject=o=>{r.status="rejected",i(o)},r}function Bi(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function Kb(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function _y(n){let l;try{l=decodeURI(n)}catch{l=n.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return Kb(l)}var Vb=["http:","https:","mailto:","tel:"];function _u(n,l){if(!n)return!1;try{const i=new URL(n);return!l.has(i.protocol)}catch{return!1}}function _i(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const l=/%25|%5C/gi;let i=0,r="",o;for(;(o=l.exec(n))!==null;)r+=_y(n.slice(i,o.index))+o[0],i=l.lastIndex;r=r+_y(i?n.slice(i):n);let d=!1;return r.startsWith("//")&&(d=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:d}}function Xb(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function kb(n,l){if(n===l)return!0;if(n.length!==l.length)return!1;for(let i=0;i<n.length;i++)if(n[i]!==l[i])return!1;return!0}function Va(){throw new Error("Invariant failed")}function qi(n){const l=new Map;let i,r;const o=d=>{d.next&&(d.prev?(d.prev.next=d.next,d.next.prev=d.prev,d.next=void 0,r&&(r.next=d,d.prev=r)):(d.next.prev=void 0,i=d.next,d.next=void 0,r&&(d.prev=r,r.next=d)),r=d)};return{get(d){const h=l.get(d);if(h)return o(h),h.value},set(d,h){if(l.size>=n&&i){const p=i;l.delete(p.key),p.next&&(i=p.next,p.next.prev=void 0),p===r&&(r=void 0)}const g=l.get(d);if(g)g.value=h,o(g);else{const p={key:d,value:h,prev:r};r&&(r.next=p),r=p,i||(i=p),l.set(d,p)}},clear(){l.clear(),i=void 0,r=void 0}}}var ns=4,Tg=5;function Zb(n){const l=n.indexOf("{");if(l===-1)return null;const i=n.indexOf("}",l);return i===-1||l+1>=n.length?null:[l,i]}function Vf(n,l,i=new Uint16Array(6)){const r=n.indexOf("/",l),o=r===-1?n.length:r,d=n.substring(l,o);if(!d||!d.includes("$"))return i[0]=0,i[1]=l,i[2]=l,i[3]=o,i[4]=o,i[5]=o,i;if(d==="$"){const g=n.length;return i[0]=2,i[1]=l,i[2]=l,i[3]=g,i[4]=g,i[5]=g,i}if(d.charCodeAt(0)===36)return i[0]=1,i[1]=l,i[2]=l+1,i[3]=o,i[4]=o,i[5]=o,i;const h=Zb(d);if(h){const[g,p]=h,m=d.charCodeAt(g+1);if(m===45){if(g+2<d.length&&d.charCodeAt(g+2)===36){const v=g+3,x=p;if(v<x)return i[0]=3,i[1]=l+g,i[2]=l+v,i[3]=l+x,i[4]=l+p+1,i[5]=o,i}}else if(m===36){const v=g+1,x=g+2;return x===p?(i[0]=2,i[1]=l+g,i[2]=l+v,i[3]=l+x,i[4]=l+p+1,i[5]=n.length,i):(i[0]=1,i[1]=l+g,i[2]=l+x,i[3]=l+p,i[4]=l+p+1,i[5]=o,i)}}return i[0]=0,i[1]=l,i[2]=l,i[3]=o,i[4]=o,i[5]=o,i}function Ou(n,l,i,r,o,d,h){var p,m,v,x,S,j,N,E,C,A,$,Z,L;h==null||h(i);let g=r;{const X=i.fullPath??i.from,W=X.length,P=((p=i.options)==null?void 0:p.caseSensitive)??n,F=!!((v=(m=i.options)==null?void 0:m.params)!=null&&v.parse&&((S=(x=i.options)==null?void 0:x.skipRouteOnParseError)!=null&&S.params));for(;g<W;){const V=Vf(X,g,l);let I;const se=g,le=V[5];switch(g=le+1,d++,V[0]){case 0:{const ue=X.substring(V[2],V[3]);if(P){const ne=(j=o.static)==null?void 0:j.get(ue);if(ne)I=ne;else{o.static??(o.static=new Map);const O=ss(i.fullPath??i.from);O.parent=o,O.depth=d,I=O,o.static.set(ue,O)}}else{const ne=ue.toLowerCase(),O=(N=o.staticInsensitive)==null?void 0:N.get(ne);if(O)I=O;else{o.staticInsensitive??(o.staticInsensitive=new Map);const Y=ss(i.fullPath??i.from);Y.parent=o,Y.depth=d,I=Y,o.staticInsensitive.set(ne,Y)}}break}case 1:{const ue=X.substring(se,V[1]),ne=X.substring(V[4],le),O=P&&!!(ue||ne),Y=ue?O?ue:ue.toLowerCase():void 0,te=ne?O?ne:ne.toLowerCase():void 0,me=!F&&((E=o.dynamic)==null?void 0:E.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===O&&oe.prefix===Y&&oe.suffix===te));if(me)I=me;else{const oe=sf(1,i.fullPath??i.from,O,Y,te);I=oe,oe.depth=d,oe.parent=o,o.dynamic??(o.dynamic=[]),o.dynamic.push(oe)}break}case 3:{const ue=X.substring(se,V[1]),ne=X.substring(V[4],le),O=P&&!!(ue||ne),Y=ue?O?ue:ue.toLowerCase():void 0,te=ne?O?ne:ne.toLowerCase():void 0,me=!F&&((C=o.optional)==null?void 0:C.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===O&&oe.prefix===Y&&oe.suffix===te));if(me)I=me;else{const oe=sf(3,i.fullPath??i.from,O,Y,te);I=oe,oe.parent=o,oe.depth=d,o.optional??(o.optional=[]),o.optional.push(oe)}break}case 2:{const ue=X.substring(se,V[1]),ne=X.substring(V[4],le),O=P&&!!(ue||ne),Y=ue?O?ue:ue.toLowerCase():void 0,te=ne?O?ne:ne.toLowerCase():void 0,me=sf(2,i.fullPath??i.from,O,Y,te);I=me,me.parent=o,me.depth=d,o.wildcard??(o.wildcard=[]),o.wildcard.push(me)}}o=I}if(F&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const V=ss(i.fullPath??i.from);V.kind=Tg,V.parent=o,d++,V.depth=d,o.pathless??(o.pathless=[]),o.pathless.push(V),o=V}const J=(i.path||!i.children)&&!i.isRoot;if(J&&X.endsWith("/")){const V=ss(i.fullPath??i.from);V.kind=ns,V.parent=o,d++,V.depth=d,o.index=V,o=V}o.parse=(($=(A=i.options)==null?void 0:A.params)==null?void 0:$.parse)??null,o.skipOnParamError=F,o.parsingPriority=((L=(Z=i.options)==null?void 0:Z.skipRouteOnParseError)==null?void 0:L.priority)??0,J&&!o.route&&(o.route=i,o.fullPath=i.fullPath??i.from)}if(i.children)for(const X of i.children)Ou(n,l,X,g,o,d,h)}function nf(n,l){if(n.skipOnParamError&&!l.skipOnParamError)return-1;if(!n.skipOnParamError&&l.skipOnParamError)return 1;if(n.skipOnParamError&&l.skipOnParamError&&(n.parsingPriority||l.parsingPriority))return l.parsingPriority-n.parsingPriority;if(n.prefix&&l.prefix&&n.prefix!==l.prefix){if(n.prefix.startsWith(l.prefix))return-1;if(l.prefix.startsWith(n.prefix))return 1}if(n.suffix&&l.suffix&&n.suffix!==l.suffix){if(n.suffix.endsWith(l.suffix))return-1;if(l.suffix.endsWith(n.suffix))return 1}return n.prefix&&!l.prefix?-1:!n.prefix&&l.prefix?1:n.suffix&&!l.suffix?-1:!n.suffix&&l.suffix?1:n.caseSensitive&&!l.caseSensitive?-1:!n.caseSensitive&&l.caseSensitive?1:0}function Sn(n){var l,i,r;if(n.pathless)for(const o of n.pathless)Sn(o);if(n.static)for(const o of n.static.values())Sn(o);if(n.staticInsensitive)for(const o of n.staticInsensitive.values())Sn(o);if((l=n.dynamic)!=null&&l.length){n.dynamic.sort(nf);for(const o of n.dynamic)Sn(o)}if((i=n.optional)!=null&&i.length){n.optional.sort(nf);for(const o of n.optional)Sn(o)}if((r=n.wildcard)!=null&&r.length){n.wildcard.sort(nf);for(const o of n.wildcard)Sn(o)}}function ss(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function sf(n,l,i,r,o){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:l,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:i,prefix:r,suffix:o}}function $b(n,l){const i=ss("/"),r=new Uint16Array(6);for(const o of n)Ou(!1,r,o,1,i,0);Sn(i),l.masksTree=i,l.flatCache=qi(1e3)}function Pb(n,l){n||(n="/");const i=l.flatCache.get(n);if(i)return i;const r=Xf(n,l.masksTree);return l.flatCache.set(n,r),r}function Fb(n,l,i,r,o){n||(n="/"),r||(r="/");const d=l?`case\0${n}`:n;let h=o.singleCache.get(d);return h||(h=ss("/"),Ou(l,new Uint16Array(6),{from:n},1,h,0),o.singleCache.set(d,h)),Xf(r,h,i)}function Jb(n,l,i=!1){const r=i?n:`nofuzz\0${n}`,o=l.matchCache.get(r);if(o!==void 0)return o;n||(n="/");let d;try{d=Xf(n,l.segmentTree,i)}catch(h){if(h instanceof URIError)d=null;else throw h}return d&&(d.branch=eS(d.route)),l.matchCache.set(r,d),d}function Ib(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function Wb(n,l=!1,i){const r=ss(n.fullPath),o=new Uint16Array(6),d={},h={};let g=0;return Ou(l,o,n,1,r,0,p=>{if(i==null||i(p,g),p.id in d&&Va(),d[p.id]=p,g!==0&&p.path){const m=Ib(p.fullPath);(!h[m]||p.fullPath.endsWith("/"))&&(h[m]=p)}g++}),Sn(r),{processedTree:{segmentTree:r,singleCache:qi(1e3),matchCache:qi(1e3),flatCache:null,masksTree:null},routesById:d,routesByPath:h}}function Xf(n,l,i=!1){const r=n.split("/"),o=aS(n,r,l,i);if(!o)return null;const[d]=Mg(n,r,o);return{route:o.node.route,rawParams:d,parsedParams:o.parsedParams}}function Mg(n,l,i){var v,x,S,j,N,E,C,A,$,Z;const r=tS(i.node);let o=null;const d=Object.create(null);let h=((v=i.extract)==null?void 0:v.part)??0,g=((x=i.extract)==null?void 0:x.node)??0,p=((S=i.extract)==null?void 0:S.path)??0,m=((j=i.extract)==null?void 0:j.segment)??0;for(;g<r.length;h++,g++,p++,m++){const L=r[g];if(L.kind===ns)break;if(L.kind===Tg){m--,h--,p--;continue}const X=l[h],W=p;if(X&&(p+=X.length),L.kind===1){o??(o=i.node.fullPath.split("/"));const P=o[m],F=((N=L.prefix)==null?void 0:N.length)??0;if(P.charCodeAt(F)===123){const J=((E=L.suffix)==null?void 0:E.length)??0,V=P.substring(F+2,P.length-J-1),I=X.substring(F,X.length-J);d[V]=decodeURIComponent(I)}else{const J=P.substring(1);d[J]=decodeURIComponent(X)}}else if(L.kind===3){if(i.skipped&1<<g){h--,p=W-1;continue}o??(o=i.node.fullPath.split("/"));const P=o[m],F=((C=L.prefix)==null?void 0:C.length)??0,J=((A=L.suffix)==null?void 0:A.length)??0,V=P.substring(F+3,P.length-J-1),I=L.suffix||L.prefix?X.substring(F,X.length-J):X;I&&(d[V]=decodeURIComponent(I))}else if(L.kind===2){const P=L,F=n.substring(W+((($=P.prefix)==null?void 0:$.length)??0),n.length-(((Z=P.suffix)==null?void 0:Z.length)??0)),J=decodeURIComponent(F);d["*"]=J,d._splat=J;break}}return i.rawParams&&Object.assign(d,i.rawParams),[d,{part:h,node:g,path:p,segment:m}]}function eS(n){const l=[n];for(;n.parentRoute;)n=n.parentRoute,l.push(n);return l.reverse(),l}function tS(n){const l=Array(n.depth+1);do l[n.depth]=n,n=n.parent;while(n);return l}function aS(n,l,i,r){if(n==="/"&&i.index)return{node:i.index,skipped:0};const o=!Ui(l),d=o&&n!=="/",h=l.length-(o?1:0),g=[{node:i,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let p=null,m=null,v=null;for(;g.length;){const x=g.pop(),{node:S,index:j,skipped:N,depth:E,statics:C,dynamics:A,optionals:$}=x;let{extract:Z,rawParams:L,parsedParams:X}=x;if(S.skipOnParamError){if(!lf(n,l,x))continue;L=x.rawParams,Z=x.extract,X=x.parsedParams}r&&S.route&&S.kind!==ns&&Ei(m,x)&&(m=x);const W=j===h;if(W&&(S.route&&!d&&Ei(v,x)&&(v=x),!S.optional&&!S.wildcard&&!S.index&&!S.pathless))continue;const P=W?void 0:l[j];let F;if(W&&S.index){const J={node:S.index,index:j,skipped:N,depth:E+1,statics:C,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X};let V=!0;if(S.index.skipOnParamError&&(lf(n,l,J)||(V=!1)),V){if(C===h&&!A&&!$&&!N)return J;Ei(v,J)&&(v=J)}}if(S.wildcard&&Ei(p,x))for(const J of S.wildcard){const{prefix:V,suffix:I}=J;if(V&&(W||!(J.caseSensitive?P:F??(F=P.toLowerCase())).startsWith(V)))continue;if(I){if(W)continue;const le=l.slice(j).join("/").slice(-I.length);if((J.caseSensitive?le:le.toLowerCase())!==I)continue}const se={node:J,index:h,skipped:N,depth:E,statics:C,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X};if(!(J.skipOnParamError&&!lf(n,l,se))){p=se;break}}if(S.optional){const J=N|1<<E,V=E+1;for(let I=S.optional.length-1;I>=0;I--){const se=S.optional[I];g.push({node:se,index:j,skipped:J,depth:V,statics:C,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X})}if(!W)for(let I=S.optional.length-1;I>=0;I--){const se=S.optional[I],{prefix:le,suffix:ue}=se;if(le||ue){const ne=se.caseSensitive?P:F??(F=P.toLowerCase());if(le&&!ne.startsWith(le)||ue&&!ne.endsWith(ue))continue}g.push({node:se,index:j+1,skipped:N,depth:V,statics:C,dynamics:A,optionals:$+1,extract:Z,rawParams:L,parsedParams:X})}}if(!W&&S.dynamic&&P)for(let J=S.dynamic.length-1;J>=0;J--){const V=S.dynamic[J],{prefix:I,suffix:se}=V;if(I||se){const le=V.caseSensitive?P:F??(F=P.toLowerCase());if(I&&!le.startsWith(I)||se&&!le.endsWith(se))continue}g.push({node:V,index:j+1,skipped:N,depth:E+1,statics:C,dynamics:A+1,optionals:$,extract:Z,rawParams:L,parsedParams:X})}if(!W&&S.staticInsensitive){const J=S.staticInsensitive.get(F??(F=P.toLowerCase()));J&&g.push({node:J,index:j+1,skipped:N,depth:E+1,statics:C+1,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X})}if(!W&&S.static){const J=S.static.get(P);J&&g.push({node:J,index:j+1,skipped:N,depth:E+1,statics:C+1,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X})}if(S.pathless){const J=E+1;for(let V=S.pathless.length-1;V>=0;V--){const I=S.pathless[V];g.push({node:I,index:j,skipped:N,depth:J,statics:C,dynamics:A,optionals:$,extract:Z,rawParams:L,parsedParams:X})}}}if(v&&p)return Ei(p,v)?v:p;if(v)return v;if(p)return p;if(r&&m){let x=m.index;for(let j=0;j<m.index;j++)x+=l[j].length;const S=x===n.length?"/":n.slice(x);return m.rawParams??(m.rawParams=Object.create(null)),m.rawParams["**"]=decodeURIComponent(S),m}return null}function lf(n,l,i){try{const[r,o]=Mg(n,l,i);i.rawParams=r,i.extract=o;const d=i.node.parse(r);return i.parsedParams=Object.assign(Object.create(null),i.parsedParams,d),!0}catch{return null}}function Ei(n,l){return n?l.statics>n.statics||l.statics===n.statics&&(l.dynamics>n.dynamics||l.dynamics===n.dynamics&&(l.optionals>n.optionals||l.optionals===n.optionals&&((l.node.kind===ns)>(n.node.kind===ns)||l.node.kind===ns==(n.node.kind===ns)&&l.depth>n.depth))):!0}function vu(n){return kf(n.filter(l=>l!==void 0).join("/"))}function kf(n){return n.replace(/\/{2,}/g,"/")}function Cg(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function Dn(n){const l=n.length;return l>1&&n[l-1]==="/"?n.replace(/\/{1,}$/,""):n}function wg(n){return Dn(Cg(n))}function Eu(n,l){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${l}/`?n.slice(0,-1):n}function nS(n,l,i){return Eu(n,i)===Eu(l,i)}function sS({base:n,to:l,trailingSlash:i="never",cache:r}){const o=l.startsWith("/"),d=!o&&l===".";let h;if(r){h=o?l:d?n:n+"\0"+l;const x=r.get(h);if(x)return x}let g;if(d)g=n.split("/");else if(o)g=l.split("/");else{for(g=n.split("/");g.length>1&&Ui(g)==="";)g.pop();const x=l.split("/");for(let S=0,j=x.length;S<j;S++){const N=x[S];N===""?S?S===j-1&&g.push(N):g=[N]:N===".."?g.pop():N==="."||g.push(N)}}g.length>1&&(Ui(g)===""?i==="never"&&g.pop():i==="always"&&g.push(""));let p,m="";for(let x=0;x<g.length;x++){x>0&&(m+="/");const S=g[x];if(!S)continue;p=Vf(S,0,p);const j=p[0];if(j===0){m+=S;continue}const N=p[5],E=S.substring(0,p[1]),C=S.substring(p[4],N),A=S.substring(p[2],p[3]);j===1?m+=E||C?`${E}{$${A}}${C}`:`$${A}`:j===2?m+=E||C?`${E}{$}${C}`:"$":m+=`${E}{-$${A}}${C}`}m=kf(m);const v=m||"/";return h&&r&&r.set(h,v),v}function lS(n){const l=new Map(n.map(o=>[encodeURIComponent(o),o])),i=Array.from(l.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(i,"g");return o=>o.replace(r,d=>l.get(d)??d)}function rf(n,l,i){const r=l[n];return typeof r!="string"?r:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>Ty(o,i)).join("/"):Ty(r,i)}function Ey({path:n,params:l,decoder:i,...r}){let o=!1;const d=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:d,isMissingParams:o};if(!n.includes("$"))return{interpolatedPath:n,usedParams:d,isMissingParams:o};const h=n.length;let g=0,p,m="";for(;g<h;){const v=g;p=Vf(n,v,p);const x=p[5];if(g=x+1,v===x)continue;const S=p[0];if(S===0){m+="/"+n.substring(v,x);continue}if(S===2){const j=l._splat;d._splat=j,d["*"]=j;const N=n.substring(v,p[1]),E=n.substring(p[4],x);if(!j){o=!0,(N||E)&&(m+="/"+N+E);continue}const C=rf("_splat",l,i);m+="/"+N+C+E;continue}if(S===1){const j=n.substring(p[2],p[3]);!o&&!(j in l)&&(o=!0),d[j]=l[j];const N=n.substring(v,p[1]),E=n.substring(p[4],x),C=rf(j,l,i)??"undefined";m+="/"+N+C+E;continue}if(S===3){const j=n.substring(p[2],p[3]),N=l[j];if(N==null)continue;d[j]=N;const E=n.substring(v,p[1]),C=n.substring(p[4],x),A=rf(j,l,i)??"";m+="/"+E+A+C;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:d,interpolatedPath:m||"/",isMissingParams:o}}function Ty(n,l){const i=encodeURIComponent(n);return(l==null?void 0:l(i))??i}function St(n){return!!(n!=null&&n.isNotFound)}function iS(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var rS="tsr-scroll-restoration-v1_3";function uS(){const n=iS();if(!n)return null;let l={};try{const r=JSON.parse(n.getItem("tsr-scroll-restoration-v1_3")||"{}");_l(r)&&(l=r)}catch{}return{get state(){return l},set:r=>{l=An(r,l)||l},persist:()=>{try{n.setItem(rS,JSON.stringify(l))}catch{}}}}var My=uS(),cS=n=>n.state.__TSR_key||n.href;function oS(n){const l=[];let i;for(;i=n.parentNode;)l.push(`${n.tagName}:nth-child(${Array.prototype.indexOf.call(i.children,n)+1})`),n=i;return`${l.reverse().join(" > ")}`.toLowerCase()}var yu=!1,Ti="window",Cy="data-scroll-restoration-id";function fS(n,l){if(!My)return;const i=My;if((n.options.scrollRestoration??!1)&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup||!i)return;n.isScrollRestorationSetup=!0,yu=!1;const r=n.options.getScrollRestorationKey||cS,o=new Map;window.history.scrollRestoration="manual";const d=g=>{if(!(yu||!n.isScrollRestoring))if(g.target===document||g.target===window)o.set(Ti,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=g.target;o.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},h=g=>{var m;if(!n.isScrollRestoring||!g||o.size===0||!i)return;const p=(m=i.state)[g]||(m[g]={});for(const[v,x]of o){let S;if(v===Ti)S=Ti;else if(v.isConnected){const j=v.getAttribute(Cy);S=j?`[${Cy}="${j}"]`:oS(v)}S&&(p[S]=x)}};document.addEventListener("scroll",d,!0),n.subscribe("onBeforeLoad",g=>{h(g.fromLocation?r(g.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{h(r(n.stores.resolvedLocation.state??n.stores.location.state)),i.persist()}),n.subscribe("onRendered",g=>{var x;const p=r(g.toLocation),m=n.options.scrollRestorationBehavior,v=n.options.scrollToTopSelectors;if(o.clear(),!n.resetNextScroll){n.resetNextScroll=!0;return}if(!(typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))){yu=!0;try{const S=n.isScrollRestoring?i.state[p]:void 0;let j=!1;if(S)for(const N in S){const E=S[N];if(!_l(E))continue;const{scrollX:C,scrollY:A}=E;if(!(!Number.isFinite(C)||!Number.isFinite(A))){if(N===Ti)window.scrollTo({top:A,left:C,behavior:m}),j=!0;else if(N){let $;try{$=document.querySelector(N)}catch{continue}$&&($.scrollLeft=C,$.scrollTop=A,j=!0)}}}if(!j){const N=n.history.location.hash.slice(1);if(N){const E=((x=window.history.state)==null?void 0:x.__hashScrollIntoViewOptions)??!0;if(E){const C=document.getElementById(N);C&&C.scrollIntoView(E)}}else{const E={top:0,left:0,behavior:m};if(window.scrollTo(E),v)for(const C of v){if(C===Ti)continue;const A=typeof C=="function"?C():document.querySelector(C);A&&A.scrollTo(E)}}}}finally{yu=!1}n.isScrollRestoring&&i.set(S=>(S[p]||(S[p]={}),S))}})}function dS(n,l=String){const i=new URLSearchParams;for(const r in n){const o=n[r];o!==void 0&&i.set(r,l(o))}return i.toString()}function uf(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function hS(n){const l=new URLSearchParams(n),i=Object.create(null);for(const[r,o]of l.entries()){const d=i[r];d==null?i[r]=uf(o):Array.isArray(d)?d.push(uf(o)):i[r]=[d,uf(o)]}return i}var mS=gS(JSON.parse),yS=pS(JSON.stringify,JSON.parse);function gS(n){return l=>{l[0]==="?"&&(l=l.substring(1));const i=hS(l);for(const r in i){const o=i[r];if(typeof o=="string")try{i[r]=n(o)}catch{}}return i}}function pS(n,l){const i=typeof l=="function";function r(o){if(typeof o=="object"&&o!==null)try{return n(o)}catch{}else if(i&&typeof o=="string")try{return l(o),n(o)}catch{}return o}return o=>{const d=dS(o,r);return d?`?${d}`:""}}var ys="__root__";function xS(n){if(n.statusCode=n.statusCode||n.code||307,!n._builtLocation&&!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const l=new Headers(n.headers);n.href&&l.get("Location")===null&&l.set("Location",n.href);const i=new Response(null,{status:n.statusCode,headers:l});if(i.options=n,n.throw)throw i;return i}function At(n){return n instanceof Response&&!!n.options}function vS(n){return{input:({url:l})=>{for(const i of n)l=Of(i,l);return l},output:({url:l})=>{for(let i=n.length-1;i>=0;i--)l=Ag(n[i],l);return l}}}function bS(n){const l=wg(n.basepath),i=`/${l}`,r=`${i}/`,o=n.caseSensitive?i:i.toLowerCase(),d=n.caseSensitive?r:r.toLowerCase();return{input:({url:h})=>{const g=n.caseSensitive?h.pathname:h.pathname.toLowerCase();return g===o?h.pathname="/":g.startsWith(d)&&(h.pathname=h.pathname.slice(i.length)),h},output:({url:h})=>(h.pathname=vu(["/",l,h.pathname]),h)}}function Of(n,l){var r;const i=(r=n==null?void 0:n.input)==null?void 0:r.call(n,{url:l});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return l}function Ag(n,l){var r;const i=(r=n==null?void 0:n.output)==null?void 0:r.call(n,{url:l});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return l}function SS(n,l){const{createMutableStore:i,createReadonlyStore:r,batch:o,init:d}=l,h=new Map,g=new Map,p=new Map,m=i(n.status),v=i(n.loadedAt),x=i(n.isLoading),S=i(n.isTransitioning),j=i(n.location),N=i(n.resolvedLocation),E=i(n.statusCode),C=i(n.redirect),A=i([]),$=i([]),Z=i([]),L=r(()=>cf(h,A.state)),X=r(()=>cf(g,$.state)),W=r(()=>cf(p,Z.state)),P=r(()=>A.state[0]),F=r(()=>A.state.some(Y=>{var te;return((te=h.get(Y))==null?void 0:te.state.status)==="pending"})),J=r(()=>{var Y;return{locationHref:j.state.href,resolvedLocationHref:(Y=N.state)==null?void 0:Y.href,status:m.state}}),V=r(()=>({status:m.state,loadedAt:v.state,isLoading:x.state,isTransitioning:S.state,matches:L.state,location:j.state,resolvedLocation:N.state,statusCode:E.state,redirect:C.state})),I=qi(64);function se(Y){let te=I.get(Y);return te||(te=r(()=>{const me=A.state;for(const oe of me){const T=h.get(oe);if(T&&T.routeId===Y)return T.state}}),I.set(Y,te)),te}const le={status:m,loadedAt:v,isLoading:x,isTransitioning:S,location:j,resolvedLocation:N,statusCode:E,redirect:C,matchesId:A,pendingMatchesId:$,cachedMatchesId:Z,activeMatchesSnapshot:L,pendingMatchesSnapshot:X,cachedMatchesSnapshot:W,firstMatchId:P,hasPendingMatches:F,matchRouteReactivity:J,activeMatchStoresById:h,pendingMatchStoresById:g,cachedMatchStoresById:p,__store:V,getMatchStoreByRouteId:se,setActiveMatches:ue,setPendingMatches:ne,setCachedMatches:O};ue(n.matches),d==null||d(le);function ue(Y){of(Y,h,A,i,o)}function ne(Y){of(Y,g,$,i,o)}function O(Y){of(Y,p,Z,i,o)}return le}function cf(n,l){const i=[];for(const r of l){const o=n.get(r);o&&i.push(o.state)}return i}function of(n,l,i,r,o){const d=n.map(g=>g.id),h=new Set(d);o(()=>{for(const g of l.keys())h.has(g)||l.delete(g);for(const g of n){const p=l.get(g.id);if(!p){const m=r(g);m.routeId=g.routeId,l.set(g.id,m);continue}p.routeId=g.routeId,p.state!==g&&p.setState(()=>g)}kb(i.state,d)||i.setState(()=>d)})}var zf=n=>{var l;if(!n.rendered)return n.rendered=!0,(l=n.onReady)==null?void 0:l.call(n)},jS=n=>n.stores.matchesId.state.some(l=>{var i;return(i=n.stores.activeMatchStoresById.get(l))==null?void 0:i.state._forcePending}),zu=(n,l)=>!!(n.preload&&!n.router.stores.activeMatchStoresById.has(l)),gs=(n,l,i=!0)=>{const r={...n.router.options.context??{}},o=i?l:l-1;for(let d=0;d<=o;d++){const h=n.matches[d];if(!h)continue;const g=n.router.getMatch(h.id);g&&Object.assign(r,g.__routeContext,g.__beforeLoadContext)}return r},wy=(n,l)=>{if(!n.matches.length)return;const i=l.routeId,r=n.matches.findIndex(h=>h.routeId===n.router.routeTree.id),o=r>=0?r:0;let d=i?n.matches.findIndex(h=>h.routeId===i):n.firstBadMatchIndex??n.matches.length-1;d<0&&(d=o);for(let h=d;h>=0;h--){const g=n.matches[h];if(n.router.looseRoutesById[g.routeId].options.notFoundComponent)return h}return i?d:o},On=(n,l,i)=>{var r,o,d;if(!(!At(i)&&!St(i)))throw At(i)&&i.redirectHandled&&!i.options.reloadDocument||(l&&((r=l._nonReactive.beforeLoadPromise)==null||r.resolve(),(o=l._nonReactive.loaderPromise)==null||o.resolve(),l._nonReactive.beforeLoadPromise=void 0,l._nonReactive.loaderPromise=void 0,l._nonReactive.error=i,n.updateMatch(l.id,h=>({...h,status:At(i)?"redirected":h.status==="pending"?"success":h.status,context:gs(n,l.index),isFetching:!1,error:i})),St(i)&&!i.routeId&&(i.routeId=l.routeId),(d=l._nonReactive.loadPromise)==null||d.resolve()),At(i)&&(n.rendered=!0,i.options._fromLocation=n.location,i.redirectHandled=!0,i=n.router.resolveRedirect(i))),i},Og=(n,l)=>{const i=n.router.getMatch(l);return!!(!i||i._nonReactive.dehydrated)},Ay=(n,l,i)=>{const r=gs(n,i);n.updateMatch(l,o=>({...o,context:r}))},Mi=(n,l,i,r)=>{var g,p;const{id:o,routeId:d}=n.matches[l],h=n.router.looseRoutesById[d];if(i instanceof Promise)throw i;i.routerCode=r,n.firstBadMatchIndex??(n.firstBadMatchIndex=l),On(n,n.router.getMatch(o),i);try{(p=(g=h.options).onError)==null||p.call(g,i)}catch(m){i=m,On(n,n.router.getMatch(o),i)}n.updateMatch(o,m=>{var v,x;return(v=m._nonReactive.beforeLoadPromise)==null||v.resolve(),m._nonReactive.beforeLoadPromise=void 0,(x=m._nonReactive.loadPromise)==null||x.resolve(),{...m,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!n.preload&&!At(i)&&!St(i)&&(n.serialError??(n.serialError=i))},zg=(n,l,i,r)=>{var d;if(r._nonReactive.pendingTimeout!==void 0)return;const o=i.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!zu(n,l)&&(i.options.loader||i.options.beforeLoad||Lg(i))&&typeof o=="number"&&o!==1/0&&(i.options.pendingComponent??((d=n.router.options)==null?void 0:d.defaultPendingComponent))){const h=setTimeout(()=>{zf(n)},o);r._nonReactive.pendingTimeout=h}},NS=(n,l,i)=>{const r=n.router.getMatch(l);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;zg(n,l,i,r);const o=()=>{const d=n.router.getMatch(l);d.preload&&(d.status==="redirected"||d.status==="notFound")&&On(n,d,d.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},RS=(n,l,i,r)=>{const o=n.router.getMatch(l);let d=o._nonReactive.loadPromise;o._nonReactive.loadPromise=El(()=>{d==null||d.resolve(),d=void 0});const{paramsError:h,searchError:g}=o;h&&Mi(n,i,h,"PARSE_PARAMS"),g&&Mi(n,i,g,"VALIDATE_SEARCH"),zg(n,l,r,o);const p=new AbortController;let m=!1;const v=()=>{m||(m=!0,n.updateMatch(l,L=>({...L,isFetching:"beforeLoad",fetchCount:L.fetchCount+1,abortController:p})))},x=()=>{var L;(L=o._nonReactive.beforeLoadPromise)==null||L.resolve(),o._nonReactive.beforeLoadPromise=void 0,n.updateMatch(l,X=>({...X,isFetching:!1}))};if(!r.options.beforeLoad){n.router.batch(()=>{v(),x()});return}o._nonReactive.beforeLoadPromise=El();const S={...gs(n,i,!1),...o.__routeContext},{search:j,params:N,cause:E}=o,C=zu(n,l),A={search:j,abortController:p,params:N,preload:C,context:S,location:n.location,navigate:L=>n.router.navigate({...L,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:C?"preload":E,matches:n.matches,routeId:r.id,...n.router.options.additionalContext},$=L=>{if(L===void 0){n.router.batch(()=>{v(),x()});return}(At(L)||St(L))&&(v(),Mi(n,i,L,"BEFORE_LOAD")),n.router.batch(()=>{v(),n.updateMatch(l,X=>({...X,__beforeLoadContext:L})),x()})};let Z;try{if(Z=r.options.beforeLoad(A),Bi(Z))return v(),Z.catch(L=>{Mi(n,i,L,"BEFORE_LOAD")}).then($)}catch(L){v(),Mi(n,i,L,"BEFORE_LOAD")}$(Z)},_S=(n,l)=>{const{id:i,routeId:r}=n.matches[l],o=n.router.looseRoutesById[r],d=()=>g(),h=()=>RS(n,i,l,o),g=()=>{if(Og(n,i))return;const p=NS(n,i,o);return Bi(p)?p.then(h):h()};return d()},ES=(n,l,i)=>{var d,h,g,p,m,v;const r=n.router.getMatch(l);if(!r||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const o={ssr:n.router.options.ssr,matches:n.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(h=(d=i.options).head)==null?void 0:h.call(d,o),(p=(g=i.options).scripts)==null?void 0:p.call(g,o),(v=(m=i.options).headers)==null?void 0:v.call(m,o)]).then(([x,S,j])=>({meta:x==null?void 0:x.meta,links:x==null?void 0:x.links,headScripts:x==null?void 0:x.scripts,headers:j,scripts:S,styles:x==null?void 0:x.styles}))},Dg=(n,l,i,r,o)=>{const d=l[r-1],{params:h,loaderDeps:g,abortController:p,cause:m}=n.router.getMatch(i),v=gs(n,r),x=zu(n,i);return{params:h,deps:g,preload:!!x,parentMatchPromise:d,abortController:p,context:v,location:n.location,navigate:S=>n.router.navigate({...S,_fromLocation:n.location}),cause:x?"preload":m,route:o,...n.router.options.additionalContext}},Oy=async(n,l,i,r,o)=>{var d,h,g,p,m;try{const v=n.router.getMatch(i);try{(!(Eg??n.router.isServer)||v.ssr===!0)&&Hi(o);const x=o.options.loader,S=typeof x=="function"?x:x==null?void 0:x.handler,j=S==null?void 0:S(Dg(n,l,i,r,o)),N=!!S&&Bi(j);if((N||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||v._nonReactive.minPendingPromise)&&n.updateMatch(i,C=>({...C,isFetching:"loader"})),S){const C=N?await j:j;On(n,n.router.getMatch(i),C),C!==void 0&&n.updateMatch(i,A=>({...A,loaderData:C}))}o._lazyPromise&&await o._lazyPromise;const E=v._nonReactive.minPendingPromise;E&&await E,o._componentsPromise&&await o._componentsPromise,n.updateMatch(i,C=>({...C,error:void 0,context:gs(n,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(x){let S=x;if((S==null?void 0:S.name)==="AbortError"){if(v.abortController.signal.aborted){(d=v._nonReactive.loaderPromise)==null||d.resolve(),v._nonReactive.loaderPromise=void 0;return}n.updateMatch(i,N=>({...N,status:N.status==="pending"?"success":N.status,isFetching:!1,context:gs(n,r)}));return}const j=v._nonReactive.minPendingPromise;j&&await j,St(x)&&await((g=(h=o.options.notFoundComponent)==null?void 0:h.preload)==null?void 0:g.call(h)),On(n,n.router.getMatch(i),x);try{(m=(p=o.options).onError)==null||m.call(p,x)}catch(N){S=N,On(n,n.router.getMatch(i),N)}!At(S)&&!St(S)&&await Hi(o,["errorComponent"]),n.updateMatch(i,N=>({...N,error:S,context:gs(n,r),status:"error",isFetching:!1}))}}catch(v){const x=n.router.getMatch(i);x&&(x._nonReactive.loaderPromise=void 0),On(n,x,v)}},TS=async(n,l,i)=>{var j,N,E,C;async function r(A,$,Z,L,X){const W=Date.now()-$.updatedAt,P=A?X.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:X.options.staleTime??n.router.options.defaultStaleTime??0,F=X.options.shouldReload,J=typeof F=="function"?F(Dg(n,l,o,i,X)):F,{status:V,invalid:I}=L,se=W>=P&&(!!n.forceStaleReload||L.cause==="enter"||Z!==void 0&&Z!==L.id);h=V==="success"&&(I||(J??se)),A&&X.options.preload===!1||(h&&!n.sync&&v?(g=!0,(async()=>{var le,ue;try{await Oy(n,l,o,i,X);const ne=n.router.getMatch(o);(le=ne._nonReactive.loaderPromise)==null||le.resolve(),(ue=ne._nonReactive.loadPromise)==null||ue.resolve(),ne._nonReactive.loaderPromise=void 0,ne._nonReactive.loadPromise=void 0}catch(ne){At(ne)&&await n.router.navigate(ne.options)}})()):V!=="success"||h?await Oy(n,l,o,i,X):Ay(n,o,i))}const{id:o,routeId:d}=n.matches[i];let h=!1,g=!1;const p=n.router.looseRoutesById[d],m=p.options.loader,v=((typeof m=="function"||m==null?void 0:m.staleReloadMode)??n.router.options.defaultStaleReloadMode)!=="blocking";if(Og(n,o)){if(!n.router.getMatch(o))return n.matches[i];Ay(n,o,i)}else{const A=n.router.getMatch(o),$=n.router.stores.matchesId.state[i],Z=((j=$&&n.router.stores.activeMatchStoresById.get($)||null)==null?void 0:j.routeId)===d?$:(N=n.router.stores.activeMatchesSnapshot.state.find(X=>X.routeId===d))==null?void 0:N.id,L=zu(n,o);if(A._nonReactive.loaderPromise){if(A.status==="success"&&!n.sync&&!A.preload&&v)return A;await A._nonReactive.loaderPromise;const X=n.router.getMatch(o),W=X._nonReactive.error||X.error;W&&On(n,X,W),X.status==="pending"&&await r(L,A,Z,X,p)}else{const X=L&&!n.router.stores.activeMatchStoresById.has(o),W=n.router.getMatch(o);W._nonReactive.loaderPromise=El(),X!==W.preload&&n.updateMatch(o,P=>({...P,preload:X})),await r(L,A,Z,W,p)}}const x=n.router.getMatch(o);g||((E=x._nonReactive.loaderPromise)==null||E.resolve(),(C=x._nonReactive.loadPromise)==null||C.resolve(),x._nonReactive.loadPromise=void 0),clearTimeout(x._nonReactive.pendingTimeout),x._nonReactive.pendingTimeout=void 0,g||(x._nonReactive.loaderPromise=void 0),x._nonReactive.dehydrated=void 0;const S=g?x.isFetching:!1;return S!==x.isFetching||x.invalid!==!1?(n.updateMatch(o,A=>({...A,isFetching:S,invalid:!1})),n.router.getMatch(o)):x};async function zy(n){var S,j;const l=n,i=[];jS(l.router)&&zf(l);let r;for(let N=0;N<l.matches.length;N++){try{const E=_S(l,N);Bi(E)&&await E}catch(E){if(At(E))throw E;if(St(E))r=E;else if(!l.preload)throw E;break}if(l.serialError)break}const o=l.firstBadMatchIndex??l.matches.length,d=r&&!l.preload?wy(l,r):void 0,h=r&&l.preload?0:d!==void 0?Math.min(d+1,o):o;let g,p;for(let N=0;N<h;N++)i.push(TS(l,i,N));try{await Promise.all(i)}catch{const N=await Promise.allSettled(i);for(const E of N){if(E.status!=="rejected")continue;const C=E.reason;if(At(C))throw C;St(C)?g??(g=C):p??(p=C)}if(p!==void 0)throw p}const m=g??(r&&!l.preload?r:void 0);let v=l.serialError?l.firstBadMatchIndex??0:l.matches.length-1;if(!m&&r&&l.preload)return l.matches;if(m){const N=wy(l,m);N===void 0&&Va();const E=l.matches[N],C=l.router.looseRoutesById[E.routeId],A=(S=l.router.options)==null?void 0:S.defaultNotFoundComponent;!C.options.notFoundComponent&&A&&(C.options.notFoundComponent=A),m.routeId=E.routeId;const $=E.routeId===l.router.routeTree.id;l.updateMatch(E.id,Z=>({...Z,...$?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),v=N,await Hi(C,["notFoundComponent"])}else if(!l.preload){const N=l.matches[0];N.globalNotFound||(j=l.router.getMatch(N.id))!=null&&j.globalNotFound&&l.updateMatch(N.id,E=>({...E,globalNotFound:!1,error:void 0}))}if(l.serialError&&l.firstBadMatchIndex!==void 0){const N=l.router.looseRoutesById[l.matches[l.firstBadMatchIndex].routeId];await Hi(N,["errorComponent"])}for(let N=0;N<=v;N++){const{id:E,routeId:C}=l.matches[N],A=l.router.looseRoutesById[C];try{const $=ES(l,E,A);if($){const Z=await $;l.updateMatch(E,L=>({...L,...Z}))}}catch($){console.error(`Error executing head for route ${C}:`,$)}}const x=zf(l);if(Bi(x)&&await x,m)throw m;if(l.serialError&&!l.preload&&!l.onReady)throw l.serialError;return l.matches}function Dy(n,l){const i=l.map(r=>{var o,d;return(d=(o=n.options[r])==null?void 0:o.preload)==null?void 0:d.call(o)}).filter(Boolean);if(i.length!==0)return Promise.all(i)}function Hi(n,l=bu){!n._lazyLoaded&&n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(r=>{const{id:o,...d}=r.options;Object.assign(n.options,d),n._lazyLoaded=!0,n._lazyPromise=void 0}):n._lazyLoaded=!0);const i=()=>n._componentsLoaded?void 0:l===bu?(()=>{if(n._componentsPromise===void 0){const r=Dy(n,bu);r?n._componentsPromise=r.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():Dy(n,l);return n._lazyPromise?n._lazyPromise.then(i):i()}function Lg(n){var l;for(const i of bu)if((l=n.options[i])!=null&&l.preload)return!0;return!1}var bu=["component","errorComponent","pendingComponent","notFoundComponent"],Ln="__TSR_index",Ly="popstate",Uy="beforeunload";function MS(n){let l=n.getLocation();const i=new Set,r=h=>{l=n.getLocation(),i.forEach(g=>g({location:l,action:h}))},o=h=>{n.notifyOnIndexChange??!0?r(h):l=n.getLocation()},d=async({task:h,navigateOpts:g,...p})=>{var x,S;if((g==null?void 0:g.ignoreBlocker)??!1){h();return}const m=((x=n.getBlockers)==null?void 0:x.call(n))??[],v=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&v)for(const j of m){const N=Tu(p.path,p.state);if(await j.blockerFn({currentLocation:l,nextLocation:N,action:p.type})){(S=n.onBlocked)==null||S.call(n);return}}h()};return{get location(){return l},get length(){return n.getLength()},subscribers:i,subscribe:h=>(i.add(h),()=>{i.delete(h)}),push:(h,g,p)=>{const m=l.state[Ln];g=By(m+1,g),d({task:()=>{n.pushState(h,g),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:g})},replace:(h,g,p)=>{const m=l.state[Ln];g=By(m,g),d({task:()=>{n.replaceState(h,g),r({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:h,state:g})},go:(h,g)=>{d({task:()=>{n.go(h),o({type:"GO",index:h})},navigateOpts:g,type:"GO"})},back:h=>{d({task:()=>{n.back((h==null?void 0:h.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:h,type:"BACK"})},forward:h=>{d({task:()=>{n.forward((h==null?void 0:h.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:h,type:"FORWARD"})},canGoBack:()=>l.state[Ln]!==0,createHref:h=>n.createHref(h),block:h=>{var p;if(!n.setBlockers)return()=>{};const g=((p=n.getBlockers)==null?void 0:p.call(n))??[];return n.setBlockers([...g,h]),()=>{var v,x;const m=((v=n.getBlockers)==null?void 0:v.call(n))??[];(x=n.setBlockers)==null||x.call(n,m.filter(S=>S!==h))}},flush:()=>{var h;return(h=n.flush)==null?void 0:h.call(n)},destroy:()=>{var h;return(h=n.destroy)==null?void 0:h.call(n)},notify:r}}function By(n,l){l||(l={});const i=Zf();return{...l,key:i,__TSR_key:i,[Ln]:n}}function CS(n){var F,J;const l=typeof document<"u"?window:void 0,i=l.history.pushState,r=l.history.replaceState;let o=[];const d=()=>o,h=V=>o=V,g=(V=>V),p=(()=>Tu(`${l.location.pathname}${l.location.search}${l.location.hash}`,l.history.state));if(!((F=l.history.state)!=null&&F.__TSR_key)&&!((J=l.history.state)!=null&&J.key)){const V=Zf();l.history.replaceState({[Ln]:0,key:V,__TSR_key:V},"")}let m=p(),v,x=!1,S=!1,j=!1,N=!1;const E=()=>m;let C,A;const $=()=>{C&&(P._ignoreSubscribers=!0,(C.isPush?l.history.pushState:l.history.replaceState)(C.state,"",C.href),P._ignoreSubscribers=!1,C=void 0,A=void 0,v=void 0)},Z=(V,I,se)=>{const le=g(I);A||(v=m),m=Tu(I,se),C={href:le,state:se,isPush:(C==null?void 0:C.isPush)||V==="push"},A||(A=Promise.resolve().then(()=>$()))},L=V=>{m=p(),P.notify({type:V})},X=async()=>{if(S){S=!1;return}const V=p(),I=V.state[Ln]-m.state[Ln],se=I===1,le=I===-1,ue=!se&&!le||x;x=!1;const ne=ue?"GO":le?"BACK":"FORWARD",O=ue?{type:"GO",index:I}:{type:le?"BACK":"FORWARD"};if(j)j=!1;else{const Y=d();if(typeof document<"u"&&Y.length){for(const te of Y)if(await te.blockerFn({currentLocation:m,nextLocation:V,action:ne})){S=!0,l.history.go(1),P.notify(O);return}}}m=p(),P.notify(O)},W=V=>{if(N){N=!1;return}let I=!1;const se=d();if(typeof document<"u"&&se.length)for(const le of se){const ue=le.enableBeforeUnload??!0;if(ue===!0){I=!0;break}if(typeof ue=="function"&&ue()===!0){I=!0;break}}if(I)return V.preventDefault(),V.returnValue=""},P=MS({getLocation:E,getLength:()=>l.history.length,pushState:(V,I)=>Z("push",V,I),replaceState:(V,I)=>Z("replace",V,I),back:V=>(V&&(j=!0),N=!0,l.history.back()),forward:V=>{V&&(j=!0),N=!0,l.history.forward()},go:V=>{x=!0,l.history.go(V)},createHref:V=>g(V),flush:$,destroy:()=>{l.history.pushState=i,l.history.replaceState=r,l.removeEventListener(Uy,W,{capture:!0}),l.removeEventListener(Ly,X)},onBlocked:()=>{v&&m!==v&&(m=v)},getBlockers:d,setBlockers:h,notifyOnIndexChange:!1});return l.addEventListener(Uy,W,{capture:!0}),l.addEventListener(Ly,X),l.history.pushState=function(...V){const I=i.apply(l.history,V);return P._ignoreSubscribers||L("PUSH"),I},l.history.replaceState=function(...V){const I=r.apply(l.history,V);return P._ignoreSubscribers||L("REPLACE"),I},P}function wS(n){let l=n.replace(/[\x00-\x1f\x7f]/g,"");return l.startsWith("//")&&(l="/"+l.replace(/^\/+/,"")),l}function Tu(n,l){const i=wS(n),r=i.indexOf("#"),o=i.indexOf("?"),d=Zf();return{href:i,pathname:i.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:i.length),hash:r>-1?i.substring(r):"",search:o>-1?i.slice(o,r===-1?void 0:r):"",state:l||{[Ln]:0,key:d,__TSR_key:d}}}function Zf(){return(Math.random()+1).toString(36).substring(7)}function dl(n,l){const i=l,r=n;return{fromLocation:i,toLocation:r,pathChanged:(i==null?void 0:i.pathname)!==r.pathname,hrefChanged:(i==null?void 0:i.href)!==r.href,hashChanged:(i==null?void 0:i.hash)!==r.hash}}var AS=class{constructor(n,l){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=i=>i(),this.update=i=>{var v;const r=this.options,o=this.basepath??(r==null?void 0:r.basepath)??"/",d=this.basepath===void 0,h=r==null?void 0:r.rewrite;if(this.options={...r,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=lS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=CS()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let x;this.resolvePathCache=qi(1e3),x=this.buildRouteTree(),this.setRoutes(x)}if(!this.stores&&this.latestLocation){const x=this.getStoreConfig(this);this.batch=x.batch,this.stores=SS(zS(this.latestLocation),x),fS(this)}let g=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(d||o!==p||h!==m){this.basepath=p;const x=[],S=wg(p);S&&S!=="/"&&x.push(bS({basepath:p})),m&&x.push(m),this.rewrite=x.length===0?void 0:x.length===1?x[0]:vS(x),this.history&&this.updateLatestLocation(),g=!0}g&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((v=window.CSS)==null?void 0:v.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=Wb(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&$b(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,r)=>{const o={eventType:i,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=i=>{this.subscribers.forEach(r=>{r.eventType===i.type&&r.fn(i)})},this.parseLocation=(i,r)=>{const o=({pathname:p,search:m,hash:v,href:x,state:S})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const A=this.options.parseSearch(m),$=this.options.stringifySearch(A);return{href:p+$+v,publicHref:x,pathname:_i(p).path,external:!1,searchStr:$,search:ts(r==null?void 0:r.search,A),hash:_i(v.slice(1)).path,state:Ka(r==null?void 0:r.state,S)}}const j=new URL(x,this.origin),N=Of(this.rewrite,j),E=this.options.parseSearch(N.search),C=this.options.stringifySearch(E);return N.search=C,{href:N.href.replace(N.origin,""),publicHref:x,pathname:_i(N.pathname).path,external:!!this.rewrite&&N.origin!==this.origin,searchStr:C,search:ts(r==null?void 0:r.search,E),hash:_i(N.hash.slice(1)).path,state:Ka(r==null?void 0:r.state,S)}},d=o(i),{__tempLocation:h,__tempKey:g}=d.state;if(h&&(!g||g===this.tempLocationKey)){const p=o(h);return p.state.key=d.state.key,p.state.__TSR_key=d.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:d}}return d},this.resolvePathWithBase=(i,r)=>sS({base:i,to:kf(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,r,o)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},o):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>DS({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const r=this.getMatch(i);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(i=>{this.cancelMatch(i)}),this.stores.matchesId.state.forEach(i=>{var o;if(this.stores.pendingMatchStoresById.has(i))return;const r=(o=this.stores.activeMatchStoresById.get(i))==null?void 0:o.state;r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(i)})},this.buildLocation=i=>{const r=(d={})=>{var V,I;const h=d._fromLocation||this.pendingBuiltLocation||this.latestLocation,g=this.matchRoutesLightweight(h);d.from;const p=d.unsafeRelative==="path"?h.pathname:d.from??g.fullPath,m=this.resolvePathWithBase(p,"."),v=g.search,x=Object.assign(Object.create(null),g.params),S=d.to?this.resolvePathWithBase(m,`${d.to}`):this.resolvePathWithBase(m,"."),j=d.params===!1||d.params===null?Object.create(null):(d.params??!0)===!0?x:Object.assign(x,An(d.params,x)),N=this.getMatchedRoutes(S);let E=N.matchedRoutes;if((!N.foundRoute||N.foundRoute.path!=="/"&&N.routeParams["**"])&&this.options.notFoundRoute&&(E=[...E,this.options.notFoundRoute]),Object.keys(j).length>0)for(const se of E){const le=((V=se.options.params)==null?void 0:V.stringify)??se.options.stringifyParams;if(le)try{Object.assign(j,le(j))}catch{}}const C=i.leaveParams?S:_i(Ey({path:S,params:j,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=v;if(i._includeValidateSearch&&((I=this.options.search)!=null&&I.strict)){const se={};E.forEach(le=>{if(le.options.validateSearch)try{Object.assign(se,Su(le.options.validateSearch,{...se,...A}))}catch{}}),A=se}A=LS({search:A,dest:d,destRoutes:E,_includeValidateSearch:i._includeValidateSearch}),A=ts(v,A);const $=this.options.stringifySearch(A),Z=d.hash===!0?h.hash:d.hash?An(d.hash,h.hash):void 0,L=Z?`#${Z}`:"";let X=d.state===!0?h.state:d.state?An(d.state,h.state):{};X=Ka(h.state,X);const W=`${C}${$}${L}`;let P,F,J=!1;if(this.rewrite){const se=new URL(W,this.origin),le=Ag(this.rewrite,se);P=se.href.replace(se.origin,""),le.origin!==this.origin?(F=le.href,J=!0):F=le.pathname+le.search+le.hash}else P=Xb(W),F=P;return{publicHref:F,href:P,pathname:C,search:A,searchStr:$,state:X,hash:Z??"",external:J,unmaskOnReload:d.unmaskOnReload}},o=(d={},h)=>{const g=r(d);let p=h?r(h):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const v=Pb(g.pathname,this.processedTree);if(v){Object.assign(m,v.rawParams);const{from:x,params:S,...j}=v.route,N=S===!1||S===null?Object.create(null):(S??!0)===!0?m:Object.assign(m,An(S,m));h={from:i.from,...j,params:N},p=r(h)}}}return p&&(g.maskedLocation=p),g};return i.mask?o(i,{from:i.from,...i.mask}):o(i)},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...o})=>{const d=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(v=>{o.state[v]=this.latestLocation.state[v]});const m=ms(o.state,this.latestLocation.state);return p.forEach(v=>{delete o.state[v]}),m},h=Dn(this.latestLocation.href)===Dn(o.href);let g=this.commitLocationPromise;if(this.commitLocationPromise=El(()=>{g==null||g.resolve(),g=void 0}),h&&d())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...v}=o;p&&(v={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...v,search:v.searchStr,state:{...v.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(v.unmaskOnReload??this.options.unmaskOnReload??!1)&&(v.state.__tempKey=this.tempLocationKey)),v.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,this.history[o.replace?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:r,hashScrollIntoView:o,viewTransition:d,ignoreBlocker:h,href:g,...p}={})=>{if(g){const x=this.history.location.state.__TSR_index,S=Tu(g,{__TSR_index:i?x:x+1}),j=new URL(S.pathname,this.origin);p.to=Of(this.rewrite,j).pathname,p.search=this.options.parseSearch(S.search),p.hash=S.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const v=this.commitLocation({...m,viewTransition:d,replace:i,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:h});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),v},this.navigate=async({to:i,reloadDocument:r,href:o,publicHref:d,...h})=>{var p,m;let g=!1;if(o)try{new URL(`${o}`),g=!0}catch{}if(g&&!r&&(r=!0),r){if(i!==void 0||!o){const x=this.buildLocation({to:i,...h});o=o??x.publicHref,d=d??x.publicHref}const v=!g&&d?d:o;if(_u(v,this.protocolAllowlist))return Promise.resolve();if(!h.ignoreBlocker){const x=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const S of x)if(S!=null&&S.blockerFn&&await S.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return h.replace?window.location.replace(v):window.location.href=v,Promise.resolve()}return this.buildAndCommitLocation({...h,href:o,to:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatchesSnapshot.state.filter(o=>!i.some(d=>d.id===o.id));this.batch(()=>{this.stores.status.setState(()=>"pending"),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(i),this.stores.setCachedMatches(r)})},this.load=async i=>{let r,o,d;const h=this.stores.resolvedLocation.state??this.stores.location.state;for(d=new Promise(p=>{this.startTransition(async()=>{var m;try{this.beforeLoad();const v=this.latestLocation,x=this.stores.resolvedLocation.state,S=dl(v,x);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...S}),this.emit({type:"onBeforeLoad",...S}),await zy({router:this,sync:i==null?void 0:i.sync,forceStaleReload:h.href===v.href,matches:this.stores.pendingMatchesSnapshot.state,location:v,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var A,$;let j=null,N=null,E=null,C=null;this.batch(()=>{const Z=this.stores.pendingMatchesSnapshot.state,L=Z.length,X=this.stores.activeMatchesSnapshot.state;j=L?X.filter(F=>!this.stores.pendingMatchStoresById.has(F.id)):null;const W=new Set;for(const F of this.stores.pendingMatchStoresById.values())F.routeId&&W.add(F.routeId);const P=new Set;for(const F of this.stores.activeMatchStoresById.values())F.routeId&&P.add(F.routeId);N=L?X.filter(F=>!W.has(F.routeId)):null,E=L?Z.filter(F=>!P.has(F.routeId)):null,C=L?Z.filter(F=>P.has(F.routeId)):X,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),L&&(this.stores.setActiveMatches(Z),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...j.filter(F=>F.status!=="error"&&F.status!=="notFound"&&F.status!=="redirected")]),this.clearExpiredCache())});for(const[Z,L]of[[N,"onLeave"],[E,"onEnter"],[C,"onStay"]])if(Z)for(const X of Z)($=(A=this.looseRoutesById[X.routeId].options)[L])==null||$.call(A,X)})})}})}catch(v){At(v)?(r=v,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):St(v)&&(o=v);const x=r?r.status:o?404:this.stores.activeMatchesSnapshot.state.some(S=>S.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>x),this.stores.redirect.setState(()=>r)})}this.latestLoadPromise===d&&((m=this.commitLocationPromise)==null||m.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=d,await d;this.latestLoadPromise&&d!==this.latestLoadPromise;)await this.latestLoadPromise;let g;this.hasNotFoundMatch()?g=404:this.stores.activeMatchesSnapshot.state.some(p=>p.status==="error")&&(g=500),g!==void 0&&this.stores.statusCode.setState(()=>g)},this.startViewTransition=i=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const d=this.latestLocation,h=this.stores.resolvedLocation.state,g=typeof r.types=="function"?r.types(dl(d,h)):r.types;if(g===!1){i();return}o={update:i,types:g}}else o=i;document.startViewTransition(o)}else i()},this.updateMatch=(i,r)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStoresById.get(i);if(o){o.setState(r);return}const d=this.stores.activeMatchStoresById.get(i);if(d){d.setState(r);return}const h=this.stores.cachedMatchStoresById.get(i);if(h){const g=r(h.state);g.status==="redirected"?this.stores.cachedMatchStoresById.delete(i)&&this.stores.cachedMatchesId.setState(p=>p.filter(m=>m!==i)):h.setState(()=>g)}})},this.getMatch=i=>{var r,o,d;return((r=this.stores.cachedMatchStoresById.get(i))==null?void 0:r.state)??((o=this.stores.pendingMatchStoresById.get(i))==null?void 0:o.state)??((d=this.stores.activeMatchStoresById.get(i))==null?void 0:d.state)},this.invalidate=i=>{const r=o=>{var d;return((d=i==null?void 0:i.filter)==null?void 0:d.call(i,o))??!0?{...o,invalid:!0,...i!=null&&i.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o};return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(r)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(r)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(r))}),this.shouldViewTransition=!1,this.load({sync:i==null?void 0:i.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const r=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const o=i.options._builtLocation??this.buildLocation(i.options),d=this.getParsedLocationHref(o);i.options.href=d,i.headers.set("Location",d)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const d=o.pathname+o.search+o.hash;i.options.href=d,i.headers.set("Location",d)}}catch{}if(i.options.href&&!i.options._builtLocation&&_u(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const r=i==null?void 0:i.filter;r!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(o=>!r(o))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const i=Date.now(),r=o=>{const d=this.looseRoutesById[o.routeId];if(!d.options.loader)return!0;const h=(o.preload?d.options.preloadGcTime??this.options.defaultPreloadGcTime:d.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:i-o.updatedAt>=h};this.clearCache({filter:r})},this.loadRouteChunk=Hi,this.preloadRoute=async i=>{const r=i._builtLocation??this.buildLocation(i);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:i});const d=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),h=new Set([...d,...this.stores.cachedMatchesId.state]),g=o.filter(p=>!h.has(p.id));if(g.length){const p=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...p,...g])}try{return o=await zy({router:this,matches:o,location:r,preload:!0,updateMatch:(p,m)=>{d.has(p)?o=o.map(v=>v.id===p?m(v):v):this.updateMatch(p,m)}}),o}catch(p){if(At(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:r});St(p)||console.error(p);return}},this.matchRoute=(i,r)=>{const o={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},d=this.buildLocation(o);if(r!=null&&r.pending&&this.stores.status.state!=="pending")return!1;const h=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.state:r.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,g=Fb(d.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,h.pathname,this.processedTree);return!g||i.params&&!ms(g.rawParams,i.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?ms(h.search,d.search,{partial:!0})?g.rawParams:!1:g.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(i=>i.status==="notFound"||i.globalNotFound),this.getStoreConfig=l,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??yS,parseSearch:n.parseSearch??mS,protocolAllowlist:n.protocolAllowlist??Vb}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:n,routesByPath:l,processedTree:i}){this.routesById=n,this.routesByPath=l,this.processedTree=i;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(n){return n!=null&&n.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,l){var x,S;const i=this.getMatchedRoutes(n.pathname),{foundRoute:r,routeParams:o,parsedParams:d}=i;let{matchedRoutes:h}=i,g=!1;(r?r.path!=="/"&&o["**"]:Dn(n.pathname))&&(this.options.notFoundRoute?h=[...h,this.options.notFoundRoute]:g=!0);const p=g?BS(this.options.notFoundMode,h):void 0,m=new Array(h.length),v=new Map;for(const j of this.stores.activeMatchStoresById.values())j.routeId&&v.set(j.routeId,j.state);for(let j=0;j<h.length;j++){const N=h[j],E=m[j-1];let C,A,$;{const ne=(E==null?void 0:E.search)??n.search,O=(E==null?void 0:E._strictSearch)??void 0;try{const Y=Su(N.options.validateSearch,{...ne})??void 0;C={...ne,...Y},A={...O,...Y},$=void 0}catch(Y){let te=Y;if(Y instanceof Mu||(te=new Mu(Y.message,{cause:Y})),l!=null&&l.throwOnError)throw te;C=ne,A={},$=te}}const Z=((S=(x=N.options).loaderDeps)==null?void 0:S.call(x,{search:C}))??"",L=Z?JSON.stringify(Z):"",{interpolatedPath:X,usedParams:W}=Ey({path:N.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),P=N.id+X+L,F=this.getMatch(P),J=v.get(N.id),V=(F==null?void 0:F._strictParams)??W;let I;if(!F)try{qy(N,W,d,V)}catch(ne){if(St(ne)||At(ne)?I=ne:I=new OS(ne.message,{cause:ne}),l!=null&&l.throwOnError)throw I}Object.assign(o,V);const se=J?"stay":"enter";let le;if(F)le={...F,cause:se,params:(J==null?void 0:J.params)??o,_strictParams:V,search:ts(J?J.search:F.search,C),_strictSearch:A};else{const ne=N.options.loader||N.options.beforeLoad||N.lazyFn||Lg(N)?"pending":"success";le={id:P,ssr:N.options.ssr,index:j,routeId:N.id,params:(J==null?void 0:J.params)??o,_strictParams:V,pathname:X,updatedAt:Date.now(),search:J?ts(J.search,C):C,_strictSearch:A,searchError:void 0,status:ne,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:El()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:se,loaderDeps:J?Ka(J.loaderDeps,Z):Z,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:N.options.staticData||{},fullPath:N.fullPath}}l!=null&&l.preload||(le.globalNotFound=p===N.id),le.searchError=$;const ue=this.getParentContext(E);le.context={...ue,...le.__routeContext,...le.__beforeLoadContext},m[j]=le}for(let j=0;j<m.length;j++){const N=m[j],E=this.looseRoutesById[N.routeId],C=this.getMatch(N.id),A=v.get(N.routeId);if(N.params=A?ts(A.params,o):o,!C){const $=m[j-1],Z=this.getParentContext($);if(E.options.context){const L={deps:N.loaderDeps,params:N.params,context:Z??{},location:n,navigate:X=>this.navigate({...X,_fromLocation:n}),buildLocation:this.buildLocation,cause:N.cause,abortController:N.abortController,preload:!!N.preload,matches:m,routeId:E.id};N.__routeContext=E.options.context(L)??void 0}N.context={...Z,...N.__routeContext,...N.__beforeLoadContext}}}return m}matchRoutesLightweight(n){var v;const{matchedRoutes:l,routeParams:i,parsedParams:r}=this.getMatchedRoutes(n.pathname),o=Ui(l),d={...n.search};for(const x of l)try{Object.assign(d,Su(x.options.validateSearch,d))}catch{}const h=Ui(this.stores.matchesId.state),g=h&&((v=this.stores.activeMatchStoresById.get(h))==null?void 0:v.state),p=g&&g.routeId===o.id&&g.pathname===n.pathname;let m;if(p)m=g.params;else{const x=Object.assign(Object.create(null),i);for(const S of l)try{qy(S,i,r??{},x)}catch{}m=x}return{matchedRoutes:l,fullPath:o.fullPath,search:d,params:m}}},Mu=class extends Error{},OS=class extends Error{};function zS(n){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:n,matches:[],statusCode:200}}function Su(n,l){if(n==null)return{};if("~standard"in n){const i=n["~standard"].validate(l);if(i instanceof Promise)throw new Mu("Async validation not supported");if(i.issues)throw new Mu(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in n?n.parse(l):typeof n=="function"?n(l):{}}function DS({pathname:n,routesById:l,processedTree:i}){const r=Object.create(null),o=Dn(n);let d,h;const g=Jb(o,i,!0);return g&&(d=g.route,Object.assign(r,g.rawParams),h=Object.assign(Object.create(null),g.parsedParams)),{matchedRoutes:(g==null?void 0:g.branch)||[l.__root__],routeParams:r,foundRoute:d,parsedParams:h}}function LS({search:n,dest:l,destRoutes:i,_includeValidateSearch:r}){return US(i)(n,l,r??!1)}function US(n){var o;const l={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const d of n){if("search"in d.options)(o=d.options.search)!=null&&o.middlewares&&l.middlewares.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const h=({search:g,next:p})=>{let m=g;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(m=d.options.preSearchFilters.reduce((x,S)=>S(x),g));const v=p(m);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((x,S)=>S(x),v):v};l.middlewares.push(h)}if(d.options.validateSearch){const h=({search:g,next:p})=>{const m=p(g);if(!l._includeValidateSearch)return m;try{return{...m,...Su(d.options.validateSearch,m)??void 0}}catch{return m}};l.middlewares.push(h)}}const i=({search:d})=>{const h=l.dest;return h.search?h.search===!0?d:An(h.search,d):{}};l.middlewares.push(i);const r=(d,h,g)=>{if(d>=g.length)return h;const p=g[d];return p({search:h,next:v=>r(d+1,v,g)})};return function(h,g,p){return l.dest=g,l._includeValidateSearch=p,r(0,h,l.middlewares)}}function BS(n,l){if(n!=="root")for(let i=l.length-1;i>=0;i--){const r=l[i];if(r.children)return r.id}return ys}function qy(n,l,i,r){var d;const o=((d=n.options.params)==null?void 0:d.parse)??n.options.parseParams;if(o)if(n.options.skipRouteOnParseError)for(const h in l)h in i&&(r[h]=i[h]);else{const h=o(r);Object.assign(r,h)}}var qS="Error preloading route! ☝️",Ug=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=l=>{var p,m;this.originalIndex=l.originalIndex;const i=this.options,r=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),r?this._path=ys:this.parentRoute||Va();let o=r?ys:i==null?void 0:i.path;o&&o!=="/"&&(o=Cg(o));const d=(i==null?void 0:i.id)||o;let h=r?ys:vu([this.parentRoute.id==="__root__"?"":this.parentRoute.id,d]);o==="__root__"&&(o="/"),h!=="__root__"&&(h=vu(["/",h]));const g=h==="__root__"?"/":vu([this.parentRoute.fullPath,o]);this._path=o,this._id=h,this._fullPath=g,this._to=Dn(g)},this.addChildren=l=>this._addFileChildren(l),this._addFileChildren=l=>(Array.isArray(l)&&(this.children=l),typeof l=="object"&&l!==null&&(this.children=Object.values(l)),this),this._addFileTypes=()=>this,this.updateLoader=l=>(Object.assign(this.options,l),this),this.update=l=>(Object.assign(this.options,l),this),this.lazy=l=>(this.lazyFn=l,this),this.redirect=l=>xS({from:this.fullPath,...l}),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},HS=class extends Ug{constructor(n){super(n)}};function QS(n){if(typeof document<"u"&&document.querySelector){const l=n.stores.location.state,i=l.state.__hashScrollIntoViewOptions??!0;if(i&&l.hash!==""){const r=document.getElementById(l.hash);r&&r.scrollIntoView(i)}}}function $f(n){const l=n.errorComponent??Pf;return f.jsx(YS,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:i,reset:r})=>i?Q.createElement(l,{error:i,reset:r}):n.children})}var YS=class extends Q.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n){return{resetKey:n.getResetKey()}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidUpdate(n,l){l.error&&l.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(n,l){this.props.onCatch&&this.props.onCatch(n,l)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function Pf({error:n}){const[l,i]=Q.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(r=>!r),children:l?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),l?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?f.jsx("code",{children:n.message}):null})}):null]})}function GS({children:n,fallback:l=null}){return Bg()?f.jsx(zi.Fragment,{children:n}):f.jsx(zi.Fragment,{children:l})}function Bg(){return zi.useSyncExternalStore(KS,()=>!0,()=>!1)}function KS(){return()=>{}}var qg=Q.createContext(null);function pt(n){return Q.useContext(qg)}var Du=Q.createContext(void 0),VS=Q.createContext(void 0),Ke=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(Ke||{});function XS({update:n,notify:l,unwatched:i}){return{link:r,unlink:o,propagate:d,checkDirty:h,shallowPropagate:g};function r(m,v,x){const S=v.depsTail;if(S!==void 0&&S.dep===m)return;const j=S!==void 0?S.nextDep:v.deps;if(j!==void 0&&j.dep===m){j.version=x,v.depsTail=j;return}const N=m.subsTail;if(N!==void 0&&N.version===x&&N.sub===v)return;const E=v.depsTail=m.subsTail={version:x,dep:m,sub:v,prevDep:S,nextDep:j,prevSub:N,nextSub:void 0};j!==void 0&&(j.prevDep=E),S!==void 0?S.nextDep=E:v.deps=E,N!==void 0?N.nextSub=E:m.subs=E}function o(m,v=m.sub){const x=m.dep,S=m.prevDep,j=m.nextDep,N=m.nextSub,E=m.prevSub;return j!==void 0?j.prevDep=S:v.depsTail=S,S!==void 0?S.nextDep=j:v.deps=j,N!==void 0?N.prevSub=E:x.subsTail=E,E!==void 0?E.nextSub=N:(x.subs=N)===void 0&&i(x),j}function d(m){let v=m.nextSub,x;e:do{const S=m.sub;let j=S.flags;if(j&60?j&12?j&4?!(j&48)&&p(m,S)?(S.flags=j|40,j&=1):j=0:S.flags=j&-9|32:j=0:S.flags=j|32,j&2&&l(S),j&1){const N=S.subs;if(N!==void 0){const E=(m=N).nextSub;E!==void 0&&(x={value:v,prev:x},v=E);continue}}if((m=v)!==void 0){v=m.nextSub;continue}for(;x!==void 0;)if(m=x.value,x=x.prev,m!==void 0){v=m.nextSub;continue e}break}while(!0)}function h(m,v){let x,S=0,j=!1;e:do{const N=m.dep,E=N.flags;if(v.flags&16)j=!0;else if((E&17)===17){if(n(N)){const C=N.subs;C.nextSub!==void 0&&g(C),j=!0}}else if((E&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(x={value:m,prev:x}),m=N.deps,v=N,++S;continue}if(!j){const C=m.nextDep;if(C!==void 0){m=C;continue}}for(;S--;){const C=v.subs,A=C.nextSub!==void 0;if(A?(m=x.value,x=x.prev):m=C,j){if(n(v)){A&&g(C),v=m.sub;continue}j=!1}else v.flags&=-33;v=m.sub;const $=m.nextDep;if($!==void 0){m=$;continue e}}return j}while(!0)}function g(m){do{const v=m.sub,x=v.flags;(x&48)===32&&(v.flags=x|16,(x&6)===2&&l(v))}while((m=m.nextSub)!==void 0)}function p(m,v){let x=v.depsTail;for(;x!==void 0;){if(x===m)return!0;x=x.prevDep}return!1}}function Ff(n,l,i){var d,h,g;const r=typeof n=="object",o=r?n:void 0;return{next:(d=r?n.next:n)==null?void 0:d.bind(o),error:(h=r?n.error:l)==null?void 0:h.bind(o),complete:(g=r?n.complete:i)==null?void 0:g.bind(o)}}const Df=[];let ju=0;const{link:Hy,unlink:kS,propagate:ZS,checkDirty:Hg,shallowPropagate:Qy}=XS({update(n){return n._update()},notify(n){Df[Lf++]=n,n.flags&=~Ke.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=Ke.Mutable|Ke.Dirty,Cu(n))}});let gu=0,Lf=0,ma,Uf=0;function Qg(n){try{++Uf,n()}finally{--Uf||Yg()}}function Cu(n){const l=n.depsTail;let i=l!==void 0?l.nextDep:n.deps;for(;i!==void 0;)i=kS(i,n)}function Yg(){if(!(Uf>0)){for(;gu<Lf;){const n=Df[gu];Df[gu++]=void 0,n.notify()}gu=0,Lf=0}}function Gg(n,l){const i=typeof n=="function",r=n,o={_snapshot:i?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?Ke.None:Ke.Mutable,get(){return ma!==void 0&&Hy(o,ma,ju),o._snapshot},subscribe(d){const h=Ff(d),g={current:!1},p=$S(()=>{var m;o.get(),g.current?(m=h.next)==null||m.call(h,o._snapshot):g.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(d){const h=ma,g=Object.is;if(i)ma=o,++ju,o.depsTail=void 0;else if(d===void 0)return!1;i&&(o.flags=Ke.Mutable|Ke.RecursedCheck);try{const p=o._snapshot,m=typeof d=="function"?d(p):d===void 0&&i?r(p):d;return p===void 0||!g(p,m)?(o._snapshot=m,!0):!1}finally{ma=h,i&&(o.flags&=~Ke.RecursedCheck),Cu(o)}}};return i?(o.flags=Ke.Mutable|Ke.Dirty,o.get=function(){const d=o.flags;if(d&Ke.Dirty||d&Ke.Pending&&Hg(o.deps,o)){if(o._update()){const h=o.subs;h!==void 0&&Qy(h)}}else d&Ke.Pending&&(o.flags=d&~Ke.Pending);return ma!==void 0&&Hy(o,ma,ju),o._snapshot}):o.set=function(d){if(o._update(d)){const h=o.subs;h!==void 0&&(ZS(h),Qy(h),Yg())}},o}function $S(n){const l=()=>{const r=ma;ma=i,++ju,i.depsTail=void 0,i.flags=Ke.Watching|Ke.RecursedCheck;try{return n()}finally{ma=r,i.flags&=~Ke.RecursedCheck,Cu(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ke.Watching|Ke.RecursedCheck,notify(){const r=this.flags;r&Ke.Dirty||r&Ke.Pending&&Hg(this.deps,this)?l():this.flags=Ke.Watching},stop(){this.flags=Ke.None,this.depsTail=void 0,Cu(this)}};return l(),i}class PS{constructor(l){this.atom=Gg(l)}setState(l){this.atom.set(l)}get state(){return this.atom.get()}get(){return this.state}subscribe(l){return this.atom.subscribe(Ff(l))}}class FS{constructor(l){this.atom=Gg(l)}get state(){return this.atom.get()}get(){return this.state}subscribe(l){return this.atom.subscribe(Ff(l))}}function Yy(n){return typeof n=="function"?new FS(n):new PS(n)}var ff={exports:{}},df={},hf={exports:{}},mf={};/**
|
|
50
50
|
* @license React
|
|
51
51
|
* use-sync-external-store-shim.production.js
|
|
52
52
|
*
|
|
@@ -54,7 +54,7 @@ Error generating stack: `+s.message+`
|
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the MIT license found in the
|
|
56
56
|
* LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/var Gy;function JS(){if(Gy)return
|
|
57
|
+
*/var Gy;function JS(){if(Gy)return mf;Gy=1;var n=Xi();function l(x,S){return x===S&&(x!==0||1/x===1/S)||x!==x&&S!==S}var i=typeof Object.is=="function"?Object.is:l,r=n.useState,o=n.useEffect,d=n.useLayoutEffect,h=n.useDebugValue;function g(x,S){var j=S(),N=r({inst:{value:j,getSnapshot:S}}),E=N[0].inst,C=N[1];return d(function(){E.value=j,E.getSnapshot=S,p(E)&&C({inst:E})},[x,j,S]),o(function(){return p(E)&&C({inst:E}),x(function(){p(E)&&C({inst:E})})},[x]),h(j),j}function p(x){var S=x.getSnapshot;x=x.value;try{var j=S();return!i(x,j)}catch{return!0}}function m(x,S){return S()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:g;return mf.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,mf}var Ky;function IS(){return Ky||(Ky=1,hf.exports=JS()),hf.exports}/**
|
|
58
58
|
* @license React
|
|
59
59
|
* use-sync-external-store-shim/with-selector.production.js
|
|
60
60
|
*
|
|
@@ -62,4 +62,4 @@ Error generating stack: `+s.message+`
|
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the MIT license found in the
|
|
64
64
|
* LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/var Vy;function WS(){if(Vy)return hf;Vy=1;var n=Xi(),l=IS();function i(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var r=typeof Object.is=="function"?Object.is:i,o=l.useSyncExternalStore,d=n.useRef,h=n.useEffect,g=n.useMemo,p=n.useDebugValue;return hf.useSyncExternalStoreWithSelector=function(m,v,x,S,j){var N=d(null);if(N.current===null){var E={hasValue:!1,value:null};N.current=E}else E=N.current;N=g(function(){function A(W){if(!$){if($=!0,Z=W,W=S(W),j!==void 0&&E.hasValue){var P=E.value;if(j(P,W))return L=P}return L=W}if(P=L,r(Z,W))return P;var F=S(W);return j!==void 0&&j(P,F)?(Z=W,P):(Z=W,L=F)}var $=!1,Z,L,X=x===void 0?null:x;return[function(){return A(v())},X===null?void 0:function(){return A(X())}]},[v,x,S,j]);var C=o(m,N[0],N[1]);return h(function(){E.hasValue=!0,E.value=C},[C]),p(C),C},hf}var Xy;function e1(){return Xy||(Xy=1,df.exports=WS()),df.exports}var t1=e1();function a1(n,l){return n===l}function dt(n,l,i=a1){const r=Q.useCallback(h=>{if(!n)return()=>{};const{unsubscribe:g}=n.subscribe(h);return g},[n]),o=Q.useCallback(()=>n==null?void 0:n.get(),[n]);return t1.useSyncExternalStoreWithSelector(r,o,o,l,i)}var n1={state:void 0,get:()=>{},subscribe:()=>()=>{}};function xs(n){const l=pt(),i=Q.useContext(n.from?VS:Lu),r=n.from??i,o=r?n.from?l.stores.getMatchStoreByRouteId(r):l.stores.activeMatchStoresById.get(r):void 0,d=Q.useRef(void 0);return dt(o??n1,h=>{if((n.shouldThrow??!0)&&!h&&Va(),h===void 0)return;const g=n.select?n.select(h):h;if(n.structuralSharing??l.options.defaultStructuralSharing){const p=Ka(d.current,g);return d.current=p,p}return g})}function Kg(n){return xs({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:l=>n.select?n.select(l.loaderData):l.loaderData})}function Vg(n){const{select:l,...i}=n;return xs({...i,select:r=>l?l(r.loaderDeps):r.loaderDeps})}function Xg(n){return xs({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:l=>{const i=n.strict===!1?l.params:l._strictParams;return n.select?n.select(i):i}})}function kg(n){return xs({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:l=>n.select?n.select(l.search):l.search})}function ki(n){const l=pt();return Q.useCallback(i=>l.navigate({...i,from:i.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,l])}function Zg(n){return xs({...n,select:l=>n.select?n.select(l.context):l.context})}var s1=hg();function l1(n,l){const i=pt(),r=Hb(l),{activeProps:o,inactiveProps:d,activeOptions:h,to:g,preload:p,preloadDelay:m,hashScrollIntoView:v,replace:x,startTransition:S,resetScroll:j,viewTransition:N,children:E,target:C,disabled:A,style:$,className:Z,onClick:L,onBlur:X,onFocus:W,onMouseEnter:P,onMouseLeave:F,onTouchStart:J,ignoreBlocker:V,params:I,search:se,hash:le,state:ue,mask:ne,reloadDocument:O,unsafeRelative:Y,from:te,_fromLocation:me,...oe}=n,T=Bg(),G=Q.useMemo(()=>n,[i,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),ee=dt(i.stores.location,Se=>Se,(Se,mt)=>Se.href===mt.href),q=Q.useMemo(()=>{const Se={_fromLocation:ee,...G};return i.buildLocation(Se)},[i,ee,G]),de=q.maskedLocation?q.maskedLocation.publicHref:q.publicHref,ve=q.maskedLocation?q.maskedLocation.external:q.external,be=Q.useMemo(()=>f1(de,ve,i.history,A),[A,ve,de,i.history]),Pe=Q.useMemo(()=>{if(be!=null&&be.external)return _u(be.href,i.protocolAllowlist)?void 0:be.href;if(!d1(g)&&!(typeof g!="string"||g.indexOf(":")===-1))try{return new URL(g),_u(g,i.protocolAllowlist)?void 0:g}catch{}},[g,be,i.protocolAllowlist]),He=Q.useMemo(()=>{if(Pe)return!1;if(h!=null&&h.exact){if(!nS(ee.pathname,q.pathname,i.basepath))return!1}else{const Se=Eu(ee.pathname,i.basepath),mt=Eu(q.pathname,i.basepath);if(!(Se.startsWith(mt)&&(Se.length===mt.length||Se[mt.length]==="/")))return!1}return((h==null?void 0:h.includeSearch)??!0)&&!ms(ee.search,q.search,{partial:!(h!=null&&h.exact),ignoreUndefined:!(h!=null&&h.explicitUndefined)})?!1:h!=null&&h.includeHash?T&&ee.hash===q.hash:!0},[h==null?void 0:h.exact,h==null?void 0:h.explicitUndefined,h==null?void 0:h.includeHash,h==null?void 0:h.includeSearch,ee,Pe,T,q.hash,q.pathname,q.search,i.basepath]),ua=He?An(o,{})??i1:gf,xa=He?gf:An(d,{})??gf,Ss=[Z,ua.className,xa.className].filter(Boolean).join(" "),Ml=($||ua.style||xa.style)&&{...$,...ua.style,...xa.style},[va,js]=Q.useState(!1),Ns=Q.useRef(!1),Za=n.reloadDocument||Pe?!1:p??i.options.defaultPreload,Rs=m??i.options.defaultPreloadDelay??0,aa=Q.useCallback(()=>{i.preloadRoute({...G,_builtLocation:q}).catch(Se=>{console.warn(Se),console.warn(qS)})},[i,G,q]);qb(r,Q.useCallback(Se=>{Se!=null&&Se.isIntersecting&&aa()},[aa]),o1,{disabled:!!A||Za!=="viewport"}),Q.useEffect(()=>{Ns.current||!A&&Za==="render"&&(aa(),Ns.current=!0)},[A,aa,Za]);const Cl=Se=>{const mt=Se.currentTarget.getAttribute("target"),ca=C!==void 0?C:mt;if(!A&&!h1(Se)&&!Se.defaultPrevented&&(!ca||ca==="_self")&&Se.button===0){Se.preventDefault(),s1.flushSync(()=>{js(!0)});const Pi=i.subscribe("onResolved",()=>{Pi(),js(!1)});i.navigate({...G,replace:x,resetScroll:j,hashScrollIntoView:v,startTransition:S,viewTransition:N,ignoreBlocker:V})}};if(Pe)return{...oe,ref:r,href:Pe,...E&&{children:E},...C&&{target:C},...A&&{disabled:A},...$&&{style:$},...Z&&{className:Z},...L&&{onClick:L},...X&&{onBlur:X},...W&&{onFocus:W},...P&&{onMouseEnter:P},...F&&{onMouseLeave:F},...J&&{onTouchStart:J}};const _s=Se=>{if(A||Za!=="intent")return;if(!Rs){aa();return}const mt=Se.currentTarget;if(Mi.has(mt))return;const ca=setTimeout(()=>{Mi.delete(mt),aa()},Rs);Mi.set(mt,ca)},Uu=Se=>{A||Za!=="intent"||aa()},$i=Se=>{if(A||!Za||!Rs)return;const mt=Se.currentTarget,ca=Mi.get(mt);ca&&(clearTimeout(ca),Mi.delete(mt))};return{...oe,...ua,...xa,href:be==null?void 0:be.href,ref:r,onClick:ol([L,Cl]),onBlur:ol([X,$i]),onFocus:ol([W,_s]),onMouseEnter:ol([P,_s]),onMouseLeave:ol([F,$i]),onTouchStart:ol([J,Uu]),disabled:!!A,target:C,...Ml&&{style:Ml},...Ss&&{className:Ss},...A&&r1,...He&&u1,...T&&va&&c1}}var gf={},i1={className:"active"},r1={role:"link","aria-disabled":!0},u1={"data-status":"active","aria-current":"page"},c1={"data-transitioning":"transitioning"},Mi=new WeakMap,o1={rootMargin:"100px"},ol=n=>l=>{for(const i of n)if(i){if(l.defaultPrevented)return;i(l)}};function f1(n,l,i,r){if(!r)return l?{href:n,external:!0}:{href:i.createHref(n)||"/",external:!1}}function d1(n){if(typeof n!="string")return!1;const l=n.charCodeAt(0);return l===47?n.charCodeAt(1)!==47:l===46}var Ee=Q.forwardRef((n,l)=>{const{_asChild:i,...r}=n,{type:o,...d}=l1(r,l),h=typeof r.children=="function"?r.children({isActive:d["data-status"]==="active"}):r.children;if(!i){const{disabled:g,...p}=d;return Q.createElement("a",p,h)}return Q.createElement(i,d,h)});function h1(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var m1=class extends Ug{constructor(l){super(l),this.useMatch=i=>xs({select:i==null?void 0:i.select,from:this.id,structuralSharing:i==null?void 0:i.structuralSharing}),this.useRouteContext=i=>Zg({...i,from:this.id}),this.useSearch=i=>kg({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useParams=i=>Xg({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useLoaderDeps=i=>Vg({...i,from:this.id}),this.useLoaderData=i=>Kg({...i,from:this.id}),this.useNavigate=()=>ki({from:this.fullPath}),this.Link=Oi.forwardRef((i,r)=>f.jsx(Ee,{ref:r,from:this.fullPath,...i}))}};function y1(n){return new m1(n)}var g1=class extends HS{constructor(n){super(n),this.useMatch=l=>xs({select:l==null?void 0:l.select,from:this.id,structuralSharing:l==null?void 0:l.structuralSharing}),this.useRouteContext=l=>Zg({...l,from:this.id}),this.useSearch=l=>kg({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useParams=l=>Xg({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useLoaderDeps=l=>Vg({...l,from:this.id}),this.useLoaderData=l=>Kg({...l,from:this.id}),this.useNavigate=()=>ki({from:this.fullPath}),this.Link=Oi.forwardRef((l,i)=>f.jsx(Ee,{ref:i,from:this.fullPath,...l}))}};function p1(n){return new g1(n)}function ra(n){return typeof n=="object"?new ky(n,{silent:!0}).createRoute(n):new ky(n,{silent:!0}).createRoute}var ky=class{constructor(n,l){this.path=n,this.createRoute=i=>{const r=y1(i);return r.isRoot=!1,r},this.silent=l==null?void 0:l.silent}};function x1(n){const l=pt(),i=`not-found-${dt(l.stores.location,r=>r.pathname)}-${dt(l.stores.status,r=>r)}`;return f.jsx($f,{getResetKey:()=>i,onCatch:(r,o)=>{var d;if(St(r))(d=n.onCatch)==null||d.call(n,r,o);else throw r},errorComponent:({error:r})=>{var o;if(St(r))return(o=n.fallback)==null?void 0:o.call(n,r);throw r},children:n.children})}function v1(){return f.jsx("p",{children:"Not Found"})}function fl(n){return f.jsx(f.Fragment,{children:n.children})}function $g(n,l,i){return l.options.notFoundComponent?f.jsx(l.options.notFoundComponent,{...i}):n.options.defaultNotFoundComponent?f.jsx(n.options.defaultNotFoundComponent,{...i}):f.jsx(v1,{})}function b1(n){return null}function S1(){return b1(pt()),null}var Pg=Q.memo(function({matchId:l}){const i=pt(),r=i.stores.activeMatchStoresById.get(l);r||Va();const o=dt(i.stores.loadedAt,h=>h),d=dt(r,h=>h);return f.jsx(j1,{router:i,matchId:l,resetKey:o,matchState:Q.useMemo(()=>{var p;const h=d.routeId,g=(p=i.routesById[h].parentRoute)==null?void 0:p.id;return{routeId:h,ssr:d.ssr,_displayPending:d._displayPending,parentRouteId:g}},[d._displayPending,d.routeId,d.ssr,i.routesById])})});function j1({router:n,matchId:l,resetKey:i,matchState:r}){var N,E;const o=n.routesById[r.routeId],d=o.options.pendingComponent??n.options.defaultPendingComponent,h=d?f.jsx(d,{}):null,g=o.options.errorComponent??n.options.defaultErrorComponent,p=o.options.onCatch??n.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??((N=n.options.notFoundRoute)==null?void 0:N.options.component):o.options.notFoundComponent,v=r.ssr===!1||r.ssr==="data-only",x=(!o.isRoot||o.options.wrapInSuspense||v)&&(o.options.wrapInSuspense??d??(((E=o.options.errorComponent)==null?void 0:E.preload)||v))?Q.Suspense:fl,S=g?$f:fl,j=m?x1:fl;return f.jsxs(o.isRoot?o.options.shellComponent??fl:fl,{children:[f.jsx(Lu.Provider,{value:l,children:f.jsx(x,{fallback:h,children:f.jsx(S,{getResetKey:()=>i,errorComponent:g||Pf,onCatch:(C,A)=>{if(St(C))throw C;p==null||p(C,A)},children:f.jsx(j,{fallback:C=>{if(!m||C.routeId&&C.routeId!==r.routeId||!C.routeId&&!o.isRoot)throw C;return Q.createElement(m,C)},children:v||r._displayPending?f.jsx(GS,{fallback:h,children:f.jsx(Zy,{matchId:l})}):f.jsx(Zy,{matchId:l})})})})}),r.parentRouteId===ys?f.jsxs(f.Fragment,{children:[f.jsx(N1,{resetKey:i}),n.options.scrollRestoration&&Eg?f.jsx(S1,{}):null]}):null]})}function N1({resetKey:n}){const l=pt(),i=Q.useRef(void 0);return Ai(()=>{const r=l.latestLocation.href;(i.current===void 0||i.current!==r)&&(l.emit({type:"onRendered",...dl(l.stores.location.state,l.stores.resolvedLocation.state)}),i.current=r)},[l.latestLocation.state.__TSR_key,n,l]),null}var Zy=Q.memo(function({matchId:l}){var m,v,x,S;const i=pt(),r=i.stores.activeMatchStoresById.get(l);r||Va();const o=dt(r,j=>j),d=o.routeId,h=i.routesById[d],g=Q.useMemo(()=>{var N;const j=(N=i.routesById[d].options.remountDeps??i.options.defaultRemountDeps)==null?void 0:N({routeId:d,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return j?JSON.stringify(j):void 0},[d,o.loaderDeps,o._strictParams,o._strictSearch,i.options.defaultRemountDeps,i.routesById]),p=Q.useMemo(()=>{const j=h.options.component??i.options.defaultComponent;return j?f.jsx(j,{},g):f.jsx(Fg,{})},[g,h.options.component,i.options.defaultComponent]);if(o._displayPending)throw(m=i.getMatch(o.id))==null?void 0:m._nonReactive.displayPendingPromise;if(o._forcePending)throw(v=i.getMatch(o.id))==null?void 0:v._nonReactive.minPendingPromise;if(o.status==="pending"){const j=h.options.pendingMinMs??i.options.defaultPendingMinMs;if(j){const N=i.getMatch(o.id);if(N&&!N._nonReactive.minPendingPromise){const E=El();N._nonReactive.minPendingPromise=E,setTimeout(()=>{E.resolve(),N._nonReactive.minPendingPromise=void 0},j)}}throw(x=i.getMatch(o.id))==null?void 0:x._nonReactive.loadPromise}if(o.status==="notFound")return St(o.error)||Va(),$g(i,h,o.error);if(o.status==="redirected")throw At(o.error)||Va(),(S=i.getMatch(o.id))==null?void 0:S._nonReactive.loadPromise;if(o.status==="error")throw o.error;return p}),Fg=Q.memo(function(){const l=pt(),i=Q.useContext(Lu);let r,o=!1,d;{const m=i?l.stores.activeMatchStoresById.get(i):void 0;[r,o]=dt(m,v=>[v==null?void 0:v.routeId,(v==null?void 0:v.globalNotFound)??!1]),d=dt(l.stores.matchesId,v=>v[v.findIndex(x=>x===i)+1])}const h=r?l.routesById[r]:void 0,g=l.options.defaultPendingComponent?f.jsx(l.options.defaultPendingComponent,{}):null;if(o)return h||Va(),$g(l,h,void 0);if(!d)return null;const p=f.jsx(Pg,{matchId:d});return r===ys?f.jsx(Q.Suspense,{fallback:g,children:p}):p});function R1(){const n=pt(),l=Q.useRef({router:n,mounted:!1}),[i,r]=Q.useState(!1),o=dt(n.stores.isLoading,x=>x),d=dt(n.stores.hasPendingMatches,x=>x),h=nf(o),g=o||i||d,p=nf(g),m=o||d,v=nf(m);return n.startTransition=x=>{r(!0),Q.startTransition(()=>{x(),r(!1)})},Q.useEffect(()=>{const x=n.history.subscribe(n.load),S=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Dn(n.latestLocation.publicHref)!==Dn(S.publicHref)&&n.commitLocation({...S,replace:!0}),()=>{x()}},[n,n.history]),Ai(()=>{if(typeof window<"u"&&n.ssr||l.current.router===n&&l.current.mounted)return;l.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(S){console.error(S)}})()},[n]),Ai(()=>{h&&!o&&n.emit({type:"onLoad",...dl(n.stores.location.state,n.stores.resolvedLocation.state)})},[h,n,o]),Ai(()=>{v&&!m&&n.emit({type:"onBeforeRouteMount",...dl(n.stores.location.state,n.stores.resolvedLocation.state)})},[m,v,n]),Ai(()=>{if(p&&!g){const x=dl(n.stores.location.state,n.stores.resolvedLocation.state);n.emit({type:"onResolved",...x}),Qg(()=>{n.stores.status.setState(()=>"idle"),n.stores.resolvedLocation.setState(()=>n.stores.location.state)}),x.hrefChanged&&QS(n)}},[g,p,n]),null}function _1(){const n=pt(),l=n.routesById[ys].options.pendingComponent??n.options.defaultPendingComponent,i=l?f.jsx(l,{}):null,r=f.jsxs(typeof document<"u"&&n.ssr?fl:Q.Suspense,{fallback:i,children:[f.jsx(R1,{}),f.jsx(E1,{})]});return n.options.InnerWrap?f.jsx(n.options.InnerWrap,{children:r}):r}function E1(){const n=pt(),l=dt(n.stores.firstMatchId,o=>o),i=dt(n.stores.loadedAt,o=>o),r=l?f.jsx(Pg,{matchId:l}):null;return f.jsx(Lu.Provider,{value:l,children:n.options.disableGlobalCatchBoundary?r:f.jsx($f,{getResetKey:()=>i,errorComponent:Pf,onCatch:void 0,children:r})})}function Jg(){const n=pt();return dt(n.stores.matchRouteReactivity,l=>l),Q.useCallback(l=>{const{pending:i,caseSensitive:r,fuzzy:o,includeSearch:d,...h}=l;return n.matchRoute(h,{pending:i,caseSensitive:r,fuzzy:o,includeSearch:d})},[n])}function T1(n){const l=pt(),i=Q.useRef(void 0);return dt(l.stores.activeMatchesSnapshot,r=>{const o=r;if(l.options.defaultStructuralSharing){const d=Ka(i.current,o);return i.current=d,d}return o})}var M1=n=>({createMutableStore:Yy,createReadonlyStore:Yy,batch:Qg}),C1=n=>new w1(n),w1=class extends AS{constructor(n){super(n,M1)}};function A1({router:n,children:l,...i}){Object.keys(i).length>0&&n.update({...n.options,...i,context:{...n.options.context,...i.context}});const r=f.jsx(qg.Provider,{value:n,children:l});return n.options.Wrap?f.jsx(n.options.Wrap,{children:r}):r}function O1({router:n,...l}){return f.jsx(A1,{router:n,...l,children:f.jsx(_1,{})})}function Ig(n){const i=pt();return Q.useRef(void 0),dt(i.stores.__store,r=>r)}function z1(n){const l=pt(),i=Q.useRef(void 0);return dt(l.stores.location,r=>{const o=r;if(l.options.defaultStructuralSharing){const d=Ka(i.current,o);return i.current=d,d}return o})}const Wg=Q.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function D1({children:n}){const[l,i]=Q.useState(!1);return f.jsx(Wg.Provider,{value:{isOpen:l,toggle:()=>i(r=>!r),close:()=>i(!1)},children:n})}function ep(){return Q.useContext(Wg)}function pf(n){if(!n)return"Run";const[,l]=n.split("::");return l||n}function L1(n){const l=[];for(let i=1;i<n.length;i++){const r=n[i],o=r.routeId??r.id,d=r.params;o==="/"||o==="/_layout"||(o.includes("/runs/$runId/category/$category")?(l.some(h=>h.label===d.runId)||l.push({label:pf(d.runId),to:`/runs/${encodeURIComponent(d.runId)}`}),l.push({label:d.category??"Category",to:r.pathname})):o.includes("/runs/$runId/suite/$suite")?l.push({label:d.suite??"Suite",to:r.pathname}):o.includes("/runs/$runId")?l.push({label:pf(d.runId),to:r.pathname}):o.includes("/evals/$runId/$evalId")?(l.some(h=>h.label===d.runId)||l.push({label:pf(d.runId),to:`/runs/${encodeURIComponent(d.runId)}`}),l.push({label:d.evalId??"Eval",to:r.pathname})):o.includes("/experiments/$experimentName")?l.push({label:d.experimentName??"Experiment",to:r.pathname}):(o==="/index"||o==="/")&&l.push({label:"Home",to:"/"}))}return l}function U1(){const n=T1(),l=L1(n);return l.length===0?null:f.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 bg-gray-950 px-6 py-2 text-sm",children:[f.jsx(Ee,{to:"/",className:"text-cyan-400 hover:text-cyan-300 hover:underline",children:"Home"}),l.map((i,r)=>{const o=r===l.length-1;return f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-gray-600",children:">"}),o?f.jsx("span",{className:"text-gray-400",children:i.label}):f.jsx(Ee,{to:i.to??"/",className:"text-cyan-400 hover:text-cyan-300 hover:underline",children:i.label})]},`${i.label}-${r}`)})]})}async function Xe(n){const l=await fetch(n);if(!l.ok)throw new Error(`API error: ${l.status} ${l.statusText}`);return l.json()}const B1={queryKey:["runs"],queryFn:()=>Xe("/api/runs"),refetchInterval:5e3};function q1(n){return{queryKey:["runs",n],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}`),enabled:!!n}}const H1={queryKey:["feedback"],queryFn:()=>Xe("/api/feedback")},Q1={queryKey:["experiments"],queryFn:()=>Xe("/api/experiments")},Y1={queryKey:["compare"],queryFn:()=>Xe("/api/compare")},G1={queryKey:["targets"],queryFn:()=>Xe("/api/targets")};function K1(n,l){return{queryKey:["runs",n,"evals",l,"files"],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}/evals/${encodeURIComponent(l)}/files`),enabled:!!n&&!!l}}function V1(n,l,i){return{queryKey:["runs",n,"evals",l,"files",i],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}/evals/${encodeURIComponent(l)}/files/${i}`),enabled:!!n&&!!l&&!!i}}function X1(n,l){return{queryKey:["runs",n,"categories",l,"suites"],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}/categories/${encodeURIComponent(l)}/suites`),enabled:!!n&&!!l}}const k1={queryKey:["config"],queryFn:()=>Xe("/api/config"),staleTime:5e3};function Z1(n){const l=n?`${Gt(n)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",n??""],queryFn:()=>Xe(l),staleTime:5e3}}function Jf(){return Ve(B1)}function Zi(n){return Ve(q1(n))}function $1(){return Ve(H1)}function If(){return Ve(Q1)}function P1(){return Ve(Y1)}function F1(){return Ve(G1)}function J1(n,l){return Ve(K1(n,l))}function I1(n,l,i){return Ve(V1(n,l,i))}function tp(n,l){return Ve(X1(n,l))}function ht(){return Ve(k1)}function ap(n){return Ve(Z1(n))}const wu=.8;function ka(n,l=wu){return n>=l}const W1={queryKey:["benchmarks"],queryFn:()=>Xe("/api/benchmarks"),refetchInterval:1e4};function Wf(){return Ve(W1)}const ej={queryKey:["benchmarks","all-runs"],queryFn:()=>Xe("/api/benchmarks/all-runs"),refetchInterval:5e3};function tj(){return Ve(ej)}async function aj(n){const l=await fetch("/api/benchmarks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!l.ok){const i=await l.json();throw new Error(i.error||`Failed to add project: ${l.status}`)}return l.json()}async function nj(n){const l=await fetch("/api/benchmarks/discover",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!l.ok){const r=await l.json();throw new Error(r.error||`Failed to discover: ${l.status}`)}return(await l.json()).discovered}function Gt(n){return`/api/benchmarks/${encodeURIComponent(n)}`}function sj(n){return{queryKey:["benchmarks",n,"runs"],queryFn:()=>Xe(`${Gt(n)}/runs`),enabled:!!n,refetchInterval:5e3}}function np(n){return Ve(sj(n))}function lj(n,l){return{queryKey:["benchmarks",n,"runs",l],queryFn:()=>Xe(`${Gt(n)}/runs/${encodeURIComponent(l)}`),enabled:!!n&&!!l}}function ed(n,l){return Ve(lj(n,l))}function ij(n,l,i){return{queryKey:["benchmarks",n,"runs",l,"evals",i,"files"],queryFn:()=>Xe(`${Gt(n)}/runs/${encodeURIComponent(l)}/evals/${encodeURIComponent(i)}/files`),enabled:!!n&&!!l&&!!i}}function rj(n,l,i,r){return{queryKey:["benchmarks",n,"runs",l,"evals",i,"files",r],queryFn:()=>Xe(`${Gt(n)}/runs/${encodeURIComponent(l)}/evals/${encodeURIComponent(i)}/files/${r}`),enabled:!!n&&!!l&&!!i&&!!r}}function uj(n){return{queryKey:["benchmarks",n,"experiments"],queryFn:()=>Xe(`${Gt(n)}/experiments`),enabled:!!n}}function cj(n){return{queryKey:["benchmarks",n,"compare"],queryFn:()=>Xe(`${Gt(n)}/compare`),enabled:!!n}}function oj(n){return{queryKey:["benchmarks",n,"targets"],queryFn:()=>Xe(`${Gt(n)}/targets`),enabled:!!n}}async function sp(n){const l=n?`${Gt(n)}/remote/sync`:"/api/remote/sync",i=await fetch(l,{method:"POST"});if(!i.ok)throw new Error(`Failed to sync remote results: ${i.status}`);return i.json()}async function fj(n){const l=await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(`Failed to save config: ${l.status}`);return l.json()}function dj(n){const l=n?`${Gt(n)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",n??""],queryFn:()=>Xe(l),staleTime:3e4}}function hj(n){return Ve(dj(n))}function mj(n){const l=n?`${Gt(n)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",n??""],queryFn:()=>Xe(l),staleTime:3e4}}function yj(n){return Ve(mj(n))}async function gj(n,l){const i=l?`${Gt(l)}/eval/run`:"/api/eval/run",r=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const o=await r.json().catch(()=>({error:r.statusText}));throw new Error(o.error??`Failed: ${r.status}`)}return r.json()}function pj(n){return{queryKey:["eval-status",n],queryFn:()=>Xe(`/api/eval/status/${n}`),enabled:!!n,refetchInterval:l=>{var r;const i=(r=l.state.data)==null?void 0:r.status;return i==="finished"||i==="failed"?!1:2e3}}}function lp(n){return Ve(pj(n))}function xj(n){const l="/api/eval/runs";return{queryKey:["eval-runs",""],queryFn:()=>Xe(l),refetchInterval:3e3}}function ip(n){return Ve(xj())}async function vj(n,l){const i=l?`${Gt(l)}/eval/preview`:"/api/eval/preview",r=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new Error(`Preview failed: ${r.status}`);return r.json()}function vs({children:n}){const{isOpen:l,close:i}=ep(),r=z1();return Q.useEffect(()=>{i()},[i,r.pathname]),f.jsxs(f.Fragment,{children:[l&&f.jsx("div",{className:"fixed inset-0 z-30 bg-black/50 md:hidden",onClick:i,onKeyDown:o=>o.key==="Escape"&&i(),role:"button",tabIndex:-1,"aria-label":"Close navigation"}),f.jsx("aside",{className:`fixed inset-y-0 left-0 z-40 flex w-64 flex-col border-r border-gray-800 bg-gray-900/50 transition-transform duration-200 ease-in-out md:static md:z-auto md:translate-x-0 ${l?"translate-x-0":"-translate-x-full"}`,children:n})]})}function bj(){const n=Jg(),l=n({to:"/projects/$benchmarkId/evals/$runId/$evalId",fuzzy:!0}),i=n({to:"/projects/$benchmarkId/runs/$runId",fuzzy:!0}),r=n({to:"/projects/$benchmarkId",fuzzy:!0});if(l&&typeof l=="object"&&"benchmarkId"in l){const{benchmarkId:p,runId:m,evalId:v}=l;return f.jsx(_j,{benchmarkId:p,runId:m,currentEvalId:v})}if(i&&typeof i=="object"&&"benchmarkId"in i){const{benchmarkId:p,runId:m}=i;return f.jsx($y,{benchmarkId:p,currentRunId:m})}if(r&&typeof r=="object"&&"benchmarkId"in r){const{benchmarkId:p}=r;return f.jsx($y,{benchmarkId:p})}const o=n({to:"/evals/$runId/$evalId",fuzzy:!0}),d=n({to:"/runs/$runId/category/$category",fuzzy:!0}),h=n({to:"/runs/$runId/suite/$suite",fuzzy:!0}),g=n({to:"/experiments/$experimentName",fuzzy:!0});if(d&&typeof d=="object"&&"runId"in d){const{runId:p,category:m}=d;return f.jsx(Rj,{runId:p,category:m})}if(h&&typeof h=="object"&&"runId"in h){const{runId:p,suite:m}=h;return f.jsx(Nj,{runId:p,suite:m})}if(o&&typeof o=="object"&&"runId"in o){const{runId:p,evalId:m}=o;return f.jsx(jj,{runId:p,currentEvalId:m})}if(g&&typeof g=="object"&&"experimentName"in g){const{experimentName:p}=g;return f.jsx(Ej,{currentExperiment:p})}return f.jsx(Sj,{})}function Sj(){const n=Jg(),{data:l}=Wf(),i=((l==null?void 0:l.projects.length)??0)>0,r=n({to:"/"}),o=n({to:"/runs/$runId",fuzzy:!0}),d=i&&r!==!1,{data:h}=Jf(),{data:g}=tj(),p=d?g:h,{data:m}=ip(),v=((m==null?void 0:m.runs)??[]).filter(x=>x.status==="starting"||x.status==="running").length;return f.jsxs(vs,{children:[f.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:[f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"}),v>0&&f.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-cyan-900/40 px-2 py-0.5 text-xs text-cyan-400",children:[f.jsx("span",{className:"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-cyan-400"}),v]})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),p==null?void 0:p.runs.map(x=>{const S=r===!1&&o&&typeof o=="object"&&"runId"in o&&o.runId===x.filename;return x.project_id?f.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:x.project_id,runId:x.filename},className:"mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",title:x.project_name,children:x.display_name??x.filename},`${x.project_id}/${x.filename}`):f.jsx(Ee,{to:"/runs/$runId",params:{runId:x.filename},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${S?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:x.display_name??x.filename},x.filename)})]}),f.jsx("div",{className:"border-t border-gray-800 px-4 py-3",children:f.jsx(Ee,{to:"/settings",className:"flex items-center gap-2 text-sm text-gray-400 hover:text-cyan-400",children:"Settings"})})]})}function jj({runId:n,currentEvalId:l}){const{data:i}=Zi(n),{data:r}=ht(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8;return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Ee,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),i==null?void 0:i.results.map(d=>{const h=d.testId===l,g=ka(d.score,o);return f.jsxs(Ee,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:d.testId},className:`mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${h?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:[f.jsx("span",{className:`text-xs ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"}),f.jsx("span",{className:"truncate",children:d.testId})]},d.testId)})]})]})}function Nj({runId:n,suite:l}){const{data:i}=Zi(n),{data:r}=ht(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,d=((i==null?void 0:i.results)??[]).filter(h=>(h.suite??"Uncategorized")===l);return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Ee,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n}),f.jsx("p",{className:"truncate text-xs text-gray-500",children:l})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),d.map(h=>{const g=ka(h.score,o);return f.jsxs(Ee,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:h.testId},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[f.jsx("span",{className:`text-xs ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"}),f.jsx("span",{className:"truncate",children:h.testId})]},h.testId)})]})]})}function Rj({runId:n,category:l}){const{data:i}=tp(n,l),r=(i==null?void 0:i.suites)??[];return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Ee,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n}),f.jsx("p",{className:"truncate text-xs text-gray-500",children:l})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),r.map(o=>f.jsxs(Ee,{to:"/runs/$runId/suite/$suite",params:{runId:n,suite:o.name},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[f.jsx("span",{className:`text-xs ${o.passed===o.total?"text-emerald-400":"text-red-400"}`,children:o.passed===o.total?"✓":"✗"}),f.jsx("span",{className:"truncate",children:o.name})]},o.name))]})]})}function $y({benchmarkId:n,currentRunId:l}){const{data:i}=np(n);return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Ee,{to:"/",className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All Benchmarks"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),i==null?void 0:i.runs.map(r=>{const o=l===r.filename;return f.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:n,runId:r.filename},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:r.display_name??r.filename},r.filename)})]})]})}function _j({benchmarkId:n,runId:l,currentEvalId:i}){const{data:r}=ed(n,l),{data:o}=ht(),d=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8;return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:n,runId:l},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:l})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),r==null?void 0:r.results.map(h=>{const g=h.testId===i,p=ka(h.score,d);return f.jsxs(Ee,{to:"/projects/$benchmarkId/evals/$runId/$evalId",params:{benchmarkId:n,runId:l,evalId:h.testId},className:`mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${g?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:[f.jsx("span",{className:`text-xs ${p?"text-emerald-400":"text-red-400"}`,children:p?"✓":"✗"}),f.jsx("span",{className:"truncate",children:h.testId})]},h.testId)})]})]})}function Ej({currentExperiment:n}){const{data:l}=If(),i=(l==null?void 0:l.experiments)??[];return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:f.jsx(Ee,{to:"/",search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"})}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Experiments"}),i.map(r=>{const o=r.name===n;return f.jsx(Ee,{to:"/experiments/$experimentName",params:{experimentName:r.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:r.name},r.name)})]})]})}function Tj(){return f.jsx(D1,{children:f.jsx(Mj,{})})}function Mj(){const{toggle:n}=ep();return f.jsxs("div",{className:"flex h-screen overflow-hidden",children:[f.jsx(bj,{}),f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[f.jsxs("header",{className:"flex items-center gap-3 border-b border-gray-800 bg-gray-900/50 px-4 py-3 md:hidden",children:[f.jsx("button",{type:"button",onClick:n,className:"text-gray-400 hover:text-gray-200","aria-label":"Toggle navigation",children:f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":"Toggle navigation",children:[f.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),f.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),f.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),f.jsx("span",{className:"text-sm font-semibold text-white",children:"AgentV Studio"})]}),f.jsx(U1,{}),f.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:f.jsx(Fg,{})})]})]})}const ta=p1({component:Tj}),Cj=ra("/settings")({component:wj});function wj(){const{data:n,isLoading:l}=ht(),i=Un(),[r,o]=Q.useState(""),[d,h]=Q.useState(!1),[g,p]=Q.useState(null),m=(n==null?void 0:n.threshold)??wu,v=r||String(m),x=(n==null?void 0:n.read_only)===!0,S=async()=>{const j=Number.parseFloat(r||String(m));if(Number.isNaN(j)||j<0||j>1){p({type:"error",text:"Threshold must be a number between 0 and 1"});return}h(!0),p(null);try{await fj({threshold:j}),await i.invalidateQueries({queryKey:["config"]}),o(""),p({type:"success",text:"Settings saved"}),setTimeout(()=>p(null),3e3)}catch{p({type:"error",text:"Failed to save settings"})}finally{h(!1)}};return l?f.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[f.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"h-40 animate-pulse rounded-lg bg-gray-900"})]}):f.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Settings"}),f.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure your AgentV Studio dashboard"})]}),f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6",children:[f.jsx("h2",{className:"text-lg font-medium text-white",children:"Evaluation"}),f.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure how evaluation results are classified"}),f.jsx("div",{className:"mt-6 space-y-4",children:f.jsxs("div",{children:[f.jsx("label",{htmlFor:"pass-threshold",className:"block text-sm font-medium text-gray-300",children:"Pass Threshold"}),f.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Score at or above this value is considered passing. Default: ",wu]}),f.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[f.jsx("input",{id:"pass-threshold",type:"number",min:"0",max:"1",step:"0.05",value:v,onChange:j=>o(j.target.value),disabled:x,className:"w-32 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500"}),f.jsxs("span",{className:"text-sm text-gray-400",children:["(",Math.round((Number.parseFloat(v)||0)*100),"%)"]})]})]})}),f.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[!x&&f.jsx("button",{type:"button",onClick:S,disabled:d,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-cyan-500 disabled:opacity-50",children:d?"Saving...":"Save Settings"}),x&&f.jsx("span",{className:"text-sm text-gray-400",children:"Read-only mode is enabled."}),g&&f.jsx("span",{className:`text-sm ${g.type==="success"?"text-emerald-400":"text-red-400"}`,children:g.text})]})]}),f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:f.jsxs("p",{className:"text-xs text-gray-500",children:["Settings are stored in ",f.jsx("code",{className:"text-gray-400",children:".agentv/config.yaml"})]})})]})}function rp({data:n,isLoading:l,isError:i,error:r}){if(l)return f.jsx(Uj,{});if(i&&r)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load comparison data: ",r.message]});if(!n||n.cells.length===0)return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No comparison data available"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Run evaluations with different experiment and target combinations to see a comparison matrix."})]});const{experiments:o,targets:d,cells:h}=n;if(o.length<=1&&d.length<=1)return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"Not enough variation to compare"}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["The comparison matrix requires at least 2 experiments or 2 targets. Currently there"," ",o.length===1?"is 1 experiment":`are ${o.length} experiments`," ","and ",d.length===1?"1 target":`${d.length} targets`,"."]})]});const g=new Map;for(const p of h)g.set(JSON.stringify([p.experiment,p.target]),p);return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-400",children:[f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm bg-gray-800/60 ring-1 ring-emerald-500/60"}),f.jsx("span",{className:"text-emerald-400",children:"80%+"})]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm bg-gray-800/60 ring-1 ring-amber-500/60"}),f.jsx("span",{className:"text-amber-400",children:"50–80%"})]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm bg-gray-800/60 ring-1 ring-red-500/60"}),f.jsx("span",{className:"text-red-400",children:"<50%"})]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm border border-dashed border-gray-700"}),"No data"]})]}),f.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),o.map(p=>f.jsx("th",{className:"px-4 py-3 text-center font-medium text-gray-400",children:p},p))]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:d.map(p=>f.jsx(Aj,{target:p,experiments:o,cellMap:g},p))})]})})]})}function Aj({target:n,experiments:l,cellMap:i}){return f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:n}),l.map(r=>{const o=i.get(JSON.stringify([r,n]));return f.jsx("td",{className:"px-2 py-2",children:o?f.jsx(Dj,{cell:o}):f.jsx("div",{className:"flex items-center justify-center rounded-lg border border-dashed border-gray-700 px-3 py-4 text-gray-600",children:"--"})},r)})]})}function Oj(n){return n>=.8?"ring-emerald-500/60":n>=.5?"ring-amber-500/60":"ring-red-500/60"}function zj(n){return n>=.8?"text-emerald-400":n>=.5?"text-amber-400":"text-red-400"}function Dj({cell:n}){const[l,i]=Q.useState(!1),r=Math.round(n.pass_rate*100),o=Math.round(n.avg_score*100);return f.jsxs("div",{className:"space-y-1",children:[f.jsxs("button",{type:"button",onClick:()=>i(!l),"aria-expanded":l,className:`w-full rounded-lg bg-gray-800/60 px-3 py-3 text-center ring-1 transition-colors hover:bg-gray-700/60 ${Oj(n.pass_rate)}`,children:[f.jsx("div",{className:"flex items-center justify-center",children:f.jsxs("span",{className:`text-lg font-semibold tabular-nums ${zj(n.pass_rate)}`,children:[r,"%"]})}),f.jsxs("div",{className:"mt-0.5 text-xs text-gray-400",children:[n.passed_count,"/",n.eval_count," pass | avg ",o,"%"]})]}),l&&f.jsx(Lj,{tests:n.tests})]})}function Lj({tests:n}){return f.jsxs("div",{className:"mt-1 max-h-48 overflow-y-auto rounded-md border border-gray-800 bg-gray-950/80 p-2",children:[f.jsx("div",{className:"mb-1 text-xs font-medium text-gray-500",children:"Test Cases"}),f.jsx("div",{className:"space-y-0.5",children:n.map(l=>f.jsxs("div",{className:"flex items-center gap-2 rounded px-1.5 py-0.5 text-xs",children:[f.jsx("span",{className:l.passed?"text-emerald-400":"text-red-400",children:l.passed?"✓":"✗"}),f.jsx("span",{className:"flex-1 truncate text-gray-300",title:l.test_id,children:l.test_id}),f.jsxs("span",{className:"tabular-nums text-gray-500",children:[Math.round(l.score*100),"%"]})]},l.test_id))})]})}function Uj(){return f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("div",{className:"animate-pulse",children:[f.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3"].map(n=>f.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-6",children:[f.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"}),f.jsx("div",{className:"h-16 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-16 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-16 w-32 rounded bg-gray-800"})]},n))]})})}function Hi({rate:n}){const l=Math.round(n*100);return f.jsxs("div",{className:"relative h-5 w-20 overflow-hidden rounded-full bg-gray-800",children:[f.jsx("div",{className:"absolute inset-y-0 left-0 bg-gradient-to-r from-blue-400 to-blue-600",style:{width:`${l}%`}}),f.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold tabular-nums text-white",children:[l,"%"]})]})}function Bj(){const{data:n,isLoading:l}=If();if(l)return f.jsx(qj,{});const i=(n==null?void 0:n.experiments)??[];return i.length===0?f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No experiments found"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Experiments will appear here once evaluations are run with experiment labels."})]}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Targets"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Last Run"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:i.map(r=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3",children:f.jsx(Ee,{to:"/experiments/$experimentName",params:{experimentName:r.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:r.name})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.run_count}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.target_count}),f.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[f.jsx("span",{className:"text-emerald-400",children:r.passed_count}),f.jsx("span",{className:"text-gray-600",children:" / "}),r.eval_count]}),f.jsx("td",{className:"px-4 py-3",children:f.jsx(Hi,{rate:r.pass_rate})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",title:Py(r.last_run).full,children:Py(r.last_run).date})]},r.name))})]})})}function Py(n){if(!n)return{date:"N/A",full:"N/A"};try{const l=new Date(n);if(Number.isNaN(l.getTime()))return{date:"N/A",full:"N/A"};const i=l.toLocaleString(),r=Date.now()-l.getTime(),o=Math.floor(r/6e4),d=Math.floor(r/36e5);let h;return o<1?h="just now":o<60?h=`${o} min ago`:d<24?h=`${d} hour${d===1?"":"s"} ago`:h=l.toLocaleDateString(),{date:h,full:i}}catch{return{date:"N/A",full:"N/A"}}}function qj(){return f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("div",{className:"animate-pulse",children:[f.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(n=>f.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[f.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},n))]})})}function Hj(n){if(!n)return"No runs";const l=new Date(n);if(Number.isNaN(l.getTime()))return"N/A";const i=Date.now()-l.getTime(),r=Math.floor(i/6e4);if(r<1)return"Just now";if(r<60)return`${r}m ago`;const o=Math.floor(r/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function Qj({project:n}){const l=Math.round(n.pass_rate*100);return f.jsxs(Ee,{to:"/projects/$benchmarkId",params:{benchmarkId:n.id},className:"group block rounded-lg border border-gray-800 bg-gray-900/50 p-5 transition-colors hover:border-cyan-800 hover:bg-gray-900",children:[f.jsx("div",{className:"flex items-start justify-between",children:f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h3",{className:"truncate text-lg font-semibold text-white group-hover:text-cyan-400",children:n.name}),f.jsx("p",{className:"mt-1 truncate text-xs text-gray-500",children:n.path})]})}),f.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-3",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-gray-500",children:"Runs"}),f.jsx("p",{className:"text-lg font-semibold text-white",children:n.run_count})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-gray-500",children:"Pass Rate"}),f.jsx("p",{className:`text-lg font-semibold ${n.run_count===0?"text-gray-500":l>=80?"text-emerald-400":l>=50?"text-yellow-400":"text-red-400"}`,children:n.run_count>0?`${l}%`:"--"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-gray-500",children:"Last Run"}),f.jsx("p",{className:"text-sm text-gray-300",children:Hj(n.last_run)})]})]})]})}function bs({open:n,onClose:l,benchmarkId:i,prefill:r}){const o=Un(),d=ki(),[h,g]=Q.useState((r==null?void 0:r.suiteFilter)??""),[p,m]=Q.useState(""),[v,x]=Q.useState((r==null?void 0:r.testIds)??[]),[S,j]=Q.useState((r==null?void 0:r.target)??""),[N,E]=Q.useState(""),[C,A]=Q.useState(""),[$,Z]=Q.useState(!1),[L,X]=Q.useState(!1),[W,P]=Q.useState(null),[F,J]=Q.useState(null),[V,I]=Q.useState(!1),[se,le]=Q.useState(null),{data:ue}=hj(i),{data:ne}=yj(i),{data:O}=lp(W),Y=Q.useMemo(()=>(ue==null?void 0:ue.eval_files)??[],[ue]),te=Q.useMemo(()=>(ne==null?void 0:ne.targets)??[],[ne]);Q.useEffect(()=>{n&&(g((r==null?void 0:r.suiteFilter)??""),x((r==null?void 0:r.testIds)??[]),j((r==null?void 0:r.target)??""),m(""),E(""),A(""),Z(!1),X(!1),P(null),J(null),I(!1),le(null))},[n,r]),Q.useEffect(()=>{((O==null?void 0:O.status)==="finished"||(O==null?void 0:O.status)==="failed")&&(o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["projects"]}))},[O==null?void 0:O.status,o]);const me=Q.useCallback(()=>{const q={};return h.trim()&&(q.suite_filter=h.trim()),v.length>0&&(q.test_ids=v),S&&(q.target=S),N&&(q.threshold=Number.parseFloat(N)),C&&(q.workers=Number.parseInt(C,10)),$&&(q.dry_run=!0),q},[h,v,S,N,C,$]);Q.useEffect(()=>{const q=me();if(!q.suite_filter&&(!q.test_ids||q.test_ids.length===0)){le(null);return}vj(q,i).then(de=>le(de.command)).catch(()=>le(null))},[me,i]);function oe(){const q=p.trim();q&&!v.includes(q)&&x([...v,q]),m("")}function T(q){x(v.filter(de=>de!==q))}async function G(){J(null),I(!0);try{const q=me(),de=await gj(q,i);P(de.id)}catch(q){J(q.message)}finally{I(!1)}}if(!n)return null;if(W&&O){let q=function(){l(),d({to:"/",search:{tab:"runs"}})};return f.jsx(Fy,{onClose:l,title:"Eval Run",children:f.jsx(Yj,{status:O,onClose:l,onRunInBackground:q,runId:W})})}const ee=!!(h.trim()||v.length>0);return f.jsx(Fy,{onClose:l,title:"Run Eval",children:f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"suite-filter",className:"mb-1 block text-sm font-medium text-gray-300",children:"Suite Filter"}),f.jsx("input",{id:"suite-filter",type:"text",value:h,onChange:q=>g(q.target.value),placeholder:"evals/**/*.eval.yaml",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),Y.length>0&&!h&&f.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-1",children:[Y.slice(0,5).map(q=>f.jsx("button",{type:"button",onClick:()=>g(de=>de?`${de}, ${q.relative_path}`:q.relative_path),className:"rounded bg-gray-800 px-2 py-0.5 text-xs text-gray-400 hover:bg-gray-700 hover:text-gray-200",children:q.relative_path},q.relative_path)),Y.length>5&&f.jsxs("span",{className:"px-1 text-xs text-gray-500",children:["+",Y.length-5," more"]})]})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"test-id-input",className:"mb-1 block text-sm font-medium text-gray-300",children:"Test ID Filter"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{id:"test-id-input",type:"text",value:p,onChange:q=>m(q.target.value),onKeyDown:q=>{q.key==="Enter"&&(q.preventDefault(),oe())},placeholder:"auth-*, retrieval-basic",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),f.jsx("button",{type:"button",onClick:oe,disabled:!p.trim(),className:"rounded-md bg-gray-700 px-3 py-2 text-sm text-white hover:bg-gray-600 disabled:opacity-50",children:"Add"})]}),v.length>0&&f.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:v.map(q=>f.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-cyan-900/40 px-2.5 py-0.5 text-xs text-cyan-300",children:[q,f.jsx("button",{type:"button",onClick:()=>T(q),className:"text-cyan-400 hover:text-white",children:"×"})]},q))})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"target-override",className:"mb-1 block text-sm font-medium text-gray-300",children:"Target Override"}),f.jsxs("select",{id:"target-override",value:S,onChange:q=>j(q.target.value),className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white focus:border-cyan-600 focus:outline-none",children:[f.jsx("option",{value:"",children:"Use eval's configured target"}),te.map(q=>f.jsx("option",{value:q,children:q},q))]})]}),f.jsxs("div",{children:[f.jsxs("button",{type:"button",onClick:()=>X(!L),className:"text-sm text-gray-400 hover:text-gray-200",children:[L?"▾":"▸"," Advanced Options"]}),L&&f.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"threshold-input",className:"mb-1 block text-xs text-gray-400",children:"Threshold (0–1)"}),f.jsx("input",{id:"threshold-input",type:"number",value:N,onChange:q=>E(q.target.value),min:"0",max:"1",step:"0.1",placeholder:"0.8",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"workers-input",className:"mb-1 block text-xs text-gray-400",children:"Workers"}),f.jsx("input",{id:"workers-input",type:"number",value:C,onChange:q=>A(q.target.value),min:"1",max:"50",placeholder:"3",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),f.jsx("div",{className:"col-span-2",children:f.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-400",children:[f.jsx("input",{type:"checkbox",checked:$,onChange:q=>Z(q.target.checked),className:"rounded border-gray-600 bg-gray-800"}),"Dry run (mock provider responses)"]})})]})]}),se&&f.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:[f.jsx("div",{className:"mb-1 text-xs text-gray-500",children:"CLI Preview"}),f.jsx("code",{className:"block break-all text-xs text-cyan-300",children:se})]}),F&&f.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:F}),f.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[f.jsx("button",{type:"button",onClick:l,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Cancel"}),f.jsx("button",{type:"button",onClick:G,disabled:!ee||V,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:V?"Launching…":"Run Now"})]})]})})}function Fy({children:n,onClose:l,title:i}){return f.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 pt-[10vh]",children:f.jsxs("div",{className:"w-full max-w-lg rounded-lg border border-gray-700 bg-gray-900 shadow-xl",children:[f.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-5 py-3",children:[f.jsx("h2",{className:"text-lg font-semibold text-white",children:i}),f.jsx("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-white",children:"✕"})]}),f.jsx("div",{className:"px-5 py-4",children:n})]})})}function Yj({status:n,onClose:l,onRunInBackground:i,runId:r}){const o=n.status==="finished"||n.status==="failed",d={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"};return f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("span",{className:`text-sm font-medium ${d[n.status]??"text-gray-400"}`,children:[n.status==="running"&&"●"," ",n.status.charAt(0).toUpperCase()+n.status.slice(1)]}),!o&&f.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]}),f.jsx("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:f.jsx("code",{className:"block break-all text-xs text-cyan-300",children:n.command})}),n.stdout&&f.jsx("div",{className:"max-h-48 overflow-y-auto rounded-md bg-gray-950 p-3",children:f.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-300",children:n.stdout.slice(-3e3)})}),n.stderr&&f.jsx("div",{className:"max-h-24 overflow-y-auto rounded-md bg-red-950/20 p-3",children:f.jsx("pre",{className:"whitespace-pre-wrap text-xs text-red-300",children:n.stderr.slice(-2e3)})}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-xs text-gray-500",children:o?f.jsxs(f.Fragment,{children:["Exit code: ",n.exit_code,n.finished_at&&` · ${new Date(n.finished_at).toLocaleTimeString()}`]}):r&&f.jsx("button",{type:"button",onClick:i,className:"text-xs text-gray-400 hover:text-cyan-400",children:"Run in background"})}),o&&f.jsx("button",{type:"button",onClick:l,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Close"})]})]})}function Gj(n){if(!n)return{date:"N/A",full:"N/A"};try{const l=new Date(n);if(Number.isNaN(l.getTime()))return{date:"N/A",full:"N/A"};const i=l.toLocaleString(),r=Date.now()-l.getTime(),o=Math.floor(r/6e4),d=Math.floor(r/36e5);let h;return o<1?h="just now":o<60?h=`${o} min ago`:d<24?h=`${d} hour${d===1?"":"s"} ago`:h=l.toLocaleDateString(),{date:h,full:i}}catch{return{date:"N/A",full:"N/A"}}}function Kj(n){const l=[n.target,n.experiment].filter(i=>i&&i!=="default"&&i!=="-");return l.length>0?l.join(" · "):n.target?n.target:n.display_name??n.filename}function td({runs:n,benchmarkId:l,emptyMessage:i}){const{data:r}=ht(),o=(r==null?void 0:r.threshold)??wu;return n.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:i??f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found."}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Run an evaluation first:"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"agentv eval <eval-file>"})]})]})}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"w-8 px-4 py-3"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Run"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Passed"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Failed"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Total"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"When"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(d=>{const h=Gj(d.timestamp),g=d.pass_rate>=o,p=Kj(d),m=Math.round(d.pass_rate*d.test_count),v=d.test_count-m;return f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 text-center",children:f.jsx("span",{className:`text-base font-bold ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"})}),f.jsx("td",{className:"px-4 py-3",children:l?f.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:l,runId:d.filename},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:p}):f.jsx(Ee,{to:"/runs/$runId",params:{runId:d.filename},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:p})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-emerald-300",children:m}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:v>0?v:f.jsx("span",{className:"text-gray-600",children:"0"})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:d.test_count}),f.jsx("td",{className:"px-4 py-3",children:f.jsx(Hi,{rate:d.pass_rate})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",title:h.full,children:h.date})]},d.filename)})})]})})}function Vj(n){if(!n)return"Never synced";const l=new Date(n);return Number.isNaN(l.getTime())?"Never synced":`Last synced ${l.toLocaleString()}`}function up({filter:n,onFilterChange:l,remoteStatus:i,syncInFlight:r,onSync:o}){const d=(i==null?void 0:i.configured)===!0,h=d&&(i==null?void 0:i.available)!==!0;return f.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("div",{className:"flex flex-wrap items-center gap-2",children:["all","local","remote"].map(g=>{const p=g==="remote"&&!d;return f.jsx("button",{type:"button",onClick:()=>l(g),title:p?"Remote results are not configured":void 0,className:`rounded-full px-3 py-1 text-sm font-medium transition-colors ${n===g?"bg-cyan-500/20 text-cyan-300":p?"bg-gray-800 text-gray-600":"bg-gray-800 text-gray-400 hover:text-gray-200"}`,children:g==="all"?"All Sources":g==="local"?"Local Only":"Remote Only"},g)})}),d&&o?f.jsx("button",{type:"button",onClick:o,disabled:r,className:"rounded-md border border-cyan-800 bg-cyan-950/40 px-3 py-1.5 text-sm font-medium text-cyan-300 transition-colors hover:bg-cyan-900/50 disabled:cursor-not-allowed disabled:opacity-60",children:r?"Syncing…":"Sync Remote Results"}):null]}),d?f.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-gray-400",children:[f.jsx("span",{children:Vj(i==null?void 0:i.last_synced_at)}),i!=null&&i.repo?f.jsxs("span",{children:["Repo: ",i.repo]}):null,h?f.jsx("span",{className:"text-yellow-400",children:"Remote cache unavailable"}):null]}):n==="all"?f.jsxs("p",{className:"text-sm text-gray-500",children:["Remote results are not configured. Add"," ",f.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:"results.export"})," to"," ",f.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:".agentv/config.yaml"})," to enable."]}):null,i!=null&&i.last_error?f.jsx("div",{className:"rounded-md border border-yellow-900/50 bg-yellow-950/20 px-3 py-2 text-sm text-yellow-300",children:i.last_error}):null]})}function Au({score:n,className:l=""}){const i=Math.round(Math.max(0,Math.min(1,n))*100);return f.jsxs("div",{className:`flex items-center gap-3 ${l}`,children:[f.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-gray-800",children:f.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-cyan-400 to-blue-500 transition-all duration-300",style:{width:`${i}%`}})}),f.jsxs("span",{className:"w-12 text-right text-sm font-medium tabular-nums text-gray-300",children:[i,"%"]})]})}function Xj(){const{data:n,isLoading:l}=F1();if(l)return f.jsx(kj,{});const i=(n==null?void 0:n.targets)??[];return i.length===0?f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Targets will appear here once evaluations are run with target labels."})]}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Experiments"}),f.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:i.map(r=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:r.name}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.run_count}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.experiment_count}),f.jsx("td",{className:"px-4 py-3",children:f.jsx(Au,{score:r.pass_rate})}),f.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[f.jsx("span",{className:"text-emerald-400",children:r.passed_count}),f.jsx("span",{className:"text-gray-600",children:"/"}),f.jsx("span",{children:r.eval_count})]})]},r.name))})]})})}function kj(){return f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("div",{className:"animate-pulse",children:[f.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(n=>f.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[f.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-20 rounded bg-gray-800"})]},n))]})})}const Jy=[{id:"runs",label:"🏃 Recent Runs"},{id:"experiments",label:"🧪 Experiments"},{id:"compare",label:"📊 Compare"},{id:"targets",label:"🤖 Targets"}],Zj=ra("/")({component:$j});function $j(){const{data:n,isLoading:l}=Wf(),{data:i,isLoading:r}=ht(),o=((n==null?void 0:n.projects.length)??0)>0,d=i==null?void 0:i.multi_project_dashboard;return l||r?f.jsx(cp,{}):d===!0||d===void 0&&o?f.jsx(Pj,{}):f.jsx(Fj,{})}function Pj(){const{data:n}=Wf(),{data:l}=ht(),i=Un(),[r,o]=Q.useState(""),[d,h]=Q.useState(""),[g,p]=Q.useState(null),[m,v]=Q.useState(!1),[x,S]=Q.useState(!1),j=(n==null?void 0:n.projects)??[],N=(l==null?void 0:l.read_only)===!0;async function E(A){if(A.preventDefault(),!!r.trim()){p(null);try{await aj(r.trim()),o(""),v(!1),i.invalidateQueries({queryKey:["benchmarks"]})}catch($){p($.message)}}}async function C(A){if(A.preventDefault(),!!d.trim()){p(null);try{const $=await nj(d.trim());h(""),$.length===0&&p("No projects with .agentv/ found in that directory."),i.invalidateQueries({queryKey:["benchmarks"]})}catch($){p($.message)}}}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Benchmarks"}),f.jsx("div",{className:"flex gap-2",children:!N&&f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",onClick:()=>S(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"}),f.jsx("button",{type:"button",onClick:()=>v(!m),className:"rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500",children:m?"Cancel":"Add Benchmark"})]})})]}),g&&f.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-3 text-sm text-red-400",children:g}),!N&&m&&f.jsxs("div",{className:"space-y-3 rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[f.jsxs("form",{onSubmit:E,className:"flex gap-2",children:[f.jsx("input",{type:"text",value:r,onChange:A=>o(A.target.value),placeholder:"Benchmark path (e.g., /home/user/projects/my-evals)",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),f.jsx("button",{type:"submit",className:"rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500",children:"Add"})]}),f.jsxs("form",{onSubmit:C,className:"flex gap-2",children:[f.jsx("input",{type:"text",value:d,onChange:A=>h(A.target.value),placeholder:"Discover benchmarks in directory...",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),f.jsx("button",{type:"submit",className:"rounded-md bg-gray-700 px-3 py-1.5 text-sm font-medium text-white hover:bg-gray-600",children:"Discover"})]})]}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:j.map(A=>f.jsx(Qj,{project:A},A.id))}),!N&&f.jsx(bs,{open:x,onClose:()=>S(!1)})]})}function Fj(){const i=Ig().location.search.tab,r=ki(),o=Un(),{data:d,isLoading:h,error:g}=Jf(),{data:p}=ap(),{data:m}=ht(),[v,x]=Q.useState(!1),[S,j]=Q.useState("all"),[N,E]=Q.useState(!1),C=(m==null?void 0:m.read_only)===!0,A=Jy.some(L=>L.id===i)?i:"experiments",$=S==="all"?(d==null?void 0:d.runs)??[]:((d==null?void 0:d.runs)??[]).filter(L=>L.source===S);async function Z(){E(!0);try{await sp(),await Promise.all([o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["experiments"]}),o.invalidateQueries({queryKey:["compare"]}),o.invalidateQueries({queryKey:["targets"]}),o.invalidateQueries({queryKey:["remote-status",""]})])}finally{E(!1)}}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Evaluation Runs"}),(m==null?void 0:m.project_name)&&f.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:m.project_name})]}),!C&&f.jsx("button",{type:"button",onClick:()=>x(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),f.jsx("div",{className:"border-b border-gray-800",children:f.jsx("div",{className:"flex gap-1",children:Jy.map(L=>f.jsx("button",{type:"button",onClick:()=>r({to:"/",search:{tab:L.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${A===L.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:L.label},L.id))})}),A==="runs"&&f.jsx(Ij,{runs:$,isLoading:h,error:g,sourceFilter:S,onSourceFilterChange:j,remoteStatus:p,syncInFlight:N,onSyncRemote:Z}),A==="experiments"&&f.jsx(Bj,{}),A==="compare"&&f.jsx(Jj,{}),A==="targets"&&f.jsx(Xj,{}),!C&&f.jsx(bs,{open:v,onClose:()=>x(!1)})]})}function Jj(){const{data:n,isLoading:l,isError:i,error:r}=P1();return f.jsx(rp,{data:n,isLoading:l,isError:i,error:r})}function Ij({runs:n,isLoading:l,error:i,sourceFilter:r,onSourceFilterChange:o,remoteStatus:d,syncInFlight:h,onSyncRemote:g}){return l?f.jsx(cp,{}):i?f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",i.message]}):f.jsxs("div",{className:"space-y-4",children:[f.jsx(Wj,{}),f.jsx(up,{filter:r,onFilterChange:o,remoteStatus:d,syncInFlight:h,onSync:g}),f.jsx(td,{runs:n,emptyMessage:r==="remote"?d!=null&&d.configured?f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No remote runs found."}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Sync remote results or run an eval with"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"auto_push: true"})," ","in your config."]})]}):f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"text-lg text-gray-400",children:"Remote results are not configured."}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Add"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"results.export"})," ","to"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:".agentv/config.yaml"})," ","to enable remote result syncing."]})]}):void 0})]})}function Wj(){const{data:n}=ip(),l=((n==null?void 0:n.runs)??[]).filter(i=>i.status==="starting"||i.status==="running");return l.length===0?null:f.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[f.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:f.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),f.jsx("ul",{className:"divide-y divide-gray-800/50",children:l.map(i=>f.jsxs("li",{className:"flex items-center justify-between px-4 py-3",children:[f.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[f.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),f.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:i.id}),f.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(i.started_at).toLocaleTimeString()})]}),f.jsx(Ee,{to:"/jobs/$runId",params:{runId:i.id},className:"ml-4 flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},i.id))})]})}function cp(){return f.jsx("div",{className:"space-y-2",children:["s1","s2","s3","s4","s5"].map(n=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},n))})}function Ou({total:n,passed:l,failed:i,passRate:r,totalCost:o}){const d=Math.round(r*100),h=d>=80?"text-cyan-400":d>=60?"text-amber-400":"text-red-400";return f.jsxs("div",{className:"flex flex-wrap items-center gap-6 rounded-lg border border-gray-800 bg-gray-900/60 px-5 py-3",children:[f.jsx(Ci,{label:"Pass Rate",value:`${d}%`,accent:h,large:!0}),f.jsx("div",{className:"h-6 w-px bg-gray-700"}),f.jsx(Ci,{label:"Passed",value:String(l),accent:"text-emerald-400"}),f.jsx(Ci,{label:"Failed",value:String(i),accent:"text-red-400"}),f.jsx(Ci,{label:"Total",value:String(n)}),o!==void 0&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"h-6 w-px bg-gray-700"}),f.jsx(Ci,{label:"Cost",value:`$${o.toFixed(4)}`,accent:"text-amber-400"})]})]})}function Ci({label:n,value:l,accent:i,large:r}){return f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{className:"text-xs text-gray-500",children:n}),f.jsx("span",{className:`tabular-nums font-semibold ${r?"text-2xl":"text-lg"} ${i??"text-white"}`,children:l})]})}function eN(n,l){const i=new Map;for(const r of n){const o=r.category??"Uncategorized",d=r.suite??"Uncategorized";i.has(o)||i.set(o,new Map);const h=i.get(o),g=h.get(d)??{passed:0,failed:0,total:0,scoreSum:0};g.total+=1,g.scoreSum+=r.score,ka(r.score,l)?g.passed+=1:g.failed+=1,h.set(d,g)}return Array.from(i.entries()).map(([r,o])=>{const d=Array.from(o.entries()).map(([v,x])=>({name:v,...x,avgScore:x.total>0?x.scoreSum/x.total:0})).sort((v,x)=>v.name.localeCompare(x.name)),h=d.reduce((v,x)=>v+x.total,0),g=d.reduce((v,x)=>v+x.passed,0),p=d.reduce((v,x)=>v+x.failed,0),m=d.reduce((v,x)=>v+x.avgScore*x.total,0);return{name:r,suites:d,total:h,passed:g,failed:p,avgScore:h>0?m/h:0}}).sort((r,o)=>r.name.localeCompare(o.name))}function op({results:n,runId:l,benchmarkId:i}){const{data:r}=ht(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,d=n.length,h=n.filter(x=>ka(x.score,o)).length,g=d-h,p=d>0?h/d:0,m=n.reduce((x,S)=>x+(S.costUsd??0),0),v=eN(n,o);return d===0?f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ou,{total:0,passed:0,failed:0,passRate:0}),f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This run has no results yet."})]})]}):f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ou,{total:d,passed:h,failed:g,passRate:p,totalCost:m>0?m:void 0}),f.jsxs("div",{children:[f.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Category Breakdown"}),f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Category"}),f.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Passed"}),f.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Failed"}),f.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Total"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:v.map(x=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-2.5 font-medium text-gray-200",children:x.name}),f.jsx("td",{className:"px-4 py-2.5",children:f.jsx(Hi,{rate:x.total>0?x.passed/x.total:0})}),f.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:x.passed}),f.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:x.failed>0?x.failed:f.jsx("span",{className:"text-gray-600",children:"0"})}),f.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-gray-400",children:x.total})]},x.name))})]})})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"All Evals"}),f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"w-8 px-4 py-3"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),f.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map((x,S)=>{const j=x.executionStatus==="execution_error",N=ka(x.score,o);return f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 text-center",children:j?f.jsx("span",{className:"text-base font-bold text-red-400",children:"!"}):f.jsx("span",{className:`text-base font-bold ${N?"text-emerald-400":"text-red-400"}`,children:N?"✓":"✗"})}),f.jsx("td",{className:"px-4 py-3",children:i?f.jsx(Ee,{to:"/projects/$benchmarkId/evals/$runId/$evalId",params:{benchmarkId:i,runId:l,evalId:x.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:x.testId}):f.jsx(Ee,{to:"/evals/$runId/$evalId",params:{runId:l,evalId:x.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:x.testId})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",children:x.target??"-"}),f.jsx("td",{className:"px-4 py-3",children:j?f.jsx("span",{className:"inline-flex rounded-full bg-red-900/50 px-2 py-0.5 text-xs font-medium text-red-400",children:"ERR"}):f.jsx(Hi,{rate:x.score})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.durationMs!=null?`${(x.durationMs/1e3).toFixed(1)}s`:"-"}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.costUsd!=null?`$${x.costUsd.toFixed(4)}`:"-"})]},`${x.testId}-${S}`)})})]})})]})]})}const fp=ra("/runs/$runId")({component:tN});function tN(){var E;const{runId:n}=fp.useParams(),{data:l,isLoading:i,error:r}=Zi(n),{data:o}=ht(),[d,h]=Q.useState(!1),g=(o==null?void 0:o.read_only)===!0;if(i)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(C=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},C))})]});if(r)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",r.message]});const p=(E=l==null?void 0:l.results)==null?void 0:E[0],m=p==null?void 0:p.target,v=p==null?void 0:p.experiment,x=p==null?void 0:p.timestamp,S=m?{target:m}:void 0,j=(()=>{const C=[v,m].filter(A=>A&&A!=="default");return C.length>0?C.join(" · "):n})(),N=[m,v&&v!=="default"?v:null,x?new Date(x).toLocaleString():null,l==null?void 0:l.source].filter(Boolean).join(" · ");return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:j}),f.jsx("p",{className:"mt-1 text-sm text-gray-500",children:N})]}),!g&&f.jsx("button",{type:"button",onClick:()=>h(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Re-run with Filters"})]}),f.jsx(op,{results:(l==null?void 0:l.results)??[],runId:n}),!g&&f.jsx(bs,{open:d,onClose:()=>h(!1),prefill:S})]})}const Iy=[{id:"runs",label:"Recent Runs"},{id:"experiments",label:"Experiments"},{id:"compare",label:"Compare"},{id:"targets",label:"Targets"}],dp=ra("/projects/$benchmarkId")({component:aN});function aN(){const{benchmarkId:n}=dp.useParams(),r=Ig().location.search.tab,o=ki(),[d,h]=Q.useState(!1),{data:g}=ht(),p=(g==null?void 0:g.read_only)===!0,m=Iy.some(v=>v.id===r)?r:"experiments";return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:n}),!p&&f.jsx("button",{type:"button",onClick:()=>h(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),f.jsx("div",{className:"border-b border-gray-800",children:f.jsx("div",{className:"flex gap-1",children:Iy.map(v=>f.jsx("button",{type:"button",onClick:()=>o({to:"/projects/$benchmarkId",params:{benchmarkId:n},search:{tab:v.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${m===v.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:v.label},v.id))})}),m==="runs"&&f.jsx(nN,{benchmarkId:n}),m==="experiments"&&f.jsx(sN,{benchmarkId:n}),m==="compare"&&f.jsx(lN,{benchmarkId:n}),m==="targets"&&f.jsx(iN,{benchmarkId:n}),!p&&f.jsx(bs,{open:d,onClose:()=>h(!1),benchmarkId:n})]})}function nN({benchmarkId:n}){const l=Un(),{data:i,isLoading:r,error:o}=np(n),{data:d}=ap(n),[h,g]=Q.useState("all"),[p,m]=Q.useState(!1),v=h==="all"?(i==null?void 0:i.runs)??[]:((i==null?void 0:i.runs)??[]).filter(S=>S.source===h);async function x(){m(!0);try{await sp(n),await Promise.all([l.invalidateQueries({queryKey:["benchmarks",n,"runs"]}),l.invalidateQueries({queryKey:["benchmarks",n,"experiments"]}),l.invalidateQueries({queryKey:["benchmarks",n,"compare"]}),l.invalidateQueries({queryKey:["benchmarks",n,"targets"]}),l.invalidateQueries({queryKey:["remote-status",n]})])}finally{m(!1)}}return r?f.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(S=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},S))}):o?f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",o.message]}):f.jsxs("div",{className:"space-y-4",children:[f.jsx(up,{filter:h,onFilterChange:g,remoteStatus:d,syncInFlight:p,onSync:x}),f.jsx(td,{runs:v,benchmarkId:n})]})}function sN({benchmarkId:n}){const{data:l,isLoading:i}=Ve(uj(n)),r=(l==null?void 0:l.experiments)??[];return i?f.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(o=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},o))}):r.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No experiments found"})}):f.jsx("div",{className:"space-y-2",children:r.map(o=>f.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-white",children:o.name}),f.jsxs("p",{className:"text-sm text-gray-400",children:[o.run_count," run",o.run_count!==1?"s":""]})]}),f.jsxs("span",{className:"text-lg font-semibold tabular-nums text-cyan-400",children:[Math.round(o.pass_rate*100),"%"]})]},o.name))})}function lN({benchmarkId:n}){const{data:l,isLoading:i,isError:r,error:o}=Ve(cj(n));return f.jsx(rp,{data:l,isLoading:i,isError:r,error:o})}function iN({benchmarkId:n}){const{data:l,isLoading:i}=Ve(oj(n)),r=(l==null?void 0:l.targets)??[];return i?f.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(o=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},o))}):r.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"})}):f.jsx("div",{className:"space-y-2",children:r.map(o=>f.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-white",children:o.name}),f.jsxs("p",{className:"text-sm text-gray-400",children:[o.run_count," run",o.run_count!==1?"s":""," · ",o.experiment_count," ","experiment",o.experiment_count!==1?"s":""]})]}),f.jsxs("span",{className:"text-lg font-semibold tabular-nums text-cyan-400",children:[Math.round(o.pass_rate*100),"%"]})]},o.name))})}const hp=ra("/jobs/$runId")({component:rN});function rN(){const{runId:n}=hp.useParams(),{data:l,isLoading:i,error:r}=lp(n);if(i)return f.jsxs("div",{className:"space-y-4",children:[f.jsx(xf,{}),f.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-gray-900"})]});if(r||!l)return f.jsxs("div",{className:"space-y-4",children:[f.jsx(xf,{}),f.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-400",children:r?`Failed to load run: ${r.message}`:"Run not found."})]});const o=l.status==="finished"||l.status==="failed",h={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"}[l.status]??"text-gray-400";return f.jsxs("div",{className:"space-y-4",children:[f.jsx(xf,{}),f.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("h1",{className:"truncate font-mono text-base font-semibold text-white",children:n}),f.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["Started ",new Date(l.started_at).toLocaleString(),l.finished_at&&f.jsxs(f.Fragment,{children:[" · ","Finished ",new Date(l.finished_at).toLocaleString()," · ",Math.round((new Date(l.finished_at).getTime()-new Date(l.started_at).getTime())/1e3),"s"]})]})]}),f.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2",children:[f.jsx("span",{className:`text-sm font-medium ${h}`,children:l.status.charAt(0).toUpperCase()+l.status.slice(1)}),!o&&f.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]})]}),f.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 px-4 py-3",children:[f.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Command"}),f.jsx("code",{className:"break-all text-xs text-cyan-300",children:l.command})]}),l.stdout?f.jsxs("div",{children:[f.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Output"}),f.jsx("div",{className:"max-h-[60vh] overflow-y-auto rounded-lg border border-gray-700 bg-gray-950 p-4",children:f.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-gray-200",children:l.stdout})})]}):!o&&f.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[f.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-gray-500 border-t-transparent"}),"Waiting for output…"]}),l.stderr&&f.jsxs("div",{children:[f.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-red-500",children:"Stderr"}),f.jsx("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-red-900/40 bg-red-950/20 p-4",children:f.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-red-300",children:l.stderr})})]}),o&&f.jsxs("p",{className:"text-xs text-gray-500",children:["Exit code:"," ",f.jsx("span",{className:l.exit_code===0?"text-emerald-400":"text-red-400",children:l.exit_code})]})]})}function xf(){return f.jsx(Ee,{to:"/",search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const mp=ra("/experiments/$experimentName")({component:uN});function uN(){var x;const{experimentName:n}=mp.useParams(),{data:l,isLoading:i}=If(),{data:r,isLoading:o}=Jf();if(i||o)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-4 gap-4",children:["s1","s2","s3","s4"].map(S=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},S))})]});const h=(x=l==null?void 0:l.experiments)==null?void 0:x.find(S=>S.name===n),g=(r==null?void 0:r.runs)??[],p=(h==null?void 0:h.pass_rate)??0,m=(h==null?void 0:h.run_count)??0,v=(h==null?void 0:h.target_count)??0;return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:n}),f.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[m," run",m!==1?"s":""," · ",v," target",v!==1?"s":"",(h==null?void 0:h.last_run)&&f.jsxs("span",{className:"ml-2",children:["· Last run: ",Wy(h.last_run)]})]})]}),h&&f.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[f.jsx(pu,{label:"Runs",value:String(m)}),f.jsx(pu,{label:"Targets",value:String(v)}),f.jsx(pu,{label:"Pass Rate",value:`${Math.round(p*100)}%`,accent:"text-cyan-400"}),f.jsx(pu,{label:"Last Run",value:Wy(h.last_run)})]}),f.jsxs("div",{children:[f.jsx("h2",{className:"mb-4 text-lg font-medium text-gray-200",children:"All Runs"}),f.jsx(td,{runs:g})]})]})}function pu({label:n,value:l,accent:i}){return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[f.jsx("p",{className:"text-sm text-gray-400",children:n}),f.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${i??"text-white"}`,children:l})]})}function Wy(n){if(!n)return"N/A";try{const l=new Date(n);return Number.isNaN(l.getTime())?"N/A":l.toLocaleString()}catch{return"N/A"}}async function cN(n,l){const i=await fetch("/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reviews:[{test_id:n,comment:l}]})});if(!i.ok)throw new Error(`Failed to save feedback: ${i.status}`);return i.json()}function oN({testId:n}){var v;const{data:l}=$1(),i=Un(),r=(v=l==null?void 0:l.reviews)==null?void 0:v.find(x=>x.test_id===n),[o,d]=Q.useState((r==null?void 0:r.comment)??""),[h,g]=Q.useState(!1);Q.useEffect(()=>{d((r==null?void 0:r.comment)??""),g(!1)},[r==null?void 0:r.comment]);const p=Bb({mutationFn:()=>cN(n,o),onSuccess:()=>{i.invalidateQueries({queryKey:["feedback"]}),g(!0),setTimeout(()=>g(!1),2e3)}}),m=Q.useCallback(()=>{p.mutate()},[p]);return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[f.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-400",children:"Feedback"}),f.jsx("textarea",{value:o,onChange:x=>{d(x.target.value),g(!1)},placeholder:"Add feedback for this test...",className:"w-full rounded-md border border-gray-700 bg-gray-800 p-3 text-sm text-gray-200 placeholder-gray-500 focus:border-cyan-400 focus:outline-none",rows:3}),f.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[f.jsx("button",{type:"button",onClick:m,disabled:p.isPending,className:"rounded-md bg-cyan-600 px-4 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:p.isPending?"Saving...":"Save Feedback"}),h&&f.jsx("span",{className:"text-sm text-emerald-400",children:"Saved"}),p.isError&&f.jsx("span",{className:"text-sm text-red-400",children:"Error saving feedback"})]})]})}function fN(n){var i;switch((i=n.split(".").pop())==null?void 0:i.toLowerCase()){case"ts":case"tsx":return"📘";case"json":return"📋";case"log":case"txt":return"📜";case"md":return"📝";default:return"📄"}}function yp(n){const l=[];for(const i of n)i.type==="dir"&&(l.push(i.path),i.children&&l.push(...yp(i.children)));return l}function gp({node:n,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:o,depth:d=0}){const h=n.type==="dir",g=r.has(n.path),p=l===n.path;return f.jsxs("div",{children:[f.jsxs("button",{type:"button",onClick:()=>{h?o(n.path):i(n.path)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors ${p?"bg-cyan-400/20 text-cyan-400":"text-gray-300 hover:bg-gray-800/50 hover:text-gray-200"}`,style:{paddingLeft:`${d*16+8}px`},children:[f.jsx("span",{className:"flex-shrink-0 text-xs",children:h?g?"📂":"📁":fN(n.name)}),f.jsx("span",{className:"truncate",children:n.name})]}),h&&g&&n.children&&f.jsx("div",{children:n.children.map(m=>f.jsx(gp,{node:m,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:o,depth:d+1},m.path))})]})}function dN({files:n,selectedPath:l,onSelect:i}){const[r,o]=Q.useState(()=>new Set(yp(n))),d=h=>{o(g=>{const p=new Set(g);return p.has(h)?p.delete(h):p.add(h),p})};return f.jsxs("div",{className:"w-64 overflow-y-auto rounded-lg border border-gray-800 bg-gray-900 py-2",children:[n.length===0&&f.jsx("p",{className:"px-4 py-2 text-sm text-gray-500",children:"No files."}),n.map(h=>f.jsx(gp,{node:h,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:d},h.path))]})}const hN="modulepreload",mN=function(n){return"/"+n},eg={},yN=function(l,i,r){let o=Promise.resolve();if(i&&i.length>0){let h=function(m){return Promise.all(m.map(v=>Promise.resolve(v).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const g=document.querySelector("meta[property=csp-nonce]"),p=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));o=h(i.map(m=>{if(m=mN(m),m in eg)return;eg[m]=!0;const v=m.endsWith(".css"),x=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const S=document.createElement("link");if(S.rel=v?"stylesheet":hN,v||(S.as="script"),S.crossOrigin="",S.href=m,p&&S.setAttribute("nonce",p),document.head.appendChild(S),v)return new Promise((j,N)=>{S.addEventListener("load",j),S.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${m}`)))})}))}function d(h){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=h,window.dispatchEvent(g),!g.defaultPrevented)throw h}return o.then(h=>{for(const g of h||[])g.status==="rejected"&&d(g.reason);return l().catch(d)})},gN=Q.lazy(()=>yN(()=>import("./index-D74g07Nj.js"),[]));function pN({value:n,language:l="json",height:i="400px"}){return f.jsx(Q.Suspense,{fallback:f.jsx("div",{className:"flex items-center justify-center rounded-lg bg-gray-900 p-8 text-gray-500",children:"Loading editor..."}),children:f.jsx(gN,{height:i,language:l,value:n,theme:"vs-dark",options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbers:"on",wordWrap:"on",padding:{top:12}}})})}function pp(n){for(const l of n){if(l.type==="file")return l.path;if(l.children){const i=pp(l.children);if(i)return i}}return null}function xp({eval:n,runId:l,benchmarkId:i}){const[r,o]=Q.useState("checks"),{data:d}=ht(),h=(d==null?void 0:d.read_only)===!0,g=[{id:"checks",label:"Checks"},{id:"files",label:"Files"},...h?[]:[{id:"feedback",label:"Feedback"}]];return f.jsxs("div",{className:"flex min-h-full flex-col",children:[f.jsx("div",{className:"flex items-start justify-between border-b border-gray-800 px-4 py-3",children:f.jsxs("div",{children:[f.jsx("h3",{className:"text-lg font-medium",children:n.testId}),f.jsxs("p",{className:"mt-0.5 text-sm text-gray-400",children:[n.target&&f.jsxs("span",{children:["Target: ",n.target]}),n.durationMs!=null&&f.jsxs("span",{className:"ml-4",children:[(n.durationMs/1e3).toFixed(1),"s"]}),n.costUsd!=null&&f.jsxs("span",{className:"ml-4",children:["$",n.costUsd.toFixed(4)]})]})]})}),f.jsx("div",{className:"border-b border-gray-800",children:f.jsx("div",{className:"flex gap-1 px-4",children:g.map(p=>f.jsx("button",{type:"button",onClick:()=>o(p.id),className:`px-4 py-2 text-sm font-medium transition-colors ${r===p.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:p.label},p.id))})}),f.jsxs("div",{className:"min-h-0 flex-1",children:[r==="checks"&&f.jsx("div",{className:"overflow-auto p-4",children:f.jsx(xN,{result:n})}),r==="files"&&f.jsx("div",{className:"h-full p-4",children:f.jsx(vN,{result:n,runId:l,benchmarkId:i})}),!h&&r==="feedback"&&f.jsx("div",{className:"p-4",children:f.jsx(oN,{testId:n.testId})})]})]})}function tg({assertion:n}){return f.jsxs("div",{className:`flex items-start gap-3 rounded-lg border p-3 ${n.passed?"border-emerald-900/50 bg-emerald-950/20":"border-red-900/50 bg-red-950/20"}`,children:[f.jsx("span",{className:`mt-0.5 text-lg ${n.passed?"text-emerald-400":"text-red-400"}`,children:n.passed?"✓":"✗"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("p",{className:"text-sm text-gray-200",children:[n.text,n.durationMs!=null&&f.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",(n.durationMs/1e3).toFixed(1),"s)"]})]}),n.evidence&&f.jsx("p",{className:"mt-1 text-xs text-gray-400",children:n.evidence})]})]})}function xN({result:n}){const{data:l}=ht(),i=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8,r=!ka(n.score,i)||n.executionStatus==="error"||n.executionStatus==="failed",o=(n.scores??[]).filter(m=>Array.isArray(m.assertions)&&m.assertions.length>0),d=o.length>0,h=n.assertions??[],g=[];n.error&&g.push(n.error),(n.executionStatus==="error"||n.executionStatus==="failed")&&g.push(`Execution status: ${n.executionStatus}`);const p=d?o.flatMap(m=>m.assertions):h;for(const m of p.filter(v=>!v.passed)){const v=m.evidence?`${m.text}: ${m.evidence}`:m.text;g.push(v)}if(n.scores){for(const m of n.scores)if(!ka(m.score,i)&&m.details){const v=typeof m.details=="string"?m.details:JSON.stringify(m.details,null,2);g.push(`[${m.name??m.type??"evaluator"}] ${v}`)}}return f.jsxs("div",{className:"space-y-6",children:[f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("span",{className:"text-sm font-medium text-gray-400",children:"Overall score"}),f.jsx("div",{className:"flex-1",children:f.jsx(Au,{score:n.score})})]})}),n.scores&&n.scores.length>0&&f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[f.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-400",children:"Evaluator Scores"}),f.jsx("div",{className:"space-y-3",children:n.scores.map((m,v)=>f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:m.name??m.type??`Score ${v+1}`}),f.jsx("div",{className:"flex-1",children:f.jsx(Au,{score:m.score})})]},`${m.name??m.type??v}`))})]}),d?f.jsx("div",{className:"space-y-6",children:o.map((m,v)=>{const x=m.name??m.type??`Evaluator ${v+1}`;return f.jsxs("div",{className:"space-y-2",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:x}),m.assertions.map((S,j)=>f.jsx(tg,{assertion:S},`${S.text}-${j}`))]},`${m.name??m.type??v}`)})}):h.length>0?f.jsx("div",{className:"space-y-2",children:h.map((m,v)=>f.jsx(tg,{assertion:m},`${m.text}-${v}`))}):f.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded."}),r&&g.length>0&&f.jsxs("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-4",children:[f.jsx("h4",{className:"mb-2 text-sm font-medium text-red-400",children:"Failure Reason"}),f.jsx("div",{className:"space-y-2",children:g.map(m=>f.jsx("p",{className:"text-sm text-gray-300",children:m},m))})]})]})}function vN({result:n,runId:l,benchmarkId:i}){const r=n.testId,{data:o}=i?Ve(ij(i,l,r)):J1(l,r),d=(o==null?void 0:o.files)??[],[h,g]=Q.useState(null),p=h??(d.length>0?pp(d):null),{data:m,isLoading:v}=i?Ve(rj(i,l,r,p??"")):I1(l,r,p??"");if(d.length===0)return f.jsx("p",{className:"text-sm text-gray-500",children:"No artifact files available."});const x=p?v?"Loading...":(m==null?void 0:m.content)??"":"",S=p?(m==null?void 0:m.language)??"plaintext":"plaintext";return f.jsxs("div",{className:"flex h-full min-h-[400px] gap-4",children:[f.jsx(dN,{files:d,selectedPath:p,onSelect:g}),f.jsx("div",{className:"flex-1",children:f.jsx(pN,{value:x,language:S,height:"100%"})})]})}const vp=ra("/evals/$runId/$evalId")({component:bN});function bN(){const{runId:n,evalId:l}=vp.useParams(),{data:i,isLoading:r,error:o}=Zi(n),{data:d}=ht(),[h,g]=Q.useState(!1),p=(d==null?void 0:d.read_only)===!0;if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",o.message]});const m=i==null?void 0:i.results.find(v=>v.testId===l);return m?f.jsxs("div",{className:"flex h-full flex-col gap-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",n," / Eval: ",l]}),f.jsx("h1",{className:"text-2xl font-semibold text-white",children:l})]}),!p&&f.jsx("button",{type:"button",onClick:()=>g(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),f.jsx(xp,{eval:m,runId:n}),!p&&f.jsx(bs,{open:h,onClose:()=>g(!1),prefill:{testIds:[l],target:m.target}})]}):f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:f.jsxs("p",{className:"text-gray-400",children:["Eval ",f.jsx("code",{className:"text-cyan-400",children:l})," not found in run"," ",f.jsx("code",{className:"text-cyan-400",children:n}),"."]})})}const bp=ra("/runs/$runId_/suite/$suite")({component:SN});function SN(){const{runId:n,suite:l}=bp.useParams(),{data:i,isLoading:r,error:o}=Zi(n),{data:d}=ht(),h=(d==null?void 0:d.threshold)??(d==null?void 0:d.pass_threshold)??.8;if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(j=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},j))})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",o.message]});const g=((i==null?void 0:i.results)??[]).filter(j=>(j.suite??"Uncategorized")===l),p=g.length,m=g.filter(j=>ka(j.score,h)).length,v=p-m,x=p>0?m/p:0,S=g.reduce((j,N)=>j+(N.costUsd??0),0);return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:l}),f.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",n]})]}),f.jsx(Ou,{total:p,passed:m,failed:v,passRate:x,totalCost:S>0?S:void 0}),p===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),f.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:g.map((j,N)=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3",children:f.jsx(Ee,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:j.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:j.testId})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",children:j.target??"-"}),f.jsx("td",{className:"px-4 py-3",children:j.executionStatus==="execution_error"?f.jsx("span",{className:"inline-flex rounded-full px-2 py-0.5 text-xs font-medium bg-red-900/50 text-red-400",children:"ERR"}):f.jsx(Hi,{rate:j.score})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:j.durationMs!=null?`${(j.durationMs/1e3).toFixed(1)}s`:"-"}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:j.costUsd!=null?`$${j.costUsd.toFixed(4)}`:"-"})]},`${j.testId}-${N}`))})]})})]})}const Sp=ra("/runs/$runId_/category/$category")({component:jN});function jN(){const{runId:n,category:l}=Sp.useParams(),{data:i,isLoading:r,error:o}=tp(n,l);if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(v=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},v))})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",o.message]});const d=(i==null?void 0:i.suites)??[],h=d.reduce((v,x)=>v+x.total,0),g=d.reduce((v,x)=>v+x.passed,0),p=h-g,m=h>0?g/h:0;return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:l}),f.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",n]})]}),f.jsx(Ou,{total:h,passed:g,failed:p,passRate:m}),d.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):f.jsxs("div",{className:"space-y-3",children:[f.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),f.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:d.map(v=>f.jsxs(Ee,{to:"/runs/$runId/suite/$suite",params:{runId:n,suite:v.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:v.name}),f.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[v.passed,"/",v.total]})]}),f.jsx("div",{className:"mt-2",children:f.jsx(Au,{score:v.avg_score})}),f.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[f.jsxs("span",{className:"text-emerald-400",children:[v.passed," passed"]}),v.failed>0&&f.jsxs("span",{className:"text-red-400",children:[v.failed," failed"]})]})]},v.name))})]})]})}const jp=ra("/projects/$benchmarkId_/runs/$runId")({component:NN});function NN(){var C;const{benchmarkId:n,runId:l}=jp.useParams(),{data:i,isLoading:r,error:o}=ed(n,l),{data:d}=ht(),[h,g]=Q.useState(!1),p=(d==null?void 0:d.read_only)===!0;if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(A=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},A))})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",o.message]});const m=(C=i==null?void 0:i.results)==null?void 0:C[0],v=m==null?void 0:m.target,x=m==null?void 0:m.experiment,S=m==null?void 0:m.timestamp,j=v?{target:v}:void 0,N=(()=>{const A=[x,v].filter($=>$&&$!=="default");return A.length>0?A.join(" · "):l})(),E=[v,x&&x!=="default"?x:null,S?new Date(S).toLocaleString():null,i==null?void 0:i.source].filter(Boolean).join(" · ");return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:N}),f.jsx("p",{className:"mt-1 text-sm text-gray-500",children:E})]}),!p&&f.jsx("button",{type:"button",onClick:()=>g(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Re-run with Filters"})]}),f.jsx(op,{results:(i==null?void 0:i.results)??[],runId:l,benchmarkId:n}),!p&&f.jsx(bs,{open:h,onClose:()=>g(!1),benchmarkId:n,prefill:j})]})}const Np=ra("/projects/$benchmarkId_/evals/$runId/$evalId")({component:RN});function RN(){const{benchmarkId:n,runId:l,evalId:i}=Np.useParams(),{data:r,isLoading:o,error:d}=ed(n,l),{data:h}=ht(),[g,p]=Q.useState(!1),m=(h==null?void 0:h.read_only)===!0;if(o)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(d)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",d.message]});const v=r==null?void 0:r.results.find(x=>x.testId===i);return v?f.jsxs("div",{className:"flex h-full flex-col gap-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",l," / Eval: ",i]}),f.jsx("h1",{className:"text-2xl font-semibold text-white",children:i})]}),!m&&f.jsx("button",{type:"button",onClick:()=>p(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),f.jsx(xp,{eval:v,runId:l,benchmarkId:n}),!m&&f.jsx(bs,{open:g,onClose:()=>p(!1),benchmarkId:n,prefill:{testIds:[i],target:v.target}})]}):f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:f.jsxs("p",{className:"text-gray-400",children:["Eval ",f.jsx("code",{className:"text-cyan-400",children:i})," not found in run"," ",f.jsx("code",{className:"text-cyan-400",children:l}),"."]})})}const _N=Cj.update({id:"/settings",path:"/settings",getParentRoute:()=>ta}),EN=Zj.update({id:"/",path:"/",getParentRoute:()=>ta}),TN=fp.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>ta}),MN=dp.update({id:"/projects/$benchmarkId",path:"/projects/$benchmarkId",getParentRoute:()=>ta}),CN=hp.update({id:"/jobs/$runId",path:"/jobs/$runId",getParentRoute:()=>ta}),wN=mp.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>ta}),AN=vp.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>ta}),ON=bp.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>ta}),zN=Sp.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>ta}),DN=jp.update({id:"/projects/$benchmarkId_/runs/$runId",path:"/projects/$benchmarkId/runs/$runId",getParentRoute:()=>ta}),LN=Np.update({id:"/projects/$benchmarkId_/evals/$runId/$evalId",path:"/projects/$benchmarkId/evals/$runId/$evalId",getParentRoute:()=>ta}),UN={IndexRoute:EN,SettingsRoute:_N,ExperimentsExperimentNameRoute:wN,JobsRunIdRoute:CN,ProjectsBenchmarkIdRoute:MN,RunsRunIdRoute:TN,EvalsRunIdEvalIdRoute:AN,ProjectsBenchmarkIdRunsRunIdRoute:DN,RunsRunIdCategoryCategoryRoute:zN,RunsRunIdSuiteSuiteRoute:ON,ProjectsBenchmarkIdEvalsRunIdEvalIdRoute:LN},BN=ta._addFileChildren(UN)._addFileTypes(),qN=new Rb({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),HN=C1({routeTree:BN}),Rp=document.getElementById("root");if(!Rp)throw new Error("Root element not found");Wv.createRoot(Rp).render(f.jsx(Q.StrictMode,{children:f.jsx(_b,{client:qN,children:f.jsx(O1,{router:HN})})}));export{Oi as W,Q as r};
|
|
65
|
+
*/var Vy;function WS(){if(Vy)return df;Vy=1;var n=Xi(),l=IS();function i(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var r=typeof Object.is=="function"?Object.is:i,o=l.useSyncExternalStore,d=n.useRef,h=n.useEffect,g=n.useMemo,p=n.useDebugValue;return df.useSyncExternalStoreWithSelector=function(m,v,x,S,j){var N=d(null);if(N.current===null){var E={hasValue:!1,value:null};N.current=E}else E=N.current;N=g(function(){function A(W){if(!$){if($=!0,Z=W,W=S(W),j!==void 0&&E.hasValue){var P=E.value;if(j(P,W))return L=P}return L=W}if(P=L,r(Z,W))return P;var F=S(W);return j!==void 0&&j(P,F)?(Z=W,P):(Z=W,L=F)}var $=!1,Z,L,X=x===void 0?null:x;return[function(){return A(v())},X===null?void 0:function(){return A(X())}]},[v,x,S,j]);var C=o(m,N[0],N[1]);return h(function(){E.hasValue=!0,E.value=C},[C]),p(C),C},df}var Xy;function e1(){return Xy||(Xy=1,ff.exports=WS()),ff.exports}var t1=e1();function a1(n,l){return n===l}function dt(n,l,i=a1){const r=Q.useCallback(h=>{if(!n)return()=>{};const{unsubscribe:g}=n.subscribe(h);return g},[n]),o=Q.useCallback(()=>n==null?void 0:n.get(),[n]);return t1.useSyncExternalStoreWithSelector(r,o,o,l,i)}var n1={state:void 0,get:()=>{},subscribe:()=>()=>{}};function xs(n){const l=pt(),i=Q.useContext(n.from?VS:Du),r=n.from??i,o=r?n.from?l.stores.getMatchStoreByRouteId(r):l.stores.activeMatchStoresById.get(r):void 0,d=Q.useRef(void 0);return dt(o??n1,h=>{if((n.shouldThrow??!0)&&!h&&Va(),h===void 0)return;const g=n.select?n.select(h):h;if(n.structuralSharing??l.options.defaultStructuralSharing){const p=Ka(d.current,g);return d.current=p,p}return g})}function Kg(n){return xs({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:l=>n.select?n.select(l.loaderData):l.loaderData})}function Vg(n){const{select:l,...i}=n;return xs({...i,select:r=>l?l(r.loaderDeps):r.loaderDeps})}function Xg(n){return xs({from:n.from,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,strict:n.strict,select:l=>{const i=n.strict===!1?l.params:l._strictParams;return n.select?n.select(i):i}})}function kg(n){return xs({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:l=>n.select?n.select(l.search):l.search})}function ki(n){const l=pt();return Q.useCallback(i=>l.navigate({...i,from:i.from??(n==null?void 0:n.from)}),[n==null?void 0:n.from,l])}function Zg(n){return xs({...n,select:l=>n.select?n.select(l.context):l.context})}var s1=hg();function l1(n,l){const i=pt(),r=Hb(l),{activeProps:o,inactiveProps:d,activeOptions:h,to:g,preload:p,preloadDelay:m,hashScrollIntoView:v,replace:x,startTransition:S,resetScroll:j,viewTransition:N,children:E,target:C,disabled:A,style:$,className:Z,onClick:L,onBlur:X,onFocus:W,onMouseEnter:P,onMouseLeave:F,onTouchStart:J,ignoreBlocker:V,params:I,search:se,hash:le,state:ue,mask:ne,reloadDocument:O,unsafeRelative:Y,from:te,_fromLocation:me,...oe}=n,T=Bg(),G=Q.useMemo(()=>n,[i,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),ee=dt(i.stores.location,Se=>Se,(Se,mt)=>Se.href===mt.href),q=Q.useMemo(()=>{const Se={_fromLocation:ee,...G};return i.buildLocation(Se)},[i,ee,G]),de=q.maskedLocation?q.maskedLocation.publicHref:q.publicHref,ve=q.maskedLocation?q.maskedLocation.external:q.external,be=Q.useMemo(()=>f1(de,ve,i.history,A),[A,ve,de,i.history]),Pe=Q.useMemo(()=>{if(be!=null&&be.external)return _u(be.href,i.protocolAllowlist)?void 0:be.href;if(!d1(g)&&!(typeof g!="string"||g.indexOf(":")===-1))try{return new URL(g),_u(g,i.protocolAllowlist)?void 0:g}catch{}},[g,be,i.protocolAllowlist]),He=Q.useMemo(()=>{if(Pe)return!1;if(h!=null&&h.exact){if(!nS(ee.pathname,q.pathname,i.basepath))return!1}else{const Se=Eu(ee.pathname,i.basepath),mt=Eu(q.pathname,i.basepath);if(!(Se.startsWith(mt)&&(Se.length===mt.length||Se[mt.length]==="/")))return!1}return((h==null?void 0:h.includeSearch)??!0)&&!ms(ee.search,q.search,{partial:!(h!=null&&h.exact),ignoreUndefined:!(h!=null&&h.explicitUndefined)})?!1:h!=null&&h.includeHash?T&&ee.hash===q.hash:!0},[h==null?void 0:h.exact,h==null?void 0:h.explicitUndefined,h==null?void 0:h.includeHash,h==null?void 0:h.includeSearch,ee,Pe,T,q.hash,q.pathname,q.search,i.basepath]),ua=He?An(o,{})??i1:yf,xa=He?yf:An(d,{})??yf,Ss=[Z,ua.className,xa.className].filter(Boolean).join(" "),Cl=($||ua.style||xa.style)&&{...$,...ua.style,...xa.style},[va,js]=Q.useState(!1),Ns=Q.useRef(!1),Za=n.reloadDocument||Pe?!1:p??i.options.defaultPreload,Rs=m??i.options.defaultPreloadDelay??0,aa=Q.useCallback(()=>{i.preloadRoute({...G,_builtLocation:q}).catch(Se=>{console.warn(Se),console.warn(qS)})},[i,G,q]);qb(r,Q.useCallback(Se=>{Se!=null&&Se.isIntersecting&&aa()},[aa]),o1,{disabled:!!A||Za!=="viewport"}),Q.useEffect(()=>{Ns.current||!A&&Za==="render"&&(aa(),Ns.current=!0)},[A,aa,Za]);const wl=Se=>{const mt=Se.currentTarget.getAttribute("target"),ca=C!==void 0?C:mt;if(!A&&!h1(Se)&&!Se.defaultPrevented&&(!ca||ca==="_self")&&Se.button===0){Se.preventDefault(),s1.flushSync(()=>{js(!0)});const Pi=i.subscribe("onResolved",()=>{Pi(),js(!1)});i.navigate({...G,replace:x,resetScroll:j,hashScrollIntoView:v,startTransition:S,viewTransition:N,ignoreBlocker:V})}};if(Pe)return{...oe,ref:r,href:Pe,...E&&{children:E},...C&&{target:C},...A&&{disabled:A},...$&&{style:$},...Z&&{className:Z},...L&&{onClick:L},...X&&{onBlur:X},...W&&{onFocus:W},...P&&{onMouseEnter:P},...F&&{onMouseLeave:F},...J&&{onTouchStart:J}};const _s=Se=>{if(A||Za!=="intent")return;if(!Rs){aa();return}const mt=Se.currentTarget;if(Ci.has(mt))return;const ca=setTimeout(()=>{Ci.delete(mt),aa()},Rs);Ci.set(mt,ca)},Lu=Se=>{A||Za!=="intent"||aa()},$i=Se=>{if(A||!Za||!Rs)return;const mt=Se.currentTarget,ca=Ci.get(mt);ca&&(clearTimeout(ca),Ci.delete(mt))};return{...oe,...ua,...xa,href:be==null?void 0:be.href,ref:r,onClick:ol([L,wl]),onBlur:ol([X,$i]),onFocus:ol([W,_s]),onMouseEnter:ol([P,_s]),onMouseLeave:ol([F,$i]),onTouchStart:ol([J,Lu]),disabled:!!A,target:C,...Cl&&{style:Cl},...Ss&&{className:Ss},...A&&r1,...He&&u1,...T&&va&&c1}}var yf={},i1={className:"active"},r1={role:"link","aria-disabled":!0},u1={"data-status":"active","aria-current":"page"},c1={"data-transitioning":"transitioning"},Ci=new WeakMap,o1={rootMargin:"100px"},ol=n=>l=>{for(const i of n)if(i){if(l.defaultPrevented)return;i(l)}};function f1(n,l,i,r){if(!r)return l?{href:n,external:!0}:{href:i.createHref(n)||"/",external:!1}}function d1(n){if(typeof n!="string")return!1;const l=n.charCodeAt(0);return l===47?n.charCodeAt(1)!==47:l===46}var Ee=Q.forwardRef((n,l)=>{const{_asChild:i,...r}=n,{type:o,...d}=l1(r,l),h=typeof r.children=="function"?r.children({isActive:d["data-status"]==="active"}):r.children;if(!i){const{disabled:g,...p}=d;return Q.createElement("a",p,h)}return Q.createElement(i,d,h)});function h1(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var m1=class extends Ug{constructor(l){super(l),this.useMatch=i=>xs({select:i==null?void 0:i.select,from:this.id,structuralSharing:i==null?void 0:i.structuralSharing}),this.useRouteContext=i=>Zg({...i,from:this.id}),this.useSearch=i=>kg({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useParams=i=>Xg({select:i==null?void 0:i.select,structuralSharing:i==null?void 0:i.structuralSharing,from:this.id}),this.useLoaderDeps=i=>Vg({...i,from:this.id}),this.useLoaderData=i=>Kg({...i,from:this.id}),this.useNavigate=()=>ki({from:this.fullPath}),this.Link=zi.forwardRef((i,r)=>f.jsx(Ee,{ref:r,from:this.fullPath,...i}))}};function y1(n){return new m1(n)}var g1=class extends HS{constructor(n){super(n),this.useMatch=l=>xs({select:l==null?void 0:l.select,from:this.id,structuralSharing:l==null?void 0:l.structuralSharing}),this.useRouteContext=l=>Zg({...l,from:this.id}),this.useSearch=l=>kg({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useParams=l=>Xg({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useLoaderDeps=l=>Vg({...l,from:this.id}),this.useLoaderData=l=>Kg({...l,from:this.id}),this.useNavigate=()=>ki({from:this.fullPath}),this.Link=zi.forwardRef((l,i)=>f.jsx(Ee,{ref:i,from:this.fullPath,...l}))}};function p1(n){return new g1(n)}function ra(n){return typeof n=="object"?new ky(n,{silent:!0}).createRoute(n):new ky(n,{silent:!0}).createRoute}var ky=class{constructor(n,l){this.path=n,this.createRoute=i=>{const r=y1(i);return r.isRoot=!1,r},this.silent=l==null?void 0:l.silent}};function x1(n){const l=pt(),i=`not-found-${dt(l.stores.location,r=>r.pathname)}-${dt(l.stores.status,r=>r)}`;return f.jsx($f,{getResetKey:()=>i,onCatch:(r,o)=>{var d;if(St(r))(d=n.onCatch)==null||d.call(n,r,o);else throw r},errorComponent:({error:r})=>{var o;if(St(r))return(o=n.fallback)==null?void 0:o.call(n,r);throw r},children:n.children})}function v1(){return f.jsx("p",{children:"Not Found"})}function fl(n){return f.jsx(f.Fragment,{children:n.children})}function $g(n,l,i){return l.options.notFoundComponent?f.jsx(l.options.notFoundComponent,{...i}):n.options.defaultNotFoundComponent?f.jsx(n.options.defaultNotFoundComponent,{...i}):f.jsx(v1,{})}function b1(n){return null}function S1(){return b1(pt()),null}var Pg=Q.memo(function({matchId:l}){const i=pt(),r=i.stores.activeMatchStoresById.get(l);r||Va();const o=dt(i.stores.loadedAt,h=>h),d=dt(r,h=>h);return f.jsx(j1,{router:i,matchId:l,resetKey:o,matchState:Q.useMemo(()=>{var p;const h=d.routeId,g=(p=i.routesById[h].parentRoute)==null?void 0:p.id;return{routeId:h,ssr:d.ssr,_displayPending:d._displayPending,parentRouteId:g}},[d._displayPending,d.routeId,d.ssr,i.routesById])})});function j1({router:n,matchId:l,resetKey:i,matchState:r}){var N,E;const o=n.routesById[r.routeId],d=o.options.pendingComponent??n.options.defaultPendingComponent,h=d?f.jsx(d,{}):null,g=o.options.errorComponent??n.options.defaultErrorComponent,p=o.options.onCatch??n.options.defaultOnCatch,m=o.isRoot?o.options.notFoundComponent??((N=n.options.notFoundRoute)==null?void 0:N.options.component):o.options.notFoundComponent,v=r.ssr===!1||r.ssr==="data-only",x=(!o.isRoot||o.options.wrapInSuspense||v)&&(o.options.wrapInSuspense??d??(((E=o.options.errorComponent)==null?void 0:E.preload)||v))?Q.Suspense:fl,S=g?$f:fl,j=m?x1:fl;return f.jsxs(o.isRoot?o.options.shellComponent??fl:fl,{children:[f.jsx(Du.Provider,{value:l,children:f.jsx(x,{fallback:h,children:f.jsx(S,{getResetKey:()=>i,errorComponent:g||Pf,onCatch:(C,A)=>{if(St(C))throw C;p==null||p(C,A)},children:f.jsx(j,{fallback:C=>{if(!m||C.routeId&&C.routeId!==r.routeId||!C.routeId&&!o.isRoot)throw C;return Q.createElement(m,C)},children:v||r._displayPending?f.jsx(GS,{fallback:h,children:f.jsx(Zy,{matchId:l})}):f.jsx(Zy,{matchId:l})})})})}),r.parentRouteId===ys?f.jsxs(f.Fragment,{children:[f.jsx(N1,{resetKey:i}),n.options.scrollRestoration&&Eg?f.jsx(S1,{}):null]}):null]})}function N1({resetKey:n}){const l=pt(),i=Q.useRef(void 0);return Oi(()=>{const r=l.latestLocation.href;(i.current===void 0||i.current!==r)&&(l.emit({type:"onRendered",...dl(l.stores.location.state,l.stores.resolvedLocation.state)}),i.current=r)},[l.latestLocation.state.__TSR_key,n,l]),null}var Zy=Q.memo(function({matchId:l}){var m,v,x,S;const i=pt(),r=i.stores.activeMatchStoresById.get(l);r||Va();const o=dt(r,j=>j),d=o.routeId,h=i.routesById[d],g=Q.useMemo(()=>{var N;const j=(N=i.routesById[d].options.remountDeps??i.options.defaultRemountDeps)==null?void 0:N({routeId:d,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return j?JSON.stringify(j):void 0},[d,o.loaderDeps,o._strictParams,o._strictSearch,i.options.defaultRemountDeps,i.routesById]),p=Q.useMemo(()=>{const j=h.options.component??i.options.defaultComponent;return j?f.jsx(j,{},g):f.jsx(Fg,{})},[g,h.options.component,i.options.defaultComponent]);if(o._displayPending)throw(m=i.getMatch(o.id))==null?void 0:m._nonReactive.displayPendingPromise;if(o._forcePending)throw(v=i.getMatch(o.id))==null?void 0:v._nonReactive.minPendingPromise;if(o.status==="pending"){const j=h.options.pendingMinMs??i.options.defaultPendingMinMs;if(j){const N=i.getMatch(o.id);if(N&&!N._nonReactive.minPendingPromise){const E=El();N._nonReactive.minPendingPromise=E,setTimeout(()=>{E.resolve(),N._nonReactive.minPendingPromise=void 0},j)}}throw(x=i.getMatch(o.id))==null?void 0:x._nonReactive.loadPromise}if(o.status==="notFound")return St(o.error)||Va(),$g(i,h,o.error);if(o.status==="redirected")throw At(o.error)||Va(),(S=i.getMatch(o.id))==null?void 0:S._nonReactive.loadPromise;if(o.status==="error")throw o.error;return p}),Fg=Q.memo(function(){const l=pt(),i=Q.useContext(Du);let r,o=!1,d;{const m=i?l.stores.activeMatchStoresById.get(i):void 0;[r,o]=dt(m,v=>[v==null?void 0:v.routeId,(v==null?void 0:v.globalNotFound)??!1]),d=dt(l.stores.matchesId,v=>v[v.findIndex(x=>x===i)+1])}const h=r?l.routesById[r]:void 0,g=l.options.defaultPendingComponent?f.jsx(l.options.defaultPendingComponent,{}):null;if(o)return h||Va(),$g(l,h,void 0);if(!d)return null;const p=f.jsx(Pg,{matchId:d});return r===ys?f.jsx(Q.Suspense,{fallback:g,children:p}):p});function R1(){const n=pt(),l=Q.useRef({router:n,mounted:!1}),[i,r]=Q.useState(!1),o=dt(n.stores.isLoading,x=>x),d=dt(n.stores.hasPendingMatches,x=>x),h=af(o),g=o||i||d,p=af(g),m=o||d,v=af(m);return n.startTransition=x=>{r(!0),Q.startTransition(()=>{x(),r(!1)})},Q.useEffect(()=>{const x=n.history.subscribe(n.load),S=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Dn(n.latestLocation.publicHref)!==Dn(S.publicHref)&&n.commitLocation({...S,replace:!0}),()=>{x()}},[n,n.history]),Oi(()=>{if(typeof window<"u"&&n.ssr||l.current.router===n&&l.current.mounted)return;l.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(S){console.error(S)}})()},[n]),Oi(()=>{h&&!o&&n.emit({type:"onLoad",...dl(n.stores.location.state,n.stores.resolvedLocation.state)})},[h,n,o]),Oi(()=>{v&&!m&&n.emit({type:"onBeforeRouteMount",...dl(n.stores.location.state,n.stores.resolvedLocation.state)})},[m,v,n]),Oi(()=>{if(p&&!g){const x=dl(n.stores.location.state,n.stores.resolvedLocation.state);n.emit({type:"onResolved",...x}),Qg(()=>{n.stores.status.setState(()=>"idle"),n.stores.resolvedLocation.setState(()=>n.stores.location.state)}),x.hrefChanged&&QS(n)}},[g,p,n]),null}function _1(){const n=pt(),l=n.routesById[ys].options.pendingComponent??n.options.defaultPendingComponent,i=l?f.jsx(l,{}):null,r=f.jsxs(typeof document<"u"&&n.ssr?fl:Q.Suspense,{fallback:i,children:[f.jsx(R1,{}),f.jsx(E1,{})]});return n.options.InnerWrap?f.jsx(n.options.InnerWrap,{children:r}):r}function E1(){const n=pt(),l=dt(n.stores.firstMatchId,o=>o),i=dt(n.stores.loadedAt,o=>o),r=l?f.jsx(Pg,{matchId:l}):null;return f.jsx(Du.Provider,{value:l,children:n.options.disableGlobalCatchBoundary?r:f.jsx($f,{getResetKey:()=>i,errorComponent:Pf,onCatch:void 0,children:r})})}function Jg(){const n=pt();return dt(n.stores.matchRouteReactivity,l=>l),Q.useCallback(l=>{const{pending:i,caseSensitive:r,fuzzy:o,includeSearch:d,...h}=l;return n.matchRoute(h,{pending:i,caseSensitive:r,fuzzy:o,includeSearch:d})},[n])}function T1(n){const l=pt(),i=Q.useRef(void 0);return dt(l.stores.activeMatchesSnapshot,r=>{const o=r;if(l.options.defaultStructuralSharing){const d=Ka(i.current,o);return i.current=d,d}return o})}var M1=n=>({createMutableStore:Yy,createReadonlyStore:Yy,batch:Qg}),C1=n=>new w1(n),w1=class extends AS{constructor(n){super(n,M1)}};function A1({router:n,children:l,...i}){Object.keys(i).length>0&&n.update({...n.options,...i,context:{...n.options.context,...i.context}});const r=f.jsx(qg.Provider,{value:n,children:l});return n.options.Wrap?f.jsx(n.options.Wrap,{children:r}):r}function O1({router:n,...l}){return f.jsx(A1,{router:n,...l,children:f.jsx(_1,{})})}function Ig(n){const i=pt();return Q.useRef(void 0),dt(i.stores.__store,r=>r)}function z1(n){const l=pt(),i=Q.useRef(void 0);return dt(l.stores.location,r=>{const o=r;if(l.options.defaultStructuralSharing){const d=Ka(i.current,o);return i.current=d,d}return o})}const Wg=Q.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function D1({children:n}){const[l,i]=Q.useState(!1);return f.jsx(Wg.Provider,{value:{isOpen:l,toggle:()=>i(r=>!r),close:()=>i(!1)},children:n})}function ep(){return Q.useContext(Wg)}function gf(n){if(!n)return"Run";const[,l]=n.split("::");return l||n}function L1(n){const l=[];for(let i=1;i<n.length;i++){const r=n[i],o=r.routeId??r.id,d=r.params;o==="/"||o==="/_layout"||(o.includes("/runs/$runId/category/$category")?(l.some(h=>h.label===d.runId)||l.push({label:gf(d.runId),to:`/runs/${encodeURIComponent(d.runId)}`}),l.push({label:d.category??"Category",to:r.pathname})):o.includes("/runs/$runId/suite/$suite")?l.push({label:d.suite??"Suite",to:r.pathname}):o.includes("/runs/$runId")?l.push({label:gf(d.runId),to:r.pathname}):o.includes("/evals/$runId/$evalId")?(l.some(h=>h.label===d.runId)||l.push({label:gf(d.runId),to:`/runs/${encodeURIComponent(d.runId)}`}),l.push({label:d.evalId??"Eval",to:r.pathname})):o.includes("/experiments/$experimentName")?l.push({label:d.experimentName??"Experiment",to:r.pathname}):(o==="/index"||o==="/")&&l.push({label:"Home",to:"/"}))}return l}function U1(){const n=T1(),l=L1(n);return l.length===0?null:f.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 bg-gray-950 px-6 py-2 text-sm",children:[f.jsx(Ee,{to:"/",className:"text-cyan-400 hover:text-cyan-300 hover:underline",children:"Home"}),l.map((i,r)=>{const o=r===l.length-1;return f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-gray-600",children:">"}),o?f.jsx("span",{className:"text-gray-400",children:i.label}):f.jsx(Ee,{to:i.to??"/",className:"text-cyan-400 hover:text-cyan-300 hover:underline",children:i.label})]},`${i.label}-${r}`)})]})}async function Xe(n){const l=await fetch(n);if(!l.ok)throw new Error(`API error: ${l.status} ${l.statusText}`);return l.json()}const B1={queryKey:["runs"],queryFn:()=>Xe("/api/runs"),refetchInterval:5e3};function q1(n){return{queryKey:["runs",n],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}`),enabled:!!n}}const H1={queryKey:["feedback"],queryFn:()=>Xe("/api/feedback")},Q1={queryKey:["experiments"],queryFn:()=>Xe("/api/experiments")},Y1={queryKey:["compare"],queryFn:()=>Xe("/api/compare")},G1={queryKey:["targets"],queryFn:()=>Xe("/api/targets")};function K1(n,l){return{queryKey:["runs",n,"evals",l,"files"],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}/evals/${encodeURIComponent(l)}/files`),enabled:!!n&&!!l}}function V1(n,l,i){return{queryKey:["runs",n,"evals",l,"files",i],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}/evals/${encodeURIComponent(l)}/files/${i}`),enabled:!!n&&!!l&&!!i}}function X1(n,l){return{queryKey:["runs",n,"categories",l,"suites"],queryFn:()=>Xe(`/api/runs/${encodeURIComponent(n)}/categories/${encodeURIComponent(l)}/suites`),enabled:!!n&&!!l}}const k1={queryKey:["config"],queryFn:()=>Xe("/api/config"),staleTime:5e3};function Z1(n){const l=n?`${Gt(n)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",n??""],queryFn:()=>Xe(l),staleTime:5e3}}function Jf(){return Ve(B1)}function Zi(n){return Ve(q1(n))}function $1(){return Ve(H1)}function If(){return Ve(Q1)}function P1(){return Ve(Y1)}function F1(){return Ve(G1)}function J1(n,l){return Ve(K1(n,l))}function I1(n,l,i){return Ve(V1(n,l,i))}function tp(n,l){return Ve(X1(n,l))}function ht(){return Ve(k1)}function ap(n){return Ve(Z1(n))}const wu=.8;function ka(n,l=wu){return n>=l}const W1={queryKey:["benchmarks"],queryFn:()=>Xe("/api/benchmarks"),refetchInterval:1e4};function Wf(){return Ve(W1)}const ej={queryKey:["benchmarks","all-runs"],queryFn:()=>Xe("/api/benchmarks/all-runs"),refetchInterval:5e3};function tj(){return Ve(ej)}async function aj(n){const l=await fetch("/api/benchmarks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!l.ok){const i=await l.json();throw new Error(i.error||`Failed to add project: ${l.status}`)}return l.json()}async function nj(n){const l=await fetch("/api/benchmarks/discover",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!l.ok){const r=await l.json();throw new Error(r.error||`Failed to discover: ${l.status}`)}return(await l.json()).discovered}function Gt(n){return`/api/benchmarks/${encodeURIComponent(n)}`}function sj(n){return{queryKey:["benchmarks",n,"runs"],queryFn:()=>Xe(`${Gt(n)}/runs`),enabled:!!n,refetchInterval:5e3}}function np(n){return Ve(sj(n))}function lj(n,l){return{queryKey:["benchmarks",n,"runs",l],queryFn:()=>Xe(`${Gt(n)}/runs/${encodeURIComponent(l)}`),enabled:!!n&&!!l}}function ed(n,l){return Ve(lj(n,l))}function ij(n,l,i){return{queryKey:["benchmarks",n,"runs",l,"evals",i,"files"],queryFn:()=>Xe(`${Gt(n)}/runs/${encodeURIComponent(l)}/evals/${encodeURIComponent(i)}/files`),enabled:!!n&&!!l&&!!i}}function rj(n,l,i,r){return{queryKey:["benchmarks",n,"runs",l,"evals",i,"files",r],queryFn:()=>Xe(`${Gt(n)}/runs/${encodeURIComponent(l)}/evals/${encodeURIComponent(i)}/files/${r}`),enabled:!!n&&!!l&&!!i&&!!r}}function uj(n){return{queryKey:["benchmarks",n,"experiments"],queryFn:()=>Xe(`${Gt(n)}/experiments`),enabled:!!n}}function cj(n){return{queryKey:["benchmarks",n,"compare"],queryFn:()=>Xe(`${Gt(n)}/compare`),enabled:!!n}}function oj(n){return{queryKey:["benchmarks",n,"targets"],queryFn:()=>Xe(`${Gt(n)}/targets`),enabled:!!n}}async function sp(n){const l=n?`${Gt(n)}/remote/sync`:"/api/remote/sync",i=await fetch(l,{method:"POST"});if(!i.ok)throw new Error(`Failed to sync remote results: ${i.status}`);return i.json()}async function fj(n){const l=await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(`Failed to save config: ${l.status}`);return l.json()}function dj(n){const l=n?`${Gt(n)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",n??""],queryFn:()=>Xe(l),staleTime:3e4}}function hj(n){return Ve(dj(n))}function mj(n){const l=n?`${Gt(n)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",n??""],queryFn:()=>Xe(l),staleTime:3e4}}function yj(n){return Ve(mj(n))}async function gj(n,l){const i=l?`${Gt(l)}/eval/run`:"/api/eval/run",r=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const o=await r.json().catch(()=>({error:r.statusText}));throw new Error(o.error??`Failed: ${r.status}`)}return r.json()}function pj(n){return{queryKey:["eval-status",n],queryFn:()=>Xe(`/api/eval/status/${n}`),enabled:!!n,refetchInterval:l=>{var r;const i=(r=l.state.data)==null?void 0:r.status;return i==="finished"||i==="failed"?!1:2e3}}}function lp(n){return Ve(pj(n))}function xj(n){const l="/api/eval/runs";return{queryKey:["eval-runs",""],queryFn:()=>Xe(l),refetchInterval:3e3}}function ip(n){return Ve(xj())}async function vj(n,l){const i=l?`${Gt(l)}/eval/preview`:"/api/eval/preview",r=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new Error(`Preview failed: ${r.status}`);return r.json()}function vs({children:n}){const{isOpen:l,close:i}=ep(),r=z1();return Q.useEffect(()=>{i()},[i,r.pathname]),f.jsxs(f.Fragment,{children:[l&&f.jsx("div",{className:"fixed inset-0 z-30 bg-black/50 md:hidden",onClick:i,onKeyDown:o=>o.key==="Escape"&&i(),role:"button",tabIndex:-1,"aria-label":"Close navigation"}),f.jsx("aside",{className:`fixed inset-y-0 left-0 z-40 flex w-64 flex-col border-r border-gray-800 bg-gray-900/50 transition-transform duration-200 ease-in-out md:static md:z-auto md:translate-x-0 ${l?"translate-x-0":"-translate-x-full"}`,children:n})]})}function bj(){const n=Jg(),l=n({to:"/projects/$benchmarkId/evals/$runId/$evalId",fuzzy:!0}),i=n({to:"/projects/$benchmarkId/runs/$runId",fuzzy:!0}),r=n({to:"/projects/$benchmarkId",fuzzy:!0});if(l&&typeof l=="object"&&"benchmarkId"in l){const{benchmarkId:p,runId:m,evalId:v}=l;return f.jsx(_j,{benchmarkId:p,runId:m,currentEvalId:v})}if(i&&typeof i=="object"&&"benchmarkId"in i){const{benchmarkId:p,runId:m}=i;return f.jsx($y,{benchmarkId:p,currentRunId:m})}if(r&&typeof r=="object"&&"benchmarkId"in r){const{benchmarkId:p}=r;return f.jsx($y,{benchmarkId:p})}const o=n({to:"/evals/$runId/$evalId",fuzzy:!0}),d=n({to:"/runs/$runId/category/$category",fuzzy:!0}),h=n({to:"/runs/$runId/suite/$suite",fuzzy:!0}),g=n({to:"/experiments/$experimentName",fuzzy:!0});if(d&&typeof d=="object"&&"runId"in d){const{runId:p,category:m}=d;return f.jsx(Rj,{runId:p,category:m})}if(h&&typeof h=="object"&&"runId"in h){const{runId:p,suite:m}=h;return f.jsx(Nj,{runId:p,suite:m})}if(o&&typeof o=="object"&&"runId"in o){const{runId:p,evalId:m}=o;return f.jsx(jj,{runId:p,currentEvalId:m})}if(g&&typeof g=="object"&&"experimentName"in g){const{experimentName:p}=g;return f.jsx(Ej,{currentExperiment:p})}return f.jsx(Sj,{})}function Sj(){const n=Jg(),{data:l}=Wf(),i=((l==null?void 0:l.projects.length)??0)>0,r=n({to:"/"}),o=n({to:"/runs/$runId",fuzzy:!0}),d=i&&r!==!1,{data:h}=Jf(),{data:g}=tj(),p=d?g:h,{data:m}=ip(),v=((m==null?void 0:m.runs)??[]).filter(x=>x.status==="starting"||x.status==="running").length;return f.jsxs(vs,{children:[f.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:[f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"}),v>0&&f.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-cyan-900/40 px-2 py-0.5 text-xs text-cyan-400",children:[f.jsx("span",{className:"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-cyan-400"}),v]})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),p==null?void 0:p.runs.map(x=>{const S=r===!1&&o&&typeof o=="object"&&"runId"in o&&o.runId===x.filename;return x.project_id?f.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:x.project_id,runId:x.filename},className:"mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",title:x.project_name,children:x.display_name??x.filename},`${x.project_id}/${x.filename}`):f.jsx(Ee,{to:"/runs/$runId",params:{runId:x.filename},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${S?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:x.display_name??x.filename},x.filename)})]}),f.jsx("div",{className:"border-t border-gray-800 px-4 py-3",children:f.jsx(Ee,{to:"/settings",className:"flex items-center gap-2 text-sm text-gray-400 hover:text-cyan-400",children:"Settings"})})]})}function jj({runId:n,currentEvalId:l}){const{data:i}=Zi(n),{data:r}=ht(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8;return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Ee,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),i==null?void 0:i.results.map(d=>{const h=d.testId===l,g=ka(d.score,o);return f.jsxs(Ee,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:d.testId},className:`mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${h?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:[f.jsx("span",{className:`text-xs ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"}),f.jsx("span",{className:"truncate",children:d.testId})]},d.testId)})]})]})}function Nj({runId:n,suite:l}){const{data:i}=Zi(n),{data:r}=ht(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,d=((i==null?void 0:i.results)??[]).filter(h=>(h.suite??"Uncategorized")===l);return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Ee,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n}),f.jsx("p",{className:"truncate text-xs text-gray-500",children:l})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),d.map(h=>{const g=ka(h.score,o);return f.jsxs(Ee,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:h.testId},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[f.jsx("span",{className:`text-xs ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"}),f.jsx("span",{className:"truncate",children:h.testId})]},h.testId)})]})]})}function Rj({runId:n,category:l}){const{data:i}=tp(n,l),r=(i==null?void 0:i.suites)??[];return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Ee,{to:"/runs/$runId",params:{runId:n},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n}),f.jsx("p",{className:"truncate text-xs text-gray-500",children:l})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),r.map(o=>f.jsxs(Ee,{to:"/runs/$runId/suite/$suite",params:{runId:n,suite:o.name},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[f.jsx("span",{className:`text-xs ${o.passed===o.total?"text-emerald-400":"text-red-400"}`,children:o.passed===o.total?"✓":"✗"}),f.jsx("span",{className:"truncate",children:o.name})]},o.name))]})]})}function $y({benchmarkId:n,currentRunId:l}){const{data:i}=np(n);return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Ee,{to:"/",className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All Benchmarks"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),i==null?void 0:i.runs.map(r=>{const o=l===r.filename;return f.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:n,runId:r.filename},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:r.display_name??r.filename},r.filename)})]})]})}function _j({benchmarkId:n,runId:l,currentEvalId:i}){const{data:r}=ed(n,l),{data:o}=ht(),d=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8;return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[f.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:n,runId:l},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),f.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:l})]}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),r==null?void 0:r.results.map(h=>{const g=h.testId===i,p=ka(h.score,d);return f.jsxs(Ee,{to:"/projects/$benchmarkId/evals/$runId/$evalId",params:{benchmarkId:n,runId:l,evalId:h.testId},className:`mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${g?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:[f.jsx("span",{className:`text-xs ${p?"text-emerald-400":"text-red-400"}`,children:p?"✓":"✗"}),f.jsx("span",{className:"truncate",children:h.testId})]},h.testId)})]})]})}function Ej({currentExperiment:n}){const{data:l}=If(),i=(l==null?void 0:l.experiments)??[];return f.jsxs(vs,{children:[f.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:f.jsx(Ee,{to:"/",className:"text-lg font-semibold text-white hover:text-cyan-400",children:"AgentV Studio"})}),f.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:f.jsx(Ee,{to:"/",search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"})}),f.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[f.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Experiments"}),i.map(r=>{const o=r.name===n;return f.jsx(Ee,{to:"/experiments/$experimentName",params:{experimentName:r.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:r.name},r.name)})]})]})}function Tj(){return f.jsx(D1,{children:f.jsx(Mj,{})})}function Mj(){const{toggle:n}=ep();return f.jsxs("div",{className:"flex h-screen overflow-hidden",children:[f.jsx(bj,{}),f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[f.jsxs("header",{className:"flex items-center gap-3 border-b border-gray-800 bg-gray-900/50 px-4 py-3 md:hidden",children:[f.jsx("button",{type:"button",onClick:n,className:"text-gray-400 hover:text-gray-200","aria-label":"Toggle navigation",children:f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":"Toggle navigation",children:[f.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),f.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),f.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),f.jsx("span",{className:"text-sm font-semibold text-white",children:"AgentV Studio"})]}),f.jsx(U1,{}),f.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:f.jsx(Fg,{})})]})]})}const ta=p1({component:Tj}),Cj=ra("/settings")({component:wj});function wj(){const{data:n,isLoading:l}=ht(),i=Un(),[r,o]=Q.useState(""),[d,h]=Q.useState(!1),[g,p]=Q.useState(null),m=(n==null?void 0:n.threshold)??wu,v=r||String(m),x=(n==null?void 0:n.read_only)===!0,S=async()=>{const j=Number.parseFloat(r||String(m));if(Number.isNaN(j)||j<0||j>1){p({type:"error",text:"Threshold must be a number between 0 and 1"});return}h(!0),p(null);try{await fj({threshold:j}),await i.invalidateQueries({queryKey:["config"]}),o(""),p({type:"success",text:"Settings saved"}),setTimeout(()=>p(null),3e3)}catch{p({type:"error",text:"Failed to save settings"})}finally{h(!1)}};return l?f.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[f.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"h-40 animate-pulse rounded-lg bg-gray-900"})]}):f.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Settings"}),f.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure your AgentV Studio dashboard"})]}),f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6",children:[f.jsx("h2",{className:"text-lg font-medium text-white",children:"Evaluation"}),f.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure how evaluation results are classified"}),f.jsx("div",{className:"mt-6 space-y-4",children:f.jsxs("div",{children:[f.jsx("label",{htmlFor:"pass-threshold",className:"block text-sm font-medium text-gray-300",children:"Pass Threshold"}),f.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Score at or above this value is considered passing. Default: ",wu]}),f.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[f.jsx("input",{id:"pass-threshold",type:"number",min:"0",max:"1",step:"0.05",value:v,onChange:j=>o(j.target.value),disabled:x,className:"w-32 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500"}),f.jsxs("span",{className:"text-sm text-gray-400",children:["(",Math.round((Number.parseFloat(v)||0)*100),"%)"]})]})]})}),f.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[!x&&f.jsx("button",{type:"button",onClick:S,disabled:d,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-cyan-500 disabled:opacity-50",children:d?"Saving...":"Save Settings"}),x&&f.jsx("span",{className:"text-sm text-gray-400",children:"Read-only mode is enabled."}),g&&f.jsx("span",{className:`text-sm ${g.type==="success"?"text-emerald-400":"text-red-400"}`,children:g.text})]})]}),f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:f.jsxs("p",{className:"text-xs text-gray-500",children:["Settings are stored in ",f.jsx("code",{className:"text-gray-400",children:".agentv/config.yaml"})]})})]})}function rp({data:n,isLoading:l,isError:i,error:r}){if(l)return f.jsx(Uj,{});if(i&&r)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load comparison data: ",r.message]});if(!n||n.cells.length===0)return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No comparison data available"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Run evaluations with different experiment and target combinations to see a comparison matrix."})]});const{experiments:o,targets:d,cells:h}=n;if(o.length<=1&&d.length<=1)return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"Not enough variation to compare"}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["The comparison matrix requires at least 2 experiments or 2 targets. Currently there"," ",o.length===1?"is 1 experiment":`are ${o.length} experiments`," ","and ",d.length===1?"1 target":`${d.length} targets`,"."]})]});const g=new Map;for(const p of h)g.set(JSON.stringify([p.experiment,p.target]),p);return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-400",children:[f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm bg-gray-800/60 ring-1 ring-emerald-500/60"}),f.jsx("span",{className:"text-emerald-400",children:"80%+"})]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm bg-gray-800/60 ring-1 ring-amber-500/60"}),f.jsx("span",{className:"text-amber-400",children:"50–80%"})]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm bg-gray-800/60 ring-1 ring-red-500/60"}),f.jsx("span",{className:"text-red-400",children:"<50%"})]}),f.jsxs("span",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"inline-block h-3 w-3 rounded-sm border border-dashed border-gray-700"}),"No data"]})]}),f.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),o.map(p=>f.jsx("th",{className:"px-4 py-3 text-center font-medium text-gray-400",children:p},p))]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:d.map(p=>f.jsx(Aj,{target:p,experiments:o,cellMap:g},p))})]})})]})}function Aj({target:n,experiments:l,cellMap:i}){return f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:n}),l.map(r=>{const o=i.get(JSON.stringify([r,n]));return f.jsx("td",{className:"px-2 py-2",children:o?f.jsx(Dj,{cell:o}):f.jsx("div",{className:"flex items-center justify-center rounded-lg border border-dashed border-gray-700 px-3 py-4 text-gray-600",children:"--"})},r)})]})}function Oj(n){return n>=.8?"ring-emerald-500/60":n>=.5?"ring-amber-500/60":"ring-red-500/60"}function zj(n){return n>=.8?"text-emerald-400":n>=.5?"text-amber-400":"text-red-400"}function Dj({cell:n}){const[l,i]=Q.useState(!1),r=Math.round(n.pass_rate*100),o=Math.round(n.avg_score*100);return f.jsxs("div",{className:"space-y-1",children:[f.jsxs("button",{type:"button",onClick:()=>i(!l),"aria-expanded":l,className:`w-full rounded-lg bg-gray-800/60 px-3 py-3 text-center ring-1 transition-colors hover:bg-gray-700/60 ${Oj(n.pass_rate)}`,children:[f.jsx("div",{className:"flex items-center justify-center",children:f.jsxs("span",{className:`text-lg font-semibold tabular-nums ${zj(n.pass_rate)}`,children:[r,"%"]})}),f.jsxs("div",{className:"mt-0.5 text-xs text-gray-400",children:[n.passed_count,"/",n.eval_count," pass | avg ",o,"%"]})]}),l&&f.jsx(Lj,{tests:n.tests})]})}function Lj({tests:n}){return f.jsxs("div",{className:"mt-1 max-h-48 overflow-y-auto rounded-md border border-gray-800 bg-gray-950/80 p-2",children:[f.jsx("div",{className:"mb-1 text-xs font-medium text-gray-500",children:"Test Cases"}),f.jsx("div",{className:"space-y-0.5",children:n.map(l=>f.jsxs("div",{className:"flex items-center gap-2 rounded px-1.5 py-0.5 text-xs",children:[f.jsx("span",{className:l.passed?"text-emerald-400":"text-red-400",children:l.passed?"✓":"✗"}),f.jsx("span",{className:"flex-1 truncate text-gray-300",title:l.test_id,children:l.test_id}),f.jsxs("span",{className:"tabular-nums text-gray-500",children:[Math.round(l.score*100),"%"]})]},l.test_id))})]})}function Uj(){return f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("div",{className:"animate-pulse",children:[f.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3"].map(n=>f.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-6",children:[f.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"}),f.jsx("div",{className:"h-16 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-16 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-16 w-32 rounded bg-gray-800"})]},n))]})})}function Tl({rate:n}){const l=Math.round(n*100);return f.jsxs("div",{className:"relative h-5 w-20 overflow-hidden rounded-full bg-gray-800",children:[f.jsx("div",{className:"absolute inset-y-0 left-0 bg-gradient-to-r from-blue-400 to-blue-600",style:{width:`${l}%`}}),f.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold tabular-nums text-white",children:[l,"%"]})]})}function Bj(){const{data:n,isLoading:l}=If();if(l)return f.jsx(qj,{});const i=(n==null?void 0:n.experiments)??[];return i.length===0?f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No experiments found"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Experiments will appear here once evaluations are run with experiment labels."})]}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Targets"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Last Run"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:i.map(r=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3",children:f.jsx(Ee,{to:"/experiments/$experimentName",params:{experimentName:r.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:r.name})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.run_count}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.target_count}),f.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[f.jsx("span",{className:"text-emerald-400",children:r.passed_count}),f.jsx("span",{className:"text-gray-600",children:" / "}),r.eval_count]}),f.jsx("td",{className:"px-4 py-3",children:f.jsx(Tl,{rate:r.pass_rate})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",title:Py(r.last_run).full,children:Py(r.last_run).date})]},r.name))})]})})}function Py(n){if(!n)return{date:"N/A",full:"N/A"};try{const l=new Date(n);if(Number.isNaN(l.getTime()))return{date:"N/A",full:"N/A"};const i=l.toLocaleString(),r=Date.now()-l.getTime(),o=Math.floor(r/6e4),d=Math.floor(r/36e5);let h;return o<1?h="just now":o<60?h=`${o} min ago`:d<24?h=`${d} hour${d===1?"":"s"} ago`:h=l.toLocaleDateString(),{date:h,full:i}}catch{return{date:"N/A",full:"N/A"}}}function qj(){return f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("div",{className:"animate-pulse",children:[f.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(n=>f.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[f.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},n))]})})}function Hj(n){if(!n)return"No runs";const l=new Date(n);if(Number.isNaN(l.getTime()))return"N/A";const i=Date.now()-l.getTime(),r=Math.floor(i/6e4);if(r<1)return"Just now";if(r<60)return`${r}m ago`;const o=Math.floor(r/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function Qj({project:n}){const l=Math.round(n.pass_rate*100);return f.jsxs(Ee,{to:"/projects/$benchmarkId",params:{benchmarkId:n.id},className:"group block rounded-lg border border-gray-800 bg-gray-900/50 p-5 transition-colors hover:border-cyan-800 hover:bg-gray-900",children:[f.jsx("div",{className:"flex items-start justify-between",children:f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h3",{className:"truncate text-lg font-semibold text-white group-hover:text-cyan-400",children:n.name}),f.jsx("p",{className:"mt-1 truncate text-xs text-gray-500",children:n.path})]})}),f.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-3",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-gray-500",children:"Runs"}),f.jsx("p",{className:"text-lg font-semibold text-white",children:n.run_count})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-gray-500",children:"Pass Rate"}),f.jsx("p",{className:`text-lg font-semibold ${n.run_count===0?"text-gray-500":l>=80?"text-emerald-400":l>=50?"text-yellow-400":"text-red-400"}`,children:n.run_count>0?`${l}%`:"--"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-gray-500",children:"Last Run"}),f.jsx("p",{className:"text-sm text-gray-300",children:Hj(n.last_run)})]})]})]})}function bs({open:n,onClose:l,benchmarkId:i,prefill:r}){const o=Un(),d=ki(),[h,g]=Q.useState((r==null?void 0:r.suiteFilter)??""),[p,m]=Q.useState(""),[v,x]=Q.useState((r==null?void 0:r.testIds)??[]),[S,j]=Q.useState((r==null?void 0:r.target)??""),[N,E]=Q.useState(""),[C,A]=Q.useState(""),[$,Z]=Q.useState(!1),[L,X]=Q.useState(!1),[W,P]=Q.useState(null),[F,J]=Q.useState(null),[V,I]=Q.useState(!1),[se,le]=Q.useState(null),{data:ue}=hj(i),{data:ne}=yj(i),{data:O}=lp(W),Y=Q.useMemo(()=>(ue==null?void 0:ue.eval_files)??[],[ue]),te=Q.useMemo(()=>(ne==null?void 0:ne.targets)??[],[ne]);Q.useEffect(()=>{n&&(g((r==null?void 0:r.suiteFilter)??""),x((r==null?void 0:r.testIds)??[]),j((r==null?void 0:r.target)??""),m(""),E(""),A(""),Z(!1),X(!1),P(null),J(null),I(!1),le(null))},[n,r]),Q.useEffect(()=>{((O==null?void 0:O.status)==="finished"||(O==null?void 0:O.status)==="failed")&&(o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["projects"]}))},[O==null?void 0:O.status,o]);const me=Q.useCallback(()=>{const q={};return h.trim()&&(q.suite_filter=h.trim()),v.length>0&&(q.test_ids=v),S&&(q.target=S),N&&(q.threshold=Number.parseFloat(N)),C&&(q.workers=Number.parseInt(C,10)),$&&(q.dry_run=!0),q},[h,v,S,N,C,$]);Q.useEffect(()=>{const q=me();if(!q.suite_filter&&(!q.test_ids||q.test_ids.length===0)){le(null);return}vj(q,i).then(de=>le(de.command)).catch(()=>le(null))},[me,i]);function oe(){const q=p.trim();q&&!v.includes(q)&&x([...v,q]),m("")}function T(q){x(v.filter(de=>de!==q))}async function G(){J(null),I(!0);try{const q=me(),de=await gj(q,i);P(de.id)}catch(q){J(q.message)}finally{I(!1)}}if(!n)return null;if(W&&O){let q=function(){l(),d({to:"/",search:{tab:"runs"}})};return f.jsx(Fy,{onClose:l,title:"Eval Run",children:f.jsx(Yj,{status:O,onClose:l,onRunInBackground:q,runId:W})})}const ee=!!(h.trim()||v.length>0);return f.jsx(Fy,{onClose:l,title:"Run Eval",children:f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"suite-filter",className:"mb-1 block text-sm font-medium text-gray-300",children:"Suite Filter"}),f.jsx("input",{id:"suite-filter",type:"text",value:h,onChange:q=>g(q.target.value),placeholder:"evals/**/*.eval.yaml",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),Y.length>0&&!h&&f.jsxs("div",{className:"mt-1.5 flex flex-wrap gap-1",children:[Y.slice(0,5).map(q=>f.jsx("button",{type:"button",onClick:()=>g(de=>de?`${de}, ${q.relative_path}`:q.relative_path),className:"rounded bg-gray-800 px-2 py-0.5 text-xs text-gray-400 hover:bg-gray-700 hover:text-gray-200",children:q.relative_path},q.relative_path)),Y.length>5&&f.jsxs("span",{className:"px-1 text-xs text-gray-500",children:["+",Y.length-5," more"]})]})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"test-id-input",className:"mb-1 block text-sm font-medium text-gray-300",children:"Test ID Filter"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{id:"test-id-input",type:"text",value:p,onChange:q=>m(q.target.value),onKeyDown:q=>{q.key==="Enter"&&(q.preventDefault(),oe())},placeholder:"auth-*, retrieval-basic",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),f.jsx("button",{type:"button",onClick:oe,disabled:!p.trim(),className:"rounded-md bg-gray-700 px-3 py-2 text-sm text-white hover:bg-gray-600 disabled:opacity-50",children:"Add"})]}),v.length>0&&f.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:v.map(q=>f.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-cyan-900/40 px-2.5 py-0.5 text-xs text-cyan-300",children:[q,f.jsx("button",{type:"button",onClick:()=>T(q),className:"text-cyan-400 hover:text-white",children:"×"})]},q))})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"target-override",className:"mb-1 block text-sm font-medium text-gray-300",children:"Target Override"}),f.jsxs("select",{id:"target-override",value:S,onChange:q=>j(q.target.value),className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white focus:border-cyan-600 focus:outline-none",children:[f.jsx("option",{value:"",children:"Use eval's configured target"}),te.map(q=>f.jsx("option",{value:q,children:q},q))]})]}),f.jsxs("div",{children:[f.jsxs("button",{type:"button",onClick:()=>X(!L),className:"text-sm text-gray-400 hover:text-gray-200",children:[L?"▾":"▸"," Advanced Options"]}),L&&f.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"threshold-input",className:"mb-1 block text-xs text-gray-400",children:"Threshold (0–1)"}),f.jsx("input",{id:"threshold-input",type:"number",value:N,onChange:q=>E(q.target.value),min:"0",max:"1",step:"0.1",placeholder:"0.8",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"workers-input",className:"mb-1 block text-xs text-gray-400",children:"Workers"}),f.jsx("input",{id:"workers-input",type:"number",value:C,onChange:q=>A(q.target.value),min:"1",max:"50",placeholder:"3",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),f.jsx("div",{className:"col-span-2",children:f.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-400",children:[f.jsx("input",{type:"checkbox",checked:$,onChange:q=>Z(q.target.checked),className:"rounded border-gray-600 bg-gray-800"}),"Dry run (mock provider responses)"]})})]})]}),se&&f.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:[f.jsx("div",{className:"mb-1 text-xs text-gray-500",children:"CLI Preview"}),f.jsx("code",{className:"block break-all text-xs text-cyan-300",children:se})]}),F&&f.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:F}),f.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[f.jsx("button",{type:"button",onClick:l,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Cancel"}),f.jsx("button",{type:"button",onClick:G,disabled:!ee||V,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:V?"Launching…":"Run Now"})]})]})})}function Fy({children:n,onClose:l,title:i}){return f.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 pt-[10vh]",children:f.jsxs("div",{className:"w-full max-w-lg rounded-lg border border-gray-700 bg-gray-900 shadow-xl",children:[f.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-5 py-3",children:[f.jsx("h2",{className:"text-lg font-semibold text-white",children:i}),f.jsx("button",{type:"button",onClick:l,className:"text-gray-400 hover:text-white",children:"✕"})]}),f.jsx("div",{className:"px-5 py-4",children:n})]})})}function Yj({status:n,onClose:l,onRunInBackground:i,runId:r}){const o=n.status==="finished"||n.status==="failed",d={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"};return f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("span",{className:`text-sm font-medium ${d[n.status]??"text-gray-400"}`,children:[n.status==="running"&&"●"," ",n.status.charAt(0).toUpperCase()+n.status.slice(1)]}),!o&&f.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]}),f.jsx("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:f.jsx("code",{className:"block break-all text-xs text-cyan-300",children:n.command})}),n.stdout&&f.jsx("div",{className:"max-h-48 overflow-y-auto rounded-md bg-gray-950 p-3",children:f.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-300",children:n.stdout.slice(-3e3)})}),n.stderr&&f.jsx("div",{className:"max-h-24 overflow-y-auto rounded-md bg-red-950/20 p-3",children:f.jsx("pre",{className:"whitespace-pre-wrap text-xs text-red-300",children:n.stderr.slice(-2e3)})}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-xs text-gray-500",children:o?f.jsxs(f.Fragment,{children:["Exit code: ",n.exit_code,n.finished_at&&` · ${new Date(n.finished_at).toLocaleTimeString()}`]}):r&&f.jsx("button",{type:"button",onClick:i,className:"text-xs text-gray-400 hover:text-cyan-400",children:"Run in background"})}),o&&f.jsx("button",{type:"button",onClick:l,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Close"})]})]})}function Gj(n){if(!n)return{date:"N/A",full:"N/A"};try{const l=new Date(n);if(Number.isNaN(l.getTime()))return{date:"N/A",full:"N/A"};const i=l.toLocaleString(),r=Date.now()-l.getTime(),o=Math.floor(r/6e4),d=Math.floor(r/36e5);let h;return o<1?h="just now":o<60?h=`${o} min ago`:d<24?h=`${d} hour${d===1?"":"s"} ago`:h=l.toLocaleDateString(),{date:h,full:i}}catch{return{date:"N/A",full:"N/A"}}}function Kj(n){const l=[n.target,n.experiment].filter(i=>i&&i!=="default"&&i!=="-");return l.length>0?l.join(" · "):n.target?n.target:n.display_name??n.filename}function td({runs:n,benchmarkId:l,emptyMessage:i}){const{data:r}=ht(),o=(r==null?void 0:r.threshold)??wu;return n.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:i??f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found."}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Run an evaluation first:"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"agentv eval <eval-file>"})]})]})}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"w-8 px-4 py-3"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Run"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Passed"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Failed"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Total"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"When"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(d=>{const h=Gj(d.timestamp),g=d.pass_rate>=o,p=Kj(d),m=Math.round(d.pass_rate*d.test_count),v=d.test_count-m;return f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 text-center",children:f.jsx("span",{className:`text-base font-bold ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"})}),f.jsx("td",{className:"px-4 py-3",children:l?f.jsx(Ee,{to:"/projects/$benchmarkId/runs/$runId",params:{benchmarkId:l,runId:d.filename},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:p}):f.jsx(Ee,{to:"/runs/$runId",params:{runId:d.filename},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:p})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-emerald-300",children:m}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:v>0?v:f.jsx("span",{className:"text-gray-600",children:"0"})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:d.test_count}),f.jsx("td",{className:"px-4 py-3",children:f.jsx(Tl,{rate:d.pass_rate})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",title:h.full,children:h.date})]},d.filename)})})]})})}function Vj(n){if(!n)return"Never synced";const l=new Date(n);return Number.isNaN(l.getTime())?"Never synced":`Last synced ${l.toLocaleString()}`}function up({filter:n,onFilterChange:l,remoteStatus:i,syncInFlight:r,onSync:o}){const d=(i==null?void 0:i.configured)===!0,h=d&&(i==null?void 0:i.available)!==!0;return f.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("div",{className:"flex flex-wrap items-center gap-2",children:["all","local","remote"].map(g=>{const p=g==="remote"&&!d;return f.jsx("button",{type:"button",onClick:()=>l(g),title:p?"Remote results are not configured":void 0,className:`rounded-full px-3 py-1 text-sm font-medium transition-colors ${n===g?"bg-cyan-500/20 text-cyan-300":p?"bg-gray-800 text-gray-600":"bg-gray-800 text-gray-400 hover:text-gray-200"}`,children:g==="all"?"All Sources":g==="local"?"Local Only":"Remote Only"},g)})}),d&&o?f.jsx("button",{type:"button",onClick:o,disabled:r,className:"rounded-md border border-cyan-800 bg-cyan-950/40 px-3 py-1.5 text-sm font-medium text-cyan-300 transition-colors hover:bg-cyan-900/50 disabled:cursor-not-allowed disabled:opacity-60",children:r?"Syncing…":"Sync Remote Results"}):null]}),d?f.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-gray-400",children:[f.jsx("span",{children:Vj(i==null?void 0:i.last_synced_at)}),i!=null&&i.repo?f.jsxs("span",{children:["Repo: ",i.repo]}):null,h?f.jsx("span",{className:"text-yellow-400",children:"Remote cache unavailable"}):null]}):n==="all"?f.jsxs("p",{className:"text-sm text-gray-500",children:["Remote results are not configured. Add"," ",f.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:"results.export"})," to"," ",f.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:".agentv/config.yaml"})," to enable."]}):null,i!=null&&i.last_error?f.jsx("div",{className:"rounded-md border border-yellow-900/50 bg-yellow-950/20 px-3 py-2 text-sm text-yellow-300",children:i.last_error}):null]})}function Xj(){const{data:n,isLoading:l}=F1();if(l)return f.jsx(kj,{});const i=(n==null?void 0:n.targets)??[];return i.length===0?f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Targets will appear here once evaluations are run with target labels."})]}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Experiments"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:i.map(r=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:r.name}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.run_count}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:r.experiment_count}),f.jsx("td",{className:"px-4 py-3",children:f.jsx(Tl,{rate:r.pass_rate})}),f.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[f.jsx("span",{className:"text-emerald-400",children:r.passed_count}),f.jsx("span",{className:"text-gray-600",children:"/"}),f.jsx("span",{children:r.eval_count})]})]},r.name))})]})})}function kj(){return f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("div",{className:"animate-pulse",children:[f.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(n=>f.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[f.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),f.jsx("div",{className:"h-4 w-20 rounded bg-gray-800"})]},n))]})})}const Jy=[{id:"runs",label:"🏃 Recent Runs"},{id:"experiments",label:"🧪 Experiments"},{id:"compare",label:"📊 Compare"},{id:"targets",label:"🤖 Targets"}],Zj=ra("/")({component:$j});function $j(){const{data:n,isLoading:l}=Wf(),{data:i,isLoading:r}=ht(),o=((n==null?void 0:n.projects.length)??0)>0,d=i==null?void 0:i.multi_project_dashboard;return l||r?f.jsx(cp,{}):d===!0||d===void 0&&o?f.jsx(Pj,{}):f.jsx(Fj,{})}function Pj(){const{data:n}=Wf(),{data:l}=ht(),i=Un(),[r,o]=Q.useState(""),[d,h]=Q.useState(""),[g,p]=Q.useState(null),[m,v]=Q.useState(!1),[x,S]=Q.useState(!1),j=(n==null?void 0:n.projects)??[],N=(l==null?void 0:l.read_only)===!0;async function E(A){if(A.preventDefault(),!!r.trim()){p(null);try{await aj(r.trim()),o(""),v(!1),i.invalidateQueries({queryKey:["benchmarks"]})}catch($){p($.message)}}}async function C(A){if(A.preventDefault(),!!d.trim()){p(null);try{const $=await nj(d.trim());h(""),$.length===0&&p("No projects with .agentv/ found in that directory."),i.invalidateQueries({queryKey:["benchmarks"]})}catch($){p($.message)}}}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Benchmarks"}),f.jsx("div",{className:"flex gap-2",children:!N&&f.jsxs(f.Fragment,{children:[f.jsx("button",{type:"button",onClick:()=>S(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"}),f.jsx("button",{type:"button",onClick:()=>v(!m),className:"rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500",children:m?"Cancel":"Add Benchmark"})]})})]}),g&&f.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-3 text-sm text-red-400",children:g}),!N&&m&&f.jsxs("div",{className:"space-y-3 rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[f.jsxs("form",{onSubmit:E,className:"flex gap-2",children:[f.jsx("input",{type:"text",value:r,onChange:A=>o(A.target.value),placeholder:"Benchmark path (e.g., /home/user/projects/my-evals)",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),f.jsx("button",{type:"submit",className:"rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500",children:"Add"})]}),f.jsxs("form",{onSubmit:C,className:"flex gap-2",children:[f.jsx("input",{type:"text",value:d,onChange:A=>h(A.target.value),placeholder:"Discover benchmarks in directory...",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),f.jsx("button",{type:"submit",className:"rounded-md bg-gray-700 px-3 py-1.5 text-sm font-medium text-white hover:bg-gray-600",children:"Discover"})]})]}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:j.map(A=>f.jsx(Qj,{project:A},A.id))}),!N&&f.jsx(bs,{open:x,onClose:()=>S(!1)})]})}function Fj(){const i=Ig().location.search.tab,r=ki(),o=Un(),{data:d,isLoading:h,error:g}=Jf(),{data:p}=ap(),{data:m}=ht(),[v,x]=Q.useState(!1),[S,j]=Q.useState("all"),[N,E]=Q.useState(!1),C=(m==null?void 0:m.read_only)===!0,A=Jy.some(L=>L.id===i)?i:"experiments",$=S==="all"?(d==null?void 0:d.runs)??[]:((d==null?void 0:d.runs)??[]).filter(L=>L.source===S);async function Z(){E(!0);try{await sp(),await Promise.all([o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["experiments"]}),o.invalidateQueries({queryKey:["compare"]}),o.invalidateQueries({queryKey:["targets"]}),o.invalidateQueries({queryKey:["remote-status",""]})])}finally{E(!1)}}return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Evaluation Runs"}),(m==null?void 0:m.project_name)&&f.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:m.project_name})]}),!C&&f.jsx("button",{type:"button",onClick:()=>x(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),f.jsx("div",{className:"border-b border-gray-800",children:f.jsx("div",{className:"flex gap-1",children:Jy.map(L=>f.jsx("button",{type:"button",onClick:()=>r({to:"/",search:{tab:L.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${A===L.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:L.label},L.id))})}),A==="runs"&&f.jsx(Ij,{runs:$,isLoading:h,error:g,sourceFilter:S,onSourceFilterChange:j,remoteStatus:p,syncInFlight:N,onSyncRemote:Z}),A==="experiments"&&f.jsx(Bj,{}),A==="compare"&&f.jsx(Jj,{}),A==="targets"&&f.jsx(Xj,{}),!C&&f.jsx(bs,{open:v,onClose:()=>x(!1)})]})}function Jj(){const{data:n,isLoading:l,isError:i,error:r}=P1();return f.jsx(rp,{data:n,isLoading:l,isError:i,error:r})}function Ij({runs:n,isLoading:l,error:i,sourceFilter:r,onSourceFilterChange:o,remoteStatus:d,syncInFlight:h,onSyncRemote:g}){return l?f.jsx(cp,{}):i?f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",i.message]}):f.jsxs("div",{className:"space-y-4",children:[f.jsx(Wj,{}),f.jsx(up,{filter:r,onFilterChange:o,remoteStatus:d,syncInFlight:h,onSync:g}),f.jsx(td,{runs:n,emptyMessage:r==="remote"?d!=null&&d.configured?f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No remote runs found."}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Sync remote results or run an eval with"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"auto_push: true"})," ","in your config."]})]}):f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"text-lg text-gray-400",children:"Remote results are not configured."}),f.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Add"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"results.export"})," ","to"," ",f.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:".agentv/config.yaml"})," ","to enable remote result syncing."]})]}):void 0})]})}function Wj(){const{data:n}=ip(),l=((n==null?void 0:n.runs)??[]).filter(i=>i.status==="starting"||i.status==="running");return l.length===0?null:f.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[f.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:f.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),f.jsx("ul",{className:"divide-y divide-gray-800/50",children:l.map(i=>f.jsxs("li",{className:"flex items-center justify-between px-4 py-3",children:[f.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[f.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),f.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:i.id}),f.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(i.started_at).toLocaleTimeString()})]}),f.jsx(Ee,{to:"/jobs/$runId",params:{runId:i.id},className:"ml-4 flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},i.id))})]})}function cp(){return f.jsx("div",{className:"space-y-2",children:["s1","s2","s3","s4","s5"].map(n=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},n))})}function Au({total:n,passed:l,failed:i,passRate:r,totalCost:o}){const d=Math.round(r*100),h=d>=80?"text-cyan-400":d>=60?"text-amber-400":"text-red-400";return f.jsxs("div",{className:"flex flex-wrap items-center gap-6 rounded-lg border border-gray-800 bg-gray-900/60 px-5 py-3",children:[f.jsx(wi,{label:"Pass Rate",value:`${d}%`,accent:h,large:!0}),f.jsx("div",{className:"h-6 w-px bg-gray-700"}),f.jsx(wi,{label:"Passed",value:String(l),accent:"text-emerald-400"}),f.jsx(wi,{label:"Failed",value:String(i),accent:"text-red-400"}),f.jsx(wi,{label:"Total",value:String(n)}),o!==void 0&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"h-6 w-px bg-gray-700"}),f.jsx(wi,{label:"Cost",value:`$${o.toFixed(4)}`,accent:"text-amber-400"})]})]})}function wi({label:n,value:l,accent:i,large:r}){return f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{className:"text-xs text-gray-500",children:n}),f.jsx("span",{className:`tabular-nums font-semibold ${r?"text-2xl":"text-lg"} ${i??"text-white"}`,children:l})]})}function eN(n,l){const i=new Map;for(const r of n){const o=r.category??"Uncategorized",d=r.suite??"Uncategorized";i.has(o)||i.set(o,new Map);const h=i.get(o),g=h.get(d)??{passed:0,failed:0,total:0,scoreSum:0};g.total+=1,g.scoreSum+=r.score,ka(r.score,l)?g.passed+=1:g.failed+=1,h.set(d,g)}return Array.from(i.entries()).map(([r,o])=>{const d=Array.from(o.entries()).map(([v,x])=>({name:v,...x,avgScore:x.total>0?x.scoreSum/x.total:0})).sort((v,x)=>v.name.localeCompare(x.name)),h=d.reduce((v,x)=>v+x.total,0),g=d.reduce((v,x)=>v+x.passed,0),p=d.reduce((v,x)=>v+x.failed,0),m=d.reduce((v,x)=>v+x.avgScore*x.total,0);return{name:r,suites:d,total:h,passed:g,failed:p,avgScore:h>0?m/h:0}}).sort((r,o)=>r.name.localeCompare(o.name))}function op({results:n,runId:l,benchmarkId:i}){const{data:r}=ht(),o=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,d=n.length,h=n.filter(x=>ka(x.score,o)).length,g=d-h,p=d>0?h/d:0,m=n.reduce((x,S)=>x+(S.costUsd??0),0),v=eN(n,o);return d===0?f.jsxs("div",{className:"space-y-6",children:[f.jsx(Au,{total:0,passed:0,failed:0,passRate:0}),f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[f.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"}),f.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This run has no results yet."})]})]}):f.jsxs("div",{className:"space-y-6",children:[f.jsx(Au,{total:d,passed:h,failed:g,passRate:p,totalCost:m>0?m:void 0}),f.jsxs("div",{children:[f.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Category Breakdown"}),f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Category"}),f.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Pass Rate"}),f.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Passed"}),f.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Failed"}),f.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Total"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:v.map(x=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-2.5 font-medium text-gray-200",children:x.name}),f.jsx("td",{className:"px-4 py-2.5",children:f.jsx(Tl,{rate:x.total>0?x.passed/x.total:0})}),f.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:x.passed}),f.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:x.failed>0?x.failed:f.jsx("span",{className:"text-gray-600",children:"0"})}),f.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-gray-400",children:x.total})]},x.name))})]})})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"All Evals"}),f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"w-8 px-4 py-3"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),f.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map((x,S)=>{const j=x.executionStatus==="execution_error",N=ka(x.score,o);return f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3 text-center",children:j?f.jsx("span",{className:"text-base font-bold text-red-400",children:"!"}):f.jsx("span",{className:`text-base font-bold ${N?"text-emerald-400":"text-red-400"}`,children:N?"✓":"✗"})}),f.jsx("td",{className:"px-4 py-3",children:i?f.jsx(Ee,{to:"/projects/$benchmarkId/evals/$runId/$evalId",params:{benchmarkId:i,runId:l,evalId:x.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:x.testId}):f.jsx(Ee,{to:"/evals/$runId/$evalId",params:{runId:l,evalId:x.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:x.testId})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",children:x.target??"-"}),f.jsx("td",{className:"px-4 py-3",children:j?f.jsx("span",{className:"inline-flex rounded-full bg-red-900/50 px-2 py-0.5 text-xs font-medium text-red-400",children:"ERR"}):f.jsx(Tl,{rate:x.score})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.durationMs!=null?`${(x.durationMs/1e3).toFixed(1)}s`:"-"}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.costUsd!=null?`$${x.costUsd.toFixed(4)}`:"-"})]},`${x.testId}-${S}`)})})]})})]})]})}const fp=ra("/runs/$runId")({component:tN});function tN(){var E;const{runId:n}=fp.useParams(),{data:l,isLoading:i,error:r}=Zi(n),{data:o}=ht(),[d,h]=Q.useState(!1),g=(o==null?void 0:o.read_only)===!0;if(i)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(C=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},C))})]});if(r)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",r.message]});const p=(E=l==null?void 0:l.results)==null?void 0:E[0],m=p==null?void 0:p.target,v=p==null?void 0:p.experiment,x=p==null?void 0:p.timestamp,S=m?{target:m}:void 0,j=(()=>{const C=[v,m].filter(A=>A&&A!=="default");return C.length>0?C.join(" · "):n})(),N=[m,v&&v!=="default"?v:null,x?new Date(x).toLocaleString():null,l==null?void 0:l.source].filter(Boolean).join(" · ");return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:j}),f.jsx("p",{className:"mt-1 text-sm text-gray-500",children:N})]}),!g&&f.jsx("button",{type:"button",onClick:()=>h(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Re-run with Filters"})]}),f.jsx(op,{results:(l==null?void 0:l.results)??[],runId:n}),!g&&f.jsx(bs,{open:d,onClose:()=>h(!1),prefill:S})]})}const Iy=[{id:"runs",label:"Recent Runs"},{id:"experiments",label:"Experiments"},{id:"compare",label:"Compare"},{id:"targets",label:"Targets"}],dp=ra("/projects/$benchmarkId")({component:aN});function aN(){const{benchmarkId:n}=dp.useParams(),r=Ig().location.search.tab,o=ki(),[d,h]=Q.useState(!1),{data:g}=ht(),p=(g==null?void 0:g.read_only)===!0,m=Iy.some(v=>v.id===r)?r:"experiments";return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:n}),!p&&f.jsx("button",{type:"button",onClick:()=>h(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),f.jsx("div",{className:"border-b border-gray-800",children:f.jsx("div",{className:"flex gap-1",children:Iy.map(v=>f.jsx("button",{type:"button",onClick:()=>o({to:"/projects/$benchmarkId",params:{benchmarkId:n},search:{tab:v.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${m===v.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:v.label},v.id))})}),m==="runs"&&f.jsx(nN,{benchmarkId:n}),m==="experiments"&&f.jsx(sN,{benchmarkId:n}),m==="compare"&&f.jsx(lN,{benchmarkId:n}),m==="targets"&&f.jsx(iN,{benchmarkId:n}),!p&&f.jsx(bs,{open:d,onClose:()=>h(!1),benchmarkId:n})]})}function nN({benchmarkId:n}){const l=Un(),{data:i,isLoading:r,error:o}=np(n),{data:d}=ap(n),[h,g]=Q.useState("all"),[p,m]=Q.useState(!1),v=h==="all"?(i==null?void 0:i.runs)??[]:((i==null?void 0:i.runs)??[]).filter(S=>S.source===h);async function x(){m(!0);try{await sp(n),await Promise.all([l.invalidateQueries({queryKey:["benchmarks",n,"runs"]}),l.invalidateQueries({queryKey:["benchmarks",n,"experiments"]}),l.invalidateQueries({queryKey:["benchmarks",n,"compare"]}),l.invalidateQueries({queryKey:["benchmarks",n,"targets"]}),l.invalidateQueries({queryKey:["remote-status",n]})])}finally{m(!1)}}return r?f.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(S=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},S))}):o?f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",o.message]}):f.jsxs("div",{className:"space-y-4",children:[f.jsx(up,{filter:h,onFilterChange:g,remoteStatus:d,syncInFlight:p,onSync:x}),f.jsx(td,{runs:v,benchmarkId:n})]})}function sN({benchmarkId:n}){const{data:l,isLoading:i}=Ve(uj(n)),r=(l==null?void 0:l.experiments)??[];return i?f.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(o=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},o))}):r.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No experiments found"})}):f.jsx("div",{className:"space-y-2",children:r.map(o=>f.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-white",children:o.name}),f.jsxs("p",{className:"text-sm text-gray-400",children:[o.run_count," run",o.run_count!==1?"s":""]})]}),f.jsxs("span",{className:"text-lg font-semibold tabular-nums text-cyan-400",children:[Math.round(o.pass_rate*100),"%"]})]},o.name))})}function lN({benchmarkId:n}){const{data:l,isLoading:i,isError:r,error:o}=Ve(cj(n));return f.jsx(rp,{data:l,isLoading:i,isError:r,error:o})}function iN({benchmarkId:n}){const{data:l,isLoading:i}=Ve(oj(n)),r=(l==null?void 0:l.targets)??[];return i?f.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(o=>f.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},o))}):r.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"})}):f.jsx("div",{className:"space-y-2",children:r.map(o=>f.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-medium text-white",children:o.name}),f.jsxs("p",{className:"text-sm text-gray-400",children:[o.run_count," run",o.run_count!==1?"s":""," · ",o.experiment_count," ","experiment",o.experiment_count!==1?"s":""]})]}),f.jsxs("span",{className:"text-lg font-semibold tabular-nums text-cyan-400",children:[Math.round(o.pass_rate*100),"%"]})]},o.name))})}const hp=ra("/jobs/$runId")({component:rN});function rN(){const{runId:n}=hp.useParams(),{data:l,isLoading:i,error:r}=lp(n);if(i)return f.jsxs("div",{className:"space-y-4",children:[f.jsx(pf,{}),f.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-gray-900"})]});if(r||!l)return f.jsxs("div",{className:"space-y-4",children:[f.jsx(pf,{}),f.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-400",children:r?`Failed to load run: ${r.message}`:"Run not found."})]});const o=l.status==="finished"||l.status==="failed",h={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"}[l.status]??"text-gray-400";return f.jsxs("div",{className:"space-y-4",children:[f.jsx(pf,{}),f.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("h1",{className:"truncate font-mono text-base font-semibold text-white",children:n}),f.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["Started ",new Date(l.started_at).toLocaleString(),l.finished_at&&f.jsxs(f.Fragment,{children:[" · ","Finished ",new Date(l.finished_at).toLocaleString()," · ",Math.round((new Date(l.finished_at).getTime()-new Date(l.started_at).getTime())/1e3),"s"]})]})]}),f.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2",children:[f.jsx("span",{className:`text-sm font-medium ${h}`,children:l.status.charAt(0).toUpperCase()+l.status.slice(1)}),!o&&f.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]})]}),f.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 px-4 py-3",children:[f.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Command"}),f.jsx("code",{className:"break-all text-xs text-cyan-300",children:l.command})]}),l.stdout?f.jsxs("div",{children:[f.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Output"}),f.jsx("div",{className:"max-h-[60vh] overflow-y-auto rounded-lg border border-gray-700 bg-gray-950 p-4",children:f.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-gray-200",children:l.stdout})})]}):!o&&f.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[f.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-gray-500 border-t-transparent"}),"Waiting for output…"]}),l.stderr&&f.jsxs("div",{children:[f.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-red-500",children:"Stderr"}),f.jsx("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-red-900/40 bg-red-950/20 p-4",children:f.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-red-300",children:l.stderr})})]}),o&&f.jsxs("p",{className:"text-xs text-gray-500",children:["Exit code:"," ",f.jsx("span",{className:l.exit_code===0?"text-emerald-400":"text-red-400",children:l.exit_code})]})]})}function pf(){return f.jsx(Ee,{to:"/",search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const mp=ra("/experiments/$experimentName")({component:uN});function uN(){var x;const{experimentName:n}=mp.useParams(),{data:l,isLoading:i}=If(),{data:r,isLoading:o}=Jf();if(i||o)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-4 gap-4",children:["s1","s2","s3","s4"].map(S=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},S))})]});const h=(x=l==null?void 0:l.experiments)==null?void 0:x.find(S=>S.name===n),g=(r==null?void 0:r.runs)??[],p=(h==null?void 0:h.pass_rate)??0,m=(h==null?void 0:h.run_count)??0,v=(h==null?void 0:h.target_count)??0;return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:n}),f.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[m," run",m!==1?"s":""," · ",v," target",v!==1?"s":"",(h==null?void 0:h.last_run)&&f.jsxs("span",{className:"ml-2",children:["· Last run: ",Wy(h.last_run)]})]})]}),h&&f.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[f.jsx(pu,{label:"Runs",value:String(m)}),f.jsx(pu,{label:"Targets",value:String(v)}),f.jsx(pu,{label:"Pass Rate",value:`${Math.round(p*100)}%`,accent:"text-cyan-400"}),f.jsx(pu,{label:"Last Run",value:Wy(h.last_run)})]}),f.jsxs("div",{children:[f.jsx("h2",{className:"mb-4 text-lg font-medium text-gray-200",children:"All Runs"}),f.jsx(td,{runs:g})]})]})}function pu({label:n,value:l,accent:i}){return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[f.jsx("p",{className:"text-sm text-gray-400",children:n}),f.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${i??"text-white"}`,children:l})]})}function Wy(n){if(!n)return"N/A";try{const l=new Date(n);return Number.isNaN(l.getTime())?"N/A":l.toLocaleString()}catch{return"N/A"}}async function cN(n,l){const i=await fetch("/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reviews:[{test_id:n,comment:l}]})});if(!i.ok)throw new Error(`Failed to save feedback: ${i.status}`);return i.json()}function oN({testId:n}){var v;const{data:l}=$1(),i=Un(),r=(v=l==null?void 0:l.reviews)==null?void 0:v.find(x=>x.test_id===n),[o,d]=Q.useState((r==null?void 0:r.comment)??""),[h,g]=Q.useState(!1);Q.useEffect(()=>{d((r==null?void 0:r.comment)??""),g(!1)},[r==null?void 0:r.comment]);const p=Bb({mutationFn:()=>cN(n,o),onSuccess:()=>{i.invalidateQueries({queryKey:["feedback"]}),g(!0),setTimeout(()=>g(!1),2e3)}}),m=Q.useCallback(()=>{p.mutate()},[p]);return f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[f.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-400",children:"Feedback"}),f.jsx("textarea",{value:o,onChange:x=>{d(x.target.value),g(!1)},placeholder:"Add feedback for this test...",className:"w-full rounded-md border border-gray-700 bg-gray-800 p-3 text-sm text-gray-200 placeholder-gray-500 focus:border-cyan-400 focus:outline-none",rows:3}),f.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[f.jsx("button",{type:"button",onClick:m,disabled:p.isPending,className:"rounded-md bg-cyan-600 px-4 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:p.isPending?"Saving...":"Save Feedback"}),h&&f.jsx("span",{className:"text-sm text-emerald-400",children:"Saved"}),p.isError&&f.jsx("span",{className:"text-sm text-red-400",children:"Error saving feedback"})]})]})}function fN(n){var i;switch((i=n.split(".").pop())==null?void 0:i.toLowerCase()){case"ts":case"tsx":return"📘";case"json":return"📋";case"log":case"txt":return"📜";case"md":return"📝";default:return"📄"}}function yp(n){const l=[];for(const i of n)i.type==="dir"&&(l.push(i.path),i.children&&l.push(...yp(i.children)));return l}function gp({node:n,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:o,depth:d=0}){const h=n.type==="dir",g=r.has(n.path),p=l===n.path;return f.jsxs("div",{children:[f.jsxs("button",{type:"button",onClick:()=>{h?o(n.path):i(n.path)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors ${p?"bg-cyan-400/20 text-cyan-400":"text-gray-300 hover:bg-gray-800/50 hover:text-gray-200"}`,style:{paddingLeft:`${d*16+8}px`},children:[f.jsx("span",{className:"flex-shrink-0 text-xs",children:h?g?"📂":"📁":fN(n.name)}),f.jsx("span",{className:"truncate",children:n.name})]}),h&&g&&n.children&&f.jsx("div",{children:n.children.map(m=>f.jsx(gp,{node:m,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:o,depth:d+1},m.path))})]})}function dN({files:n,selectedPath:l,onSelect:i}){const[r,o]=Q.useState(()=>new Set(yp(n))),d=h=>{o(g=>{const p=new Set(g);return p.has(h)?p.delete(h):p.add(h),p})};return f.jsxs("div",{className:"w-64 overflow-y-auto rounded-lg border border-gray-800 bg-gray-900 py-2",children:[n.length===0&&f.jsx("p",{className:"px-4 py-2 text-sm text-gray-500",children:"No files."}),n.map(h=>f.jsx(gp,{node:h,selectedPath:l,onSelect:i,openFolders:r,toggleFolder:d},h.path))]})}const hN="modulepreload",mN=function(n){return"/"+n},eg={},yN=function(l,i,r){let o=Promise.resolve();if(i&&i.length>0){let h=function(m){return Promise.all(m.map(v=>Promise.resolve(v).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const g=document.querySelector("meta[property=csp-nonce]"),p=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));o=h(i.map(m=>{if(m=mN(m),m in eg)return;eg[m]=!0;const v=m.endsWith(".css"),x=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const S=document.createElement("link");if(S.rel=v?"stylesheet":hN,v||(S.as="script"),S.crossOrigin="",S.href=m,p&&S.setAttribute("nonce",p),document.head.appendChild(S),v)return new Promise((j,N)=>{S.addEventListener("load",j),S.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${m}`)))})}))}function d(h){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=h,window.dispatchEvent(g),!g.defaultPrevented)throw h}return o.then(h=>{for(const g of h||[])g.status==="rejected"&&d(g.reason);return l().catch(d)})},gN=Q.lazy(()=>yN(()=>import("./index-Cec2pUpS.js"),[]));function pN({value:n,language:l="json",height:i="400px"}){return f.jsx(Q.Suspense,{fallback:f.jsx("div",{className:"flex items-center justify-center rounded-lg bg-gray-900 p-8 text-gray-500",children:"Loading editor..."}),children:f.jsx(gN,{height:i,language:l,value:n,theme:"vs-dark",options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbers:"on",wordWrap:"on",padding:{top:12}}})})}function Bf({score:n,className:l=""}){const i=Math.round(Math.max(0,Math.min(1,n))*100);return f.jsxs("div",{className:`flex items-center gap-3 ${l}`,children:[f.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-gray-800",children:f.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-cyan-400 to-blue-500 transition-all duration-300",style:{width:`${i}%`}})}),f.jsxs("span",{className:"w-12 text-right text-sm font-medium tabular-nums text-gray-300",children:[i,"%"]})]})}function pp(n){for(const l of n){if(l.type==="file")return l.path;if(l.children){const i=pp(l.children);if(i)return i}}return null}function xp({eval:n,runId:l,benchmarkId:i}){const[r,o]=Q.useState("checks"),{data:d}=ht(),h=(d==null?void 0:d.read_only)===!0,g=[{id:"checks",label:"Checks"},{id:"files",label:"Files"},...h?[]:[{id:"feedback",label:"Feedback"}]];return f.jsxs("div",{className:"flex min-h-full flex-col",children:[f.jsx("div",{className:"flex items-start justify-between border-b border-gray-800 px-4 py-3",children:f.jsxs("div",{children:[f.jsx("h3",{className:"text-lg font-medium",children:n.testId}),f.jsxs("p",{className:"mt-0.5 text-sm text-gray-400",children:[n.target&&f.jsxs("span",{children:["Target: ",n.target]}),n.durationMs!=null&&f.jsxs("span",{className:"ml-4",children:[(n.durationMs/1e3).toFixed(1),"s"]}),n.costUsd!=null&&f.jsxs("span",{className:"ml-4",children:["$",n.costUsd.toFixed(4)]})]})]})}),f.jsx("div",{className:"border-b border-gray-800",children:f.jsx("div",{className:"flex gap-1 px-4",children:g.map(p=>f.jsx("button",{type:"button",onClick:()=>o(p.id),className:`px-4 py-2 text-sm font-medium transition-colors ${r===p.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:p.label},p.id))})}),f.jsxs("div",{className:"min-h-0 flex-1",children:[r==="checks"&&f.jsx("div",{className:"overflow-auto p-4",children:f.jsx(xN,{result:n})}),r==="files"&&f.jsx("div",{className:"h-full p-4",children:f.jsx(vN,{result:n,runId:l,benchmarkId:i})}),!h&&r==="feedback"&&f.jsx("div",{className:"p-4",children:f.jsx(oN,{testId:n.testId})})]})]})}function tg({assertion:n}){return f.jsxs("div",{className:`flex items-start gap-3 rounded-lg border p-3 ${n.passed?"border-emerald-900/50 bg-emerald-950/20":"border-red-900/50 bg-red-950/20"}`,children:[f.jsx("span",{className:`mt-0.5 text-lg ${n.passed?"text-emerald-400":"text-red-400"}`,children:n.passed?"✓":"✗"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("p",{className:"text-sm text-gray-200",children:[n.text,n.durationMs!=null&&f.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",(n.durationMs/1e3).toFixed(1),"s)"]})]}),n.evidence&&f.jsx("p",{className:"mt-1 text-xs text-gray-400",children:n.evidence})]})]})}function xN({result:n}){const{data:l}=ht(),i=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8,r=!ka(n.score,i)||n.executionStatus==="error"||n.executionStatus==="failed",o=(n.scores??[]).filter(m=>Array.isArray(m.assertions)&&m.assertions.length>0),d=o.length>0,h=n.assertions??[],g=[];n.error&&g.push(n.error),(n.executionStatus==="error"||n.executionStatus==="failed")&&g.push(`Execution status: ${n.executionStatus}`);const p=d?o.flatMap(m=>m.assertions):h;for(const m of p.filter(v=>!v.passed)){const v=m.evidence?`${m.text}: ${m.evidence}`:m.text;g.push(v)}if(n.scores){for(const m of n.scores)if(!ka(m.score,i)&&m.details){const v=typeof m.details=="string"?m.details:JSON.stringify(m.details,null,2);g.push(`[${m.name??m.type??"evaluator"}] ${v}`)}}return f.jsxs("div",{className:"space-y-6",children:[f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("span",{className:"text-sm font-medium text-gray-400",children:"Overall score"}),f.jsx("div",{className:"flex-1",children:f.jsx(Bf,{score:n.score})})]})}),n.scores&&n.scores.length>0&&f.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[f.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-400",children:"Evaluator Scores"}),f.jsx("div",{className:"space-y-3",children:n.scores.map((m,v)=>f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:m.name??m.type??`Score ${v+1}`}),f.jsx("div",{className:"flex-1",children:f.jsx(Bf,{score:m.score})})]},`${m.name??m.type??v}`))})]}),d?f.jsx("div",{className:"space-y-6",children:o.map((m,v)=>{const x=m.name??m.type??`Evaluator ${v+1}`;return f.jsxs("div",{className:"space-y-2",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:x}),m.assertions.map((S,j)=>f.jsx(tg,{assertion:S},`${S.text}-${j}`))]},`${m.name??m.type??v}`)})}):h.length>0?f.jsx("div",{className:"space-y-2",children:h.map((m,v)=>f.jsx(tg,{assertion:m},`${m.text}-${v}`))}):f.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded."}),r&&g.length>0&&f.jsxs("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-4",children:[f.jsx("h4",{className:"mb-2 text-sm font-medium text-red-400",children:"Failure Reason"}),f.jsx("div",{className:"space-y-2",children:g.map(m=>f.jsx("p",{className:"text-sm text-gray-300",children:m},m))})]})]})}function vN({result:n,runId:l,benchmarkId:i}){const r=n.testId,{data:o}=i?Ve(ij(i,l,r)):J1(l,r),d=(o==null?void 0:o.files)??[],[h,g]=Q.useState(null),p=h??(d.length>0?pp(d):null),{data:m,isLoading:v}=i?Ve(rj(i,l,r,p??"")):I1(l,r,p??"");if(d.length===0)return f.jsx("p",{className:"text-sm text-gray-500",children:"No artifact files available."});const x=p?v?"Loading...":(m==null?void 0:m.content)??"":"",S=p?(m==null?void 0:m.language)??"plaintext":"plaintext";return f.jsxs("div",{className:"flex h-full min-h-[400px] gap-4",children:[f.jsx(dN,{files:d,selectedPath:p,onSelect:g}),f.jsx("div",{className:"flex-1",children:f.jsx(pN,{value:x,language:S,height:"100%"})})]})}const vp=ra("/evals/$runId/$evalId")({component:bN});function bN(){const{runId:n,evalId:l}=vp.useParams(),{data:i,isLoading:r,error:o}=Zi(n),{data:d}=ht(),[h,g]=Q.useState(!1),p=(d==null?void 0:d.read_only)===!0;if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",o.message]});const m=i==null?void 0:i.results.find(v=>v.testId===l);return m?f.jsxs("div",{className:"flex h-full flex-col gap-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",n," / Eval: ",l]}),f.jsx("h1",{className:"text-2xl font-semibold text-white",children:l})]}),!p&&f.jsx("button",{type:"button",onClick:()=>g(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),f.jsx(xp,{eval:m,runId:n}),!p&&f.jsx(bs,{open:h,onClose:()=>g(!1),prefill:{testIds:[l],target:m.target}})]}):f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:f.jsxs("p",{className:"text-gray-400",children:["Eval ",f.jsx("code",{className:"text-cyan-400",children:l})," not found in run"," ",f.jsx("code",{className:"text-cyan-400",children:n}),"."]})})}const bp=ra("/runs/$runId_/suite/$suite")({component:SN});function SN(){const{runId:n,suite:l}=bp.useParams(),{data:i,isLoading:r,error:o}=Zi(n),{data:d}=ht(),h=(d==null?void 0:d.threshold)??(d==null?void 0:d.pass_threshold)??.8;if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(j=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},j))})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",o.message]});const g=((i==null?void 0:i.results)??[]).filter(j=>(j.suite??"Uncategorized")===l),p=g.length,m=g.filter(j=>ka(j.score,h)).length,v=p-m,x=p>0?m/p:0,S=g.reduce((j,N)=>j+(N.costUsd??0),0);return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:l}),f.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",n]})]}),f.jsx(Au,{total:p,passed:m,failed:v,passRate:x,totalCost:S>0?S:void 0}),p===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):f.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:f.jsxs("table",{className:"w-full text-left text-sm",children:[f.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),f.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),f.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),f.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),f.jsx("tbody",{className:"divide-y divide-gray-800/50",children:g.map((j,N)=>f.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[f.jsx("td",{className:"px-4 py-3",children:f.jsx(Ee,{to:"/evals/$runId/$evalId",params:{runId:n,evalId:j.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:j.testId})}),f.jsx("td",{className:"px-4 py-3 text-gray-400",children:j.target??"-"}),f.jsx("td",{className:"px-4 py-3",children:j.executionStatus==="execution_error"?f.jsx("span",{className:"inline-flex rounded-full px-2 py-0.5 text-xs font-medium bg-red-900/50 text-red-400",children:"ERR"}):f.jsx(Tl,{rate:j.score})}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:j.durationMs!=null?`${(j.durationMs/1e3).toFixed(1)}s`:"-"}),f.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:j.costUsd!=null?`$${j.costUsd.toFixed(4)}`:"-"})]},`${j.testId}-${N}`))})]})})]})}const Sp=ra("/runs/$runId_/category/$category")({component:jN});function jN(){const{runId:n,category:l}=Sp.useParams(),{data:i,isLoading:r,error:o}=tp(n,l);if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(v=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},v))})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",o.message]});const d=(i==null?void 0:i.suites)??[],h=d.reduce((v,x)=>v+x.total,0),g=d.reduce((v,x)=>v+x.passed,0),p=h-g,m=h>0?g/h:0;return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:l}),f.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",n]})]}),f.jsx(Au,{total:h,passed:g,failed:p,passRate:m}),d.length===0?f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:f.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):f.jsxs("div",{className:"space-y-3",children:[f.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),f.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:d.map(v=>f.jsxs(Ee,{to:"/runs/$runId/suite/$suite",params:{runId:n,suite:v.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:v.name}),f.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[v.passed,"/",v.total]})]}),f.jsx("div",{className:"mt-2",children:f.jsx(Bf,{score:v.avg_score})}),f.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[f.jsxs("span",{className:"text-emerald-400",children:[v.passed," passed"]}),v.failed>0&&f.jsxs("span",{className:"text-red-400",children:[v.failed," failed"]})]})]},v.name))})]})]})}const jp=ra("/projects/$benchmarkId_/runs/$runId")({component:NN});function NN(){var C;const{benchmarkId:n,runId:l}=jp.useParams(),{data:i,isLoading:r,error:o}=ed(n,l),{data:d}=ht(),[h,g]=Q.useState(!1),p=(d==null?void 0:d.read_only)===!0;if(r)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(A=>f.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},A))})]});if(o)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",o.message]});const m=(C=i==null?void 0:i.results)==null?void 0:C[0],v=m==null?void 0:m.target,x=m==null?void 0:m.experiment,S=m==null?void 0:m.timestamp,j=v?{target:v}:void 0,N=(()=>{const A=[x,v].filter($=>$&&$!=="default");return A.length>0?A.join(" · "):l})(),E=[v,x&&x!=="default"?x:null,S?new Date(S).toLocaleString():null,i==null?void 0:i.source].filter(Boolean).join(" · ");return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold text-white",children:N}),f.jsx("p",{className:"mt-1 text-sm text-gray-500",children:E})]}),!p&&f.jsx("button",{type:"button",onClick:()=>g(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Re-run with Filters"})]}),f.jsx(op,{results:(i==null?void 0:i.results)??[],runId:l,benchmarkId:n}),!p&&f.jsx(bs,{open:h,onClose:()=>g(!1),benchmarkId:n,prefill:j})]})}const Np=ra("/projects/$benchmarkId_/evals/$runId/$evalId")({component:RN});function RN(){const{benchmarkId:n,runId:l,evalId:i}=Np.useParams(),{data:r,isLoading:o,error:d}=ed(n,l),{data:h}=ht(),[g,p]=Q.useState(!1),m=(h==null?void 0:h.read_only)===!0;if(o)return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),f.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(d)return f.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",d.message]});const v=r==null?void 0:r.results.find(x=>x.testId===i);return v?f.jsxs("div",{className:"flex h-full flex-col gap-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",l," / Eval: ",i]}),f.jsx("h1",{className:"text-2xl font-semibold text-white",children:i})]}),!m&&f.jsx("button",{type:"button",onClick:()=>p(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),f.jsx(xp,{eval:v,runId:l,benchmarkId:n}),!m&&f.jsx(bs,{open:g,onClose:()=>p(!1),benchmarkId:n,prefill:{testIds:[i],target:v.target}})]}):f.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:f.jsxs("p",{className:"text-gray-400",children:["Eval ",f.jsx("code",{className:"text-cyan-400",children:i})," not found in run"," ",f.jsx("code",{className:"text-cyan-400",children:l}),"."]})})}const _N=Cj.update({id:"/settings",path:"/settings",getParentRoute:()=>ta}),EN=Zj.update({id:"/",path:"/",getParentRoute:()=>ta}),TN=fp.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>ta}),MN=dp.update({id:"/projects/$benchmarkId",path:"/projects/$benchmarkId",getParentRoute:()=>ta}),CN=hp.update({id:"/jobs/$runId",path:"/jobs/$runId",getParentRoute:()=>ta}),wN=mp.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>ta}),AN=vp.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>ta}),ON=bp.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>ta}),zN=Sp.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>ta}),DN=jp.update({id:"/projects/$benchmarkId_/runs/$runId",path:"/projects/$benchmarkId/runs/$runId",getParentRoute:()=>ta}),LN=Np.update({id:"/projects/$benchmarkId_/evals/$runId/$evalId",path:"/projects/$benchmarkId/evals/$runId/$evalId",getParentRoute:()=>ta}),UN={IndexRoute:EN,SettingsRoute:_N,ExperimentsExperimentNameRoute:wN,JobsRunIdRoute:CN,ProjectsBenchmarkIdRoute:MN,RunsRunIdRoute:TN,EvalsRunIdEvalIdRoute:AN,ProjectsBenchmarkIdRunsRunIdRoute:DN,RunsRunIdCategoryCategoryRoute:zN,RunsRunIdSuiteSuiteRoute:ON,ProjectsBenchmarkIdEvalsRunIdEvalIdRoute:LN},BN=ta._addFileChildren(UN)._addFileTypes(),qN=new Rb({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),HN=C1({routeTree:BN}),Rp=document.getElementById("root");if(!Rp)throw new Error("Root element not found");Wv.createRoot(Rp).render(f.jsx(Q.StrictMode,{children:f.jsx(_b,{client:qN,children:f.jsx(O1,{router:HN})})}));export{zi as W,Q as r};
|