agentv 5.0.0-next.1 → 5.2.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +239 -53
- package/dist/{agentv-provider-AYXH7WLW-NJRC6UQX.js → agentv-provider-AYXH7WLW-6YZKZ7PS.js} +2 -2
- package/dist/{artifact-writer-QD52FC56.js → artifact-writer-SN6UNL5G.js} +15 -8
- package/dist/{chunk-GZJMODLW.js → chunk-3S6A2RKR.js} +45880 -30542
- package/dist/chunk-3S6A2RKR.js.map +1 -0
- package/dist/{chunk-6Q56CEXV.js → chunk-3X357HS4.js} +7900 -8985
- package/dist/chunk-3X357HS4.js.map +1 -0
- package/dist/{chunk-6JVM4GJI.js → chunk-46K2OET3.js} +187 -80
- package/dist/chunk-46K2OET3.js.map +1 -0
- package/dist/{chunk-IJEZFZJR.js → chunk-7BGERE6L.js} +2 -2
- package/dist/chunk-7BGERE6L.js.map +1 -0
- package/dist/{chunk-UG4JHZYM.js → chunk-ALVZQUZP.js} +670 -1427
- package/dist/chunk-ALVZQUZP.js.map +1 -0
- package/dist/{chunk-RCIEHFQ2.js → chunk-PEUTJS7B.js} +3 -3
- package/dist/{chunk-5H446C7X.js → chunk-QMRVH5ZP.js} +2 -8
- package/dist/{chunk-IBI7A5RP.js → chunk-T4AD3H3Y.js} +3444 -2251
- package/dist/chunk-T4AD3H3Y.js.map +1 -0
- package/dist/cli.js +8 -9
- package/dist/cli.js.map +1 -1
- package/dist/dashboard/assets/{index-D5_8DE_B.js → index-DNgf3qJ2.js} +1 -1
- package/dist/dashboard/assets/index-D_bokML8.css +1 -0
- package/dist/dashboard/assets/index-r_jSJmlw.js +121 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/{dist-KJ6PELQY.js → dist-DEPJOMCA.js} +74 -60
- package/dist/{docker-workspace-ZJ2ESVBI-6UDETQII.js → docker-workspace-NNK4Z6FR-QRTIG6TM.js} +3 -3
- package/dist/{exec-MYPAJJP7-C5HD5WG5.js → exec-4HFFRQ3B-AXDMJNLJ.js} +3 -3
- package/dist/index.js +8 -9
- package/dist/{interactive-2WMVAASS.js → interactive-36ZNMQB2.js} +13 -29
- package/dist/interactive-36ZNMQB2.js.map +1 -0
- package/dist/skills/agentv-bench/SKILL.md +38 -34
- package/dist/skills/agentv-bench/agents/analyzer.md +6 -6
- package/dist/skills/agentv-bench/agents/comparator.md +4 -5
- package/dist/skills/agentv-bench/agents/grader.md +4 -4
- package/dist/skills/agentv-bench/references/autoresearch.md +3 -3
- package/dist/skills/agentv-bench/references/description-optimization.md +2 -2
- package/dist/skills/agentv-bench/references/environment-adaptation.md +10 -10
- package/dist/skills/agentv-bench/references/eval-yaml-spec.md +51 -30
- package/dist/skills/agentv-bench/references/migrating-from-skill-creator.md +4 -4
- package/dist/skills/agentv-bench/references/subagent-pipeline.md +13 -12
- package/dist/skills/agentv-eval-migrations/SKILL.md +33 -0
- package/dist/skills/agentv-eval-migrations/references/breaking-changes.md +1012 -0
- package/dist/skills/agentv-eval-review/SKILL.md +6 -3
- package/dist/skills/agentv-eval-review/scripts/lint_eval.py +1 -1
- package/dist/skills/agentv-eval-writer/SKILL.md +380 -246
- package/dist/skills/agentv-eval-writer/references/{config-schema.json → config.schema.json} +6 -5
- package/dist/skills/agentv-eval-writer/references/custom-evaluators.md +23 -18
- package/dist/skills/agentv-eval-writer/references/eval.schema.json +9852 -0
- package/dist/skills/agentv-eval-writer/references/python-helpers.md +8 -8
- package/dist/skills/agentv-eval-writer/references/rubric-evaluator.md +21 -22
- package/dist/skills/agentv-trace-analyst/SKILL.md +4 -4
- package/dist/templates/.agentv/targets.yaml +41 -40
- package/dist/{ts-eval-loader-RE43OAGX-AMRCUKBZ.js → ts-eval-loader-OMG2JBHP-OP5RR7A3.js} +5 -4
- package/package.json +19 -4
- package/dist/chunk-6JVM4GJI.js.map +0 -1
- package/dist/chunk-6Q56CEXV.js.map +0 -1
- package/dist/chunk-76FOHROU.js +0 -96
- package/dist/chunk-76FOHROU.js.map +0 -1
- package/dist/chunk-GZJMODLW.js.map +0 -1
- package/dist/chunk-HSHTTN6C.js +0 -565
- package/dist/chunk-HSHTTN6C.js.map +0 -1
- package/dist/chunk-IBI7A5RP.js.map +0 -1
- package/dist/chunk-IJEZFZJR.js.map +0 -1
- package/dist/chunk-LRULMAAA.js +0 -1711
- package/dist/chunk-LRULMAAA.js.map +0 -1
- package/dist/chunk-R3CXYNTN.js +0 -1238
- package/dist/chunk-R3CXYNTN.js.map +0 -1
- package/dist/chunk-UG4JHZYM.js.map +0 -1
- package/dist/chunk-VQ2ZO7XJ.js +0 -2098
- package/dist/chunk-VQ2ZO7XJ.js.map +0 -1
- package/dist/chunk-XALGXSKB.js +0 -21
- package/dist/chunk-XALGXSKB.js.map +0 -1
- package/dist/dashboard/assets/index-BVMrdN8a.js +0 -119
- package/dist/dashboard/assets/index-DZWXfWsv.css +0 -1
- package/dist/esm-NNMQYIKT.js +0 -32
- package/dist/esm-R77SNOF5.js +0 -65
- package/dist/esm-RVQPUGWH.js +0 -1207
- package/dist/esm-RVQPUGWH.js.map +0 -1
- package/dist/esm-TTEMJEVV.js +0 -933
- package/dist/esm-TTEMJEVV.js.map +0 -1
- package/dist/esm-ZADQ4XQH-QUFGGZL4.js +0 -924
- package/dist/esm-ZADQ4XQH-QUFGGZL4.js.map +0 -1
- package/dist/exec-MYPAJJP7-C5HD5WG5.js.map +0 -1
- package/dist/getMachineId-bsd-HSK5LZMG.js +0 -41
- package/dist/getMachineId-bsd-HSK5LZMG.js.map +0 -1
- package/dist/getMachineId-darwin-4DP6CCJV.js +0 -41
- package/dist/getMachineId-darwin-4DP6CCJV.js.map +0 -1
- package/dist/getMachineId-linux-44LJ5UJB.js +0 -33
- package/dist/getMachineId-linux-44LJ5UJB.js.map +0 -1
- package/dist/getMachineId-unsupported-NVK6IATM.js +0 -24
- package/dist/getMachineId-unsupported-NVK6IATM.js.map +0 -1
- package/dist/getMachineId-win-YZ36S7VA.js +0 -43
- package/dist/getMachineId-win-YZ36S7VA.js.map +0 -1
- package/dist/interactive-2WMVAASS.js.map +0 -1
- package/dist/otlp-json-file-exporter-RY63S3IG-PZBQPVYY.js +0 -9
- package/dist/otlp-json-file-exporter-RY63S3IG-PZBQPVYY.js.map +0 -1
- package/dist/skills/agentv-eval-writer/references/eval-schema.json +0 -17295
- package/dist/skills/agentv-eval-writer/references/experiment-schema.json +0 -278
- package/dist/src-76ISS3LH.js +0 -1733
- package/dist/src-76ISS3LH.js.map +0 -1
- package/dist/ts-eval-loader-RE43OAGX-AMRCUKBZ.js.map +0 -1
- /package/dist/{agentv-provider-AYXH7WLW-NJRC6UQX.js.map → agentv-provider-AYXH7WLW-6YZKZ7PS.js.map} +0 -0
- /package/dist/{artifact-writer-QD52FC56.js.map → artifact-writer-SN6UNL5G.js.map} +0 -0
- /package/dist/{chunk-RCIEHFQ2.js.map → chunk-PEUTJS7B.js.map} +0 -0
- /package/dist/{chunk-5H446C7X.js.map → chunk-QMRVH5ZP.js.map} +0 -0
- /package/dist/{dist-KJ6PELQY.js.map → dist-DEPJOMCA.js.map} +0 -0
- /package/dist/{docker-workspace-ZJ2ESVBI-6UDETQII.js.map → docker-workspace-NNK4Z6FR-QRTIG6TM.js.map} +0 -0
- /package/dist/{esm-NNMQYIKT.js.map → exec-4HFFRQ3B-AXDMJNLJ.js.map} +0 -0
- /package/dist/{esm-R77SNOF5.js.map → ts-eval-loader-OMG2JBHP-OP5RR7A3.js.map} +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
var GI=Object.defineProperty;var cO=e=>{throw TypeError(e)};var YI=(e,t,r)=>t in e?GI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var mv=(e,t,r)=>YI(e,typeof t!="symbol"?t+"":t,r),pv=(e,t,r)=>t.has(e)||cO("Cannot "+r);var q=(e,t,r)=>(pv(e,t,"read from private field"),r?r.call(e):t.get(e)),Ne=(e,t,r)=>t.has(e)?cO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),fe=(e,t,r,n)=>(pv(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Le=(e,t,r)=>(pv(e,t,"access private method"),r);var th=(e,t,r,n)=>({set _(i){fe(e,t,i,r)},get _(){return q(e,t,n)}});function VI(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function rs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gv={exports:{}},ac={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var dO;function QI(){if(dO)return ac;dO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:n,key:l,ref:i!==void 0?i:null,props:o}}return ac.Fragment=t,ac.jsx=r,ac.jsxs=r,ac}var fO;function XI(){return fO||(fO=1,gv.exports=QI()),gv.exports}var d=XI(),yv={exports:{}},Oe={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var hO;function WI(){if(hO)return Oe;hO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function x($){return $===null||typeof $!="object"?null:($=y&&$[y]||$["@@iterator"],typeof $=="function"?$:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function _($,X,le){this.props=$,this.context=X,this.refs=N,this.updater=le||b}_.prototype.isReactComponent={},_.prototype.setState=function($,X){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,X,"setState")},_.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function E(){}E.prototype=_.prototype;function T($,X,le){this.props=$,this.context=X,this.refs=N,this.updater=le||b}var A=T.prototype=new E;A.constructor=T,w(A,_.prototype),A.isPureReactComponent=!0;var C=Array.isArray;function R(){}var D={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function z($,X,le){var ue=le.ref;return{$$typeof:e,type:$,key:X,ref:ue!==void 0?ue:null,props:le}}function k($,X){return z($.type,X,$.props)}function H($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function U($){var X={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(le){return X[le]})}var ae=/\/+/g;function Z($,X){return typeof $=="object"&&$!==null&&$.key!=null?U(""+$.key):X.toString(36)}function G($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(R,R):($.status="pending",$.then(function(X){$.status==="pending"&&($.status="fulfilled",$.value=X)},function(X){$.status==="pending"&&($.status="rejected",$.reason=X)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function L($,X,le,ue,pe){var xe=typeof $;(xe==="undefined"||xe==="boolean")&&($=null);var we=!1;if($===null)we=!0;else switch(xe){case"bigint":case"string":case"number":we=!0;break;case"object":switch($.$$typeof){case e:case t:we=!0;break;case p:return we=$._init,L(we($._payload),X,le,ue,pe)}}if(we)return pe=pe($),we=ue===""?"."+Z($,0):ue,C(pe)?(le="",we!=null&&(le=we.replace(ae,"$&/")+"/"),L(pe,X,le,"",function(te){return te})):pe!=null&&(H(pe)&&(pe=k(pe,le+(pe.key==null||$&&$.key===pe.key?"":(""+pe.key).replace(ae,"$&/")+"/")+we)),X.push(pe)),1;we=0;var _e=ue===""?".":ue+":";if(C($))for(var de=0;de<$.length;de++)ue=$[de],xe=_e+Z(ue,de),we+=L(ue,X,le,xe,pe);else if(de=x($),typeof de=="function")for($=de.call($),de=0;!(ue=$.next()).done;)ue=ue.value,xe=_e+Z(ue,de++),we+=L(ue,X,le,xe,pe);else if(xe==="object"){if(typeof $.then=="function")return L(G($),X,le,ue,pe);throw X=String($),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return we}function F($,X,le){if($==null)return $;var ue=[],pe=0;return L($,ue,"","",function(xe){return X.call(le,xe,pe++)}),ue}function J($){if($._status===-1){var X=$._result;X=X(),X.then(function(le){($._status===0||$._status===-1)&&($._status=1,$._result=le)},function(le){($._status===0||$._status===-1)&&($._status=2,$._result=le)}),$._status===-1&&($._status=0,$._result=X)}if($._status===1)return $._result.default;throw $._result}var re=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},oe={map:F,forEach:function($,X,le){F($,function(){X.apply(this,arguments)},le)},count:function($){var X=0;return F($,function(){X++}),X},toArray:function($){return F($,function(X){return X})||[]},only:function($){if(!H($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return Oe.Activity=g,Oe.Children=oe,Oe.Component=_,Oe.Fragment=r,Oe.Profiler=i,Oe.PureComponent=T,Oe.StrictMode=n,Oe.Suspense=h,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Oe.__COMPILER_RUNTIME={__proto__:null,c:function($){return D.H.useMemoCache($)}},Oe.cache=function($){return function(){return $.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function($,X,le){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var ue=w({},$.props),pe=$.key;if(X!=null)for(xe in X.key!==void 0&&(pe=""+X.key),X)!M.call(X,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&X.ref===void 0||(ue[xe]=X[xe]);var xe=arguments.length-2;if(xe===1)ue.children=le;else if(1<xe){for(var we=Array(xe),_e=0;_e<xe;_e++)we[_e]=arguments[_e+2];ue.children=we}return z($.type,pe,ue)},Oe.createContext=function($){return $={$$typeof:l,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:o,_context:$},$},Oe.createElement=function($,X,le){var ue,pe={},xe=null;if(X!=null)for(ue in X.key!==void 0&&(xe=""+X.key),X)M.call(X,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(pe[ue]=X[ue]);var we=arguments.length-2;if(we===1)pe.children=le;else if(1<we){for(var _e=Array(we),de=0;de<we;de++)_e[de]=arguments[de+2];pe.children=_e}if($&&$.defaultProps)for(ue in we=$.defaultProps,we)pe[ue]===void 0&&(pe[ue]=we[ue]);return z($,xe,pe)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function($){return{$$typeof:c,render:$}},Oe.isValidElement=H,Oe.lazy=function($){return{$$typeof:p,_payload:{_status:-1,_result:$},_init:J}},Oe.memo=function($,X){return{$$typeof:f,type:$,compare:X===void 0?null:X}},Oe.startTransition=function($){var X=D.T,le={};D.T=le;try{var ue=$(),pe=D.S;pe!==null&&pe(le,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(R,re)}catch(xe){re(xe)}finally{X!==null&&le.types!==null&&(X.types=le.types),D.T=X}},Oe.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Oe.use=function($){return D.H.use($)},Oe.useActionState=function($,X,le){return D.H.useActionState($,X,le)},Oe.useCallback=function($,X){return D.H.useCallback($,X)},Oe.useContext=function($){return D.H.useContext($)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function($,X){return D.H.useDeferredValue($,X)},Oe.useEffect=function($,X){return D.H.useEffect($,X)},Oe.useEffectEvent=function($){return D.H.useEffectEvent($)},Oe.useId=function(){return D.H.useId()},Oe.useImperativeHandle=function($,X,le){return D.H.useImperativeHandle($,X,le)},Oe.useInsertionEffect=function($,X){return D.H.useInsertionEffect($,X)},Oe.useLayoutEffect=function($,X){return D.H.useLayoutEffect($,X)},Oe.useMemo=function($,X){return D.H.useMemo($,X)},Oe.useOptimistic=function($,X){return D.H.useOptimistic($,X)},Oe.useReducer=function($,X,le){return D.H.useReducer($,X,le)},Oe.useRef=function($){return D.H.useRef($)},Oe.useState=function($){return D.H.useState($)},Oe.useSyncExternalStore=function($,X,le){return D.H.useSyncExternalStore($,X,le)},Oe.useTransition=function(){return D.H.useTransition()},Oe.version="19.2.4",Oe}var mO;function tu(){return mO||(mO=1,yv.exports=WI()),yv.exports}var S=tu();const Ul=rs(S),ZI=VI({__proto__:null,default:Ul},[S]);var vv={exports:{}},ic={},xv={exports:{}},bv={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var pO;function JI(){return pO||(pO=1,(function(e){function t(L,F){var J=L.length;L.push(F);e:for(;0<J;){var re=J-1>>>1,oe=L[re];if(0<i(oe,F))L[re]=F,L[J]=oe,J=re;else break e}}function r(L){return L.length===0?null:L[0]}function n(L){if(L.length===0)return null;var F=L[0],J=L.pop();if(J!==F){L[0]=J;e:for(var re=0,oe=L.length,$=oe>>>1;re<$;){var X=2*(re+1)-1,le=L[X],ue=X+1,pe=L[ue];if(0>i(le,J))ue<oe&&0>i(pe,le)?(L[re]=pe,L[ue]=J,re=ue):(L[re]=le,L[X]=J,re=X);else if(ue<oe&&0>i(pe,J))L[re]=pe,L[ue]=J,re=ue;else break e}}return F}function i(L,F){var J=L.sortIndex-F.sortIndex;return J!==0?J:L.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var h=[],f=[],p=1,g=null,y=3,x=!1,b=!1,w=!1,N=!1,_=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function A(L){for(var F=r(f);F!==null;){if(F.callback===null)n(f);else if(F.startTime<=L)n(f),F.sortIndex=F.expirationTime,t(h,F);else break;F=r(f)}}function C(L){if(w=!1,A(L),!b)if(r(h)!==null)b=!0,R||(R=!0,U());else{var F=r(f);F!==null&&G(C,F.startTime-L)}}var R=!1,D=-1,M=5,z=-1;function k(){return N?!0:!(e.unstable_now()-z<M)}function H(){if(N=!1,R){var L=e.unstable_now();z=L;var F=!0;try{e:{b=!1,w&&(w=!1,E(D),D=-1),x=!0;var J=y;try{t:{for(A(L),g=r(h);g!==null&&!(g.expirationTime>L&&k());){var re=g.callback;if(typeof re=="function"){g.callback=null,y=g.priorityLevel;var oe=re(g.expirationTime<=L);if(L=e.unstable_now(),typeof oe=="function"){g.callback=oe,A(L),F=!0;break t}g===r(h)&&n(h),A(L)}else n(h);g=r(h)}if(g!==null)F=!0;else{var $=r(f);$!==null&&G(C,$.startTime-L),F=!1}}break e}finally{g=null,y=J,x=!1}F=void 0}}finally{F?U():R=!1}}}var U;if(typeof T=="function")U=function(){T(H)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,Z=ae.port2;ae.port1.onmessage=H,U=function(){Z.postMessage(null)}}else U=function(){_(H,0)};function G(L,F){D=_(function(){L(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(L){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var J=y;y=F;try{return L()}finally{y=J}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(L,F){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var J=y;y=L;try{return F()}finally{y=J}},e.unstable_scheduleCallback=function(L,F,J){var re=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?re+J:re):J=re,L){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=J+oe,L={id:p++,callback:F,priorityLevel:L,startTime:J,expirationTime:oe,sortIndex:-1},J>re?(L.sortIndex=J,t(f,L),r(h)===null&&L===r(f)&&(w?(E(D),D=-1):w=!0,G(C,J-re))):(L.sortIndex=oe,t(h,L),b||x||(b=!0,R||(R=!0,U()))),L},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(L){var F=y;return function(){var J=y;y=F;try{return L.apply(this,arguments)}finally{y=J}}}})(bv)),bv}var gO;function ez(){return gO||(gO=1,xv.exports=JI()),xv.exports}var jv={exports:{}},pr={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var yO;function tz(){if(yO)return pr;yO=1;var e=tu();function t(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(h,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:g==null?null:""+g,children:h,containerInfo:f,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return pr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,pr.createPortal=function(h,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(h,f,null,p)},pr.flushSync=function(h){var f=l.T,p=n.p;try{if(l.T=null,n.p=2,h)return h()}finally{l.T=f,n.p=p,n.d.f()}},pr.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,n.d.C(h,f))},pr.prefetchDNS=function(h){typeof h=="string"&&n.d.D(h)},pr.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var p=f.as,g=c(p,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,x=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?n.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:x}):p==="script"&&n.d.X(h,{crossOrigin:g,integrity:y,fetchPriority:x,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},pr.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);n.d.M(h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&n.d.M(h)},pr.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,g=c(p,f.crossOrigin);n.d.L(h,p,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},pr.preloadModule=function(h,f){if(typeof h=="string")if(f){var p=c(f.as,f.crossOrigin);n.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else n.d.m(h)},pr.requestFormReset=function(h){n.d.r(h)},pr.unstable_batchedUpdates=function(h,f){return h(f)},pr.useFormState=function(h,f,p){return l.H.useFormState(h,f,p)},pr.useFormStatus=function(){return l.H.useHostTransitionStatus()},pr.version="19.2.4",pr}var vO;function L2(){if(vO)return jv.exports;vO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),jv.exports=tz(),jv.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var xO;function rz(){if(xO)return ic;xO=1;var e=ez(),t=tu(),r=L2();function n(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var s=a,u=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(u=s.return),a=s.return;while(a)}return s.tag===3?u:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function h(a){if(o(a)!==a)throw Error(n(188))}function f(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(n(188));return s!==a?null:a}for(var u=a,m=s;;){var v=u.return;if(v===null)break;var j=v.alternate;if(j===null){if(m=v.return,m!==null){u=m;continue}break}if(v.child===j.child){for(j=v.child;j;){if(j===u)return h(v),a;if(j===m)return h(v),s;j=j.sibling}throw Error(n(188))}if(u.return!==m.return)u=v,m=j;else{for(var O=!1,P=v.child;P;){if(P===u){O=!0,u=v,m=j;break}if(P===m){O=!0,m=v,u=j;break}P=P.sibling}if(!O){for(P=j.child;P;){if(P===u){O=!0,u=j,m=v;break}if(P===m){O=!0,m=j,u=v;break}P=P.sibling}if(!O)throw Error(n(189))}}if(u.alternate!==m)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?a:s}function p(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=p(a),s!==null)return s;a=a.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function U(a){return a===null||typeof a!="object"?null:(a=H&&a[H]||a["@@iterator"],typeof a=="function"?a:null)}var ae=Symbol.for("react.client.reference");function Z(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ae?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case _:return"Profiler";case N:return"StrictMode";case C:return"Suspense";case R:return"SuspenseList";case z:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case b:return"Portal";case T:return a.displayName||"Context";case E:return(a._context.displayName||"Context")+".Consumer";case A:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case D:return s=a.displayName||null,s!==null?s:Z(a.type)||"Memo";case M:s=a._payload,a=a._init;try{return Z(a(s))}catch{}}return null}var G=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},re=[],oe=-1;function $(a){return{current:a}}function X(a){0>oe||(a.current=re[oe],re[oe]=null,oe--)}function le(a,s){oe++,re[oe]=a.current,a.current=s}var ue=$(null),pe=$(null),xe=$(null),we=$(null);function _e(a,s){switch(le(xe,s),le(pe,a),le(ue,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?M_(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=M_(s),a=D_(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}X(ue),le(ue,a)}function de(){X(ue),X(pe),X(xe)}function te(a){a.memoizedState!==null&&le(we,a);var s=ue.current,u=D_(s,a.type);s!==u&&(le(pe,a),le(ue,u))}function je(a){pe.current===a&&(X(ue),X(pe)),we.current===a&&(X(we),ec._currentValue=J)}var ce,Et;function Me(a){if(ce===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);ce=s&&s[1]||"",Et=-1<u.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ce+a+Et}var At=!1;function Tt(a,s){if(!a||At)return"";At=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(s){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(ee){var W=ee}Reflect.construct(a,[],se)}else{try{se.call()}catch(ee){W=ee}a.call(se.prototype)}}else{try{throw Error()}catch(ee){W=ee}(se=a())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(ee){if(ee&&W&&typeof ee.stack=="string")return[ee.stack,W.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=m.DetermineComponentFrameRoot(),O=j[0],P=j[1];if(O&&P){var I=O.split(`
|
|
44
|
+
`),V=P.split(`
|
|
45
|
+
`);for(v=m=0;m<I.length&&!I[m].includes("DetermineComponentFrameRoot");)m++;for(;v<V.length&&!V[v].includes("DetermineComponentFrameRoot");)v++;if(m===I.length||v===V.length)for(m=I.length-1,v=V.length-1;1<=m&&0<=v&&I[m]!==V[v];)v--;for(;1<=m&&0<=v;m--,v--)if(I[m]!==V[v]){if(m!==1||v!==1)do if(m--,v--,0>v||I[m]!==V[v]){var ne=`
|
|
46
|
+
`+I[m].replace(" at new "," at ");return a.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",a.displayName)),ne}while(1<=m&&0<=v);break}}}finally{At=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Me(u):""}function hr(a,s){switch(a.tag){case 26:case 27:case 5:return Me(a.type);case 16:return Me("Lazy");case 13:return a.child!==s&&s!==null?Me("Suspense Fallback"):Me("Suspense");case 19:return Me("SuspenseList");case 0:case 15:return Tt(a.type,!1);case 11:return Tt(a.type.render,!1);case 1:return Tt(a.type,!0);case 31:return Me("Activity");default:return""}}function ma(a){try{var s="",u=null;do s+=hr(a,u),u=a,a=a.return;while(a);return s}catch(m){return`
|
|
47
|
+
Error generating stack: `+m.message+`
|
|
48
|
+
`+m.stack}}var Pn=Object.prototype.hasOwnProperty,du=e.unstable_scheduleCallback,No=e.unstable_cancelCallback,tg=e.unstable_shouldYield,kd=e.unstable_requestPaint,Ce=e.unstable_now,mr=e.unstable_getCurrentPriorityLevel,Kn=e.unstable_ImmediatePriority,Ld=e.unstable_UserBlockingPriority,$d=e.unstable_NormalPriority,EL=e.unstable_LowPriority,hS=e.unstable_IdlePriority,AL=e.log,TL=e.unstable_setDisableYieldValue,fu=null,Hr=null;function ni(a){if(typeof AL=="function"&&TL(a),Hr&&typeof Hr.setStrictMode=="function")try{Hr.setStrictMode(fu,a)}catch{}}var Kr=Math.clz32?Math.clz32:RL,CL=Math.log,PL=Math.LN2;function RL(a){return a>>>=0,a===0?32:31-(CL(a)/PL|0)|0}var Id=256,zd=262144,Bd=4194304;function is(a){var s=a&42;if(s!==0)return s;switch(a&-a){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 a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Ud(a,s,u){var m=a.pendingLanes;if(m===0)return 0;var v=0,j=a.suspendedLanes,O=a.pingedLanes;a=a.warmLanes;var P=m&134217727;return P!==0?(m=P&~j,m!==0?v=is(m):(O&=P,O!==0?v=is(O):u||(u=P&~a,u!==0&&(v=is(u))))):(P=m&~j,P!==0?v=is(P):O!==0?v=is(O):u||(u=m&~a,u!==0&&(v=is(u)))),v===0?0:s!==0&&s!==v&&(s&j)===0&&(j=v&-v,u=s&-s,j>=u||j===32&&(u&4194048)!==0)?s:v}function hu(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function ML(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 mS(){var a=Bd;return Bd<<=1,(Bd&62914560)===0&&(Bd=4194304),a}function rg(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function mu(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function DL(a,s,u,m,v,j){var O=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var P=a.entanglements,I=a.expirationTimes,V=a.hiddenUpdates;for(u=O&~u;0<u;){var ne=31-Kr(u),se=1<<ne;P[ne]=0,I[ne]=-1;var W=V[ne];if(W!==null)for(V[ne]=null,ne=0;ne<W.length;ne++){var ee=W[ne];ee!==null&&(ee.lane&=-536870913)}u&=~se}m!==0&&pS(a,m,0),j!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=j&~(O&~s))}function pS(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var m=31-Kr(s);a.entangledLanes|=s,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function gS(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var m=31-Kr(u),v=1<<m;v&s|a[m]&s&&(a[m]|=s),u&=~v}}function yS(a,s){var u=s&-s;return u=(u&42)!==0?1:ng(u),(u&(a.suspendedLanes|s))!==0?0:u}function ng(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function ag(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function vS(){var a=F.p;return a!==0?a:(a=window.event,a===void 0?32:nO(a.type))}function xS(a,s){var u=F.p;try{return F.p=a,s()}finally{F.p=u}}var ai=Math.random().toString(36).slice(2),Zt="__reactFiber$"+ai,Cr="__reactProps$"+ai,_o="__reactContainer$"+ai,ig="__reactEvents$"+ai,kL="__reactListeners$"+ai,LL="__reactHandles$"+ai,bS="__reactResources$"+ai,pu="__reactMarker$"+ai;function sg(a){delete a[Zt],delete a[Cr],delete a[ig],delete a[kL],delete a[LL]}function Oo(a){var s=a[Zt];if(s)return s;for(var u=a.parentNode;u;){if(s=u[_o]||u[Zt]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=U_(a);a!==null;){if(u=a[Zt])return u;a=U_(a)}return s}a=u,u=a.parentNode}return null}function Eo(a){if(a=a[Zt]||a[_o]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function gu(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(n(33))}function Ao(a){var s=a[bS];return s||(s=a[bS]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function qt(a){a[pu]=!0}var jS=new Set,wS={};function ss(a,s){To(a,s),To(a+"Capture",s)}function To(a,s){for(wS[a]=s,a=0;a<s.length;a++)jS.add(s[a])}var $L=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]*$"),SS={},NS={};function IL(a){return Pn.call(NS,a)?!0:Pn.call(SS,a)?!1:$L.test(a)?NS[a]=!0:(SS[a]=!0,!1)}function qd(a,s,u){if(IL(s))if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var m=s.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+u)}}function Fd(a,s,u){if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+u)}}function pa(a,s,u,m){if(m===null)a.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(s,u,""+m)}}function un(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function _S(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function zL(a,s,u){var m=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var v=m.get,j=m.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return v.call(this)},set:function(O){u=""+O,j.call(this,O)}}),Object.defineProperty(a,s,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(O){u=""+O},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function og(a){if(!a._valueTracker){var s=_S(a)?"checked":"value";a._valueTracker=zL(a,s,""+a[s])}}function OS(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),m="";return a&&(m=_S(a)?a.checked?"true":"false":a.value),a=m,a!==u?(s.setValue(a),!0):!1}function Hd(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var BL=/[\n"\\]/g;function cn(a){return a.replace(BL,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function lg(a,s,u,m,v,j,O,P){a.name="",O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?a.type=O:a.removeAttribute("type"),s!=null?O==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+un(s)):a.value!==""+un(s)&&(a.value=""+un(s)):O!=="submit"&&O!=="reset"||a.removeAttribute("value"),s!=null?ug(a,O,un(s)):u!=null?ug(a,O,un(u)):m!=null&&a.removeAttribute("value"),v==null&&j!=null&&(a.defaultChecked=!!j),v!=null&&(a.checked=v&&typeof v!="function"&&typeof v!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.name=""+un(P):a.removeAttribute("name")}function ES(a,s,u,m,v,j,O,P){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(a.type=j),s!=null||u!=null){if(!(j!=="submit"&&j!=="reset"||s!=null)){og(a);return}u=u!=null?""+un(u):"",s=s!=null?""+un(s):u,P||s===a.value||(a.value=s),a.defaultValue=s}m=m??v,m=typeof m!="function"&&typeof m!="symbol"&&!!m,a.checked=P?a.checked:!!m,a.defaultChecked=!!m,O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(a.name=O),og(a)}function ug(a,s,u){s==="number"&&Hd(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Co(a,s,u,m){if(a=a.options,s){s={};for(var v=0;v<u.length;v++)s["$"+u[v]]=!0;for(u=0;u<a.length;u++)v=s.hasOwnProperty("$"+a[u].value),a[u].selected!==v&&(a[u].selected=v),v&&m&&(a[u].defaultSelected=!0)}else{for(u=""+un(u),s=null,v=0;v<a.length;v++){if(a[v].value===u){a[v].selected=!0,m&&(a[v].defaultSelected=!0);return}s!==null||a[v].disabled||(s=a[v])}s!==null&&(s.selected=!0)}}function AS(a,s,u){if(s!=null&&(s=""+un(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+un(u):""}function TS(a,s,u,m){if(s==null){if(m!=null){if(u!=null)throw Error(n(92));if(G(m)){if(1<m.length)throw Error(n(93));m=m[0]}u=m}u==null&&(u=""),s=u}u=un(s),a.defaultValue=u,m=a.textContent,m===u&&m!==""&&m!==null&&(a.value=m),og(a)}function Po(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var UL=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 CS(a,s,u){var m=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":m?a.setProperty(s,u):typeof u!="number"||u===0||UL.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function PS(a,s,u){if(s!=null&&typeof s!="object")throw Error(n(62));if(a=a.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||s!=null&&s.hasOwnProperty(m)||(m.indexOf("--")===0?a.setProperty(m,""):m==="float"?a.cssFloat="":a[m]="");for(var v in s)m=s[v],s.hasOwnProperty(v)&&u[v]!==m&&CS(a,v,m)}else for(var j in s)s.hasOwnProperty(j)&&CS(a,j,s[j])}function cg(a){if(a.indexOf("-")===-1)return!1;switch(a){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 qL=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"]]),FL=/^[\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 Kd(a){return FL.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ga(){}var dg=null;function fg(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Ro=null,Mo=null;function RS(a){var s=Eo(a);if(s&&(a=s.stateNode)){var u=a[Cr]||null;e:switch(a=s.stateNode,s.type){case"input":if(lg(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+cn(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var m=u[s];if(m!==a&&m.form===a.form){var v=m[Cr]||null;if(!v)throw Error(n(90));lg(m,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<u.length;s++)m=u[s],m.form===a.form&&OS(m)}break e;case"textarea":AS(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Co(a,!!u.multiple,s,!1)}}}var hg=!1;function MS(a,s,u){if(hg)return a(s,u);hg=!0;try{var m=a(s);return m}finally{if(hg=!1,(Ro!==null||Mo!==null)&&(Mf(),Ro&&(s=Ro,a=Mo,Mo=Ro=null,RS(s),a)))for(s=0;s<a.length;s++)RS(a[s])}}function yu(a,s){var u=a.stateNode;if(u===null)return null;var m=u[Cr]||null;if(m===null)return null;u=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(a=a.type,m=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!m;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var ya=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mg=!1;if(ya)try{var vu={};Object.defineProperty(vu,"passive",{get:function(){mg=!0}}),window.addEventListener("test",vu,vu),window.removeEventListener("test",vu,vu)}catch{mg=!1}var ii=null,pg=null,Gd=null;function DS(){if(Gd)return Gd;var a,s=pg,u=s.length,m,v="value"in ii?ii.value:ii.textContent,j=v.length;for(a=0;a<u&&s[a]===v[a];a++);var O=u-a;for(m=1;m<=O&&s[u-m]===v[j-m];m++);return Gd=v.slice(a,1<m?1-m:void 0)}function Yd(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function Vd(){return!0}function kS(){return!1}function Pr(a){function s(u,m,v,j,O){this._reactName=u,this._targetInst=v,this.type=m,this.nativeEvent=j,this.target=O,this.currentTarget=null;for(var P in a)a.hasOwnProperty(P)&&(u=a[P],this[P]=u?u(j):j[P]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?Vd:kS,this.isPropagationStopped=kS,this}return g(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Vd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Vd)},persist:function(){},isPersistent:Vd}),s}var os={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qd=Pr(os),xu=g({},os,{view:0,detail:0}),HL=Pr(xu),gg,yg,bu,Xd=g({},xu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xg,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==bu&&(bu&&a.type==="mousemove"?(gg=a.screenX-bu.screenX,yg=a.screenY-bu.screenY):yg=gg=0,bu=a),gg)},movementY:function(a){return"movementY"in a?a.movementY:yg}}),LS=Pr(Xd),KL=g({},Xd,{dataTransfer:0}),GL=Pr(KL),YL=g({},xu,{relatedTarget:0}),vg=Pr(YL),VL=g({},os,{animationName:0,elapsedTime:0,pseudoElement:0}),QL=Pr(VL),XL=g({},os,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),WL=Pr(XL),ZL=g({},os,{data:0}),$S=Pr(ZL),JL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},e$={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"},t$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function r$(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=t$[a])?!!s[a]:!1}function xg(){return r$}var n$=g({},xu,{key:function(a){if(a.key){var s=JL[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Yd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?e$[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xg,charCode:function(a){return a.type==="keypress"?Yd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Yd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),a$=Pr(n$),i$=g({},Xd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),IS=Pr(i$),s$=g({},xu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xg}),o$=Pr(s$),l$=g({},os,{propertyName:0,elapsedTime:0,pseudoElement:0}),u$=Pr(l$),c$=g({},Xd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),d$=Pr(c$),f$=g({},os,{newState:0,oldState:0}),h$=Pr(f$),m$=[9,13,27,32],bg=ya&&"CompositionEvent"in window,ju=null;ya&&"documentMode"in document&&(ju=document.documentMode);var p$=ya&&"TextEvent"in window&&!ju,zS=ya&&(!bg||ju&&8<ju&&11>=ju),BS=" ",US=!1;function qS(a,s){switch(a){case"keyup":return m$.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FS(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Do=!1;function g$(a,s){switch(a){case"compositionend":return FS(s);case"keypress":return s.which!==32?null:(US=!0,BS);case"textInput":return a=s.data,a===BS&&US?null:a;default:return null}}function y$(a,s){if(Do)return a==="compositionend"||!bg&&qS(a,s)?(a=DS(),Gd=pg=ii=null,Do=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return zS&&s.locale!=="ko"?null:s.data;default:return null}}var v$={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 HS(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!v$[a.type]:s==="textarea"}function KS(a,s,u,m){Ro?Mo?Mo.push(m):Mo=[m]:Ro=m,s=Bf(s,"onChange"),0<s.length&&(u=new Qd("onChange","change",null,u,m),a.push({event:u,listeners:s}))}var wu=null,Su=null;function x$(a){E_(a,0)}function Wd(a){var s=gu(a);if(OS(s))return a}function GS(a,s){if(a==="change")return s}var YS=!1;if(ya){var jg;if(ya){var wg="oninput"in document;if(!wg){var VS=document.createElement("div");VS.setAttribute("oninput","return;"),wg=typeof VS.oninput=="function"}jg=wg}else jg=!1;YS=jg&&(!document.documentMode||9<document.documentMode)}function QS(){wu&&(wu.detachEvent("onpropertychange",XS),Su=wu=null)}function XS(a){if(a.propertyName==="value"&&Wd(Su)){var s=[];KS(s,Su,a,fg(a)),MS(x$,s)}}function b$(a,s,u){a==="focusin"?(QS(),wu=s,Su=u,wu.attachEvent("onpropertychange",XS)):a==="focusout"&&QS()}function j$(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Wd(Su)}function w$(a,s){if(a==="click")return Wd(s)}function S$(a,s){if(a==="input"||a==="change")return Wd(s)}function N$(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Gr=typeof Object.is=="function"?Object.is:N$;function Nu(a,s){if(Gr(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),m=Object.keys(s);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var v=u[m];if(!Pn.call(s,v)||!Gr(a[v],s[v]))return!1}return!0}function WS(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function ZS(a,s){var u=WS(a);a=0;for(var m;u;){if(u.nodeType===3){if(m=a+u.textContent.length,a<=s&&m>=s)return{node:u,offset:s-a};a=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=WS(u)}}function JS(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?JS(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function e1(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=Hd(a.document);s instanceof a.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)a=s.contentWindow;else break;s=Hd(a.document)}return s}function Sg(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var _$=ya&&"documentMode"in document&&11>=document.documentMode,ko=null,Ng=null,_u=null,_g=!1;function t1(a,s,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;_g||ko==null||ko!==Hd(m)||(m=ko,"selectionStart"in m&&Sg(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),_u&&Nu(_u,m)||(_u=m,m=Bf(Ng,"onSelect"),0<m.length&&(s=new Qd("onSelect","select",null,s,u),a.push({event:s,listeners:m}),s.target=ko)))}function ls(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var Lo={animationend:ls("Animation","AnimationEnd"),animationiteration:ls("Animation","AnimationIteration"),animationstart:ls("Animation","AnimationStart"),transitionrun:ls("Transition","TransitionRun"),transitionstart:ls("Transition","TransitionStart"),transitioncancel:ls("Transition","TransitionCancel"),transitionend:ls("Transition","TransitionEnd")},Og={},r1={};ya&&(r1=document.createElement("div").style,"AnimationEvent"in window||(delete Lo.animationend.animation,delete Lo.animationiteration.animation,delete Lo.animationstart.animation),"TransitionEvent"in window||delete Lo.transitionend.transition);function us(a){if(Og[a])return Og[a];if(!Lo[a])return a;var s=Lo[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in r1)return Og[a]=s[u];return a}var n1=us("animationend"),a1=us("animationiteration"),i1=us("animationstart"),O$=us("transitionrun"),E$=us("transitionstart"),A$=us("transitioncancel"),s1=us("transitionend"),o1=new Map,Eg="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(" ");Eg.push("scrollEnd");function Rn(a,s){o1.set(a,s),ss(s,[a])}var Zd=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},dn=[],$o=0,Ag=0;function Jd(){for(var a=$o,s=Ag=$o=0;s<a;){var u=dn[s];dn[s++]=null;var m=dn[s];dn[s++]=null;var v=dn[s];dn[s++]=null;var j=dn[s];if(dn[s++]=null,m!==null&&v!==null){var O=m.pending;O===null?v.next=v:(v.next=O.next,O.next=v),m.pending=v}j!==0&&l1(u,v,j)}}function ef(a,s,u,m){dn[$o++]=a,dn[$o++]=s,dn[$o++]=u,dn[$o++]=m,Ag|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function Tg(a,s,u,m){return ef(a,s,u,m),tf(a)}function cs(a,s){return ef(a,null,null,s),tf(a)}function l1(a,s,u){a.lanes|=u;var m=a.alternate;m!==null&&(m.lanes|=u);for(var v=!1,j=a.return;j!==null;)j.childLanes|=u,m=j.alternate,m!==null&&(m.childLanes|=u),j.tag===22&&(a=j.stateNode,a===null||a._visibility&1||(v=!0)),a=j,j=j.return;return a.tag===3?(j=a.stateNode,v&&s!==null&&(v=31-Kr(u),a=j.hiddenUpdates,m=a[v],m===null?a[v]=[s]:m.push(s),s.lane=u|536870912),j):null}function tf(a){if(50<Yu)throw Yu=0,Iy=null,Error(n(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var Io={};function T$(a,s,u,m){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(a,s,u,m){return new T$(a,s,u,m)}function Cg(a){return a=a.prototype,!(!a||!a.isReactComponent)}function va(a,s){var u=a.alternate;return u===null?(u=Yr(a.tag,s,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=s,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,s=a.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function u1(a,s){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,s=u.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function rf(a,s,u,m,v,j){var O=0;if(m=a,typeof a=="function")Cg(a)&&(O=1);else if(typeof a=="string")O=DI(a,u,ue.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case z:return a=Yr(31,u,s,v),a.elementType=z,a.lanes=j,a;case w:return ds(u.children,v,j,s);case N:O=8,v|=24;break;case _:return a=Yr(12,u,s,v|2),a.elementType=_,a.lanes=j,a;case C:return a=Yr(13,u,s,v),a.elementType=C,a.lanes=j,a;case R:return a=Yr(19,u,s,v),a.elementType=R,a.lanes=j,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case T:O=10;break e;case E:O=9;break e;case A:O=11;break e;case D:O=14;break e;case M:O=16,m=null;break e}O=29,u=Error(n(130,a===null?"null":typeof a,"")),m=null}return s=Yr(O,u,s,v),s.elementType=a,s.type=m,s.lanes=j,s}function ds(a,s,u,m){return a=Yr(7,a,m,s),a.lanes=u,a}function Pg(a,s,u){return a=Yr(6,a,null,s),a.lanes=u,a}function c1(a){var s=Yr(18,null,null,0);return s.stateNode=a,s}function Rg(a,s,u){return s=Yr(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var d1=new WeakMap;function fn(a,s){if(typeof a=="object"&&a!==null){var u=d1.get(a);return u!==void 0?u:(s={value:a,source:s,stack:ma(s)},d1.set(a,s),s)}return{value:a,source:s,stack:ma(s)}}var zo=[],Bo=0,nf=null,Ou=0,hn=[],mn=0,si=null,Gn=1,Yn="";function xa(a,s){zo[Bo++]=Ou,zo[Bo++]=nf,nf=a,Ou=s}function f1(a,s,u){hn[mn++]=Gn,hn[mn++]=Yn,hn[mn++]=si,si=a;var m=Gn;a=Yn;var v=32-Kr(m)-1;m&=~(1<<v),u+=1;var j=32-Kr(s)+v;if(30<j){var O=v-v%5;j=(m&(1<<O)-1).toString(32),m>>=O,v-=O,Gn=1<<32-Kr(s)+v|u<<v|m,Yn=j+a}else Gn=1<<j|u<<v|m,Yn=a}function Mg(a){a.return!==null&&(xa(a,1),f1(a,1,0))}function Dg(a){for(;a===nf;)nf=zo[--Bo],zo[Bo]=null,Ou=zo[--Bo],zo[Bo]=null;for(;a===si;)si=hn[--mn],hn[mn]=null,Yn=hn[--mn],hn[mn]=null,Gn=hn[--mn],hn[mn]=null}function h1(a,s){hn[mn++]=Gn,hn[mn++]=Yn,hn[mn++]=si,Gn=s.id,Yn=s.overflow,si=a}var Jt=null,it=null,$e=!1,oi=null,pn=!1,kg=Error(n(519));function li(a){var s=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Eu(fn(s,a)),kg}function m1(a){var s=a.stateNode,u=a.type,m=a.memoizedProps;switch(s[Zt]=a,s[Cr]=m,u){case"dialog":Re("cancel",s),Re("close",s);break;case"iframe":case"object":case"embed":Re("load",s);break;case"video":case"audio":for(u=0;u<Qu.length;u++)Re(Qu[u],s);break;case"source":Re("error",s);break;case"img":case"image":case"link":Re("error",s),Re("load",s);break;case"details":Re("toggle",s);break;case"input":Re("invalid",s),ES(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Re("invalid",s);break;case"textarea":Re("invalid",s),TS(s,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||m.suppressHydrationWarning===!0||P_(s.textContent,u)?(m.popover!=null&&(Re("beforetoggle",s),Re("toggle",s)),m.onScroll!=null&&Re("scroll",s),m.onScrollEnd!=null&&Re("scrollend",s),m.onClick!=null&&(s.onclick=ga),s=!0):s=!1,s||li(a,!0)}function p1(a){for(Jt=a.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:pn=!1;return;case 27:case 3:pn=!0;return;default:Jt=Jt.return}}function Uo(a){if(a!==Jt)return!1;if(!$e)return p1(a),$e=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||Jy(a.type,a.memoizedProps)),u=!u),u&&it&&li(a),p1(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=B_(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=B_(a)}else s===27?(s=it,wi(a.type)?(a=av,av=null,it=a):it=s):it=Jt?yn(a.stateNode.nextSibling):null;return!0}function fs(){it=Jt=null,$e=!1}function Lg(){var a=oi;return a!==null&&(kr===null?kr=a:kr.push.apply(kr,a),oi=null),a}function Eu(a){oi===null?oi=[a]:oi.push(a)}var $g=$(null),hs=null,ba=null;function ui(a,s,u){le($g,s._currentValue),s._currentValue=u}function ja(a){a._currentValue=$g.current,X($g)}function Ig(a,s,u){for(;a!==null;){var m=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),a===u)break;a=a.return}}function zg(a,s,u,m){var v=a.child;for(v!==null&&(v.return=a);v!==null;){var j=v.dependencies;if(j!==null){var O=v.child;j=j.firstContext;e:for(;j!==null;){var P=j;j=v;for(var I=0;I<s.length;I++)if(P.context===s[I]){j.lanes|=u,P=j.alternate,P!==null&&(P.lanes|=u),Ig(j.return,u,a),m||(O=null);break e}j=P.next}}else if(v.tag===18){if(O=v.return,O===null)throw Error(n(341));O.lanes|=u,j=O.alternate,j!==null&&(j.lanes|=u),Ig(O,u,a),O=null}else O=v.child;if(O!==null)O.return=v;else for(O=v;O!==null;){if(O===a){O=null;break}if(v=O.sibling,v!==null){v.return=O.return,O=v;break}O=O.return}v=O}}function qo(a,s,u,m){a=null;for(var v=s,j=!1;v!==null;){if(!j){if((v.flags&524288)!==0)j=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var O=v.alternate;if(O===null)throw Error(n(387));if(O=O.memoizedProps,O!==null){var P=v.type;Gr(v.pendingProps.value,O.value)||(a!==null?a.push(P):a=[P])}}else if(v===we.current){if(O=v.alternate,O===null)throw Error(n(387));O.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(a!==null?a.push(ec):a=[ec])}v=v.return}a!==null&&zg(s,a,u,m),s.flags|=262144}function af(a){for(a=a.firstContext;a!==null;){if(!Gr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function ms(a){hs=a,ba=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function er(a){return g1(hs,a)}function sf(a,s){return hs===null&&ms(a),g1(a,s)}function g1(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},ba===null){if(a===null)throw Error(n(308));ba=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else ba=ba.next=s;return u}var C$=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(u,m){a.push(m)}};this.abort=function(){s.aborted=!0,a.forEach(function(u){return u()})}},P$=e.unstable_scheduleCallback,R$=e.unstable_NormalPriority,Ct={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bg(){return{controller:new C$,data:new Map,refCount:0}}function Au(a){a.refCount--,a.refCount===0&&P$(R$,function(){a.controller.abort()})}var Tu=null,Ug=0,Fo=0,Ho=null;function M$(a,s){if(Tu===null){var u=Tu=[];Ug=0,Fo=Hy(),Ho={status:"pending",value:void 0,then:function(m){u.push(m)}}}return Ug++,s.then(y1,y1),s}function y1(){if(--Ug===0&&Tu!==null){Ho!==null&&(Ho.status="fulfilled");var a=Tu;Tu=null,Fo=0,Ho=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function D$(a,s){var u=[],m={status:"pending",value:null,reason:null,then:function(v){u.push(v)}};return a.then(function(){m.status="fulfilled",m.value=s;for(var v=0;v<u.length;v++)(0,u[v])(s)},function(v){for(m.status="rejected",m.reason=v,v=0;v<u.length;v++)(0,u[v])(void 0)}),m}var v1=L.S;L.S=function(a,s){t_=Ce(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&M$(a,s),v1!==null&&v1(a,s)};var ps=$(null);function qg(){var a=ps.current;return a!==null?a:rt.pooledCache}function of(a,s){s===null?le(ps,ps.current):le(ps,s.pool)}function x1(){var a=qg();return a===null?null:{parent:Ct._currentValue,pool:a}}var Ko=Error(n(460)),Fg=Error(n(474)),lf=Error(n(542)),uf={then:function(){}};function b1(a){return a=a.status,a==="fulfilled"||a==="rejected"}function j1(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then(ga,ga),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,S1(a),a;default:if(typeof s.status=="string")s.then(ga,ga);else{if(a=rt,a!==null&&100<a.shellSuspendCounter)throw Error(n(482));a=s,a.status="pending",a.then(function(m){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=m}},function(m){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,S1(a),a}throw ys=s,Ko}}function gs(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ys=u,Ko):u}}var ys=null;function w1(){if(ys===null)throw Error(n(459));var a=ys;return ys=null,a}function S1(a){if(a===Ko||a===lf)throw Error(n(483))}var Go=null,Cu=0;function cf(a){var s=Cu;return Cu+=1,Go===null&&(Go=[]),j1(Go,a,s)}function Pu(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function df(a,s){throw s.$$typeof===y?Error(n(525)):(a=Object.prototype.toString.call(s),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function N1(a){function s(K,B){if(a){var Y=K.deletions;Y===null?(K.deletions=[B],K.flags|=16):Y.push(B)}}function u(K,B){if(!a)return null;for(;B!==null;)s(K,B),B=B.sibling;return null}function m(K){for(var B=new Map;K!==null;)K.key!==null?B.set(K.key,K):B.set(K.index,K),K=K.sibling;return B}function v(K,B){return K=va(K,B),K.index=0,K.sibling=null,K}function j(K,B,Y){return K.index=Y,a?(Y=K.alternate,Y!==null?(Y=Y.index,Y<B?(K.flags|=67108866,B):Y):(K.flags|=67108866,B)):(K.flags|=1048576,B)}function O(K){return a&&K.alternate===null&&(K.flags|=67108866),K}function P(K,B,Y,ie){return B===null||B.tag!==6?(B=Pg(Y,K.mode,ie),B.return=K,B):(B=v(B,Y),B.return=K,B)}function I(K,B,Y,ie){var be=Y.type;return be===w?ne(K,B,Y.props.children,ie,Y.key):B!==null&&(B.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===M&&gs(be)===B.type)?(B=v(B,Y.props),Pu(B,Y),B.return=K,B):(B=rf(Y.type,Y.key,Y.props,null,K.mode,ie),Pu(B,Y),B.return=K,B)}function V(K,B,Y,ie){return B===null||B.tag!==4||B.stateNode.containerInfo!==Y.containerInfo||B.stateNode.implementation!==Y.implementation?(B=Rg(Y,K.mode,ie),B.return=K,B):(B=v(B,Y.children||[]),B.return=K,B)}function ne(K,B,Y,ie,be){return B===null||B.tag!==7?(B=ds(Y,K.mode,ie,be),B.return=K,B):(B=v(B,Y),B.return=K,B)}function se(K,B,Y){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return B=Pg(""+B,K.mode,Y),B.return=K,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case x:return Y=rf(B.type,B.key,B.props,null,K.mode,Y),Pu(Y,B),Y.return=K,Y;case b:return B=Rg(B,K.mode,Y),B.return=K,B;case M:return B=gs(B),se(K,B,Y)}if(G(B)||U(B))return B=ds(B,K.mode,Y,null),B.return=K,B;if(typeof B.then=="function")return se(K,cf(B),Y);if(B.$$typeof===T)return se(K,sf(K,B),Y);df(K,B)}return null}function W(K,B,Y,ie){var be=B!==null?B.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return be!==null?null:P(K,B,""+Y,ie);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case x:return Y.key===be?I(K,B,Y,ie):null;case b:return Y.key===be?V(K,B,Y,ie):null;case M:return Y=gs(Y),W(K,B,Y,ie)}if(G(Y)||U(Y))return be!==null?null:ne(K,B,Y,ie,null);if(typeof Y.then=="function")return W(K,B,cf(Y),ie);if(Y.$$typeof===T)return W(K,B,sf(K,Y),ie);df(K,Y)}return null}function ee(K,B,Y,ie,be){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return K=K.get(Y)||null,P(B,K,""+ie,be);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case x:return K=K.get(ie.key===null?Y:ie.key)||null,I(B,K,ie,be);case b:return K=K.get(ie.key===null?Y:ie.key)||null,V(B,K,ie,be);case M:return ie=gs(ie),ee(K,B,Y,ie,be)}if(G(ie)||U(ie))return K=K.get(Y)||null,ne(B,K,ie,be,null);if(typeof ie.then=="function")return ee(K,B,Y,cf(ie),be);if(ie.$$typeof===T)return ee(K,B,Y,sf(B,ie),be);df(B,ie)}return null}function me(K,B,Y,ie){for(var be=null,qe=null,ye=B,Te=B=0,ke=null;ye!==null&&Te<Y.length;Te++){ye.index>Te?(ke=ye,ye=null):ke=ye.sibling;var Fe=W(K,ye,Y[Te],ie);if(Fe===null){ye===null&&(ye=ke);break}a&&ye&&Fe.alternate===null&&s(K,ye),B=j(Fe,B,Te),qe===null?be=Fe:qe.sibling=Fe,qe=Fe,ye=ke}if(Te===Y.length)return u(K,ye),$e&&xa(K,Te),be;if(ye===null){for(;Te<Y.length;Te++)ye=se(K,Y[Te],ie),ye!==null&&(B=j(ye,B,Te),qe===null?be=ye:qe.sibling=ye,qe=ye);return $e&&xa(K,Te),be}for(ye=m(ye);Te<Y.length;Te++)ke=ee(ye,K,Te,Y[Te],ie),ke!==null&&(a&&ke.alternate!==null&&ye.delete(ke.key===null?Te:ke.key),B=j(ke,B,Te),qe===null?be=ke:qe.sibling=ke,qe=ke);return a&&ye.forEach(function(Ei){return s(K,Ei)}),$e&&xa(K,Te),be}function Se(K,B,Y,ie){if(Y==null)throw Error(n(151));for(var be=null,qe=null,ye=B,Te=B=0,ke=null,Fe=Y.next();ye!==null&&!Fe.done;Te++,Fe=Y.next()){ye.index>Te?(ke=ye,ye=null):ke=ye.sibling;var Ei=W(K,ye,Fe.value,ie);if(Ei===null){ye===null&&(ye=ke);break}a&&ye&&Ei.alternate===null&&s(K,ye),B=j(Ei,B,Te),qe===null?be=Ei:qe.sibling=Ei,qe=Ei,ye=ke}if(Fe.done)return u(K,ye),$e&&xa(K,Te),be;if(ye===null){for(;!Fe.done;Te++,Fe=Y.next())Fe=se(K,Fe.value,ie),Fe!==null&&(B=j(Fe,B,Te),qe===null?be=Fe:qe.sibling=Fe,qe=Fe);return $e&&xa(K,Te),be}for(ye=m(ye);!Fe.done;Te++,Fe=Y.next())Fe=ee(ye,K,Te,Fe.value,ie),Fe!==null&&(a&&Fe.alternate!==null&&ye.delete(Fe.key===null?Te:Fe.key),B=j(Fe,B,Te),qe===null?be=Fe:qe.sibling=Fe,qe=Fe);return a&&ye.forEach(function(KI){return s(K,KI)}),$e&&xa(K,Te),be}function et(K,B,Y,ie){if(typeof Y=="object"&&Y!==null&&Y.type===w&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case x:e:{for(var be=Y.key;B!==null;){if(B.key===be){if(be=Y.type,be===w){if(B.tag===7){u(K,B.sibling),ie=v(B,Y.props.children),ie.return=K,K=ie;break e}}else if(B.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===M&&gs(be)===B.type){u(K,B.sibling),ie=v(B,Y.props),Pu(ie,Y),ie.return=K,K=ie;break e}u(K,B);break}else s(K,B);B=B.sibling}Y.type===w?(ie=ds(Y.props.children,K.mode,ie,Y.key),ie.return=K,K=ie):(ie=rf(Y.type,Y.key,Y.props,null,K.mode,ie),Pu(ie,Y),ie.return=K,K=ie)}return O(K);case b:e:{for(be=Y.key;B!==null;){if(B.key===be)if(B.tag===4&&B.stateNode.containerInfo===Y.containerInfo&&B.stateNode.implementation===Y.implementation){u(K,B.sibling),ie=v(B,Y.children||[]),ie.return=K,K=ie;break e}else{u(K,B);break}else s(K,B);B=B.sibling}ie=Rg(Y,K.mode,ie),ie.return=K,K=ie}return O(K);case M:return Y=gs(Y),et(K,B,Y,ie)}if(G(Y))return me(K,B,Y,ie);if(U(Y)){if(be=U(Y),typeof be!="function")throw Error(n(150));return Y=be.call(Y),Se(K,B,Y,ie)}if(typeof Y.then=="function")return et(K,B,cf(Y),ie);if(Y.$$typeof===T)return et(K,B,sf(K,Y),ie);df(K,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,B!==null&&B.tag===6?(u(K,B.sibling),ie=v(B,Y),ie.return=K,K=ie):(u(K,B),ie=Pg(Y,K.mode,ie),ie.return=K,K=ie),O(K)):u(K,B)}return function(K,B,Y,ie){try{Cu=0;var be=et(K,B,Y,ie);return Go=null,be}catch(ye){if(ye===Ko||ye===lf)throw ye;var qe=Yr(29,ye,null,K.mode);return qe.lanes=ie,qe.return=K,qe}finally{}}}var vs=N1(!0),_1=N1(!1),ci=!1;function Hg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kg(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function di(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function fi(a,s,u){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(Ge&2)!==0){var v=m.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),m.pending=s,s=tf(a),l1(a,null,u),s}return ef(a,m,s,u),tf(a)}function Ru(a,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,gS(a,u)}}function Gg(a,s){var u=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var v=null,j=null;if(u=u.firstBaseUpdate,u!==null){do{var O={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};j===null?v=j=O:j=j.next=O,u=u.next}while(u!==null);j===null?v=j=s:j=j.next=s}else v=j=s;u={baseState:m.baseState,firstBaseUpdate:v,lastBaseUpdate:j,shared:m.shared,callbacks:m.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=s}var Yg=!1;function Mu(){if(Yg){var a=Ho;if(a!==null)throw a}}function Du(a,s,u,m){Yg=!1;var v=a.updateQueue;ci=!1;var j=v.firstBaseUpdate,O=v.lastBaseUpdate,P=v.shared.pending;if(P!==null){v.shared.pending=null;var I=P,V=I.next;I.next=null,O===null?j=V:O.next=V,O=I;var ne=a.alternate;ne!==null&&(ne=ne.updateQueue,P=ne.lastBaseUpdate,P!==O&&(P===null?ne.firstBaseUpdate=V:P.next=V,ne.lastBaseUpdate=I))}if(j!==null){var se=v.baseState;O=0,ne=V=I=null,P=j;do{var W=P.lane&-536870913,ee=W!==P.lane;if(ee?(De&W)===W:(m&W)===W){W!==0&&W===Fo&&(Yg=!0),ne!==null&&(ne=ne.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var me=a,Se=P;W=s;var et=u;switch(Se.tag){case 1:if(me=Se.payload,typeof me=="function"){se=me.call(et,se,W);break e}se=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=Se.payload,W=typeof me=="function"?me.call(et,se,W):me,W==null)break e;se=g({},se,W);break e;case 2:ci=!0}}W=P.callback,W!==null&&(a.flags|=64,ee&&(a.flags|=8192),ee=v.callbacks,ee===null?v.callbacks=[W]:ee.push(W))}else ee={lane:W,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ne===null?(V=ne=ee,I=se):ne=ne.next=ee,O|=W;if(P=P.next,P===null){if(P=v.shared.pending,P===null)break;ee=P,P=ee.next,ee.next=null,v.lastBaseUpdate=ee,v.shared.pending=null}}while(!0);ne===null&&(I=se),v.baseState=I,v.firstBaseUpdate=V,v.lastBaseUpdate=ne,j===null&&(v.shared.lanes=0),yi|=O,a.lanes=O,a.memoizedState=se}}function O1(a,s){if(typeof a!="function")throw Error(n(191,a));a.call(s)}function E1(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)O1(u[a],s)}var Yo=$(null),ff=$(0);function A1(a,s){a=Ca,le(ff,a),le(Yo,s),Ca=a|s.baseLanes}function Vg(){le(ff,Ca),le(Yo,Yo.current)}function Qg(){Ca=ff.current,X(Yo),X(ff)}var Vr=$(null),gn=null;function hi(a){var s=a.alternate;le(wt,wt.current&1),le(Vr,a),gn===null&&(s===null||Yo.current!==null||s.memoizedState!==null)&&(gn=a)}function Xg(a){le(wt,wt.current),le(Vr,a),gn===null&&(gn=a)}function T1(a){a.tag===22?(le(wt,wt.current),le(Vr,a),gn===null&&(gn=a)):mi()}function mi(){le(wt,wt.current),le(Vr,Vr.current)}function Qr(a){X(Vr),gn===a&&(gn=null),X(wt)}var wt=$(0);function hf(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||rv(u)||nv(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var wa=0,Ae=null,Ze=null,Pt=null,mf=!1,Vo=!1,xs=!1,pf=0,ku=0,Qo=null,k$=0;function gt(){throw Error(n(321))}function Wg(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!Gr(a[u],s[u]))return!1;return!0}function Zg(a,s,u,m,v,j){return wa=j,Ae=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,L.H=a===null||a.memoizedState===null?fN:hy,xs=!1,j=u(m,v),xs=!1,Vo&&(j=P1(s,u,m,v)),C1(a),j}function C1(a){L.H=Iu;var s=Ze!==null&&Ze.next!==null;if(wa=0,Pt=Ze=Ae=null,mf=!1,ku=0,Qo=null,s)throw Error(n(300));a===null||Rt||(a=a.dependencies,a!==null&&af(a)&&(Rt=!0))}function P1(a,s,u,m){Ae=a;var v=0;do{if(Vo&&(Qo=null),ku=0,Vo=!1,25<=v)throw Error(n(301));if(v+=1,Pt=Ze=null,a.updateQueue!=null){var j=a.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}L.H=hN,j=s(u,m)}while(Vo);return j}function L$(){var a=L.H,s=a.useState()[0];return s=typeof s.then=="function"?Lu(s):s,a=a.useState()[0],(Ze!==null?Ze.memoizedState:null)!==a&&(Ae.flags|=1024),s}function Jg(){var a=pf!==0;return pf=0,a}function ey(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function ty(a){if(mf){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}mf=!1}wa=0,Pt=Ze=Ae=null,Vo=!1,ku=pf=0,Qo=null}function wr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pt===null?Ae.memoizedState=Pt=a:Pt=Pt.next=a,Pt}function St(){if(Ze===null){var a=Ae.alternate;a=a!==null?a.memoizedState:null}else a=Ze.next;var s=Pt===null?Ae.memoizedState:Pt.next;if(s!==null)Pt=s,Ze=a;else{if(a===null)throw Ae.alternate===null?Error(n(467)):Error(n(310));Ze=a,a={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},Pt===null?Ae.memoizedState=Pt=a:Pt=Pt.next=a}return Pt}function gf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lu(a){var s=ku;return ku+=1,Qo===null&&(Qo=[]),a=j1(Qo,a,s),s=Ae,(Pt===null?s.memoizedState:Pt.next)===null&&(s=s.alternate,L.H=s===null||s.memoizedState===null?fN:hy),a}function yf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Lu(a);if(a.$$typeof===T)return er(a)}throw Error(n(438,String(a)))}function ry(a){var s=null,u=Ae.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var m=Ae.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(s={data:m.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=gf(),Ae.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(a),m=0;m<a;m++)u[m]=k;return s.index++,u}function Sa(a,s){return typeof s=="function"?s(a):s}function vf(a){var s=St();return ny(s,Ze,a)}function ny(a,s,u){var m=a.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=u;var v=a.baseQueue,j=m.pending;if(j!==null){if(v!==null){var O=v.next;v.next=j.next,j.next=O}s.baseQueue=v=j,m.pending=null}if(j=a.baseState,v===null)a.memoizedState=j;else{s=v.next;var P=O=null,I=null,V=s,ne=!1;do{var se=V.lane&-536870913;if(se!==V.lane?(De&se)===se:(wa&se)===se){var W=V.revertLane;if(W===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),se===Fo&&(ne=!0);else if((wa&W)===W){V=V.next,W===Fo&&(ne=!0);continue}else se={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},I===null?(P=I=se,O=j):I=I.next=se,Ae.lanes|=W,yi|=W;se=V.action,xs&&u(j,se),j=V.hasEagerState?V.eagerState:u(j,se)}else W={lane:se,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},I===null?(P=I=W,O=j):I=I.next=W,Ae.lanes|=se,yi|=se;V=V.next}while(V!==null&&V!==s);if(I===null?O=j:I.next=P,!Gr(j,a.memoizedState)&&(Rt=!0,ne&&(u=Ho,u!==null)))throw u;a.memoizedState=j,a.baseState=O,a.baseQueue=I,m.lastRenderedState=j}return v===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function ay(a){var s=St(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=a;var m=u.dispatch,v=u.pending,j=s.memoizedState;if(v!==null){u.pending=null;var O=v=v.next;do j=a(j,O.action),O=O.next;while(O!==v);Gr(j,s.memoizedState)||(Rt=!0),s.memoizedState=j,s.baseQueue===null&&(s.baseState=j),u.lastRenderedState=j}return[j,m]}function R1(a,s,u){var m=Ae,v=St(),j=$e;if(j){if(u===void 0)throw Error(n(407));u=u()}else u=s();var O=!Gr((Ze||v).memoizedState,u);if(O&&(v.memoizedState=u,Rt=!0),v=v.queue,oy(k1.bind(null,m,v,a),[a]),v.getSnapshot!==s||O||Pt!==null&&Pt.memoizedState.tag&1){if(m.flags|=2048,Xo(9,{destroy:void 0},D1.bind(null,m,v,u,s),null),rt===null)throw Error(n(349));j||(wa&127)!==0||M1(m,s,u)}return u}function M1(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Ae.updateQueue,s===null?(s=gf(),Ae.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function D1(a,s,u,m){s.value=u,s.getSnapshot=m,L1(s)&&$1(a)}function k1(a,s,u){return u(function(){L1(s)&&$1(a)})}function L1(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!Gr(a,u)}catch{return!0}}function $1(a){var s=cs(a,2);s!==null&&Lr(s,a,2)}function iy(a){var s=wr();if(typeof a=="function"){var u=a;if(a=u(),xs){ni(!0);try{u()}finally{ni(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:a},s}function I1(a,s,u,m){return a.baseState=u,ny(a,Ze,typeof m=="function"?m:Sa)}function $$(a,s,u,m,v){if(jf(a))throw Error(n(485));if(a=s.action,a!==null){var j={payload:v,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(O){j.listeners.push(O)}};L.T!==null?u(!0):j.isTransition=!1,m(j),u=s.pending,u===null?(j.next=s.pending=j,z1(s,j)):(j.next=u.next,s.pending=u.next=j)}}function z1(a,s){var u=s.action,m=s.payload,v=a.state;if(s.isTransition){var j=L.T,O={};L.T=O;try{var P=u(v,m),I=L.S;I!==null&&I(O,P),B1(a,s,P)}catch(V){sy(a,s,V)}finally{j!==null&&O.types!==null&&(j.types=O.types),L.T=j}}else try{j=u(v,m),B1(a,s,j)}catch(V){sy(a,s,V)}}function B1(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){U1(a,s,m)},function(m){return sy(a,s,m)}):U1(a,s,u)}function U1(a,s,u){s.status="fulfilled",s.value=u,q1(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,z1(a,u)))}function sy(a,s,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=u,q1(s),s=s.next;while(s!==m)}a.action=null}function q1(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function F1(a,s){return s}function H1(a,s){if($e){var u=rt.formState;if(u!==null){e:{var m=Ae;if($e){if(it){t:{for(var v=it,j=pn;v.nodeType!==8;){if(!j){v=null;break t}if(v=yn(v.nextSibling),v===null){v=null;break t}}j=v.data,v=j==="F!"||j==="F"?v:null}if(v){it=yn(v.nextSibling),m=v.data==="F!";break e}}li(m)}m=!1}m&&(s=u[0])}}return u=wr(),u.memoizedState=u.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:F1,lastRenderedState:s},u.queue=m,u=uN.bind(null,Ae,m),m.dispatch=u,m=iy(!1),j=fy.bind(null,Ae,!1,m.queue),m=wr(),v={state:s,dispatch:null,action:a,pending:null},m.queue=v,u=$$.bind(null,Ae,v,j,u),v.dispatch=u,m.memoizedState=a,[s,u,!1]}function K1(a){var s=St();return G1(s,Ze,a)}function G1(a,s,u){if(s=ny(a,s,F1)[0],a=vf(Sa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=Lu(s)}catch(O){throw O===Ko?lf:O}else m=s;s=St();var v=s.queue,j=v.dispatch;return u!==s.memoizedState&&(Ae.flags|=2048,Xo(9,{destroy:void 0},I$.bind(null,v,u),null)),[m,j,a]}function I$(a,s){a.action=s}function Y1(a){var s=St(),u=Ze;if(u!==null)return G1(s,u,a);St(),s=s.memoizedState,u=St();var m=u.queue.dispatch;return u.memoizedState=a,[s,m,!1]}function Xo(a,s,u,m){return a={tag:a,create:u,deps:m,inst:s,next:null},s=Ae.updateQueue,s===null&&(s=gf(),Ae.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=a.next=a:(m=u.next,u.next=a,a.next=m,s.lastEffect=a),a}function V1(){return St().memoizedState}function xf(a,s,u,m){var v=wr();Ae.flags|=a,v.memoizedState=Xo(1|s,{destroy:void 0},u,m===void 0?null:m)}function bf(a,s,u,m){var v=St();m=m===void 0?null:m;var j=v.memoizedState.inst;Ze!==null&&m!==null&&Wg(m,Ze.memoizedState.deps)?v.memoizedState=Xo(s,j,u,m):(Ae.flags|=a,v.memoizedState=Xo(1|s,j,u,m))}function Q1(a,s){xf(8390656,8,a,s)}function oy(a,s){bf(2048,8,a,s)}function z$(a){Ae.flags|=4;var s=Ae.updateQueue;if(s===null)s=gf(),Ae.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function X1(a){var s=St().memoizedState;return z$({ref:s,nextImpl:a}),function(){if((Ge&2)!==0)throw Error(n(440));return s.impl.apply(void 0,arguments)}}function W1(a,s){return bf(4,2,a,s)}function Z1(a,s){return bf(4,4,a,s)}function J1(a,s){if(typeof s=="function"){a=a();var u=s(a);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function eN(a,s,u){u=u!=null?u.concat([a]):null,bf(4,4,J1.bind(null,s,a),u)}function ly(){}function tN(a,s){var u=St();s=s===void 0?null:s;var m=u.memoizedState;return s!==null&&Wg(s,m[1])?m[0]:(u.memoizedState=[a,s],a)}function rN(a,s){var u=St();s=s===void 0?null:s;var m=u.memoizedState;if(s!==null&&Wg(s,m[1]))return m[0];if(m=a(),xs){ni(!0);try{a()}finally{ni(!1)}}return u.memoizedState=[m,s],m}function uy(a,s,u){return u===void 0||(wa&1073741824)!==0&&(De&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=n_(),Ae.lanes|=a,yi|=a,u)}function nN(a,s,u,m){return Gr(u,s)?u:Yo.current!==null?(a=uy(a,u,m),Gr(a,s)||(Rt=!0),a):(wa&42)===0||(wa&1073741824)!==0&&(De&261930)===0?(Rt=!0,a.memoizedState=u):(a=n_(),Ae.lanes|=a,yi|=a,s)}function aN(a,s,u,m,v){var j=F.p;F.p=j!==0&&8>j?j:8;var O=L.T,P={};L.T=P,fy(a,!1,s,u);try{var I=v(),V=L.S;if(V!==null&&V(P,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ne=D$(I,m);$u(a,s,ne,Zr(a))}else $u(a,s,m,Zr(a))}catch(se){$u(a,s,{then:function(){},status:"rejected",reason:se},Zr())}finally{F.p=j,O!==null&&P.types!==null&&(O.types=P.types),L.T=O}}function B$(){}function cy(a,s,u,m){if(a.tag!==5)throw Error(n(476));var v=iN(a).queue;aN(a,v,s,J,u===null?B$:function(){return sN(a),u(m)})}function iN(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:J},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sa,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function sN(a){var s=iN(a);s.next===null&&(s=a.alternate.memoizedState),$u(a,s.next.queue,{},Zr())}function dy(){return er(ec)}function oN(){return St().memoizedState}function lN(){return St().memoizedState}function U$(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Zr();a=di(u);var m=fi(s,a,u);m!==null&&(Lr(m,s,u),Ru(m,s,u)),s={cache:Bg()},a.payload=s;return}s=s.return}}function q$(a,s,u){var m=Zr();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},jf(a)?cN(s,u):(u=Tg(a,s,u,m),u!==null&&(Lr(u,a,m),dN(u,s,m)))}function uN(a,s,u){var m=Zr();$u(a,s,u,m)}function $u(a,s,u,m){var v={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(jf(a))cN(s,v);else{var j=a.alternate;if(a.lanes===0&&(j===null||j.lanes===0)&&(j=s.lastRenderedReducer,j!==null))try{var O=s.lastRenderedState,P=j(O,u);if(v.hasEagerState=!0,v.eagerState=P,Gr(P,O))return ef(a,s,v,0),rt===null&&Jd(),!1}catch{}finally{}if(u=Tg(a,s,v,m),u!==null)return Lr(u,a,m),dN(u,s,m),!0}return!1}function fy(a,s,u,m){if(m={lane:2,revertLane:Hy(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},jf(a)){if(s)throw Error(n(479))}else s=Tg(a,u,m,2),s!==null&&Lr(s,a,2)}function jf(a){var s=a.alternate;return a===Ae||s!==null&&s===Ae}function cN(a,s){Vo=mf=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function dN(a,s,u){if((u&4194048)!==0){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,gS(a,u)}}var Iu={readContext:er,use:yf,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};Iu.useEffectEvent=gt;var fN={readContext:er,use:yf,useCallback:function(a,s){return wr().memoizedState=[a,s===void 0?null:s],a},useContext:er,useEffect:Q1,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,xf(4194308,4,J1.bind(null,s,a),u)},useLayoutEffect:function(a,s){return xf(4194308,4,a,s)},useInsertionEffect:function(a,s){xf(4,2,a,s)},useMemo:function(a,s){var u=wr();s=s===void 0?null:s;var m=a();if(xs){ni(!0);try{a()}finally{ni(!1)}}return u.memoizedState=[m,s],m},useReducer:function(a,s,u){var m=wr();if(u!==void 0){var v=u(s);if(xs){ni(!0);try{u(s)}finally{ni(!1)}}}else v=s;return m.memoizedState=m.baseState=v,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:v},m.queue=a,a=a.dispatch=q$.bind(null,Ae,a),[m.memoizedState,a]},useRef:function(a){var s=wr();return a={current:a},s.memoizedState=a},useState:function(a){a=iy(a);var s=a.queue,u=uN.bind(null,Ae,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:ly,useDeferredValue:function(a,s){var u=wr();return uy(u,a,s)},useTransition:function(){var a=iy(!1);return a=aN.bind(null,Ae,a.queue,!0,!1),wr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var m=Ae,v=wr();if($e){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),rt===null)throw Error(n(349));(De&127)!==0||M1(m,s,u)}v.memoizedState=u;var j={value:u,getSnapshot:s};return v.queue=j,Q1(k1.bind(null,m,j,a),[a]),m.flags|=2048,Xo(9,{destroy:void 0},D1.bind(null,m,j,u,s),null),u},useId:function(){var a=wr(),s=rt.identifierPrefix;if($e){var u=Yn,m=Gn;u=(m&~(1<<32-Kr(m)-1)).toString(32)+u,s="_"+s+"R_"+u,u=pf++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=k$++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:dy,useFormState:H1,useActionState:H1,useOptimistic:function(a){var s=wr();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=fy.bind(null,Ae,!0,u),u.dispatch=s,[a,s]},useMemoCache:ry,useCacheRefresh:function(){return wr().memoizedState=U$.bind(null,Ae)},useEffectEvent:function(a){var s=wr(),u={impl:a};return s.memoizedState=u,function(){if((Ge&2)!==0)throw Error(n(440));return u.impl.apply(void 0,arguments)}}},hy={readContext:er,use:yf,useCallback:tN,useContext:er,useEffect:oy,useImperativeHandle:eN,useInsertionEffect:W1,useLayoutEffect:Z1,useMemo:rN,useReducer:vf,useRef:V1,useState:function(){return vf(Sa)},useDebugValue:ly,useDeferredValue:function(a,s){var u=St();return nN(u,Ze.memoizedState,a,s)},useTransition:function(){var a=vf(Sa)[0],s=St().memoizedState;return[typeof a=="boolean"?a:Lu(a),s]},useSyncExternalStore:R1,useId:oN,useHostTransitionStatus:dy,useFormState:K1,useActionState:K1,useOptimistic:function(a,s){var u=St();return I1(u,Ze,a,s)},useMemoCache:ry,useCacheRefresh:lN};hy.useEffectEvent=X1;var hN={readContext:er,use:yf,useCallback:tN,useContext:er,useEffect:oy,useImperativeHandle:eN,useInsertionEffect:W1,useLayoutEffect:Z1,useMemo:rN,useReducer:ay,useRef:V1,useState:function(){return ay(Sa)},useDebugValue:ly,useDeferredValue:function(a,s){var u=St();return Ze===null?uy(u,a,s):nN(u,Ze.memoizedState,a,s)},useTransition:function(){var a=ay(Sa)[0],s=St().memoizedState;return[typeof a=="boolean"?a:Lu(a),s]},useSyncExternalStore:R1,useId:oN,useHostTransitionStatus:dy,useFormState:Y1,useActionState:Y1,useOptimistic:function(a,s){var u=St();return Ze!==null?I1(u,Ze,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:ry,useCacheRefresh:lN};hN.useEffectEvent=X1;function my(a,s,u,m){s=a.memoizedState,u=u(m,s),u=u==null?s:g({},s,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var py={enqueueSetState:function(a,s,u){a=a._reactInternals;var m=Zr(),v=di(m);v.payload=s,u!=null&&(v.callback=u),s=fi(a,v,m),s!==null&&(Lr(s,a,m),Ru(s,a,m))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var m=Zr(),v=di(m);v.tag=1,v.payload=s,u!=null&&(v.callback=u),s=fi(a,v,m),s!==null&&(Lr(s,a,m),Ru(s,a,m))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Zr(),m=di(u);m.tag=2,s!=null&&(m.callback=s),s=fi(a,m,u),s!==null&&(Lr(s,a,u),Ru(s,a,u))}};function mN(a,s,u,m,v,j,O){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,j,O):s.prototype&&s.prototype.isPureReactComponent?!Nu(u,m)||!Nu(v,j):!0}function pN(a,s,u,m){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,m),s.state!==a&&py.enqueueReplaceState(s,s.state,null)}function bs(a,s){var u=s;if("ref"in s){u={};for(var m in s)m!=="ref"&&(u[m]=s[m])}if(a=a.defaultProps){u===s&&(u=g({},u));for(var v in a)u[v]===void 0&&(u[v]=a[v])}return u}function gN(a){Zd(a)}function yN(a){console.error(a)}function vN(a){Zd(a)}function wf(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function xN(a,s,u){try{var m=a.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function gy(a,s,u){return u=di(u),u.tag=3,u.payload={element:null},u.callback=function(){wf(a,s)},u}function bN(a){return a=di(a),a.tag=3,a}function jN(a,s,u,m){var v=u.type.getDerivedStateFromError;if(typeof v=="function"){var j=m.value;a.payload=function(){return v(j)},a.callback=function(){xN(s,u,m)}}var O=u.stateNode;O!==null&&typeof O.componentDidCatch=="function"&&(a.callback=function(){xN(s,u,m),typeof v!="function"&&(vi===null?vi=new Set([this]):vi.add(this));var P=m.stack;this.componentDidCatch(m.value,{componentStack:P!==null?P:""})})}function F$(a,s,u,m,v){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=u.alternate,s!==null&&qo(s,u,v,!0),u=Vr.current,u!==null){switch(u.tag){case 31:case 13:return gn===null?Df():u.alternate===null&&yt===0&&(yt=3),u.flags&=-257,u.flags|=65536,u.lanes=v,m===uf?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([m]):s.add(m),Uy(a,m,v)),!1;case 22:return u.flags|=65536,m===uf?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([m]):u.add(m)),Uy(a,m,v)),!1}throw Error(n(435,u.tag))}return Uy(a,m,v),Df(),!1}if($e)return s=Vr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,m!==kg&&(a=Error(n(422),{cause:m}),Eu(fn(a,u)))):(m!==kg&&(s=Error(n(423),{cause:m}),Eu(fn(s,u))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,m=fn(m,u),v=gy(a.stateNode,m,v),Gg(a,v),yt!==4&&(yt=2)),!1;var j=Error(n(520),{cause:m});if(j=fn(j,u),Gu===null?Gu=[j]:Gu.push(j),yt!==4&&(yt=2),s===null)return!0;m=fn(m,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=v&-v,u.lanes|=a,a=gy(u.stateNode,m,a),Gg(u,a),!1;case 1:if(s=u.type,j=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(vi===null||!vi.has(j))))return u.flags|=65536,v&=-v,u.lanes|=v,v=bN(v),jN(v,a,u,m),Gg(u,v),!1}u=u.return}while(u!==null);return!1}var yy=Error(n(461)),Rt=!1;function tr(a,s,u,m){s.child=a===null?_1(s,null,u,m):vs(s,a.child,u,m)}function wN(a,s,u,m,v){u=u.render;var j=s.ref;if("ref"in m){var O={};for(var P in m)P!=="ref"&&(O[P]=m[P])}else O=m;return ms(s),m=Zg(a,s,u,O,j,v),P=Jg(),a!==null&&!Rt?(ey(a,s,v),Na(a,s,v)):($e&&P&&Mg(s),s.flags|=1,tr(a,s,m,v),s.child)}function SN(a,s,u,m,v){if(a===null){var j=u.type;return typeof j=="function"&&!Cg(j)&&j.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=j,NN(a,s,j,m,v)):(a=rf(u.type,null,m,s,s.mode,v),a.ref=s.ref,a.return=s,s.child=a)}if(j=a.child,!_y(a,v)){var O=j.memoizedProps;if(u=u.compare,u=u!==null?u:Nu,u(O,m)&&a.ref===s.ref)return Na(a,s,v)}return s.flags|=1,a=va(j,m),a.ref=s.ref,a.return=s,s.child=a}function NN(a,s,u,m,v){if(a!==null){var j=a.memoizedProps;if(Nu(j,m)&&a.ref===s.ref)if(Rt=!1,s.pendingProps=m=j,_y(a,v))(a.flags&131072)!==0&&(Rt=!0);else return s.lanes=a.lanes,Na(a,s,v)}return vy(a,s,u,m,v)}function _N(a,s,u,m){var v=m.children,j=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((s.flags&128)!==0){if(j=j!==null?j.baseLanes|u:u,a!==null){for(m=s.child=a.child,v=0;m!==null;)v=v|m.lanes|m.childLanes,m=m.sibling;m=v&~j}else m=0,s.child=null;return ON(a,s,j,u,m)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&of(s,j!==null?j.cachePool:null),j!==null?A1(s,j):Vg(),T1(s);else return m=s.lanes=536870912,ON(a,s,j!==null?j.baseLanes|u:u,u,m)}else j!==null?(of(s,j.cachePool),A1(s,j),mi(),s.memoizedState=null):(a!==null&&of(s,null),Vg(),mi());return tr(a,s,v,u),s.child}function zu(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function ON(a,s,u,m,v){var j=qg();return j=j===null?null:{parent:Ct._currentValue,pool:j},s.memoizedState={baseLanes:u,cachePool:j},a!==null&&of(s,null),Vg(),T1(s),a!==null&&qo(a,s,m,!0),s.childLanes=v,null}function Sf(a,s){return s=_f({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function EN(a,s,u){return vs(s,a.child,null,u),a=Sf(s,s.pendingProps),a.flags|=2,Qr(s),s.memoizedState=null,a}function H$(a,s,u){var m=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,a===null){if($e){if(m.mode==="hidden")return a=Sf(s,m),s.lanes=536870912,zu(null,a);if(Xg(s),(a=it)?(a=z_(a,pn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:si!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},u=c1(a),u.return=s,s.child=u,Jt=s,it=null)):a=null,a===null)throw li(s);return s.lanes=536870912,null}return Sf(s,m)}var j=a.memoizedState;if(j!==null){var O=j.dehydrated;if(Xg(s),v)if(s.flags&256)s.flags&=-257,s=EN(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(n(558));else if(Rt||qo(a,s,u,!1),v=(u&a.childLanes)!==0,Rt||v){if(m=rt,m!==null&&(O=yS(m,u),O!==0&&O!==j.retryLane))throw j.retryLane=O,cs(a,O),Lr(m,a,O),yy;Df(),s=EN(a,s,u)}else a=j.treeContext,it=yn(O.nextSibling),Jt=s,$e=!0,oi=null,pn=!1,a!==null&&h1(s,a),s=Sf(s,m),s.flags|=4096;return s}return a=va(a.child,{mode:m.mode,children:m.children}),a.ref=s.ref,s.child=a,a.return=s,a}function Nf(a,s){var u=s.ref;if(u===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(n(284));(a===null||a.ref!==u)&&(s.flags|=4194816)}}function vy(a,s,u,m,v){return ms(s),u=Zg(a,s,u,m,void 0,v),m=Jg(),a!==null&&!Rt?(ey(a,s,v),Na(a,s,v)):($e&&m&&Mg(s),s.flags|=1,tr(a,s,u,v),s.child)}function AN(a,s,u,m,v,j){return ms(s),s.updateQueue=null,u=P1(s,m,u,v),C1(a),m=Jg(),a!==null&&!Rt?(ey(a,s,j),Na(a,s,j)):($e&&m&&Mg(s),s.flags|=1,tr(a,s,u,j),s.child)}function TN(a,s,u,m,v){if(ms(s),s.stateNode===null){var j=Io,O=u.contextType;typeof O=="object"&&O!==null&&(j=er(O)),j=new u(m,j),s.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=py,s.stateNode=j,j._reactInternals=s,j=s.stateNode,j.props=m,j.state=s.memoizedState,j.refs={},Hg(s),O=u.contextType,j.context=typeof O=="object"&&O!==null?er(O):Io,j.state=s.memoizedState,O=u.getDerivedStateFromProps,typeof O=="function"&&(my(s,u,O,m),j.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(O=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),O!==j.state&&py.enqueueReplaceState(j,j.state,null),Du(s,m,j,v),Mu(),j.state=s.memoizedState),typeof j.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(a===null){j=s.stateNode;var P=s.memoizedProps,I=bs(u,P);j.props=I;var V=j.context,ne=u.contextType;O=Io,typeof ne=="object"&&ne!==null&&(O=er(ne));var se=u.getDerivedStateFromProps;ne=typeof se=="function"||typeof j.getSnapshotBeforeUpdate=="function",P=s.pendingProps!==P,ne||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(P||V!==O)&&pN(s,j,m,O),ci=!1;var W=s.memoizedState;j.state=W,Du(s,m,j,v),Mu(),V=s.memoizedState,P||W!==V||ci?(typeof se=="function"&&(my(s,u,se,m),V=s.memoizedState),(I=ci||mN(s,u,I,m,W,V,O))?(ne||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(s.flags|=4194308)):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=V),j.props=m,j.state=V,j.context=O,m=I):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{j=s.stateNode,Kg(a,s),O=s.memoizedProps,ne=bs(u,O),j.props=ne,se=s.pendingProps,W=j.context,V=u.contextType,I=Io,typeof V=="object"&&V!==null&&(I=er(V)),P=u.getDerivedStateFromProps,(V=typeof P=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(O!==se||W!==I)&&pN(s,j,m,I),ci=!1,W=s.memoizedState,j.state=W,Du(s,m,j,v),Mu();var ee=s.memoizedState;O!==se||W!==ee||ci||a!==null&&a.dependencies!==null&&af(a.dependencies)?(typeof P=="function"&&(my(s,u,P,m),ee=s.memoizedState),(ne=ci||mN(s,u,ne,m,W,ee,I)||a!==null&&a.dependencies!==null&&af(a.dependencies))?(V||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(m,ee,I),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(m,ee,I)),typeof j.componentDidUpdate=="function"&&(s.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof j.componentDidUpdate!="function"||O===a.memoizedProps&&W===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||O===a.memoizedProps&&W===a.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=ee),j.props=m,j.state=ee,j.context=I,m=ne):(typeof j.componentDidUpdate!="function"||O===a.memoizedProps&&W===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||O===a.memoizedProps&&W===a.memoizedState||(s.flags|=1024),m=!1)}return j=m,Nf(a,s),m=(s.flags&128)!==0,j||m?(j=s.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:j.render(),s.flags|=1,a!==null&&m?(s.child=vs(s,a.child,null,v),s.child=vs(s,null,u,v)):tr(a,s,u,v),s.memoizedState=j.state,a=s.child):a=Na(a,s,v),a}function CN(a,s,u,m){return fs(),s.flags|=256,tr(a,s,u,m),s.child}var xy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function by(a){return{baseLanes:a,cachePool:x1()}}function jy(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=Wr),a}function PN(a,s,u){var m=s.pendingProps,v=!1,j=(s.flags&128)!==0,O;if((O=j)||(O=a!==null&&a.memoizedState===null?!1:(wt.current&2)!==0),O&&(v=!0,s.flags&=-129),O=(s.flags&32)!==0,s.flags&=-33,a===null){if($e){if(v?hi(s):mi(),(a=it)?(a=z_(a,pn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:si!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},u=c1(a),u.return=s,s.child=u,Jt=s,it=null)):a=null,a===null)throw li(s);return nv(a)?s.lanes=32:s.lanes=536870912,null}var P=m.children;return m=m.fallback,v?(mi(),v=s.mode,P=_f({mode:"hidden",children:P},v),m=ds(m,v,u,null),P.return=s,m.return=s,P.sibling=m,s.child=P,m=s.child,m.memoizedState=by(u),m.childLanes=jy(a,O,u),s.memoizedState=xy,zu(null,m)):(hi(s),wy(s,P))}var I=a.memoizedState;if(I!==null&&(P=I.dehydrated,P!==null)){if(j)s.flags&256?(hi(s),s.flags&=-257,s=Sy(a,s,u)):s.memoizedState!==null?(mi(),s.child=a.child,s.flags|=128,s=null):(mi(),P=m.fallback,v=s.mode,m=_f({mode:"visible",children:m.children},v),P=ds(P,v,u,null),P.flags|=2,m.return=s,P.return=s,m.sibling=P,s.child=m,vs(s,a.child,null,u),m=s.child,m.memoizedState=by(u),m.childLanes=jy(a,O,u),s.memoizedState=xy,s=zu(null,m));else if(hi(s),nv(P)){if(O=P.nextSibling&&P.nextSibling.dataset,O)var V=O.dgst;O=V,m=Error(n(419)),m.stack="",m.digest=O,Eu({value:m,source:null,stack:null}),s=Sy(a,s,u)}else if(Rt||qo(a,s,u,!1),O=(u&a.childLanes)!==0,Rt||O){if(O=rt,O!==null&&(m=yS(O,u),m!==0&&m!==I.retryLane))throw I.retryLane=m,cs(a,m),Lr(O,a,m),yy;rv(P)||Df(),s=Sy(a,s,u)}else rv(P)?(s.flags|=192,s.child=a.child,s=null):(a=I.treeContext,it=yn(P.nextSibling),Jt=s,$e=!0,oi=null,pn=!1,a!==null&&h1(s,a),s=wy(s,m.children),s.flags|=4096);return s}return v?(mi(),P=m.fallback,v=s.mode,I=a.child,V=I.sibling,m=va(I,{mode:"hidden",children:m.children}),m.subtreeFlags=I.subtreeFlags&65011712,V!==null?P=va(V,P):(P=ds(P,v,u,null),P.flags|=2),P.return=s,m.return=s,m.sibling=P,s.child=m,zu(null,m),m=s.child,P=a.child.memoizedState,P===null?P=by(u):(v=P.cachePool,v!==null?(I=Ct._currentValue,v=v.parent!==I?{parent:I,pool:I}:v):v=x1(),P={baseLanes:P.baseLanes|u,cachePool:v}),m.memoizedState=P,m.childLanes=jy(a,O,u),s.memoizedState=xy,zu(a.child,m)):(hi(s),u=a.child,a=u.sibling,u=va(u,{mode:"visible",children:m.children}),u.return=s,u.sibling=null,a!==null&&(O=s.deletions,O===null?(s.deletions=[a],s.flags|=16):O.push(a)),s.child=u,s.memoizedState=null,u)}function wy(a,s){return s=_f({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function _f(a,s){return a=Yr(22,a,null,s),a.lanes=0,a}function Sy(a,s,u){return vs(s,a.child,null,u),a=wy(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function RN(a,s,u){a.lanes|=s;var m=a.alternate;m!==null&&(m.lanes|=s),Ig(a.return,s,u)}function Ny(a,s,u,m,v,j){var O=a.memoizedState;O===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:v,treeForkCount:j}:(O.isBackwards=s,O.rendering=null,O.renderingStartTime=0,O.last=m,O.tail=u,O.tailMode=v,O.treeForkCount=j)}function MN(a,s,u){var m=s.pendingProps,v=m.revealOrder,j=m.tail;m=m.children;var O=wt.current,P=(O&2)!==0;if(P?(O=O&1|2,s.flags|=128):O&=1,le(wt,O),tr(a,s,m,u),m=$e?Ou:0,!P&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&RN(a,u,s);else if(a.tag===19)RN(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(v){case"forwards":for(u=s.child,v=null;u!==null;)a=u.alternate,a!==null&&hf(a)===null&&(v=u),u=u.sibling;u=v,u===null?(v=s.child,s.child=null):(v=u.sibling,u.sibling=null),Ny(s,!1,v,u,j,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,v=s.child,s.child=null;v!==null;){if(a=v.alternate,a!==null&&hf(a)===null){s.child=v;break}a=v.sibling,v.sibling=u,u=v,v=a}Ny(s,!0,u,null,j,m);break;case"together":Ny(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function Na(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),yi|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(qo(a,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(n(153));if(s.child!==null){for(a=s.child,u=va(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=va(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function _y(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&af(a)))}function K$(a,s,u){switch(s.tag){case 3:_e(s,s.stateNode.containerInfo),ui(s,Ct,a.memoizedState.cache),fs();break;case 27:case 5:te(s);break;case 4:_e(s,s.stateNode.containerInfo);break;case 10:ui(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Xg(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(hi(s),s.flags|=128,null):(u&s.child.childLanes)!==0?PN(a,s,u):(hi(s),a=Na(a,s,u),a!==null?a.sibling:null);hi(s);break;case 19:var v=(a.flags&128)!==0;if(m=(u&s.childLanes)!==0,m||(qo(a,s,u,!1),m=(u&s.childLanes)!==0),v){if(m)return MN(a,s,u);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),le(wt,wt.current),m)break;return null;case 22:return s.lanes=0,_N(a,s,u,s.pendingProps);case 24:ui(s,Ct,a.memoizedState.cache)}return Na(a,s,u)}function DN(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Rt=!0;else{if(!_y(a,u)&&(s.flags&128)===0)return Rt=!1,K$(a,s,u);Rt=(a.flags&131072)!==0}else Rt=!1,$e&&(s.flags&1048576)!==0&&f1(s,Ou,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(a=gs(s.elementType),s.type=a,typeof a=="function")Cg(a)?(m=bs(a,m),s.tag=1,s=TN(null,s,a,m,u)):(s.tag=0,s=vy(null,s,a,m,u));else{if(a!=null){var v=a.$$typeof;if(v===A){s.tag=11,s=wN(null,s,a,m,u);break e}else if(v===D){s.tag=14,s=SN(null,s,a,m,u);break e}}throw s=Z(a)||a,Error(n(306,s,""))}}return s;case 0:return vy(a,s,s.type,s.pendingProps,u);case 1:return m=s.type,v=bs(m,s.pendingProps),TN(a,s,m,v,u);case 3:e:{if(_e(s,s.stateNode.containerInfo),a===null)throw Error(n(387));m=s.pendingProps;var j=s.memoizedState;v=j.element,Kg(a,s),Du(s,m,null,u);var O=s.memoizedState;if(m=O.cache,ui(s,Ct,m),m!==j.cache&&zg(s,[Ct],u,!0),Mu(),m=O.element,j.isDehydrated)if(j={element:m,isDehydrated:!1,cache:O.cache},s.updateQueue.baseState=j,s.memoizedState=j,s.flags&256){s=CN(a,s,m,u);break e}else if(m!==v){v=fn(Error(n(424)),s),Eu(v),s=CN(a,s,m,u);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(it=yn(a.firstChild),Jt=s,$e=!0,oi=null,pn=!0,u=_1(s,null,m,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(fs(),m===v){s=Na(a,s,u);break e}tr(a,s,m,u)}s=s.child}return s;case 26:return Nf(a,s),a===null?(u=K_(s.type,null,s.pendingProps,null))?s.memoizedState=u:$e||(u=s.type,a=s.pendingProps,m=Uf(xe.current).createElement(u),m[Zt]=s,m[Cr]=a,rr(m,u,a),qt(m),s.stateNode=m):s.memoizedState=K_(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return te(s),a===null&&$e&&(m=s.stateNode=q_(s.type,s.pendingProps,xe.current),Jt=s,pn=!0,v=it,wi(s.type)?(av=v,it=yn(m.firstChild)):it=v),tr(a,s,s.pendingProps.children,u),Nf(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&$e&&((v=m=it)&&(m=jI(m,s.type,s.pendingProps,pn),m!==null?(s.stateNode=m,Jt=s,it=yn(m.firstChild),pn=!1,v=!0):v=!1),v||li(s)),te(s),v=s.type,j=s.pendingProps,O=a!==null?a.memoizedProps:null,m=j.children,Jy(v,j)?m=null:O!==null&&Jy(v,O)&&(s.flags|=32),s.memoizedState!==null&&(v=Zg(a,s,L$,null,null,u),ec._currentValue=v),Nf(a,s),tr(a,s,m,u),s.child;case 6:return a===null&&$e&&((a=u=it)&&(u=wI(u,s.pendingProps,pn),u!==null?(s.stateNode=u,Jt=s,it=null,a=!0):a=!1),a||li(s)),null;case 13:return PN(a,s,u);case 4:return _e(s,s.stateNode.containerInfo),m=s.pendingProps,a===null?s.child=vs(s,null,m,u):tr(a,s,m,u),s.child;case 11:return wN(a,s,s.type,s.pendingProps,u);case 7:return tr(a,s,s.pendingProps,u),s.child;case 8:return tr(a,s,s.pendingProps.children,u),s.child;case 12:return tr(a,s,s.pendingProps.children,u),s.child;case 10:return m=s.pendingProps,ui(s,s.type,m.value),tr(a,s,m.children,u),s.child;case 9:return v=s.type._context,m=s.pendingProps.children,ms(s),v=er(v),m=m(v),s.flags|=1,tr(a,s,m,u),s.child;case 14:return SN(a,s,s.type,s.pendingProps,u);case 15:return NN(a,s,s.type,s.pendingProps,u);case 19:return MN(a,s,u);case 31:return H$(a,s,u);case 22:return _N(a,s,u,s.pendingProps);case 24:return ms(s),m=er(Ct),a===null?(v=qg(),v===null&&(v=rt,j=Bg(),v.pooledCache=j,j.refCount++,j!==null&&(v.pooledCacheLanes|=u),v=j),s.memoizedState={parent:m,cache:v},Hg(s),ui(s,Ct,v)):((a.lanes&u)!==0&&(Kg(a,s),Du(s,null,null,u),Mu()),v=a.memoizedState,j=s.memoizedState,v.parent!==m?(v={parent:m,cache:m},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),ui(s,Ct,m)):(m=j.cache,ui(s,Ct,m),m!==v.cache&&zg(s,[Ct],u,!0))),tr(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(n(156,s.tag))}function _a(a){a.flags|=4}function Oy(a,s,u,m,v){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(v&335544128)===v)if(a.stateNode.complete)a.flags|=8192;else if(o_())a.flags|=8192;else throw ys=uf,Fg}else a.flags&=-16777217}function kN(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!X_(s))if(o_())a.flags|=8192;else throw ys=uf,Fg}function Of(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?mS():536870912,a.lanes|=s,el|=s)}function Bu(a,s){if(!$e)switch(a.tailMode){case"hidden":s=a.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:m.sibling=null}}function st(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,m=0;if(s)for(var v=a.child;v!==null;)u|=v.lanes|v.childLanes,m|=v.subtreeFlags&65011712,m|=v.flags&65011712,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)u|=v.lanes|v.childLanes,m|=v.subtreeFlags,m|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=m,a.childLanes=u,s}function G$(a,s,u){var m=s.pendingProps;switch(Dg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(s),null;case 1:return st(s),null;case 3:return u=s.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),ja(Ct),de(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(Uo(s)?_a(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Lg())),st(s),null;case 26:var v=s.type,j=s.memoizedState;return a===null?(_a(s),j!==null?(st(s),kN(s,j)):(st(s),Oy(s,v,null,m,u))):j?j!==a.memoizedState?(_a(s),st(s),kN(s,j)):(st(s),s.flags&=-16777217):(a=a.memoizedProps,a!==m&&_a(s),st(s),Oy(s,v,a,m,u)),null;case 27:if(je(s),u=xe.current,v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&_a(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return st(s),null}a=ue.current,Uo(s)?m1(s):(a=q_(v,m,u),s.stateNode=a,_a(s))}return st(s),null;case 5:if(je(s),v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&_a(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return st(s),null}if(j=ue.current,Uo(s))m1(s);else{var O=Uf(xe.current);switch(j){case 1:j=O.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:j=O.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":j=O.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":j=O.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":j=O.createElement("div"),j.innerHTML="<script><\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof m.is=="string"?O.createElement("select",{is:m.is}):O.createElement("select"),m.multiple?j.multiple=!0:m.size&&(j.size=m.size);break;default:j=typeof m.is=="string"?O.createElement(v,{is:m.is}):O.createElement(v)}}j[Zt]=s,j[Cr]=m;e:for(O=s.child;O!==null;){if(O.tag===5||O.tag===6)j.appendChild(O.stateNode);else if(O.tag!==4&&O.tag!==27&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===s)break e;for(;O.sibling===null;){if(O.return===null||O.return===s)break e;O=O.return}O.sibling.return=O.return,O=O.sibling}s.stateNode=j;e:switch(rr(j,v,m),v){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&_a(s)}}return st(s),Oy(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==m&&_a(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(n(166));if(a=xe.current,Uo(s)){if(a=s.stateNode,u=s.memoizedProps,m=null,v=Jt,v!==null)switch(v.tag){case 27:case 5:m=v.memoizedProps}a[Zt]=s,a=!!(a.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||P_(a.nodeValue,u)),a||li(s,!0)}else a=Uf(a).createTextNode(m),a[Zt]=s,s.stateNode=a}return st(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(m=Uo(s),u!==null){if(a===null){if(!m)throw Error(n(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(557));a[Zt]=s}else fs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;st(s),a=!1}else u=Lg(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(Qr(s),s):(Qr(s),null);if((s.flags&128)!==0)throw Error(n(558))}return st(s),null;case 13:if(m=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(v=Uo(s),m!==null&&m.dehydrated!==null){if(a===null){if(!v)throw Error(n(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[Zt]=s}else fs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;st(s),v=!1}else v=Lg(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Qr(s),s):(Qr(s),null)}return Qr(s),(s.flags&128)!==0?(s.lanes=u,s):(u=m!==null,a=a!==null&&a.memoizedState!==null,u&&(m=s.child,v=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(v=m.alternate.memoizedState.cachePool.pool),j=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(j=m.memoizedState.cachePool.pool),j!==v&&(m.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),Of(s,s.updateQueue),st(s),null);case 4:return de(),a===null&&Vy(s.stateNode.containerInfo),st(s),null;case 10:return ja(s.type),st(s),null;case 19:if(X(wt),m=s.memoizedState,m===null)return st(s),null;if(v=(s.flags&128)!==0,j=m.rendering,j===null)if(v)Bu(m,!1);else{if(yt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(j=hf(a),j!==null){for(s.flags|=128,Bu(m,!1),a=j.updateQueue,s.updateQueue=a,Of(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)u1(u,a),u=u.sibling;return le(wt,wt.current&1|2),$e&&xa(s,m.treeForkCount),s.child}a=a.sibling}m.tail!==null&&Ce()>Pf&&(s.flags|=128,v=!0,Bu(m,!1),s.lanes=4194304)}else{if(!v)if(a=hf(j),a!==null){if(s.flags|=128,v=!0,a=a.updateQueue,s.updateQueue=a,Of(s,a),Bu(m,!0),m.tail===null&&m.tailMode==="hidden"&&!j.alternate&&!$e)return st(s),null}else 2*Ce()-m.renderingStartTime>Pf&&u!==536870912&&(s.flags|=128,v=!0,Bu(m,!1),s.lanes=4194304);m.isBackwards?(j.sibling=s.child,s.child=j):(a=m.last,a!==null?a.sibling=j:s.child=j,m.last=j)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=Ce(),a.sibling=null,u=wt.current,le(wt,v?u&1|2:u&1),$e&&xa(s,m.treeForkCount),a):(st(s),null);case 22:case 23:return Qr(s),Qg(),m=s.memoizedState!==null,a!==null?a.memoizedState!==null!==m&&(s.flags|=8192):m&&(s.flags|=8192),m?(u&536870912)!==0&&(s.flags&128)===0&&(st(s),s.subtreeFlags&6&&(s.flags|=8192)):st(s),u=s.updateQueue,u!==null&&Of(s,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==u&&(s.flags|=2048),a!==null&&X(ps),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),ja(Ct),st(s),null;case 25:return null;case 30:return null}throw Error(n(156,s.tag))}function Y$(a,s){switch(Dg(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return ja(Ct),de(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return je(s),null;case 31:if(s.memoizedState!==null){if(Qr(s),s.alternate===null)throw Error(n(340));fs()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Qr(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(n(340));fs()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return X(wt),null;case 4:return de(),null;case 10:return ja(s.type),null;case 22:case 23:return Qr(s),Qg(),a!==null&&X(ps),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return ja(Ct),null;case 25:return null;default:return null}}function LN(a,s){switch(Dg(s),s.tag){case 3:ja(Ct),de();break;case 26:case 27:case 5:je(s);break;case 4:de();break;case 31:s.memoizedState!==null&&Qr(s);break;case 13:Qr(s);break;case 19:X(wt);break;case 10:ja(s.type);break;case 22:case 23:Qr(s),Qg(),a!==null&&X(ps);break;case 24:ja(Ct)}}function Uu(a,s){try{var u=s.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var v=m.next;u=v;do{if((u.tag&a)===a){m=void 0;var j=u.create,O=u.inst;m=j(),O.destroy=m}u=u.next}while(u!==v)}}catch(P){Qe(s,s.return,P)}}function pi(a,s,u){try{var m=s.updateQueue,v=m!==null?m.lastEffect:null;if(v!==null){var j=v.next;m=j;do{if((m.tag&a)===a){var O=m.inst,P=O.destroy;if(P!==void 0){O.destroy=void 0,v=s;var I=u,V=P;try{V()}catch(ne){Qe(v,I,ne)}}}m=m.next}while(m!==j)}}catch(ne){Qe(s,s.return,ne)}}function $N(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{E1(s,u)}catch(m){Qe(a,a.return,m)}}}function IN(a,s,u){u.props=bs(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(m){Qe(a,s,m)}}function qu(a,s){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var m=a.stateNode;break;case 30:m=a.stateNode;break;default:m=a.stateNode}typeof u=="function"?a.refCleanup=u(m):u.current=m}}catch(v){Qe(a,s,v)}}function Vn(a,s){var u=a.ref,m=a.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(v){Qe(a,s,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(v){Qe(a,s,v)}else u.current=null}function zN(a){var s=a.type,u=a.memoizedProps,m=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(v){Qe(a,a.return,v)}}function Ey(a,s,u){try{var m=a.stateNode;pI(m,a.type,u,s),m[Cr]=s}catch(v){Qe(a,a.return,v)}}function BN(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&wi(a.type)||a.tag===4}function Ay(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||BN(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&wi(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Ty(a,s,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(a),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=ga));else if(m!==4&&(m===27&&wi(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(Ty(a,s,u),a=a.sibling;a!==null;)Ty(a,s,u),a=a.sibling}function Ef(a,s,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,s?u.insertBefore(a,s):u.appendChild(a);else if(m!==4&&(m===27&&wi(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(Ef(a,s,u),a=a.sibling;a!==null;)Ef(a,s,u),a=a.sibling}function UN(a){var s=a.stateNode,u=a.memoizedProps;try{for(var m=a.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);rr(s,m,u),s[Zt]=a,s[Cr]=u}catch(j){Qe(a,a.return,j)}}var Oa=!1,Mt=!1,Cy=!1,qN=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function V$(a,s){if(a=a.containerInfo,Wy=Vf,a=e1(a),Sg(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var v=m.anchorOffset,j=m.focusNode;m=m.focusOffset;try{u.nodeType,j.nodeType}catch{u=null;break e}var O=0,P=-1,I=-1,V=0,ne=0,se=a,W=null;t:for(;;){for(var ee;se!==u||v!==0&&se.nodeType!==3||(P=O+v),se!==j||m!==0&&se.nodeType!==3||(I=O+m),se.nodeType===3&&(O+=se.nodeValue.length),(ee=se.firstChild)!==null;)W=se,se=ee;for(;;){if(se===a)break t;if(W===u&&++V===v&&(P=O),W===j&&++ne===m&&(I=O),(ee=se.nextSibling)!==null)break;se=W,W=se.parentNode}se=ee}u=P===-1||I===-1?null:{start:P,end:I}}else u=null}u=u||{start:0,end:0}}else u=null;for(Zy={focusedElem:a,selectionRange:u},Vf=!1,Ft=s;Ft!==null;)if(s=Ft,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,Ft=a;else for(;Ft!==null;){switch(s=Ft,j=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)v=a[u],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&j!==null){a=void 0,u=s,v=j.memoizedProps,j=j.memoizedState,m=u.stateNode;try{var me=bs(u.type,v);a=m.getSnapshotBeforeUpdate(me,j),m.__reactInternalSnapshotBeforeUpdate=a}catch(Se){Qe(u,u.return,Se)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)tv(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":tv(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(n(163))}if(a=s.sibling,a!==null){a.return=s.return,Ft=a;break}Ft=s.return}}function FN(a,s,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:Aa(a,u),m&4&&Uu(5,u);break;case 1:if(Aa(a,u),m&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(O){Qe(u,u.return,O)}else{var v=bs(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(v,s,a.__reactInternalSnapshotBeforeUpdate)}catch(O){Qe(u,u.return,O)}}m&64&&$N(u),m&512&&qu(u,u.return);break;case 3:if(Aa(a,u),m&64&&(a=u.updateQueue,a!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{E1(a,s)}catch(O){Qe(u,u.return,O)}}break;case 27:s===null&&m&4&&UN(u);case 26:case 5:Aa(a,u),s===null&&m&4&&zN(u),m&512&&qu(u,u.return);break;case 12:Aa(a,u);break;case 31:Aa(a,u),m&4&&GN(a,u);break;case 13:Aa(a,u),m&4&&YN(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=nI.bind(null,u),SI(a,u))));break;case 22:if(m=u.memoizedState!==null||Oa,!m){s=s!==null&&s.memoizedState!==null||Mt,v=Oa;var j=Mt;Oa=m,(Mt=s)&&!j?Ta(a,u,(u.subtreeFlags&8772)!==0):Aa(a,u),Oa=v,Mt=j}break;case 30:break;default:Aa(a,u)}}function HN(a){var s=a.alternate;s!==null&&(a.alternate=null,HN(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&sg(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var dt=null,Rr=!1;function Ea(a,s,u){for(u=u.child;u!==null;)KN(a,s,u),u=u.sibling}function KN(a,s,u){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(fu,u)}catch{}switch(u.tag){case 26:Mt||Vn(u,s),Ea(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Mt||Vn(u,s);var m=dt,v=Rr;wi(u.type)&&(dt=u.stateNode,Rr=!1),Ea(a,s,u),Wu(u.stateNode),dt=m,Rr=v;break;case 5:Mt||Vn(u,s);case 6:if(m=dt,v=Rr,dt=null,Ea(a,s,u),dt=m,Rr=v,dt!==null)if(Rr)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(u.stateNode)}catch(j){Qe(u,s,j)}else try{dt.removeChild(u.stateNode)}catch(j){Qe(u,s,j)}break;case 18:dt!==null&&(Rr?(a=dt,$_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),ll(a)):$_(dt,u.stateNode));break;case 4:m=dt,v=Rr,dt=u.stateNode.containerInfo,Rr=!0,Ea(a,s,u),dt=m,Rr=v;break;case 0:case 11:case 14:case 15:pi(2,u,s),Mt||pi(4,u,s),Ea(a,s,u);break;case 1:Mt||(Vn(u,s),m=u.stateNode,typeof m.componentWillUnmount=="function"&&IN(u,s,m)),Ea(a,s,u);break;case 21:Ea(a,s,u);break;case 22:Mt=(m=Mt)||u.memoizedState!==null,Ea(a,s,u),Mt=m;break;default:Ea(a,s,u)}}function GN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{ll(a)}catch(u){Qe(s,s.return,u)}}}function YN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{ll(a)}catch(u){Qe(s,s.return,u)}}function Q$(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new qN),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new qN),s;default:throw Error(n(435,a.tag))}}function Af(a,s){var u=Q$(a);s.forEach(function(m){if(!u.has(m)){u.add(m);var v=aI.bind(null,a,m);m.then(v,v)}})}function Mr(a,s){var u=s.deletions;if(u!==null)for(var m=0;m<u.length;m++){var v=u[m],j=a,O=s,P=O;e:for(;P!==null;){switch(P.tag){case 27:if(wi(P.type)){dt=P.stateNode,Rr=!1;break e}break;case 5:dt=P.stateNode,Rr=!1;break e;case 3:case 4:dt=P.stateNode.containerInfo,Rr=!0;break e}P=P.return}if(dt===null)throw Error(n(160));KN(j,O,v),dt=null,Rr=!1,j=v.alternate,j!==null&&(j.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)VN(s,a),s=s.sibling}var Mn=null;function VN(a,s){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Mr(s,a),Dr(a),m&4&&(pi(3,a,a.return),Uu(3,a),pi(5,a,a.return));break;case 1:Mr(s,a),Dr(a),m&512&&(Mt||u===null||Vn(u,u.return)),m&64&&Oa&&(a=a.updateQueue,a!==null&&(m=a.callbacks,m!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var v=Mn;if(Mr(s,a),Dr(a),m&512&&(Mt||u===null||Vn(u,u.return)),m&4){var j=u!==null?u.memoizedState:null;if(m=a.memoizedState,u===null)if(m===null)if(a.stateNode===null){e:{m=a.type,u=a.memoizedProps,v=v.ownerDocument||v;t:switch(m){case"title":j=v.getElementsByTagName("title")[0],(!j||j[pu]||j[Zt]||j.namespaceURI==="http://www.w3.org/2000/svg"||j.hasAttribute("itemprop"))&&(j=v.createElement(m),v.head.insertBefore(j,v.querySelector("head > title"))),rr(j,m,u),j[Zt]=a,qt(j),m=j;break e;case"link":var O=V_("link","href",v).get(m+(u.href||""));if(O){for(var P=0;P<O.length;P++)if(j=O[P],j.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&j.getAttribute("rel")===(u.rel==null?null:u.rel)&&j.getAttribute("title")===(u.title==null?null:u.title)&&j.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){O.splice(P,1);break t}}j=v.createElement(m),rr(j,m,u),v.head.appendChild(j);break;case"meta":if(O=V_("meta","content",v).get(m+(u.content||""))){for(P=0;P<O.length;P++)if(j=O[P],j.getAttribute("content")===(u.content==null?null:""+u.content)&&j.getAttribute("name")===(u.name==null?null:u.name)&&j.getAttribute("property")===(u.property==null?null:u.property)&&j.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&j.getAttribute("charset")===(u.charSet==null?null:u.charSet)){O.splice(P,1);break t}}j=v.createElement(m),rr(j,m,u),v.head.appendChild(j);break;default:throw Error(n(468,m))}j[Zt]=a,qt(j),m=j}a.stateNode=m}else Q_(v,a.type,a.stateNode);else a.stateNode=Y_(v,m,a.memoizedProps);else j!==m?(j===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):j.count--,m===null?Q_(v,a.type,a.stateNode):Y_(v,m,a.memoizedProps)):m===null&&a.stateNode!==null&&Ey(a,a.memoizedProps,u.memoizedProps)}break;case 27:Mr(s,a),Dr(a),m&512&&(Mt||u===null||Vn(u,u.return)),u!==null&&m&4&&Ey(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Mr(s,a),Dr(a),m&512&&(Mt||u===null||Vn(u,u.return)),a.flags&32){v=a.stateNode;try{Po(v,"")}catch(me){Qe(a,a.return,me)}}m&4&&a.stateNode!=null&&(v=a.memoizedProps,Ey(a,v,u!==null?u.memoizedProps:v)),m&1024&&(Cy=!0);break;case 6:if(Mr(s,a),Dr(a),m&4){if(a.stateNode===null)throw Error(n(162));m=a.memoizedProps,u=a.stateNode;try{u.nodeValue=m}catch(me){Qe(a,a.return,me)}}break;case 3:if(Hf=null,v=Mn,Mn=qf(s.containerInfo),Mr(s,a),Mn=v,Dr(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{ll(s.containerInfo)}catch(me){Qe(a,a.return,me)}Cy&&(Cy=!1,QN(a));break;case 4:m=Mn,Mn=qf(a.stateNode.containerInfo),Mr(s,a),Dr(a),Mn=m;break;case 12:Mr(s,a),Dr(a);break;case 31:Mr(s,a),Dr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Af(a,m)));break;case 13:Mr(s,a),Dr(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Cf=Ce()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Af(a,m)));break;case 22:v=a.memoizedState!==null;var I=u!==null&&u.memoizedState!==null,V=Oa,ne=Mt;if(Oa=V||v,Mt=ne||I,Mr(s,a),Mt=ne,Oa=V,Dr(a),m&8192)e:for(s=a.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(u===null||I||Oa||Mt||js(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){I=u=s;try{if(j=I.stateNode,v)O=j.style,typeof O.setProperty=="function"?O.setProperty("display","none","important"):O.display="none";else{P=I.stateNode;var se=I.memoizedProps.style,W=se!=null&&se.hasOwnProperty("display")?se.display:null;P.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(me){Qe(I,I.return,me)}}}else if(s.tag===6){if(u===null){I=s;try{I.stateNode.nodeValue=v?"":I.memoizedProps}catch(me){Qe(I,I.return,me)}}}else if(s.tag===18){if(u===null){I=s;try{var ee=I.stateNode;v?I_(ee,!0):I_(I.stateNode,!1)}catch(me){Qe(I,I.return,me)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}m&4&&(m=a.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,Af(a,u))));break;case 19:Mr(s,a),Dr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Af(a,m)));break;case 30:break;case 21:break;default:Mr(s,a),Dr(a)}}function Dr(a){var s=a.flags;if(s&2){try{for(var u,m=a.return;m!==null;){if(BN(m)){u=m;break}m=m.return}if(u==null)throw Error(n(160));switch(u.tag){case 27:var v=u.stateNode,j=Ay(a);Ef(a,j,v);break;case 5:var O=u.stateNode;u.flags&32&&(Po(O,""),u.flags&=-33);var P=Ay(a);Ef(a,P,O);break;case 3:case 4:var I=u.stateNode.containerInfo,V=Ay(a);Ty(a,V,I);break;default:throw Error(n(161))}}catch(ne){Qe(a,a.return,ne)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function QN(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;QN(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function Aa(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)FN(a,s.alternate,s),s=s.sibling}function js(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:pi(4,s,s.return),js(s);break;case 1:Vn(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&IN(s,s.return,u),js(s);break;case 27:Wu(s.stateNode);case 26:case 5:Vn(s,s.return),js(s);break;case 22:s.memoizedState===null&&js(s);break;case 30:js(s);break;default:js(s)}a=a.sibling}}function Ta(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,v=a,j=s,O=j.flags;switch(j.tag){case 0:case 11:case 15:Ta(v,j,u),Uu(4,j);break;case 1:if(Ta(v,j,u),m=j,v=m.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(V){Qe(m,m.return,V)}if(m=j,v=m.updateQueue,v!==null){var P=m.stateNode;try{var I=v.shared.hiddenCallbacks;if(I!==null)for(v.shared.hiddenCallbacks=null,v=0;v<I.length;v++)O1(I[v],P)}catch(V){Qe(m,m.return,V)}}u&&O&64&&$N(j),qu(j,j.return);break;case 27:UN(j);case 26:case 5:Ta(v,j,u),u&&m===null&&O&4&&zN(j),qu(j,j.return);break;case 12:Ta(v,j,u);break;case 31:Ta(v,j,u),u&&O&4&&GN(v,j);break;case 13:Ta(v,j,u),u&&O&4&&YN(v,j);break;case 22:j.memoizedState===null&&Ta(v,j,u),qu(j,j.return);break;case 30:break;default:Ta(v,j,u)}s=s.sibling}}function Py(a,s){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&Au(u))}function Ry(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Au(a))}function Dn(a,s,u,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)XN(a,s,u,m),s=s.sibling}function XN(a,s,u,m){var v=s.flags;switch(s.tag){case 0:case 11:case 15:Dn(a,s,u,m),v&2048&&Uu(9,s);break;case 1:Dn(a,s,u,m);break;case 3:Dn(a,s,u,m),v&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Au(a)));break;case 12:if(v&2048){Dn(a,s,u,m),a=s.stateNode;try{var j=s.memoizedProps,O=j.id,P=j.onPostCommit;typeof P=="function"&&P(O,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(I){Qe(s,s.return,I)}}else Dn(a,s,u,m);break;case 31:Dn(a,s,u,m);break;case 13:Dn(a,s,u,m);break;case 23:break;case 22:j=s.stateNode,O=s.alternate,s.memoizedState!==null?j._visibility&2?Dn(a,s,u,m):Fu(a,s):j._visibility&2?Dn(a,s,u,m):(j._visibility|=2,Wo(a,s,u,m,(s.subtreeFlags&10256)!==0||!1)),v&2048&&Py(O,s);break;case 24:Dn(a,s,u,m),v&2048&&Ry(s.alternate,s);break;default:Dn(a,s,u,m)}}function Wo(a,s,u,m,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var j=a,O=s,P=u,I=m,V=O.flags;switch(O.tag){case 0:case 11:case 15:Wo(j,O,P,I,v),Uu(8,O);break;case 23:break;case 22:var ne=O.stateNode;O.memoizedState!==null?ne._visibility&2?Wo(j,O,P,I,v):Fu(j,O):(ne._visibility|=2,Wo(j,O,P,I,v)),v&&V&2048&&Py(O.alternate,O);break;case 24:Wo(j,O,P,I,v),v&&V&2048&&Ry(O.alternate,O);break;default:Wo(j,O,P,I,v)}s=s.sibling}}function Fu(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,m=s,v=m.flags;switch(m.tag){case 22:Fu(u,m),v&2048&&Py(m.alternate,m);break;case 24:Fu(u,m),v&2048&&Ry(m.alternate,m);break;default:Fu(u,m)}s=s.sibling}}var Hu=8192;function Zo(a,s,u){if(a.subtreeFlags&Hu)for(a=a.child;a!==null;)WN(a,s,u),a=a.sibling}function WN(a,s,u){switch(a.tag){case 26:Zo(a,s,u),a.flags&Hu&&a.memoizedState!==null&&kI(u,Mn,a.memoizedState,a.memoizedProps);break;case 5:Zo(a,s,u);break;case 3:case 4:var m=Mn;Mn=qf(a.stateNode.containerInfo),Zo(a,s,u),Mn=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=Hu,Hu=16777216,Zo(a,s,u),Hu=m):Zo(a,s,u));break;default:Zo(a,s,u)}}function ZN(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function Ku(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];Ft=m,e_(m,a)}ZN(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)JN(a),a=a.sibling}function JN(a){switch(a.tag){case 0:case 11:case 15:Ku(a),a.flags&2048&&pi(9,a,a.return);break;case 3:Ku(a);break;case 12:Ku(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Tf(a)):Ku(a);break;default:Ku(a)}}function Tf(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];Ft=m,e_(m,a)}ZN(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:pi(8,s,s.return),Tf(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,Tf(s));break;default:Tf(s)}a=a.sibling}}function e_(a,s){for(;Ft!==null;){var u=Ft;switch(u.tag){case 0:case 11:case 15:pi(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Au(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,Ft=m;else e:for(u=a;Ft!==null;){m=Ft;var v=m.sibling,j=m.return;if(HN(m),m===u){Ft=null;break e}if(v!==null){v.return=j,Ft=v;break e}Ft=j}}}var X$={getCacheForType:function(a){var s=er(Ct),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return er(Ct).controller.signal}},W$=typeof WeakMap=="function"?WeakMap:Map,Ge=0,rt=null,Pe=null,De=0,Ve=0,Xr=null,gi=!1,Jo=!1,My=!1,Ca=0,yt=0,yi=0,ws=0,Dy=0,Wr=0,el=0,Gu=null,kr=null,ky=!1,Cf=0,t_=0,Pf=1/0,Rf=null,vi=null,kt=0,xi=null,tl=null,Pa=0,Ly=0,$y=null,r_=null,Yu=0,Iy=null;function Zr(){return(Ge&2)!==0&&De!==0?De&-De:L.T!==null?Hy():vS()}function n_(){if(Wr===0)if((De&536870912)===0||$e){var a=zd;zd<<=1,(zd&3932160)===0&&(zd=262144),Wr=a}else Wr=536870912;return a=Vr.current,a!==null&&(a.flags|=32),Wr}function Lr(a,s,u){(a===rt&&(Ve===2||Ve===9)||a.cancelPendingCommit!==null)&&(rl(a,0),bi(a,De,Wr,!1)),mu(a,u),((Ge&2)===0||a!==rt)&&(a===rt&&((Ge&2)===0&&(ws|=u),yt===4&&bi(a,De,Wr,!1)),Qn(a))}function a_(a,s,u){if((Ge&6)!==0)throw Error(n(327));var m=!u&&(s&127)===0&&(s&a.expiredLanes)===0||hu(a,s),v=m?eI(a,s):By(a,s,!0),j=m;do{if(v===0){Jo&&!m&&bi(a,s,0,!1);break}else{if(u=a.current.alternate,j&&!Z$(u)){v=By(a,s,!1),j=!1;continue}if(v===2){if(j=s,a.errorRecoveryDisabledLanes&j)var O=0;else O=a.pendingLanes&-536870913,O=O!==0?O:O&536870912?536870912:0;if(O!==0){s=O;e:{var P=a;v=Gu;var I=P.current.memoizedState.isDehydrated;if(I&&(rl(P,O).flags|=256),O=By(P,O,!1),O!==2){if(My&&!I){P.errorRecoveryDisabledLanes|=j,ws|=j,v=4;break e}j=kr,kr=v,j!==null&&(kr===null?kr=j:kr.push.apply(kr,j))}v=O}if(j=!1,v!==2)continue}}if(v===1){rl(a,0),bi(a,s,0,!0);break}e:{switch(m=a,j=v,j){case 0:case 1:throw Error(n(345));case 4:if((s&4194048)!==s)break;case 6:bi(m,s,Wr,!gi);break e;case 2:kr=null;break;case 3:case 5:break;default:throw Error(n(329))}if((s&62914560)===s&&(v=Cf+300-Ce(),10<v)){if(bi(m,s,Wr,!gi),Ud(m,0,!0)!==0)break e;Pa=s,m.timeoutHandle=k_(i_.bind(null,m,u,kr,Rf,ky,s,Wr,ws,el,gi,j,"Throttled",-0,0),v);break e}i_(m,u,kr,Rf,ky,s,Wr,ws,el,gi,j,null,-0,0)}}break}while(!0);Qn(a)}function i_(a,s,u,m,v,j,O,P,I,V,ne,se,W,ee){if(a.timeoutHandle=-1,se=s.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ga},WN(s,j,se);var me=(j&62914560)===j?Cf-Ce():(j&4194048)===j?t_-Ce():0;if(me=LI(se,me),me!==null){Pa=j,a.cancelPendingCommit=me(h_.bind(null,a,s,j,u,m,v,O,P,I,ne,se,null,W,ee)),bi(a,j,O,!V);return}}h_(a,s,j,u,m,v,O,P,I)}function Z$(a){for(var s=a;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var v=u[m],j=v.getSnapshot;v=v.value;try{if(!Gr(j(),v))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function bi(a,s,u,m){s&=~Dy,s&=~ws,a.suspendedLanes|=s,a.pingedLanes&=~s,m&&(a.warmLanes|=s),m=a.expirationTimes;for(var v=s;0<v;){var j=31-Kr(v),O=1<<j;m[j]=-1,v&=~O}u!==0&&pS(a,u,s)}function Mf(){return(Ge&6)===0?(Vu(0),!1):!0}function zy(){if(Pe!==null){if(Ve===0)var a=Pe.return;else a=Pe,ba=hs=null,ty(a),Go=null,Cu=0,a=Pe;for(;a!==null;)LN(a.alternate,a),a=a.return;Pe=null}}function rl(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,vI(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Pa=0,zy(),rt=a,Pe=u=va(a.current,null),De=s,Ve=0,Xr=null,gi=!1,Jo=hu(a,s),My=!1,el=Wr=Dy=ws=yi=yt=0,kr=Gu=null,ky=!1,(s&8)!==0&&(s|=s&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=s;0<m;){var v=31-Kr(m),j=1<<v;s|=a[v],m&=~j}return Ca=s,Jd(),u}function s_(a,s){Ae=null,L.H=Iu,s===Ko||s===lf?(s=w1(),Ve=3):s===Fg?(s=w1(),Ve=4):Ve=s===yy?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Xr=s,Pe===null&&(yt=1,wf(a,fn(s,a.current)))}function o_(){var a=Vr.current;return a===null?!0:(De&4194048)===De?gn===null:(De&62914560)===De||(De&536870912)!==0?a===gn:!1}function l_(){var a=L.H;return L.H=Iu,a===null?Iu:a}function u_(){var a=L.A;return L.A=X$,a}function Df(){yt=4,gi||(De&4194048)!==De&&Vr.current!==null||(Jo=!0),(yi&134217727)===0&&(ws&134217727)===0||rt===null||bi(rt,De,Wr,!1)}function By(a,s,u){var m=Ge;Ge|=2;var v=l_(),j=u_();(rt!==a||De!==s)&&(Rf=null,rl(a,s)),s=!1;var O=yt;e:do try{if(Ve!==0&&Pe!==null){var P=Pe,I=Xr;switch(Ve){case 8:zy(),O=6;break e;case 3:case 2:case 9:case 6:Vr.current===null&&(s=!0);var V=Ve;if(Ve=0,Xr=null,nl(a,P,I,V),u&&Jo){O=0;break e}break;default:V=Ve,Ve=0,Xr=null,nl(a,P,I,V)}}J$(),O=yt;break}catch(ne){s_(a,ne)}while(!0);return s&&a.shellSuspendCounter++,ba=hs=null,Ge=m,L.H=v,L.A=j,Pe===null&&(rt=null,De=0,Jd()),O}function J$(){for(;Pe!==null;)c_(Pe)}function eI(a,s){var u=Ge;Ge|=2;var m=l_(),v=u_();rt!==a||De!==s?(Rf=null,Pf=Ce()+500,rl(a,s)):Jo=hu(a,s);e:do try{if(Ve!==0&&Pe!==null){s=Pe;var j=Xr;t:switch(Ve){case 1:Ve=0,Xr=null,nl(a,s,j,1);break;case 2:case 9:if(b1(j)){Ve=0,Xr=null,d_(s);break}s=function(){Ve!==2&&Ve!==9||rt!==a||(Ve=7),Qn(a)},j.then(s,s);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:b1(j)?(Ve=0,Xr=null,d_(s)):(Ve=0,Xr=null,nl(a,s,j,7));break;case 5:var O=null;switch(Pe.tag){case 26:O=Pe.memoizedState;case 5:case 27:var P=Pe;if(O?X_(O):P.stateNode.complete){Ve=0,Xr=null;var I=P.sibling;if(I!==null)Pe=I;else{var V=P.return;V!==null?(Pe=V,kf(V)):Pe=null}break t}}Ve=0,Xr=null,nl(a,s,j,5);break;case 6:Ve=0,Xr=null,nl(a,s,j,6);break;case 8:zy(),yt=6;break e;default:throw Error(n(462))}}tI();break}catch(ne){s_(a,ne)}while(!0);return ba=hs=null,L.H=m,L.A=v,Ge=u,Pe!==null?0:(rt=null,De=0,Jd(),yt)}function tI(){for(;Pe!==null&&!tg();)c_(Pe)}function c_(a){var s=DN(a.alternate,a,Ca);a.memoizedProps=a.pendingProps,s===null?kf(a):Pe=s}function d_(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=AN(u,s,s.pendingProps,s.type,void 0,De);break;case 11:s=AN(u,s,s.pendingProps,s.type.render,s.ref,De);break;case 5:ty(s);default:LN(u,s),s=Pe=u1(s,Ca),s=DN(u,s,Ca)}a.memoizedProps=a.pendingProps,s===null?kf(a):Pe=s}function nl(a,s,u,m){ba=hs=null,ty(s),Go=null,Cu=0;var v=s.return;try{if(F$(a,v,s,u,De)){yt=1,wf(a,fn(u,a.current)),Pe=null;return}}catch(j){if(v!==null)throw Pe=v,j;yt=1,wf(a,fn(u,a.current)),Pe=null;return}s.flags&32768?($e||m===1?a=!0:Jo||(De&536870912)!==0?a=!1:(gi=a=!0,(m===2||m===9||m===3||m===6)&&(m=Vr.current,m!==null&&m.tag===13&&(m.flags|=16384))),f_(s,a)):kf(s)}function kf(a){var s=a;do{if((s.flags&32768)!==0){f_(s,gi);return}a=s.return;var u=G$(s.alternate,s,Ca);if(u!==null){Pe=u;return}if(s=s.sibling,s!==null){Pe=s;return}Pe=s=a}while(s!==null);yt===0&&(yt=5)}function f_(a,s){do{var u=Y$(a.alternate,a);if(u!==null){u.flags&=32767,Pe=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){Pe=a;return}Pe=a=u}while(a!==null);yt=6,Pe=null}function h_(a,s,u,m,v,j,O,P,I){a.cancelPendingCommit=null;do Lf();while(kt!==0);if((Ge&6)!==0)throw Error(n(327));if(s!==null){if(s===a.current)throw Error(n(177));if(j=s.lanes|s.childLanes,j|=Ag,DL(a,u,j,O,P,I),a===rt&&(Pe=rt=null,De=0),tl=s,xi=a,Pa=u,Ly=j,$y=v,r_=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,iI($d,function(){return v_(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=L.T,L.T=null,v=F.p,F.p=2,O=Ge,Ge|=4;try{V$(a,s,u)}finally{Ge=O,F.p=v,L.T=m}}kt=1,m_(),p_(),g_()}}function m_(){if(kt===1){kt=0;var a=xi,s=tl,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=L.T,L.T=null;var m=F.p;F.p=2;var v=Ge;Ge|=4;try{VN(s,a);var j=Zy,O=e1(a.containerInfo),P=j.focusedElem,I=j.selectionRange;if(O!==P&&P&&P.ownerDocument&&JS(P.ownerDocument.documentElement,P)){if(I!==null&&Sg(P)){var V=I.start,ne=I.end;if(ne===void 0&&(ne=V),"selectionStart"in P)P.selectionStart=V,P.selectionEnd=Math.min(ne,P.value.length);else{var se=P.ownerDocument||document,W=se&&se.defaultView||window;if(W.getSelection){var ee=W.getSelection(),me=P.textContent.length,Se=Math.min(I.start,me),et=I.end===void 0?Se:Math.min(I.end,me);!ee.extend&&Se>et&&(O=et,et=Se,Se=O);var K=ZS(P,Se),B=ZS(P,et);if(K&&B&&(ee.rangeCount!==1||ee.anchorNode!==K.node||ee.anchorOffset!==K.offset||ee.focusNode!==B.node||ee.focusOffset!==B.offset)){var Y=se.createRange();Y.setStart(K.node,K.offset),ee.removeAllRanges(),Se>et?(ee.addRange(Y),ee.extend(B.node,B.offset)):(Y.setEnd(B.node,B.offset),ee.addRange(Y))}}}}for(se=[],ee=P;ee=ee.parentNode;)ee.nodeType===1&&se.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<se.length;P++){var ie=se[P];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Vf=!!Wy,Zy=Wy=null}finally{Ge=v,F.p=m,L.T=u}}a.current=s,kt=2}}function p_(){if(kt===2){kt=0;var a=xi,s=tl,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=L.T,L.T=null;var m=F.p;F.p=2;var v=Ge;Ge|=4;try{FN(a,s.alternate,s)}finally{Ge=v,F.p=m,L.T=u}}kt=3}}function g_(){if(kt===4||kt===3){kt=0,kd();var a=xi,s=tl,u=Pa,m=r_;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?kt=5:(kt=0,tl=xi=null,y_(a,a.pendingLanes));var v=a.pendingLanes;if(v===0&&(vi=null),ag(u),s=s.stateNode,Hr&&typeof Hr.onCommitFiberRoot=="function")try{Hr.onCommitFiberRoot(fu,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=L.T,v=F.p,F.p=2,L.T=null;try{for(var j=a.onRecoverableError,O=0;O<m.length;O++){var P=m[O];j(P.value,{componentStack:P.stack})}}finally{L.T=s,F.p=v}}(Pa&3)!==0&&Lf(),Qn(a),v=a.pendingLanes,(u&261930)!==0&&(v&42)!==0?a===Iy?Yu++:(Yu=0,Iy=a):Yu=0,Vu(0)}}function y_(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Au(s)))}function Lf(){return m_(),p_(),g_(),v_()}function v_(){if(kt!==5)return!1;var a=xi,s=Ly;Ly=0;var u=ag(Pa),m=L.T,v=F.p;try{F.p=32>u?32:u,L.T=null,u=$y,$y=null;var j=xi,O=Pa;if(kt=0,tl=xi=null,Pa=0,(Ge&6)!==0)throw Error(n(331));var P=Ge;if(Ge|=4,JN(j.current),XN(j,j.current,O,u),Ge=P,Vu(0,!1),Hr&&typeof Hr.onPostCommitFiberRoot=="function")try{Hr.onPostCommitFiberRoot(fu,j)}catch{}return!0}finally{F.p=v,L.T=m,y_(a,s)}}function x_(a,s,u){s=fn(u,s),s=gy(a.stateNode,s,2),a=fi(a,s,2),a!==null&&(mu(a,2),Qn(a))}function Qe(a,s,u){if(a.tag===3)x_(a,a,u);else for(;s!==null;){if(s.tag===3){x_(s,a,u);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(vi===null||!vi.has(m))){a=fn(u,a),u=bN(2),m=fi(s,u,2),m!==null&&(jN(u,m,s,a),mu(m,2),Qn(m));break}}s=s.return}}function Uy(a,s,u){var m=a.pingCache;if(m===null){m=a.pingCache=new W$;var v=new Set;m.set(s,v)}else v=m.get(s),v===void 0&&(v=new Set,m.set(s,v));v.has(u)||(My=!0,v.add(u),a=rI.bind(null,a,s,u),s.then(a,a))}function rI(a,s,u){var m=a.pingCache;m!==null&&m.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,rt===a&&(De&u)===u&&(yt===4||yt===3&&(De&62914560)===De&&300>Ce()-Cf?(Ge&2)===0&&rl(a,0):Dy|=u,el===De&&(el=0)),Qn(a)}function b_(a,s){s===0&&(s=mS()),a=cs(a,s),a!==null&&(mu(a,s),Qn(a))}function nI(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),b_(a,u)}function aI(a,s){var u=0;switch(a.tag){case 31:case 13:var m=a.stateNode,v=a.memoizedState;v!==null&&(u=v.retryLane);break;case 19:m=a.stateNode;break;case 22:m=a.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(s),b_(a,u)}function iI(a,s){return du(a,s)}var $f=null,al=null,qy=!1,If=!1,Fy=!1,ji=0;function Qn(a){a!==al&&a.next===null&&(al===null?$f=al=a:al=al.next=a),If=!0,qy||(qy=!0,oI())}function Vu(a,s){if(!Fy&&If){Fy=!0;do for(var u=!1,m=$f;m!==null;){if(a!==0){var v=m.pendingLanes;if(v===0)var j=0;else{var O=m.suspendedLanes,P=m.pingedLanes;j=(1<<31-Kr(42|a)+1)-1,j&=v&~(O&~P),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(u=!0,N_(m,j))}else j=De,j=Ud(m,m===rt?j:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(j&3)===0||hu(m,j)||(u=!0,N_(m,j));m=m.next}while(u);Fy=!1}}function sI(){j_()}function j_(){If=qy=!1;var a=0;ji!==0&&yI()&&(a=ji);for(var s=Ce(),u=null,m=$f;m!==null;){var v=m.next,j=w_(m,s);j===0?(m.next=null,u===null?$f=v:u.next=v,v===null&&(al=u)):(u=m,(a!==0||(j&3)!==0)&&(If=!0)),m=v}kt!==0&&kt!==5||Vu(a),ji!==0&&(ji=0)}function w_(a,s){for(var u=a.suspendedLanes,m=a.pingedLanes,v=a.expirationTimes,j=a.pendingLanes&-62914561;0<j;){var O=31-Kr(j),P=1<<O,I=v[O];I===-1?((P&u)===0||(P&m)!==0)&&(v[O]=ML(P,s)):I<=s&&(a.expiredLanes|=P),j&=~P}if(s=rt,u=De,u=Ud(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,u===0||a===s&&(Ve===2||Ve===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&No(m),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||hu(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(m!==null&&No(m),ag(u)){case 2:case 8:u=Ld;break;case 32:u=$d;break;case 268435456:u=hS;break;default:u=$d}return m=S_.bind(null,a),u=du(u,m),a.callbackPriority=s,a.callbackNode=u,s}return m!==null&&m!==null&&No(m),a.callbackPriority=2,a.callbackNode=null,2}function S_(a,s){if(kt!==0&&kt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(Lf()&&a.callbackNode!==u)return null;var m=De;return m=Ud(a,a===rt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(a_(a,m,s),w_(a,Ce()),a.callbackNode!=null&&a.callbackNode===u?S_.bind(null,a):null)}function N_(a,s){if(Lf())return null;a_(a,s,!0)}function oI(){xI(function(){(Ge&6)!==0?du(Kn,sI):j_()})}function Hy(){if(ji===0){var a=Fo;a===0&&(a=Id,Id<<=1,(Id&261888)===0&&(Id=256)),ji=a}return ji}function __(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Kd(""+a)}function O_(a,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,a.id&&u.setAttribute("form",a.id),s.parentNode.insertBefore(u,s),a=new FormData(a),u.parentNode.removeChild(u),a}function lI(a,s,u,m,v){if(s==="submit"&&u&&u.stateNode===v){var j=__((v[Cr]||null).action),O=m.submitter;O&&(s=(s=O[Cr]||null)?__(s.formAction):O.getAttribute("formAction"),s!==null&&(j=s,O=null));var P=new Qd("action","action",null,m,v);a.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(ji!==0){var I=O?O_(v,O):new FormData(v);cy(u,{pending:!0,data:I,method:v.method,action:j},null,I)}}else typeof j=="function"&&(P.preventDefault(),I=O?O_(v,O):new FormData(v),cy(u,{pending:!0,data:I,method:v.method,action:j},j,I))},currentTarget:v}]})}}for(var Ky=0;Ky<Eg.length;Ky++){var Gy=Eg[Ky],uI=Gy.toLowerCase(),cI=Gy[0].toUpperCase()+Gy.slice(1);Rn(uI,"on"+cI)}Rn(n1,"onAnimationEnd"),Rn(a1,"onAnimationIteration"),Rn(i1,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(O$,"onTransitionRun"),Rn(E$,"onTransitionStart"),Rn(A$,"onTransitionCancel"),Rn(s1,"onTransitionEnd"),To("onMouseEnter",["mouseout","mouseover"]),To("onMouseLeave",["mouseout","mouseover"]),To("onPointerEnter",["pointerout","pointerover"]),To("onPointerLeave",["pointerout","pointerover"]),ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ss("onBeforeInput",["compositionend","keypress","textInput","paste"]),ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qu="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(" "),dI=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Qu));function E_(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var m=a[u],v=m.event;m=m.listeners;e:{var j=void 0;if(s)for(var O=m.length-1;0<=O;O--){var P=m[O],I=P.instance,V=P.currentTarget;if(P=P.listener,I!==j&&v.isPropagationStopped())break e;j=P,v.currentTarget=V;try{j(v)}catch(ne){Zd(ne)}v.currentTarget=null,j=I}else for(O=0;O<m.length;O++){if(P=m[O],I=P.instance,V=P.currentTarget,P=P.listener,I!==j&&v.isPropagationStopped())break e;j=P,v.currentTarget=V;try{j(v)}catch(ne){Zd(ne)}v.currentTarget=null,j=I}}}}function Re(a,s){var u=s[ig];u===void 0&&(u=s[ig]=new Set);var m=a+"__bubble";u.has(m)||(A_(s,a,2,!1),u.add(m))}function Yy(a,s,u){var m=0;s&&(m|=4),A_(u,a,m,s)}var zf="_reactListening"+Math.random().toString(36).slice(2);function Vy(a){if(!a[zf]){a[zf]=!0,jS.forEach(function(u){u!=="selectionchange"&&(dI.has(u)||Yy(u,!1,a),Yy(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[zf]||(s[zf]=!0,Yy("selectionchange",!1,s))}}function A_(a,s,u,m){switch(nO(s)){case 2:var v=zI;break;case 8:v=BI;break;default:v=uv}u=v.bind(null,s,u,a),v=void 0,!mg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),m?v!==void 0?a.addEventListener(s,u,{capture:!0,passive:v}):a.addEventListener(s,u,!0):v!==void 0?a.addEventListener(s,u,{passive:v}):a.addEventListener(s,u,!1)}function Qy(a,s,u,m,v){var j=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var O=m.tag;if(O===3||O===4){var P=m.stateNode.containerInfo;if(P===v)break;if(O===4)for(O=m.return;O!==null;){var I=O.tag;if((I===3||I===4)&&O.stateNode.containerInfo===v)return;O=O.return}for(;P!==null;){if(O=Oo(P),O===null)return;if(I=O.tag,I===5||I===6||I===26||I===27){m=j=O;continue e}P=P.parentNode}}m=m.return}MS(function(){var V=j,ne=fg(u),se=[];e:{var W=o1.get(a);if(W!==void 0){var ee=Qd,me=a;switch(a){case"keypress":if(Yd(u)===0)break e;case"keydown":case"keyup":ee=a$;break;case"focusin":me="focus",ee=vg;break;case"focusout":me="blur",ee=vg;break;case"beforeblur":case"afterblur":ee=vg;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=LS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=GL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=o$;break;case n1:case a1:case i1:ee=QL;break;case s1:ee=u$;break;case"scroll":case"scrollend":ee=HL;break;case"wheel":ee=d$;break;case"copy":case"cut":case"paste":ee=WL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=IS;break;case"toggle":case"beforetoggle":ee=h$}var Se=(s&4)!==0,et=!Se&&(a==="scroll"||a==="scrollend"),K=Se?W!==null?W+"Capture":null:W;Se=[];for(var B=V,Y;B!==null;){var ie=B;if(Y=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||Y===null||K===null||(ie=yu(B,K),ie!=null&&Se.push(Xu(B,ie,Y))),et)break;B=B.return}0<Se.length&&(W=new ee(W,me,null,u,ne),se.push({event:W,listeners:Se}))}}if((s&7)===0){e:{if(W=a==="mouseover"||a==="pointerover",ee=a==="mouseout"||a==="pointerout",W&&u!==dg&&(me=u.relatedTarget||u.fromElement)&&(Oo(me)||me[_o]))break e;if((ee||W)&&(W=ne.window===ne?ne:(W=ne.ownerDocument)?W.defaultView||W.parentWindow:window,ee?(me=u.relatedTarget||u.toElement,ee=V,me=me?Oo(me):null,me!==null&&(et=o(me),Se=me.tag,me!==et||Se!==5&&Se!==27&&Se!==6)&&(me=null)):(ee=null,me=V),ee!==me)){if(Se=LS,ie="onMouseLeave",K="onMouseEnter",B="mouse",(a==="pointerout"||a==="pointerover")&&(Se=IS,ie="onPointerLeave",K="onPointerEnter",B="pointer"),et=ee==null?W:gu(ee),Y=me==null?W:gu(me),W=new Se(ie,B+"leave",ee,u,ne),W.target=et,W.relatedTarget=Y,ie=null,Oo(ne)===V&&(Se=new Se(K,B+"enter",me,u,ne),Se.target=Y,Se.relatedTarget=et,ie=Se),et=ie,ee&&me)t:{for(Se=fI,K=ee,B=me,Y=0,ie=K;ie;ie=Se(ie))Y++;ie=0;for(var be=B;be;be=Se(be))ie++;for(;0<Y-ie;)K=Se(K),Y--;for(;0<ie-Y;)B=Se(B),ie--;for(;Y--;){if(K===B||B!==null&&K===B.alternate){Se=K;break t}K=Se(K),B=Se(B)}Se=null}else Se=null;ee!==null&&T_(se,W,ee,Se,!1),me!==null&&et!==null&&T_(se,et,me,Se,!0)}}e:{if(W=V?gu(V):window,ee=W.nodeName&&W.nodeName.toLowerCase(),ee==="select"||ee==="input"&&W.type==="file")var qe=GS;else if(HS(W))if(YS)qe=S$;else{qe=j$;var ye=b$}else ee=W.nodeName,!ee||ee.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?V&&cg(V.elementType)&&(qe=GS):qe=w$;if(qe&&(qe=qe(a,V))){KS(se,qe,u,ne);break e}ye&&ye(a,W,V),a==="focusout"&&V&&W.type==="number"&&V.memoizedProps.value!=null&&ug(W,"number",W.value)}switch(ye=V?gu(V):window,a){case"focusin":(HS(ye)||ye.contentEditable==="true")&&(ko=ye,Ng=V,_u=null);break;case"focusout":_u=Ng=ko=null;break;case"mousedown":_g=!0;break;case"contextmenu":case"mouseup":case"dragend":_g=!1,t1(se,u,ne);break;case"selectionchange":if(_$)break;case"keydown":case"keyup":t1(se,u,ne)}var Te;if(bg)e:{switch(a){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else Do?qS(a,u)&&(ke="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(ke="onCompositionStart");ke&&(zS&&u.locale!=="ko"&&(Do||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Do&&(Te=DS()):(ii=ne,pg="value"in ii?ii.value:ii.textContent,Do=!0)),ye=Bf(V,ke),0<ye.length&&(ke=new $S(ke,a,null,u,ne),se.push({event:ke,listeners:ye}),Te?ke.data=Te:(Te=FS(u),Te!==null&&(ke.data=Te)))),(Te=p$?g$(a,u):y$(a,u))&&(ke=Bf(V,"onBeforeInput"),0<ke.length&&(ye=new $S("onBeforeInput","beforeinput",null,u,ne),se.push({event:ye,listeners:ke}),ye.data=Te)),lI(se,a,V,u,ne)}E_(se,s)})}function Xu(a,s,u){return{instance:a,listener:s,currentTarget:u}}function Bf(a,s){for(var u=s+"Capture",m=[];a!==null;){var v=a,j=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||j===null||(v=yu(a,u),v!=null&&m.unshift(Xu(a,v,j)),v=yu(a,s),v!=null&&m.push(Xu(a,v,j))),a.tag===3)return m;a=a.return}return[]}function fI(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function T_(a,s,u,m,v){for(var j=s._reactName,O=[];u!==null&&u!==m;){var P=u,I=P.alternate,V=P.stateNode;if(P=P.tag,I!==null&&I===m)break;P!==5&&P!==26&&P!==27||V===null||(I=V,v?(V=yu(u,j),V!=null&&O.unshift(Xu(u,V,I))):v||(V=yu(u,j),V!=null&&O.push(Xu(u,V,I)))),u=u.return}O.length!==0&&a.push({event:s,listeners:O})}var hI=/\r\n?/g,mI=/\u0000|\uFFFD/g;function C_(a){return(typeof a=="string"?a:""+a).replace(hI,`
|
|
49
|
+
`).replace(mI,"")}function P_(a,s){return s=C_(s),C_(a)===s}function Je(a,s,u,m,v,j){switch(u){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||Po(a,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&Po(a,""+m);break;case"className":Fd(a,"class",m);break;case"tabIndex":Fd(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Fd(a,u,m);break;case"style":PS(a,m,j);break;case"data":if(s!=="object"){Fd(a,"data",m);break}case"src":case"href":if(m===""&&(s!=="a"||u!=="href")){a.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=Kd(""+m),a.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){a.setAttribute(u,"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 j=="function"&&(u==="formAction"?(s!=="input"&&Je(a,s,"name",v.name,v,null),Je(a,s,"formEncType",v.formEncType,v,null),Je(a,s,"formMethod",v.formMethod,v,null),Je(a,s,"formTarget",v.formTarget,v,null)):(Je(a,s,"encType",v.encType,v,null),Je(a,s,"method",v.method,v,null),Je(a,s,"target",v.target,v,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=Kd(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=ga);break;case"onScroll":m!=null&&Re("scroll",a);break;case"onScrollEnd":m!=null&&Re("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(u=m.__html,u!=null){if(v.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"multiple":a.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":a.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){a.removeAttribute("xlink:href");break}u=Kd(""+m),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""+m):a.removeAttribute(u);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":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":m===!0?a.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,m):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(u,m):a.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(u):a.setAttribute(u,m);break;case"popover":Re("beforetoggle",a),Re("toggle",a),qd(a,"popover",m);break;case"xlinkActuate":pa(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":pa(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":pa(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":pa(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":pa(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":pa(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":pa(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":pa(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":pa(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":qd(a,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=qL.get(u)||u,qd(a,u,m))}}function Xy(a,s,u,m,v,j){switch(u){case"style":PS(a,m,j);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(u=m.__html,u!=null){if(v.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"children":typeof m=="string"?Po(a,m):(typeof m=="number"||typeof m=="bigint")&&Po(a,""+m);break;case"onScroll":m!=null&&Re("scroll",a);break;case"onScrollEnd":m!=null&&Re("scrollend",a);break;case"onClick":m!=null&&(a.onclick=ga);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wS.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(v=u.endsWith("Capture"),s=u.slice(2,v?u.length-7:void 0),j=a[Cr]||null,j=j!=null?j[u]:null,typeof j=="function"&&a.removeEventListener(s,j,v),typeof m=="function")){typeof j!="function"&&j!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,m,v);break e}u in a?a[u]=m:m===!0?a.setAttribute(u,""):qd(a,u,m)}}}function rr(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",a),Re("load",a);var m=!1,v=!1,j;for(j in u)if(u.hasOwnProperty(j)){var O=u[j];if(O!=null)switch(j){case"src":m=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:Je(a,s,j,O,u,null)}}v&&Je(a,s,"srcSet",u.srcSet,u,null),m&&Je(a,s,"src",u.src,u,null);return;case"input":Re("invalid",a);var P=j=O=v=null,I=null,V=null;for(m in u)if(u.hasOwnProperty(m)){var ne=u[m];if(ne!=null)switch(m){case"name":v=ne;break;case"type":O=ne;break;case"checked":I=ne;break;case"defaultChecked":V=ne;break;case"value":j=ne;break;case"defaultValue":P=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(n(137,s));break;default:Je(a,s,m,ne,u,null)}}ES(a,j,P,I,V,O,v,!1);return;case"select":Re("invalid",a),m=O=j=null;for(v in u)if(u.hasOwnProperty(v)&&(P=u[v],P!=null))switch(v){case"value":j=P;break;case"defaultValue":O=P;break;case"multiple":m=P;default:Je(a,s,v,P,u,null)}s=j,u=O,a.multiple=!!m,s!=null?Co(a,!!m,s,!1):u!=null&&Co(a,!!m,u,!0);return;case"textarea":Re("invalid",a),j=v=m=null;for(O in u)if(u.hasOwnProperty(O)&&(P=u[O],P!=null))switch(O){case"value":m=P;break;case"defaultValue":v=P;break;case"children":j=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(n(91));break;default:Je(a,s,O,P,u,null)}TS(a,m,v,j);return;case"option":for(I in u)if(u.hasOwnProperty(I)&&(m=u[I],m!=null))switch(I){case"selected":a.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:Je(a,s,I,m,u,null)}return;case"dialog":Re("beforetoggle",a),Re("toggle",a),Re("cancel",a),Re("close",a);break;case"iframe":case"object":Re("load",a);break;case"video":case"audio":for(m=0;m<Qu.length;m++)Re(Qu[m],a);break;case"image":Re("error",a),Re("load",a);break;case"details":Re("toggle",a);break;case"embed":case"source":case"link":Re("error",a),Re("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in u)if(u.hasOwnProperty(V)&&(m=u[V],m!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:Je(a,s,V,m,u,null)}return;default:if(cg(s)){for(ne in u)u.hasOwnProperty(ne)&&(m=u[ne],m!==void 0&&Xy(a,s,ne,m,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(m=u[P],m!=null&&Je(a,s,P,m,u,null))}function pI(a,s,u,m){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,j=null,O=null,P=null,I=null,V=null,ne=null;for(ee in u){var se=u[ee];if(u.hasOwnProperty(ee)&&se!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":I=se;default:m.hasOwnProperty(ee)||Je(a,s,ee,null,m,se)}}for(var W in m){var ee=m[W];if(se=u[W],m.hasOwnProperty(W)&&(ee!=null||se!=null))switch(W){case"type":j=ee;break;case"name":v=ee;break;case"checked":V=ee;break;case"defaultChecked":ne=ee;break;case"value":O=ee;break;case"defaultValue":P=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(n(137,s));break;default:ee!==se&&Je(a,s,W,ee,m,se)}}lg(a,O,P,I,V,ne,j,v);return;case"select":ee=O=P=W=null;for(j in u)if(I=u[j],u.hasOwnProperty(j)&&I!=null)switch(j){case"value":break;case"multiple":ee=I;default:m.hasOwnProperty(j)||Je(a,s,j,null,m,I)}for(v in m)if(j=m[v],I=u[v],m.hasOwnProperty(v)&&(j!=null||I!=null))switch(v){case"value":W=j;break;case"defaultValue":P=j;break;case"multiple":O=j;default:j!==I&&Je(a,s,v,j,m,I)}s=P,u=O,m=ee,W!=null?Co(a,!!u,W,!1):!!m!=!!u&&(s!=null?Co(a,!!u,s,!0):Co(a,!!u,u?[]:"",!1));return;case"textarea":ee=W=null;for(P in u)if(v=u[P],u.hasOwnProperty(P)&&v!=null&&!m.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:Je(a,s,P,null,m,v)}for(O in m)if(v=m[O],j=u[O],m.hasOwnProperty(O)&&(v!=null||j!=null))switch(O){case"value":W=v;break;case"defaultValue":ee=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(n(91));break;default:v!==j&&Je(a,s,O,v,m,j)}AS(a,W,ee);return;case"option":for(var me in u)if(W=u[me],u.hasOwnProperty(me)&&W!=null&&!m.hasOwnProperty(me))switch(me){case"selected":a.selected=!1;break;default:Je(a,s,me,null,m,W)}for(I in m)if(W=m[I],ee=u[I],m.hasOwnProperty(I)&&W!==ee&&(W!=null||ee!=null))switch(I){case"selected":a.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:Je(a,s,I,W,m,ee)}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 Se in u)W=u[Se],u.hasOwnProperty(Se)&&W!=null&&!m.hasOwnProperty(Se)&&Je(a,s,Se,null,m,W);for(V in m)if(W=m[V],ee=u[V],m.hasOwnProperty(V)&&W!==ee&&(W!=null||ee!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(n(137,s));break;default:Je(a,s,V,W,m,ee)}return;default:if(cg(s)){for(var et in u)W=u[et],u.hasOwnProperty(et)&&W!==void 0&&!m.hasOwnProperty(et)&&Xy(a,s,et,void 0,m,W);for(ne in m)W=m[ne],ee=u[ne],!m.hasOwnProperty(ne)||W===ee||W===void 0&&ee===void 0||Xy(a,s,ne,W,m,ee);return}}for(var K in u)W=u[K],u.hasOwnProperty(K)&&W!=null&&!m.hasOwnProperty(K)&&Je(a,s,K,null,m,W);for(se in m)W=m[se],ee=u[se],!m.hasOwnProperty(se)||W===ee||W==null&&ee==null||Je(a,s,se,W,m,ee)}function R_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gI(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var v=u[m],j=v.transferSize,O=v.initiatorType,P=v.duration;if(j&&P&&R_(O)){for(O=0,P=v.responseEnd,m+=1;m<u.length;m++){var I=u[m],V=I.startTime;if(V>P)break;var ne=I.transferSize,se=I.initiatorType;ne&&R_(se)&&(I=I.responseEnd,O+=ne*(I<P?1:(P-V)/(I-V)))}if(--m,s+=8*(j+O)/(v.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Wy=null,Zy=null;function Uf(a){return a.nodeType===9?a:a.ownerDocument}function M_(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function D_(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function Jy(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ev=null;function yI(){var a=window.event;return a&&a.type==="popstate"?a===ev?!1:(ev=a,!0):(ev=null,!1)}var k_=typeof setTimeout=="function"?setTimeout:void 0,vI=typeof clearTimeout=="function"?clearTimeout:void 0,L_=typeof Promise=="function"?Promise:void 0,xI=typeof queueMicrotask=="function"?queueMicrotask:typeof L_<"u"?function(a){return L_.resolve(null).then(a).catch(bI)}:k_;function bI(a){setTimeout(function(){throw a})}function wi(a){return a==="head"}function $_(a,s){var u=s,m=0;do{var v=u.nextSibling;if(a.removeChild(u),v&&v.nodeType===8)if(u=v.data,u==="/$"||u==="/&"){if(m===0){a.removeChild(v),ll(s);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Wu(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Wu(u);for(var j=u.firstChild;j;){var O=j.nextSibling,P=j.nodeName;j[pu]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&j.rel.toLowerCase()==="stylesheet"||u.removeChild(j),j=O}}else u==="body"&&Wu(a.ownerDocument.body);u=v}while(u);ll(s)}function I_(a,s){var u=a;a=0;do{var m=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=m}while(u)}function tv(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":tv(u),sg(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function jI(a,s,u,m){for(;a.nodeType===1;){var v=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[pu])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(j=a.getAttribute("rel"),j==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(j!==v.rel||a.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||a.getAttribute("title")!==(v.title==null?null:v.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(j=a.getAttribute("src"),(j!==(v.src==null?null:v.src)||a.getAttribute("type")!==(v.type==null?null:v.type)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&j&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var j=v.name==null?null:""+v.name;if(v.type==="hidden"&&a.getAttribute("name")===j)return a}else return a;if(a=yn(a.nextSibling),a===null)break}return null}function wI(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=yn(a.nextSibling),a===null))return null;return a}function z_(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=yn(a.nextSibling),a===null))return null;return a}function rv(a){return a.data==="$?"||a.data==="$~"}function nv(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function SI(a,s){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||u.readyState!=="loading")s();else{var m=function(){s(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),a._reactRetry=m}}function yn(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var av=null;function B_(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return yn(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function U_(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return a;s--}else u!=="/$"&&u!=="/&"||s++}a=a.previousSibling}return null}function q_(a,s,u){switch(s=Uf(u),a){case"html":if(a=s.documentElement,!a)throw Error(n(452));return a;case"head":if(a=s.head,!a)throw Error(n(453));return a;case"body":if(a=s.body,!a)throw Error(n(454));return a;default:throw Error(n(451))}}function Wu(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);sg(a)}var vn=new Map,F_=new Set;function qf(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ra=F.d;F.d={f:NI,r:_I,D:OI,C:EI,L:AI,m:TI,X:PI,S:CI,M:RI};function NI(){var a=Ra.f(),s=Mf();return a||s}function _I(a){var s=Eo(a);s!==null&&s.tag===5&&s.type==="form"?sN(s):Ra.r(a)}var il=typeof document>"u"?null:document;function H_(a,s,u){var m=il;if(m&&typeof s=="string"&&s){var v=cn(s);v='link[rel="'+a+'"][href="'+v+'"]',typeof u=="string"&&(v+='[crossorigin="'+u+'"]'),F_.has(v)||(F_.add(v),a={rel:a,crossOrigin:u,href:s},m.querySelector(v)===null&&(s=m.createElement("link"),rr(s,"link",a),qt(s),m.head.appendChild(s)))}}function OI(a){Ra.D(a),H_("dns-prefetch",a,null)}function EI(a,s){Ra.C(a,s),H_("preconnect",a,s)}function AI(a,s,u){Ra.L(a,s,u);var m=il;if(m&&a&&s){var v='link[rel="preload"][as="'+cn(s)+'"]';s==="image"&&u&&u.imageSrcSet?(v+='[imagesrcset="'+cn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(v+='[imagesizes="'+cn(u.imageSizes)+'"]')):v+='[href="'+cn(a)+'"]';var j=v;switch(s){case"style":j=sl(a);break;case"script":j=ol(a)}vn.has(j)||(a=g({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),vn.set(j,a),m.querySelector(v)!==null||s==="style"&&m.querySelector(Zu(j))||s==="script"&&m.querySelector(Ju(j))||(s=m.createElement("link"),rr(s,"link",a),qt(s),m.head.appendChild(s)))}}function TI(a,s){Ra.m(a,s);var u=il;if(u&&a){var m=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+cn(m)+'"][href="'+cn(a)+'"]',j=v;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=ol(a)}if(!vn.has(j)&&(a=g({rel:"modulepreload",href:a},s),vn.set(j,a),u.querySelector(v)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Ju(j)))return}m=u.createElement("link"),rr(m,"link",a),qt(m),u.head.appendChild(m)}}}function CI(a,s,u){Ra.S(a,s,u);var m=il;if(m&&a){var v=Ao(m).hoistableStyles,j=sl(a);s=s||"default";var O=v.get(j);if(!O){var P={loading:0,preload:null};if(O=m.querySelector(Zu(j)))P.loading=5;else{a=g({rel:"stylesheet",href:a,"data-precedence":s},u),(u=vn.get(j))&&iv(a,u);var I=O=m.createElement("link");qt(I),rr(I,"link",a),I._p=new Promise(function(V,ne){I.onload=V,I.onerror=ne}),I.addEventListener("load",function(){P.loading|=1}),I.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Ff(O,s,m)}O={type:"stylesheet",instance:O,count:1,state:P},v.set(j,O)}}}function PI(a,s){Ra.X(a,s);var u=il;if(u&&a){var m=Ao(u).hoistableScripts,v=ol(a),j=m.get(v);j||(j=u.querySelector(Ju(v)),j||(a=g({src:a,async:!0},s),(s=vn.get(v))&&sv(a,s),j=u.createElement("script"),qt(j),rr(j,"link",a),u.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},m.set(v,j))}}function RI(a,s){Ra.M(a,s);var u=il;if(u&&a){var m=Ao(u).hoistableScripts,v=ol(a),j=m.get(v);j||(j=u.querySelector(Ju(v)),j||(a=g({src:a,async:!0,type:"module"},s),(s=vn.get(v))&&sv(a,s),j=u.createElement("script"),qt(j),rr(j,"link",a),u.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},m.set(v,j))}}function K_(a,s,u,m){var v=(v=xe.current)?qf(v):null;if(!v)throw Error(n(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=sl(u.href),u=Ao(v).hoistableStyles,m=u.get(s),m||(m={type:"style",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=sl(u.href);var j=Ao(v).hoistableStyles,O=j.get(a);if(O||(v=v.ownerDocument||v,O={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(a,O),(j=v.querySelector(Zu(a)))&&!j._p&&(O.instance=j,O.state.loading=5),vn.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},vn.set(a,u),j||MI(v,a,u,O.state))),s&&m===null)throw Error(n(528,""));return O}if(s&&m!==null)throw Error(n(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=ol(u),u=Ao(v).hoistableScripts,m=u.get(s),m||(m={type:"script",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,a))}}function sl(a){return'href="'+cn(a)+'"'}function Zu(a){return'link[rel="stylesheet"]['+a+"]"}function G_(a){return g({},a,{"data-precedence":a.precedence,precedence:null})}function MI(a,s,u,m){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?m.loading=1:(s=a.createElement("link"),m.preload=s,s.addEventListener("load",function(){return m.loading|=1}),s.addEventListener("error",function(){return m.loading|=2}),rr(s,"link",u),qt(s),a.head.appendChild(s))}function ol(a){return'[src="'+cn(a)+'"]'}function Ju(a){return"script[async]"+a}function Y_(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var m=a.querySelector('style[data-href~="'+cn(u.href)+'"]');if(m)return s.instance=m,qt(m),m;var v=g({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),qt(m),rr(m,"style",v),Ff(m,u.precedence,a),s.instance=m;case"stylesheet":v=sl(u.href);var j=a.querySelector(Zu(v));if(j)return s.state.loading|=4,s.instance=j,qt(j),j;m=G_(u),(v=vn.get(v))&&iv(m,v),j=(a.ownerDocument||a).createElement("link"),qt(j);var O=j;return O._p=new Promise(function(P,I){O.onload=P,O.onerror=I}),rr(j,"link",m),s.state.loading|=4,Ff(j,u.precedence,a),s.instance=j;case"script":return j=ol(u.src),(v=a.querySelector(Ju(j)))?(s.instance=v,qt(v),v):(m=u,(v=vn.get(j))&&(m=g({},u),sv(m,v)),a=a.ownerDocument||a,v=a.createElement("script"),qt(v),rr(v,"link",m),a.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(n(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(m=s.instance,s.state.loading|=4,Ff(m,u.precedence,a));return s.instance}function Ff(a,s,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=m.length?m[m.length-1]:null,j=v,O=0;O<m.length;O++){var P=m[O];if(P.dataset.precedence===s)j=P;else if(j!==v)break}j?j.parentNode.insertBefore(a,j.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function iv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function sv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var Hf=null;function V_(a,s,u){if(Hf===null){var m=new Map,v=Hf=new Map;v.set(u,m)}else v=Hf,m=v.get(u),m||(m=new Map,v.set(u,m));if(m.has(a))return m;for(m.set(a,null),u=u.getElementsByTagName(a),v=0;v<u.length;v++){var j=u[v];if(!(j[pu]||j[Zt]||a==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var O=j.getAttribute(s)||"";O=a+O;var P=m.get(O);P?P.push(j):m.set(O,[j])}}return m}function Q_(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function DI(a,s,u){if(u===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return a=s.disabled,typeof s.precedence=="string"&&a==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function X_(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function kI(a,s,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var v=sl(m.href),j=s.querySelector(Zu(v));if(j){s=j._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Kf.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=j,qt(j);return}j=s.ownerDocument||s,m=G_(m),(v=vn.get(v))&&iv(m,v),j=j.createElement("link"),qt(j);var O=j;O._p=new Promise(function(P,I){O.onload=P,O.onerror=I}),rr(j,"link",m),u.instance=j}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=Kf.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var ov=0;function LI(a,s){return a.stylesheets&&a.count===0&&Yf(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&Yf(a,a.stylesheets),a.unsuspend){var j=a.unsuspend;a.unsuspend=null,j()}},6e4+s);0<a.imgBytes&&ov===0&&(ov=62500*gI());var v=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Yf(a,a.stylesheets),a.unsuspend)){var j=a.unsuspend;a.unsuspend=null,j()}},(a.imgBytes>ov?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(v)}}:null}function Kf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Gf=null;function Yf(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Gf=new Map,s.forEach($I,a),Gf=null,Kf.call(a))}function $I(a,s){if(!(s.state.loading&4)){var u=Gf.get(a);if(u)var m=u.get(null);else{u=new Map,Gf.set(a,u);for(var v=a.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<v.length;j++){var O=v[j];(O.nodeName==="LINK"||O.getAttribute("media")!=="not all")&&(u.set(O.dataset.precedence,O),m=O)}m&&u.set(null,m)}v=s.instance,O=v.getAttribute("data-precedence"),j=u.get(O)||m,j===m&&u.set(null,v),u.set(O,v),this.count++,m=Kf.bind(this),v.addEventListener("load",m),v.addEventListener("error",m),j?j.parentNode.insertBefore(v,j.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(v,a.firstChild)),s.state.loading|=4}}var ec={$$typeof:T,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function II(a,s,u,m,v,j,O,P,I){this.tag=1,this.containerInfo=a,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=rg(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rg(0),this.hiddenUpdates=rg(null),this.identifierPrefix=m,this.onUncaughtError=v,this.onCaughtError=j,this.onRecoverableError=O,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function W_(a,s,u,m,v,j,O,P,I,V,ne,se){return a=new II(a,s,u,O,I,V,ne,se,P),s=1,j===!0&&(s|=24),j=Yr(3,null,null,s),a.current=j,j.stateNode=a,s=Bg(),s.refCount++,a.pooledCache=s,s.refCount++,j.memoizedState={element:m,isDehydrated:u,cache:s},Hg(j),a}function Z_(a){return a?(a=Io,a):Io}function J_(a,s,u,m,v,j){v=Z_(v),m.context===null?m.context=v:m.pendingContext=v,m=di(s),m.payload={element:u},j=j===void 0?null:j,j!==null&&(m.callback=j),u=fi(a,m,s),u!==null&&(Lr(u,a,s),Ru(u,a,s))}function eO(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function lv(a,s){eO(a,s),(a=a.alternate)&&eO(a,s)}function tO(a){if(a.tag===13||a.tag===31){var s=cs(a,67108864);s!==null&&Lr(s,a,67108864),lv(a,67108864)}}function rO(a){if(a.tag===13||a.tag===31){var s=Zr();s=ng(s);var u=cs(a,s);u!==null&&Lr(u,a,s),lv(a,s)}}var Vf=!0;function zI(a,s,u,m){var v=L.T;L.T=null;var j=F.p;try{F.p=2,uv(a,s,u,m)}finally{F.p=j,L.T=v}}function BI(a,s,u,m){var v=L.T;L.T=null;var j=F.p;try{F.p=8,uv(a,s,u,m)}finally{F.p=j,L.T=v}}function uv(a,s,u,m){if(Vf){var v=cv(m);if(v===null)Qy(a,s,m,Qf,u),aO(a,m);else if(qI(v,a,s,u,m))m.stopPropagation();else if(aO(a,m),s&4&&-1<UI.indexOf(a)){for(;v!==null;){var j=Eo(v);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var O=is(j.pendingLanes);if(O!==0){var P=j;for(P.pendingLanes|=2,P.entangledLanes|=2;O;){var I=1<<31-Kr(O);P.entanglements[1]|=I,O&=~I}Qn(j),(Ge&6)===0&&(Pf=Ce()+500,Vu(0))}}break;case 31:case 13:P=cs(j,2),P!==null&&Lr(P,j,2),Mf(),lv(j,2)}if(j=cv(m),j===null&&Qy(a,s,m,Qf,u),j===v)break;v=j}v!==null&&m.stopPropagation()}else Qy(a,s,m,null,u)}}function cv(a){return a=fg(a),dv(a)}var Qf=null;function dv(a){if(Qf=null,a=Oo(a),a!==null){var s=o(a);if(s===null)a=null;else{var u=s.tag;if(u===13){if(a=l(s),a!==null)return a;a=null}else if(u===31){if(a=c(s),a!==null)return a;a=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return Qf=a,null}function nO(a){switch(a){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(mr()){case Kn:return 2;case Ld:return 8;case $d:case EL:return 32;case hS:return 268435456;default:return 32}default:return 32}}var fv=!1,Si=null,Ni=null,_i=null,tc=new Map,rc=new Map,Oi=[],UI="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 aO(a,s){switch(a){case"focusin":case"focusout":Si=null;break;case"dragenter":case"dragleave":Ni=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":tc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":rc.delete(s.pointerId)}}function nc(a,s,u,m,v,j){return a===null||a.nativeEvent!==j?(a={blockedOn:s,domEventName:u,eventSystemFlags:m,nativeEvent:j,targetContainers:[v]},s!==null&&(s=Eo(s),s!==null&&tO(s)),a):(a.eventSystemFlags|=m,s=a.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),a)}function qI(a,s,u,m,v){switch(s){case"focusin":return Si=nc(Si,a,s,u,m,v),!0;case"dragenter":return Ni=nc(Ni,a,s,u,m,v),!0;case"mouseover":return _i=nc(_i,a,s,u,m,v),!0;case"pointerover":var j=v.pointerId;return tc.set(j,nc(tc.get(j)||null,a,s,u,m,v)),!0;case"gotpointercapture":return j=v.pointerId,rc.set(j,nc(rc.get(j)||null,a,s,u,m,v)),!0}return!1}function iO(a){var s=Oo(a.target);if(s!==null){var u=o(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){a.blockedOn=s,xS(a.priority,function(){rO(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,xS(a.priority,function(){rO(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Xf(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=cv(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);dg=m,u.target.dispatchEvent(m),dg=null}else return s=Eo(u),s!==null&&tO(s),a.blockedOn=u,!1;s.shift()}return!0}function sO(a,s,u){Xf(a)&&u.delete(s)}function FI(){fv=!1,Si!==null&&Xf(Si)&&(Si=null),Ni!==null&&Xf(Ni)&&(Ni=null),_i!==null&&Xf(_i)&&(_i=null),tc.forEach(sO),rc.forEach(sO)}function Wf(a,s){a.blockedOn===s&&(a.blockedOn=null,fv||(fv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,FI)))}var Zf=null;function oO(a){Zf!==a&&(Zf=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Zf===a&&(Zf=null);for(var s=0;s<a.length;s+=3){var u=a[s],m=a[s+1],v=a[s+2];if(typeof m!="function"){if(dv(m||u)===null)continue;break}var j=Eo(u);j!==null&&(a.splice(s,3),s-=3,cy(j,{pending:!0,data:v,method:u.method,action:m},m,v))}}))}function ll(a){function s(I){return Wf(I,a)}Si!==null&&Wf(Si,a),Ni!==null&&Wf(Ni,a),_i!==null&&Wf(_i,a),tc.forEach(s),rc.forEach(s);for(var u=0;u<Oi.length;u++){var m=Oi[u];m.blockedOn===a&&(m.blockedOn=null)}for(;0<Oi.length&&(u=Oi[0],u.blockedOn===null);)iO(u),u.blockedOn===null&&Oi.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var v=u[m],j=u[m+1],O=v[Cr]||null;if(typeof j=="function")O||oO(u);else if(O){var P=null;if(j&&j.hasAttribute("formAction")){if(v=j,O=j[Cr]||null)P=O.formAction;else if(dv(v)!==null)continue}else P=O.action;typeof P=="function"?u[m+1]=P:(u.splice(m,3),m-=3),oO(u)}}}function lO(){function a(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(O){return v=O})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,v=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function hv(a){this._internalRoot=a}Jf.prototype.render=hv.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(n(409));var u=s.current,m=Zr();J_(u,m,a,s,null,null)},Jf.prototype.unmount=hv.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;J_(a.current,2,null,a,null,null),Mf(),s[_o]=null}};function Jf(a){this._internalRoot=a}Jf.prototype.unstable_scheduleHydration=function(a){if(a){var s=vS();a={blockedOn:null,target:a,priority:s};for(var u=0;u<Oi.length&&s!==0&&s<Oi[u].priority;u++);Oi.splice(u,0,a),u===0&&iO(a)}};var uO=t.version;if(uO!=="19.2.4")throw Error(n(527,uO,"19.2.4"));F.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(n(188)):(a=Object.keys(a).join(","),Error(n(268,a)));return a=f(s),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var HI={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var eh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!eh.isDisabled&&eh.supportsFiber)try{fu=eh.inject(HI),Hr=eh}catch{}}return ic.createRoot=function(a,s){if(!i(a))throw Error(n(299));var u=!1,m="",v=gN,j=yN,O=vN;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(j=s.onCaughtError),s.onRecoverableError!==void 0&&(O=s.onRecoverableError)),s=W_(a,1,!1,null,null,u,m,null,v,j,O,lO),a[_o]=s.current,Vy(a),new hv(s)},ic.hydrateRoot=function(a,s,u){if(!i(a))throw Error(n(299));var m=!1,v="",j=gN,O=yN,P=vN,I=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onUncaughtError!==void 0&&(j=u.onUncaughtError),u.onCaughtError!==void 0&&(O=u.onCaughtError),u.onRecoverableError!==void 0&&(P=u.onRecoverableError),u.formState!==void 0&&(I=u.formState)),s=W_(a,1,!0,s,u??null,m,v,I,j,O,P,lO),s.context=Z_(null),u=s.current,m=Zr(),m=ng(m),v=di(m),v.callback=null,fi(u,v,m),u=m,s.current.lanes=u,mu(s,u),Qn(s),a[_o]=s.current,Vy(a),new Jf(s)},ic.version="19.2.4",ic}var bO;function nz(){if(bO)return vv.exports;bO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),vv.exports=rz(),vv.exports}var az=nz(),cd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zs,Li,Tl,O2,iz=(O2=class extends cd{constructor(){super();Ne(this,zs);Ne(this,Li);Ne(this,Tl);fe(this,Tl,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){q(this,Li)||this.setEventListener(q(this,Tl))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,Li))==null||t.call(this),fe(this,Li,void 0))}setEventListener(t){var r;fe(this,Tl,t),(r=q(this,Li))==null||r.call(this),fe(this,Li,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){q(this,zs)!==t&&(fe(this,zs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof q(this,zs)=="boolean"?q(this,zs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},zs=new WeakMap,Li=new WeakMap,Tl=new WeakMap,O2),Kb=new iz,sz={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},$i,Hb,E2,oz=(E2=class{constructor(){Ne(this,$i,sz);Ne(this,Hb,!1)}setTimeoutProvider(e){fe(this,$i,e)}setTimeout(e,t){return q(this,$i).setTimeout(e,t)}clearTimeout(e){q(this,$i).clearTimeout(e)}setInterval(e,t){return q(this,$i).setInterval(e,t)}clearInterval(e){q(this,$i).clearInterval(e)}},$i=new WeakMap,Hb=new WeakMap,E2),Ps=new oz;function lz(e){setTimeout(e,0)}var uz=typeof window>"u"||"Deno"in globalThis;function Ir(){}function cz(e,t){return typeof e=="function"?e(t):e}function wx(e){return typeof e=="number"&&e>=0&&e!==1/0}function $2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yi(e,t){return typeof e=="function"?e(t):e}function Nn(e,t){return typeof e=="function"?e(t):e}function jO(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:l,stale:c}=e;if(l){if(n){if(t.queryHash!==Gb(l,t.options))return!1}else if(!Pc(t.queryKey,l))return!1}if(r!=="all"){const h=t.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||o&&!o(t))}function wO(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Cc(t.options.mutationKey)!==Cc(o))return!1}else if(!Pc(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Gb(e,t){return((t==null?void 0:t.queryKeyHashFn)||Cc)(e)}function Cc(e){return JSON.stringify(e,(t,r)=>Nx(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Pc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Pc(e[r],t[r])):!1}var dz=Object.prototype.hasOwnProperty;function I2(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=SO(e)&&SO(t);if(!n&&!(Nx(e)&&Nx(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),c=l.length,h=n?new Array(c):{};let f=0;for(let p=0;p<c;p++){const g=n?p:l[p],y=e[g],x=t[g];if(y===x){h[g]=y,(n?p<o:dz.call(e,g))&&f++;continue}if(y===null||x===null||typeof y!="object"||typeof x!="object"){h[g]=x;continue}const b=I2(y,x,r+1);h[g]=b,b===y&&f++}return o===c&&f===o?e:h}function Sx(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function SO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Nx(e){if(!NO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!NO(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function NO(e){return Object.prototype.toString.call(e)==="[object Object]"}function fz(e){return new Promise(t=>{Ps.setTimeout(t,e)})}function _x(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?I2(e,t):t}function hz(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function mz(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Yb=Symbol();function z2(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Yb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function B2(e,t){return typeof e=="function"?e(...t):!!e}function pz(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var Rc=(()=>{let e=()=>uz;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ox(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var gz=lz;function yz(){let e=[],t=0,r=c=>{c()},n=c=>{c()},i=gz;const o=c=>{t?e.push(c):i(()=>{r(c)})},l=()=>{const c=e;e=[],c.length&&i(()=>{n(()=>{c.forEach(h=>{r(h)})})})};return{batch:c=>{let h;t++;try{h=c()}finally{t--,t||l()}return h},batchCalls:c=>(...h)=>{o(()=>{c(...h)})},schedule:o,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{i=c}}}var or=yz(),Cl,Ii,Pl,A2,vz=(A2=class extends cd{constructor(){super();Ne(this,Cl,!0);Ne(this,Ii);Ne(this,Pl);fe(this,Pl,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){q(this,Ii)||this.setEventListener(q(this,Pl))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,Ii))==null||t.call(this),fe(this,Ii,void 0))}setEventListener(t){var r;fe(this,Pl,t),(r=q(this,Ii))==null||r.call(this),fe(this,Ii,t(this.setOnline.bind(this)))}setOnline(t){q(this,Cl)!==t&&(fe(this,Cl,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return q(this,Cl)}},Cl=new WeakMap,Ii=new WeakMap,Pl=new WeakMap,A2),$h=new vz;function xz(e){return Math.min(1e3*2**e,3e4)}function U2(e){return(e??"online")==="online"?$h.isOnline():!0}var Ex=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function q2(e){let t=!1,r=0,n;const i=Ox(),o=()=>i.status!=="pending",l=w=>{var N;if(!o()){const _=new Ex(w);y(_),(N=e.onCancel)==null||N.call(e,_)}},c=()=>{t=!0},h=()=>{t=!1},f=()=>Kb.isFocused()&&(e.networkMode==="always"||$h.isOnline())&&e.canRun(),p=()=>U2(e.networkMode)&&e.canRun(),g=w=>{o()||(n==null||n(),i.resolve(w))},y=w=>{o()||(n==null||n(),i.reject(w))},x=()=>new Promise(w=>{var N;n=_=>{(o()||f())&&w(_)},(N=e.onPause)==null||N.call(e)}).then(()=>{var w;n=void 0,o()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(o())return;let w;const N=r===0?e.initialPromise:void 0;try{w=N??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(g).catch(_=>{var R;if(o())return;const E=e.retry??(Rc.isServer()?0:3),T=e.retryDelay??xz,A=typeof T=="function"?T(r,_):T,C=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,_);if(t||!C){y(_);return}r++,(R=e.onFail)==null||R.call(e,r,_),fz(A).then(()=>f()?void 0:x()).then(()=>{t?y(_):b()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(n==null||n(),i),cancelRetry:c,continueRetry:h,canStart:p,start:()=>(p()?b():x().then(b),i)}}var Bs,T2,F2=(T2=class{constructor(){Ne(this,Bs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wx(this.gcTime)&&fe(this,Bs,Ps.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rc.isServer()?1/0:300*1e3))}clearGcTimeout(){q(this,Bs)&&(Ps.clearTimeout(q(this,Bs)),fe(this,Bs,void 0))}},Bs=new WeakMap,T2),Us,Rl,Sn,qs,Ht,id,Fs,en,H2,Ma,C2,bz=(C2=class extends F2{constructor(t){super();Ne(this,en);Ne(this,Us);Ne(this,Rl);Ne(this,Sn);Ne(this,qs);Ne(this,Ht);Ne(this,id);Ne(this,Fs);fe(this,Fs,!1),fe(this,id,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,qs,t.client),fe(this,Sn,q(this,qs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,Us,OO(this.options)),this.state=t.state??q(this,Us),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=q(this,Ht))==null?void 0:t.promise}setOptions(t){if(this.options={...q(this,id),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=OO(this.options);r.data!==void 0&&(this.setState(_O(r.data,r.dataUpdatedAt)),fe(this,Us,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&q(this,Sn).remove(this)}setData(t,r){const n=_x(this.state.data,t,this.options);return Le(this,en,Ma).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Le(this,en,Ma).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=q(this,Ht))==null?void 0:n.promise;return(i=q(this,Ht))==null||i.cancel(t),r?r.then(Ir).catch(Ir):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return q(this,Us)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Nn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yb||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Yi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!$2(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=q(this,Ht))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=q(this,Ht))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),q(this,Sn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(q(this,Ht)&&(q(this,Fs)||Le(this,en,H2).call(this)?q(this,Ht).cancel({revert:!0}):q(this,Ht).cancelRetry()),this.scheduleGc()),q(this,Sn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Le(this,en,Ma).call(this,{type:"invalidate"})}async fetch(t,r){var h,f,p,g,y,x,b,w,N,_,E,T;if(this.state.fetchStatus!=="idle"&&((h=q(this,Ht))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(q(this,Ht))return q(this,Ht).continueRetry(),q(this,Ht).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(C=>C.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(fe(this,Fs,!0),n.signal)})},o=()=>{const A=z2(this.options,r),R=(()=>{const D={client:q(this,qs),queryKey:this.queryKey,meta:this.meta};return i(D),D})();return fe(this,Fs,!1),this.options.persister?this.options.persister(A,R,this):A(R)},c=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:q(this,qs),state:this.state,fetchFn:o};return i(A),A})();(f=this.options.behavior)==null||f.onFetch(c,this),fe(this,Rl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=c.fetchOptions)==null?void 0:p.meta))&&Le(this,en,Ma).call(this,{type:"fetch",meta:(g=c.fetchOptions)==null?void 0:g.meta}),fe(this,Ht,q2({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:A=>{A instanceof Ex&&A.revert&&this.setState({...q(this,Rl),fetchStatus:"idle"}),n.abort()},onFail:(A,C)=>{Le(this,en,Ma).call(this,{type:"failed",failureCount:A,error:C})},onPause:()=>{Le(this,en,Ma).call(this,{type:"pause"})},onContinue:()=>{Le(this,en,Ma).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const A=await q(this,Ht).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(x=(y=q(this,Sn).config).onSuccess)==null||x.call(y,A,this),(w=(b=q(this,Sn).config).onSettled)==null||w.call(b,A,this.state.error,this),A}catch(A){if(A instanceof Ex){if(A.silent)return q(this,Ht).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Le(this,en,Ma).call(this,{type:"error",error:A}),(_=(N=q(this,Sn).config).onError)==null||_.call(N,A,this),(T=(E=q(this,Sn).config).onSettled)==null||T.call(E,this.state.data,A,this),A}finally{this.scheduleGc()}}},Us=new WeakMap,Rl=new WeakMap,Sn=new WeakMap,qs=new WeakMap,Ht=new WeakMap,id=new WeakMap,Fs=new WeakMap,en=new WeakSet,H2=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ma=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...K2(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,..._O(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,Rl,t.manual?i:void 0),i;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),or.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),q(this,Sn).notify({query:this,type:"updated",action:t})})},C2);function K2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:U2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _O(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function OO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var $r,Ie,sd,Sr,Hs,Ml,ka,zi,od,Dl,kl,Ks,Gs,Bi,Ll,Ye,wc,Ax,Tx,Cx,Px,Rx,Mx,Dx,Y2,P2,G2=(P2=class extends cd{constructor(t,r){super();Ne(this,Ye);Ne(this,$r);Ne(this,Ie);Ne(this,sd);Ne(this,Sr);Ne(this,Hs);Ne(this,Ml);Ne(this,ka);Ne(this,zi);Ne(this,od);Ne(this,Dl);Ne(this,kl);Ne(this,Ks);Ne(this,Gs);Ne(this,Bi);Ne(this,Ll,new Set);this.options=r,fe(this,$r,t),fe(this,zi,null),fe(this,ka,Ox()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(q(this,Ie).addObserver(this),EO(q(this,Ie),this.options)?Le(this,Ye,wc).call(this):this.updateResult(),Le(this,Ye,Px).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kx(q(this,Ie),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kx(q(this,Ie),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Le(this,Ye,Rx).call(this),Le(this,Ye,Mx).call(this),q(this,Ie).removeObserver(this)}setOptions(t){const r=this.options,n=q(this,Ie);if(this.options=q(this,$r).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nn(this.options.enabled,q(this,Ie))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Le(this,Ye,Dx).call(this),q(this,Ie).setOptions(this.options),r._defaulted&&!Sx(this.options,r)&&q(this,$r).getQueryCache().notify({type:"observerOptionsUpdated",query:q(this,Ie),observer:this});const i=this.hasListeners();i&&AO(q(this,Ie),n,this.options,r)&&Le(this,Ye,wc).call(this),this.updateResult(),i&&(q(this,Ie)!==n||Nn(this.options.enabled,q(this,Ie))!==Nn(r.enabled,q(this,Ie))||Yi(this.options.staleTime,q(this,Ie))!==Yi(r.staleTime,q(this,Ie)))&&Le(this,Ye,Ax).call(this);const o=Le(this,Ye,Tx).call(this);i&&(q(this,Ie)!==n||Nn(this.options.enabled,q(this,Ie))!==Nn(r.enabled,q(this,Ie))||o!==q(this,Bi))&&Le(this,Ye,Cx).call(this,o)}getOptimisticResult(t){const r=q(this,$r).getQueryCache().build(q(this,$r),t),n=this.createResult(r,t);return wz(this,n)&&(fe(this,Sr,n),fe(this,Ml,this.options),fe(this,Hs,q(this,Ie).state)),n}getCurrentResult(){return q(this,Sr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&q(this,ka).status==="pending"&&q(this,ka).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){q(this,Ll).add(t)}getCurrentQuery(){return q(this,Ie)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=q(this,$r).defaultQueryOptions(t),n=q(this,$r).getQueryCache().build(q(this,$r),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Le(this,Ye,wc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),q(this,Sr)))}createResult(t,r){var z;const n=q(this,Ie),i=this.options,o=q(this,Sr),l=q(this,Hs),c=q(this,Ml),f=t!==n?t.state:q(this,sd),{state:p}=t;let g={...p},y=!1,x;if(r._optimisticResults){const k=this.hasListeners(),H=!k&&EO(t,r),U=k&&AO(t,n,r,i);(H||U)&&(g={...g,...K2(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:N}=g;x=g.data;let _=!1;if(r.placeholderData!==void 0&&x===void 0&&N==="pending"){let k;o!=null&&o.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(k=o.data,_=!0):k=typeof r.placeholderData=="function"?r.placeholderData((z=q(this,kl))==null?void 0:z.state.data,q(this,kl)):r.placeholderData,k!==void 0&&(N="success",x=_x(o==null?void 0:o.data,k,r),y=!0)}if(r.select&&x!==void 0&&!_)if(o&&x===(l==null?void 0:l.data)&&r.select===q(this,od))x=q(this,Dl);else try{fe(this,od,r.select),x=r.select(x),x=_x(o==null?void 0:o.data,x,r),fe(this,Dl,x),fe(this,zi,null)}catch(k){fe(this,zi,k)}q(this,zi)&&(b=q(this,zi),x=q(this,Dl),w=Date.now(),N="error");const E=g.fetchStatus==="fetching",T=N==="pending",A=N==="error",C=T&&E,R=x!==void 0,M={status:N,fetchStatus:g.fetchStatus,isPending:T,isSuccess:N==="success",isError:A,isInitialLoading:C,isLoading:C,data:x,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!T,isLoadingError:A&&!R,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:A&&R,isStale:Vb(t,r),refetch:this.refetch,promise:q(this,ka),isEnabled:Nn(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=M.data!==void 0,H=M.status==="error"&&!k,U=G=>{H?G.reject(M.error):k&&G.resolve(M.data)},ae=()=>{const G=fe(this,ka,M.promise=Ox());U(G)},Z=q(this,ka);switch(Z.status){case"pending":t.queryHash===n.queryHash&&U(Z);break;case"fulfilled":(H||M.data!==Z.value)&&ae();break;case"rejected":(!H||M.error!==Z.reason)&&ae();break}}return M}updateResult(){const t=q(this,Sr),r=this.createResult(q(this,Ie),this.options);if(fe(this,Hs,q(this,Ie).state),fe(this,Ml,this.options),q(this,Hs).data!==void 0&&fe(this,kl,q(this,Ie)),Sx(r,t))return;fe(this,Sr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!q(this,Ll).size)return!0;const l=new Set(o??q(this,Ll));return this.options.throwOnError&&l.add("error"),Object.keys(q(this,Sr)).some(c=>{const h=c;return q(this,Sr)[h]!==t[h]&&l.has(h)})};Le(this,Ye,Y2).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Le(this,Ye,Px).call(this)}},$r=new WeakMap,Ie=new WeakMap,sd=new WeakMap,Sr=new WeakMap,Hs=new WeakMap,Ml=new WeakMap,ka=new WeakMap,zi=new WeakMap,od=new WeakMap,Dl=new WeakMap,kl=new WeakMap,Ks=new WeakMap,Gs=new WeakMap,Bi=new WeakMap,Ll=new WeakMap,Ye=new WeakSet,wc=function(t){Le(this,Ye,Dx).call(this);let r=q(this,Ie).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ir)),r},Ax=function(){Le(this,Ye,Rx).call(this);const t=Yi(this.options.staleTime,q(this,Ie));if(Rc.isServer()||q(this,Sr).isStale||!wx(t))return;const n=$2(q(this,Sr).dataUpdatedAt,t)+1;fe(this,Ks,Ps.setTimeout(()=>{q(this,Sr).isStale||this.updateResult()},n))},Tx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(q(this,Ie)):this.options.refetchInterval)??!1},Cx=function(t){Le(this,Ye,Mx).call(this),fe(this,Bi,t),!(Rc.isServer()||Nn(this.options.enabled,q(this,Ie))===!1||!wx(q(this,Bi))||q(this,Bi)===0)&&fe(this,Gs,Ps.setInterval(()=>{(this.options.refetchIntervalInBackground||Kb.isFocused())&&Le(this,Ye,wc).call(this)},q(this,Bi)))},Px=function(){Le(this,Ye,Ax).call(this),Le(this,Ye,Cx).call(this,Le(this,Ye,Tx).call(this))},Rx=function(){q(this,Ks)&&(Ps.clearTimeout(q(this,Ks)),fe(this,Ks,void 0))},Mx=function(){q(this,Gs)&&(Ps.clearInterval(q(this,Gs)),fe(this,Gs,void 0))},Dx=function(){const t=q(this,$r).getQueryCache().build(q(this,$r),this.options);if(t===q(this,Ie))return;const r=q(this,Ie);fe(this,Ie,t),fe(this,sd,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Y2=function(t){or.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(q(this,Sr))}),q(this,$r).getQueryCache().notify({query:q(this,Ie),type:"observerResultsUpdated"})})},P2);function jz(e,t){return Nn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function EO(e,t){return jz(e,t)||e.state.data!==void 0&&kx(e,t,t.refetchOnMount)}function kx(e,t,r){if(Nn(t.enabled,e)!==!1&&Yi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Vb(e,t)}return!1}function AO(e,t,r,n){return(e!==t||Nn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Vb(e,r)}function Vb(e,t){return Nn(t.enabled,e)!==!1&&e.isStaleByTime(Yi(t.staleTime,e))}function wz(e,t){return!Sx(e.getCurrentResult(),t)}function Ih(e){return{onFetch:(t,r)=>{var p,g,y,x,b;const n=t.options,i=(y=(g=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:y.direction,o=((x=t.state.data)==null?void 0:x.pages)||[],l=((b=t.state.data)==null?void 0:b.pageParams)||[];let c={pages:[],pageParams:[]},h=0;const f=async()=>{let w=!1;const N=T=>{pz(T,()=>t.signal,()=>w=!0)},_=z2(t.options,t.fetchOptions),E=async(T,A,C)=>{if(w)return Promise.reject();if(A==null&&T.pages.length)return Promise.resolve(T);const D=(()=>{const H={client:t.client,queryKey:t.queryKey,pageParam:A,direction:C?"backward":"forward",meta:t.options.meta};return N(H),H})(),M=await _(D),{maxPages:z}=t.options,k=C?mz:hz;return{pages:k(T.pages,M,z),pageParams:k(T.pageParams,A,z)}};if(i&&o.length){const T=i==="backward",A=T?V2:Lx,C={pages:o,pageParams:l},R=A(n,C);c=await E(C,R,T)}else{const T=e??o.length;do{const A=h===0?l[0]??n.initialPageParam:Lx(n,c);if(h>0&&A==null)break;c=await E(c,A),h++}while(h<T)}return c};t.options.persister?t.fetchFn=()=>{var w,N;return(N=(w=t.options).persister)==null?void 0:N.call(w,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function Lx(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function V2(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function Sz(e,t){return t?Lx(e,t)!=null:!1}function Nz(e,t){return!t||!e.getPreviousPageParam?!1:V2(e,t)!=null}var _z=class extends G2{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Ih()})}getOptimisticResult(e){return e.behavior=Ih(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,w;const{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:l,isRefetchError:c}=n,h=(w=(b=r.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:w.direction,f=l&&h==="forward",p=i&&h==="forward",g=l&&h==="backward",y=i&&h==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Sz(t,r.data),hasPreviousPage:Nz(t,r.data),isFetchNextPageError:f,isFetchingNextPage:p,isFetchPreviousPageError:g,isFetchingPreviousPage:y,isRefetchError:c&&!f&&!g,isRefetching:o&&!p&&!y}}},ld,ea,gr,Ys,ta,Ci,R2,Oz=(R2=class extends F2{constructor(t){super();Ne(this,ta);Ne(this,ld);Ne(this,ea);Ne(this,gr);Ne(this,Ys);fe(this,ld,t.client),this.mutationId=t.mutationId,fe(this,gr,t.mutationCache),fe(this,ea,[]),this.state=t.state||Ez(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){q(this,ea).includes(t)||(q(this,ea).push(t),this.clearGcTimeout(),q(this,gr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,ea,q(this,ea).filter(r=>r!==t)),this.scheduleGc(),q(this,gr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){q(this,ea).length||(this.state.status==="pending"?this.scheduleGc():q(this,gr).remove(this))}continue(){var t;return((t=q(this,Ys))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,h,f,p,g,y,x,b,w,N,_,E,T,A,C,R,D;const r=()=>{Le(this,ta,Ci).call(this,{type:"continue"})},n={client:q(this,ld),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,Ys,q2({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,z)=>{Le(this,ta,Ci).call(this,{type:"failed",failureCount:M,error:z})},onPause:()=>{Le(this,ta,Ci).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>q(this,gr).canRun(this)}));const i=this.state.status==="pending",o=!q(this,Ys).canStart();try{if(i)r();else{Le(this,ta,Ci).call(this,{type:"pending",variables:t,isPaused:o}),q(this,gr).config.onMutate&&await q(this,gr).config.onMutate(t,this,n);const z=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,n));z!==this.state.context&&Le(this,ta,Ci).call(this,{type:"pending",context:z,variables:t,isPaused:o})}const M=await q(this,Ys).start();return await((f=(h=q(this,gr).config).onSuccess)==null?void 0:f.call(h,M,t,this.state.context,this,n)),await((g=(p=this.options).onSuccess)==null?void 0:g.call(p,M,t,this.state.context,n)),await((x=(y=q(this,gr).config).onSettled)==null?void 0:x.call(y,M,null,this.state.variables,this.state.context,this,n)),await((w=(b=this.options).onSettled)==null?void 0:w.call(b,M,null,t,this.state.context,n)),Le(this,ta,Ci).call(this,{type:"success",data:M}),M}catch(M){try{await((_=(N=q(this,gr).config).onError)==null?void 0:_.call(N,M,t,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((T=(E=this.options).onError)==null?void 0:T.call(E,M,t,this.state.context,n))}catch(z){Promise.reject(z)}try{await((C=(A=q(this,gr).config).onSettled)==null?void 0:C.call(A,void 0,M,this.state.variables,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((D=(R=this.options).onSettled)==null?void 0:D.call(R,void 0,M,t,this.state.context,n))}catch(z){Promise.reject(z)}throw Le(this,ta,Ci).call(this,{type:"error",error:M}),M}finally{q(this,gr).runNext(this)}}},ld=new WeakMap,ea=new WeakMap,gr=new WeakMap,Ys=new WeakMap,ta=new WeakSet,Ci=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),or.batch(()=>{q(this,ea).forEach(n=>{n.onMutationUpdate(t)}),q(this,gr).notify({mutation:this,type:"updated",action:t})})},R2);function Ez(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var La,kn,ud,M2,Az=(M2=class extends cd{constructor(t={}){super();Ne(this,La);Ne(this,kn);Ne(this,ud);this.config=t,fe(this,La,new Set),fe(this,kn,new Map),fe(this,ud,0)}build(t,r,n){const i=new Oz({client:t,mutationCache:this,mutationId:++th(this,ud)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){q(this,La).add(t);const r=rh(t);if(typeof r=="string"){const n=q(this,kn).get(r);n?n.push(t):q(this,kn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(q(this,La).delete(t)){const r=rh(t);if(typeof r=="string"){const n=q(this,kn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&q(this,kn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=rh(t);if(typeof r=="string"){const n=q(this,kn).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=rh(t);if(typeof r=="string"){const i=(n=q(this,kn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){or.batch(()=>{q(this,La).forEach(t=>{this.notify({type:"removed",mutation:t})}),q(this,La).clear(),q(this,kn).clear()})}getAll(){return Array.from(q(this,La))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>wO(r,n))}findAll(t={}){return this.getAll().filter(r=>wO(t,r))}notify(t){or.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return or.batch(()=>Promise.all(t.map(r=>r.continue().catch(Ir))))}},La=new WeakMap,kn=new WeakMap,ud=new WeakMap,M2);function rh(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ra,D2,Tz=(D2=class extends cd{constructor(t={}){super();Ne(this,ra);this.config=t,fe(this,ra,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??Gb(i,r);let l=this.get(o);return l||(l=new bz({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){q(this,ra).has(t.queryHash)||(q(this,ra).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=q(this,ra).get(t.queryHash);r&&(t.destroy(),r===t&&q(this,ra).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){or.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return q(this,ra).get(t)}getAll(){return[...q(this,ra).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>jO(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>jO(t,n)):r}notify(t){or.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){or.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){or.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ra=new WeakMap,D2),vt,Ui,qi,$l,Il,Fi,zl,Bl,k2,Cz=(k2=class{constructor(e={}){Ne(this,vt);Ne(this,Ui);Ne(this,qi);Ne(this,$l);Ne(this,Il);Ne(this,Fi);Ne(this,zl);Ne(this,Bl);fe(this,vt,e.queryCache||new Tz),fe(this,Ui,e.mutationCache||new Az),fe(this,qi,e.defaultOptions||{}),fe(this,$l,new Map),fe(this,Il,new Map),fe(this,Fi,0)}mount(){th(this,Fi)._++,q(this,Fi)===1&&(fe(this,zl,Kb.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,vt).onFocus())})),fe(this,Bl,$h.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,vt).onOnline())})))}unmount(){var e,t;th(this,Fi)._--,q(this,Fi)===0&&((e=q(this,zl))==null||e.call(this),fe(this,zl,void 0),(t=q(this,Bl))==null||t.call(this),fe(this,Bl,void 0))}isFetching(e){return q(this,vt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return q(this,Ui).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=q(this,vt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=q(this,vt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Yi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return q(this,vt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=q(this,vt).get(n.queryHash),o=i==null?void 0:i.state.data,l=cz(t,o);if(l!==void 0)return q(this,vt).build(this,n).setData(l,{...r,manual:!0})}setQueriesData(e,t,r){return or.batch(()=>q(this,vt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=q(this,vt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=q(this,vt);or.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=q(this,vt);return or.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=or.batch(()=>q(this,vt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Ir).catch(Ir)}invalidateQueries(e,t={}){return or.batch(()=>(q(this,vt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=or.batch(()=>q(this,vt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(Ir)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Ir)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=q(this,vt).build(this,t);return r.isStaleByTime(Yi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ir).catch(Ir)}fetchInfiniteQuery(e){return e.behavior=Ih(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ir).catch(Ir)}ensureInfiniteQueryData(e){return e.behavior=Ih(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return $h.isOnline()?q(this,Ui).resumePausedMutations():Promise.resolve()}getQueryCache(){return q(this,vt)}getMutationCache(){return q(this,Ui)}getDefaultOptions(){return q(this,qi)}setDefaultOptions(e){fe(this,qi,e)}setQueryDefaults(e,t){q(this,$l).set(Cc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...q(this,$l).values()],r={};return t.forEach(n=>{Pc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){q(this,Il).set(Cc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...q(this,Il).values()],r={};return t.forEach(n=>{Pc(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...q(this,qi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Gb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Yb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...q(this,qi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){q(this,vt).clear(),q(this,Ui).clear()}},vt=new WeakMap,Ui=new WeakMap,qi=new WeakMap,$l=new WeakMap,Il=new WeakMap,Fi=new WeakMap,zl=new WeakMap,Bl=new WeakMap,k2),Q2=S.createContext(void 0),ho=e=>{const t=S.useContext(Q2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Pz=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(Q2.Provider,{value:e,children:t})),X2=S.createContext(!1),Rz=()=>S.useContext(X2);X2.Provider;function Mz(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Dz=S.createContext(Mz()),kz=()=>S.useContext(Dz),Lz=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?B2(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},$z=e=>{S.useEffect(()=>{e.clearReset()},[e])},Iz=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||B2(r,[e.error,n])),zz=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Bz=(e,t)=>e.isLoading&&e.isFetching&&!t,Uz=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,TO=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function W2(e,t,r){var y,x,b,w;const n=Rz(),i=kz(),o=ho(),l=o.defaultQueryOptions(e);(x=(y=o.getDefaultOptions().queries)==null?void 0:y._experimental_beforeQuery)==null||x.call(y,l);const c=o.getQueryCache().get(l.queryHash);l._optimisticResults=n?"isRestoring":"optimistic",zz(l),Lz(l,i,c),$z(i);const h=!o.getQueryCache().get(l.queryHash),[f]=S.useState(()=>new t(o,l)),p=f.getOptimisticResult(l),g=!n&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(N=>{const _=g?f.subscribe(or.batchCalls(N)):Ir;return f.updateResult(),_},[f,g]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),S.useEffect(()=>{f.setOptions(l)},[l,f]),Uz(l,p))throw TO(l,f,i);if(Iz({result:p,errorResetBoundary:i,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw p.error;if((w=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||w.call(b,l,p),l.experimental_prefetchInRender&&!Rc.isServer()&&Bz(p,n)){const N=h?TO(l,f,i):c==null?void 0:c.promise;N==null||N.catch(Ir).finally(()=>{f.updateResult()})}return l.notifyOnChangeProps?p:f.trackResult(p)}function Ue(e,t){return W2(e,G2)}function Z2(e,t){return W2(e,_z)}var Sc=typeof window<"u"?S.useLayoutEffect:S.useEffect;function wv(e){const t=S.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function qz(e,t,r={},n={}){S.useEffect(()=>{if(!e.current||n.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([o])=>{t(o)},r);return i.observe(e.current),()=>{i.disconnect()}},[t,r,n.disabled,e])}function Fz(e){const t=S.useRef(null);return S.useImperativeHandle(e,()=>t.current,[]),t}var J2=!1;function Mc(e){return e[e.length-1]}function Hz(e){return typeof e=="function"}function Hi(e,t){return Hz(e)?e(t):e}var Kz=Object.prototype.hasOwnProperty,CO=Object.prototype.propertyIsEnumerable,Gz=()=>Object.create(null),Ss=(e,t)=>za(e,t,Gz);function za(e,t,r=()=>({}),n=0){if(e===t)return e;if(n>500)return t;const i=t,o=MO(e)&&MO(i);if(!o&&!(ql(e)&&ql(i)))return i;const l=o?e:PO(e);if(!l)return i;const c=o?i:PO(i);if(!c)return i;const h=l.length,f=c.length,p=o?new Array(f):r();let g=0;for(let y=0;y<f;y++){const x=o?y:c[y],b=e[x],w=i[x];if(b===w){p[x]=b,(o?y<h:Kz.call(e,x))&&g++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[x]=w;continue}const N=za(b,w,r,n+1);p[x]=N,N===b&&g++}return h===f&&g===h?e:p}function PO(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!CO.call(e,i))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const n=t;for(const i of r){if(!CO.call(e,i))return!1;n.push(i)}return n}function ql(e){if(!RO(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!RO(r)||!r.hasOwnProperty("isPrototypeOf"))}function RO(e){return Object.prototype.toString.call(e)==="[object Object]"}function MO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Vs(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(!Vs(e[n],t[n],r))return!1;return!0}if(ql(e)&&ql(t)){const n=(r==null?void 0:r.ignoreUndefined)??!0;if(r!=null&&r.partial){for(const l in t)if((!n||t[l]!==void 0)&&!Vs(e[l],t[l],r))return!1;return!0}let i=0;if(!n)i=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&i++;let o=0;for(const l in t)if((!n||t[l]!==void 0)&&(o++,o>i||!Vs(e[l],t[l],r)))return!1;return i===o}return!1}function Fl(e){let t,r;const n=new Promise((i,o)=>{t=i,r=o});return n.status="pending",n.resolve=i=>{n.status="resolved",n.value=i,t(i),e==null||e(i)},n.reject=i=>{n.status="rejected",r(i)},n}function Dc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Yz(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function DO(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return Yz(t)}var Vz=["http:","https:","mailto:","tel:"];function zh(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}function sc(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let r=0,n="",i;for(;(i=t.exec(e))!==null;)n+=DO(e.slice(r,i.index))+i[0],r=t.lastIndex;n=n+DO(r?e.slice(r):e);let o=!1;return n.startsWith("//")&&(o=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:o}}function Qz(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Xz(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function qa(){throw new Error("Invariant failed")}function kc(e){const t=new Map;let r,n;const i=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,n&&(n.next=o,o.prev=n)):(o.next.prev=void 0,r=o.next,o.next=void 0,n&&(o.prev=n,n.next=o)),n=o)};return{get(o){const l=t.get(o);if(l)return i(l),l.value},set(o,l){if(t.size>=e&&r){const h=r;t.delete(h.key),h.next&&(r=h.next,h.next.prev=void 0),h===n&&(n=void 0)}const c=t.get(o);if(c)c.value=l,i(c);else{const h={key:o,value:l,prev:n};n&&(n.next=h),n=h,r||(r=h),t.set(o,h)}},clear(){t.clear(),r=void 0,n=void 0}}}var Rs=4,eR=5;function Wz(e){const t=e.indexOf("{");if(t===-1)return null;const r=e.indexOf("}",t);return r===-1||t+1>=e.length?null:[t,r]}function Qb(e,t,r=new Uint16Array(6)){const n=e.indexOf("/",t),i=n===-1?e.length:n,o=e.substring(t,i);if(!o||!o.includes("$"))return r[0]=0,r[1]=t,r[2]=t,r[3]=i,r[4]=i,r[5]=i,r;if(o==="$"){const c=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=c,r[4]=c,r[5]=c,r}if(o.charCodeAt(0)===36)return r[0]=1,r[1]=t,r[2]=t+1,r[3]=i,r[4]=i,r[5]=i,r;const l=Wz(o);if(l){const[c,h]=l,f=o.charCodeAt(c+1);if(f===45){if(c+2<o.length&&o.charCodeAt(c+2)===36){const p=c+3,g=h;if(p<g)return r[0]=3,r[1]=t+c,r[2]=t+p,r[3]=t+g,r[4]=t+h+1,r[5]=i,r}}else if(f===36){const p=c+1,g=c+2;return g===h?(r[0]=2,r[1]=t+c,r[2]=t+p,r[3]=t+g,r[4]=t+h+1,r[5]=e.length,r):(r[0]=1,r[1]=t+c,r[2]=t+g,r[3]=t+h,r[4]=t+h+1,r[5]=i,r)}}return r[0]=0,r[1]=t,r[2]=t,r[3]=i,r[4]=i,r[5]=i,r}function Vm(e,t,r,n,i,o,l){var h,f,p,g,y,x,b,w,N,_,E,T,A;l==null||l(r);let c=n;{const C=r.fullPath??r.from,R=C.length,D=((h=r.options)==null?void 0:h.caseSensitive)??e,M=!!((p=(f=r.options)==null?void 0:f.params)!=null&&p.parse&&((y=(g=r.options)==null?void 0:g.skipRouteOnParseError)!=null&&y.params));for(;c<R;){const k=Qb(C,c,t);let H;const U=c,ae=k[5];switch(c=ae+1,o++,k[0]){case 0:{const Z=C.substring(k[2],k[3]);if(D){const G=(x=i.static)==null?void 0:x.get(Z);if(G)H=G;else{i.static??(i.static=new Map);const L=Ms(r.fullPath??r.from);L.parent=i,L.depth=o,H=L,i.static.set(Z,L)}}else{const G=Z.toLowerCase(),L=(b=i.staticInsensitive)==null?void 0:b.get(G);if(L)H=L;else{i.staticInsensitive??(i.staticInsensitive=new Map);const F=Ms(r.fullPath??r.from);F.parent=i,F.depth=o,H=F,i.staticInsensitive.set(G,F)}}break}case 1:{const Z=C.substring(U,k[1]),G=C.substring(k[4],ae),L=D&&!!(Z||G),F=Z?L?Z:Z.toLowerCase():void 0,J=G?L?G:G.toLowerCase():void 0,re=!M&&((w=i.dynamic)==null?void 0:w.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===L&&oe.prefix===F&&oe.suffix===J));if(re)H=re;else{const oe=Nv(1,r.fullPath??r.from,L,F,J);H=oe,oe.depth=o,oe.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(oe)}break}case 3:{const Z=C.substring(U,k[1]),G=C.substring(k[4],ae),L=D&&!!(Z||G),F=Z?L?Z:Z.toLowerCase():void 0,J=G?L?G:G.toLowerCase():void 0,re=!M&&((N=i.optional)==null?void 0:N.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===L&&oe.prefix===F&&oe.suffix===J));if(re)H=re;else{const oe=Nv(3,r.fullPath??r.from,L,F,J);H=oe,oe.parent=i,oe.depth=o,i.optional??(i.optional=[]),i.optional.push(oe)}break}case 2:{const Z=C.substring(U,k[1]),G=C.substring(k[4],ae),L=D&&!!(Z||G),F=Z?L?Z:Z.toLowerCase():void 0,J=G?L?G:G.toLowerCase():void 0,re=Nv(2,r.fullPath??r.from,L,F,J);H=re,re.parent=i,re.depth=o,i.wildcard??(i.wildcard=[]),i.wildcard.push(re)}}i=H}if(M&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const k=Ms(r.fullPath??r.from);k.kind=eR,k.parent=i,o++,k.depth=o,i.pathless??(i.pathless=[]),i.pathless.push(k),i=k}const z=(r.path||!r.children)&&!r.isRoot;if(z&&C.endsWith("/")){const k=Ms(r.fullPath??r.from);k.kind=Rs,k.parent=i,o++,k.depth=o,i.index=k,i=k}i.parse=((E=(_=r.options)==null?void 0:_.params)==null?void 0:E.parse)??null,i.skipOnParamError=M,i.parsingPriority=((A=(T=r.options)==null?void 0:T.skipRouteOnParseError)==null?void 0:A.priority)??0,z&&!i.route&&(i.route=r,i.fullPath=r.fullPath??r.from)}if(r.children)for(const C of r.children)Vm(e,t,C,c,i,o,l)}function Sv(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Pi(e){var t,r,n;if(e.pathless)for(const i of e.pathless)Pi(i);if(e.static)for(const i of e.static.values())Pi(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Pi(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(Sv);for(const i of e.dynamic)Pi(i)}if((r=e.optional)!=null&&r.length){e.optional.sort(Sv);for(const i of e.optional)Pi(i)}if((n=e.wildcard)!=null&&n.length){e.wildcard.sort(Sv);for(const i of e.wildcard)Pi(i)}}function Ms(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Nv(e,t,r,n,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:n,suffix:i}}function Zz(e,t){const r=Ms("/"),n=new Uint16Array(6);for(const i of e)Vm(!1,n,i,1,r,0);Pi(r),t.masksTree=r,t.flatCache=kc(1e3)}function Jz(e,t){e||(e="/");const r=t.flatCache.get(e);if(r)return r;const n=Xb(e,t.masksTree);return t.flatCache.set(e,n),n}function e8(e,t,r,n,i){e||(e="/"),n||(n="/");const o=t?`case\0${e}`:e;let l=i.singleCache.get(o);return l||(l=Ms("/"),Vm(t,new Uint16Array(6),{from:e},1,l,0),i.singleCache.set(o,l)),Xb(n,l,r)}function t8(e,t,r=!1){const n=r?e:`nofuzz\0${e}`,i=t.matchCache.get(n);if(i!==void 0)return i;e||(e="/");let o;try{o=Xb(e,t.segmentTree,r)}catch(l){if(l instanceof URIError)o=null;else throw l}return o&&(o.branch=a8(o.route)),t.matchCache.set(n,o),o}function r8(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function n8(e,t=!1,r){const n=Ms(e.fullPath),i=new Uint16Array(6),o={},l={};let c=0;return Vm(t,i,e,1,n,0,h=>{if(r==null||r(h,c),h.id in o&&qa(),o[h.id]=h,c!==0&&h.path){const f=r8(h.fullPath);(!l[f]||h.fullPath.endsWith("/"))&&(l[f]=h)}c++}),Pi(n),{processedTree:{segmentTree:n,singleCache:kc(1e3),matchCache:kc(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:l}}function Xb(e,t,r=!1){const n=e.split("/"),i=s8(e,n,t,r);if(!i)return null;const[o]=tR(e,n,i);return{route:i.node.route,rawParams:o,parsedParams:i.parsedParams}}function tR(e,t,r){var p,g,y,x,b,w,N,_,E,T;const n=i8(r.node);let i=null;const o=Object.create(null);let l=((p=r.extract)==null?void 0:p.part)??0,c=((g=r.extract)==null?void 0:g.node)??0,h=((y=r.extract)==null?void 0:y.path)??0,f=((x=r.extract)==null?void 0:x.segment)??0;for(;c<n.length;l++,c++,h++,f++){const A=n[c];if(A.kind===Rs)break;if(A.kind===eR){f--,l--,h--;continue}const C=t[l],R=h;if(C&&(h+=C.length),A.kind===1){i??(i=r.node.fullPath.split("/"));const D=i[f],M=((b=A.prefix)==null?void 0:b.length)??0;if(D.charCodeAt(M)===123){const z=((w=A.suffix)==null?void 0:w.length)??0,k=D.substring(M+2,D.length-z-1),H=C.substring(M,C.length-z);o[k]=decodeURIComponent(H)}else{const z=D.substring(1);o[z]=decodeURIComponent(C)}}else if(A.kind===3){if(r.skipped&1<<c){l--,h=R-1;continue}i??(i=r.node.fullPath.split("/"));const D=i[f],M=((N=A.prefix)==null?void 0:N.length)??0,z=((_=A.suffix)==null?void 0:_.length)??0,k=D.substring(M+3,D.length-z-1),H=A.suffix||A.prefix?C.substring(M,C.length-z):C;H&&(o[k]=decodeURIComponent(H))}else if(A.kind===2){const D=A,M=e.substring(R+(((E=D.prefix)==null?void 0:E.length)??0),e.length-(((T=D.suffix)==null?void 0:T.length)??0)),z=decodeURIComponent(M);o["*"]=z,o._splat=z;break}}return r.rawParams&&Object.assign(o,r.rawParams),[o,{part:l,node:c,path:h,segment:f}]}function a8(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function i8(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function s8(e,t,r,n){if(e==="/"&&r.index)return{node:r.index,skipped:0};const i=!Mc(t),o=i&&e!=="/",l=t.length-(i?1:0),c=[{node:r,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let h=null,f=null,p=null;for(;c.length;){const g=c.pop(),{node:y,index:x,skipped:b,depth:w,statics:N,dynamics:_,optionals:E}=g;let{extract:T,rawParams:A,parsedParams:C}=g;if(y.skipOnParamError){if(!_v(e,t,g))continue;A=g.rawParams,T=g.extract,C=g.parsedParams}n&&y.route&&y.kind!==Rs&&oc(f,g)&&(f=g);const R=x===l;if(R&&(y.route&&!o&&oc(p,g)&&(p=g),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const D=R?void 0:t[x];let M;if(R&&y.index){const z={node:y.index,index:x,skipped:b,depth:w+1,statics:N,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C};let k=!0;if(y.index.skipOnParamError&&(_v(e,t,z)||(k=!1)),k){if(N===l&&!_&&!E&&!b)return z;oc(p,z)&&(p=z)}}if(y.wildcard&&oc(h,g))for(const z of y.wildcard){const{prefix:k,suffix:H}=z;if(k&&(R||!(z.caseSensitive?D:M??(M=D.toLowerCase())).startsWith(k)))continue;if(H){if(R)continue;const ae=t.slice(x).join("/").slice(-H.length);if((z.caseSensitive?ae:ae.toLowerCase())!==H)continue}const U={node:z,index:l,skipped:b,depth:w,statics:N,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C};if(!(z.skipOnParamError&&!_v(e,t,U))){h=U;break}}if(y.optional){const z=b|1<<w,k=w+1;for(let H=y.optional.length-1;H>=0;H--){const U=y.optional[H];c.push({node:U,index:x,skipped:z,depth:k,statics:N,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C})}if(!R)for(let H=y.optional.length-1;H>=0;H--){const U=y.optional[H],{prefix:ae,suffix:Z}=U;if(ae||Z){const G=U.caseSensitive?D:M??(M=D.toLowerCase());if(ae&&!G.startsWith(ae)||Z&&!G.endsWith(Z))continue}c.push({node:U,index:x+1,skipped:b,depth:k,statics:N,dynamics:_,optionals:E+1,extract:T,rawParams:A,parsedParams:C})}}if(!R&&y.dynamic&&D)for(let z=y.dynamic.length-1;z>=0;z--){const k=y.dynamic[z],{prefix:H,suffix:U}=k;if(H||U){const ae=k.caseSensitive?D:M??(M=D.toLowerCase());if(H&&!ae.startsWith(H)||U&&!ae.endsWith(U))continue}c.push({node:k,index:x+1,skipped:b,depth:w+1,statics:N,dynamics:_+1,optionals:E,extract:T,rawParams:A,parsedParams:C})}if(!R&&y.staticInsensitive){const z=y.staticInsensitive.get(M??(M=D.toLowerCase()));z&&c.push({node:z,index:x+1,skipped:b,depth:w+1,statics:N+1,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C})}if(!R&&y.static){const z=y.static.get(D);z&&c.push({node:z,index:x+1,skipped:b,depth:w+1,statics:N+1,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C})}if(y.pathless){const z=w+1;for(let k=y.pathless.length-1;k>=0;k--){const H=y.pathless[k];c.push({node:H,index:x,skipped:b,depth:z,statics:N,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C})}}}if(p&&h)return oc(h,p)?p:h;if(p)return p;if(h)return h;if(n&&f){let g=f.index;for(let x=0;x<f.index;x++)g+=t[x].length;const y=g===e.length?"/":e.slice(g);return f.rawParams??(f.rawParams=Object.create(null)),f.rawParams["**"]=decodeURIComponent(y),f}return null}function _v(e,t,r){try{const[n,i]=tR(e,t,r);r.rawParams=n,r.extract=i;const o=r.node.parse(n);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,o),!0}catch{return null}}function oc(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Rs)>(e.node.kind===Rs)||t.node.kind===Rs==(e.node.kind===Rs)&&t.depth>e.depth))):!0}function Eh(e){return Wb(e.filter(t=>t!==void 0).join("/"))}function Wb(e){return e.replace(/\/{2,}/g,"/")}function rR(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Vi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function nR(e){return Vi(rR(e))}function Bh(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function o8(e,t,r){return Bh(e,r)===Bh(t,r)}function l8({base:e,to:t,trailingSlash:r="never",cache:n}){const i=t.startsWith("/"),o=!i&&t===".";let l;if(n){l=i?t:o?e:e+"\0"+t;const g=n.get(l);if(g)return g}let c;if(o)c=e.split("/");else if(i)c=t.split("/");else{for(c=e.split("/");c.length>1&&Mc(c)==="";)c.pop();const g=t.split("/");for(let y=0,x=g.length;y<x;y++){const b=g[y];b===""?y?y===x-1&&c.push(b):c=[b]:b===".."?c.pop():b==="."||c.push(b)}}c.length>1&&(Mc(c)===""?r==="never"&&c.pop():r==="always"&&c.push(""));let h,f="";for(let g=0;g<c.length;g++){g>0&&(f+="/");const y=c[g];if(!y)continue;h=Qb(y,0,h);const x=h[0];if(x===0){f+=y;continue}const b=h[5],w=y.substring(0,h[1]),N=y.substring(h[4],b),_=y.substring(h[2],h[3]);x===1?f+=w||N?`${w}{$${_}}${N}`:`$${_}`:x===2?f+=w||N?`${w}{$}${N}`:"$":f+=`${w}{-$${_}}${N}`}f=Wb(f);const p=f||"/";return l&&n&&n.set(l,p),p}function u8(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),r=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(r,"g");return i=>i.replace(n,o=>t.get(o)??o)}function Ov(e,t,r){const n=t[e];return typeof n!="string"?n:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(i=>LO(i,r)).join("/"):LO(n,r)}function kO({path:e,params:t,decoder:r,...n}){let i=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:i};const l=e.length;let c=0,h,f="";for(;c<l;){const p=c;h=Qb(e,p,h);const g=h[5];if(c=g+1,p===g)continue;const y=h[0];if(y===0){f+="/"+e.substring(p,g);continue}if(y===2){const x=t._splat;o._splat=x,o["*"]=x;const b=e.substring(p,h[1]),w=e.substring(h[4],g);if(!x){i=!0,(b||w)&&(f+="/"+b+w);continue}const N=Ov("_splat",t,r);f+="/"+b+N+w;continue}if(y===1){const x=e.substring(h[2],h[3]);!i&&!(x in t)&&(i=!0),o[x]=t[x];const b=e.substring(p,h[1]),w=e.substring(h[4],g),N=Ov(x,t,r)??"undefined";f+="/"+b+N+w;continue}if(y===3){const x=e.substring(h[2],h[3]),b=t[x];if(b==null)continue;o[x]=b;const w=e.substring(p,h[1]),N=e.substring(h[4],g),_=Ov(x,t,r)??"";f+="/"+w+_+N;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:i}}function LO(e,t){const r=encodeURIComponent(e);return(t==null?void 0:t(r))??r}function Or(e){return!!(e!=null&&e.isNotFound)}function c8(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var d8="tsr-scroll-restoration-v1_3";function f8(){const e=c8();if(!e)return null;let t={};try{const n=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");ql(n)&&(t=n)}catch{}return{get state(){return t},set:n=>{t=Hi(n,t)||t},persist:()=>{try{e.setItem(d8,JSON.stringify(t))}catch{}}}}var $O=f8(),h8=e=>e.state.__TSR_key||e.href;function m8(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}var nh=!1,lc="window",IO="data-scroll-restoration-id";function p8(e,t){if(!$O)return;const r=$O;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,nh=!1;const n=e.options.getScrollRestorationKey||h8,i=new Map;window.history.scrollRestoration="manual";const o=c=>{if(!(nh||!e.isScrollRestoring))if(c.target===document||c.target===window)i.set(lc,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const h=c.target;i.set(h,{scrollX:h.scrollLeft||0,scrollY:h.scrollTop||0})}},l=c=>{var f;if(!e.isScrollRestoring||!c||i.size===0||!r)return;const h=(f=r.state)[c]||(f[c]={});for(const[p,g]of i){let y;if(p===lc)y=lc;else if(p.isConnected){const x=p.getAttribute(IO);y=x?`[${IO}="${x}"]`:m8(p)}y&&(h[y]=g)}};document.addEventListener("scroll",o,!0),e.subscribe("onBeforeLoad",c=>{l(c.fromLocation?n(c.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{l(n(e.stores.resolvedLocation.state??e.stores.location.state)),r.persist()}),e.subscribe("onRendered",c=>{var g;const h=n(c.toLocation),f=e.options.scrollRestorationBehavior,p=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){nh=!0;try{const y=e.isScrollRestoring?r.state[h]:void 0;let x=!1;if(y)for(const b in y){const w=y[b];if(!ql(w))continue;const{scrollX:N,scrollY:_}=w;if(!(!Number.isFinite(N)||!Number.isFinite(_))){if(b===lc)window.scrollTo({top:_,left:N,behavior:f}),x=!0;else if(b){let E;try{E=document.querySelector(b)}catch{continue}E&&(E.scrollLeft=N,E.scrollTop=_,x=!0)}}}if(!x){const b=e.history.location.hash.slice(1);if(b){const w=((g=window.history.state)==null?void 0:g.__hashScrollIntoViewOptions)??!0;if(w){const N=document.getElementById(b);N&&N.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:f};if(window.scrollTo(w),p)for(const N of p){if(N===lc)continue;const _=typeof N=="function"?N():document.querySelector(N);_&&_.scrollTo(w)}}}}finally{nh=!1}e.isScrollRestoring&&r.set(y=>(y[h]||(y[h]={}),y))}})}function g8(e,t=String){const r=new URLSearchParams;for(const n in e){const i=e[n];i!==void 0&&r.set(n,t(i))}return r.toString()}function Ev(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function y8(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[n,i]of t.entries()){const o=r[n];o==null?r[n]=Ev(i):Array.isArray(o)?o.push(Ev(i)):r[n]=[o,Ev(i)]}return r}var v8=b8(JSON.parse),x8=j8(JSON.stringify,JSON.parse);function b8(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=y8(t);for(const n in r){const i=r[n];if(typeof i=="string")try{r[n]=e(i)}catch{}}return r}}function j8(e,t){const r=typeof t=="function";function n(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(r&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const o=g8(i,n);return o?`?${o}`:""}}var Qs="__root__";function Zb(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function zr(e){return e instanceof Response&&!!e.options}function w8(e){return{input:({url:t})=>{for(const r of e)t=$x(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=aR(e[r],t);return t}}}function S8(e){const t=nR(e.basepath),r=`/${t}`,n=`${r}/`,i=e.caseSensitive?r:r.toLowerCase(),o=e.caseSensitive?n:n.toLowerCase();return{input:({url:l})=>{const c=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return c===i?l.pathname="/":c.startsWith(o)&&(l.pathname=l.pathname.slice(r.length)),l},output:({url:l})=>(l.pathname=Eh(["/",t,l.pathname]),l)}}function $x(e,t){var n;const r=(n=e==null?void 0:e.input)==null?void 0:n.call(e,{url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function aR(e,t){var n;const r=(n=e==null?void 0:e.output)==null?void 0:n.call(e,{url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function N8(e,t){const{createMutableStore:r,createReadonlyStore:n,batch:i,init:o}=t,l=new Map,c=new Map,h=new Map,f=r(e.status),p=r(e.loadedAt),g=r(e.isLoading),y=r(e.isTransitioning),x=r(e.location),b=r(e.resolvedLocation),w=r(e.statusCode),N=r(e.redirect),_=r([]),E=r([]),T=r([]),A=n(()=>Av(l,_.state)),C=n(()=>Av(c,E.state)),R=n(()=>Av(h,T.state)),D=n(()=>_.state[0]),M=n(()=>_.state.some(F=>{var J;return((J=l.get(F))==null?void 0:J.state.status)==="pending"})),z=n(()=>{var F;return{locationHref:x.state.href,resolvedLocationHref:(F=b.state)==null?void 0:F.href,status:f.state}}),k=n(()=>({status:f.state,loadedAt:p.state,isLoading:g.state,isTransitioning:y.state,matches:A.state,location:x.state,resolvedLocation:b.state,statusCode:w.state,redirect:N.state})),H=kc(64);function U(F){let J=H.get(F);return J||(J=n(()=>{const re=_.state;for(const oe of re){const $=l.get(oe);if($&&$.routeId===F)return $.state}}),H.set(F,J)),J}const ae={status:f,loadedAt:p,isLoading:g,isTransitioning:y,location:x,resolvedLocation:b,statusCode:w,redirect:N,matchesId:_,pendingMatchesId:E,cachedMatchesId:T,activeMatchesSnapshot:A,pendingMatchesSnapshot:C,cachedMatchesSnapshot:R,firstMatchId:D,hasPendingMatches:M,matchRouteReactivity:z,activeMatchStoresById:l,pendingMatchStoresById:c,cachedMatchStoresById:h,__store:k,getMatchStoreByRouteId:U,setActiveMatches:Z,setPendingMatches:G,setCachedMatches:L};Z(e.matches),o==null||o(ae);function Z(F){Tv(F,l,_,r,i)}function G(F){Tv(F,c,E,r,i)}function L(F){Tv(F,h,T,r,i)}return ae}function Av(e,t){const r=[];for(const n of t){const i=e.get(n);i&&r.push(i.state)}return r}function Tv(e,t,r,n,i){const o=e.map(c=>c.id),l=new Set(o);i(()=>{for(const c of t.keys())l.has(c)||t.delete(c);for(const c of e){const h=t.get(c.id);if(!h){const f=n(c);f.routeId=c.routeId,t.set(c.id,f);continue}h.routeId=c.routeId,h.state!==c&&h.setState(()=>c)}Xz(r.state,o)||r.setState(()=>o)})}var Ix=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},_8=e=>e.stores.matchesId.state.some(t=>{var r;return(r=e.stores.activeMatchStoresById.get(t))==null?void 0:r.state._forcePending}),Qm=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),Xs=(e,t,r=!0)=>{const n={...e.router.options.context??{}},i=r?t:t-1;for(let o=0;o<=i;o++){const l=e.matches[o];if(!l)continue;const c=e.router.getMatch(l.id);c&&Object.assign(n,c.__routeContext,c.__beforeLoadContext)}return n},zO=(e,t)=>{if(!e.matches.length)return;const r=t.routeId,n=e.matches.findIndex(l=>l.routeId===e.router.routeTree.id),i=n>=0?n:0;let o=r?e.matches.findIndex(l=>l.routeId===r):e.firstBadMatchIndex??e.matches.length-1;o<0&&(o=i);for(let l=o;l>=0;l--){const c=e.matches[l];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return l}return r?o:i},Ki=(e,t,r)=>{var n,i,o;if(!(!zr(r)&&!Or(r)))throw zr(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&((n=t._nonReactive.beforeLoadPromise)==null||n.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,l=>({...l,status:zr(r)?"redirected":l.status==="pending"?"success":l.status,context:Xs(e,t.index),isFetching:!1,error:r})),Or(r)&&!r.routeId&&(r.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()),zr(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},iR=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},BO=(e,t,r)=>{const n=Xs(e,r);e.updateMatch(t,i=>({...i,context:n}))},uc=(e,t,r,n)=>{var c,h;const{id:i,routeId:o}=e.matches[t],l=e.router.looseRoutesById[o];if(r instanceof Promise)throw r;r.routerCode=n,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),Ki(e,e.router.getMatch(i),r);try{(h=(c=l.options).onError)==null||h.call(c,r)}catch(f){r=f,Ki(e,e.router.getMatch(i),r)}e.updateMatch(i,f=>{var p,g;return(p=f._nonReactive.beforeLoadPromise)==null||p.resolve(),f._nonReactive.beforeLoadPromise=void 0,(g=f._nonReactive.loadPromise)==null||g.resolve(),{...f,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!zr(r)&&!Or(r)&&(e.serialError??(e.serialError=r))},sR=(e,t,r,n)=>{var o;if(n._nonReactive.pendingTimeout!==void 0)return;const i=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Qm(e,t)&&(r.options.loader||r.options.beforeLoad||lR(r))&&typeof i=="number"&&i!==1/0&&(r.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent))){const l=setTimeout(()=>{Ix(e)},i);n._nonReactive.pendingTimeout=l}},O8=(e,t,r)=>{const n=e.router.getMatch(t);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;sR(e,t,r,n);const i=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Ki(e,o,o.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(i):i()},E8=(e,t,r,n)=>{const i=e.router.getMatch(t);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Fl(()=>{o==null||o.resolve(),o=void 0});const{paramsError:l,searchError:c}=i;l&&uc(e,r,l,"PARSE_PARAMS"),c&&uc(e,r,c,"VALIDATE_SEARCH"),sR(e,t,n,i);const h=new AbortController;let f=!1;const p=()=>{f||(f=!0,e.updateMatch(t,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:h})))},g=()=>{var A;(A=i._nonReactive.beforeLoadPromise)==null||A.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,C=>({...C,isFetching:!1}))};if(!n.options.beforeLoad){e.router.batch(()=>{p(),g()});return}i._nonReactive.beforeLoadPromise=Fl();const y={...Xs(e,r,!1),...i.__routeContext},{search:x,params:b,cause:w}=i,N=Qm(e,t),_={search:x,abortController:h,params:b,preload:N,context:y,location:e.location,navigate:A=>e.router.navigate({...A,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:N?"preload":w,matches:e.matches,routeId:n.id,...e.router.options.additionalContext},E=A=>{if(A===void 0){e.router.batch(()=>{p(),g()});return}(zr(A)||Or(A))&&(p(),uc(e,r,A,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,C=>({...C,__beforeLoadContext:A})),g()})};let T;try{if(T=n.options.beforeLoad(_),Dc(T))return p(),T.catch(A=>{uc(e,r,A,"BEFORE_LOAD")}).then(E)}catch(A){p(),uc(e,r,A,"BEFORE_LOAD")}E(T)},A8=(e,t)=>{const{id:r,routeId:n}=e.matches[t],i=e.router.looseRoutesById[n],o=()=>c(),l=()=>E8(e,r,t,i),c=()=>{if(iR(e,r))return;const h=O8(e,r,i);return Dc(h)?h.then(l):l()};return o()},T8=(e,t,r)=>{var o,l,c,h,f,p;const n=e.router.getMatch(t);if(!n||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([(l=(o=r.options).head)==null?void 0:l.call(o,i),(h=(c=r.options).scripts)==null?void 0:h.call(c,i),(p=(f=r.options).headers)==null?void 0:p.call(f,i)]).then(([g,y,x])=>({meta:g==null?void 0:g.meta,links:g==null?void 0:g.links,headScripts:g==null?void 0:g.scripts,headers:x,scripts:y,styles:g==null?void 0:g.styles}))},oR=(e,t,r,n,i)=>{const o=t[n-1],{params:l,loaderDeps:c,abortController:h,cause:f}=e.router.getMatch(r),p=Xs(e,n),g=Qm(e,r);return{params:l,deps:c,preload:!!g,parentMatchPromise:o,abortController:h,context:p,location:e.location,navigate:y=>e.router.navigate({...y,_fromLocation:e.location}),cause:g?"preload":f,route:i,...e.router.options.additionalContext}},UO=async(e,t,r,n,i)=>{var o,l,c,h,f;try{const p=e.router.getMatch(r);try{(!(J2??e.router.isServer)||p.ssr===!0)&&Lc(i);const g=i.options.loader,y=typeof g=="function"?g:g==null?void 0:g.handler,x=y==null?void 0:y(oR(e,t,r,n,i)),b=!!y&&Dc(x);if((b||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||p._nonReactive.minPendingPromise)&&e.updateMatch(r,N=>({...N,isFetching:"loader"})),y){const N=b?await x:x;Ki(e,e.router.getMatch(r),N),N!==void 0&&e.updateMatch(r,_=>({..._,loaderData:N}))}i._lazyPromise&&await i._lazyPromise;const w=p._nonReactive.minPendingPromise;w&&await w,i._componentsPromise&&await i._componentsPromise,e.updateMatch(r,N=>({...N,error:void 0,context:Xs(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(g){let y=g;if((y==null?void 0:y.name)==="AbortError"){if(p.abortController.signal.aborted){(o=p._nonReactive.loaderPromise)==null||o.resolve(),p._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,b=>({...b,status:b.status==="pending"?"success":b.status,isFetching:!1,context:Xs(e,n)}));return}const x=p._nonReactive.minPendingPromise;x&&await x,Or(g)&&await((c=(l=i.options.notFoundComponent)==null?void 0:l.preload)==null?void 0:c.call(l)),Ki(e,e.router.getMatch(r),g);try{(f=(h=i.options).onError)==null||f.call(h,g)}catch(b){y=b,Ki(e,e.router.getMatch(r),b)}!zr(y)&&!Or(y)&&await Lc(i,["errorComponent"]),e.updateMatch(r,b=>({...b,error:y,context:Xs(e,n),status:"error",isFetching:!1}))}}catch(p){const g=e.router.getMatch(r);g&&(g._nonReactive.loaderPromise=void 0),Ki(e,g,p)}},C8=async(e,t,r)=>{var x,b,w,N;async function n(_,E,T,A,C){const R=Date.now()-E.updatedAt,D=_?C.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:C.options.staleTime??e.router.options.defaultStaleTime??0,M=C.options.shouldReload,z=typeof M=="function"?M(oR(e,t,i,r,C)):M,{status:k,invalid:H}=A,U=R>=D&&(!!e.forceStaleReload||A.cause==="enter"||T!==void 0&&T!==A.id);l=k==="success"&&(H||(z??U)),_&&C.options.preload===!1||(l&&!e.sync&&p?(c=!0,(async()=>{var ae,Z;try{await UO(e,t,i,r,C);const G=e.router.getMatch(i);(ae=G._nonReactive.loaderPromise)==null||ae.resolve(),(Z=G._nonReactive.loadPromise)==null||Z.resolve(),G._nonReactive.loaderPromise=void 0,G._nonReactive.loadPromise=void 0}catch(G){zr(G)&&await e.router.navigate(G.options)}})()):k!=="success"||l?await UO(e,t,i,r,C):BO(e,i,r))}const{id:i,routeId:o}=e.matches[r];let l=!1,c=!1;const h=e.router.looseRoutesById[o],f=h.options.loader,p=((typeof f=="function"||f==null?void 0:f.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(iR(e,i)){if(!e.router.getMatch(i))return e.matches[r];BO(e,i,r)}else{const _=e.router.getMatch(i),E=e.router.stores.matchesId.state[r],T=((x=E&&e.router.stores.activeMatchStoresById.get(E)||null)==null?void 0:x.routeId)===o?E:(b=e.router.stores.activeMatchesSnapshot.state.find(C=>C.routeId===o))==null?void 0:b.id,A=Qm(e,i);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&p)return _;await _._nonReactive.loaderPromise;const C=e.router.getMatch(i),R=C._nonReactive.error||C.error;R&&Ki(e,C,R),C.status==="pending"&&await n(A,_,T,C,h)}else{const C=A&&!e.router.stores.activeMatchStoresById.has(i),R=e.router.getMatch(i);R._nonReactive.loaderPromise=Fl(),C!==R.preload&&e.updateMatch(i,D=>({...D,preload:C})),await n(A,_,T,R,h)}}const g=e.router.getMatch(i);c||((w=g._nonReactive.loaderPromise)==null||w.resolve(),(N=g._nonReactive.loadPromise)==null||N.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,c||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const y=c?g.isFetching:!1;return y!==g.isFetching||g.invalid!==!1?(e.updateMatch(i,_=>({..._,isFetching:y,invalid:!1})),e.router.getMatch(i)):g};async function qO(e){var y,x;const t=e,r=[];_8(t.router)&&Ix(t);let n;for(let b=0;b<t.matches.length;b++){try{const w=A8(t,b);Dc(w)&&await w}catch(w){if(zr(w))throw w;if(Or(w))n=w;else if(!t.preload)throw w;break}if(t.serialError)break}const i=t.firstBadMatchIndex??t.matches.length,o=n&&!t.preload?zO(t,n):void 0,l=n&&t.preload?0:o!==void 0?Math.min(o+1,i):i;let c,h;for(let b=0;b<l;b++)r.push(C8(t,r,b));try{await Promise.all(r)}catch{const b=await Promise.allSettled(r);for(const w of b){if(w.status!=="rejected")continue;const N=w.reason;if(zr(N))throw N;Or(N)?c??(c=N):h??(h=N)}if(h!==void 0)throw h}const f=c??(n&&!t.preload?n:void 0);let p=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!f&&n&&t.preload)return t.matches;if(f){const b=zO(t,f);b===void 0&&qa();const w=t.matches[b],N=t.router.looseRoutesById[w.routeId],_=(y=t.router.options)==null?void 0:y.defaultNotFoundComponent;!N.options.notFoundComponent&&_&&(N.options.notFoundComponent=_),f.routeId=w.routeId;const E=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,T=>({...T,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),p=b,await Lc(N,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||(x=t.router.getMatch(b.id))!=null&&x.globalNotFound&&t.updateMatch(b.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Lc(b,["errorComponent"])}for(let b=0;b<=p;b++){const{id:w,routeId:N}=t.matches[b],_=t.router.looseRoutesById[N];try{const E=T8(t,w,_);if(E){const T=await E;t.updateMatch(w,A=>({...A,...T}))}}catch(E){console.error(`Error executing head for route ${N}:`,E)}}const g=Ix(t);if(Dc(g)&&await g,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function FO(e,t){const r=t.map(n=>{var i,o;return(o=(i=e.options[n])==null?void 0:i.preload)==null?void 0:o.call(i)}).filter(Boolean);if(r.length!==0)return Promise.all(r)}function Lc(e,t=Ah){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(n=>{const{id:i,...o}=n.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:t===Ah?(()=>{if(e._componentsPromise===void 0){const n=FO(e,Ah);n?e._componentsPromise=n.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():FO(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function lR(e){var t;for(const r of Ah)if((t=e.options[r])!=null&&t.preload)return!0;return!1}var Ah=["component","errorComponent","pendingComponent","notFoundComponent"],Qi="__TSR_index",HO="popstate",KO="beforeunload";function P8(e){let t=e.getLocation();const r=new Set,n=l=>{t=e.getLocation(),r.forEach(c=>c({location:t,action:l}))},i=l=>{e.notifyOnIndexChange??!0?n(l):t=e.getLocation()},o=async({task:l,navigateOpts:c,...h})=>{var g,y;if((c==null?void 0:c.ignoreBlocker)??!1){l();return}const f=((g=e.getBlockers)==null?void 0:g.call(e))??[],p=h.type==="PUSH"||h.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const x of f){const b=Uh(h.path,h.state);if(await x.blockerFn({currentLocation:t,nextLocation:b,action:h.type})){(y=e.onBlocked)==null||y.call(e);return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:l=>(r.add(l),()=>{r.delete(l)}),push:(l,c,h)=>{const f=t.state[Qi];c=GO(f+1,c),o({task:()=>{e.pushState(l,c),n({type:"PUSH"})},navigateOpts:h,type:"PUSH",path:l,state:c})},replace:(l,c,h)=>{const f=t.state[Qi];c=GO(f,c),o({task:()=>{e.replaceState(l,c),n({type:"REPLACE"})},navigateOpts:h,type:"REPLACE",path:l,state:c})},go:(l,c)=>{o({task:()=>{e.go(l),i({type:"GO",index:l})},navigateOpts:c,type:"GO"})},back:l=>{o({task:()=>{e.back((l==null?void 0:l.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{o({task:()=>{e.forward((l==null?void 0:l.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Qi]!==0,createHref:l=>e.createHref(l),block:l=>{var h;if(!e.setBlockers)return()=>{};const c=((h=e.getBlockers)==null?void 0:h.call(e))??[];return e.setBlockers([...c,l]),()=>{var p,g;const f=((p=e.getBlockers)==null?void 0:p.call(e))??[];(g=e.setBlockers)==null||g.call(e,f.filter(y=>y!==l))}},flush:()=>{var l;return(l=e.flush)==null?void 0:l.call(e)},destroy:()=>{var l;return(l=e.destroy)==null?void 0:l.call(e)},notify:n}}function GO(e,t){t||(t={});const r=Jb();return{...t,key:r,__TSR_key:r,[Qi]:e}}function R8(e){var M,z;const t=typeof document<"u"?window:void 0,r=t.history.pushState,n=t.history.replaceState;let i=[];const o=()=>i,l=k=>i=k,c=(k=>k),h=(()=>Uh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((M=t.history.state)!=null&&M.__TSR_key)&&!((z=t.history.state)!=null&&z.key)){const k=Jb();t.history.replaceState({[Qi]:0,key:k,__TSR_key:k},"")}let f=h(),p,g=!1,y=!1,x=!1,b=!1;const w=()=>f;let N,_;const E=()=>{N&&(D._ignoreSubscribers=!0,(N.isPush?t.history.pushState:t.history.replaceState)(N.state,"",N.href),D._ignoreSubscribers=!1,N=void 0,_=void 0,p=void 0)},T=(k,H,U)=>{const ae=c(H);_||(p=f),f=Uh(H,U),N={href:ae,state:U,isPush:(N==null?void 0:N.isPush)||k==="push"},_||(_=Promise.resolve().then(()=>E()))},A=k=>{f=h(),D.notify({type:k})},C=async()=>{if(y){y=!1;return}const k=h(),H=k.state[Qi]-f.state[Qi],U=H===1,ae=H===-1,Z=!U&&!ae||g;g=!1;const G=Z?"GO":ae?"BACK":"FORWARD",L=Z?{type:"GO",index:H}:{type:ae?"BACK":"FORWARD"};if(x)x=!1;else{const F=o();if(typeof document<"u"&&F.length){for(const J of F)if(await J.blockerFn({currentLocation:f,nextLocation:k,action:G})){y=!0,t.history.go(1),D.notify(L);return}}}f=h(),D.notify(L)},R=k=>{if(b){b=!1;return}let H=!1;const U=o();if(typeof document<"u"&&U.length)for(const ae of U){const Z=ae.enableBeforeUnload??!0;if(Z===!0){H=!0;break}if(typeof Z=="function"&&Z()===!0){H=!0;break}}if(H)return k.preventDefault(),k.returnValue=""},D=P8({getLocation:w,getLength:()=>t.history.length,pushState:(k,H)=>T("push",k,H),replaceState:(k,H)=>T("replace",k,H),back:k=>(k&&(x=!0),b=!0,t.history.back()),forward:k=>{k&&(x=!0),b=!0,t.history.forward()},go:k=>{g=!0,t.history.go(k)},createHref:k=>c(k),flush:E,destroy:()=>{t.history.pushState=r,t.history.replaceState=n,t.removeEventListener(KO,R,{capture:!0}),t.removeEventListener(HO,C)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(KO,R,{capture:!0}),t.addEventListener(HO,C),t.history.pushState=function(...k){const H=r.apply(t.history,k);return D._ignoreSubscribers||A("PUSH"),H},t.history.replaceState=function(...k){const H=n.apply(t.history,k);return D._ignoreSubscribers||A("REPLACE"),H},D}function M8(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Uh(e,t){const r=M8(e),n=r.indexOf("#"),i=r.indexOf("?"),o=Jb();return{href:r,pathname:r.substring(0,n>0?i>0?Math.min(n,i):n:i>0?i:r.length),hash:n>-1?r.substring(n):"",search:i>-1?r.slice(i,n===-1?void 0:n):"",state:t||{[Qi]:0,key:o,__TSR_key:o}}}function Jb(){return(Math.random()+1).toString(36).substring(7)}function Nl(e,t){const r=t,n=e;return{fromLocation:r,toLocation:n,pathChanged:(r==null?void 0:r.pathname)!==n.pathname,hrefChanged:(r==null?void 0:r.href)!==n.href,hashChanged:(r==null?void 0:r.hash)!==n.hash}}var D8=class{constructor(e,t){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=r=>r(),this.update=r=>{var p;const n=this.options,i=this.basepath??(n==null?void 0:n.basepath)??"/",o=this.basepath===void 0,l=n==null?void 0:n.rewrite;if(this.options={...n,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=u8(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=R8()),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 g;this.resolvePathCache=kc(1e3),g=this.buildRouteTree(),this.setRoutes(g)}if(!this.stores&&this.latestLocation){const g=this.getStoreConfig(this);this.batch=g.batch,this.stores=N8(L8(this.latestLocation),g),p8(this)}let c=!1;const h=this.options.basepath??"/",f=this.options.rewrite;if(o||i!==h||l!==f){this.basepath=h;const g=[],y=nR(h);y&&y!=="/"&&g.push(S8({basepath:h})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:w8(g),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((p=window.CSS)==null?void 0:p.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 r=n8(this.routeTree,this.options.caseSensitive,(n,i)=>{n.init({originalIndex:i})});return this.options.routeMasks&&Zz(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,n)=>{const i={eventType:r,fn:n};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=r=>{this.subscribers.forEach(n=>{n.eventType===r.type&&n.fn(r)})},this.parseLocation=(r,n)=>{const i=({pathname:h,search:f,hash:p,href:g,state:y})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(h)){const _=this.options.parseSearch(f),E=this.options.stringifySearch(_);return{href:h+E+p,publicHref:g,pathname:sc(h).path,external:!1,searchStr:E,search:Ss(n==null?void 0:n.search,_),hash:sc(p.slice(1)).path,state:za(n==null?void 0:n.state,y)}}const x=new URL(g,this.origin),b=$x(this.rewrite,x),w=this.options.parseSearch(b.search),N=this.options.stringifySearch(w);return b.search=N,{href:b.href.replace(b.origin,""),publicHref:g,pathname:sc(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:N,search:Ss(n==null?void 0:n.search,w),hash:sc(b.hash.slice(1)).path,state:za(n==null?void 0:n.state,y)}},o=i(r),{__tempLocation:l,__tempKey:c}=o.state;if(l&&(!c||c===this.tempLocationKey)){const h=i(l);return h.state.key=o.state.key,h.state.__TSR_key=o.state.__TSR_key,delete h.state.__tempLocation,{...h,maskedLocation:o}}return o},this.resolvePathWithBase=(r,n)=>l8({base:r,to:Wb(n),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,n,i)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:n},i):this.matchRoutesInternal(r,n),this.getMatchedRoutes=r=>$8({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const n=this.getMatch(r);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.state.forEach(r=>{var i;if(this.stores.pendingMatchStoresById.has(r))return;const n=(i=this.stores.activeMatchStoresById.get(r))==null?void 0:i.state;n&&(n.status==="pending"||n.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const n=(o={})=>{var k,H;const l=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(l);o.from;const h=o.unsafeRelative==="path"?l.pathname:o.from??c.fullPath,f=this.resolvePathWithBase(h,"."),p=c.search,g=Object.assign(Object.create(null),c.params),y=o.to?this.resolvePathWithBase(f,`${o.to}`):this.resolvePathWithBase(f,"."),x=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?g:Object.assign(g,Hi(o.params,g)),b=this.getMatchedRoutes(y);let w=b.matchedRoutes;if((!b.foundRoute||b.foundRoute.path!=="/"&&b.routeParams["**"])&&this.options.notFoundRoute&&(w=[...w,this.options.notFoundRoute]),Object.keys(x).length>0)for(const U of w){const ae=((k=U.options.params)==null?void 0:k.stringify)??U.options.stringifyParams;if(ae)try{Object.assign(x,ae(x))}catch{}}const N=r.leaveParams?y:sc(kO({path:y,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=p;if(r._includeValidateSearch&&((H=this.options.search)!=null&&H.strict)){const U={};w.forEach(ae=>{if(ae.options.validateSearch)try{Object.assign(U,Th(ae.options.validateSearch,{...U,..._}))}catch{}}),_=U}_=I8({search:_,dest:o,destRoutes:w,_includeValidateSearch:r._includeValidateSearch}),_=Ss(p,_);const E=this.options.stringifySearch(_),T=o.hash===!0?l.hash:o.hash?Hi(o.hash,l.hash):void 0,A=T?`#${T}`:"";let C=o.state===!0?l.state:o.state?Hi(o.state,l.state):{};C=za(l.state,C);const R=`${N}${E}${A}`;let D,M,z=!1;if(this.rewrite){const U=new URL(R,this.origin),ae=aR(this.rewrite,U);D=U.href.replace(U.origin,""),ae.origin!==this.origin?(M=ae.href,z=!0):M=ae.pathname+ae.search+ae.hash}else D=Qz(R),M=D;return{publicHref:M,href:D,pathname:N,search:_,searchStr:E,state:C,hash:T??"",external:z,unmaskOnReload:o.unmaskOnReload}},i=(o={},l)=>{const c=n(o);let h=l?n(l):void 0;if(!h){const f=Object.create(null);if(this.options.routeMasks){const p=Jz(c.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:g,params:y,...x}=p.route,b=y===!1||y===null?Object.create(null):(y??!0)===!0?f:Object.assign(f,Hi(y,f));l={from:r.from,...x,params:b},h=n(l)}}}return h&&(c.maskedLocation=h),c};return r.mask?i(r,{from:r.from,...r.mask}):i(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:n,...i})=>{const o=()=>{const h=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];h.forEach(p=>{i.state[p]=this.latestLocation.state[p]});const f=Vs(i.state,this.latestLocation.state);return h.forEach(p=>{delete i.state[p]}),f},l=Vi(this.latestLocation.href)===Vi(i.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Fl(()=>{c==null||c.resolve(),c=void 0}),l&&o())this.load();else{let{maskedLocation:h,hashScrollIntoView:f,...p}=i;h&&(p={...h,state:{...h.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[i.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:n,hashScrollIntoView:i,viewTransition:o,ignoreBlocker:l,href:c,...h}={})=>{if(c){const g=this.history.location.state.__TSR_index,y=Uh(c,{__TSR_index:r?g:g+1}),x=new URL(y.pathname,this.origin);h.to=$x(this.rewrite,x).pathname,h.search=this.options.parseSearch(y.search),h.hash=y.hash.slice(1)}const f=this.buildLocation({...h,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const p=this.commitLocation({...f,viewTransition:o,replace:r,resetScroll:n,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:r,reloadDocument:n,href:i,publicHref:o,...l})=>{var h,f;let c=!1;if(i)try{new URL(`${i}`),c=!0}catch{}if(c&&!n&&(n=!0),n){if(r!==void 0||!i){const g=this.buildLocation({to:r,...l});i=i??g.publicHref,o=o??g.publicHref}const p=!c&&o?o:i;if(zh(p,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const g=((f=(h=this.history).getBlockers)==null?void 0:f.call(h))??[];for(const y of g)if(y!=null&&y.blockerFn&&await y.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...l,href:i,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),n=this.stores.cachedMatchesSnapshot.state.filter(i=>!r.some(o=>o.id===i.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(r),this.stores.setCachedMatches(n)})},this.load=async r=>{let n,i,o;const l=this.stores.resolvedLocation.state??this.stores.location.state;for(o=new Promise(h=>{this.startTransition(async()=>{var f;try{this.beforeLoad();const p=this.latestLocation,g=this.stores.resolvedLocation.state,y=Nl(p,g);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await qO({router:this,sync:r==null?void 0:r.sync,forceStaleReload:l.href===p.href,matches:this.stores.pendingMatchesSnapshot.state,location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var _,E;let x=null,b=null,w=null,N=null;this.batch(()=>{const T=this.stores.pendingMatchesSnapshot.state,A=T.length,C=this.stores.activeMatchesSnapshot.state;x=A?C.filter(M=>!this.stores.pendingMatchStoresById.has(M.id)):null;const R=new Set;for(const M of this.stores.pendingMatchStoresById.values())M.routeId&&R.add(M.routeId);const D=new Set;for(const M of this.stores.activeMatchStoresById.values())M.routeId&&D.add(M.routeId);b=A?C.filter(M=>!R.has(M.routeId)):null,w=A?T.filter(M=>!D.has(M.routeId)):null,N=A?T.filter(M=>D.has(M.routeId)):C,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),A&&(this.stores.setActiveMatches(T),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...x.filter(M=>M.status!=="error"&&M.status!=="notFound"&&M.status!=="redirected")]),this.clearExpiredCache())});for(const[T,A]of[[b,"onLeave"],[w,"onEnter"],[N,"onStay"]])if(T)for(const C of T)(E=(_=this.looseRoutesById[C.routeId].options)[A])==null||E.call(_,C)})})}})}catch(p){zr(p)?(n=p,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):Or(p)&&(i=p);const g=n?n.status:i?404:this.stores.activeMatchesSnapshot.state.some(y=>y.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>g),this.stores.redirect.setState(()=>n)})}this.latestLoadPromise===o&&((f=this.commitLocationPromise)==null||f.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),h()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.activeMatchesSnapshot.state.some(h=>h.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.setState(()=>c)},this.startViewTransition=r=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,l=this.stores.resolvedLocation.state,c=typeof n.types=="function"?n.types(Nl(o,l)):n.types;if(c===!1){r();return}i={update:r,types:c}}else i=r;document.startViewTransition(i)}else r()},this.updateMatch=(r,n)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStoresById.get(r);if(i){i.setState(n);return}const o=this.stores.activeMatchStoresById.get(r);if(o){o.setState(n);return}const l=this.stores.cachedMatchStoresById.get(r);if(l){const c=n(l.state);c.status==="redirected"?this.stores.cachedMatchStoresById.delete(r)&&this.stores.cachedMatchesId.setState(h=>h.filter(f=>f!==r)):l.setState(()=>c)}})},this.getMatch=r=>{var n,i,o;return((n=this.stores.cachedMatchStoresById.get(r))==null?void 0:n.state)??((i=this.stores.pendingMatchStoresById.get(r))==null?void 0:i.state)??((o=this.stores.activeMatchStoresById.get(r))==null?void 0:o.state)},this.invalidate=r=>{const n=i=>{var o;return((o=r==null?void 0:r.filter)==null?void 0:o.call(r,i))??!0?{...i,invalid:!0,...r!=null&&r.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(n)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(n)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(n))}),this.shouldViewTransition=!1,this.load({sync:r==null?void 0:r.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const n=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const i=r.options._builtLocation??this.buildLocation(r.options),o=this.getParsedLocationHref(i);r.options.href=o,r.headers.set("Location",o)}else if(n)try{const i=new URL(n);if(this.origin&&i.origin===this.origin){const o=i.pathname+i.search+i.hash;r.options.href=o,r.headers.set("Location",o)}}catch{}if(r.options.href&&!r.options._builtLocation&&zh(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const n=r==null?void 0:r.filter;n!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(i=>!n(i))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const r=Date.now(),n=i=>{const o=this.looseRoutesById[i.routeId];if(!o.options.loader)return!0;const l=(i.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:r-i.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=Lc,this.preloadRoute=async r=>{const n=r._builtLocation??this.buildLocation(r);let i=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:r});const o=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),l=new Set([...o,...this.stores.cachedMatchesId.state]),c=i.filter(h=>!l.has(h.id));if(c.length){const h=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...h,...c])}try{return i=await qO({router:this,matches:i,location:n,preload:!0,updateMatch:(h,f)=>{o.has(h)?i=i.map(p=>p.id===h?f(p):p):this.updateMatch(h,f)}}),i}catch(h){if(zr(h))return h.options.reloadDocument?void 0:await this.preloadRoute({...h.options,_fromLocation:n});Or(h)||console.error(h);return}},this.matchRoute=(r,n)=>{const i={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},o=this.buildLocation(i);if(n!=null&&n.pending&&this.stores.status.state!=="pending")return!1;const l=((n==null?void 0:n.pending)===void 0?!this.stores.isLoading.state:n.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,c=e8(o.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,l.pathname,this.processedTree);return!c||r.params&&!Vs(c.rawParams,r.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?Vs(l.search,o.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??x8,parseSearch:e.parseSearch??v8,protocolAllowlist:e.protocolAllowlist??Vz}),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:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var g,y;const r=this.getMatchedRoutes(e.pathname),{foundRoute:n,routeParams:i,parsedParams:o}=r;let{matchedRoutes:l}=r,c=!1;(n?n.path!=="/"&&i["**"]:Vi(e.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:c=!0);const h=c?B8(this.options.notFoundMode,l):void 0,f=new Array(l.length),p=new Map;for(const x of this.stores.activeMatchStoresById.values())x.routeId&&p.set(x.routeId,x.state);for(let x=0;x<l.length;x++){const b=l[x],w=f[x-1];let N,_,E;{const G=(w==null?void 0:w.search)??e.search,L=(w==null?void 0:w._strictSearch)??void 0;try{const F=Th(b.options.validateSearch,{...G})??void 0;N={...G,...F},_={...L,...F},E=void 0}catch(F){let J=F;if(F instanceof qh||(J=new qh(F.message,{cause:F})),t!=null&&t.throwOnError)throw J;N=G,_={},E=J}}const T=((y=(g=b.options).loaderDeps)==null?void 0:y.call(g,{search:N}))??"",A=T?JSON.stringify(T):"",{interpolatedPath:C,usedParams:R}=kO({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),D=b.id+C+A,M=this.getMatch(D),z=p.get(b.id),k=(M==null?void 0:M._strictParams)??R;let H;if(!M)try{YO(b,R,o,k)}catch(G){if(Or(G)||zr(G)?H=G:H=new k8(G.message,{cause:G}),t!=null&&t.throwOnError)throw H}Object.assign(i,k);const U=z?"stay":"enter";let ae;if(M)ae={...M,cause:U,params:(z==null?void 0:z.params)??i,_strictParams:k,search:Ss(z?z.search:M.search,N),_strictSearch:_};else{const G=b.options.loader||b.options.beforeLoad||b.lazyFn||lR(b)?"pending":"success";ae={id:D,ssr:b.options.ssr,index:x,routeId:b.id,params:(z==null?void 0:z.params)??i,_strictParams:k,pathname:C,updatedAt:Date.now(),search:z?Ss(z.search,N):N,_strictSearch:_,searchError:void 0,status:G,isFetching:!1,error:void 0,paramsError:H,__routeContext:void 0,_nonReactive:{loadPromise:Fl()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:U,loaderDeps:z?za(z.loaderDeps,T):T,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t!=null&&t.preload||(ae.globalNotFound=h===b.id),ae.searchError=E;const Z=this.getParentContext(w);ae.context={...Z,...ae.__routeContext,...ae.__beforeLoadContext},f[x]=ae}for(let x=0;x<f.length;x++){const b=f[x],w=this.looseRoutesById[b.routeId],N=this.getMatch(b.id),_=p.get(b.routeId);if(b.params=_?Ss(_.params,i):i,!N){const E=f[x-1],T=this.getParentContext(E);if(w.options.context){const A={deps:b.loaderDeps,params:b.params,context:T??{},location:e,navigate:C=>this.navigate({...C,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:f,routeId:w.id};b.__routeContext=w.options.context(A)??void 0}b.context={...T,...b.__routeContext,...b.__beforeLoadContext}}}return f}matchRoutesLightweight(e){var p;const{matchedRoutes:t,routeParams:r,parsedParams:n}=this.getMatchedRoutes(e.pathname),i=Mc(t),o={...e.search};for(const g of t)try{Object.assign(o,Th(g.options.validateSearch,o))}catch{}const l=Mc(this.stores.matchesId.state),c=l&&((p=this.stores.activeMatchStoresById.get(l))==null?void 0:p.state),h=c&&c.routeId===i.id&&c.pathname===e.pathname;let f;if(h)f=c.params;else{const g=Object.assign(Object.create(null),r);for(const y of t)try{YO(y,r,n??{},g)}catch{}f=g}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:f}}},qh=class extends Error{},k8=class extends Error{};function L8(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Th(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new qh("Async validation not supported");if(r.issues)throw new qh(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function $8({pathname:e,routesById:t,processedTree:r}){const n=Object.create(null),i=Vi(e);let o,l;const c=t8(i,r,!0);return c&&(o=c.route,Object.assign(n,c.rawParams),l=Object.assign(Object.create(null),c.parsedParams)),{matchedRoutes:(c==null?void 0:c.branch)||[t.__root__],routeParams:n,foundRoute:o,parsedParams:l}}function I8({search:e,dest:t,destRoutes:r,_includeValidateSearch:n}){return z8(r)(e,t,n??!1)}function z8(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)(i=o.options.search)!=null&&i.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const l=({search:c,next:h})=>{let f=c;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(f=o.options.preSearchFilters.reduce((g,y)=>y(g),c));const p=h(f);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((g,y)=>y(g),p):p};t.middlewares.push(l)}if(o.options.validateSearch){const l=({search:c,next:h})=>{const f=h(c);if(!t._includeValidateSearch)return f;try{return{...f,...Th(o.options.validateSearch,f)??void 0}}catch{return f}};t.middlewares.push(l)}}const r=({search:o})=>{const l=t.dest;return l.search?l.search===!0?o:Hi(l.search,o):{}};t.middlewares.push(r);const n=(o,l,c)=>{if(o>=c.length)return l;const h=c[o];return h({search:l,next:p=>n(o+1,p,c)})};return function(l,c,h){return t.dest=c,t._includeValidateSearch=h,n(0,l,t.middlewares)}}function B8(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const n=t[r];if(n.children)return n.id}return Qs}function YO(e,t,r,n){var o;const i=((o=e.options.params)==null?void 0:o.parse)??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const l in t)l in r&&(n[l]=r[l]);else{const l=i(n);Object.assign(n,l)}}var U8="Error preloading route! ☝️",uR=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var h,f;this.originalIndex=t.originalIndex;const r=this.options,n=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(f=(h=this.options).getParentRoute)==null?void 0:f.call(h),n?this._path=Qs:this.parentRoute||qa();let i=n?Qs:r==null?void 0:r.path;i&&i!=="/"&&(i=rR(i));const o=(r==null?void 0:r.id)||i;let l=n?Qs:Eh([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),l!=="__root__"&&(l=Eh(["/",l]));const c=l==="__root__"?"/":Eh([this.parentRoute.fullPath,i]);this._path=i,this._id=l,this._fullPath=c,this._to=Vi(c)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Zb({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},q8=class extends uR{constructor(e){super(e)}};function F8(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.state,r=t.state.__hashScrollIntoViewOptions??!0;if(r&&t.hash!==""){const n=document.getElementById(t.hash);n&&n.scrollIntoView(r)}}}function ej(e){const t=e.errorComponent??tj;return d.jsx(H8,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:n})=>r?S.createElement(t,{error:r,reset:n}):e.children})}var H8=class extends S.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function tj({error:e}){const[t,r]=S.useState(!1);return d.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[d.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),d.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(n=>!n),children:t?"Hide Error":"Show Error"})]}),d.jsx("div",{style:{height:".25rem"}}),t?d.jsx("div",{children:d.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?d.jsx("code",{children:e.message}):null})}):null]})}function K8({children:e,fallback:t=null}){return cR()?d.jsx(Ul.Fragment,{children:e}):d.jsx(Ul.Fragment,{children:t})}function cR(){return Ul.useSyncExternalStore(G8,()=>!0,()=>!1)}function G8(){return()=>{}}var dR=S.createContext(null);function xr(e){return S.useContext(dR)}var Xm=S.createContext(void 0),Y8=S.createContext(void 0),ft=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(ft||{});function V8({update:e,notify:t,unwatched:r}){return{link:n,unlink:i,propagate:o,checkDirty:l,shallowPropagate:c};function n(f,p,g){const y=p.depsTail;if(y!==void 0&&y.dep===f)return;const x=y!==void 0?y.nextDep:p.deps;if(x!==void 0&&x.dep===f){x.version=g,p.depsTail=x;return}const b=f.subsTail;if(b!==void 0&&b.version===g&&b.sub===p)return;const w=p.depsTail=f.subsTail={version:g,dep:f,sub:p,prevDep:y,nextDep:x,prevSub:b,nextSub:void 0};x!==void 0&&(x.prevDep=w),y!==void 0?y.nextDep=w:p.deps=w,b!==void 0?b.nextSub=w:f.subs=w}function i(f,p=f.sub){const g=f.dep,y=f.prevDep,x=f.nextDep,b=f.nextSub,w=f.prevSub;return x!==void 0?x.prevDep=y:p.depsTail=y,y!==void 0?y.nextDep=x:p.deps=x,b!==void 0?b.prevSub=w:g.subsTail=w,w!==void 0?w.nextSub=b:(g.subs=b)===void 0&&r(g),x}function o(f){let p=f.nextSub,g;e:do{const y=f.sub;let x=y.flags;if(x&60?x&12?x&4?!(x&48)&&h(f,y)?(y.flags=x|40,x&=1):x=0:y.flags=x&-9|32:x=0:y.flags=x|32,x&2&&t(y),x&1){const b=y.subs;if(b!==void 0){const w=(f=b).nextSub;w!==void 0&&(g={value:p,prev:g},p=w);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;g!==void 0;)if(f=g.value,g=g.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function l(f,p){let g,y=0,x=!1;e:do{const b=f.dep,w=b.flags;if(p.flags&16)x=!0;else if((w&17)===17){if(e(b)){const N=b.subs;N.nextSub!==void 0&&c(N),x=!0}}else if((w&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(g={value:f,prev:g}),f=b.deps,p=b,++y;continue}if(!x){const N=f.nextDep;if(N!==void 0){f=N;continue}}for(;y--;){const N=p.subs,_=N.nextSub!==void 0;if(_?(f=g.value,g=g.prev):f=N,x){if(e(p)){_&&c(N),p=f.sub;continue}x=!1}else p.flags&=-33;p=f.sub;const E=f.nextDep;if(E!==void 0){f=E;continue e}}return x}while(!0)}function c(f){do{const p=f.sub,g=p.flags;(g&48)===32&&(p.flags=g|16,(g&6)===2&&t(p))}while((f=f.nextSub)!==void 0)}function h(f,p){let g=p.depsTail;for(;g!==void 0;){if(g===f)return!0;g=g.prevDep}return!1}}function rj(e,t,r){var o,l,c;const n=typeof e=="object",i=n?e:void 0;return{next:(o=n?e.next:e)==null?void 0:o.bind(i),error:(l=n?e.error:t)==null?void 0:l.bind(i),complete:(c=n?e.complete:r)==null?void 0:c.bind(i)}}const zx=[];let Ch=0;const{link:VO,unlink:Q8,propagate:X8,checkDirty:fR,shallowPropagate:QO}=V8({update(e){return e._update()},notify(e){zx[Bx++]=e,e.flags&=~ft.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=ft.Mutable|ft.Dirty,Fh(e))}});let ah=0,Bx=0,Jn,Ux=0;function hR(e){try{++Ux,e()}finally{--Ux||mR()}}function Fh(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=Q8(r,e)}function mR(){if(!(Ux>0)){for(;ah<Bx;){const e=zx[ah];zx[ah++]=void 0,e.notify()}ah=0,Bx=0}}function pR(e,t){const r=typeof e=="function",n=e,i={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?ft.None:ft.Mutable,get(){return Jn!==void 0&&VO(i,Jn,Ch),i._snapshot},subscribe(o){const l=rj(o),c={current:!1},h=W8(()=>{var f;i.get(),c.current?(f=l.next)==null||f.call(l,i._snapshot):c.current=!0});return{unsubscribe:()=>{h.stop()}}},_update(o){const l=Jn,c=Object.is;if(r)Jn=i,++Ch,i.depsTail=void 0;else if(o===void 0)return!1;r&&(i.flags=ft.Mutable|ft.RecursedCheck);try{const h=i._snapshot,f=typeof o=="function"?o(h):o===void 0&&r?n(h):o;return h===void 0||!c(h,f)?(i._snapshot=f,!0):!1}finally{Jn=l,r&&(i.flags&=~ft.RecursedCheck),Fh(i)}}};return r?(i.flags=ft.Mutable|ft.Dirty,i.get=function(){const o=i.flags;if(o&ft.Dirty||o&ft.Pending&&fR(i.deps,i)){if(i._update()){const l=i.subs;l!==void 0&&QO(l)}}else o&ft.Pending&&(i.flags=o&~ft.Pending);return Jn!==void 0&&VO(i,Jn,Ch),i._snapshot}):i.set=function(o){if(i._update(o)){const l=i.subs;l!==void 0&&(X8(l),QO(l),mR())}},i}function W8(e){const t=()=>{const n=Jn;Jn=r,++Ch,r.depsTail=void 0,r.flags=ft.Watching|ft.RecursedCheck;try{return e()}finally{Jn=n,r.flags&=~ft.RecursedCheck,Fh(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ft.Watching|ft.RecursedCheck,notify(){const n=this.flags;n&ft.Dirty||n&ft.Pending&&fR(this.deps,this)?t():this.flags=ft.Watching},stop(){this.flags=ft.None,this.depsTail=void 0,Fh(this)}};return t(),r}class Z8{constructor(t){this.atom=pR(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(rj(t))}}class J8{constructor(t){this.atom=pR(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(rj(t))}}function XO(e){return typeof e=="function"?new J8(e):new Z8(e)}var Cv={exports:{}},Pv={},Rv={exports:{}},Mv={};/**
|
|
50
|
+
* @license React
|
|
51
|
+
* use-sync-external-store-shim.production.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/var WO;function eB(){if(WO)return Mv;WO=1;var e=tu();function t(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function c(g,y){var x=y(),b=n({inst:{value:x,getSnapshot:y}}),w=b[0].inst,N=b[1];return o(function(){w.value=x,w.getSnapshot=y,h(w)&&N({inst:w})},[g,x,y]),i(function(){return h(w)&&N({inst:w}),g(function(){h(w)&&N({inst:w})})},[g]),l(x),x}function h(g){var y=g.getSnapshot;g=g.value;try{var x=y();return!r(g,x)}catch{return!0}}function f(g,y){return y()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Mv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Mv}var ZO;function tB(){return ZO||(ZO=1,Rv.exports=eB()),Rv.exports}/**
|
|
58
|
+
* @license React
|
|
59
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/var JO;function rB(){if(JO)return Pv;JO=1;var e=tu(),t=tB();function r(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,c=e.useMemo,h=e.useDebugValue;return Pv.useSyncExternalStoreWithSelector=function(f,p,g,y,x){var b=o(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=c(function(){function _(R){if(!E){if(E=!0,T=R,R=y(R),x!==void 0&&w.hasValue){var D=w.value;if(x(D,R))return A=D}return A=R}if(D=A,n(T,R))return D;var M=y(R);return x!==void 0&&x(D,M)?(T=R,D):(T=R,A=M)}var E=!1,T,A,C=g===void 0?null:g;return[function(){return _(p())},C===null?void 0:function(){return _(C())}]},[p,g,y,x]);var N=i(f,b[0],b[1]);return l(function(){w.hasValue=!0,w.value=N},[N]),h(N),N},Pv}var eE;function nB(){return eE||(eE=1,Cv.exports=rB()),Cv.exports}var gR=nB();function aB(e,t){return e===t}function cr(e,t,r=aB){const n=S.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(l);return c},[e]),i=S.useCallback(()=>e==null?void 0:e.get(),[e]);return gR.useSyncExternalStoreWithSelector(n,i,i,t,r)}var iB={state:void 0,get:()=>{},subscribe:()=>()=>{}};function mo(e){const t=xr(),r=S.useContext(e.from?Y8:Xm),n=e.from??r,i=n?e.from?t.stores.getMatchStoreByRouteId(n):t.stores.activeMatchStoresById.get(n):void 0,o=S.useRef(void 0);return cr(i??iB,l=>{if((e.shouldThrow??!0)&&!l&&qa(),l===void 0)return;const c=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const h=za(o.current,c);return o.current=h,h}return c})}function yR(e){return mo({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function vR(e){const{select:t,...r}=e;return mo({...r,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function xR(e){return mo({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function bR(e){return mo({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function po(e){const t=xr();return S.useCallback(r=>t.navigate({...r,from:r.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function jR(e){return mo({...e,select:t=>e.select?e.select(t.context):t.context})}var Wm=L2();function sB(e,t){const r=xr(),n=Fz(t),{activeProps:i,inactiveProps:o,activeOptions:l,to:c,preload:h,preloadDelay:f,hashScrollIntoView:p,replace:g,startTransition:y,resetScroll:x,viewTransition:b,children:w,target:N,disabled:_,style:E,className:T,onClick:A,onBlur:C,onFocus:R,onMouseEnter:D,onMouseLeave:M,onTouchStart:z,ignoreBlocker:k,params:H,search:U,hash:ae,state:Z,mask:G,reloadDocument:L,unsafeRelative:F,from:J,_fromLocation:re,...oe}=e,$=cR(),X=S.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),le=cr(r.stores.location,Ce=>Ce,(Ce,mr)=>Ce.href===mr.href),ue=S.useMemo(()=>{const Ce={_fromLocation:le,...X};return r.buildLocation(Ce)},[r,le,X]),pe=ue.maskedLocation?ue.maskedLocation.publicHref:ue.publicHref,xe=ue.maskedLocation?ue.maskedLocation.external:ue.external,we=S.useMemo(()=>fB(pe,xe,r.history,_),[_,xe,pe,r.history]),_e=S.useMemo(()=>{if(we!=null&&we.external)return zh(we.href,r.protocolAllowlist)?void 0:we.href;if(!hB(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),zh(c,r.protocolAllowlist)?void 0:c}catch{}},[c,we,r.protocolAllowlist]),de=S.useMemo(()=>{if(_e)return!1;if(l!=null&&l.exact){if(!o8(le.pathname,ue.pathname,r.basepath))return!1}else{const Ce=Bh(le.pathname,r.basepath),mr=Bh(ue.pathname,r.basepath);if(!(Ce.startsWith(mr)&&(Ce.length===mr.length||Ce[mr.length]==="/")))return!1}return((l==null?void 0:l.includeSearch)??!0)&&!Vs(le.search,ue.search,{partial:!(l!=null&&l.exact),ignoreUndefined:!(l!=null&&l.explicitUndefined)})?!1:l!=null&&l.includeHash?$&&le.hash===ue.hash:!0},[l==null?void 0:l.exact,l==null?void 0:l.explicitUndefined,l==null?void 0:l.includeHash,l==null?void 0:l.includeSearch,le,_e,$,ue.hash,ue.pathname,ue.search,r.basepath]),te=de?Hi(i,{})??oB:Dv,je=de?Dv:Hi(o,{})??Dv,ce=[T,te.className,je.className].filter(Boolean).join(" "),Et=(E||te.style||je.style)&&{...E,...te.style,...je.style},[Me,At]=S.useState(!1),Tt=S.useRef(!1),hr=e.reloadDocument||_e?!1:h??r.options.defaultPreload,ma=f??r.options.defaultPreloadDelay??0,Pn=S.useCallback(()=>{r.preloadRoute({...X,_builtLocation:ue}).catch(Ce=>{console.warn(Ce),console.warn(U8)})},[r,X,ue]);qz(n,S.useCallback(Ce=>{Ce!=null&&Ce.isIntersecting&&Pn()},[Pn]),dB,{disabled:!!_||hr!=="viewport"}),S.useEffect(()=>{Tt.current||!_&&hr==="render"&&(Pn(),Tt.current=!0)},[_,Pn,hr]);const du=Ce=>{const mr=Ce.currentTarget.getAttribute("target"),Kn=N!==void 0?N:mr;if(!_&&!mB(Ce)&&!Ce.defaultPrevented&&(!Kn||Kn==="_self")&&Ce.button===0){Ce.preventDefault(),Wm.flushSync(()=>{At(!0)});const Ld=r.subscribe("onResolved",()=>{Ld(),At(!1)});r.navigate({...X,replace:g,resetScroll:x,hashScrollIntoView:p,startTransition:y,viewTransition:b,ignoreBlocker:k})}};if(_e)return{...oe,ref:n,href:_e,...w&&{children:w},...N&&{target:N},..._&&{disabled:_},...E&&{style:E},...T&&{className:T},...A&&{onClick:A},...C&&{onBlur:C},...R&&{onFocus:R},...D&&{onMouseEnter:D},...M&&{onMouseLeave:M},...z&&{onTouchStart:z}};const No=Ce=>{if(_||hr!=="intent")return;if(!ma){Pn();return}const mr=Ce.currentTarget;if(cc.has(mr))return;const Kn=setTimeout(()=>{cc.delete(mr),Pn()},ma);cc.set(mr,Kn)},tg=Ce=>{_||hr!=="intent"||Pn()},kd=Ce=>{if(_||!hr||!ma)return;const mr=Ce.currentTarget,Kn=cc.get(mr);Kn&&(clearTimeout(Kn),cc.delete(mr))};return{...oe,...te,...je,href:we==null?void 0:we.href,ref:n,onClick:ul([A,du]),onBlur:ul([C,kd]),onFocus:ul([R,No]),onMouseEnter:ul([D,No]),onMouseLeave:ul([M,kd]),onTouchStart:ul([z,tg]),disabled:!!_,target:N,...Et&&{style:Et},...ce&&{className:ce},..._&&lB,...de&&uB,...$&&Me&&cB}}var Dv={},oB={className:"active"},lB={role:"link","aria-disabled":!0},uB={"data-status":"active","aria-current":"page"},cB={"data-transitioning":"transitioning"},cc=new WeakMap,dB={rootMargin:"100px"},ul=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function fB(e,t,r,n){if(!n)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function hB(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Ee=S.forwardRef((e,t)=>{const{_asChild:r,...n}=e,{type:i,...o}=sB(n,t),l=typeof n.children=="function"?n.children({isActive:o["data-status"]==="active"}):n.children;if(!r){const{disabled:c,...h}=o;return S.createElement("a",h,l)}return S.createElement(r,o,l)});function mB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var pB=class extends uR{constructor(t){super(t),this.useMatch=r=>mo({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>jR({...r,from:this.id}),this.useSearch=r=>bR({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>xR({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>vR({...r,from:this.id}),this.useLoaderData=r=>yR({...r,from:this.id}),this.useNavigate=()=>po({from:this.fullPath}),this.Link=Ul.forwardRef((r,n)=>d.jsx(Ee,{ref:n,from:this.fullPath,...r}))}};function gB(e){return new pB(e)}var yB=class extends q8{constructor(e){super(e),this.useMatch=t=>mo({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>jR({...t,from:this.id}),this.useSearch=t=>bR({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>xR({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>vR({...t,from:this.id}),this.useLoaderData=t=>yR({...t,from:this.id}),this.useNavigate=()=>po({from:this.fullPath}),this.Link=Ul.forwardRef((t,r)=>d.jsx(Ee,{ref:r,from:this.fullPath,...t}))}};function vB(e){return new yB(e)}function dr(e){return typeof e=="object"?new tE(e,{silent:!0}).createRoute(e):new tE(e,{silent:!0}).createRoute}var tE=class{constructor(e,t){this.path=e,this.createRoute=r=>{const n=gB(r);return n.isRoot=!1,n},this.silent=t==null?void 0:t.silent}};function xB(e){const t=xr(),r=`not-found-${cr(t.stores.location,n=>n.pathname)}-${cr(t.stores.status,n=>n)}`;return d.jsx(ej,{getResetKey:()=>r,onCatch:(n,i)=>{var o;if(Or(n))(o=e.onCatch)==null||o.call(e,n,i);else throw n},errorComponent:({error:n})=>{var i;if(Or(n))return(i=e.fallback)==null?void 0:i.call(e,n);throw n},children:e.children})}function bB(){return d.jsx("p",{children:"Not Found"})}function xl(e){return d.jsx(d.Fragment,{children:e.children})}function wR(e,t,r){return t.options.notFoundComponent?d.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?d.jsx(e.options.defaultNotFoundComponent,{...r}):d.jsx(bB,{})}function jB(e){return null}function wB(){return jB(xr()),null}var SR=S.memo(function({matchId:t}){const r=xr(),n=r.stores.activeMatchStoresById.get(t);n||qa();const i=cr(r.stores.loadedAt,l=>l),o=cr(n,l=>l);return d.jsx(SB,{router:r,matchId:t,resetKey:i,matchState:S.useMemo(()=>{var h;const l=o.routeId,c=(h=r.routesById[l].parentRoute)==null?void 0:h.id;return{routeId:l,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:c}},[o._displayPending,o.routeId,o.ssr,r.routesById])})});function SB({router:e,matchId:t,resetKey:r,matchState:n}){var b,w;const i=e.routesById[n.routeId],o=i.options.pendingComponent??e.options.defaultPendingComponent,l=o?d.jsx(o,{}):null,c=i.options.errorComponent??e.options.defaultErrorComponent,h=i.options.onCatch??e.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??((b=e.options.notFoundRoute)==null?void 0:b.options.component):i.options.notFoundComponent,p=n.ssr===!1||n.ssr==="data-only",g=(!i.isRoot||i.options.wrapInSuspense||p)&&(i.options.wrapInSuspense??o??(((w=i.options.errorComponent)==null?void 0:w.preload)||p))?S.Suspense:xl,y=c?ej:xl,x=f?xB:xl;return d.jsxs(i.isRoot?i.options.shellComponent??xl:xl,{children:[d.jsx(Xm.Provider,{value:t,children:d.jsx(g,{fallback:l,children:d.jsx(y,{getResetKey:()=>r,errorComponent:c||tj,onCatch:(N,_)=>{if(Or(N))throw N;h==null||h(N,_)},children:d.jsx(x,{fallback:N=>{if(!f||N.routeId&&N.routeId!==n.routeId||!N.routeId&&!i.isRoot)throw N;return S.createElement(f,N)},children:p||n._displayPending?d.jsx(K8,{fallback:l,children:d.jsx(rE,{matchId:t})}):d.jsx(rE,{matchId:t})})})})}),n.parentRouteId===Qs?d.jsxs(d.Fragment,{children:[d.jsx(NB,{resetKey:r}),e.options.scrollRestoration&&J2?d.jsx(wB,{}):null]}):null]})}function NB({resetKey:e}){const t=xr(),r=S.useRef(void 0);return Sc(()=>{const n=t.latestLocation.href;(r.current===void 0||r.current!==n)&&(t.emit({type:"onRendered",...Nl(t.stores.location.state,t.stores.resolvedLocation.state)}),r.current=n)},[t.latestLocation.state.__TSR_key,e,t]),null}var rE=S.memo(function({matchId:t}){var f,p,g,y;const r=xr(),n=r.stores.activeMatchStoresById.get(t);n||qa();const i=cr(n,x=>x),o=i.routeId,l=r.routesById[o],c=S.useMemo(()=>{var b;const x=(b=r.routesById[o].options.remountDeps??r.options.defaultRemountDeps)==null?void 0:b({routeId:o,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return x?JSON.stringify(x):void 0},[o,i.loaderDeps,i._strictParams,i._strictSearch,r.options.defaultRemountDeps,r.routesById]),h=S.useMemo(()=>{const x=l.options.component??r.options.defaultComponent;return x?d.jsx(x,{},c):d.jsx(NR,{})},[c,l.options.component,r.options.defaultComponent]);if(i._displayPending)throw(f=r.getMatch(i.id))==null?void 0:f._nonReactive.displayPendingPromise;if(i._forcePending)throw(p=r.getMatch(i.id))==null?void 0:p._nonReactive.minPendingPromise;if(i.status==="pending"){const x=l.options.pendingMinMs??r.options.defaultPendingMinMs;if(x){const b=r.getMatch(i.id);if(b&&!b._nonReactive.minPendingPromise){const w=Fl();b._nonReactive.minPendingPromise=w,setTimeout(()=>{w.resolve(),b._nonReactive.minPendingPromise=void 0},x)}}throw(g=r.getMatch(i.id))==null?void 0:g._nonReactive.loadPromise}if(i.status==="notFound")return Or(i.error)||qa(),wR(r,l,i.error);if(i.status==="redirected")throw zr(i.error)||qa(),(y=r.getMatch(i.id))==null?void 0:y._nonReactive.loadPromise;if(i.status==="error")throw i.error;return h}),NR=S.memo(function(){const t=xr(),r=S.useContext(Xm);let n,i=!1,o;{const f=r?t.stores.activeMatchStoresById.get(r):void 0;[n,i]=cr(f,p=>[p==null?void 0:p.routeId,(p==null?void 0:p.globalNotFound)??!1]),o=cr(t.stores.matchesId,p=>p[p.findIndex(g=>g===r)+1])}const l=n?t.routesById[n]:void 0,c=t.options.defaultPendingComponent?d.jsx(t.options.defaultPendingComponent,{}):null;if(i)return l||qa(),wR(t,l,void 0);if(!o)return null;const h=d.jsx(SR,{matchId:o});return n===Qs?d.jsx(S.Suspense,{fallback:c,children:h}):h});function _B(){const e=xr(),t=S.useRef({router:e,mounted:!1}),[r,n]=S.useState(!1),i=cr(e.stores.isLoading,g=>g),o=cr(e.stores.hasPendingMatches,g=>g),l=wv(i),c=i||r||o,h=wv(c),f=i||o,p=wv(f);return e.startTransition=g=>{n(!0),S.startTransition(()=>{g(),n(!1)})},S.useEffect(()=>{const g=e.history.subscribe(e.load),y=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Vi(e.latestLocation.publicHref)!==Vi(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{g()}},[e,e.history]),Sc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(y){console.error(y)}})()},[e]),Sc(()=>{l&&!i&&e.emit({type:"onLoad",...Nl(e.stores.location.state,e.stores.resolvedLocation.state)})},[l,e,i]),Sc(()=>{p&&!f&&e.emit({type:"onBeforeRouteMount",...Nl(e.stores.location.state,e.stores.resolvedLocation.state)})},[f,p,e]),Sc(()=>{if(h&&!c){const g=Nl(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:"onResolved",...g}),hR(()=>{e.stores.status.setState(()=>"idle"),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),g.hrefChanged&&F8(e)}},[c,h,e]),null}function OB(){const e=xr(),t=e.routesById[Qs].options.pendingComponent??e.options.defaultPendingComponent,r=t?d.jsx(t,{}):null,n=d.jsxs(typeof document<"u"&&e.ssr?xl:S.Suspense,{fallback:r,children:[d.jsx(_B,{}),d.jsx(EB,{})]});return e.options.InnerWrap?d.jsx(e.options.InnerWrap,{children:n}):n}function EB(){const e=xr(),t=cr(e.stores.firstMatchId,i=>i),r=cr(e.stores.loadedAt,i=>i),n=t?d.jsx(SR,{matchId:t}):null;return d.jsx(Xm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?n:d.jsx(ej,{getResetKey:()=>r,errorComponent:tj,onCatch:void 0,children:n})})}function AB(){const e=xr();return cr(e.stores.matchRouteReactivity,t=>t),S.useCallback(t=>{const{pending:r,caseSensitive:n,fuzzy:i,includeSearch:o,...l}=t;return e.matchRoute(l,{pending:r,caseSensitive:n,fuzzy:i,includeSearch:o})},[e])}function TB(e){const t=xr(),r=S.useRef(void 0);return cr(t.stores.activeMatchesSnapshot,n=>{const i=n;if(t.options.defaultStructuralSharing){const o=za(r.current,i);return r.current=o,o}return i})}var CB=e=>({createMutableStore:XO,createReadonlyStore:XO,batch:hR}),PB=e=>new RB(e),RB=class extends D8{constructor(e){super(e,CB)}};function MB({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const n=d.jsx(dR.Provider,{value:e,children:t});return e.options.Wrap?d.jsx(e.options.Wrap,{children:n}):n}function DB({router:e,...t}){return d.jsx(MB,{router:e,...t,children:d.jsx(OB,{})})}function nj(e){const r=xr();return S.useRef(void 0),cr(r.stores.__store,n=>n)}function aj(e){const t=xr(),r=S.useRef(void 0);return cr(t.stores.location,n=>{const i=n;if(t.options.defaultStructuralSharing){const o=za(r.current,i);return r.current=o,o}return i})}const _R=S.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function kB({children:e}){const[t,r]=S.useState(!1),n=S.useCallback(()=>r(l=>!l),[]),i=S.useCallback(()=>r(!1),[]),o=S.useMemo(()=>({isOpen:t,toggle:n,close:i}),[i,t,n]);return d.jsx(_R.Provider,{value:o,children:e})}function OR(){return S.useContext(_R)}function LB(e){return`agentv.studio.initial-project-redirect:${e}`}function ij(e,t){const r=`/projects/${encodeURIComponent(e)}`;return t?`${r}?tab=${encodeURIComponent(t)}`:r}function Ai(e,t){return t?`/projects/${encodeURIComponent(t)}/runs/${encodeURIComponent(e)}`:`/runs/${encodeURIComponent(e)}`}function qx(e,t,r){return r?`/projects/${encodeURIComponent(r)}/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`:`/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`}function dd(e){return e.resultDir?{result_dir:e.resultDir}:e.evalPath?{eval_path:e.evalPath}:{}}function $B(e,t,r={}){const n=qx(e,t,r.projectId),o=new URLSearchParams(dd(r)).toString();return o?`${n}?${o}`:n}function Zm(e){return e.result_dir?e.result_dir:[e.eval_path??e.suite??"",e.testId,e.target??""].join(":")}function Jm(e,t,r={}){return e.testId===t&&(!r.resultDir||e.result_dir===r.resultDir)&&(!r.evalPath||e.eval_path===r.evalPath)}function nE(e,t,r){const n=`tags/${encodeURIComponent(e)}/${encodeURIComponent(t)}`;return r?`/projects/${encodeURIComponent(r)}/${n}`:`/${n}`}function aE(e,t){return t?`/projects/${encodeURIComponent(t)}/jobs/${encodeURIComponent(e)}`:`/jobs/${encodeURIComponent(e)}`}function iE(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`}function sE(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`}function IB(e){return e?ij(e,"runs"):"/?tab=runs"}function zB(e,t,r=!1){if(!r)return t&&e.includes(t)?t:void 0}function BB(e,t,r,n){return t===!1?{kind:"single-project-home"}:r&&e.includes(r)?{kind:"redirect",redirectPath:ij(r,n)}:{kind:"dashboard"}}function nr(e){if(!e)return"Run";const t=e.split("::").at(-1)||e,r=t.match(/^\d{4}-\d{2}-\d{2}T\d{2}[-:]\d{2}[-:]\d{2}(?:[-.]\d+)?Z/);return(r==null?void 0:r[0])??t}function UB(e){const t=[];for(let r=1;r<e.length;r++){const n=e[r],i=n.routeId??n.id,o=n.params;if(!(i==="/"||i==="/_layout")){if(i.includes("/projects/$projectId")&&o.projectId){const l=o.projectId,c=ij(o.projectId);if(t.some(h=>h.to===c)||t.push({label:l,to:c}),i==="/projects/$projectId")continue}i.includes("/projects/$projectId_/jobs/$runId")?t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:aE(o.runId,o.projectId)}):i.includes("/projects/$projectId_/runs/$runId/category/$category")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId,o.projectId)}),t.push({label:o.category??"Category",to:iE(o.runId,o.category??"Category",o.projectId)})):i.includes("/projects/$projectId_/runs/$runId/suite/$suite")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId,o.projectId)}),t.push({label:o.suite??"Suite",to:sE(o.runId,o.suite??"Suite",o.projectId)})):i.includes("/projects/$projectId_/runs/$runId")?t.push({label:nr(o.runId),to:Ai(o.runId,o.projectId)}):i.includes("/projects/$projectId_/evals/$runId/$evalId")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId,o.projectId)}),t.push({label:o.evalId??"Eval",to:qx(o.runId,o.evalId??"Eval",o.projectId)})):i.includes("/projects/$projectId_/tags/$key/$value")?t.push({label:o.value??"Tag",to:nE(o.key??"experiment",o.value??"Tag",o.projectId)}):i.includes("/runs/$runId/category/$category")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId)}),t.push({label:o.category??"Category",to:iE(o.runId,o.category??"Category")})):i.includes("/runs/$runId/suite/$suite")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId)}),t.push({label:o.suite??"Suite",to:sE(o.runId,o.suite??"Suite")})):i.includes("/jobs/$runId")?t.push({label:nr(o.runId),to:aE(o.runId)}):i.includes("/runs/$runId")?t.push({label:nr(o.runId),to:Ai(o.runId)}):i.includes("/evals/$runId/$evalId")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId)}),t.push({label:o.evalId??"Eval",to:qx(o.runId,o.evalId??"Eval")})):i.includes("/tags/$key/$value")?t.push({label:o.value??"Tag",to:nE(o.key??"experiment",o.value??"Tag")}):i==="/settings"&&t.push({label:"Settings",to:"/settings"})}}return t}function qB(){const e=TB(),{toggle:t}=OR(),r=UB(e),n=r.length>0;return d.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-h-12 min-w-0 items-center gap-2 border-b border-gray-800 bg-gray-950 px-4 py-2 text-sm md:px-6",children:[d.jsx("button",{type:"button",onClick:t,className:"shrink-0 text-gray-400 hover:text-gray-200 md:hidden","aria-label":"Toggle navigation",children:d.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:[d.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),d.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),d.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[n?d.jsx(Ee,{to:"/",className:"shrink-0 text-cyan-400 hover:text-cyan-300 hover:underline",children:"Projects"}):d.jsx("span",{className:"shrink-0 text-gray-400",children:"Projects"}),r.map((i,o)=>{const l=o===r.length-1;return d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"shrink-0 text-gray-600",children:">"}),l?d.jsx("span",{className:"min-w-0 truncate text-gray-400",children:i.label}):d.jsx(Ee,{to:i.to??"/",className:"min-w-0 truncate text-cyan-400 hover:text-cyan-300 hover:underline",children:i.label})]},`${i.label}-${o}`)})]})]})}function FB(e){const t=e.pending_merge;if(t)return{tempBranch:t.temp_branch,targetBranch:t.target_branch,...t.compare_url!==void 0&&{compareUrl:t.compare_url},...t.contributed_run_count!==void 0&&{contributedRunCount:t.contributed_run_count},createdAt:t.created_at}}function ER(e){if(!e)return;const t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toLocaleString()}function HB(e){const t=ER(e);return t?`Last synced ${t}`:"Never synced"}function sj(e){return typeof e!="number"||!Number.isFinite(e)?"Remote runs unknown":`${e} remote run${e===1?"":"s"}`}function AR(e,t,r){const n=r?` (${r})`:"";return`${e} of ${t} run${t===1?"":"s"} on remote${n}`}function KB(e,t,r){return(e==null?void 0:e.configured)!==!0?[]:[t?`Project: ${t}`:void 0,r??sj(e.run_count),HB(e.last_synced_at),e.repo?`Repo: ${e.repo}`:void 0].filter(n=>n!==void 0)}function GB(e){return(e==null?void 0:e.sync_status)==="syncing"}function YB(e,t=!1){if(t||(e==null?void 0:e.sync_status)==="syncing")return{state:"syncing",label:"Syncing",actionLabel:"Syncing...",tone:"info",summary:"Sync is in progress.",canSync:!1};if((e==null?void 0:e.configured)!==!0)return{state:"unconfigured",label:"Not configured",actionLabel:"Sync Project",tone:"neutral",summary:"Remote results are not configured for this project.",canSync:!1};if(e.available!==!0||e.sync_status==="unavailable")return{state:"unavailable",label:"Unavailable",actionLabel:"Sync Project",tone:"warn",summary:"The remote results cache is not available locally.",nextAction:"Sync Project can clone or refresh the configured results repo.",canSync:!0};const r=e.sync_status??"clean";if(r==="needs_human_merge"){const n=FB(e);return n?{state:"needs_human_merge",label:"Pending merge",actionLabel:"Sync Project",tone:"warn",summary:e.block_reason??`Local results could not be auto-merged, so they were pushed to ${n.tempBranch} for review.`,nextAction:`No history was rewritten and the canonical branch was left untouched. Merge the branch into ${n.targetBranch} on GitHub, then click "I merged it — resync".`,canSync:!1,pendingMerge:n}:{state:"needs_human_merge",label:"Needs human merge",actionLabel:"Sync Project",tone:"danger",summary:e.block_reason??"The results branch diverged and a genuine content conflict could not be auto-merged.",nextAction:"The remote branch is unchanged and no history was rewritten. Resolve the conflict with a GitHub pull request, then sync again.",canSync:!1}}return r==="push_conflict"?{state:"push_conflict",label:"Push conflict",actionLabel:"Sync Project",tone:"danger",summary:e.block_reason??"The remote results branch changed before local results could be pushed.",nextAction:"Sync stopped before changing the results branch. Refresh status, then retry — results sync auto-merges concurrent writes and never force-pushes.",canSync:!1}:r==="conflicted"||r==="diverged"?{state:"conflicted",label:"Conflicted",actionLabel:"Sync Project",tone:"danger",summary:e.block_reason??(r==="diverged"?"Local and remote results histories have diverged.":"The results repo has unresolved conflicts."),nextAction:"Resolve the results repo conflicts manually, then sync the project again.",canSync:!1}:r==="dirty"?{state:"dirty",label:"Dirty",actionLabel:"Sync Results",tone:"warn",summary:e.block_reason??"Local result artifacts have pending edits.",nextAction:e.auto_push===!0?"Sync Project will commit safe result artifact changes before syncing.":"Review or commit the pending result artifacts; no reset will be performed.",canSync:!0}:r==="behind"?{state:"behind",label:"Behind",actionLabel:"Sync Project",tone:"info",summary:`Remote has ${e.behind??0} commit${e.behind===1?"":"s"} to pull.`,nextAction:"Sync Project will fast-forward when possible.",canSync:!0}:r==="ahead"?{state:"ahead",label:"Ahead",actionLabel:"Push Results",tone:"info",summary:`Local results are ${e.ahead??0} commit${e.ahead===1?"":"s"} ahead.`,nextAction:e.auto_push===!0?"Sync Project will push safe result changes.":"Enable auto_push or push the results repo manually.",canSync:!0}:{state:"clean",label:"Clean",actionLabel:"Sync Project",tone:"good",summary:"Local and remote results are in sync.",canSync:!0}}function VB(e){return typeof e!="number"||!Number.isFinite(e)?"remote results":sj(e)}function oE(e){const t=[`Synced ${VB(e.run_count)}`];e.repo&&t.push(`from ${e.repo}`);const r=ER(e.last_synced_at);return r&&t.push(`at ${r}`),`${t.join(" ")}.`}function QB(e){if((e==null?void 0:e.available)!==!0)return;const t=e.run_count;return typeof t=="number"&&Number.isFinite(t)&&t>0?`Cached ${sj(t)} ${t===1?"remains":"remain"} available.`:"The remote results cache remains available."}function oj(e){return[QB(e),"Resolve the results repo issue, then sync remote results again."].filter(t=>t!==void 0).join(" ")}function Hh(e){if(e.blocked||e.sync_status==="conflicted"||e.sync_status==="diverged"||e.sync_status==="push_conflict"){const r=e.repo?` for ${e.repo}`:"",n=e.block_reason??"Sync stopped before changing the results repo.";return{kind:"warning",message:`Sync stopped${r}: ${n}. ${oj(e)}`}}const t=[e.commit_created?"committed pending results":void 0,e.pull_performed?"pulled remote results":void 0,e.auto_merged_remote?"Merged remote (auto)":void 0,e.push_performed?"pushed local results":void 0].filter(r=>r!==void 0);return{kind:"success",message:t.length>0?`${oE(e)} Sync completed: ${t.join(", ")}.`:`${oE(e)} Project results were already up to date.`}}function Kh(e,t){return{kind:"error",message:`Sync failed: ${e instanceof Error?e.message:String(e)}. ${oj(t)}`}}async function He(e){const t=await fetch(e);if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.json()}async function XB(e){const t=await fetch(e);if(t.status===404)return null;if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.text()}const WB=50;function TR(e,t){const r=new URLSearchParams({limit:String(WB)});return t&&r.set("cursor",t),`${e}?${r.toString()}`}function CR(e){var t;return!e||e.length===0?{runs:[]}:{runs:e.flatMap(r=>r.runs),next_cursor:(t=e.at(-1))==null?void 0:t.next_cursor}}function lE(e){return e.split("/").filter(t=>t.length>0).map(t=>encodeURIComponent(t)).join("/")}function fd(e,t){const r=t.toString();return r?`${e}?${r}`:e}function hd(e){const t=new URLSearchParams;return e&&t.set("result_dir",e),t}function _n(e){const t=e.projectId?`${ut(e.projectId)}/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${lE(e.filePath)}`:`/api/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${lE(e.filePath)}`,r=hd(e.resultDir);return e.raw&&r.set("raw","1"),e.download&&r.set("download","1"),fd(t,r)}const lj={queryKey:["runs"],queryFn:()=>He("/api/runs"),refetchInterval:5e3},ZB={queryKey:["runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:e})=>He(TR("/api/runs",e)),getNextPageParam:e=>e.next_cursor,refetchInterval:5e3};function JB(e){return{queryKey:["runs",e],queryFn:()=>He(`/api/runs/${encodeURIComponent(e)}`),enabled:!!e}}function e6(e,t){const r=t?`${ut(t)}/runs/${encodeURIComponent(e)}/log`:`/api/runs/${encodeURIComponent(e)}/log`;return{queryKey:["runs",e,"log",t??""],queryFn:()=>XB(r),enabled:!!e,refetchInterval:3e3}}function t6(e,t){return Ue(e6(e,t))}const jl="experiment",r6={queryKey:["tags","keys"],queryFn:()=>He("/api/tags")};function uj(e){return{queryKey:["tags","groups",e],queryFn:()=>He(`/api/tags?key=${encodeURIComponent(e)}`),enabled:!!e}}function n6(e){return{queryKey:["projects",e,"tags","keys"],queryFn:()=>He(`${ut(e)}/tags`),enabled:!!e}}function cj(e,t){return{queryKey:["projects",e,"tags","groups",t],queryFn:()=>He(`${ut(e)}/tags?key=${encodeURIComponent(t)}`),enabled:!!e&&!!t}}function a6(e){return{queryKey:["compare","baseline",e??""],queryFn:()=>He(`/api/compare?baseline=${encodeURIComponent(e??"")}`),enabled:!!e}}const i6={queryKey:["compare"],queryFn:()=>He("/api/compare")},s6={queryKey:["targets"],queryFn:()=>He("/api/targets")};function o6(e,t,r){const n=`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/files`;return{queryKey:["runs",e,"evals",t,r??"","files"],queryFn:()=>He(fd(n,hd(r))),enabled:!!e&&!!t}}function l6(e,t,r,n){return{queryKey:["runs",e,"evals",t,n??"","files",r],queryFn:()=>He(_n({runId:e,evalId:t,filePath:r,resultDir:n})),enabled:!!e&&!!t&&!!r}}function u6(e,t,r){const n=`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/transcript`;return{queryKey:["runs",e,"evals",t,r??"","transcript"],queryFn:()=>He(fd(n,hd(r))),enabled:!!e&&!!t}}function c6(e,t){return{queryKey:["runs",e,"categories",t,"suites"],queryFn:()=>He(`/api/runs/${encodeURIComponent(e)}/categories/${encodeURIComponent(t)}/suites`),enabled:!!e&&!!t}}const d6={queryKey:["config"],queryFn:()=>He("/api/config"),staleTime:5e3};function $c(e){const t=e?`${ut(e)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",e??""],queryFn:()=>He(t),staleTime:5e3,refetchInterval:r=>GB(r.state.data)?1e3:!1}}function f6(){return Ue(lj)}function h6(){var t;const e=Z2(ZB);return{...e,data:CR((t=e.data)==null?void 0:t.pages)}}function md(e){return Ue(JB(e))}function m6(){return Ue(i6)}function p6(e,t,r){return Ue(o6(e,t,r))}function Gh(e,t,r,n){return Ue(l6(e,t,r,n))}function g6(e,t,r){return Ue(u6(e,t,r))}function PR(e,t){return Ue(c6(e,t))}function pt(e){return Ue(e?A6(e):d6)}function ep(e){return Ue($c(e))}const Ic=.8,tp="AgentV";function to(e,t=Ic){return e>=t}const y6={queryKey:["projects"],queryFn:()=>He("/api/projects"),refetchInterval:1e4};function dj(){return Ue(y6)}async function v6(e){const t=new URLSearchParams;e!=null&&e.trim()&&t.set("path",e.trim());const r=t.toString(),n=await fetch(`/api/filesystem/browse${r?`?${r}`:""}`);if(!n.ok){const o=await n.json().catch(()=>({error:n.statusText}));throw new Error(o.error??`Failed to browse folders: ${n.status}`)}const i=await n.json();return{path:i.path,parentPath:i.parent_path,current:{name:i.current.name,path:i.current.path,hasAgentv:i.current.has_agentv},entries:i.entries.map(o=>({name:o.name,path:o.path,hasAgentv:o.has_agentv}))}}async function x6(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})});if(!t.ok){const n=await t.json();throw new Error(n.error||`Failed to add project: ${t.status}`)}const r=await t.json();return{id:r.id,path:r.path,addedAt:r.added_at,lastOpenedAt:r.last_opened_at}}async function b6(e){const t=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok){const r=await t.json().catch(()=>({error:t.statusText}));throw new Error(r.error??`Failed to remove project: ${t.status}`)}}function ut(e){return`/api/projects/${encodeURIComponent(e)}`}function fj(e){return{queryKey:["projects",e,"runs"],queryFn:()=>He(`${ut(e)}/runs`),enabled:!!e,refetchInterval:5e3}}function j6(e){return{queryKey:["projects",e,"runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:t})=>He(TR(`${ut(e)}/runs`,t)),getNextPageParam:t=>t.next_cursor,enabled:!!e,refetchInterval:5e3}}function w6(e){return Ue(fj(e))}function S6(e){var r;const t=Z2(j6(e));return{...t,data:CR((r=t.data)==null?void 0:r.pages)}}function N6(e,t){return{queryKey:["projects",e,"runs",t],queryFn:()=>He(`${ut(e)}/runs/${encodeURIComponent(t)}`),enabled:!!e&&!!t}}function pd(e,t){return Ue(N6(e,t))}function RR(e,t,r){return{queryKey:["projects",e,"runs",t,"categories",r,"suites"],queryFn:()=>He(`${ut(e)}/runs/${encodeURIComponent(t)}/categories/${encodeURIComponent(r)}/suites`),enabled:!!e&&!!t&&!!r}}function _6(e,t,r,n){const i=`${ut(e)}/runs/${encodeURIComponent(t)}/evals/${encodeURIComponent(r)}/files`;return{queryKey:["projects",e,"runs",t,"evals",r,n??"","files"],queryFn:()=>He(fd(i,hd(n))),enabled:!!e&&!!t&&!!r}}function Yh(e,t,r,n,i){return{queryKey:["projects",e,"runs",t,"evals",r,i??"","files",n],queryFn:()=>He(_n({projectId:e,runId:t,evalId:r,filePath:n,resultDir:i})),enabled:!!e&&!!t&&!!r&&!!n}}function O6(e,t,r,n){const i=`${ut(e)}/runs/${encodeURIComponent(t)}/evals/${encodeURIComponent(r)}/transcript`;return{queryKey:["projects",e,"runs",t,"evals",r,n??"","transcript"],queryFn:()=>He(fd(i,hd(n))),enabled:!!e&&!!t&&!!r}}function MR(e,t){const r=`${ut(e)}/compare`;return t?{queryKey:["projects",e,"compare","baseline",t],queryFn:()=>He(`${r}?baseline=${encodeURIComponent(t)}`),enabled:!!e}:{queryKey:["projects",e,"compare"],queryFn:()=>He(r),enabled:!!e}}function E6(e){return{queryKey:["projects",e,"targets"],queryFn:()=>He(`${ut(e)}/targets`),enabled:!!e}}function A6(e){return{queryKey:["projects",e,"config"],queryFn:()=>He(`${ut(e)}/config`),enabled:!!e,staleTime:5e3}}async function DR(e){const t=e?`${ut(e)}/remote/sync`:"/api/remote/sync",r=await fetch(t,{method:"POST"});if(!r.ok){const n=await r.json().catch(()=>({error:r.statusText}));throw new Error(n.error??`Failed to sync remote results: ${r.status}`)}return r.json()}async function kR(e){const t=e?`${ut(e)}/remote/sync/confirm-merge`:"/api/remote/sync/confirm-merge",r=await fetch(t,{method:"POST"});if(!r.ok){const n=await r.json().catch(()=>({error:r.statusText}));throw new Error(n.error??`Failed to confirm results merge: ${r.status}`)}return r.json()}class LR extends Error{constructor(t,r,n=[]){super(t),this.status=r,this.duplicates=n,this.name="CombineRunsApiError"}}async function uE(e,t,r,n,i){const o=r?`${ut(r)}/runs/combine`:"/api/runs/combine",l=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({run_ids:e,duplicate_policy:t,...i!=null&&i.trim()?{experiment:i.trim()}:{}})});if(!l.ok){const c=await l.json().catch(()=>({error:l.statusText}));throw new LR(c.error??`Failed to combine runs: ${l.status}`,l.status,c.duplicates??[])}return l.json()}async function T6(e,t){const r=t?`${ut(t)}/runs/${encodeURIComponent(e)}`:`/api/runs/${encodeURIComponent(e)}`,n=await fetch(r,{method:"DELETE"});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed to delete run: ${n.status}`)}}async function C6(e){const t=await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Failed to save config: ${t.status}`);return t.json()}function P6(e){const t=e?`${ut(e)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",e??""],queryFn:()=>He(t),staleTime:3e4}}function R6(e){return Ue(P6(e))}function M6(e){const t=e?`${ut(e)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",e??""],queryFn:()=>He(t),staleTime:3e4}}function D6(e){return Ue(M6(e))}async function $R(e,t){const r=t?`${ut(t)}/eval/run`:"/api/eval/run",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed: ${n.status}`)}return n.json()}async function k6(e,t){const r=t?`${ut(t)}/eval/run/${e}/stop`:`/api/eval/run/${e}/stop`,n=await fetch(r,{method:"POST"});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed: ${n.status}`)}return n.json()}function L6(e,t){const r=t?`${ut(t)}/eval/status/${e}`:`/api/eval/status/${e}`;return{queryKey:["eval-status",t??"",e],queryFn:()=>He(r),enabled:!!e,refetchInterval:n=>{var o;const i=(o=n.state.data)==null?void 0:o.status;return i==="finished"||i==="failed"?!1:2e3}}}function hj(e,t){return Ue(L6(e,t))}function $6(e){const t=e?`${ut(e)}/eval/runs`:"/api/eval/runs";return{queryKey:["eval-runs",e??""],queryFn:()=>He(t),refetchInterval:3e3}}function mj(e){return Ue($6(e))}async function I6(e,t){const r=t?`${ut(t)}/eval/preview`:"/api/eval/preview",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw new Error(`Preview failed: ${n.status}`);return n.json()}function z6(e){switch(e){case"inline_experiment":return"Inline experiment config";case"cli_flags":return"CLI runtime flags";case"mixed":return"Mixed runtime config";case"defaults":return"Default runtime config";default:return"Runtime config unknown"}}function IR(e){var t;return((t=e.experiment)==null?void 0:t.trim())||"default"}function pj(e){return e?z6(e.config_source):"Runtime source unknown"}function B6(e){if(!e)return"Runtime source metadata was not recorded for this run.";const t=[pj(e)];return e.eval_files&&e.eval_files.length>0&&t.push(`Eval files: ${e.eval_files.join(", ")}`),e.wrapper_eval_file&&t.push(`Wrapper eval: ${e.wrapper_eval_file}`),t.join(`
|
|
66
|
+
`)}function zR(e){return e&&e!=="default"?e:void 0}function U6(e,t){const r=[zR(t==null?void 0:t.experiment),t==null?void 0:t.target].filter(n=>!!n);return r.length>0?r.join(" · "):e}function zc(e){const t=e==null?void 0:e.trim();return t||void 0}function BR(e){const t=e.results[0],r=zc(e.sourceLabel),n=e.source==="remote",i=n&&r?r:U6(e.runId,t),o=t!=null&&t.timestamp&&e.formatTimestamp?e.formatTimestamp(t.timestamp):t==null?void 0:t.timestamp,l=[t==null?void 0:t.target,zR(t==null?void 0:t.experiment),o,n?void 0:e.source].filter(f=>!!f),c=zc(e.remoteRepo),h=[];return h.push({label:"Experiment namespace",value:IR({experiment:t==null?void 0:t.experiment,runtime_source:e.runtimeSource})}),e.runtimeSource&&h.push({label:"Runtime source",value:pj(e.runtimeSource)}),n&&(r&&r!==i&&h.push({label:"Source",value:r}),c&&h.push({label:"Repo",value:c})),{heading:i,meta:l.join(" · "),...n&&{sourceBadge:"Remote"},...r&&{sourceLabel:r},sourceContext:h}}function q6(e){return e.replace(/\.eval\.(ya?ml|json|jsonl)$/i,"").replace(/\.(ya?ml|json|jsonl)$/i,"")}function F6(e){const t=zc(e);if(!t||t==="Uncategorized")return;const r=t.replace(/\\/g,"/"),n=r.split("/").filter(o=>o.length>0).at(-1)??t;return{label:(r.includes("/")?q6(n):t)||t,title:t}}function UR(e){return zc(e.eval_path)??zc(e.suite)}function H6(e){return F6(UR(e))}function qR(e){const t=e.map(n=>UR(n)??"");return t.filter(n=>n&&n!=="Uncategorized").length>0&&new Set(t).size>1}const Vh="remote::";function FR(e){try{const t=new Date(e);if(Number.isNaN(t.getTime()))return e.slice(0,10);const r=String(t.getDate()).padStart(2,"0"),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0");return`${r}/${n} ${i}:${o}`}catch{return e.slice(0,10)}}function Fa(e){const t=e==null?void 0:e.trim();return t||void 0}function K6(e){const t=Fa(e);return t&&t!=="default"&&t!=="-"?t:void 0}function HR(e){let t=e.trim();return t.startsWith(Vh)&&(t=t.slice(Vh.length)),t.replace(/\.(jsonl|json)$/i,"")}function G6(e){const r=HR(e).match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2})[:-](\d{2})[:-](\d{2})(?:[.-](\d{3}))?Z?$/);if(!r)return;const[,n,i,o,l,c,h,f="000"]=r,p=new Date(`${n}-${i}-${o}T${l}:${c}:${h}.${f}Z`);return Number.isNaN(p.getTime())?void 0:p}function gj(e,t){const r=Fa(e);return r?G6(r)?!0:HR(r)===FR(t):!1}function Y6(e,t){const r=Fa(e);if(!r)return;const n=r.startsWith(Vh)?r.slice(Vh.length):r,i=n.lastIndexOf("::");if(i!==-1){const o=n.slice(i+2);if(gj(o,t))return Fa(n.slice(0,i))}return n}function V6(e){return[Fa(e.display_name),Fa(e.title),Y6(e.filename,e.timestamp)].find(r=>!!r&&!gj(r,e.timestamp))}function Q6(e){return`${Math.round(e*100)}%`}function X6(e,t){const r=[t],n=Fa(e.filename),i=Fa(e.display_name),o=Fa(e.title);return n&&n!==t&&r.push(`Run ID: ${n}`),i&&i!==n&&i!==t&&r.push(`Display name: ${i}`),o&&o!==i&&o!==n&&o!==t&&r.push(`Title: ${o}`),r.push(`Timestamp: ${e.timestamp}`),r.join(`
|
|
67
|
+
`)}function yj(e,t={}){const r=FR(e.timestamp),n=K6(e.experiment),i=V6(e),o=n&&!gj(n,e.timestamp)?n:void 0,l=i??o??r,c=t.includePassRate??!0,h=[];l!==r&&h.push(r),e.target&&e.target!==l&&h.push(e.target),n&&n!==l&&h.push(n),c&&h.push(Q6(e.pass_rate));const f=h.join(" · "),p=f?`${l} · ${f}`:l;return{primary:l,secondary:f,label:p,title:X6(e,p)}}function Zi(e){return e?e.charAt(0).toUpperCase()+e.slice(1):"Tag"}function vj({appName:e}){return e!==tp?d.jsx("span",{className:"av-brand-name",children:e}):d.jsxs("span",{className:"av-brand-name","aria-label":"AgentV",children:[d.jsx("span",{className:"av-brand-name__letter","aria-hidden":"true",children:"A"}),d.jsx("span",{className:"av-brand-name__middle","aria-hidden":"true",children:"gent"}),d.jsx("span",{className:"av-brand-name__letter","aria-hidden":"true",children:"V"})]})}function W6({result:e,className:t=""}){const r=H6(e);return r?d.jsx("span",{className:`block truncate text-gray-500 ${t}`,title:r.title,children:r.label}):null}function qn({children:e}){const{isOpen:t,close:r}=OR(),i=aj().href;return S.useEffect(()=>{i&&r()},[r,i]),d.jsxs(d.Fragment,{children:[t&&d.jsx("div",{className:"fixed inset-0 z-30 bg-black/50 md:hidden",onClick:r,onKeyDown:o=>o.key==="Escape"&&r(),role:"button",tabIndex:-1,"aria-label":"Close navigation"}),d.jsx("aside",{className:`fixed inset-y-0 left-0 z-40 flex w-64 flex-col border-r border-gray-800 bg-gray-950 transition-transform duration-200 ease-in-out md:static md:z-auto md:translate-x-0 md:bg-gray-900/50 ${t?"translate-x-0":"-translate-x-full"}`,children:e})]})}function ha({projectId:e}){const{data:t}=pt(e),r=(t==null?void 0:t.app_name)??tp;return d.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:d.jsx(Ee,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(vj,{appName:r})})})}function KR({display:e}){return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"block truncate",children:e.primary}),e.secondary?d.jsx("span",{className:"block truncate text-xs text-gray-600",children:e.secondary}):null]})}function GR({result:e,passThreshold:t,showEvalSourceLabel:r}){const n=to(e.score,t);return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:`mt-0.5 shrink-0 text-xs ${n?"text-emerald-400":"text-red-400"}`,children:n?"✓":"✗"}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate",children:e.testId}),r?d.jsx(W6,{result:e,className:"mt-1 max-w-full text-[11px] leading-4"}):null]})]})}function YR(){const t=aj().search;return{resultDir:t.result_dir,evalPath:t.eval_path}}const cE=[{id:"runs",label:"Recent Runs",description:"Run review"},{id:"tags",label:"Tags",description:"Grouped runs"},{id:"analytics",label:"Analytics",description:"Compare scores"},{id:"targets",label:"Targets",description:"Target results"}];function kv(e){return`mb-0.5 flex min-h-9 items-center justify-between gap-3 rounded-md px-2 py-1.5 text-sm transition-colors ${e?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`}function dE({projectId:e}){const t=aj(),{data:r}=dj(),n=(r==null?void 0:r.projects)??[],i=t.search,o=cE.some(c=>c.id===i.tab)?i.tab:"runs",l=!e&&n.length===0;return d.jsxs(qn,{children:[d.jsx(ha,{projectId:e}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsxs("div",{className:"mb-4",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Navigate"}),d.jsxs(Ee,{to:"/",className:kv(t.pathname==="/"),children:[d.jsx("span",{className:"truncate",children:"Projects"}),n.length>0?d.jsx("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:n.length}):null]}),d.jsx(Ee,{to:"/settings",className:kv(t.pathname==="/settings"),children:d.jsx("span",{className:"truncate",children:"Settings"})})]}),l?d.jsxs("div",{className:"mb-4",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Workspace"}),cE.map(c=>d.jsxs(Ee,{to:"/",search:{tab:c.id},className:kv(o===c.id),title:c.description,children:[d.jsx("span",{className:"truncate",children:c.label}),d.jsx("span",{className:"shrink-0 text-xs text-gray-500",children:c.description})]},c.id))]}):null]})]})}function Z6(){const e=AB(),t=e({to:"/projects/$projectId/evals/$runId/$evalId",fuzzy:!0}),r=e({to:"/projects/$projectId/runs/$runId",fuzzy:!0}),n=e({to:"/projects/$projectId/tags/$key/$value",fuzzy:!0}),i=e({to:"/projects/$projectId/runs/$runId/category/$category",fuzzy:!0}),o=e({to:"/projects/$projectId/runs/$runId/suite/$suite",fuzzy:!0}),l=e({to:"/projects/$projectId/jobs/$runId",fuzzy:!0}),c=e({to:"/projects/$projectId",fuzzy:!0});if(t&&typeof t=="object"&&"projectId"in t){const{projectId:x,runId:b,evalId:w}=t;return d.jsx(n9,{projectId:x,runId:b,currentEvalId:w})}if(i&&typeof i=="object"&&"projectId"in i){const{projectId:x,runId:b,category:w}=i;return d.jsx(i9,{projectId:x,runId:b,category:w})}if(o&&typeof o=="object"&&"projectId"in o){const{projectId:x,runId:b,suite:w}=o;return d.jsx(a9,{projectId:x,runId:b,suite:w})}if(r&&typeof r=="object"&&"projectId"in r){const{projectId:x,runId:b}=r;return d.jsx(fE,{projectId:x,currentRunId:b})}if(l&&typeof l=="object"&&"projectId"in l){const{projectId:x}=l;return d.jsx(fE,{projectId:x})}if(n&&typeof n=="object"&&"projectId"in n){const{projectId:x,key:b,value:w}=n;return d.jsx(s9,{projectId:x,tagKey:b,currentValue:w})}if(c&&typeof c=="object"&&"projectId"in c){const{projectId:x}=c;return d.jsx(dE,{projectId:x})}const h=e({to:"/runs/$runId",fuzzy:!0}),f=e({to:"/evals/$runId/$evalId",fuzzy:!0}),p=e({to:"/runs/$runId/category/$category",fuzzy:!0}),g=e({to:"/runs/$runId/suite/$suite",fuzzy:!0}),y=e({to:"/tags/$key/$value",fuzzy:!0});if(p&&typeof p=="object"&&"runId"in p){const{runId:x,category:b}=p;return d.jsx(r9,{runId:x,category:b})}if(g&&typeof g=="object"&&"runId"in g){const{runId:x,suite:b}=g;return d.jsx(t9,{runId:x,suite:b})}if(f&&typeof f=="object"&&"runId"in f){const{runId:x,evalId:b}=f;return d.jsx(e9,{runId:x,currentEvalId:b})}if(y&&typeof y=="object"&&"key"in y){const{key:x,value:b}=y;return d.jsx(o9,{tagKey:x,currentValue:b})}if(h&&typeof h=="object"&&"runId"in h){const{runId:x}=h;return d.jsx(J6,{currentRunId:x})}return d.jsx(dE,{})}function J6({currentRunId:e}){const{data:t}=f6(),{data:r}=pt(),{data:n}=mj(),i=((n==null?void 0:n.runs)??[]).filter(o=>o.status==="starting"||o.status==="running").length;return d.jsxs(qn,{children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:[d.jsx(Ee,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(vj,{appName:(r==null?void 0:r.app_name)??tp})}),i>0&&d.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:[d.jsx("span",{className:"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-cyan-400"}),i]})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Run history"}),t==null?void 0:t.runs.map(o=>{const l=yj(o),c=e===o.filename;return d.jsx(Ee,{to:"/runs/$runId",params:{runId:o.filename},className:`mb-0.5 block rounded-md px-2 py-1.5 text-sm transition-colors ${c?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,title:l.title,children:d.jsx(KR,{display:l})},o.filename)})]}),d.jsx("div",{className:"border-t border-gray-800 px-4 py-3",children:d.jsx(Ee,{to:"/settings",className:"flex items-center gap-2 text-sm text-gray-400 hover:text-cyan-400",children:"Settings"})})]})}function e9({runId:e,currentEvalId:t}){const{data:r}=md(e),{data:n}=pt(),i=YR(),o=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,l=qR((r==null?void 0:r.results)??[]);return d.jsxs(qn,{children:[d.jsx(ha,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.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(c=>{const h=dd({resultDir:c.result_dir,evalPath:c.eval_path}),f=Jm(c,t,i);return d.jsx(Ee,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:c.testId},search:h,className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${f?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(GR,{result:c,passThreshold:o,showEvalSourceLabel:l})},Zm(c))})]})]})}function t9({runId:e,suite:t}){const{data:r}=md(e),{data:n}=pt(),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,o=((r==null?void 0:r.results)??[]).filter(l=>(l.suite??"Uncategorized")===t);return d.jsxs(qn,{children:[d.jsx(ha,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:t})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),o.map(l=>{const c=to(l.score,i),h=dd({resultDir:l.result_dir,evalPath:l.eval_path});return d.jsxs(Ee,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:l.testId},search:h,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:[d.jsx("span",{className:`text-xs ${c?"text-emerald-400":"text-red-400"}`,children:c?"✓":"✗"}),d.jsx("span",{className:"truncate",children:l.testId})]},Zm(l))})]})]})}function r9({runId:e,category:t}){const{data:r}=PR(e,t),n=(r==null?void 0:r.suites)??[];return d.jsxs(qn,{children:[d.jsx(ha,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:t})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),n.map(i=>d.jsxs(Ee,{to:"/runs/$runId/suite/$suite",params:{runId:e,suite:i.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:[d.jsx("span",{className:`text-xs ${i.passed===i.total?"text-emerald-400":"text-red-400"}`,children:i.passed===i.total?"✓":"✗"}),d.jsx("span",{className:"truncate",children:i.name})]},i.name))]})]})}function fE({projectId:e,currentRunId:t}){const{data:r}=w6(e);return d.jsxs(qn,{children:[d.jsx(ha,{projectId:e}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),r==null?void 0:r.runs.map(n=>{const i=yj(n),o=t===n.filename;return d.jsx(Ee,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:n.filename},className:`mb-0.5 block 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"}`,title:i.title,children:d.jsx(KR,{display:i})},n.filename)})]})]})}function n9({projectId:e,runId:t,currentEvalId:r}){const{data:n}=pd(e,t),{data:i}=pt(e),o=YR(),l=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,c=qR((n==null?void 0:n.results)??[]);return d.jsxs(qn,{children:[d.jsx(ha,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),n==null?void 0:n.results.map(h=>{const f=dd({resultDir:h.result_dir,evalPath:h.eval_path}),p=Jm(h,r,o);return d.jsx(Ee,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:h.testId},search:f,className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${p?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(GR,{result:h,passThreshold:l,showEvalSourceLabel:c})},Zm(h))})]})]})}function a9({projectId:e,runId:t,suite:r}){const{data:n}=pd(e,t),{data:i}=pt(e),o=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,l=((n==null?void 0:n.results)??[]).filter(c=>(c.suite??"Uncategorized")===r);return d.jsxs(qn,{children:[d.jsx(ha,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:r})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),l.map(c=>{const h=to(c.score,o),f=dd({resultDir:c.result_dir,evalPath:c.eval_path});return d.jsxs(Ee,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:c.testId},search:f,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:[d.jsx("span",{className:`text-xs ${h?"text-emerald-400":"text-red-400"}`,children:h?"✓":"✗"}),d.jsx("span",{className:"truncate",children:c.testId})]},Zm(c))})]})]})}function i9({projectId:e,runId:t,category:r}){const{data:n}=Ue(RR(e,t,r)),i=(n==null?void 0:n.suites)??[];return d.jsxs(qn,{children:[d.jsx(ha,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:r})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),i.map(o=>d.jsxs(Ee,{to:"/projects/$projectId/runs/$runId/suite/$suite",params:{projectId:e,runId:t,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:[d.jsx("span",{className:`text-xs ${o.passed===o.total?"text-emerald-400":"text-red-400"}`,children:o.passed===o.total?"✓":"✗"}),d.jsx("span",{className:"truncate",children:o.name})]},o.name))]})]})}function s9({projectId:e,tagKey:t,currentValue:r}){const{data:n}=Ue(cj(e,t)),i=(n==null?void 0:n.groups)??[];return d.jsxs(qn,{children:[d.jsx(ha,{projectId:e}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsxs(Ee,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"tags",key:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:["← All ",Zi(t)," values"]})}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:Zi(t)}),i.map(o=>{const l=o.name===r;return d.jsx(Ee,{to:"/projects/$projectId/tags/$key/$value",params:{projectId:e,key:t,value:o.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${l?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:o.name},o.name)})]})]})}function o9({tagKey:e,currentValue:t}){const{data:r}=Ue(uj(e)),n=(r==null?void 0:r.groups)??[];return d.jsxs(qn,{children:[d.jsx(ha,{}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsxs(Ee,{to:"/",search:{tab:"tags",key:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:["← All ",Zi(e)," values"]})}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:Zi(e)}),n.map(i=>{const o=i.name===t;return d.jsx(Ee,{to:"/tags/$key/$value",params:{key:e,value:i.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:i.name},i.name)})]})]})}function l9(){return d.jsx(kB,{children:d.jsx(u9,{})})}function u9(){return d.jsxs("div",{className:"flex h-screen overflow-hidden",children:[d.jsx(Z6,{}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[d.jsx(qB,{}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:d.jsx(NR,{})})]})]})}const Yt=vB({component:l9}),c9=dr("/settings")({component:d9});function d9(){const{data:e,isLoading:t}=pt(),r=ho(),[n,i]=S.useState(""),[o,l]=S.useState(!1),[c,h]=S.useState(null),f=(e==null?void 0:e.threshold)??Ic,p=n||String(f),g=(e==null?void 0:e.read_only)===!0,y=(e==null?void 0:e.app_name)??tp,x=async()=>{const b=Number.parseFloat(n||String(f));if(Number.isNaN(b)||b<0||b>1){h({type:"error",text:"Threshold must be a number between 0 and 1"});return}l(!0),h(null);try{await C6({threshold:b}),await r.invalidateQueries({queryKey:["config"]}),i(""),h({type:"success",text:"Settings saved"}),setTimeout(()=>h(null),3e3)}catch{h({type:"error",text:"Failed to save settings"})}finally{l(!1)}};return t?d.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[d.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-40 animate-pulse rounded-lg bg-gray-900"})]}):d.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Settings"}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Configure ",d.jsx(vj,{appName:y})]})]}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6",children:[d.jsx("h2",{className:"text-lg font-medium text-white",children:"Evaluation"}),d.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure how evaluation results are classified"}),d.jsx("div",{className:"mt-6 space-y-4",children:d.jsxs("div",{children:[d.jsx("label",{htmlFor:"pass-threshold",className:"block text-sm font-medium text-gray-300",children:"Pass Threshold"}),d.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Score at or above this value is considered passing. Default: ",Ic]}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[d.jsx("input",{id:"pass-threshold",type:"number",min:"0",max:"1",step:"0.05",value:p,onChange:b=>i(b.target.value),disabled:g,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"}),d.jsxs("span",{className:"text-sm text-gray-400",children:["(",Math.round((Number.parseFloat(p)||0)*100),"%)"]})]})]})}),d.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[!g&&d.jsx("button",{type:"button",onClick:x,disabled:o,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:o?"Saving...":"Save Settings"}),g&&d.jsx("span",{className:"text-sm text-gray-400",children:"Read-only mode is enabled."}),c&&d.jsx("span",{className:`text-sm ${c.type==="success"?"text-emerald-400":"text-red-400"}`,children:c.text})]})]}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:d.jsxs("p",{className:"text-xs text-gray-500",children:["Settings are stored in ",d.jsx("code",{className:"text-gray-400",children:".agentv/config.yaml"})]})})]})}function hE({entry:e,selected:t,current:r=!1,onSelect:n,onOpen:i}){return d.jsxs("div",{className:`grid grid-cols-[minmax(0,1fr)_auto] border-b border-gray-800/50 last:border-b-0 ${t?"bg-cyan-950/20":"transition-colors hover:bg-gray-900/30"}`,children:[d.jsxs("button",{type:"button",onClick:n,onDoubleClick:i,"aria-selected":t,className:"min-w-0 px-4 py-3 text-left focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:[d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"truncate text-sm font-medium text-gray-200",children:e.name}),r?d.jsx("span",{className:"shrink-0 rounded-md border border-gray-700 px-2 py-0.5 text-xs font-medium text-gray-400",children:"this folder"}):null,e.hasAgentv?d.jsx("span",{className:"shrink-0 rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:".agentv"}):null]}),d.jsx("span",{className:"mt-1 block truncate text-xs text-gray-500",children:e.path})]}),d.jsx("button",{type:"button",onClick:i,className:"border-l border-gray-800 px-3 text-sm text-gray-400 transition-colors hover:bg-gray-900/40 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:"Open"})]})}function f9({open:e,onClose:t,onAdded:r}){const n=S.useRef(null),[i,o]=S.useState(null),[l,c]=S.useState(""),[h,f]=S.useState(""),[p,g]=S.useState(null),[y,x]=S.useState(null),[b,w]=S.useState(!1),[N,_]=S.useState(!1),E=S.useCallback(async(M,z={})=>{w(!0),g(null),x(null);try{const k=await v6(M);o(k),c(k.path),f(z.selectCurrent&&k.current.hasAgentv?k.current.path:"")}catch(k){g(k.message)}finally{w(!1)}},[]);S.useEffect(()=>{var M;e&&(o(null),c(""),f(""),g(null),x(null),_(!1),(M=n.current)==null||M.focus(),E(void 0,{selectCurrent:!0}))},[E,e]),S.useEffect(()=>{if(!e)return;function M(z){z.key==="Escape"&&(z.preventDefault(),t())}return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[t,e]);const T=S.useMemo(()=>!i||!h?null:h===i.current.path?i.current:i.entries.find(M=>M.path===h)??null,[i,h]),A=!!(T!=null&&T.hasAgentv)&&!N;function C(M){M.preventDefault(),E(l,{selectCurrent:!0})}async function R(){if(!(!h||!A)){_(!0),x(null);try{const M=await x6(h);r(M),t()}catch(M){x(M.message)}finally{_(!1)}}}if(!e)return null;const D=h?T!=null&&T.hasAgentv?`Ready to add ${T.name}.`:"Selected folder does not contain an .agentv/ directory.":"Select a folder containing an .agentv/ directory.";return d.jsx("dialog",{ref:n,open:!0,"aria-modal":"true","aria-label":"Add project",tabIndex:-1,className:"fixed inset-0 z-50 flex h-full max-h-none w-full max-w-none items-center justify-center bg-black/70 p-4 text-left text-gray-100 backdrop:bg-black/70",children:d.jsxs("div",{className:"flex max-h-[90vh] w-full max-w-4xl flex-col overflow-hidden rounded-lg border border-gray-800 bg-gray-950 shadow-xl",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-4 py-3",children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:"Add project"}),d.jsx("button",{type:"button",onClick:t,className:"rounded-md px-2 py-1 text-sm text-gray-400 transition-colors hover:bg-gray-800 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"Close"})]}),d.jsxs("div",{className:"space-y-4 overflow-y-auto p-4",children:[d.jsxs("form",{onSubmit:C,className:"flex flex-col gap-2 sm:flex-row",children:[d.jsx("label",{className:"sr-only",htmlFor:"add-project-path",children:"Folder path"}),d.jsx("input",{id:"add-project-path",value:l,onChange:M=>c(M.target.value),placeholder:"Folder path",className:"min-w-0 flex-1 rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 placeholder:text-gray-600 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500 disabled:opacity-50",disabled:b||N}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:()=>(i==null?void 0:i.parentPath)&&void E(i.parentPath),disabled:!(i!=null&&i.parentPath)||b||N,className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:bg-gray-800 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50",children:"Up"}),d.jsx("button",{type:"button",onClick:()=>void E(l),disabled:b||N,className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:bg-gray-800 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50",children:"Refresh"}),d.jsx("button",{type:"submit",disabled:b||N,className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:"Go"})]})]}),p?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:p}):null,d.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[d.jsxs("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Current folder"}),d.jsx("p",{className:"mt-1 truncate text-sm text-gray-300",children:(i==null?void 0:i.path)??(b?"Loading folders...":"No folder loaded")})]}),d.jsx("div",{className:"max-h-80 overflow-y-auto",children:i?d.jsxs(d.Fragment,{children:[d.jsx(hE,{entry:i.current,current:!0,selected:h===i.current.path,onSelect:()=>f(i.current.path),onOpen:()=>void E(i.current.path,{selectCurrent:!0})}),i.entries.map(M=>d.jsx(hE,{entry:M,selected:h===M.path,onSelect:()=>f(M.path),onOpen:()=>void E(M.path,{selectCurrent:!0})},M.path)),i.entries.length===0?d.jsx("p",{className:"px-4 py-6 text-center text-sm text-gray-500",children:"No subfolders in this location."}):null]}):d.jsx("p",{className:"px-4 py-6 text-center text-sm text-gray-500",children:b?"Loading folders...":"Enter a folder path to browse."})})]}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-3",children:d.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Selected"}),d.jsx("p",{className:"mt-1 truncate text-sm text-gray-200",children:h||"None"})]}),d.jsx("p",{className:`text-sm ${T!=null&&T.hasAgentv?"text-cyan-300":"text-gray-500"}`,children:D})]})}),y?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:y}):null]}),d.jsxs("div",{className:"flex items-center justify-between border-t border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("p",{className:"text-xs tabular-nums text-gray-500",children:i?`${i.entries.length} folders`:"0 folders"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:t,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Cancel"}),d.jsx("button",{type:"button",onClick:()=>void R(),disabled:!A,className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:N?"Adding...":"Add project"})]})]})]})})}function VR(e){return e.executionStatus==="execution_error"}function rp(e,t){let r=0,n=0,i=0,o=0;for(const c of e){if(VR(c)){i++;continue}r++,o+=c.score,c.score>=t&&n++}const l=r-n;return{total:e.length,qualityTotal:r,passed:n,failed:l,executionErrors:i,passRate:r>0?n/r:0,avgScore:r>0?o/r:0}}function ur(e){return e.execution_error_count??0}function QR(e){return Math.max(0,e.total-ur(e))}function Bc(e){return e.quality_count??Math.max(0,e.eval_count-ur(e))}function XR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=XR(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Xe(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=XR(e))&&(n&&(n+=" "),n+=t);return n}var h9=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function xj(e){if(typeof e!="string")return!1;var t=h9;return t.includes(e)}var m9=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],p9=new Set(m9);function WR(e){return typeof e!="string"?!1:p9.has(e)}function ZR(e){return typeof e=="string"&&e.startsWith("data-")}function zn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(WR(r)||ZR(r))&&(t[r]=e[r]);return t}function gd(e){if(e==null)return null;if(S.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return zn(t)}return typeof e=="object"&&!Array.isArray(e)?zn(e):null}function Er(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(WR(r)||ZR(r)||xj(r))&&(t[r]=e[r]);return t}function g9(e){return e==null?null:S.isValidElement(e)?Er(e.props):typeof e=="object"&&!Array.isArray(e)?Er(e):null}var y9=["children","width","height","viewBox","className","style","title","desc"];function Fx(){return Fx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fx.apply(null,arguments)}function v9(e,t){if(e==null)return{};var r,n,i=x9(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function x9(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var bj=S.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:o,className:l,style:c,title:h,desc:f}=e,p=v9(e,y9),g=o||{width:n,height:i,x:0,y:0},y=Xe("recharts-surface",l);return S.createElement("svg",Fx({},Er(p),{className:y,width:n,height:i,style:c,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),S.createElement("title",null,h),S.createElement("desc",null,f),r)}),b9=["children","className"];function Hx(){return Hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hx.apply(null,arguments)}function j9(e,t){if(e==null)return{};var r,n,i=w9(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function w9(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var sn=S.forwardRef((e,t)=>{var{children:r,className:n}=e,i=j9(e,b9),o=Xe("recharts-layer",n);return S.createElement("g",Hx({className:o},Er(i),{ref:t}),r)}),JR=S.createContext(null),S9=()=>S.useContext(JR);function at(e){return function(){return e}}const eM=Math.cos,Qh=Math.sin,Fn=Math.sqrt,Xh=Math.PI,np=2*Xh,Kx=Math.PI,Gx=2*Kx,As=1e-6,N9=Gx-As;function tM(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function _9(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return tM;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class O9{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?tM:_9(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,o,l){this._append`C${+t},${+r},${+n},${+i},${this._x1=+o},${this._y1=+l}`}arcTo(t,r,n,i,o){if(t=+t,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,c=this._y1,h=n-t,f=i-r,p=l-t,g=c-r,y=p*p+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(y>As)if(!(Math.abs(g*h-f*p)>As)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let x=n-l,b=i-c,w=h*h+f*f,N=x*x+b*b,_=Math.sqrt(w),E=Math.sqrt(y),T=o*Math.tan((Kx-Math.acos((w+y-N)/(2*_*E)))/2),A=T/E,C=T/_;Math.abs(A-1)>As&&this._append`L${t+A*p},${r+A*g}`,this._append`A${o},${o},0,0,${+(g*x>p*b)},${this._x1=t+C*h},${this._y1=r+C*f}`}}arc(t,r,n,i,o,l){if(t=+t,r=+r,n=+n,l=!!l,n<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(i),h=n*Math.sin(i),f=t+c,p=r+h,g=1^l,y=l?i-o:o-i;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>As||Math.abs(this._y1-p)>As)&&this._append`L${f},${p}`,n&&(y<0&&(y=y%Gx+Gx),y>N9?this._append`A${n},${n},0,1,${g},${t-c},${r-h}A${n},${n},0,1,${g},${this._x1=f},${this._y1=p}`:y>As&&this._append`A${n},${n},0,${+(y>=Kx)},${g},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function jj(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new O9(t)}function wj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function rM(e){this._context=e}rM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ap(e){return new rM(e)}function nM(e){return e[0]}function aM(e){return e[1]}function iM(e,t){var r=at(!0),n=null,i=ap,o=null,l=jj(c);e=typeof e=="function"?e:e===void 0?nM:at(e),t=typeof t=="function"?t:t===void 0?aM:at(t);function c(h){var f,p=(h=wj(h)).length,g,y=!1,x;for(n==null&&(o=i(x=l())),f=0;f<=p;++f)!(f<p&&r(g=h[f],f,h))===y&&((y=!y)?o.lineStart():o.lineEnd()),y&&o.point(+e(g,f,h),+t(g,f,h));if(x)return o=null,x+""||null}return c.x=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),c):e},c.y=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),c):t},c.defined=function(h){return arguments.length?(r=typeof h=="function"?h:at(!!h),c):r},c.curve=function(h){return arguments.length?(i=h,n!=null&&(o=i(n)),c):i},c.context=function(h){return arguments.length?(h==null?n=o=null:o=i(n=h),c):n},c}function ih(e,t,r){var n=null,i=at(!0),o=null,l=ap,c=null,h=jj(f);e=typeof e=="function"?e:e===void 0?nM:at(+e),t=typeof t=="function"?t:at(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?aM:at(+r);function f(g){var y,x,b,w=(g=wj(g)).length,N,_=!1,E,T=new Array(w),A=new Array(w);for(o==null&&(c=l(E=h())),y=0;y<=w;++y){if(!(y<w&&i(N=g[y],y,g))===_)if(_=!_)x=y,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),b=y-1;b>=x;--b)c.point(T[b],A[b]);c.lineEnd(),c.areaEnd()}_&&(T[y]=+e(N,y,g),A[y]=+t(N,y,g),c.point(n?+n(N,y,g):T[y],r?+r(N,y,g):A[y]))}if(E)return c=null,E+""||null}function p(){return iM().defined(i).curve(l).context(o)}return f.x=function(g){return arguments.length?(e=typeof g=="function"?g:at(+g),n=null,f):e},f.x0=function(g){return arguments.length?(e=typeof g=="function"?g:at(+g),f):e},f.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:at(+g),f):n},f.y=function(g){return arguments.length?(t=typeof g=="function"?g:at(+g),r=null,f):t},f.y0=function(g){return arguments.length?(t=typeof g=="function"?g:at(+g),f):t},f.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:at(+g),f):r},f.lineX0=f.lineY0=function(){return p().x(e).y(t)},f.lineY1=function(){return p().x(e).y(r)},f.lineX1=function(){return p().x(n).y(t)},f.defined=function(g){return arguments.length?(i=typeof g=="function"?g:at(!!g),f):i},f.curve=function(g){return arguments.length?(l=g,o!=null&&(c=l(o)),f):l},f.context=function(g){return arguments.length?(g==null?o=c=null:c=l(o=g),f):o},f}class sM{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function E9(e){return new sM(e,!0)}function A9(e){return new sM(e,!1)}const Sj={draw(e,t){const r=Fn(t/Xh);e.moveTo(r,0),e.arc(0,0,r,0,np)}},T9={draw(e,t){const r=Fn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},oM=Fn(1/3),C9=oM*2,P9={draw(e,t){const r=Fn(t/C9),n=r*oM;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},R9={draw(e,t){const r=Fn(t),n=-r/2;e.rect(n,n,r,r)}},M9=.8908130915292852,lM=Qh(Xh/10)/Qh(7*Xh/10),D9=Qh(np/10)*lM,k9=-eM(np/10)*lM,L9={draw(e,t){const r=Fn(t*M9),n=D9*r,i=k9*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const l=np*o/5,c=eM(l),h=Qh(l);e.lineTo(h*r,-c*r),e.lineTo(c*n-h*i,h*n+c*i)}e.closePath()}},Lv=Fn(3),$9={draw(e,t){const r=-Fn(t/(Lv*3));e.moveTo(0,r*2),e.lineTo(-Lv*r,-r),e.lineTo(Lv*r,-r),e.closePath()}},xn=-.5,bn=Fn(3)/2,Yx=1/Fn(12),I9=(Yx/2+1)*3,z9={draw(e,t){const r=Fn(t/I9),n=r/2,i=r*Yx,o=n,l=r*Yx+r,c=-o,h=l;e.moveTo(n,i),e.lineTo(o,l),e.lineTo(c,h),e.lineTo(xn*n-bn*i,bn*n+xn*i),e.lineTo(xn*o-bn*l,bn*o+xn*l),e.lineTo(xn*c-bn*h,bn*c+xn*h),e.lineTo(xn*n+bn*i,xn*i-bn*n),e.lineTo(xn*o+bn*l,xn*l-bn*o),e.lineTo(xn*c+bn*h,xn*h-bn*c),e.closePath()}};function B9(e,t){let r=null,n=jj(i);e=typeof e=="function"?e:at(e||Sj),t=typeof t=="function"?t:at(t===void 0?64:+t);function i(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:at(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:at(+o),i):t},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function Wh(){}function Zh(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function uM(e){this._context=e}uM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Zh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function U9(e){return new uM(e)}function cM(e){this._context=e}cM.prototype={areaStart:Wh,areaEnd:Wh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function q9(e){return new cM(e)}function dM(e){this._context=e}dM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function F9(e){return new dM(e)}function fM(e){this._context=e}fM.prototype={areaStart:Wh,areaEnd:Wh,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function H9(e){return new fM(e)}function mE(e){return e<0?-1:1}function pE(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),l=(r-e._y1)/(i||n<0&&-0),c=(o*i+l*n)/(n+i);return(mE(o)+mE(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function gE(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function $v(e,t,r){var n=e._x0,i=e._y0,o=e._x1,l=e._y1,c=(o-n)/3;e._context.bezierCurveTo(n+c,i+c*t,o-c,l-c*r,o,l)}function Jh(e){this._context=e}Jh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:$v(this,this._t0,gE(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,$v(this,gE(this,r=pE(this,e,t)),r);break;default:$v(this,this._t0,r=pE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function hM(e){this._context=new mM(e)}(hM.prototype=Object.create(Jh.prototype)).point=function(e,t){Jh.prototype.point.call(this,t,e)};function mM(e){this._context=e}mM.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function K9(e){return new Jh(e)}function G9(e){return new hM(e)}function pM(e){this._context=e}pM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=yE(e),i=yE(t),o=0,l=1;l<r;++o,++l)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[l],t[l]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function yE(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),l=new Array(r);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,l[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,l[t]-=n*l[t-1];for(i[r-1]=l[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function Y9(e){return new pM(e)}function ip(e,t){this._context=e,this._t=t}ip.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function V9(e){return new ip(e,.5)}function Q9(e){return new ip(e,0)}function X9(e){return new ip(e,1)}function ro(e,t){if((l=e.length)>1)for(var r=1,n,i,o=e[t[0]],l,c=o.length;r<l;++r)for(i=o,o=e[t[r]],n=0;n<c;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Vx(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function W9(e,t){return e[t]}function Z9(e){const t=[];return t.key=e,t}function J9(){var e=at([]),t=Vx,r=ro,n=W9;function i(o){var l=Array.from(e.apply(this,arguments),Z9),c,h=l.length,f=-1,p;for(const g of o)for(c=0,++f;c<h;++c)(l[c][f]=[0,+n(g,l[c].key,f,o)]).data=g;for(c=0,p=wj(t(l));c<h;++c)l[p[c]].index=c;return r(l,p),l}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:at(Array.from(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:at(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?Vx:typeof o=="function"?o:at(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(r=o??ro,i):r},i}function eU(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,l;i<o;++i){for(l=r=0;r<n;++r)l+=e[r][i][1]||0;if(l)for(r=0;r<n;++r)e[r][i][1]/=l}ro(e,t)}}function tU(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var l=0,c=0;l<i;++l)c+=e[l][r][1]||0;n[r][1]+=n[r][0]=-c/2}ro(e,t)}}function rU(e,t){if(!(!((l=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,l;n<o;++n){for(var c=0,h=0,f=0;c<l;++c){for(var p=e[t[c]],g=p[n][1]||0,y=p[n-1][1]||0,x=(g-y)/2,b=0;b<c;++b){var w=e[t[b]],N=w[n][1]||0,_=w[n-1][1]||0;x+=N-_}h+=g,f+=x*g}i[n-1][1]+=i[n-1][0]=r,h&&(r-=f/h)}i[n-1][1]+=i[n-1][0]=r,ro(e,t)}}var Iv={},zv={},vE;function nU(){return vE||(vE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(zv)),zv}var Bv={},xE;function gM(){return xE||(xE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Bv)),Bv}var Uv={},bE;function Nj(){return bE||(bE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(Uv)),Uv}var qv={},Fv={},jE;function aU(){return jE||(jE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Fv)),Fv}var wE;function _j(){return wE||(wE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aU(),r=Nj();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const o=[],l=i.length;if(l===0)return o;let c=0,h="",f="",p=!1;for(i.charCodeAt(0)===46&&(o.push(""),c++);c<l;){const g=i[c];f?g==="\\"&&c+1<l?(c++,h+=i[c]):g===f?f="":h+=g:p?g==='"'||g==="'"?f=g:g==="]"?(p=!1,o.push(h),h=""):h+=g:g==="["?(p=!0,h&&(o.push(h),h="")):g==="."?h&&(o.push(h),h=""):h+=g,c++}return h&&o.push(h),o}e.toPath=n})(qv)),qv}var SE;function Oj(){return SE||(SE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nU(),r=gM(),n=Nj(),i=_j();function o(c,h,f){if(c==null)return f;switch(typeof h){case"string":{if(t.isUnsafeProperty(h))return f;const p=c[h];return p===void 0?r.isDeepKey(h)?o(c,i.toPath(h),f):f:p}case"number":case"symbol":{typeof h=="number"&&(h=n.toKey(h));const p=c[h];return p===void 0?f:p}default:{if(Array.isArray(h))return l(c,h,f);if(Object.is(h==null?void 0:h.valueOf(),-0)?h="-0":h=String(h),t.isUnsafeProperty(h))return f;const p=c[h];return p===void 0?f:p}}}function l(c,h,f){if(h.length===0)return f;let p=c;for(let g=0;g<h.length;g++){if(p==null||t.isUnsafeProperty(h[g]))return f;p=p[h[g]]}return p===void 0?f:p}e.get=o})(Iv)),Iv}var Hv,NE;function iU(){return NE||(NE=1,Hv=Oj().get),Hv}var sU=iU();const Hl=rs(sU);var oU=4;function Gi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oU,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function bt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,o,l)=>{var c=r[l-1];return typeof c=="string"?i+c+o:c!==void 0?i+Gi(c)+o:i+o},"")}var Br=e=>e===0?0:e>0?1:-1,la=e=>typeof e=="number"&&e!=+e,no=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ge=e=>(typeof e=="number"||e instanceof Number)&&!la(e),ua=e=>ge(e)||typeof e=="string",lU=0,Uc=e=>{var t=++lU;return"".concat(e||"").concat(t)},Bn=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ge(t)&&typeof t!="string")return n;var o;if(no(t)){if(r==null)return n;var l=t.indexOf("%");o=r*parseFloat(t.slice(0,l))/100}else o=+t;return la(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},yM=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function jt(e,t,r){return ge(e)&&ge(t)?Gi(e+r*(t-e)):t}function vM(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Hl(n,t))===r)}var mt=e=>e===null||typeof e>"u",yd=e=>mt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Ur(e){return e!=null}function go(){}var uU=["type","size","sizeType"];function Qx(){return Qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qx.apply(null,arguments)}function _E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function OE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_E(Object(r),!0).forEach(function(n){cU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_E(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cU(e,t,r){return(t=dU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dU(e){var t=fU(e,"string");return typeof t=="symbol"?t:t+""}function fU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hU(e,t){if(e==null)return{};var r,n,i=mU(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function mU(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var xM={symbolCircle:Sj,symbolCross:T9,symbolDiamond:P9,symbolSquare:R9,symbolStar:L9,symbolTriangle:$9,symbolWye:z9},pU=Math.PI/180,gU=e=>{var t="symbol".concat(yd(e));return xM[t]||Sj},yU=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*pU;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},vU=(e,t)=>{xM["symbol".concat(yd(e))]=t},Ej=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=hU(e,uU),o=OE(OE({},i),{},{type:t,size:r,sizeType:n}),l="circle";typeof t=="string"&&(l=t);var c=()=>{var y=gU(l),x=B9().type(y).size(yU(r,n,l)),b=x();if(b!==null)return b},{className:h,cx:f,cy:p}=o,g=Er(o);return ge(f)&&ge(p)&&ge(r)?S.createElement("path",Qx({},g,{className:Xe("recharts-symbols",h),transform:"translate(".concat(f,", ").concat(p,")"),d:c()})):null};Ej.registerSymbol=vU;var bM=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Aj=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(S.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{xj(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},xU=(e,t,r)=>n=>(e(t,r,n),null),sp=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];xj(i)&&typeof o=="function"&&(n||(n={}),n[i]=xU(o,t,r))}),n};function EE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EE(Object(r),!0).forEach(function(n){jU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jU(e,t,r){return(t=wU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wU(e){var t=SU(e,"string");return typeof t=="symbol"?t:t+""}function SU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fr(e,t){var r=bU({},e),n=t,i=Object.keys(t),o=i.reduce((l,c)=>(l[c]===void 0&&n[c]!==void 0&&(l[c]=n[c]),l),r);return o}function em(){return em=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},em.apply(null,arguments)}function AE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AE(Object(r),!0).forEach(function(n){NU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NU(e,t,r){return(t=_U(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _U(e){var t=OU(e,"string");return typeof t=="symbol"?t:t+""}function OU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wn=32,EU={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function AU(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function TU(e){var{data:t,iconType:r,inactiveColor:n}=e,i=wn/2,o=wn/6,l=wn/3,c=t.inactive?n:t.color,h=r??t.type;if(h==="none")return null;if(h==="plainline")return S.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:AU(t.payload),x1:0,y1:i,x2:wn,y2:i,className:"recharts-legend-icon"});if(h==="line")return S.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
|
|
68
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,`
|
|
69
|
+
H`).concat(wn,"M").concat(2*l,",").concat(i,`
|
|
70
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(h==="rect")return S.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(wn/8,"h").concat(wn,"v").concat(wn*3/4,"h").concat(-wn,"z"),className:"recharts-legend-icon"});if(S.isValidElement(t.legendIcon)){var f=jM({},t);return delete f.legendIcon,S.cloneElement(t.legendIcon,f)}return S.createElement(Ej,{fill:c,cx:i,cy:i,size:wn,sizeType:"diameter",type:h})}function CU(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:o,iconType:l,labelStyle:c}=e,h={x:0,y:0,width:wn,height:wn},f={display:n==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((g,y)=>{var x=g.formatter||i,b=Xe({"recharts-legend-item":!0,["legend-item-".concat(y)]:!0,inactive:g.inactive});if(g.type==="none")return null;var w=typeof c=="object"?jM({},c):{};w.color=g.inactive?o:w.color||g.color;var N=x?x(g.value,g,y):g.value;return S.createElement("li",em({className:b,style:f,key:"legend-item-".concat(y)},sp(e,g,y)),S.createElement(bj,{width:r,height:r,viewBox:h,style:p,"aria-label":"".concat(g.value," legend icon")},S.createElement(TU,{data:g,iconType:l,inactiveColor:o})),S.createElement("span",{className:"recharts-legend-item-text",style:w},N))})}var PU=e=>{var t=fr(e,EU),{payload:r,layout:n,align:i}=t;if(!r||!r.length)return null;var o={padding:0,margin:0,textAlign:n==="horizontal"?i:"left"};return S.createElement("ul",{className:"recharts-default-legend",style:o},S.createElement(CU,em({},t,{payload:r})))},Kv={},Gv={},TE;function RU(){return TE||(TE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let o=0;o<r.length;o++){const l=r[o],c=n(l,o,r);i.has(c)||i.set(c,l)}return Array.from(i.values())}e.uniqBy=t})(Gv)),Gv}var Yv={},CE;function MU(){return CE||(CE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...i){return r.apply(this,i.slice(0,n))}}e.ary=t})(Yv)),Yv}var Vv={},PE;function wM(){return PE||(PE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Vv)),Vv}var Qv={},Xv={},Wv={},RE;function DU(){return RE||(RE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Wv)),Wv}var ME;function SM(){return ME||(ME=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DU();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Xv)),Xv}var Zv={},DE;function kU(){return DE||(DE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Zv)),Zv}var kE;function LU(){return kE||(kE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SM(),r=kU();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(Qv)),Qv}var Jv={},e0={},LE;function $U(){return LE||(LE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Oj();function r(n){return function(i){return t.get(i,n)}}e.property=r})(e0)),e0}var t0={},r0={},n0={},a0={},$E;function NM(){return $E||($E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(a0)),a0}var i0={},IE;function _M(){return IE||(IE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(i0)),i0}var s0={},zE;function OM(){return zE||(zE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(s0)),s0}var BE;function IU(){return BE||(BE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NM(),r=_M(),n=OM();function i(p,g,y){return typeof y!="function"?i(p,g,()=>{}):o(p,g,function x(b,w,N,_,E,T){const A=y(b,w,N,_,E,T);return A!==void 0?!!A:o(b,w,x,T)},new Map)}function o(p,g,y,x){if(g===p)return!0;switch(typeof g){case"object":return l(p,g,y,x);case"function":return Object.keys(g).length>0?o(p,{...g},y,x):n.isEqualsSameValueZero(p,g);default:return t.isObject(p)?typeof g=="string"?g==="":!0:n.isEqualsSameValueZero(p,g)}}function l(p,g,y,x){if(g==null)return!0;if(Array.isArray(g))return h(p,g,y,x);if(g instanceof Map)return c(p,g,y,x);if(g instanceof Set)return f(p,g,y,x);const b=Object.keys(g);if(p==null||r.isPrimitive(p))return b.length===0;if(b.length===0)return!0;if(x!=null&&x.has(g))return x.get(g)===p;x==null||x.set(g,p);try{for(let w=0;w<b.length;w++){const N=b[w];if(!r.isPrimitive(p)&&!(N in p)||g[N]===void 0&&p[N]!==void 0||g[N]===null&&p[N]!==null||!y(p[N],g[N],N,p,g,x))return!1}return!0}finally{x==null||x.delete(g)}}function c(p,g,y,x){if(g.size===0)return!0;if(!(p instanceof Map))return!1;for(const[b,w]of g.entries()){const N=p.get(b);if(y(N,w,b,p,g,x)===!1)return!1}return!0}function h(p,g,y,x){if(g.length===0)return!0;if(!Array.isArray(p))return!1;const b=new Set;for(let w=0;w<g.length;w++){const N=g[w];let _=!1;for(let E=0;E<p.length;E++){if(b.has(E))continue;const T=p[E];let A=!1;if(y(T,N,w,p,g,x)&&(A=!0),A){b.add(E),_=!0;break}}if(!_)return!1}return!0}function f(p,g,y,x){return g.size===0?!0:p instanceof Set?h([...p],[...g],y,x):!1}e.isMatchWith=i,e.isSetMatch=f})(n0)),n0}var UE;function EM(){return UE||(UE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=IU();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(r0)),r0}var o0={},l0={},u0={},qE;function zU(){return qE||(qE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(u0)),u0}var c0={},FE;function Tj(){return FE||(FE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(c0)),c0}var d0={},HE;function AM(){return HE||(HE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",o="[object Arguments]",l="[object Symbol]",c="[object Date]",h="[object Map]",f="[object Set]",p="[object Array]",g="[object Function]",y="[object ArrayBuffer]",x="[object Object]",b="[object Error]",w="[object DataView]",N="[object Uint8Array]",_="[object Uint8ClampedArray]",E="[object Uint16Array]",T="[object Uint32Array]",A="[object BigUint64Array]",C="[object Int8Array]",R="[object Int16Array]",D="[object Int32Array]",M="[object BigInt64Array]",z="[object Float32Array]",k="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=y,e.arrayTag=p,e.bigInt64ArrayTag=M,e.bigUint64ArrayTag=A,e.booleanTag=i,e.dataViewTag=w,e.dateTag=c,e.errorTag=b,e.float32ArrayTag=z,e.float64ArrayTag=k,e.functionTag=g,e.int16ArrayTag=R,e.int32ArrayTag=D,e.int8ArrayTag=C,e.mapTag=h,e.numberTag=n,e.objectTag=x,e.regexpTag=t,e.setTag=f,e.stringTag=r,e.symbolTag=l,e.uint16ArrayTag=E,e.uint32ArrayTag=T,e.uint8ArrayTag=N,e.uint8ClampedArrayTag=_})(d0)),d0}var f0={},KE;function BU(){return KE||(KE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(f0)),f0}var GE;function TM(){return GE||(GE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zU(),r=Tj(),n=AM(),i=_M(),o=BU();function l(p,g){return c(p,void 0,p,new Map,g)}function c(p,g,y,x=new Map,b=void 0){const w=b==null?void 0:b(p,g,y,x);if(w!==void 0)return w;if(i.isPrimitive(p))return p;if(x.has(p))return x.get(p);if(Array.isArray(p)){const N=new Array(p.length);x.set(p,N);for(let _=0;_<p.length;_++)N[_]=c(p[_],_,y,x,b);return Object.hasOwn(p,"index")&&(N.index=p.index),Object.hasOwn(p,"input")&&(N.input=p.input),N}if(p instanceof Date)return new Date(p.getTime());if(p instanceof RegExp){const N=new RegExp(p.source,p.flags);return N.lastIndex=p.lastIndex,N}if(p instanceof Map){const N=new Map;x.set(p,N);for(const[_,E]of p)N.set(_,c(E,_,y,x,b));return N}if(p instanceof Set){const N=new Set;x.set(p,N);for(const _ of p)N.add(c(_,void 0,y,x,b));return N}if(typeof Buffer<"u"&&Buffer.isBuffer(p))return p.subarray();if(o.isTypedArray(p)){const N=new(Object.getPrototypeOf(p)).constructor(p.length);x.set(p,N);for(let _=0;_<p.length;_++)N[_]=c(p[_],_,y,x,b);return N}if(p instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&p instanceof SharedArrayBuffer)return p.slice(0);if(p instanceof DataView){const N=new DataView(p.buffer.slice(0),p.byteOffset,p.byteLength);return x.set(p,N),h(N,p,y,x,b),N}if(typeof File<"u"&&p instanceof File){const N=new File([p],p.name,{type:p.type});return x.set(p,N),h(N,p,y,x,b),N}if(typeof Blob<"u"&&p instanceof Blob){const N=new Blob([p],{type:p.type});return x.set(p,N),h(N,p,y,x,b),N}if(p instanceof Error){const N=structuredClone(p);return x.set(p,N),N.message=p.message,N.name=p.name,N.stack=p.stack,N.cause=p.cause,N.constructor=p.constructor,h(N,p,y,x,b),N}if(p instanceof Boolean){const N=new Boolean(p.valueOf());return x.set(p,N),h(N,p,y,x,b),N}if(p instanceof Number){const N=new Number(p.valueOf());return x.set(p,N),h(N,p,y,x,b),N}if(p instanceof String){const N=new String(p.valueOf());return x.set(p,N),h(N,p,y,x,b),N}if(typeof p=="object"&&f(p)){const N=Object.create(Object.getPrototypeOf(p));return x.set(p,N),h(N,p,y,x,b),N}return p}function h(p,g,y=p,x,b){const w=[...Object.keys(g),...t.getSymbols(g)];for(let N=0;N<w.length;N++){const _=w[N],E=Object.getOwnPropertyDescriptor(p,_);(E==null||E.writable)&&(p[_]=c(g[_],_,y,x,b))}}function f(p){switch(r.getTag(p)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=l,e.cloneDeepWithImpl=c,e.copyProperties=h})(l0)),l0}var YE;function UU(){return YE||(YE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TM();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(o0)),o0}var VE;function qU(){return VE||(VE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EM(),r=UU();function n(i){return i=r.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=n})(t0)),t0}var h0={},m0={},p0={},QE;function FU(){return QE||(QE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TM(),r=Tj(),n=AM();function i(o,l){return t.cloneDeepWith(o,(c,h,f,p)=>{const g=l==null?void 0:l(c,h,f,p);if(g!==void 0)return g;if(typeof o=="object"){if(r.getTag(o)===n.objectTag&&typeof o.constructor!="function"){const y={};return p.set(o,y),t.copyProperties(y,o,f,p),y}switch(Object.prototype.toString.call(o)){case n.numberTag:case n.stringTag:case n.booleanTag:{const y=new o.constructor(o==null?void 0:o.valueOf());return t.copyProperties(y,o),y}case n.argumentsTag:{const y={};return t.copyProperties(y,o),y.length=o.length,y[Symbol.iterator]=o[Symbol.iterator],y}default:return}}})}e.cloneDeepWith=i})(p0)),p0}var XE;function HU(){return XE||(XE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=FU();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(m0)),m0}var g0={},y0={},WE;function CM(){return WE||(WE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(y0)),y0}var v0={},ZE;function KU(){return ZE||(ZE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tj();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(v0)),v0}var JE;function GU(){return JE||(JE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gM(),r=CM(),n=KU(),i=_j();function o(l,c){let h;if(Array.isArray(c)?h=c:typeof c=="string"&&t.isDeepKey(c)&&(l==null?void 0:l[c])==null?h=i.toPath(c):h=[c],h.length===0)return!1;let f=l;for(let p=0;p<h.length;p++){const g=h[p];if((f==null||!Object.hasOwn(f,g))&&!((Array.isArray(f)||n.isArguments(f))&&r.isIndex(g)&&g<f.length))return!1;f=f[g]}return!0}e.has=o})(g0)),g0}var eA;function YU(){return eA||(eA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EM(),r=Nj(),n=HU(),i=Oj(),o=GU();function l(c,h){switch(typeof c){case"object":{Object.is(c==null?void 0:c.valueOf(),-0)&&(c="-0");break}case"number":{c=r.toKey(c);break}}return h=n.cloneDeep(h),function(f){const p=i.get(f,c);return p===void 0?o.has(f,c):h===void 0?p===void 0:t.isMatch(p,h)}}e.matchesProperty=l})(h0)),h0}var tA;function VU(){return tA||(tA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wM(),r=$U(),n=qU(),i=YU();function o(l){if(l==null)return t.identity;switch(typeof l){case"function":return l;case"object":return Array.isArray(l)&&l.length===2?i.matchesProperty(l[0],l[1]):n.matches(l);case"string":case"symbol":case"number":return r.property(l)}}e.iteratee=o})(Jv)),Jv}var rA;function QU(){return rA||(rA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RU(),r=MU(),n=wM(),i=LU(),o=VU();function l(c,h=n.identity){return i.isArrayLikeObject(c)?t.uniqBy(Array.from(c),r.ary(o.iteratee(h),1)):[]}e.uniqBy=l})(Kv)),Kv}var x0,nA;function XU(){return nA||(nA=1,x0=QU().uniqBy),x0}var WU=XU();const aA=rs(WU);function PM(e,t,r){return t===!0?aA(e,r):typeof t=="function"?aA(e,t):e}var Cj=S.createContext(null),ZU=e=>e,ct=()=>{var e=S.useContext(Cj);return e?e.store.dispatch:ZU},Ph=()=>{},JU=()=>Ph,eq=(e,t)=>e===t;function ve(e){var t=S.useContext(Cj),r=S.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Ph,[t,e]);return gR.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:JU,t?t.store.getState:Ph,t?t.store.getState:Ph,r,eq)}function tq(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function rq(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function nq(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var iA=e=>Array.isArray(e)?e:[e];function aq(e){const t=Array.isArray(e[0])?e[0]:e;return nq(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function iq(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var sq=class{constructor(e){this.value=e}deref(){return this.value}},oq=typeof WeakRef<"u"?WeakRef:sq,lq=0,sA=1;function sh(){return{s:lq,v:void 0,o:null,p:null}}function RM(e,t={}){let r=sh();const{resultEqualityCheck:n}=t;let i,o=0;function l(){var g;let c=r;const{length:h}=arguments;for(let y=0,x=h;y<x;y++){const b=arguments[y];if(typeof b=="function"||typeof b=="object"&&b!==null){let w=c.o;w===null&&(c.o=w=new WeakMap);const N=w.get(b);N===void 0?(c=sh(),w.set(b,c)):c=N}else{let w=c.p;w===null&&(c.p=w=new Map);const N=w.get(b);N===void 0?(c=sh(),w.set(b,c)):c=N}}const f=c;let p;if(c.s===sA)p=c.v;else if(p=e.apply(null,arguments),o++,n){const y=((g=i==null?void 0:i.deref)==null?void 0:g.call(i))??i;y!=null&&n(y,p)&&(p=y,o!==0&&o--),i=typeof p=="object"&&p!==null||typeof p=="function"?new oq(p):p}return f.s=sA,f.v=p,p}return l.clearCache=()=>{r=sh(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function uq(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,l=0,c,h={},f=i.pop();typeof f=="object"&&(h=f,f=i.pop()),tq(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const p={...r,...h},{memoize:g,memoizeOptions:y=[],argsMemoize:x=RM,argsMemoizeOptions:b=[]}=p,w=iA(y),N=iA(b),_=aq(i),E=g(function(){return o++,f.apply(null,arguments)},...w),T=x(function(){l++;const C=iq(_,arguments);return c=E.apply(null,C),c},...N);return Object.assign(T,{resultFunc:f,memoizedResultFunc:E,dependencies:_,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:x})};return Object.assign(n,{withTypes:()=>n}),n}var Q=uq(RM),cq=Object.assign((e,t=Q)=>{rq(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(o=>e[o]);return t(n,(...o)=>o.reduce((l,c,h)=>(l[r[h]]=c,l),{}))},{withTypes:()=>cq}),b0={},j0={},w0={},oA;function dq(){return oA||(oA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,o)=>{if(n!==i){const l=t(n),c=t(i);if(l===c&&l===0){if(n<i)return o==="desc"?1:-1;if(n>i)return o==="desc"?-1:1}return o==="desc"?c-l:l-c}return 0};e.compareValues=r})(w0)),w0}var S0={},N0={},lA;function MM(){return lA||(lA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(N0)),N0}var uA;function fq(){return uA||(uA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MM(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,l){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||t.isSymbol(o)?!0:typeof o=="string"&&(n.test(o)||!r.test(o))||l!=null&&Object.hasOwn(l,o)}e.isKey=i})(S0)),S0}var cA;function hq(){return cA||(cA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dq(),r=fq(),n=_j();function i(o,l,c,h){if(o==null)return[];c=h?void 0:c,Array.isArray(o)||(o=Object.values(o)),Array.isArray(l)||(l=l==null?[null]:[l]),l.length===0&&(l=[null]),Array.isArray(c)||(c=c==null?[]:[c]),c=c.map(x=>String(x));const f=(x,b)=>{let w=x;for(let N=0;N<b.length&&w!=null;++N)w=w[b[N]];return w},p=(x,b)=>b==null||x==null?b:typeof x=="object"&&"key"in x?Object.hasOwn(b,x.key)?b[x.key]:f(b,x.path):typeof x=="function"?x(b):Array.isArray(x)?f(b,x):typeof b=="object"?b[x]:b,g=l.map(x=>(Array.isArray(x)&&x.length===1&&(x=x[0]),x==null||typeof x=="function"||Array.isArray(x)||r.isKey(x)?x:{key:x,path:n.toPath(x)}));return o.map(x=>({original:x,criteria:g.map(b=>p(b,x))})).slice().sort((x,b)=>{for(let w=0;w<g.length;w++){const N=t.compareValues(x.criteria[w],b.criteria[w],c[w]);if(N!==0)return N}return 0}).map(x=>x.original)}e.orderBy=i})(j0)),j0}var _0={},dA;function mq(){return dA||(dA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],o=Math.floor(n),l=(c,h)=>{for(let f=0;f<c.length;f++){const p=c[f];Array.isArray(p)&&h<o?l(p,h+1):i.push(p)}};return l(r,0),i}e.flatten=t})(_0)),_0}var O0={},fA;function DM(){return fA||(fA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CM(),r=SM(),n=NM(),i=OM();function o(l,c,h){return n.isObject(h)&&(typeof c=="number"&&r.isArrayLike(h)&&t.isIndex(c)&&c<h.length||typeof c=="string"&&c in h)?i.isEqualsSameValueZero(h[c],l):!1}e.isIterateeCall=o})(O0)),O0}var hA;function pq(){return hA||(hA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hq(),r=mq(),n=DM();function i(o,...l){const c=l.length;return c>1&&n.isIterateeCall(o,l[0],l[1])?l=[]:c>2&&n.isIterateeCall(l[0],l[1],l[2])&&(l=[l[0]]),t.orderBy(o,r.flatten(l),["asc"])}e.sortBy=i})(b0)),b0}var E0,mA;function gq(){return mA||(mA=1,E0=pq().sortBy),E0}var yq=gq();const op=rs(yq);var kM=e=>e.legend.settings,vq=e=>e.legend.size,xq=e=>e.legend.payload,bq=Q([xq,kM],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?op(n,r):n});function jq(){return ve(bq)}var oh=1;function LM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=S.useState({height:0,left:0,top:0,width:0}),n=S.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),l={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(l.height-t.height)>oh||Math.abs(l.left-t.left)>oh||Math.abs(l.top-t.top)>oh||Math.abs(l.width-t.width)>oh)&&r({height:l.height,left:l.left,top:l.top,width:l.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function ar(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var wq=typeof Symbol=="function"&&Symbol.observable||"@@observable",pA=wq,A0=()=>Math.random().toString(36).substring(7).split("").join("."),Sq={INIT:`@@redux/INIT${A0()}`,REPLACE:`@@redux/REPLACE${A0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${A0()}`},tm=Sq;function Pj(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function $M(e,t,r){if(typeof e!="function")throw new Error(ar(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ar(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ar(1));return r($M)(e,t)}let n=e,i=t,o=new Map,l=o,c=0,h=!1;function f(){l===o&&(l=new Map,o.forEach((N,_)=>{l.set(_,N)}))}function p(){if(h)throw new Error(ar(3));return i}function g(N){if(typeof N!="function")throw new Error(ar(4));if(h)throw new Error(ar(5));let _=!0;f();const E=c++;return l.set(E,N),function(){if(_){if(h)throw new Error(ar(6));_=!1,f(),l.delete(E),o=null}}}function y(N){if(!Pj(N))throw new Error(ar(7));if(typeof N.type>"u")throw new Error(ar(8));if(typeof N.type!="string")throw new Error(ar(17));if(h)throw new Error(ar(9));try{h=!0,i=n(i,N)}finally{h=!1}return(o=l).forEach(E=>{E()}),N}function x(N){if(typeof N!="function")throw new Error(ar(10));n=N,y({type:tm.REPLACE})}function b(){const N=g;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(ar(11));function E(){const A=_;A.next&&A.next(p())}return E(),{unsubscribe:N(E)}},[pA](){return this}}}return y({type:tm.INIT}),{dispatch:y,subscribe:g,getState:p,replaceReducer:x,[pA]:b}}function Nq(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:tm.INIT})>"u")throw new Error(ar(12));if(typeof r(void 0,{type:tm.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ar(13))})}function IM(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const l=t[o];typeof e[l]=="function"&&(r[l]=e[l])}const n=Object.keys(r);let i;try{Nq(r)}catch(o){i=o}return function(l={},c){if(i)throw i;let h=!1;const f={};for(let p=0;p<n.length;p++){const g=n[p],y=r[g],x=l[g],b=y(x,c);if(typeof b>"u")throw c&&c.type,new Error(ar(14));f[g]=b,h=h||b!==x}return h=h||n.length!==Object.keys(l).length,h?f:l}}function rm(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function _q(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(ar(15))};const l={getState:i.getState,dispatch:(h,...f)=>o(h,...f)},c=e.map(h=>h(l));return o=rm(...c)(i.dispatch),{...i,dispatch:o}}}function zM(e){return Pj(e)&&"type"in e&&typeof e.type=="string"}var BM=Symbol.for("immer-nothing"),gA=Symbol.for("immer-draftable"),Ar=Symbol.for("immer-state");function Ln(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var rn=Object,Kl=rn.getPrototypeOf,nm="constructor",lp="prototype",Xx="configurable",am="enumerable",Rh="writable",qc="value",Ga=e=>!!e&&!!e[Ar];function Un(e){var t;return e?UM(e)||cp(e)||!!e[gA]||!!((t=e[nm])!=null&&t[gA])||dp(e)||fp(e):!1}var Oq=rn[lp][nm].toString(),yA=new WeakMap;function UM(e){if(!e||!Rj(e))return!1;const t=Kl(e);if(t===null||t===rn[lp])return!0;const r=rn.hasOwnProperty.call(t,nm)&&t[nm];if(r===Object)return!0;if(!bl(r))return!1;let n=yA.get(r);return n===void 0&&(n=Function.toString.call(r),yA.set(r,n)),n===Oq}function up(e,t,r=!0){vd(e)===0?(r?Reflect.ownKeys(e):rn.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function vd(e){const t=e[Ar];return t?t.type_:cp(e)?1:dp(e)?2:fp(e)?3:0}var vA=(e,t,r=vd(e))=>r===2?e.has(t):rn[lp].hasOwnProperty.call(e,t),Wx=(e,t,r=vd(e))=>r===2?e.get(t):e[t],im=(e,t,r,n=vd(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Eq(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var cp=Array.isArray,dp=e=>e instanceof Map,fp=e=>e instanceof Set,Rj=e=>typeof e=="object",bl=e=>typeof e=="function",T0=e=>typeof e=="boolean";function Aq(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Da=e=>e.copy_||e.base_,Mj=e=>e.modified_?e.copy_:e.base_;function Zx(e,t){if(dp(e))return new Map(e);if(fp(e))return new Set(e);if(cp(e))return Array[lp].slice.call(e);const r=UM(e);if(t===!0||t==="class_only"&&!r){const n=rn.getOwnPropertyDescriptors(e);delete n[Ar];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const l=i[o],c=n[l];c[Rh]===!1&&(c[Rh]=!0,c[Xx]=!0),(c.get||c.set)&&(n[l]={[Xx]:!0,[Rh]:!0,[am]:c[am],[qc]:e[l]})}return rn.create(Kl(e),n)}else{const n=Kl(e);if(n!==null&&r)return{...e};const i=rn.create(n);return rn.assign(i,e)}}function Dj(e,t=!1){return hp(e)||Ga(e)||!Un(e)||(vd(e)>1&&rn.defineProperties(e,{set:lh,add:lh,clear:lh,delete:lh}),rn.freeze(e),t&&up(e,(r,n)=>{Dj(n,!0)},!1)),e}function Tq(){Ln(2)}var lh={[qc]:Tq};function hp(e){return e===null||!Rj(e)?!0:rn.isFrozen(e)}var sm="MapSet",Jx="Patches",xA="ArrayMethods",qM={};function ao(e){const t=qM[e];return t||Ln(0,e),t}var bA=e=>!!qM[e],Fc,FM=()=>Fc,Cq=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:bA(sm)?ao(sm):void 0,arrayMethodsPlugin_:bA(xA)?ao(xA):void 0});function jA(e,t){t&&(e.patchPlugin_=ao(Jx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function eb(e){tb(e),e.drafts_.forEach(Pq),e.drafts_=null}function tb(e){e===Fc&&(Fc=e.parent_)}var wA=e=>Fc=Cq(Fc,e);function Pq(e){const t=e[Ar];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function SA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Ar].modified_&&(eb(t),Ln(4)),Un(e)&&(e=NA(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Ar].base_,e,t)}else e=NA(t,r);return Rq(t,e,!0),eb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==BM?e:void 0}function NA(e,t){if(hp(t))return t;const r=t[Ar];if(!r)return om(t,e.handledSet_,e);if(!mp(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);GM(r,e)}return r.copy_}function Rq(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Dj(t,r)}function HM(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var mp=(e,t)=>e.scope_===t,Mq=[];function KM(e,t,r,n){const i=Da(e),o=e.type_;if(n!==void 0&&Wx(i,n,o)===t){im(i,n,r,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;up(i,(h,f)=>{if(Ga(f)){const p=c.get(f)||[];p.push(h),c.set(f,p)}})}const l=e.draftLocations_.get(t)??Mq;for(const c of l)im(i,c,r,o)}function Dq(e,t,r){e.callbacks_.push(function(i){var c;const o=t;if(!o||!mp(o,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(o);const l=Mj(o);KM(e,o.draft_??o,l,r),GM(o,i)})}function GM(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,t)}HM(e)}}function kq(e,t,r){const{scope_:n}=e;if(Ga(r)){const i=r[Ar];mp(i,n)&&i.callbacks_.push(function(){Mh(e);const l=Mj(i);KM(e,r,l,t)})}else Un(r)&&e.callbacks_.push(function(){const o=Da(e);e.type_===3?o.has(r)&&om(r,n.handledSet_,n):Wx(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&om(Wx(e.copy_,t,e.type_),n.handledSet_,n)})}function om(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ga(e)||t.has(e)||!Un(e)||hp(e)||(t.add(e),up(e,(n,i)=>{if(Ga(i)){const o=i[Ar];if(mp(o,r)){const l=Mj(o);im(e,n,l,e.type_),HM(o)}}else Un(i)&&om(i,t,r)})),e}function Lq(e,t){const r=cp(e),n={type_:r?1:0,scope_:t?t.scope_:FM(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,o=lm;r&&(i=[n],o=Hc);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=l,[c,n]}var lm={get(e,t){if(t===Ar)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=Da(e);if(!vA(i,t,e.type_))return $q(e,i,t);const o=i[t];if(e.finalized_||!Un(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&Aq(t))return o;if(o===C0(e.base_,t)){Mh(e);const l=e.type_===1?+t:t,c=nb(e.scope_,o,e,l);return e.copy_[l]=c}return o},has(e,t){return t in Da(e)},ownKeys(e){return Reflect.ownKeys(Da(e))},set(e,t,r){const n=YM(Da(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=C0(Da(e),t),o=i==null?void 0:i[Ar];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(Eq(r,i)&&(r!==void 0||vA(e.base_,t,e.type_)))return!0;Mh(e),rb(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),kq(e,t,r)),!0},deleteProperty(e,t){return Mh(e),C0(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),rb(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Da(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Rh]:!0,[Xx]:e.type_!==1||t!=="length",[am]:n[am],[qc]:r[t]}},defineProperty(){Ln(11)},getPrototypeOf(e){return Kl(e.base_)},setPrototypeOf(){Ln(12)}},Hc={};for(let e in lm){let t=lm[e];Hc[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Hc.deleteProperty=function(e,t){return Hc.set.call(this,e,t,void 0)};Hc.set=function(e,t,r){return lm.set.call(this,e[0],t,r,e[0])};function C0(e,t){const r=e[Ar];return(r?Da(r):e)[t]}function $q(e,t,r){var i;const n=YM(t,r);return n?qc in n?n[qc]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function YM(e,t){if(!(t in e))return;let r=Kl(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Kl(r)}}function rb(e){e.modified_||(e.modified_=!0,e.parent_&&rb(e.parent_))}function Mh(e){e.copy_||(e.assigned_=new Map,e.copy_=Zx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Iq=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(bl(r)&&!bl(n)){const l=n;n=r;const c=this;return function(f=l,...p){return c.produce(f,g=>n.call(this,g,...p))}}bl(n)||Ln(6),i!==void 0&&!bl(i)&&Ln(7);let o;if(Un(r)){const l=wA(this),c=nb(l,r,void 0);let h=!0;try{o=n(c),h=!1}finally{h?eb(l):tb(l)}return jA(l,i),SA(o,l)}else if(!r||!Rj(r)){if(o=n(r),o===void 0&&(o=r),o===BM&&(o=void 0),this.autoFreeze_&&Dj(o,!0),i){const l=[],c=[];ao(Jx).generateReplacementPatches_(r,o,{patches_:l,inversePatches_:c}),i(l,c)}return o}else Ln(1,r)},this.produceWithPatches=(r,n)=>{if(bl(r))return(c,...h)=>this.produceWithPatches(c,f=>r(f,...h));let i,o;return[this.produce(r,n,(c,h)=>{i=c,o=h}),i,o]},T0(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),T0(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),T0(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Un(t)||Ln(8),Ga(t)&&(t=On(t));const r=wA(this),n=nb(r,t,void 0);return n[Ar].isManual_=!0,tb(r),n}finishDraft(t,r){const n=t&&t[Ar];(!n||!n.isManual_)&&Ln(9);const{scope_:i}=n;return jA(i,r),SA(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const i=ao(Jx).applyPatches_;return Ga(t)?i(t,r):this.produce(t,o=>i(o,r))}};function nb(e,t,r,n){const[i,o]=dp(t)?ao(sm).proxyMap_(t,r):fp(t)?ao(sm).proxySet_(t,r):Lq(t,r);return((r==null?void 0:r.scope_)??FM()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?Dq(r,o,n):o.callbacks_.push(function(h){var p;(p=h.mapSetPlugin_)==null||p.fixSetContents(o);const{patchPlugin_:f}=h;o.modified_&&f&&f.generatePatches_(o,[],h)}),i}function On(e){return Ga(e)||Ln(10,e),VM(e)}function VM(e){if(!Un(e)||hp(e))return e;const t=e[Ar];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Zx(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Zx(e,!0);return up(r,(i,o)=>{im(r,i,VM(o))},n),t&&(t.finalized_=!1),r}var zq=new Iq,QM=zq.produce;function XM(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var Bq=XM(),Uq=XM,qq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rm:rm.apply(null,arguments)};function on(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(nn(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>zM(n)&&n.type===e,r}var WM=class Nc extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Nc.prototype)}static get[Symbol.species](){return Nc}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Nc(...t[0].concat(this)):new Nc(...t.concat(this))}};function _A(e){return Un(e)?QM(e,()=>{}):e}function uh(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Fq(e){return typeof e=="boolean"}var Hq=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new WM;return r&&(Fq(r)?l.push(Bq):l.push(Uq(r.extraArgument))),l},ZM="RTK_autoBatch",ot=()=>e=>({payload:e,meta:{[ZM]:!0}}),OA=e=>t=>{setTimeout(t,e)},JM=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,l=!1;const c=new Set,h=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:OA(10):e.type==="callback"?e.queueNotification:OA(e.timeout),f=()=>{l=!1,o&&(o=!1,c.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const g=()=>i&&p(),y=n.subscribe(g);return c.add(p),()=>{y(),c.delete(p)}},dispatch(p){var g;try{return i=!((g=p==null?void 0:p.meta)!=null&&g[ZM]),o=!i,o&&(l||(l=!0,h(f))),n.dispatch(p)}finally{i=!0}}})},Kq=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new WM(e);return n&&i.push(JM(typeof n=="object"?n:void 0)),i};function Gq(e){const t=Hq(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:l=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(Pj(r))c=IM(r);else throw new Error(nn(1));let h;typeof n=="function"?h=n(t):h=t();let f=rm;i&&(f=qq({trace:!1,...typeof i=="object"&&i}));const p=_q(...h),g=Kq(p);let y=typeof l=="function"?l(g):g();const x=f(...y);return $M(c,o,x)}function e3(e){const t={},r=[];let n;const i={addCase(o,l){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(nn(28));if(c in t)throw new Error(nn(29));return t[c]=l,i},addAsyncThunk(o,l){return l.pending&&(t[o.pending.type]=l.pending),l.rejected&&(t[o.rejected.type]=l.rejected),l.fulfilled&&(t[o.fulfilled.type]=l.fulfilled),l.settled&&r.push({matcher:o.settled,reducer:l.settled}),i},addMatcher(o,l){return r.push({matcher:o,reducer:l}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function Yq(e){return typeof e=="function"}function Vq(e,t){let[r,n,i]=e3(t),o;if(Yq(e))o=()=>_A(e());else{const c=_A(e);o=()=>c}function l(c=o(),h){let f=[r[h.type],...n.filter(({matcher:p})=>p(h)).map(({reducer:p})=>p)];return f.filter(p=>!!p).length===0&&(f=[i]),f.reduce((p,g)=>{if(g)if(Ga(p)){const x=g(p,h);return x===void 0?p:x}else{if(Un(p))return QM(p,y=>g(y,h));{const y=g(p,h);if(y===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return p},c)}return l.getInitialState=o,l}var Qq="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xq=(e=21)=>{let t="",r=e;for(;r--;)t+=Qq[Math.random()*64|0];return t},Wq=Symbol.for("rtk-slice-createasyncthunk");function Zq(e,t){return`${e}/${t}`}function Jq({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[Wq];return function(i){const{name:o,reducerPath:l=o}=i;if(!o)throw new Error(nn(11));const c=(typeof i.reducers=="function"?i.reducers(t7()):i.reducers)||{},h=Object.keys(c),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(A,C){const R=typeof A=="string"?A:A.type;if(!R)throw new Error(nn(12));if(R in f.sliceCaseReducersByType)throw new Error(nn(13));return f.sliceCaseReducersByType[R]=C,p},addMatcher(A,C){return f.sliceMatchers.push({matcher:A,reducer:C}),p},exposeAction(A,C){return f.actionCreators[A]=C,p},exposeCaseReducer(A,C){return f.sliceCaseReducersByName[A]=C,p}};h.forEach(A=>{const C=c[A],R={reducerName:A,type:Zq(o,A),createNotation:typeof i.reducers=="function"};n7(C)?i7(R,C,p,t):r7(R,C,p)});function g(){const[A={},C=[],R=void 0]=typeof i.extraReducers=="function"?e3(i.extraReducers):[i.extraReducers],D={...A,...f.sliceCaseReducersByType};return Vq(i.initialState,M=>{for(let z in D)M.addCase(z,D[z]);for(let z of f.sliceMatchers)M.addMatcher(z.matcher,z.reducer);for(let z of C)M.addMatcher(z.matcher,z.reducer);R&&M.addDefaultCase(R)})}const y=A=>A,x=new Map,b=new WeakMap;let w;function N(A,C){return w||(w=g()),w(A,C)}function _(){return w||(w=g()),w.getInitialState()}function E(A,C=!1){function R(M){let z=M[A];return typeof z>"u"&&C&&(z=uh(b,R,_)),z}function D(M=y){const z=uh(x,C,()=>new WeakMap);return uh(z,M,()=>{const k={};for(const[H,U]of Object.entries(i.selectors??{}))k[H]=e7(U,M,()=>uh(b,M,_),C);return k})}return{reducerPath:A,getSelectors:D,get selectors(){return D(R)},selectSlice:R}}const T={name:o,reducer:N,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:_,...E(l),injectInto(A,{reducerPath:C,...R}={}){const D=C??l;return A.inject({reducerPath:D,reducer:N},R),{...T,...E(D,!0)}}};return T}}function e7(e,t,r,n){function i(o,...l){let c=t(o);return typeof c>"u"&&n&&(c=r()),e(c,...l)}return i.unwrapped=e,i}var br=Jq();function t7(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function r7({type:e,reducerName:t,createNotation:r},n,i){let o,l;if("reducer"in n){if(r&&!a7(n))throw new Error(nn(17));o=n.reducer,l=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,l?on(e,l):on(e))}function n7(e){return e._reducerDefinitionType==="asyncThunk"}function a7(e){return e._reducerDefinitionType==="reducerWithPrepare"}function i7({type:e,reducerName:t},r,n,i){if(!i)throw new Error(nn(18));const{payloadCreator:o,fulfilled:l,pending:c,rejected:h,settled:f,options:p}=r,g=i(e,o,p);n.exposeAction(t,g),l&&n.addCase(g.fulfilled,l),c&&n.addCase(g.pending,c),h&&n.addCase(g.rejected,h),f&&n.addMatcher(g.settled,f),n.exposeCaseReducer(t,{fulfilled:l||ch,pending:c||ch,rejected:h||ch,settled:f||ch})}function ch(){}var s7="task",t3="listener",r3="completed",kj="cancelled",o7=`task-${kj}`,l7=`task-${r3}`,ab=`${t3}-${kj}`,u7=`${t3}-${r3}`,pp=class{constructor(e){mv(this,"name","TaskAbortError");mv(this,"message");this.code=e,this.message=`${s7} ${kj} (reason: ${e})`}},Lj=(e,t)=>{if(typeof e!="function")throw new TypeError(nn(32))},um=()=>{},n3=(e,t=um)=>(e.catch(t),e),a3=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ws=e=>{if(e.aborted)throw new pp(e.reason)};function i3(e,t){let r=um;return new Promise((n,i)=>{const o=()=>i(new pp(e.reason));if(e.aborted){o();return}r=a3(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=um})}var c7=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof pp?"cancelled":"rejected",error:r}}finally{t==null||t()}},cm=e=>t=>n3(i3(e,t).then(r=>(Ws(e),r))),s3=e=>{const t=cm(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:_l}=Object,EA={},gp="listenerMiddleware",d7=(e,t)=>{const r=n=>a3(e,()=>n.abort(e.reason));return(n,i)=>{Lj(n);const o=new AbortController;r(o);const l=c7(async()=>{Ws(e),Ws(o.signal);const c=await n({pause:cm(o.signal),delay:s3(o.signal),signal:o.signal});return Ws(o.signal),c},()=>o.abort(l7));return i!=null&&i.autoJoin&&t.push(l.catch(um)),{result:cm(e)(l),cancel(){o.abort(o7)}}}},f7=(e,t)=>{const r=async(n,i)=>{Ws(t);let o=()=>{};const c=[new Promise((h,f)=>{let p=e({predicate:n,effect:(g,y)=>{y.unsubscribe(),h([g,y.getState(),y.getOriginalState()])}});o=()=>{p(),f()}})];i!=null&&c.push(new Promise(h=>setTimeout(h,i,null)));try{const h=await i3(t,Promise.race(c));return Ws(t),h}finally{o()}};return(n,i)=>n3(r(n,i))},o3=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=on(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(nn(21));return Lj(o),{predicate:i,type:t,effect:o}},l3=_l(e=>{const{type:t,predicate:r,effect:n}=o3(e);return{id:Xq(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(nn(22))}}},{withTypes:()=>l3}),AA=(e,t)=>{const{type:r,effect:n,predicate:i}=o3(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},ib=e=>{e.pending.forEach(t=>{t.abort(ab)})},h7=(e,t)=>()=>{for(const r of t.keys())ib(r);e.clear()},TA=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},u3=_l(on(`${gp}/add`),{withTypes:()=>u3}),m7=on(`${gp}/removeAll`),c3=_l(on(`${gp}/remove`),{withTypes:()=>c3}),p7=(...e)=>{console.error(`${gp}/error`,...e)},xd=(e={})=>{const t=new Map,r=new Map,n=x=>{const b=r.get(x)??0;r.set(x,b+1)},i=x=>{const b=r.get(x)??1;b===1?r.delete(x):r.set(x,b-1)},{extra:o,onError:l=p7}=e;Lj(l);const c=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),b=>{x.unsubscribe(),b!=null&&b.cancelActive&&ib(x)}),h=x=>{const b=AA(t,x)??l3(x);return c(b)};_l(h,{withTypes:()=>h});const f=x=>{const b=AA(t,x);return b&&(b.unsubscribe(),x.cancelActive&&ib(b)),!!b};_l(f,{withTypes:()=>f});const p=async(x,b,w,N)=>{const _=new AbortController,E=f7(h,_.signal),T=[];try{x.pending.add(_),n(x),await Promise.resolve(x.effect(b,_l({},w,{getOriginalState:N,condition:(A,C)=>E(A,C).then(Boolean),take:E,delay:s3(_.signal),pause:cm(_.signal),extra:o,signal:_.signal,fork:d7(_.signal,T),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((A,C,R)=>{A!==_&&(A.abort(ab),R.delete(A))})},cancel:()=>{_.abort(ab),x.pending.delete(_)},throwIfCancelled:()=>{Ws(_.signal)}})))}catch(A){A instanceof pp||TA(l,A,{raisedBy:"effect"})}finally{await Promise.all(T),_.abort(u7),i(x),x.pending.delete(_)}},g=h7(t,r);return{middleware:x=>b=>w=>{if(!zM(w))return b(w);if(u3.match(w))return h(w.payload);if(m7.match(w)){g();return}if(c3.match(w))return f(w.payload);let N=x.getState();const _=()=>{if(N===EA)throw new Error(nn(23));return N};let E;try{if(E=b(w),t.size>0){const T=x.getState(),A=Array.from(t.values());for(const C of A){let R=!1;try{R=C.predicate(w,T,N)}catch(D){R=!1,TA(l,D,{raisedBy:"predicate"})}R&&p(C,w,x,_)}}}finally{N=EA}return E},startListening:h,stopListening:f,clearListeners:g}};function nn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var g7={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},d3=br({name:"chartLayout",initialState:g7,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:y7,setLayout:v7,setChartSize:x7,setScale:b7}=d3.actions,j7=d3.reducer;function f3(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Be(e){return Number.isFinite(e)}function ca(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function CA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CA(Object(r),!0).forEach(function(n){w7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w7(e,t,r){return(t=S7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S7(e){var t=N7(e,"string");return typeof t=="symbol"?t:t+""}function N7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ot(e,t,r){return mt(e)||mt(t)?r:ua(t)?Hl(e,t,r):typeof t=="function"?t(e):r}var _7=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:o,verticalAlign:l,layout:c}=t;if((c==="vertical"||c==="horizontal"&&l==="middle")&&o!=="center"&&ge(e[o]))return wl(wl({},e),{},{[o]:e[o]+(n||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&l!=="middle"&&ge(e[l]))return wl(wl({},e),{},{[l]:e[l]+(i||0)})}return e},Xa=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",h3=(e,t,r,n)=>{if(n)return e.map(c=>c.coordinate);var i,o,l=e.map(c=>(c.coordinate===t&&(i=!0),c.coordinate===r&&(o=!0),c.coordinate));return i||l.push(t),o||l.push(r),l},m3=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:o,scale:l,realScaleType:c,isCategorical:h,categoricalDomain:f,tickCount:p,ticks:g,niceTicks:y,axisType:x}=e;if(!l)return null;var b=c==="scaleBand"&&l.bandwidth?l.bandwidth()/2:2,w=i==="category"&&l.bandwidth?l.bandwidth()/b:0;if(w=x==="angleAxis"&&o&&o.length>=2?Br(o[0]-o[1])*2*w:w,g||y){var N=(g||y||[]).map((_,E)=>{var T=n?n.indexOf(_):_,A=l.map(T);return Be(A)?{coordinate:A+w,value:_,offset:w,index:E}:null}).filter(Ur);return N}return h&&f?f.map((_,E)=>{var T=l.map(_);return Be(T)?{coordinate:T+w,value:_,index:E,offset:w}:null}).filter(Ur):l.ticks&&p!=null?l.ticks(p).map((_,E)=>{var T=l.map(_);return Be(T)?{coordinate:T+w,value:_,index:E,offset:w}:null}).filter(Ur):l.domain().map((_,E)=>{var T=l.map(_);return Be(T)?{coordinate:T+w,value:n?n[_]:_,index:E,offset:w}:null}).filter(Ur)},O7=(e,t)=>{if(!t||t.length!==2||!ge(t[0])||!ge(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!ge(e[0])||e[0]<r)&&(i[0]=r),(!ge(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},E7=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var o=0,l=0,c=0;c<r;++c){var h=e[c],f=h==null?void 0:h[i];if(f!=null){var p=f[1],g=f[0],y=la(p)?g:p;y>=0?(f[0]=o,o+=y,f[1]=o):(f[0]=l,l+=y,f[1]=l)}}}},A7=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var o=0,l=0;l<r;++l){var c=e[l],h=c==null?void 0:c[i];if(h!=null){var f=la(h[1])?h[0]:h[1];f>=0?(h[0]=o,o+=f,h[1]=o):(h[0]=0,h[1]=0)}}}},T7={sign:E7,expand:eU,none:ro,silhouette:tU,wiggle:rU,positive:A7},C7=(e,t,r)=>{var n,i=(n=T7[r])!==null&&n!==void 0?n:ro,o=J9().keys(t).value((c,h)=>Number(Ot(c,h,0))).order(Vx).offset(i),l=o(e);return l.forEach((c,h)=>{c.forEach((f,p)=>{var g=Ot(e[p],t[h],0);Array.isArray(g)&&g.length===2&&ge(g[0])&&ge(g[1])&&(f[0]=g[0],f[1]=g[1])})}),l};function P7(e){return e==null?void 0:String(e)}function PA(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:o,dataKey:l}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!mt(i[t.dataKey])){var c=vM(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var h=Ot(i,mt(l)?t.dataKey:l),f=t.scale.map(h);return ge(f)?f:null}var RA=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:o,index:l}=e;if(t.type==="category")return r[l]?r[l].coordinate+n:null;var c=Ot(o,t.dataKey,t.scale.domain()[l]);if(mt(c))return null;var h=t.scale.map(c);return ge(h)?h-i/2+n:null},R7=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},M7=e=>{var t=e.flat(2).filter(ge);return[Math.min(...t),Math.max(...t)]},D7=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],k7=(e,t,r)=>{if(e!=null)return D7(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var{stackedData:l}=o,c=l.reduce((h,f)=>{var p=f3(f,t,r),g=M7(p);return!Be(g[0])||!Be(g[1])?h:[Math.min(h[0],g[0]),Math.max(h[1],g[1])]},[1/0,-1/0]);return[Math.min(c[0],n[0]),Math.max(c[1],n[1])]},[1/0,-1/0]))},MA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,DA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Gl=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=op(t,p=>p.coordinate),o=1/0,l=1,c=i.length;l<c;l++){var h=i[l],f=i[l-1];o=Math.min(((h==null?void 0:h.coordinate)||0)-((f==null?void 0:f.coordinate)||0),o)}return o===1/0?0:o}return r?void 0:0};function kA(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:o}=e;return wl(wl({},t),{},{dataKey:r,payload:n,value:i,name:o})}function yp(e,t){if(e)return String(e);if(typeof t=="string")return t}var L7=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},$7=(e,t)=>t==="centric"?e.angle:e.radius,Wa=e=>e.layout.width,Za=e=>e.layout.height,I7=e=>e.layout.scale,p3=e=>e.layout.margin,vp=Q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),xp=Q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),z7="data-recharts-item-index",B7="data-recharts-item-id",bd=60;function LA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LA(Object(r),!0).forEach(function(n){U7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function U7(e,t,r){return(t=q7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q7(e){var t=F7(e,"string");return typeof t=="symbol"?t:t+""}function F7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var H7=e=>e.brush.height;function K7(e){var t=xp(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:bd;return r+i}return r},0)}function G7(e){var t=xp(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:bd;return r+i}return r},0)}function Y7(e){var t=vp(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function V7(e){var t=vp(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Vt=Q([Wa,Za,p3,H7,K7,G7,Y7,V7,kM,vq],(e,t,r,n,i,o,l,c,h,f)=>{var p={left:(r.left||0)+i,right:(r.right||0)+o},g={top:(r.top||0)+l,bottom:(r.bottom||0)+c},y=dh(dh({},g),p),x=y.bottom;y.bottom+=n,y=_7(y,h,f);var b=e-y.left-y.right,w=t-y.top-y.bottom;return dh(dh({brushBottom:x},y),{},{width:Math.max(b,0),height:Math.max(w,0)})}),Q7=Q(Vt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),$j=Q(Wa,Za,(e,t)=>({x:0,y:0,width:e,height:t})),X7=S.createContext(null),jr=()=>S.useContext(X7)!=null,bp=e=>e.brush,jp=Q([bp,Vt,p3],(e,t,r)=>({height:e.height,x:ge(e.x)?e.x:t.left,y:ge(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:ge(e.width)?e.width:t.width})),P0={},R0={},M0={},$A;function W7(){return $A||($A=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:o}={}){let l,c=null;const h=o!=null&&o.includes("leading"),f=o==null||o.includes("trailing"),p=()=>{c!==null&&(r.apply(l,c),l=void 0,c=null)},g=()=>{f&&p(),w()};let y=null;const x=()=>{y!=null&&clearTimeout(y),y=setTimeout(()=>{y=null,g()},n)},b=()=>{y!==null&&(clearTimeout(y),y=null)},w=()=>{b(),l=void 0,c=null},N=()=>{p()},_=function(...E){if(i!=null&&i.aborted)return;l=this,c=E;const T=y==null;x(),h&&T&&p()};return _.schedule=x,_.cancel=w,_.flush=N,i==null||i.addEventListener("abort",w,{once:!0}),_}e.debounce=t})(M0)),M0}var IA;function Z7(){return IA||(IA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=W7();function r(n,i=0,o={}){typeof o!="object"&&(o={});const{leading:l=!1,trailing:c=!0,maxWait:h}=o,f=Array(2);l&&(f[0]="leading"),c&&(f[1]="trailing");let p,g=null;const y=t.debounce(function(...w){p=n.apply(this,w),g=null},i,{edges:f}),x=function(...w){return h!=null&&(g===null&&(g=Date.now()),Date.now()-g>=h)?(p=n.apply(this,w),g=Date.now(),y.cancel(),y.schedule(),p):(y.apply(this,w),p)},b=()=>(y.flush(),p);return x.cancel=y.cancel,x.flush=b,x}e.debounce=r})(R0)),R0}var zA;function J7(){return zA||(zA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Z7();function r(n,i=0,o={}){const{leading:l=!0,trailing:c=!0}=o;return t.debounce(n,i,{leading:l,maxWait:i,trailing:c})}e.throttle=r})(P0)),P0}var D0,BA;function eF(){return BA||(BA=1,D0=J7().throttle),D0}var tF=eF();const rF=rs(tF);var dm=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>i[l++]))}},aa={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},g3=(e,t,r)=>{var{width:n=aa.width,height:i=aa.height,aspect:o,maxHeight:l}=r,c=no(n)?e:Number(n),h=no(i)?t:Number(i);return o&&o>0&&(c?h=c/o:h&&(c=h*o),l&&h!=null&&h>l&&(h=l)),{calculatedWidth:c,calculatedHeight:h}},nF={width:0,height:0,overflow:"visible"},aF={width:0,overflowX:"visible"},iF={height:0,overflowY:"visible"},sF={},oF=e=>{var{width:t,height:r}=e,n=no(t),i=no(r);return n&&i?nF:n?aF:i?iF:sF};function lF(e){var{width:t,height:r,aspect:n}=e,i=t,o=r;return i===void 0&&o===void 0?(i=aa.width,o=aa.height):i===void 0?i=n&&n>0?void 0:aa.width:o===void 0&&(o=n&&n>0?void 0:aa.height),{width:i,height:o}}function sb(){return sb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sb.apply(null,arguments)}function UA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UA(Object(r),!0).forEach(function(n){uF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uF(e,t,r){return(t=cF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cF(e){var t=dF(e,"string");return typeof t=="symbol"?t:t+""}function dF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y3=S.createContext(aa.initialDimension);function fF(e){return ca(e.width)&&ca(e.height)}function v3(e){var{children:t,width:r,height:n}=e,i=S.useMemo(()=>({width:r,height:n}),[r,n]);return fF(i)?S.createElement(y3.Provider,{value:i},t):null}var Ij=()=>S.useContext(y3),hF=S.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=aa.initialDimension,width:i,height:o,minWidth:l=aa.minWidth,minHeight:c,maxHeight:h,children:f,debounce:p=aa.debounce,id:g,className:y,onResize:x,style:b={}}=e,w=S.useRef(null),N=S.useRef();N.current=x,S.useImperativeHandle(t,()=>w.current);var[_,E]=S.useState({containerWidth:n.width,containerHeight:n.height}),T=S.useCallback((M,z)=>{E(k=>{var H=Math.round(M),U=Math.round(z);return k.containerWidth===H&&k.containerHeight===U?k:{containerWidth:H,containerHeight:U}})},[]);S.useEffect(()=>{if(w.current==null||typeof ResizeObserver>"u")return go;var M=U=>{var ae,Z=U[0];if(Z!=null){var{width:G,height:L}=Z.contentRect;T(G,L),(ae=N.current)===null||ae===void 0||ae.call(N,G,L)}};p>0&&(M=rF(M,p,{trailing:!0,leading:!1}));var z=new ResizeObserver(M),{width:k,height:H}=w.current.getBoundingClientRect();return T(k,H),z.observe(w.current),()=>{z.disconnect()}},[T,p]);var{containerWidth:A,containerHeight:C}=_;dm(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:R,calculatedHeight:D}=g3(A,C,{width:i,height:o,aspect:r,maxHeight:h});return dm(R!=null&&R>0||D!=null&&D>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
71
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
72
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
73
|
+
height and width.`,R,D,i,o,l,c,r),S.createElement("div",{id:g?"".concat(g):void 0,className:Xe("recharts-responsive-container",y),style:qA(qA({},b),{},{width:i,height:o,minWidth:l,minHeight:c,maxHeight:h}),ref:w},S.createElement("div",{style:oF({width:i,height:o})},S.createElement(v3,{width:R,height:D},f)))}),zj=S.forwardRef((e,t)=>{var r=Ij();if(ca(r.width)&&ca(r.height))return e.children;var{width:n,height:i}=lF({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:l}=g3(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return ge(o)&&ge(l)?S.createElement(v3,{width:o,height:l},e.children):S.createElement(hF,sb({},e,{width:n,height:i,ref:t}))});function Bj(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var wp=()=>{var e,t=jr(),r=ve(Q7),n=ve(jp),i=(e=ve(bp))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},mF={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},x3=()=>{var e;return(e=ve(Vt))!==null&&e!==void 0?e:mF},Uj=()=>ve(Wa),qj=()=>ve(Za),pF=()=>ve(e=>e.layout.margin),We=e=>e.layout.layoutType,yo=()=>ve(We),b3=()=>{var e=yo();if(e==="horizontal"||e==="vertical")return e},j3=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},gF=()=>{var e=yo();return e!==void 0},jd=e=>{var t=ct(),r=jr(),{width:n,height:i}=e,o=Ij(),l=n,c=i;return o&&(l=o.width>0?o.width:n,c=o.height>0?o.height:i),S.useEffect(()=>{!r&&ca(l)&&ca(c)&&t(x7({width:l,height:c}))},[t,r,l,c]),null},w3=Symbol.for("immer-nothing"),FA=Symbol.for("immer-draftable"),ln=Symbol.for("immer-state");function $n(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Kc=Object.getPrototypeOf;function Yl(e){return!!e&&!!e[ln]}function io(e){var t;return e?S3(e)||Array.isArray(e)||!!e[FA]||!!((t=e.constructor)!=null&&t[FA])||wd(e)||Np(e):!1}var yF=Object.prototype.constructor.toString(),HA=new WeakMap;function S3(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=HA.get(r);return n===void 0&&(n=Function.toString.call(r),HA.set(r,n)),n===yF}function fm(e,t,r=!0){Sp(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Sp(e){const t=e[ln];return t?t.type_:Array.isArray(e)?1:wd(e)?2:Np(e)?3:0}function ob(e,t){return Sp(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function N3(e,t,r){const n=Sp(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function vF(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function wd(e){return e instanceof Map}function Np(e){return e instanceof Set}function Ts(e){return e.copy_||e.base_}function lb(e,t){if(wd(e))return new Map(e);if(Np(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=S3(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[ln];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const l=i[o],c=n[l];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[l]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[l]})}return Object.create(Kc(e),n)}else{const n=Kc(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function Fj(e,t=!1){return _p(e)||Yl(e)||!io(e)||(Sp(e)>1&&Object.defineProperties(e,{set:fh,add:fh,clear:fh,delete:fh}),Object.freeze(e),t&&Object.values(e).forEach(r=>Fj(r,!0))),e}function xF(){$n(2)}var fh={value:xF};function _p(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var bF={};function so(e){const t=bF[e];return t||$n(0,e),t}var Gc;function _3(){return Gc}function jF(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function KA(e,t){t&&(so("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ub(e){cb(e),e.drafts_.forEach(wF),e.drafts_=null}function cb(e){e===Gc&&(Gc=e.parent_)}function GA(e){return Gc=jF(Gc,e)}function wF(e){const t=e[ln];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function YA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[ln].modified_&&(ub(t),$n(4)),io(e)&&(e=hm(t,e),t.parent_||mm(t,e)),t.patches_&&so("Patches").generateReplacementPatches_(r[ln].base_,e,t.patches_,t.inversePatches_)):e=hm(t,r,[]),ub(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==w3?e:void 0}function hm(e,t,r){if(_p(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[ln];if(!i)return fm(t,(o,l)=>VA(e,i,t,o,l,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return mm(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let l=o,c=!1;i.type_===3&&(l=new Set(o),o.clear(),c=!0),fm(l,(h,f)=>VA(e,i,o,h,f,r,c),n),mm(e,o,!1),r&&e.patches_&&so("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function VA(e,t,r,n,i,o,l){if(i==null||typeof i!="object"&&!l)return;const c=_p(i);if(!(c&&!l)){if(Yl(i)){const h=o&&t&&t.type_!==3&&!ob(t.assigned_,n)?o.concat(n):void 0,f=hm(e,i,h);if(N3(r,n,f),Yl(f))e.canAutoFreeze_=!1;else return}else l&&r.add(i);if(io(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&c)return;hm(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(wd(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&mm(e,i)}}}function mm(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fj(t,r)}function SF(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:_3(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=Hj;r&&(i=[n],o=Yc);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=l,c}var Hj={get(e,t){if(t===ln)return e;const r=Ts(e);if(!ob(r,t))return NF(e,r,t);const n=r[t];return e.finalized_||!io(n)?n:n===k0(e.base_,t)?(L0(e),e.copy_[t]=fb(n,e)):n},has(e,t){return t in Ts(e)},ownKeys(e){return Reflect.ownKeys(Ts(e))},set(e,t,r){const n=O3(Ts(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=k0(Ts(e),t),o=i==null?void 0:i[ln];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(vF(r,i)&&(r!==void 0||ob(e.base_,t)))return!0;L0(e),db(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return k0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,L0(e),db(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ts(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){$n(11)},getPrototypeOf(e){return Kc(e.base_)},setPrototypeOf(){$n(12)}},Yc={};fm(Hj,(e,t)=>{Yc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Yc.deleteProperty=function(e,t){return Yc.set.call(this,e,t,void 0)};Yc.set=function(e,t,r){return Hj.set.call(this,e[0],t,r,e[0])};function k0(e,t){const r=e[ln];return(r?Ts(r):e)[t]}function NF(e,t,r){var i;const n=O3(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function O3(e,t){if(!(t in e))return;let r=Kc(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Kc(r)}}function db(e){e.modified_||(e.modified_=!0,e.parent_&&db(e.parent_))}function L0(e){e.copy_||(e.copy_=lb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _F=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const l=this;return function(h=o,...f){return l.produce(h,p=>r.call(this,p,...f))}}typeof r!="function"&&$n(6),n!==void 0&&typeof n!="function"&&$n(7);let i;if(io(t)){const o=GA(this),l=fb(t,void 0);let c=!0;try{i=r(l),c=!1}finally{c?ub(o):cb(o)}return KA(o,n),YA(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===w3&&(i=void 0),this.autoFreeze_&&Fj(i,!0),n){const o=[],l=[];so("Patches").generateReplacementPatches_(t,i,o,l),n(o,l)}return i}else $n(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(l,...c)=>this.produceWithPatches(l,h=>t(h,...c));let n,i;return[this.produce(t,r,(l,c)=>{n=l,i=c}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){io(e)||$n(8),Yl(e)&&(e=OF(e));const t=GA(this),r=fb(e,void 0);return r[ln].isManual_=!0,cb(t),r}finishDraft(e,t){const r=e&&e[ln];(!r||!r.isManual_)&&$n(9);const{scope_:n}=r;return KA(n,t),YA(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=so("Patches").applyPatches_;return Yl(e)?n(e,t):this.produce(e,i=>n(i,t))}};function fb(e,t){const r=wd(e)?so("MapSet").proxyMap_(e,t):Np(e)?so("MapSet").proxySet_(e,t):SF(e,t);return(t?t.scope_:_3()).drafts_.push(r),r}function OF(e){return Yl(e)||$n(10,e),E3(e)}function E3(e){if(!io(e)||_p(e))return e;const t=e[ln];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=lb(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=lb(e,!0);return fm(r,(i,o)=>{N3(r,i,E3(o))},n),t&&(t.finalized_=!1),r}var EF=new _F;EF.produce;var AF={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},A3=br({name:"legend",initialState:AF,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:ot()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:ot()},removeLegendPayload:{reducer(e,t){var r=On(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ot()}}}),{setLegendSize:QA,setLegendSettings:TF,addLegendPayload:CF,replaceLegendPayload:PF,removeLegendPayload:RF}=A3.actions,MF=A3.reducer,$0={exports:{}},I0={};/**
|
|
74
|
+
* @license React
|
|
75
|
+
* use-sync-external-store-with-selector.production.js
|
|
76
|
+
*
|
|
77
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the MIT license found in the
|
|
80
|
+
* LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/var XA;function DF(){if(XA)return I0;XA=1;var e=tu();function t(h,f){return h===f&&(h!==0||1/h===1/f)||h!==h&&f!==f}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return I0.useSyncExternalStoreWithSelector=function(h,f,p,g,y){var x=i(null);if(x.current===null){var b={hasValue:!1,value:null};x.current=b}else b=x.current;x=l(function(){function N(C){if(!_){if(_=!0,E=C,C=g(C),y!==void 0&&b.hasValue){var R=b.value;if(y(R,C))return T=R}return T=C}if(R=T,r(E,C))return R;var D=g(C);return y!==void 0&&y(R,D)?(E=C,R):(E=C,T=D)}var _=!1,E,T,A=p===void 0?null:p;return[function(){return N(f())},A===null?void 0:function(){return N(A())}]},[f,p,g,y]);var w=n(h,x[0],x[1]);return o(function(){b.hasValue=!0,b.value=w},[w]),c(w),w},I0}var WA;function kF(){return WA||(WA=1,$0.exports=DF()),$0.exports}kF();function LF(e){e()}function $F(){let e=null,t=null;return{clear(){e=null,t=null},notify(){LF(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var ZA={notify(){},get:()=>[]};function IF(e,t){let r,n=ZA,i=0,o=!1;function l(w){p();const N=n.subscribe(w);let _=!1;return()=>{_||(_=!0,N(),g())}}function c(){n.notify()}function h(){b.onStateChange&&b.onStateChange()}function f(){return o}function p(){i++,r||(r=e.subscribe(h),n=$F())}function g(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=ZA)}function y(){o||(o=!0,p())}function x(){o&&(o=!1,g())}const b={addNestedSub:l,notifyNestedSubs:c,handleChangeWrapper:h,isSubscribed:f,trySubscribe:y,tryUnsubscribe:x,getListeners:()=>n};return b}var zF=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",BF=zF(),UF=()=>typeof navigator<"u"&&navigator.product==="ReactNative",qF=UF(),FF=()=>BF||qF?S.useLayoutEffect:S.useEffect,HF=FF();function JA(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function KF(e,t){if(JA(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!JA(e[r[i]],t[r[i]]))return!1;return!0}var z0=Symbol.for("react-redux-context"),B0=typeof globalThis<"u"?globalThis:{};function GF(){if(!S.createContext)return{};const e=B0[z0]??(B0[z0]=new Map);let t=e.get(S.createContext);return t||(t=S.createContext(null),e.set(S.createContext,t)),t}var YF=GF();function VF(e){const{children:t,context:r,serverState:n,store:i}=e,o=S.useMemo(()=>{const h=IF(i);return{store:i,subscription:h,getServerState:n?()=>n:void 0}},[i,n]),l=S.useMemo(()=>i.getState(),[i]);HF(()=>{const{subscription:h}=o;return h.onStateChange=h.notifyNestedSubs,h.trySubscribe(),l!==i.getState()&&h.notifyNestedSubs(),()=>{h.tryUnsubscribe(),h.onStateChange=void 0}},[o,l]);const c=r||YF;return S.createElement(c.Provider,{value:o},t)}var QF=VF,XF=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function WF(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function ru(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(XF.has(n)){if(e[n]==null&&t[n]==null)continue;if(!KF(e[n],t[n]))return!1}else if(!WF(e[n],t[n]))return!1;return!0}var ZF=["contextPayload"];function hb(){return hb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hb.apply(null,arguments)}function eT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eT(Object(r),!0).forEach(function(n){JF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JF(e,t,r){return(t=eH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eH(e){var t=tH(e,"string");return typeof t=="symbol"?t:t+""}function tH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rH(e,t){if(e==null)return{};var r,n,i=nH(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function nH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function aH(e){return e.value}function iH(e){var{contextPayload:t}=e,r=rH(e,ZF),n=PM(t,e.payloadUniqBy,aH),i=Vl(Vl({},r),{},{payload:n});return S.isValidElement(e.content)?S.cloneElement(e.content,i):typeof e.content=="function"?S.createElement(e.content,i):S.createElement(PU,i)}function sH(e,t,r,n,i,o){var{layout:l,align:c,verticalAlign:h}=t,f,p;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(c==="center"&&l==="vertical"?f={left:((n||0)-o.width)/2}:f=c==="right"?{right:r&&r.right||0}:{left:r&&r.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(h==="middle"?p={top:((i||0)-o.height)/2}:p=h==="bottom"?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),Vl(Vl({},f),p)}function oH(e){var t=ct();return S.useEffect(()=>{t(TF(e))},[t,e]),null}function lH(e){var t=ct();return S.useEffect(()=>(t(QA(e)),()=>{t(QA({width:0,height:0}))}),[t,e]),null}function uH(e,t,r,n){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:r||n}:null}var cH={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function dH(e){var t=fr(e,cH),r=jq(),n=S9(),i=pF(),{width:o,height:l,wrapperStyle:c,portal:h}=t,[f,p]=LM([r]),g=Uj(),y=qj();if(g==null||y==null)return null;var x=g-((i==null?void 0:i.left)||0)-((i==null?void 0:i.right)||0),b=uH(t.layout,l,o,x),w=h?c:Vl(Vl({position:"absolute",width:(b==null?void 0:b.width)||o||"auto",height:(b==null?void 0:b.height)||l||"auto"},sH(c,t,i,g,y,f)),c),N=h??n;if(N==null||r==null)return null;var _=S.createElement("div",{className:"recharts-legend-wrapper",style:w,ref:p},S.createElement(oH,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!h&&S.createElement(lH,{width:f.width,height:f.height}),S.createElement(iH,hb({},t,b,{margin:i,chartWidth:g,chartHeight:y,contextPayload:r})));return Wm.createPortal(_,N)}var T3=S.memo(dH,ru);T3.displayName="Legend";function mb(){return mb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mb.apply(null,arguments)}function tT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tT(Object(r),!0).forEach(function(n){fH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fH(e,t,r){return(t=hH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hH(e){var t=mH(e,"string");return typeof t=="symbol"?t:t+""}function mH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pH(e){return Array.isArray(e)&&ua(e[0])&&ua(e[1])?e.join(" ~ "):e}var cl={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function gH(e,t){return t==null?e:op(e,t)}var yH=e=>{var{separator:t=cl.separator,contentStyle:r,itemStyle:n,labelStyle:i=cl.labelStyle,payload:o,formatter:l,itemSorter:c,wrapperClassName:h,labelClassName:f,label:p,labelFormatter:g,accessibilityLayer:y=cl.accessibilityLayer}=e,x=()=>{if(o&&o.length){var C={padding:0,margin:0},R=gH(o,c),D=R.map((M,z)=>{if(!M||M.type==="none")return null;var k=M.formatter||l||pH,{value:H,name:U}=M,ae=H,Z=U;if(k){var G=k(H,U,M,z,o);if(Array.isArray(G))[ae,Z]=G;else if(G!=null)ae=G;else return null}var L=dc(dc({},cl.itemStyle),{},{color:M.color||cl.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(z),style:L},ua(Z)?S.createElement("span",{className:"recharts-tooltip-item-name"},Z):null,ua(Z)?S.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,S.createElement("span",{className:"recharts-tooltip-item-value"},ae),S.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:C},D)}return null},b=dc(dc({},cl.contentStyle),r),w=dc({margin:0},i),N=!mt(p),_=N?p:"",E=Xe("recharts-default-tooltip",h),T=Xe("recharts-tooltip-label",f);N&&g&&o!==void 0&&o!==null&&(_=g(p,o));var A=y?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",mb({className:E,style:b},A),S.createElement("p",{className:T,style:w},S.isValidElement(_)?_:"".concat(_)),x())},fc="recharts-tooltip-wrapper",vH={visibility:"hidden"};function xH(e){var{coordinate:t,translateX:r,translateY:n}=e;return Xe(fc,{["".concat(fc,"-right")]:ge(r)&&t&&ge(t.x)&&r>=t.x,["".concat(fc,"-left")]:ge(r)&&t&&ge(t.x)&&r<t.x,["".concat(fc,"-bottom")]:ge(n)&&t&&ge(t.y)&&n>=t.y,["".concat(fc,"-top")]:ge(n)&&t&&ge(t.y)&&n<t.y})}function rT(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:o,reverseDirection:l,tooltipDimension:c,viewBox:h,viewBoxDimension:f}=e;if(o&&ge(o[n]))return o[n];var p=r[n]-c-(i>0?i:0),g=r[n]+i;if(t[n])return l[n]?p:g;var y=h[n];if(y==null)return 0;if(l[n]){var x=p,b=y;return x<b?Math.max(g,y):Math.max(p,y)}if(f==null)return 0;var w=g+c,N=y+f;return w>N?Math.max(p,y):Math.max(g,y)}function bH(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function jH(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:i,position:o,reverseDirection:l,tooltipBox:c,useTranslate3d:h,viewBox:f}=e,p,g,y;return c.height>0&&c.width>0&&r?(g=rT({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:l,tooltipDimension:c.width,viewBox:f,viewBoxDimension:f.width}),y=rT({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:l,tooltipDimension:c.height,viewBox:f,viewBoxDimension:f.height}),p=bH({translateX:g,translateY:y,useTranslate3d:h})):p=vH,{cssProperties:p,cssClasses:xH({translateX:g,translateY:y,coordinate:r})}}var wH=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Sd={isSsr:wH()};function C3(){var[e,t]=S.useState(()=>Sd.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return S.useEffect(()=>{if(window.matchMedia){var r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(r.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}}},[]),e}function nT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nT(Object(r),!0).forEach(function(n){SH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SH(e,t,r){return(t=NH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NH(e){var t=_H(e,"string");return typeof t=="symbol"?t:t+""}function _H(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OH(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function EH(e){var t,r,n,i,o,l,c=C3(),[h,f]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var b=w=>{if(w.key==="Escape"){var N,_,E,T;f({dismissed:!0,dismissedAtCoordinate:{x:(N=(_=e.coordinate)===null||_===void 0?void 0:_.x)!==null&&N!==void 0?N:0,y:(E=(T=e.coordinate)===null||T===void 0?void 0:T.y)!==null&&E!==void 0?E:0}})}};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),h.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==h.dismissedAtCoordinate.x||((o=(l=e.coordinate)===null||l===void 0?void 0:l.y)!==null&&o!==void 0?o:0)!==h.dismissedAtCoordinate.y)&&f(dl(dl({},h),{},{dismissed:!1}));var{cssClasses:p,cssProperties:g}=jH({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),y=e.hasPortalFromProps?{}:dl(dl({transition:OH({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},g),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),x=dl(dl({},y),{},{visibility:!h.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return S.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:p,style:x,ref:e.innerRef},e.children)}var AH=S.memo(EH),P3=()=>{var e;return(e=ve(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function pb(){return pb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pb.apply(null,arguments)}function aT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function iT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aT(Object(r),!0).forEach(function(n){TH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TH(e,t,r){return(t=CH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CH(e){var t=PH(e,"string");return typeof t=="symbol"?t:t+""}function PH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sT={curveBasisClosed:q9,curveBasisOpen:F9,curveBasis:U9,curveBumpX:E9,curveBumpY:A9,curveLinearClosed:H9,curveLinear:ap,curveMonotoneX:K9,curveMonotoneY:G9,curveNatural:Y9,curveStep:V9,curveStepAfter:X9,curveStepBefore:Q9},pm=e=>Be(e.x)&&Be(e.y),oT=e=>e.base!=null&&pm(e.base)&&pm(e),hc=e=>e.x,mc=e=>e.y,RH=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(yd(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=sT["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return sT[r]||ap},lT={connectNulls:!1,type:"linear"},MH=e=>{var{type:t=lT.type,points:r=[],baseLine:n,layout:i,connectNulls:o=lT.connectNulls}=e,l=RH(t,i),c=o?r.filter(pm):r;if(Array.isArray(n)){var h,f=r.map((b,w)=>iT(iT({},b),{},{base:n[w]}));i==="vertical"?h=ih().y(mc).x1(hc).x0(b=>b.base.x):h=ih().x(hc).y1(mc).y0(b=>b.base.y);var p=h.defined(oT).curve(l),g=o?f.filter(oT):f;return p(g)}var y;i==="vertical"&&ge(n)?y=ih().y(mc).x1(hc).x0(n):ge(n)?y=ih().x(hc).y1(mc).y0(n):y=iM().x(hc).y(mc);var x=y.defined(pm).curve(l);return x(c)},R3=e=>{var{className:t,points:r,path:n,pathRef:i}=e,o=yo();if((!r||!r.length)&&!n)return null;var l={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},c=r&&r.length?MH(l):n;return S.createElement("path",pb({},zn(e),Aj(e),{className:Xe("recharts-curve",t),d:c===null?void 0:c,ref:i}))},DH=["x","y","top","left","width","height","className"];function gb(){return gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gb.apply(null,arguments)}function uT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kH(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uT(Object(r),!0).forEach(function(n){LH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LH(e,t,r){return(t=$H(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $H(e){var t=IH(e,"string");return typeof t=="symbol"?t:t+""}function IH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zH(e,t){if(e==null)return{};var r,n,i=BH(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function BH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var UH=(e,t,r,n,i,o)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),qH=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:o=0,height:l=0,className:c}=e,h=zH(e,DH),f=kH({x:t,y:r,top:n,left:i,width:o,height:l},h);return!ge(t)||!ge(r)||!ge(o)||!ge(l)||!ge(n)||!ge(i)?null:S.createElement("path",gb({},Er(f),{className:Xe("recharts-cross",c),d:UH(t,r,o,l,n,i)}))};function FH(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function cT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cT(Object(r),!0).forEach(function(n){HH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HH(e,t,r){return(t=KH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KH(e){var t=GH(e,"string");return typeof t=="symbol"?t:t+""}function GH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var YH=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),M3=(e,t,r)=>e.map(n=>"".concat(YH(n)," ").concat(t,"ms ").concat(r)).join(","),VH=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),Vc=(e,t)=>Object.keys(t).reduce((r,n)=>dT(dT({},r),{},{[n]:e(n,t[n])}),{});function fT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function It(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fT(Object(r),!0).forEach(function(n){QH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QH(e,t,r){return(t=XH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XH(e){var t=WH(e,"string");return typeof t=="symbol"?t:t+""}function WH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gm=(e,t,r)=>e+(t-e)*r,yb=e=>{var{from:t,to:r}=e;return t!==r},D3=(e,t,r)=>{var n=Vc((i,o)=>{if(yb(o)){var[l,c]=e(o.from,o.to,o.velocity);return It(It({},o),{},{from:l,velocity:c})}return o},t);return r<1?Vc((i,o)=>yb(o)&&n[i]!=null?It(It({},o),{},{velocity:gm(o.velocity,n[i].velocity,r),from:gm(o.from,n[i].from,r)}):o,t):D3(e,n,r-1)};function ZH(e,t,r,n,i,o){var l,c=n.reduce((y,x)=>It(It({},y),{},{[x]:{from:e[x],velocity:0,to:t[x]}}),{}),h=()=>Vc((y,x)=>x.from,c),f=()=>!Object.values(c).filter(yb).length,p=null,g=y=>{l||(l=y);var x=y-l,b=x/r.dt;c=D3(r,c,b),i(It(It(It({},e),t),h())),l=y,f()||(p=o.setTimeout(g))};return()=>(p=o.setTimeout(g),()=>{var y;(y=p)===null||y===void 0||y()})}function JH(e,t,r,n,i,o,l){var c=null,h=i.reduce((g,y)=>{var x=e[y],b=t[y];return x==null||b==null?g:It(It({},g),{},{[y]:[x,b]})},{}),f,p=g=>{f||(f=g);var y=(g-f)/n,x=Vc((w,N)=>gm(...N,r(y)),h);if(o(It(It(It({},e),t),x)),y<1)c=l.setTimeout(p);else{var b=Vc((w,N)=>gm(...N,r(1)),h);o(It(It(It({},e),t),b))}};return()=>(c=l.setTimeout(p),()=>{var g;(g=c)===null||g===void 0||g()})}const eK=(e,t,r,n,i,o)=>{var l=VH(e,t);return r==null?()=>(i(It(It({},e),t)),()=>{}):r.isStepper===!0?ZH(e,t,r,l,i,o):JH(e,t,r,n,l,i,o)};var ym=1e-4,k3=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],L3=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),hT=(e,t)=>r=>{var n=k3(e,t);return L3(n,r)},tK=(e,t)=>r=>{var n=k3(e,t),i=[...n.map((o,l)=>o*l).slice(1),0];return L3(i,r)},rK=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var i=n.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},nK=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=rK(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},aK=(e,t,r,n)=>{var i=hT(e,r),o=hT(t,n),l=tK(e,r),c=f=>f>1?1:f<0?0:f,h=f=>{for(var p=f>1?1:f,g=p,y=0;y<8;++y){var x=i(g)-p,b=l(g);if(Math.abs(x-p)<ym||b<ym)return o(g);g=c(g-x/b)}return o(g)};return h.isStepper=!1,h},mT=function(){return aK(...nK(...arguments))},iK=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,o=(l,c,h)=>{var f=-(l-c)*r,p=h*n,g=h+(f-p)*i/1e3,y=h*i/1e3+l;return Math.abs(y-c)<ym&&Math.abs(g)<ym?[c,0]:[y,g]};return o.isStepper=!0,o.dt=i,o},sK=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return mT(e);case"spring":return iK();default:if(e.split("(")[0]==="cubic-bezier")return mT(e)}return typeof e=="function"?e:null};function oK(e){var t,r=()=>null,n=!1,i=null,o=l=>{if(!n){if(Array.isArray(l)){if(!l.length)return;var c=l,[h,...f]=c;if(typeof h=="number"){i=e.setTimeout(o.bind(null,f),h);return}o(h),i=e.setTimeout(o.bind(null,f));return}typeof l=="string"&&(t=l,r(t)),typeof l=="object"&&(t=l,r(t)),typeof l=="function"&&l()}};return{stop:()=>{n=!0},start:l=>{n=!1,i&&(i(),i=null),o(l)},subscribe:l=>(r=l,()=>{r=()=>null}),getTimeoutController:()=>e}}class lK{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=l=>{l-n>=r?t(l):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function uK(){return oK(new lK)}var cK=S.createContext(uK);function dK(e,t){var r=S.useContext(cK);return S.useMemo(()=>t??r(e),[e,t,r])}var fK={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},pT={t:0},U0={t:1};function Op(e){var t=fr(e,fK),{isActive:r,canBegin:n,duration:i,easing:o,begin:l,onAnimationEnd:c,onAnimationStart:h,children:f}=t,p=C3(),g=r==="auto"?!Sd.isSsr&&!p:r,y=dK(t.animationId,t.animationManager),[x,b]=S.useState(g?pT:U0),w=S.useRef(null);return S.useEffect(()=>{g||b(U0)},[g]),S.useEffect(()=>{if(!g||!n)return go;var N=eK(pT,U0,sK(o),i,b,y.getTimeoutController()),_=()=>{w.current=N()};return y.start([h,l,_,i,c]),()=>{y.stop(),w.current&&w.current(),c()}},[g,n,i,o,l,h,c,y]),f(x.t)}function Ep(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=S.useRef(Uc(t)),n=S.useRef(e);return n.current!==e&&(r.current=Uc(t),n.current=e),r.current}var hK=["radius"],mK=["radius"],gT,yT,vT,xT,bT,jT,wT,ST,NT,_T;function OT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ET(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OT(Object(r),!0).forEach(function(n){pK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pK(e,t,r){return(t=gK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gK(e){var t=yK(e,"string");return typeof t=="symbol"?t:t+""}function yK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vm(){return vm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vm.apply(null,arguments)}function AT(e,t){if(e==null)return{};var r,n,i=vK(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function vK(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Xn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var TT=(e,t,r,n,i)=>{var o=Gi(r),l=Gi(n),c=Math.min(Math.abs(o)/2,Math.abs(l)/2),h=l>=0?1:-1,f=o>=0?1:-1,p=l>=0&&o>=0||l<0&&o<0?1:0,g;if(c>0&&Array.isArray(i)){for(var y=[0,0,0,0],x=0,b=4;x<b;x++){var w,N=(w=i[x])!==null&&w!==void 0?w:0;y[x]=N>c?c:N}g=bt(gT||(gT=Xn(["M",",",""])),e,t+h*y[0]),y[0]>0&&(g+=bt(yT||(yT=Xn(["A ",",",",0,0,",",",",",""])),y[0],y[0],p,e+f*y[0],t)),g+=bt(vT||(vT=Xn(["L ",",",""])),e+r-f*y[1],t),y[1]>0&&(g+=bt(xT||(xT=Xn(["A ",",",",0,0,",`,
|
|
82
|
+
`,",",""])),y[1],y[1],p,e+r,t+h*y[1])),g+=bt(bT||(bT=Xn(["L ",",",""])),e+r,t+n-h*y[2]),y[2]>0&&(g+=bt(jT||(jT=Xn(["A ",",",",0,0,",`,
|
|
83
|
+
`,",",""])),y[2],y[2],p,e+r-f*y[2],t+n)),g+=bt(wT||(wT=Xn(["L ",",",""])),e+f*y[3],t+n),y[3]>0&&(g+=bt(ST||(ST=Xn(["A ",",",",0,0,",`,
|
|
84
|
+
`,",",""])),y[3],y[3],p,e,t+n-h*y[3])),g+="Z"}else if(c>0&&i===+i&&i>0){var _=Math.min(c,i);g=bt(NT||(NT=Xn(["M ",",",`
|
|
85
|
+
A `,",",",0,0,",",",",",`
|
|
86
|
+
L `,",",`
|
|
87
|
+
A `,",",",0,0,",",",",",`
|
|
88
|
+
L `,",",`
|
|
89
|
+
A `,",",",0,0,",",",",",`
|
|
90
|
+
L `,",",`
|
|
91
|
+
A `,",",",0,0,",",",","," Z"])),e,t+h*_,_,_,p,e+f*_,t,e+r-f*_,t,_,_,p,e+r,t+h*_,e+r,t+n-h*_,_,_,p,e+r-f*_,t+n,e+f*_,t+n,_,_,p,e,t+n-h*_)}else g=bt(_T||(_T=Xn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},CT={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},$3=e=>{var t=fr(e,CT),r=S.useRef(null),[n,i]=S.useState(-1);S.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var F=r.current.getTotalLength();F&&i(F)}catch{}},[]);var{x:o,y:l,width:c,height:h,radius:f,className:p}=t,{animationEasing:g,animationDuration:y,animationBegin:x,isAnimationActive:b,isUpdateAnimationActive:w}=t,N=S.useRef(c),_=S.useRef(h),E=S.useRef(o),T=S.useRef(l),A=S.useMemo(()=>({x:o,y:l,width:c,height:h,radius:f}),[o,l,c,h,f]),C=Ep(A,"rectangle-");if(o!==+o||l!==+l||c!==+c||h!==+h||c===0||h===0)return null;var R=Xe("recharts-rectangle",p);if(!w){var D=Er(t),{radius:M}=D,z=AT(D,hK);return S.createElement("path",vm({},z,{x:Gi(o),y:Gi(l),width:Gi(c),height:Gi(h),radius:typeof f=="number"?f:void 0,className:R,d:TT(o,l,c,h,f)}))}var k=N.current,H=_.current,U=E.current,ae=T.current,Z="0px ".concat(n===-1?1:n,"px"),G="".concat(n,"px ").concat(n,"px"),L=M3(["strokeDasharray"],y,typeof g=="string"?g:CT.animationEasing);return S.createElement(Op,{animationId:C,key:C,canBegin:n>0,duration:y,easing:g,isActive:w,begin:x},F=>{var J=jt(k,c,F),re=jt(H,h,F),oe=jt(U,o,F),$=jt(ae,l,F);r.current&&(N.current=J,_.current=re,E.current=oe,T.current=$);var X;b?F>0?X={transition:L,strokeDasharray:G}:X={strokeDasharray:Z}:X={strokeDasharray:G};var le=Er(t),{radius:ue}=le,pe=AT(le,mK);return S.createElement("path",vm({},pe,{radius:typeof f=="number"?f:void 0,className:R,d:TT(oe,$,J,re,f),ref:r,style:ET(ET({},X),t.style)}))})};function PT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function RT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(r),!0).forEach(function(n){xK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xK(e,t,r){return(t=bK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bK(e){var t=jK(e,"string");return typeof t=="symbol"?t:t+""}function jK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xm=Math.PI/180,wK=e=>e*180/Math.PI,lr=(e,t,r,n)=>({x:e+Math.cos(-xm*n)*r,y:t+Math.sin(-xm*n)*r}),SK=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},NK=(e,t)=>{var{x:r,y:n}=e,{x:i,y:o}=t;return Math.sqrt((r-i)**2+(n-o)**2)},_K=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:o}=t,l=NK({x:r,y:n},{x:i,y:o});if(l<=0)return{radius:l,angle:0};var c=(r-i)/l,h=Math.acos(c);return n>o&&(h=2*Math.PI-h),{radius:l,angle:wK(h),angleInRadian:h}},OK=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-o*360,endAngle:r-o*360}},EK=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),o=Math.floor(n/360),l=Math.min(i,o);return e+l*360},AK=(e,t)=>{var{relativeX:r,relativeY:n}=e,{radius:i,angle:o}=_K({x:r,y:n},t),{innerRadius:l,outerRadius:c}=t;if(i<l||i>c||i===0)return null;var{startAngle:h,endAngle:f}=OK(t),p=o,g;if(h<=f){for(;p>f;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=f}else{for(;p>h;)p-=360;for(;p<f;)p+=360;g=p>=f&&p<=h}return g?RT(RT({},t),{},{radius:i,angle:EK(p,t)}):null};function I3(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:o}=e,l=lr(t,r,n,i),c=lr(t,r,n,o);return{points:[l,c],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var MT,DT,kT,LT,$T,IT,zT;function vb(){return vb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vb.apply(null,arguments)}function Ds(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var TK=(e,t)=>{var r=Br(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},hh=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:o,isExternal:l,cornerRadius:c,cornerIsExternal:h}=e,f=c*(l?1:-1)+n,p=Math.asin(c/f)/xm,g=h?i:i+o*p,y=lr(t,r,f,g),x=lr(t,r,n,g),b=h?i-o*p:i,w=lr(t,r,f*Math.cos(p*xm),b);return{center:y,circleTangency:x,lineTangency:w,theta:p}},z3=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:o,endAngle:l}=e,c=TK(o,l),h=o+c,f=lr(t,r,i,o),p=lr(t,r,i,h),g=bt(MT||(MT=Ds(["M ",",",`
|
|
92
|
+
A `,",",`,0,
|
|
93
|
+
`,",",`,
|
|
94
|
+
`,",",`
|
|
95
|
+
`])),f.x,f.y,i,i,+(Math.abs(c)>180),+(o>h),p.x,p.y);if(n>0){var y=lr(t,r,n,o),x=lr(t,r,n,h);g+=bt(DT||(DT=Ds(["L ",",",`
|
|
96
|
+
A `,",",`,0,
|
|
97
|
+
`,",",`,
|
|
98
|
+
`,","," Z"])),x.x,x.y,n,n,+(Math.abs(c)>180),+(o<=h),y.x,y.y)}else g+=bt(kT||(kT=Ds(["L ",","," Z"])),t,r);return g},CK=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:h,endAngle:f}=e,p=Br(f-h),{circleTangency:g,lineTangency:y,theta:x}=hh({cx:t,cy:r,radius:i,angle:h,sign:p,cornerRadius:o,cornerIsExternal:c}),{circleTangency:b,lineTangency:w,theta:N}=hh({cx:t,cy:r,radius:i,angle:f,sign:-p,cornerRadius:o,cornerIsExternal:c}),_=c?Math.abs(h-f):Math.abs(h-f)-x-N;if(_<0)return l?bt(LT||(LT=Ds(["M ",",",`
|
|
99
|
+
a`,",",",0,0,1,",`,0
|
|
100
|
+
a`,",",",0,0,1,",`,0
|
|
101
|
+
`])),y.x,y.y,o,o,o*2,o,o,-o*2):z3({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:h,endAngle:f});var E=bt($T||($T=Ds(["M ",",",`
|
|
102
|
+
A`,",",",0,0,",",",",",`
|
|
103
|
+
A`,",",",0,",",",",",",",`
|
|
104
|
+
A`,",",",0,0,",",",",",`
|
|
105
|
+
`])),y.x,y.y,o,o,+(p<0),g.x,g.y,i,i,+(_>180),+(p<0),b.x,b.y,o,o,+(p<0),w.x,w.y);if(n>0){var{circleTangency:T,lineTangency:A,theta:C}=hh({cx:t,cy:r,radius:n,angle:h,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),{circleTangency:R,lineTangency:D,theta:M}=hh({cx:t,cy:r,radius:n,angle:f,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),z=c?Math.abs(h-f):Math.abs(h-f)-C-M;if(z<0&&o===0)return"".concat(E,"L").concat(t,",").concat(r,"Z");E+=bt(IT||(IT=Ds(["L",",",`
|
|
106
|
+
A`,",",",0,0,",",",",",`
|
|
107
|
+
A`,",",",0,",",",",",",",`
|
|
108
|
+
A`,",",",0,0,",",",",","Z"])),D.x,D.y,o,o,+(p<0),R.x,R.y,n,n,+(z>180),+(p>0),T.x,T.y,o,o,+(p<0),A.x,A.y)}else E+=bt(zT||(zT=Ds(["L",",","Z"])),t,r);return E},PK={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},B3=e=>{var t=fr(e,PK),{cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:l,forceCornerRadius:c,cornerIsExternal:h,startAngle:f,endAngle:p,className:g}=t;if(o<i||f===p)return null;var y=Xe("recharts-sector",g),x=o-i,b=Bn(l,x,0,!0),w;return b>0&&Math.abs(f-p)<360?w=CK({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(b,x/2),forceCornerRadius:c,cornerIsExternal:h,startAngle:f,endAngle:p}):w=z3({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:f,endAngle:p}),S.createElement("path",vb({},Er(t),{className:y,d:w}))};function RK(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(bM(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:o,outerRadius:l,angle:c}=t,h=lr(n,i,o,c),f=lr(n,i,l,c);return[{x:h.x,y:h.y},{x:f.x,y:f.y}]}return I3(t)}}var q0={},F0={},H0={},BT;function MK(){return BT||(BT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MM();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(H0)),H0}var UT;function DK(){return UT||(UT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MK();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(F0)),F0}var qT;function kK(){return qT||(qT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DM(),r=DK();function n(i,o,l){l&&typeof l!="number"&&t.isIterateeCall(i,o,l)&&(o=l=void 0),i=r.toFinite(i),o===void 0?(o=i,i=0):o=r.toFinite(o),l=l===void 0?i<o?1:-1:r.toFinite(l);const c=Math.max(Math.ceil((o-i)/(l||1)),0),h=new Array(c);for(let f=0;f<c;f++)h[f]=i,i+=l;return h}e.range=n})(q0)),q0}var K0,FT;function LK(){return FT||(FT=1,K0=kK().range),K0}var $K=LK();const U3=rs($K);var Hn=e=>e.chartData,Kj=Q([Hn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Nd=(e,t,r,n)=>n?Kj(e):Hn(e),IK=(e,t,r)=>r?Kj(e):Hn(e),zK=Q([Nd],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});Q([Kj],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});var BK=Q([Hn],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});function sa(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Be(t)&&Be(r))return!0}return!1}function HT(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function q3(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,o;if(Be(r))i=r;else if(typeof r=="function")return;if(Be(n))o=n;else if(typeof n=="function")return;var l=[i,o];if(sa(l))return l}}function UK(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(sa(n))return HT(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,l,c;if(i==="auto")t!=null&&(l=Math.min(...t));else if(ge(i))l=i;else if(typeof i=="function")try{t!=null&&(l=i(t==null?void 0:t[0]))}catch{}else if(typeof i=="string"&&MA.test(i)){var h=MA.exec(i);if(h==null||h[1]==null||t==null)l=void 0;else{var f=+h[1];l=t[0]-f}}else l=t==null?void 0:t[0];if(o==="auto")t!=null&&(c=Math.max(...t));else if(ge(o))c=o;else if(typeof o=="function")try{t!=null&&(c=o(t==null?void 0:t[1]))}catch{}else if(typeof o=="string"&&DA.test(o)){var p=DA.exec(o);if(p==null||p[1]==null||t==null)c=void 0;else{var g=+p[1];c=t[1]+g}}else c=t==null?void 0:t[1];var y=[l,c];if(sa(y))return t==null?y:HT(y,t,r)}}}var nu=1e9,qK={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Yj,ht=!0,An="[DecimalError] ",Zs=An+"Invalid argument: ",Gj=An+"Exponent out of range: ",au=Math.floor,Cs=Math.pow,FK=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,tn,Kt=1e7,lt=7,F3=9007199254740991,bm=au(F3/lt),he={};he.absoluteValue=he.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};he.comparedTo=he.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};he.decimalPlaces=he.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*lt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};he.dividedBy=he.div=function(e){return Ha(this,new this.constructor(e))};he.dividedToIntegerBy=he.idiv=function(e){var t=this,r=t.constructor;return nt(Ha(t,new r(e),0,1),r.precision)};he.equals=he.eq=function(e){return!this.cmp(e)};he.exponent=function(){return Dt(this)};he.greaterThan=he.gt=function(e){return this.cmp(e)>0};he.greaterThanOrEqualTo=he.gte=function(e){return this.cmp(e)>=0};he.isInteger=he.isint=function(){return this.e>this.d.length-2};he.isNegative=he.isneg=function(){return this.s<0};he.isPositive=he.ispos=function(){return this.s>0};he.isZero=function(){return this.s===0};he.lessThan=he.lt=function(e){return this.cmp(e)<0};he.lessThanOrEqualTo=he.lte=function(e){return this.cmp(e)<1};he.logarithm=he.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(tn))throw Error(An+"NaN");if(r.s<1)throw Error(An+(r.s?"NaN":"-Infinity"));return r.eq(tn)?new n(0):(ht=!1,t=Ha(Qc(r,o),Qc(e,o),o),ht=!0,nt(t,i))};he.minus=he.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?G3(t,e):H3(t,(e.s=-e.s,e))};he.modulo=he.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(An+"NaN");return r.s?(ht=!1,t=Ha(r,e,0,1).times(e),ht=!0,r.minus(t)):nt(new n(r),i)};he.naturalExponential=he.exp=function(){return K3(this)};he.naturalLogarithm=he.ln=function(){return Qc(this)};he.negated=he.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};he.plus=he.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?H3(t,e):G3(t,(e.s=-e.s,e))};he.precision=he.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Zs+e);if(t=Dt(i)+1,n=i.d.length-1,r=n*lt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};he.squareRoot=he.sqrt=function(){var e,t,r,n,i,o,l,c=this,h=c.constructor;if(c.s<1){if(!c.s)return new h(0);throw Error(An+"NaN")}for(e=Dt(c),ht=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=ia(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=au((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new h(t)):n=new h(i.toString()),r=h.precision,i=l=r+3;;)if(o=n,n=o.plus(Ha(c,o,l+2)).times(.5),ia(o.d).slice(0,l)===(t=ia(n.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(nt(o,r+1,0),o.times(o).eq(c)){n=o;break}}else if(t!="9999")break;l+=4}return ht=!0,nt(n,r)};he.times=he.mul=function(e){var t,r,n,i,o,l,c,h,f,p=this,g=p.constructor,y=p.d,x=(e=new g(e)).d;if(!p.s||!e.s)return new g(0);for(e.s*=p.s,r=p.e+e.e,h=y.length,f=x.length,h<f&&(o=y,y=x,x=o,l=h,h=f,f=l),o=[],l=h+f,n=l;n--;)o.push(0);for(n=f;--n>=0;){for(t=0,i=h+n;i>n;)c=o[i]+x[n]*y[i-n-1]+t,o[i--]=c%Kt|0,t=c/Kt|0;o[i]=(o[i]+t)%Kt|0}for(;!o[--l];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ht?nt(e,g.precision):e};he.toDecimalPlaces=he.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(da(e,0,nu),t===void 0?t=n.rounding:da(t,0,8),nt(r,e+Dt(r)+1,t))};he.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=oo(n,!0):(da(e,0,nu),t===void 0?t=i.rounding:da(t,0,8),n=nt(new i(n),e+1,t),r=oo(n,!0,e+1)),r};he.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?oo(i):(da(e,0,nu),t===void 0?t=o.rounding:da(t,0,8),n=nt(new o(i),e+Dt(i)+1,t),r=oo(n.abs(),!1,e+Dt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};he.toInteger=he.toint=function(){var e=this,t=e.constructor;return nt(new t(e),Dt(e)+1,t.rounding)};he.toNumber=function(){return+this};he.toPower=he.pow=function(e){var t,r,n,i,o,l,c=this,h=c.constructor,f=12,p=+(e=new h(e));if(!e.s)return new h(tn);if(c=new h(c),!c.s){if(e.s<1)throw Error(An+"Infinity");return c}if(c.eq(tn))return c;if(n=h.precision,e.eq(tn))return nt(c,n);if(t=e.e,r=e.d.length-1,l=t>=r,o=c.s,l){if((r=p<0?-p:p)<=F3){for(i=new h(tn),t=Math.ceil(n/lt+4),ht=!1;r%2&&(i=i.times(c),GT(i.d,t)),r=au(r/2),r!==0;)c=c.times(c),GT(c.d,t);return ht=!0,e.s<0?new h(tn).div(i):nt(i,n)}}else if(o<0)throw Error(An+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,ht=!1,i=e.times(Qc(c,n+f)),ht=!0,i=K3(i),i.s=o,i};he.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=Dt(i),n=oo(i,r<=o.toExpNeg||r>=o.toExpPos)):(da(e,1,nu),t===void 0?t=o.rounding:da(t,0,8),i=nt(new o(i),e,t),r=Dt(i),n=oo(i,e<=r||r<=o.toExpNeg,e)),n};he.toSignificantDigits=he.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(da(e,1,nu),t===void 0?t=n.rounding:da(t,0,8)),nt(new n(r),e,t)};he.toString=he.valueOf=he.val=he.toJSON=he[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Dt(e),r=e.constructor;return oo(e,t<=r.toExpNeg||t>=r.toExpPos)};function H3(e,t){var r,n,i,o,l,c,h,f,p=e.constructor,g=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),ht?nt(t,g):t;if(h=e.d,f=t.d,l=e.e,i=t.e,h=h.slice(),o=l-i,o){for(o<0?(n=h,o=-o,c=f.length):(n=f,i=l,c=h.length),l=Math.ceil(g/lt),c=l>c?l+1:c+1,o>c&&(o=c,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(c=h.length,o=f.length,c-o<0&&(o=c,n=f,f=h,h=n),r=0;o;)r=(h[--o]=h[o]+f[o]+r)/Kt|0,h[o]%=Kt;for(r&&(h.unshift(r),++i),c=h.length;h[--c]==0;)h.pop();return t.d=h,t.e=i,ht?nt(t,g):t}function da(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Zs+e)}function ia(e){var t,r,n,i=e.length-1,o="",l=e[0];if(i>0){for(o+=l,t=1;t<i;t++)n=e[t]+"",r=lt-n.length,r&&(o+=Ri(r)),o+=n;l=e[t],n=l+"",r=lt-n.length,r&&(o+=Ri(r))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Ha=(function(){function e(n,i){var o,l=0,c=n.length;for(n=n.slice();c--;)o=n[c]*i+l,n[c]=o%Kt|0,l=o/Kt|0;return l&&n.unshift(l),n}function t(n,i,o,l){var c,h;if(o!=l)h=o>l?1:-1;else for(c=h=0;c<o;c++)if(n[c]!=i[c]){h=n[c]>i[c]?1:-1;break}return h}function r(n,i,o){for(var l=0;o--;)n[o]-=l,l=n[o]<i[o]?1:0,n[o]=l*Kt+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,l){var c,h,f,p,g,y,x,b,w,N,_,E,T,A,C,R,D,M,z=n.constructor,k=n.s==i.s?1:-1,H=n.d,U=i.d;if(!n.s)return new z(n);if(!i.s)throw Error(An+"Division by zero");for(h=n.e-i.e,D=U.length,C=H.length,x=new z(k),b=x.d=[],f=0;U[f]==(H[f]||0);)++f;if(U[f]>(H[f]||0)&&--h,o==null?E=o=z.precision:l?E=o+(Dt(n)-Dt(i))+1:E=o,E<0)return new z(0);if(E=E/lt+2|0,f=0,D==1)for(p=0,U=U[0],E++;(f<C||p)&&E--;f++)T=p*Kt+(H[f]||0),b[f]=T/U|0,p=T%U|0;else{for(p=Kt/(U[0]+1)|0,p>1&&(U=e(U,p),H=e(H,p),D=U.length,C=H.length),A=D,w=H.slice(0,D),N=w.length;N<D;)w[N++]=0;M=U.slice(),M.unshift(0),R=U[0],U[1]>=Kt/2&&++R;do p=0,c=t(U,w,D,N),c<0?(_=w[0],D!=N&&(_=_*Kt+(w[1]||0)),p=_/R|0,p>1?(p>=Kt&&(p=Kt-1),g=e(U,p),y=g.length,N=w.length,c=t(g,w,y,N),c==1&&(p--,r(g,D<y?M:U,y))):(p==0&&(c=p=1),g=U.slice()),y=g.length,y<N&&g.unshift(0),r(w,g,N),c==-1&&(N=w.length,c=t(U,w,D,N),c<1&&(p++,r(w,D<N?M:U,N))),N=w.length):c===0&&(p++,w=[0]),b[f++]=p,c&&w[0]?w[N++]=H[A]||0:(w=[H[A]],N=1);while((A++<C||w[0]!==void 0)&&E--)}return b[0]||b.shift(),x.e=h,nt(x,l?o+Dt(x)+1:o)}})();function K3(e,t){var r,n,i,o,l,c,h=0,f=0,p=e.constructor,g=p.precision;if(Dt(e)>16)throw Error(Gj+Dt(e));if(!e.s)return new p(tn);for(ht=!1,c=g,l=new p(.03125);e.abs().gte(.1);)e=e.times(l),f+=5;for(n=Math.log(Cs(2,f))/Math.LN10*2+5|0,c+=n,r=i=o=new p(tn),p.precision=c;;){if(i=nt(i.times(e),c),r=r.times(++h),l=o.plus(Ha(i,r,c)),ia(l.d).slice(0,c)===ia(o.d).slice(0,c)){for(;f--;)o=nt(o.times(o),c);return p.precision=g,t==null?(ht=!0,nt(o,g)):o}o=l}}function Dt(e){for(var t=e.e*lt,r=e.d[0];r>=10;r/=10)t++;return t}function G0(e,t,r){if(t>e.LN10.sd())throw ht=!0,r&&(e.precision=r),Error(An+"LN10 precision limit exceeded");return nt(new e(e.LN10),t)}function Ri(e){for(var t="";e--;)t+="0";return t}function Qc(e,t){var r,n,i,o,l,c,h,f,p,g=1,y=10,x=e,b=x.d,w=x.constructor,N=w.precision;if(x.s<1)throw Error(An+(x.s?"NaN":"-Infinity"));if(x.eq(tn))return new w(0);if(t==null?(ht=!1,f=N):f=t,x.eq(10))return t==null&&(ht=!0),G0(w,f);if(f+=y,w.precision=f,r=ia(b),n=r.charAt(0),o=Dt(x),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)x=x.times(e),r=ia(x.d),n=r.charAt(0),g++;o=Dt(x),n>1?(x=new w("0."+r),o++):x=new w(n+"."+r.slice(1))}else return h=G0(w,f+2,N).times(o+""),x=Qc(new w(n+"."+r.slice(1)),f-y).plus(h),w.precision=N,t==null?(ht=!0,nt(x,N)):x;for(c=l=x=Ha(x.minus(tn),x.plus(tn),f),p=nt(x.times(x),f),i=3;;){if(l=nt(l.times(p),f),h=c.plus(Ha(l,new w(i),f)),ia(h.d).slice(0,f)===ia(c.d).slice(0,f))return c=c.times(2),o!==0&&(c=c.plus(G0(w,f+2,N).times(o+""))),c=Ha(c,new w(g),f),w.precision=N,t==null?(ht=!0,nt(c,N)):c;c=h,i+=2}}function KT(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=au(r/lt),e.d=[],n=(r+1)%lt,r<0&&(n+=lt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=lt;n<i;)e.d.push(+t.slice(n,n+=lt));t=t.slice(n),n=lt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),ht&&(e.e>bm||e.e<-bm))throw Error(Gj+r)}else e.s=0,e.e=0,e.d=[0];return e}function nt(e,t,r){var n,i,o,l,c,h,f,p,g=e.d;for(l=1,o=g[0];o>=10;o/=10)l++;if(n=t-l,n<0)n+=lt,i=t,f=g[p=0];else{if(p=Math.ceil((n+1)/lt),o=g.length,p>=o)return e;for(f=o=g[p],l=1;o>=10;o/=10)l++;n%=lt,i=n-lt+l}if(r!==void 0&&(o=Cs(10,l-i-1),c=f/o%10|0,h=t<0||g[p+1]!==void 0||f%o,h=r<4?(c||h)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||h||r==6&&(n>0?i>0?f/Cs(10,l-i):0:g[p-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return h?(o=Dt(e),g.length=1,t=t-o-1,g[0]=Cs(10,(lt-t%lt)%lt),e.e=au(-t/lt)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=p,o=1,p--):(g.length=p+1,o=Cs(10,lt-n),g[p]=i>0?(f/Cs(10,l-i)%Cs(10,i)|0)*o:0),h)for(;;)if(p==0){(g[0]+=o)==Kt&&(g[0]=1,++e.e);break}else{if(g[p]+=o,g[p]!=Kt)break;g[p--]=0,o=1}for(n=g.length;g[--n]===0;)g.pop();if(ht&&(e.e>bm||e.e<-bm))throw Error(Gj+Dt(e));return e}function G3(e,t){var r,n,i,o,l,c,h,f,p,g,y=e.constructor,x=y.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new y(e),ht?nt(t,x):t;if(h=e.d,g=t.d,n=t.e,f=e.e,h=h.slice(),l=f-n,l){for(p=l<0,p?(r=h,l=-l,c=g.length):(r=g,n=f,c=h.length),i=Math.max(Math.ceil(x/lt),c)+2,l>i&&(l=i,r.length=1),r.reverse(),i=l;i--;)r.push(0);r.reverse()}else{for(i=h.length,c=g.length,p=i<c,p&&(c=i),i=0;i<c;i++)if(h[i]!=g[i]){p=h[i]<g[i];break}l=0}for(p&&(r=h,h=g,g=r,t.s=-t.s),c=h.length,i=g.length-c;i>0;--i)h[c++]=0;for(i=g.length;i>l;){if(h[--i]<g[i]){for(o=i;o&&h[--o]===0;)h[o]=Kt-1;--h[o],h[i]+=Kt}h[i]-=g[i]}for(;h[--c]===0;)h.pop();for(;h[0]===0;h.shift())--n;return h[0]?(t.d=h,t.e=n,ht?nt(t,x):t):new y(0)}function oo(e,t,r){var n,i=Dt(e),o=ia(e.d),l=o.length;return t?(r&&(n=r-l)>0?o=o.charAt(0)+"."+o.slice(1)+Ri(n):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ri(-i-1)+o,r&&(n=r-l)>0&&(o+=Ri(n))):i>=l?(o+=Ri(i+1-l),r&&(n=r-i-1)>0&&(o=o+"."+Ri(n))):((n=i+1)<l&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-l)>0&&(i+1===l&&(o+="."),o+=Ri(n))),e.s<0?"-"+o:o}function GT(e,t){if(e.length>t)return e.length=t,!0}function Y3(e){var t,r,n;function i(o){var l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,o instanceof i){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Zs+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return KT(l,o.toString())}else if(typeof o!="string")throw Error(Zs+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,FK.test(o))KT(l,o);else throw Error(Zs+o)}if(i.prototype=he,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Y3,i.config=i.set=HK,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function HK(e){if(!e||typeof e!="object")throw Error(An+"Object expected");var t,r,n,i=["precision",1,nu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(au(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Zs+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Zs+r+": "+n);return this}var Yj=Y3(qK);tn=new Yj(1);const ze=Yj;function V3(e){var t;return e===0?t=1:t=Math.floor(new ze(e).abs().log(10).toNumber())+1,t}function Q3(e,t,r){for(var n=new ze(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}var X3=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},Vj=(e,t,r)=>{if(e.lte(0))return new ze(0);var n=V3(e.toNumber()),i=new ze(10).pow(n),o=e.div(i),l=n!==1?.05:.1,c=new ze(Math.ceil(o.div(l).toNumber())).add(r).mul(l),h=c.mul(i);return t?new ze(h.toNumber()):new ze(Math.ceil(h.toNumber()))},W3=(e,t,r)=>{var n;if(e.lte(0))return new ze(0);var i=[1,2,2.5,5],o=e.toNumber(),l=Math.floor(new ze(o).abs().log(10).toNumber()),c=new ze(10).pow(l),h=e.div(c).toNumber(),f=i.findIndex(x=>x>=h-1e-10);if(f===-1&&(c=c.mul(10),f=0),f+=r,f>=i.length){var p=Math.floor(f/i.length);f%=i.length,c=c.mul(new ze(10).pow(p))}var g=(n=i[f])!==null&&n!==void 0?n:1,y=new ze(g).mul(c);return t?y:new ze(Math.ceil(y.toNumber()))},KK=(e,t,r)=>{var n=new ze(1),i=new ze(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new ze(10).pow(V3(e)-1),i=new ze(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new ze(Math.floor(e)))}else e===0?i=new ze(Math.floor((t-1)/2)):r||(i=new ze(Math.floor(e)));for(var l=Math.floor((t-1)/2),c=[],h=0;h<t;h++)c.push(i.add(new ze(h-l).mul(n)).toNumber());return c},Z3=function(t,r,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Vj;if(!Number.isFinite((r-t)/(n-1)))return{step:new ze(0),tickMin:new ze(0),tickMax:new ze(0)};var c=l(new ze(r).sub(t).div(n-1),i,o),h;t<=0&&r>=0?h=new ze(0):(h=new ze(t).add(r).div(2),h=h.sub(new ze(h).mod(c)));var f=Math.ceil(h.sub(t).div(c).toNumber()),p=Math.ceil(new ze(r).sub(h).div(c).toNumber()),g=f+p+1;return g>n?Z3(t,r,n,i,o+1,l):(g<n&&(p=r>0?p+(n-g):p,f=r>0?f:f+(n-g)),{step:c,tickMin:h.sub(new ze(f).mul(c)),tickMax:h.add(new ze(p).mul(c))})},YT=function(t){var[r,n]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",c=Math.max(i,2),[h,f]=X3([r,n]);if(h===-1/0||f===1/0){var p=f===1/0?[h,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),f];return r>n?p.reverse():p}if(h===f)return KK(h,i,o);var g=l==="snap125"?W3:Vj,{step:y,tickMin:x,tickMax:b}=Z3(h,f,c,o,0,g),w=Q3(x,b.add(new ze(.1).mul(y)),y);return r>n?w.reverse():w},VT=function(t,r){var[n,i]=t,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[c,h]=X3([n,i]);if(c===-1/0||h===1/0)return[n,i];if(c===h)return[c];var f=l==="snap125"?W3:Vj,p=Math.max(r,2),g=f(new ze(h).sub(c).div(p-1),o,0),y=[...Q3(new ze(c),new ze(h),g),h];return o===!1&&(y=y.map(x=>Math.round(x))),n>i?y.reverse():y},J3=e=>e.rootProps.maxBarSize,GK=e=>e.rootProps.barGap,e4=e=>e.rootProps.barCategoryGap,YK=e=>e.rootProps.barSize,Ap=e=>e.rootProps.stackOffset,t4=e=>e.rootProps.reverseStackOrder,Qj=e=>e.options.chartName,Xj=e=>e.rootProps.syncId,r4=e=>e.rootProps.syncMethod,Wj=e=>e.options.eventEmitter,Gt={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ns={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Wn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Tp=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Cp(e,t,r){if(r!=="auto")return r;if(e!=null)return Xa(e,t)?"category":"number"}function QT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QT(Object(r),!0).forEach(function(n){VK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VK(e,t,r){return(t=QK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QK(e){var t=XK(e,"string");return typeof t=="symbol"?t:t+""}function XK(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XT={allowDataOverflow:Ns.allowDataOverflow,allowDecimals:Ns.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Ns.angleAxisId,includeHidden:!1,name:void 0,reversed:Ns.reversed,scale:Ns.scale,tick:Ns.tick,tickCount:void 0,ticks:void 0,type:Ns.type,unit:void 0,niceTicks:"auto"},WT={allowDataOverflow:Wn.allowDataOverflow,allowDecimals:Wn.allowDecimals,allowDuplicatedCategory:Wn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Wn.radiusAxisId,includeHidden:Wn.includeHidden,name:void 0,reversed:Wn.reversed,scale:Wn.scale,tick:Wn.tick,tickCount:Wn.tickCount,ticks:void 0,type:Wn.type,unit:void 0,niceTicks:"auto"},WK=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Zj=Q([WK,j3],(e,t)=>{var r;if(e!=null)return e;var n=(r=Cp(t,"angleAxis",XT.type))!==null&&r!==void 0?r:"category";return jm(jm({},XT),{},{type:n})}),ZK=(e,t)=>e.polarAxis.radiusAxis[t],Jj=Q([ZK,j3],(e,t)=>{var r;if(e!=null)return e;var n=(r=Cp(t,"radiusAxis",WT.type))!==null&&r!==void 0?r:"category";return jm(jm({},WT),{},{type:n})}),Pp=e=>e.polarOptions,ew=Q([Wa,Za,Vt],SK),n4=Q([Pp,ew],(e,t)=>{if(e!=null)return Bn(e.innerRadius,t,0)}),a4=Q([Pp,ew],(e,t)=>{if(e!=null)return Bn(e.outerRadius,t,t*.8)}),JK=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},i4=Q([Pp],JK);Q([Zj,i4],Tp);var s4=Q([ew,n4,a4],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});Q([Jj,s4],Tp);var o4=Q([We,Pp,n4,a4,Wa,Za],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:l,cy:c,startAngle:h,endAngle:f}=t;return{cx:Bn(l,i,i/2),cy:Bn(c,o,o/2),innerRadius:r,outerRadius:n,startAngle:h,endAngle:f,clockWise:!1}}}),Qt=(e,t)=>t,Rp=(e,t,r)=>r;function tw(e){return e==null?void 0:e.id}function l4(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=r,l=new Map;return e.forEach(c=>{var h,f=(h=c.data)!==null&&h!==void 0?h:n;if(!(f==null||f.length===0)){var p=tw(c);f.forEach((g,y)=>{var x=o==null||i?y:String(Ot(g,o,null)),b=Ot(g,c.dataKey,0),w;l.has(x)?w=l.get(x):w={},Object.assign(w,{[p]:b}),l.set(x,w)})}}),Array.from(l.values())}function Mp(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Dp=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function kp(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function eG(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var Xt=e=>{var t=We(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},iu=e=>e.tooltip.settings.axisId;function rw(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function l(){return o.apply(this,arguments)}return l.toString=function(){return o.toString()},l})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var l=i[0],c=i[1];return l<=c?o>=l&&o<=c:o>=c&&o<=l},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,l)=>{var c=e(o);if(c!=null){if(e.bandwidth&&l!==null&&l!==void 0&&l.position){var h=e.bandwidth();switch(l.position){case"middle":c+=h/2;break;case"end":c+=h;break}}return c}}}}}var tG=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!sa(t)){for(var r,n,i=0;i<t.length;i++){var o=t[i];Be(o)&&((r===void 0||o<r)&&(r=o),(n===void 0||o>n)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function Xi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function rG(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function nw(e){let t,r,n;e.length!==2?(t=Xi,r=(c,h)=>Xi(e(c),h),n=(c,h)=>e(c)-h):(t=e===Xi||e===rG?e:nG,r=e,n=e);function i(c,h,f=0,p=c.length){if(f<p){if(t(h,h)!==0)return p;do{const g=f+p>>>1;r(c[g],h)<0?f=g+1:p=g}while(f<p)}return f}function o(c,h,f=0,p=c.length){if(f<p){if(t(h,h)!==0)return p;do{const g=f+p>>>1;r(c[g],h)<=0?f=g+1:p=g}while(f<p)}return f}function l(c,h,f=0,p=c.length){const g=i(c,h,f,p-1);return g>f&&n(c[g-1],h)>-n(c[g],h)?g-1:g}return{left:i,center:l,right:o}}function nG(){return 0}function u4(e){return e===null?NaN:+e}function*aG(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const iG=nw(Xi),_d=iG.right;nw(u4).center;class ZT extends Map{constructor(t,r=lG){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(JT(this,t))}has(t){return super.has(JT(this,t))}set(t,r){return super.set(sG(this,t),r)}delete(t){return super.delete(oG(this,t))}}function JT({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function sG({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function oG({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function lG(e){return e!==null&&typeof e=="object"?e.valueOf():e}function uG(e=Xi){if(e===Xi)return c4;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function c4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const cG=Math.sqrt(50),dG=Math.sqrt(10),fG=Math.sqrt(2);function wm(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),l=o>=cG?10:o>=dG?5:o>=fG?2:1;let c,h,f;return i<0?(f=Math.pow(10,-i)/l,c=Math.round(e*f),h=Math.round(t*f),c/f<e&&++c,h/f>t&&--h,f=-f):(f=Math.pow(10,i)*l,c=Math.round(e/f),h=Math.round(t/f),c*f<e&&++c,h*f>t&&--h),h<c&&.5<=r&&r<2?wm(e,t,r*2):[c,h,f]}function xb(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,o,l]=n?wm(t,e,r):wm(e,t,r);if(!(o>=i))return[];const c=o-i+1,h=new Array(c);if(n)if(l<0)for(let f=0;f<c;++f)h[f]=(o-f)/-l;else for(let f=0;f<c;++f)h[f]=(o-f)*l;else if(l<0)for(let f=0;f<c;++f)h[f]=(i+f)/-l;else for(let f=0;f<c;++f)h[f]=(i+f)*l;return h}function bb(e,t,r){return t=+t,e=+e,r=+r,wm(e,t,r)[2]}function jb(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?bb(t,e,r):bb(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function eC(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function tC(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function d4(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?c4:uG(i);n>r;){if(n-r>600){const h=n-r+1,f=t-r+1,p=Math.log(h),g=.5*Math.exp(2*p/3),y=.5*Math.sqrt(p*g*(h-g)/h)*(f-h/2<0?-1:1),x=Math.max(r,Math.floor(t-f*g/h+y)),b=Math.min(n,Math.floor(t+(h-f)*g/h+y));d4(e,t,x,b,i)}const o=e[t];let l=r,c=n;for(pc(e,r,t),i(e[n],o)>0&&pc(e,r,n);l<c;){for(pc(e,l,c),++l,--c;i(e[l],o)<0;)++l;for(;i(e[c],o)>0;)--c}i(e[r],o)===0?pc(e,r,c):(++c,pc(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function pc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function hG(e,t,r){if(e=Float64Array.from(aG(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return tC(e);if(t>=1)return eC(e);var n,i=(n-1)*t,o=Math.floor(i),l=eC(d4(e,o).subarray(0,o+1)),c=tC(e.subarray(o+1));return l+(c-l)*(i-o)}}function mG(e,t,r=u4){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),l=+r(e[o],o,e),c=+r(e[o+1],o+1,e);return l+(c-l)*(i-o)}}function pG(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}function Tn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ja(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const wb=Symbol("implicit");function aw(){var e=new ZT,t=[],r=[],n=wb;function i(o){let l=e.get(o);if(l===void 0){if(n!==wb)return n;e.set(o,l=t.push(o)-1)}return r[l%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new ZT;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return aw(t,r).unknown(n)},Tn.apply(i,arguments),i}function iw(){var e=aw().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,o,l,c=!1,h=0,f=0,p=.5;delete e.unknown;function g(){var y=t().length,x=i<n,b=x?i:n,w=x?n:i;o=(w-b)/Math.max(1,y-h+f*2),c&&(o=Math.floor(o)),b+=(w-b-o*(y-h))*p,l=o*(1-h),c&&(b=Math.round(b),l=Math.round(l));var N=pG(y).map(function(_){return b+o*_});return r(x?N.reverse():N)}return e.domain=function(y){return arguments.length?(t(y),g()):t()},e.range=function(y){return arguments.length?([n,i]=y,n=+n,i=+i,g()):[n,i]},e.rangeRound=function(y){return[n,i]=y,n=+n,i=+i,c=!0,g()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(y){return arguments.length?(c=!!y,g()):c},e.padding=function(y){return arguments.length?(h=Math.min(1,f=+y),g()):h},e.paddingInner=function(y){return arguments.length?(h=Math.min(1,y),g()):h},e.paddingOuter=function(y){return arguments.length?(f=+y,g()):f},e.align=function(y){return arguments.length?(p=Math.max(0,Math.min(1,y)),g()):p},e.copy=function(){return iw(t(),[n,i]).round(c).paddingInner(h).paddingOuter(f).align(p)},Tn.apply(g(),arguments)}function f4(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return f4(t())},e}function gG(){return f4(iw.apply(null,arguments).paddingInner(1))}function sw(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function h4(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Od(){}var Xc=.7,Sm=1/Xc,Ol="\\s*([+-]?\\d+)\\s*",Wc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yG=/^#([0-9a-f]{3,8})$/,vG=new RegExp(`^rgb\\(${Ol},${Ol},${Ol}\\)$`),xG=new RegExp(`^rgb\\(${oa},${oa},${oa}\\)$`),bG=new RegExp(`^rgba\\(${Ol},${Ol},${Ol},${Wc}\\)$`),jG=new RegExp(`^rgba\\(${oa},${oa},${oa},${Wc}\\)$`),wG=new RegExp(`^hsl\\(${Wc},${oa},${oa}\\)$`),SG=new RegExp(`^hsla\\(${Wc},${oa},${oa},${Wc}\\)$`),rC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};sw(Od,Zc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nC,formatHex:nC,formatHex8:NG,formatHsl:_G,formatRgb:aC,toString:aC});function nC(){return this.rgb().formatHex()}function NG(){return this.rgb().formatHex8()}function _G(){return m4(this).formatHsl()}function aC(){return this.rgb().formatRgb()}function Zc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=yG.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?iC(t):r===3?new qr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?mh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?mh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=vG.exec(e))?new qr(t[1],t[2],t[3],1):(t=xG.exec(e))?new qr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=bG.exec(e))?mh(t[1],t[2],t[3],t[4]):(t=jG.exec(e))?mh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wG.exec(e))?lC(t[1],t[2]/100,t[3]/100,1):(t=SG.exec(e))?lC(t[1],t[2]/100,t[3]/100,t[4]):rC.hasOwnProperty(e)?iC(rC[e]):e==="transparent"?new qr(NaN,NaN,NaN,0):null}function iC(e){return new qr(e>>16&255,e>>8&255,e&255,1)}function mh(e,t,r,n){return n<=0&&(e=t=r=NaN),new qr(e,t,r,n)}function OG(e){return e instanceof Od||(e=Zc(e)),e?(e=e.rgb(),new qr(e.r,e.g,e.b,e.opacity)):new qr}function Sb(e,t,r,n){return arguments.length===1?OG(e):new qr(e,t,r,n??1)}function qr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}sw(qr,Sb,h4(Od,{brighter(e){return e=e==null?Sm:Math.pow(Sm,e),new qr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Xc:Math.pow(Xc,e),new qr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qr(Js(this.r),Js(this.g),Js(this.b),Nm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:sC,formatHex:sC,formatHex8:EG,formatRgb:oC,toString:oC}));function sC(){return`#${ks(this.r)}${ks(this.g)}${ks(this.b)}`}function EG(){return`#${ks(this.r)}${ks(this.g)}${ks(this.b)}${ks((isNaN(this.opacity)?1:this.opacity)*255)}`}function oC(){const e=Nm(this.opacity);return`${e===1?"rgb(":"rgba("}${Js(this.r)}, ${Js(this.g)}, ${Js(this.b)}${e===1?")":`, ${e})`}`}function Nm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Js(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ks(e){return e=Js(e),(e<16?"0":"")+e.toString(16)}function lC(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new In(e,t,r,n)}function m4(e){if(e instanceof In)return new In(e.h,e.s,e.l,e.opacity);if(e instanceof Od||(e=Zc(e)),!e)return new In;if(e instanceof In)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),l=NaN,c=o-i,h=(o+i)/2;return c?(t===o?l=(r-n)/c+(r<n)*6:r===o?l=(n-t)/c+2:l=(t-r)/c+4,c/=h<.5?o+i:2-o-i,l*=60):c=h>0&&h<1?0:l,new In(l,c,h,e.opacity)}function AG(e,t,r,n){return arguments.length===1?m4(e):new In(e,t,r,n??1)}function In(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}sw(In,AG,h4(Od,{brighter(e){return e=e==null?Sm:Math.pow(Sm,e),new In(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Xc:Math.pow(Xc,e),new In(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new qr(Y0(e>=240?e-240:e+120,i,n),Y0(e,i,n),Y0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new In(uC(this.h),ph(this.s),ph(this.l),Nm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Nm(this.opacity);return`${e===1?"hsl(":"hsla("}${uC(this.h)}, ${ph(this.s)*100}%, ${ph(this.l)*100}%${e===1?")":`, ${e})`}`}}));function uC(e){return e=(e||0)%360,e<0?e+360:e}function ph(e){return Math.max(0,Math.min(1,e||0))}function Y0(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ow=e=>()=>e;function TG(e,t){return function(r){return e+r*t}}function CG(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function PG(e){return(e=+e)==1?p4:function(t,r){return r-t?CG(t,r,e):ow(isNaN(t)?r:t)}}function p4(e,t){var r=t-e;return r?TG(e,r):ow(isNaN(e)?t:e)}const cC=(function e(t){var r=PG(t);function n(i,o){var l=r((i=Sb(i)).r,(o=Sb(o)).r),c=r(i.g,o.g),h=r(i.b,o.b),f=p4(i.opacity,o.opacity);return function(p){return i.r=l(p),i.g=c(p),i.b=h(p),i.opacity=f(p),i+""}}return n.gamma=e,n})(1);function RG(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function MG(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function DG(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),l;for(l=0;l<n;++l)i[l]=su(e[l],t[l]);for(;l<r;++l)o[l]=t[l];return function(c){for(l=0;l<n;++l)o[l]=i[l](c);return o}}function kG(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function _m(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function LG(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=su(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var Nb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,V0=new RegExp(Nb.source,"g");function $G(e){return function(){return e}}function IG(e){return function(t){return e(t)+""}}function zG(e,t){var r=Nb.lastIndex=V0.lastIndex=0,n,i,o,l=-1,c=[],h=[];for(e=e+"",t=t+"";(n=Nb.exec(e))&&(i=V0.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),c[l]?c[l]+=o:c[++l]=o),(n=n[0])===(i=i[0])?c[l]?c[l]+=i:c[++l]=i:(c[++l]=null,h.push({i:l,x:_m(n,i)})),r=V0.lastIndex;return r<t.length&&(o=t.slice(r),c[l]?c[l]+=o:c[++l]=o),c.length<2?h[0]?IG(h[0].x):$G(t):(t=h.length,function(f){for(var p=0,g;p<t;++p)c[(g=h[p]).i]=g.x(f);return c.join("")})}function su(e,t){var r=typeof t,n;return t==null||r==="boolean"?ow(t):(r==="number"?_m:r==="string"?(n=Zc(t))?(t=n,cC):zG:t instanceof Zc?cC:t instanceof Date?kG:MG(t)?RG:Array.isArray(t)?DG:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?LG:_m)(e,t)}function lw(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function BG(e,t){t===void 0&&(t=e,e=su);for(var r=0,n=t.length-1,i=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(i,i=t[++r]);return function(l){var c=Math.max(0,Math.min(n-1,Math.floor(l*=n)));return o[c](l-c)}}function UG(e){return function(){return e}}function Om(e){return+e}var dC=[0,1];function _r(e){return e}function _b(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:UG(isNaN(t)?NaN:.5)}function qG(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function FG(e,t,r){var n=e[0],i=e[1],o=t[0],l=t[1];return i<n?(n=_b(i,n),o=r(l,o)):(n=_b(n,i),o=r(o,l)),function(c){return o(n(c))}}function HG(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),l=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<n;)i[l]=_b(e[l],e[l+1]),o[l]=r(t[l],t[l+1]);return function(c){var h=_d(e,c,1,n)-1;return o[h](i[h](c))}}function Ed(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Lp(){var e=dC,t=dC,r=su,n,i,o,l=_r,c,h,f;function p(){var y=Math.min(e.length,t.length);return l!==_r&&(l=qG(e[0],e[y-1])),c=y>2?HG:FG,h=f=null,g}function g(y){return y==null||isNaN(y=+y)?o:(h||(h=c(e.map(n),t,r)))(n(l(y)))}return g.invert=function(y){return l(i((f||(f=c(t,e.map(n),_m)))(y)))},g.domain=function(y){return arguments.length?(e=Array.from(y,Om),p()):e.slice()},g.range=function(y){return arguments.length?(t=Array.from(y),p()):t.slice()},g.rangeRound=function(y){return t=Array.from(y),r=lw,p()},g.clamp=function(y){return arguments.length?(l=y?!0:_r,p()):l!==_r},g.interpolate=function(y){return arguments.length?(r=y,p()):r},g.unknown=function(y){return arguments.length?(o=y,g):o},function(y,x){return n=y,i=x,p()}}function uw(){return Lp()(_r,_r)}function KG(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Em(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Ql(e){return e=Em(Math.abs(e)),e?e[1]:NaN}function GG(e,t){return function(r,n){for(var i=r.length,o=[],l=0,c=e[0],h=0;i>0&&c>0&&(h+c+1>n&&(c=Math.max(1,n-h)),o.push(r.substring(i-=c,i+c)),!((h+=c+1)>n));)c=e[l=(l+1)%e.length];return o.reverse().join(t)}}function YG(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var VG=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Jc(e){if(!(t=VG.exec(e)))throw new Error("invalid format: "+e);var t;return new cw({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Jc.prototype=cw.prototype;function cw(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}cw.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function QG(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Am;function XG(e,t){var r=Em(e,t);if(!r)return Am=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(Am=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=n.length;return o===l?n:o>l?n+new Array(o-l+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Em(e,Math.max(0,t+o-1))[0]}function fC(e,t){var r=Em(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const hC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:KG,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>fC(e*100,t),r:fC,s:XG,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function mC(e){return e}var pC=Array.prototype.map,gC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function WG(e){var t=e.grouping===void 0||e.thousands===void 0?mC:GG(pC.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?mC:YG(pC.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",h=e.nan===void 0?"NaN":e.nan+"";function f(g,y){g=Jc(g);var x=g.fill,b=g.align,w=g.sign,N=g.symbol,_=g.zero,E=g.width,T=g.comma,A=g.precision,C=g.trim,R=g.type;R==="n"?(T=!0,R="g"):hC[R]||(A===void 0&&(A=12),C=!0,R="g"),(_||x==="0"&&b==="=")&&(_=!0,x="0",b="=");var D=(y&&y.prefix!==void 0?y.prefix:"")+(N==="$"?r:N==="#"&&/[boxX]/.test(R)?"0"+R.toLowerCase():""),M=(N==="$"?n:/[%p]/.test(R)?l:"")+(y&&y.suffix!==void 0?y.suffix:""),z=hC[R],k=/[defgprs%]/.test(R);A=A===void 0?6:/[gprs]/.test(R)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function H(U){var ae=D,Z=M,G,L,F;if(R==="c")Z=z(U)+Z,U="";else{U=+U;var J=U<0||1/U<0;if(U=isNaN(U)?h:z(Math.abs(U),A),C&&(U=QG(U)),J&&+U==0&&w!=="+"&&(J=!1),ae=(J?w==="("?w:c:w==="-"||w==="("?"":w)+ae,Z=(R==="s"&&!isNaN(U)&&Am!==void 0?gC[8+Am/3]:"")+Z+(J&&w==="("?")":""),k){for(G=-1,L=U.length;++G<L;)if(F=U.charCodeAt(G),48>F||F>57){Z=(F===46?i+U.slice(G+1):U.slice(G))+Z,U=U.slice(0,G);break}}}T&&!_&&(U=t(U,1/0));var re=ae.length+U.length+Z.length,oe=re<E?new Array(E-re+1).join(x):"";switch(T&&_&&(U=t(oe+U,oe.length?E-Z.length:1/0),oe=""),b){case"<":U=ae+U+Z+oe;break;case"=":U=ae+oe+U+Z;break;case"^":U=oe.slice(0,re=oe.length>>1)+ae+U+Z+oe.slice(re);break;default:U=oe+ae+U+Z;break}return o(U)}return H.toString=function(){return g+""},H}function p(g,y){var x=Math.max(-8,Math.min(8,Math.floor(Ql(y)/3)))*3,b=Math.pow(10,-x),w=f((g=Jc(g),g.type="f",g),{suffix:gC[8+x/3]});return function(N){return w(b*N)}}return{format:f,formatPrefix:p}}var gh,dw,g4;ZG({thousands:",",grouping:[3],currency:["$",""]});function ZG(e){return gh=WG(e),dw=gh.format,g4=gh.formatPrefix,gh}function JG(e){return Math.max(0,-Ql(Math.abs(e)))}function eY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ql(t)/3)))*3-Ql(Math.abs(e)))}function tY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ql(t)-Ql(e))+1}function y4(e,t,r,n){var i=jb(e,t,r),o;switch(n=Jc(n??",f"),n.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=eY(i,l))&&(n.precision=o),g4(n,l)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=tY(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=JG(i))&&(n.precision=o-(n.type==="%")*2);break}}return dw(n)}function ns(e){var t=e.domain;return e.ticks=function(r){var n=t();return xb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return y4(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,l=n[i],c=n[o],h,f,p=10;for(c<l&&(f=l,l=c,c=f,f=i,i=o,o=f);p-- >0;){if(f=bb(l,c,r),f===h)return n[i]=l,n[o]=c,t(n);if(f>0)l=Math.floor(l/f)*f,c=Math.ceil(c/f)*f;else if(f<0)l=Math.ceil(l*f)/f,c=Math.floor(c*f)/f;else break;h=f}return e},e}function v4(){var e=uw();return e.copy=function(){return Ed(e,v4())},Tn.apply(e,arguments),ns(e)}function x4(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Om),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return x4(e).unknown(t)},e=arguments.length?Array.from(e,Om):[0,1],ns(r)}function b4(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],l;return o<i&&(l=r,r=n,n=l,l=i,i=o,o=l),e[r]=t.floor(i),e[n]=t.ceil(o),e}function yC(e){return Math.log(e)}function vC(e){return Math.exp(e)}function rY(e){return-Math.log(-e)}function nY(e){return-Math.exp(-e)}function aY(e){return isFinite(e)?+("1e"+e):e<0?0:e}function iY(e){return e===10?aY:e===Math.E?Math.exp:t=>Math.pow(e,t)}function sY(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function xC(e){return(t,r)=>-e(-t,r)}function fw(e){const t=e(yC,vC),r=t.domain;let n=10,i,o;function l(){return i=sY(n),o=iY(n),r()[0]<0?(i=xC(i),o=xC(o),e(rY,nY)):e(yC,vC),t}return t.base=function(c){return arguments.length?(n=+c,l()):n},t.domain=function(c){return arguments.length?(r(c),l()):r()},t.ticks=c=>{const h=r();let f=h[0],p=h[h.length-1];const g=p<f;g&&([f,p]=[p,f]);let y=i(f),x=i(p),b,w;const N=c==null?10:+c;let _=[];if(!(n%1)&&x-y<N){if(y=Math.floor(y),x=Math.ceil(x),f>0){for(;y<=x;++y)for(b=1;b<n;++b)if(w=y<0?b/o(-y):b*o(y),!(w<f)){if(w>p)break;_.push(w)}}else for(;y<=x;++y)for(b=n-1;b>=1;--b)if(w=y>0?b/o(-y):b*o(y),!(w<f)){if(w>p)break;_.push(w)}_.length*2<N&&(_=xb(f,p,N))}else _=xb(y,x,Math.min(x-y,N)).map(o);return g?_.reverse():_},t.tickFormat=(c,h)=>{if(c==null&&(c=10),h==null&&(h=n===10?"s":","),typeof h!="function"&&(!(n%1)&&(h=Jc(h)).precision==null&&(h.trim=!0),h=dw(h)),c===1/0)return h;const f=Math.max(1,n*c/t.ticks().length);return p=>{let g=p/o(Math.round(i(p)));return g*n<n-.5&&(g*=n),g<=f?h(p):""}},t.nice=()=>r(b4(r(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),t}function j4(){const e=fw(Lp()).domain([1,10]);return e.copy=()=>Ed(e,j4()).base(e.base()),Tn.apply(e,arguments),e}function bC(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function jC(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function hw(e){var t=1,r=e(bC(t),jC(t));return r.constant=function(n){return arguments.length?e(bC(t=+n),jC(t)):t},ns(r)}function w4(){var e=hw(Lp());return e.copy=function(){return Ed(e,w4()).constant(e.constant())},Tn.apply(e,arguments)}function wC(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lY(e){return e<0?-e*e:e*e}function mw(e){var t=e(_r,_r),r=1;function n(){return r===1?e(_r,_r):r===.5?e(oY,lY):e(wC(r),wC(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ns(t)}function pw(){var e=mw(Lp());return e.copy=function(){return Ed(e,pw()).exponent(e.exponent())},Tn.apply(e,arguments),e}function uY(){return pw.apply(null,arguments).exponent(.5)}function SC(e){return Math.sign(e)*e*e}function cY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function S4(){var e=uw(),t=[0,1],r=!1,n;function i(o){var l=cY(e(o));return isNaN(l)?n:r?Math.round(l):l}return i.invert=function(o){return e.invert(SC(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Om)).map(SC)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return S4(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Tn.apply(i,arguments),ns(i)}function N4(){var e=[],t=[],r=[],n;function i(){var l=0,c=Math.max(1,t.length);for(r=new Array(c-1);++l<c;)r[l-1]=mG(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?n:t[_d(r,l)]}return o.invertExtent=function(l){var c=t.indexOf(l);return c<0?[NaN,NaN]:[c>0?r[c-1]:e[0],c<r.length?r[c]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let c of l)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(Xi),i()},o.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},o.unknown=function(l){return arguments.length?(n=l,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return N4().domain(e).range(t).unknown(n)},Tn.apply(o,arguments)}function _4(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function l(h){return h!=null&&h<=h?i[_d(n,h,0,r)]:o}function c(){var h=-1;for(n=new Array(r);++h<r;)n[h]=((h+1)*t-(h-r)*e)/(r+1);return l}return l.domain=function(h){return arguments.length?([e,t]=h,e=+e,t=+t,c()):[e,t]},l.range=function(h){return arguments.length?(r=(i=Array.from(h)).length-1,c()):i.slice()},l.invertExtent=function(h){var f=i.indexOf(h);return f<0?[NaN,NaN]:f<1?[e,n[0]]:f>=r?[n[r-1],t]:[n[f-1],n[f]]},l.unknown=function(h){return arguments.length&&(o=h),l},l.thresholds=function(){return n.slice()},l.copy=function(){return _4().domain([e,t]).range(i).unknown(o)},Tn.apply(ns(l),arguments)}function O4(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[_d(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return O4().domain(e).range(t).unknown(r)},Tn.apply(i,arguments)}const Q0=new Date,X0=new Date;function Bt(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const l=i(o),c=i.ceil(o);return o-l<c-o?l:c},i.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),i.range=(o,l,c)=>{const h=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o<l)||!(c>0))return h;let f;do h.push(f=new Date(+o)),t(o,c),e(o);while(f<o&&o<l);return h},i.filter=o=>Bt(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,c)=>{if(l>=l)if(c<0)for(;++c<=0;)for(;t(l,-1),!o(l););else for(;--c>=0;)for(;t(l,1),!o(l););}),r&&(i.count=(o,l)=>(Q0.setTime(+o),X0.setTime(+l),e(Q0),e(X0),Math.floor(r(Q0,X0))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?l=>n(l)%o===0:l=>i.count(0,l)%o===0):i)),i}const Tm=Bt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Tm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Bt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Tm);Tm.range;const Ba=1e3,En=Ba*60,Ua=En*60,Ya=Ua*24,gw=Ya*7,NC=Ya*30,W0=Ya*365,Ls=Bt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ba)},(e,t)=>(t-e)/Ba,e=>e.getUTCSeconds());Ls.range;const yw=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ba)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getMinutes());yw.range;const vw=Bt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getUTCMinutes());vw.range;const xw=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ba-e.getMinutes()*En)},(e,t)=>{e.setTime(+e+t*Ua)},(e,t)=>(t-e)/Ua,e=>e.getHours());xw.range;const bw=Bt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ua)},(e,t)=>(t-e)/Ua,e=>e.getUTCHours());bw.range;const Ad=Bt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*En)/Ya,e=>e.getDate()-1);Ad.range;const $p=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ya,e=>e.getUTCDate()-1);$p.range;const E4=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ya,e=>Math.floor(e/Ya));E4.range;function vo(e){return Bt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*En)/gw)}const Ip=vo(0),Cm=vo(1),dY=vo(2),fY=vo(3),Xl=vo(4),hY=vo(5),mY=vo(6);Ip.range;Cm.range;dY.range;fY.range;Xl.range;hY.range;mY.range;function xo(e){return Bt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/gw)}const zp=xo(0),Pm=xo(1),pY=xo(2),gY=xo(3),Wl=xo(4),yY=xo(5),vY=xo(6);zp.range;Pm.range;pY.range;gY.range;Wl.range;yY.range;vY.range;const jw=Bt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());jw.range;const ww=Bt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());ww.range;const Va=Bt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Va.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Va.range;const Qa=Bt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Qa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Qa.range;function A4(e,t,r,n,i,o){const l=[[Ls,1,Ba],[Ls,5,5*Ba],[Ls,15,15*Ba],[Ls,30,30*Ba],[o,1,En],[o,5,5*En],[o,15,15*En],[o,30,30*En],[i,1,Ua],[i,3,3*Ua],[i,6,6*Ua],[i,12,12*Ua],[n,1,Ya],[n,2,2*Ya],[r,1,gw],[t,1,NC],[t,3,3*NC],[e,1,W0]];function c(f,p,g){const y=p<f;y&&([f,p]=[p,f]);const x=g&&typeof g.range=="function"?g:h(f,p,g),b=x?x.range(f,+p+1):[];return y?b.reverse():b}function h(f,p,g){const y=Math.abs(p-f)/g,x=nw(([,,N])=>N).right(l,y);if(x===l.length)return e.every(jb(f/W0,p/W0,g));if(x===0)return Tm.every(Math.max(jb(f,p,g),1));const[b,w]=l[y/l[x-1][2]<l[x][2]/y?x-1:x];return b.every(w)}return[c,h]}const[xY,bY]=A4(Qa,ww,zp,E4,bw,vw),[jY,wY]=A4(Va,jw,Ip,Ad,xw,yw);function Z0(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function J0(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function gc(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function SY(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,l=e.shortDays,c=e.months,h=e.shortMonths,f=yc(i),p=vc(i),g=yc(o),y=vc(o),x=yc(l),b=vc(l),w=yc(c),N=vc(c),_=yc(h),E=vc(h),T={a:F,A:J,b:re,B:oe,c:null,d:CC,e:CC,f:GY,g:rV,G:aV,H:FY,I:HY,j:KY,L:T4,m:YY,M:VY,p:$,q:X,Q:MC,s:DC,S:QY,u:XY,U:WY,V:ZY,w:JY,W:eV,x:null,X:null,y:tV,Y:nV,Z:iV,"%":RC},A={a:le,A:ue,b:pe,B:xe,c:null,d:PC,e:PC,f:uV,g:xV,G:jV,H:sV,I:oV,j:lV,L:P4,m:cV,M:dV,p:we,q:_e,Q:MC,s:DC,S:fV,u:hV,U:mV,V:pV,w:gV,W:yV,x:null,X:null,y:vV,Y:bV,Z:wV,"%":RC},C={a:k,A:H,b:U,B:ae,c:Z,d:AC,e:AC,f:zY,g:EC,G:OC,H:TC,I:TC,j:kY,L:IY,m:DY,M:LY,p:z,q:MY,Q:UY,s:qY,S:$Y,u:AY,U:TY,V:CY,w:EY,W:PY,x:G,X:L,y:EC,Y:OC,Z:RY,"%":BY};T.x=R(r,T),T.X=R(n,T),T.c=R(t,T),A.x=R(r,A),A.X=R(n,A),A.c=R(t,A);function R(de,te){return function(je){var ce=[],Et=-1,Me=0,At=de.length,Tt,hr,ma;for(je instanceof Date||(je=new Date(+je));++Et<At;)de.charCodeAt(Et)===37&&(ce.push(de.slice(Me,Et)),(hr=_C[Tt=de.charAt(++Et)])!=null?Tt=de.charAt(++Et):hr=Tt==="e"?" ":"0",(ma=te[Tt])&&(Tt=ma(je,hr)),ce.push(Tt),Me=Et+1);return ce.push(de.slice(Me,Et)),ce.join("")}}function D(de,te){return function(je){var ce=gc(1900,void 0,1),Et=M(ce,de,je+="",0),Me,At;if(Et!=je.length)return null;if("Q"in ce)return new Date(ce.Q);if("s"in ce)return new Date(ce.s*1e3+("L"in ce?ce.L:0));if(te&&!("Z"in ce)&&(ce.Z=0),"p"in ce&&(ce.H=ce.H%12+ce.p*12),ce.m===void 0&&(ce.m="q"in ce?ce.q:0),"V"in ce){if(ce.V<1||ce.V>53)return null;"w"in ce||(ce.w=1),"Z"in ce?(Me=J0(gc(ce.y,0,1)),At=Me.getUTCDay(),Me=At>4||At===0?Pm.ceil(Me):Pm(Me),Me=$p.offset(Me,(ce.V-1)*7),ce.y=Me.getUTCFullYear(),ce.m=Me.getUTCMonth(),ce.d=Me.getUTCDate()+(ce.w+6)%7):(Me=Z0(gc(ce.y,0,1)),At=Me.getDay(),Me=At>4||At===0?Cm.ceil(Me):Cm(Me),Me=Ad.offset(Me,(ce.V-1)*7),ce.y=Me.getFullYear(),ce.m=Me.getMonth(),ce.d=Me.getDate()+(ce.w+6)%7)}else("W"in ce||"U"in ce)&&("w"in ce||(ce.w="u"in ce?ce.u%7:"W"in ce?1:0),At="Z"in ce?J0(gc(ce.y,0,1)).getUTCDay():Z0(gc(ce.y,0,1)).getDay(),ce.m=0,ce.d="W"in ce?(ce.w+6)%7+ce.W*7-(At+5)%7:ce.w+ce.U*7-(At+6)%7);return"Z"in ce?(ce.H+=ce.Z/100|0,ce.M+=ce.Z%100,J0(ce)):Z0(ce)}}function M(de,te,je,ce){for(var Et=0,Me=te.length,At=je.length,Tt,hr;Et<Me;){if(ce>=At)return-1;if(Tt=te.charCodeAt(Et++),Tt===37){if(Tt=te.charAt(Et++),hr=C[Tt in _C?te.charAt(Et++):Tt],!hr||(ce=hr(de,je,ce))<0)return-1}else if(Tt!=je.charCodeAt(ce++))return-1}return ce}function z(de,te,je){var ce=f.exec(te.slice(je));return ce?(de.p=p.get(ce[0].toLowerCase()),je+ce[0].length):-1}function k(de,te,je){var ce=x.exec(te.slice(je));return ce?(de.w=b.get(ce[0].toLowerCase()),je+ce[0].length):-1}function H(de,te,je){var ce=g.exec(te.slice(je));return ce?(de.w=y.get(ce[0].toLowerCase()),je+ce[0].length):-1}function U(de,te,je){var ce=_.exec(te.slice(je));return ce?(de.m=E.get(ce[0].toLowerCase()),je+ce[0].length):-1}function ae(de,te,je){var ce=w.exec(te.slice(je));return ce?(de.m=N.get(ce[0].toLowerCase()),je+ce[0].length):-1}function Z(de,te,je){return M(de,t,te,je)}function G(de,te,je){return M(de,r,te,je)}function L(de,te,je){return M(de,n,te,je)}function F(de){return l[de.getDay()]}function J(de){return o[de.getDay()]}function re(de){return h[de.getMonth()]}function oe(de){return c[de.getMonth()]}function $(de){return i[+(de.getHours()>=12)]}function X(de){return 1+~~(de.getMonth()/3)}function le(de){return l[de.getUTCDay()]}function ue(de){return o[de.getUTCDay()]}function pe(de){return h[de.getUTCMonth()]}function xe(de){return c[de.getUTCMonth()]}function we(de){return i[+(de.getUTCHours()>=12)]}function _e(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var te=R(de+="",T);return te.toString=function(){return de},te},parse:function(de){var te=D(de+="",!1);return te.toString=function(){return de},te},utcFormat:function(de){var te=R(de+="",A);return te.toString=function(){return de},te},utcParse:function(de){var te=D(de+="",!0);return te.toString=function(){return de},te}}}var _C={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,NY=/^%/,_Y=/[\\^$*+?|[\]().{}]/g;function Ke(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function OY(e){return e.replace(_Y,"\\$&")}function yc(e){return new RegExp("^(?:"+e.map(OY).join("|")+")","i")}function vc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function EY(e,t,r){var n=Wt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function AY(e,t,r){var n=Wt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function TY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function CY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function PY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function OC(e,t,r){var n=Wt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function EC(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function RY(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function MY(e,t,r){var n=Wt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function DY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function AC(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function kY(e,t,r){var n=Wt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function TC(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function LY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function $Y(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function IY(e,t,r){var n=Wt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function zY(e,t,r){var n=Wt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function BY(e,t,r){var n=NY.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function UY(e,t,r){var n=Wt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function qY(e,t,r){var n=Wt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function CC(e,t){return Ke(e.getDate(),t,2)}function FY(e,t){return Ke(e.getHours(),t,2)}function HY(e,t){return Ke(e.getHours()%12||12,t,2)}function KY(e,t){return Ke(1+Ad.count(Va(e),e),t,3)}function T4(e,t){return Ke(e.getMilliseconds(),t,3)}function GY(e,t){return T4(e,t)+"000"}function YY(e,t){return Ke(e.getMonth()+1,t,2)}function VY(e,t){return Ke(e.getMinutes(),t,2)}function QY(e,t){return Ke(e.getSeconds(),t,2)}function XY(e){var t=e.getDay();return t===0?7:t}function WY(e,t){return Ke(Ip.count(Va(e)-1,e),t,2)}function C4(e){var t=e.getDay();return t>=4||t===0?Xl(e):Xl.ceil(e)}function ZY(e,t){return e=C4(e),Ke(Xl.count(Va(e),e)+(Va(e).getDay()===4),t,2)}function JY(e){return e.getDay()}function eV(e,t){return Ke(Cm.count(Va(e)-1,e),t,2)}function tV(e,t){return Ke(e.getFullYear()%100,t,2)}function rV(e,t){return e=C4(e),Ke(e.getFullYear()%100,t,2)}function nV(e,t){return Ke(e.getFullYear()%1e4,t,4)}function aV(e,t){var r=e.getDay();return e=r>=4||r===0?Xl(e):Xl.ceil(e),Ke(e.getFullYear()%1e4,t,4)}function iV(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ke(t/60|0,"0",2)+Ke(t%60,"0",2)}function PC(e,t){return Ke(e.getUTCDate(),t,2)}function sV(e,t){return Ke(e.getUTCHours(),t,2)}function oV(e,t){return Ke(e.getUTCHours()%12||12,t,2)}function lV(e,t){return Ke(1+$p.count(Qa(e),e),t,3)}function P4(e,t){return Ke(e.getUTCMilliseconds(),t,3)}function uV(e,t){return P4(e,t)+"000"}function cV(e,t){return Ke(e.getUTCMonth()+1,t,2)}function dV(e,t){return Ke(e.getUTCMinutes(),t,2)}function fV(e,t){return Ke(e.getUTCSeconds(),t,2)}function hV(e){var t=e.getUTCDay();return t===0?7:t}function mV(e,t){return Ke(zp.count(Qa(e)-1,e),t,2)}function R4(e){var t=e.getUTCDay();return t>=4||t===0?Wl(e):Wl.ceil(e)}function pV(e,t){return e=R4(e),Ke(Wl.count(Qa(e),e)+(Qa(e).getUTCDay()===4),t,2)}function gV(e){return e.getUTCDay()}function yV(e,t){return Ke(Pm.count(Qa(e)-1,e),t,2)}function vV(e,t){return Ke(e.getUTCFullYear()%100,t,2)}function xV(e,t){return e=R4(e),Ke(e.getUTCFullYear()%100,t,2)}function bV(e,t){return Ke(e.getUTCFullYear()%1e4,t,4)}function jV(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Wl(e):Wl.ceil(e),Ke(e.getUTCFullYear()%1e4,t,4)}function wV(){return"+0000"}function RC(){return"%"}function MC(e){return+e}function DC(e){return Math.floor(+e/1e3)}var fl,M4,D4;SV({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function SV(e){return fl=SY(e),M4=fl.format,fl.parse,D4=fl.utcFormat,fl.utcParse,fl}function NV(e){return new Date(e)}function _V(e){return e instanceof Date?+e:+new Date(+e)}function Sw(e,t,r,n,i,o,l,c,h,f){var p=uw(),g=p.invert,y=p.domain,x=f(".%L"),b=f(":%S"),w=f("%I:%M"),N=f("%I %p"),_=f("%a %d"),E=f("%b %d"),T=f("%B"),A=f("%Y");function C(R){return(h(R)<R?x:c(R)<R?b:l(R)<R?w:o(R)<R?N:n(R)<R?i(R)<R?_:E:r(R)<R?T:A)(R)}return p.invert=function(R){return new Date(g(R))},p.domain=function(R){return arguments.length?y(Array.from(R,_V)):y().map(NV)},p.ticks=function(R){var D=y();return e(D[0],D[D.length-1],R??10)},p.tickFormat=function(R,D){return D==null?C:f(D)},p.nice=function(R){var D=y();return(!R||typeof R.range!="function")&&(R=t(D[0],D[D.length-1],R??10)),R?y(b4(D,R)):p},p.copy=function(){return Ed(p,Sw(e,t,r,n,i,o,l,c,h,f))},p}function OV(){return Tn.apply(Sw(jY,wY,Va,jw,Ip,Ad,xw,yw,Ls,M4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function EV(){return Tn.apply(Sw(xY,bY,Qa,ww,zp,$p,bw,vw,Ls,D4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Bp(){var e=0,t=1,r,n,i,o,l=_r,c=!1,h;function f(g){return g==null||isNaN(g=+g)?h:l(i===0?.5:(g=(o(g)-r)*i,c?Math.max(0,Math.min(1,g)):g))}f.domain=function(g){return arguments.length?([e,t]=g,r=o(e=+e),n=o(t=+t),i=r===n?0:1/(n-r),f):[e,t]},f.clamp=function(g){return arguments.length?(c=!!g,f):c},f.interpolator=function(g){return arguments.length?(l=g,f):l};function p(g){return function(y){var x,b;return arguments.length?([x,b]=y,l=g(x,b),f):[l(0),l(1)]}}return f.range=p(su),f.rangeRound=p(lw),f.unknown=function(g){return arguments.length?(h=g,f):h},function(g){return o=g,r=g(e),n=g(t),i=r===n?0:1/(n-r),f}}function as(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function k4(){var e=ns(Bp()(_r));return e.copy=function(){return as(e,k4())},Ja.apply(e,arguments)}function L4(){var e=fw(Bp()).domain([1,10]);return e.copy=function(){return as(e,L4()).base(e.base())},Ja.apply(e,arguments)}function $4(){var e=hw(Bp());return e.copy=function(){return as(e,$4()).constant(e.constant())},Ja.apply(e,arguments)}function Nw(){var e=mw(Bp());return e.copy=function(){return as(e,Nw()).exponent(e.exponent())},Ja.apply(e,arguments)}function AV(){return Nw.apply(null,arguments).exponent(.5)}function I4(){var e=[],t=_r;function r(n){if(n!=null&&!isNaN(n=+n))return t((_d(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Xi),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>hG(e,o/n))},r.copy=function(){return I4(t).domain(e)},Ja.apply(r,arguments)}function Up(){var e=0,t=.5,r=1,n=1,i,o,l,c,h,f=_r,p,g=!1,y;function x(w){return isNaN(w=+w)?y:(w=.5+((w=+p(w))-o)*(n*w<n*o?c:h),f(g?Math.max(0,Math.min(1,w)):w))}x.domain=function(w){return arguments.length?([e,t,r]=w,i=p(e=+e),o=p(t=+t),l=p(r=+r),c=i===o?0:.5/(o-i),h=o===l?0:.5/(l-o),n=o<i?-1:1,x):[e,t,r]},x.clamp=function(w){return arguments.length?(g=!!w,x):g},x.interpolator=function(w){return arguments.length?(f=w,x):f};function b(w){return function(N){var _,E,T;return arguments.length?([_,E,T]=N,f=BG(w,[_,E,T]),x):[f(0),f(.5),f(1)]}}return x.range=b(su),x.rangeRound=b(lw),x.unknown=function(w){return arguments.length?(y=w,x):y},function(w){return p=w,i=w(e),o=w(t),l=w(r),c=i===o?0:.5/(o-i),h=o===l?0:.5/(l-o),n=o<i?-1:1,x}}function z4(){var e=ns(Up()(_r));return e.copy=function(){return as(e,z4())},Ja.apply(e,arguments)}function B4(){var e=fw(Up()).domain([.1,1,10]);return e.copy=function(){return as(e,B4()).base(e.base())},Ja.apply(e,arguments)}function U4(){var e=hw(Up());return e.copy=function(){return as(e,U4()).constant(e.constant())},Ja.apply(e,arguments)}function _w(){var e=mw(Up());return e.copy=function(){return as(e,_w()).exponent(e.exponent())},Ja.apply(e,arguments)}function TV(){return _w.apply(null,arguments).exponent(.5)}const q4=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:iw,scaleDiverging:z4,scaleDivergingLog:B4,scaleDivergingPow:_w,scaleDivergingSqrt:TV,scaleDivergingSymlog:U4,scaleIdentity:x4,scaleImplicit:wb,scaleLinear:v4,scaleLog:j4,scaleOrdinal:aw,scalePoint:gG,scalePow:pw,scaleQuantile:N4,scaleQuantize:_4,scaleRadial:S4,scaleSequential:k4,scaleSequentialLog:L4,scaleSequentialPow:Nw,scaleSequentialQuantile:I4,scaleSequentialSqrt:AV,scaleSequentialSymlog:$4,scaleSqrt:uY,scaleSymlog:w4,scaleThreshold:O4,scaleTime:OV,scaleUtc:EV,tickFormat:y4},Symbol.toStringTag,{value:"Module"}));function CV(e){var t=q4;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(yd(e));if(r in t&&typeof t[r]=="function")return t[r]()}function kC(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=CV(e);if(n!=null)return n.domain(t).range(r),n}}function Ow(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?kC(e.scale,r,n):kC(t,r,n)}function PV(e){return"scale".concat(yd(e))}function RV(e){return PV(e)in q4}var F4=(e,t,r)=>{if(e!=null){var{scale:n,type:i}=e;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return RV(n)?n:"point"}};function MV(e,t){for(var r=0,n=e.length,i=e[0]<e[e.length-1];r<n;){var o=Math.floor((r+n)/2);(i?e[o]<t:e[o]>t)?r=o+1:n=o}return r}function H4(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var l;return(l=e(o))!==null&&l!==void 0?l:0}),i=e.range();if(!(r.length===0||i.length<2))return o=>{var l,c,h=MV(n,o);if(h<=0)return r[0];if(h>=r.length)return r[r.length-1];var f=(l=n[h-1])!==null&&l!==void 0?l:0,p=(c=n[h])!==null&&c!==void 0?c:0;return Math.abs(o-f)<=Math.abs(o-p)?r[h-1]:r[h]}}}function DV(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):H4(e,void 0)}function LC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LC(Object(r),!0).forEach(function(n){kV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kV(e,t,r){return(t=LV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LV(e){var t=$V(e,"string");return typeof t=="symbol"?t:t+""}function $V(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ob=[0,"auto"],Lt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},K4=(e,t)=>e.cartesianAxis.xAxis[t],ei=(e,t)=>{var r=K4(e,t);return r??Lt},$t={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Ob,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:bd},G4=(e,t)=>e.cartesianAxis.yAxis[t],ti=(e,t)=>{var r=G4(e,t);return r??$t},IV={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},Ew=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??IV},Tr=(e,t,r)=>{switch(t){case"xAxis":return ei(e,r);case"yAxis":return ti(e,r);case"zAxis":return Ew(e,r);case"angleAxis":return Zj(e,r);case"radiusAxis":return Jj(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},zV=(e,t,r)=>{switch(t){case"xAxis":return ei(e,r);case"yAxis":return ti(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Td=(e,t,r)=>{switch(t){case"xAxis":return ei(e,r);case"yAxis":return ti(e,r);case"angleAxis":return Zj(e,r);case"radiusAxis":return Jj(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Y4=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function V4(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var qp=e=>e.graphicalItems.cartesianItems,BV=Q([Qt,Rp],V4),Q4=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),ou=Q([qp,Tr,BV],Q4,{memoizeOptions:{resultEqualityCheck:kp}}),X4=Q([ou],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Mp)),W4=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),UV=Q([ou],W4),Z4=e=>e.map(t=>t.data).filter(Boolean).flat(1),qV=Q([ou],e=>e.some(t=>!t.data)),J4=Q([ou],Z4,{memoizeOptions:{resultEqualityCheck:kp}}),eD=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},Aw=Q([J4,Nd],eD),FV=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Ot(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Ot(i,n)}))):e.map(n=>({value:n})),tD=(e,t,r,n,i,o)=>{var{chartData:l=[],dataStartIndex:c,dataEndIndex:h}=n,f=FV(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var p=l.slice(c,h+1),g=p.map(y=>({value:Ot(y,t.dataKey)})).filter(y=>y.value!=null);return[...g,...f]}return f},Cd=Q([Aw,Tr,ou,Nd,qV,J4],tD);function El(e){if(ua(e)||e instanceof Date){var t=Number(e);if(Be(t))return t}}function $C(e){if(Array.isArray(e)){var t=[El(e[0]),El(e[1])];return sa(t)?t:void 0}var r=El(e);if(r!=null)return[r,r]}function fa(e){return e.map(El).filter(Ur)}function HV(e,t){var r=El(e),n=El(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var KV=Q([Cd],e=>e==null?void 0:e.map(t=>t.value).sort(HV));function rD(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function GV(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!la(t))n=t;else if(Array.isArray(t)){var i=fa(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:fa(r.flatMap(o=>{var l=Ot(e,o.dataKey),c,h;if(Array.isArray(l)?[c,h]=l:c=h=l,!(!Be(c)||!Be(h)))return[n-c,n+h]}))}var Ut=e=>{var t=Xt(e),r=iu(e);return Td(e,t,r)},Zl=Q([Ut],e=>e==null?void 0:e.dataKey),YV=Q([X4,Nd,Ut],l4),nD=(e,t,r,n)=>{var i={},o=t.reduce((l,c)=>{if(c.stackId==null)return l;var h=l[c.stackId];return h==null&&(h=[]),h.push(c),l[c.stackId]=h,l},i);return Object.fromEntries(Object.entries(o).map(l=>{var[c,h]=l,f=n?[...h].reverse():h,p=f.map(tw);return[c,{stackedData:C7(e,p,r),graphicalItems:f}]}))},Eb=Q([YV,X4,Ap,t4],nD),aD=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(n==null&&r!=="zAxis"){var l=k7(e,i,o);if(!(l!=null&&l[0]===0&&l[1]===0))return l}},VV=Q([Tr],e=>e.allowDataOverflow),Tw=e=>{var t;if(e==null||!("domain"in e))return Ob;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=fa(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:Ob},iD=Q([Tr],Tw),sD=Q([iD,VV],q3),QV=Q([Eb,Hn,Qt,sD],aD,{memoizeOptions:{resultEqualityCheck:Dp}}),Cw=e=>e.errorBars,XV=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>rD(r,n)),Mm=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var o=i.flat(),l=Math.min(...o),c=Math.max(...o);return[l,c]}},oD=function(t,r,n,i,o){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],c,h;if(n.length>0&&n.forEach(f=>{var p,g=f.data!=null?[...f.data]:l,y=(p=i[f.id])===null||p===void 0?void 0:p.filter(x=>rD(o,x));g.forEach(x=>{var b,w=Ot(x,(b=r.dataKey)!==null&&b!==void 0?b:f.dataKey),N=GV(x,w,y);if(N.length>=2){var _=Math.min(...N),E=Math.max(...N);(c==null||_<c)&&(c=_),(h==null||E>h)&&(h=E)}var T=$C(w);T!=null&&(c=c==null?T[0]:Math.min(c,T[0]),h=h==null?T[1]:Math.max(h,T[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(f=>{var p=$C(Ot(f,r.dataKey));p!=null&&(c=c==null?p[0]:Math.min(c,p[0]),h=h==null?p[1]:Math.max(h,p[1]))}),Be(c)&&Be(h))return[c,h]},WV=Q([Aw,Tr,UV,Cw,Qt,zK],oD,{memoizeOptions:{resultEqualityCheck:Dp}});function ZV(e){var{value:t}=e;if(ua(t)||t instanceof Date)return t}var JV=(e,t,r)=>{var n=e.map(ZV).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&yM(n))?U3(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},lD=e=>e.referenceElements.dots,lu=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),eQ=Q([lD,Qt,Rp],lu),uD=e=>e.referenceElements.areas,tQ=Q([uD,Qt,Rp],lu),cD=e=>e.referenceElements.lines,rQ=Q([cD,Qt,Rp],lu),dD=(e,t)=>{if(e!=null){var r=fa(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},nQ=Q(eQ,Qt,dD),fD=(e,t)=>{if(e!=null){var r=fa(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},aQ=Q([tQ,Qt],fD);function iQ(e){var t;if(e.x!=null)return fa([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:fa(r)}function sQ(e){var t;if(e.y!=null)return fa([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:fa(r)}var hD=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?iQ(n):sQ(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},oQ=Q([rQ,Qt],hD),lQ=Q(nQ,oQ,aQ,(e,t,r)=>Mm(e,r,t)),mD=(e,t,r,n,i,o,l,c)=>{if(r!=null)return r;var h=l==="vertical"&&c==="xAxis"||l==="horizontal"&&c==="yAxis",f=h?Mm(n,o,i):Mm(o,i);return UK(t,f,e.allowDataOverflow)},uQ=Q([Tr,iD,sD,QV,WV,lQ,We,Qt],mD,{memoizeOptions:{resultEqualityCheck:Dp}}),cQ=[0,1],pD=(e,t,r,n,i,o,l)=>{if(!((e==null||r==null||r.length===0)&&l===void 0)){var{dataKey:c,type:h}=e,f=Xa(t,o);if(f&&c==null){var p;return U3(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return h==="category"?JV(n,e,f):i==="expand"&&!f?cQ:l}},Pw=Q([Tr,We,Aw,Cd,Ap,Qt,uQ],pD),uu=Q([Tr,Y4,Qj],F4),gD=(e,t,r)=>{var{niceTicks:n}=t;if(n!=="none"){var i=Tw(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&sa(e)){if(o)return YT(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return VT(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&sa(e))return YT(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&sa(e))return VT(e,t.tickCount,t.allowDecimals,"adaptive")}}},Rw=Q([Pw,Td,uu],gD),yD=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&sa(t)&&Array.isArray(r)&&r.length>0){var i,o,l=t[0],c=(i=r[0])!==null&&i!==void 0?i:0,h=t[1],f=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(l,c),Math.max(h,f)]}return t},dQ=Q([Tr,Pw,Rw,Qt],yD),fQ=Q(Cd,Tr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(fa(e.map(g=>g.value))).sort((g,y)=>g-y),i=n[0],o=n[n.length-1];if(i==null||o==null)return 1/0;var l=o-i;if(l===0)return 1/0;for(var c=0;c<n.length-1;c++){var h=n[c],f=n[c+1];if(!(h==null||f==null)){var p=f-h;r=Math.min(r,p)}}return r/l}}),vD=Q(fQ,We,e4,Vt,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!Be(e))return 0;var o=t==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var l=Bn(r,e*o),c=e*o/2;return c-l-(c-l)/o*l}return 0}),hQ=(e,t,r)=>{var n=ei(e,t);return n==null||typeof n.padding!="string"?0:vD(e,"xAxis",t,r,n.padding)},mQ=(e,t,r)=>{var n=ti(e,t);return n==null||typeof n.padding!="string"?0:vD(e,"yAxis",t,r,n.padding)},pQ=Q(ei,hQ,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),gQ=Q(ti,mQ,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),yQ=Q([Vt,pQ,jp,bp,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:o}=n;return i?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),vQ=Q([Vt,We,gQ,jp,bp,(e,t,r)=>r],(e,t,r,n,i,o)=>{var{padding:l}=i;return o?[n.height-l.bottom,l.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Pd=(e,t,r,n)=>{var i;switch(t){case"xAxis":return yQ(e,r,n);case"yAxis":return vQ(e,r,n);case"zAxis":return(i=Ew(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return i4(e);case"radiusAxis":return s4(e,r);default:return}},xD=Q([Tr,Pd],Tp),xQ=Q([uu,dQ],tG),Mw=Q([Tr,uu,xQ,xD],Ow),bD=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:o}=r,l=Xa(e,n);if(l&&(i==="number"||o!=="auto"))return t.map(c=>c.value)}},Dw=Q([We,Cd,Td,Qt],bD),Fp=Q([Mw],rw);Q([Mw],DV);Q([Mw,KV],H4);Q([ou,Cw,Qt],XV);function jD(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Hp=(e,t)=>t,Kp=(e,t,r)=>r,bQ=Q(vp,Hp,Kp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(jD)),jQ=Q(xp,Hp,Kp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(jD)),wD=(e,t)=>({width:e.width,height:t.height}),wQ=(e,t)=>{var r=typeof t.width=="number"?t.width:bd;return{width:r,height:e.height}},SD=Q(Vt,ei,wD),SQ=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},NQ=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},_Q=Q(Za,Vt,bQ,Hp,Kp,(e,t,r,n,i)=>{var o={},l;return r.forEach(c=>{var h=wD(t,c);l==null&&(l=SQ(t,n,e));var f=n==="top"&&!i||n==="bottom"&&i;o[c.id]=l-Number(f)*h.height,l+=(f?-1:1)*h.height}),o}),OQ=Q(Wa,Vt,jQ,Hp,Kp,(e,t,r,n,i)=>{var o={},l;return r.forEach(c=>{var h=wQ(t,c);l==null&&(l=NQ(t,n,e));var f=n==="left"&&!i||n==="right"&&i;o[c.id]=l-Number(f)*h.width,l+=(f?-1:1)*h.width}),o}),EQ=(e,t)=>{var r=ei(e,t);if(r!=null)return _Q(e,r.orientation,r.mirror)},AQ=Q([Vt,ei,EQ,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),TQ=(e,t)=>{var r=ti(e,t);if(r!=null)return OQ(e,r.orientation,r.mirror)},CQ=Q([Vt,ti,TQ,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),ND=Q(Vt,ti,(e,t)=>{var r=typeof t.width=="number"?t.width:bd;return{width:r,height:e.height}}),IC=(e,t,r)=>{switch(t){case"xAxis":return SD(e,r).width;case"yAxis":return ND(e,r).height;default:return}},_D=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:o,dataKey:l}=r,c=Xa(e,n),h=t.map(p=>p.value),f=h.filter(p=>p!=null);if(l&&c&&o==="category"&&i&&yM(f))return h}},kw=Q([We,Cd,Tr,Qt],_D),zC=Q([We,zV,uu,Fp,kw,Dw,Pd,Rw,Qt],(e,t,r,n,i,o,l,c,h)=>{if(t!=null){var f=Xa(e,h);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:h,categoricalDomain:o,duplicateDomain:i,isCategorical:f,niceTicks:c,range:l,realScaleType:r,scale:n}}}),PQ=(e,t,r,n,i,o,l,c,h)=>{if(!(t==null||n==null)){var f=Xa(e,h),{type:p,ticks:g,tickCount:y}=t,x=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,b=p==="category"&&n.bandwidth?n.bandwidth()/x:0;b=h==="angleAxis"&&o!=null&&o.length>=2?Br(o[0]-o[1])*2*b:b;var w=g||i;return w?w.map((N,_)=>{var E=l?l.indexOf(N):N,T=n.map(E);return Be(T)?{index:_,coordinate:T+b,value:N,offset:b}:null}).filter(Ur):f&&c?c.map((N,_)=>{var E=n.map(N);return Be(E)?{coordinate:E+b,value:N,index:_,offset:b}:null}).filter(Ur):n.ticks?n.ticks(y).map((N,_)=>{var E=n.map(N);return Be(E)?{coordinate:E+b,value:N,index:_,offset:b}:null}).filter(Ur):n.domain().map((N,_)=>{var E=n.map(N);return Be(E)?{coordinate:E+b,value:l?l[N]:N,index:_,offset:b}:null}).filter(Ur)}},OD=Q([We,Td,uu,Fp,Rw,Pd,kw,Dw,Qt],PQ),RQ=(e,t,r,n,i,o,l)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var c=Xa(e,l),{tickCount:h}=t,f=0;return f=l==="angleAxis"&&(n==null?void 0:n.length)>=2?Br(n[0]-n[1])*2*f:f,c&&o?o.map((p,g)=>{var y=r.map(p);return Be(y)?{coordinate:y+f,value:p,index:g,offset:f}:null}).filter(Ur):r.ticks?r.ticks(h).map((p,g)=>{var y=r.map(p);return Be(y)?{coordinate:y+f,value:p,index:g,offset:f}:null}).filter(Ur):r.domain().map((p,g)=>{var y=r.map(p);return Be(y)?{coordinate:y+f,value:i?i[p]:p,index:g,offset:f}:null}).filter(Ur)}},Ji=Q([We,Td,Fp,Pd,kw,Dw,Qt],RQ),es=Q(Tr,Fp,(e,t)=>{if(!(e==null||t==null))return Rm(Rm({},e),{},{scale:t})}),MQ=Q([Tr,uu,Pw,xD],Ow),DQ=Q([MQ],rw);Q((e,t,r)=>Ew(e,r),DQ,(e,t)=>{if(!(e==null||t==null))return Rm(Rm({},e),{},{scale:t})});var kQ=Q([We,vp,xp],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),LQ=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};Q([LQ],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var o of e){var l=Math.abs(o.coordinate-t);l<n&&(n=l,i=o)}return(r=i)===null||r===void 0?void 0:r.value}});var ED=e=>e.options.defaultTooltipEventType,AD=e=>e.options.validateTooltipEventTypes;function TD(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Rd(e,t){var r=ED(e),n=AD(e);return TD(t,r,n)}function $Q(e){return ve(t=>Rd(t,e))}var CD=(e,t)=>{var r,n=Number(t);if(!(la(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},IQ=e=>e.tooltip.settings,ki={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},zQ={itemInteraction:{click:ki,hover:ki},axisInteraction:{click:ki,hover:ki},keyboardInteraction:ki,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},PD=br({name:"tooltip",initialState:zQ,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ot()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:ot()},removeTooltipEntrySettings:{reducer(e,t){var r=On(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:ot()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:BQ,replaceTooltipEntrySettings:UQ,removeTooltipEntrySettings:qQ,setTooltipSettingsState:FQ,setActiveMouseOverItemIndex:RD,mouseLeaveItem:HQ,mouseLeaveChart:MD,setActiveClickItemIndex:KQ,setMouseOverAxisIndex:DD,setMouseClickAxisIndex:GQ,setSyncInteraction:_c,setKeyboardInteraction:Dm}=PD.actions,YQ=PD.reducer;function BC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BC(Object(r),!0).forEach(function(n){VQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VQ(e,t,r){return(t=QQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QQ(e){var t=XQ(e,"string");return typeof t=="symbol"?t:t+""}function XQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WQ(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function ZQ(e){return e.index!=null}var kD=(e,t,r,n)=>{if(t==null)return ki;var i=WQ(e,t,r);if(i==null)return ki;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(ZQ(i)){if(o)return yh(yh({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return yh(yh({},ki),{},{coordinate:i.coordinate})};function JQ(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function eX(e,t){var r=JQ(e),n=t[0],i=t[1];if(r===void 0)return!1;var o=Math.min(n,i),l=Math.max(n,i);return r>=o&&r<=l}function tX(e,t,r){if(r==null||t==null)return!0;var n=Ot(e,t);return n==null||!sa(r)?!0:eX(n,r)}var Ec=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!Be(o))return i;var l=0,c=1/0;t.length>0&&(c=t.length-1);var h=Math.max(l,Math.min(o,c)),f=t[h];return f==null||tX(f,r,n)?String(h):null},LD=(e,t,r,n,i,o,l)=>{if(o!=null){var c=l[0],h=c==null?void 0:c.getPosition(o);if(h!=null)return h;var f=i==null?void 0:i[Number(o)];if(f)switch(r){case"horizontal":return{x:f.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:f.coordinate}}}},$D=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(l=>{var c;return((c=l.settings)===null||c===void 0?void 0:c.graphicalItemId)===i})},ID=e=>e.options.tooltipPayloadSearcher,cu=e=>e.tooltip;function UC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UC(Object(r),!0).forEach(function(n){rX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rX(e,t,r){return(t=nX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nX(e){var t=aX(e,"string");return typeof t=="symbol"?t:t+""}function aX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iX(e){if(typeof e=="string"||typeof e=="number")return e}function sX(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function oX(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function FC(e){if(typeof e=="string")return e}function lX(e){if(!(e==null||typeof e!="object")){var t="name"in e?iX(e.name):void 0,r="unit"in e?sX(e.unit):void 0,n="dataKey"in e?oX(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?FC(e.color):void 0,l="fill"in e?FC(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:l}}}function uX(e,t){return e??t}var zD=(e,t,r,n,i,o,l)=>{if(!(t==null||o==null)){var{chartData:c,computedData:h,dataStartIndex:f,dataEndIndex:p}=r,g=[];return e.reduce((y,x)=>{var b,{dataDefinedOnItem:w,settings:N}=x,_=uX(w,c),E=Array.isArray(_)?f3(_,f,p):_,T=(b=N==null?void 0:N.dataKey)!==null&&b!==void 0?b:n,A=N==null?void 0:N.nameKey,C;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&l==="axis"?C=vM(E,n,i):C=o(E,t,h,A),Array.isArray(C))C.forEach(D=>{var M,z,k=lX(D),H=k==null?void 0:k.name,U=k==null?void 0:k.dataKey,ae=k==null?void 0:k.payload,Z=qC(qC({},N),{},{name:H,unit:k==null?void 0:k.unit,color:(M=k==null?void 0:k.color)!==null&&M!==void 0?M:N==null?void 0:N.color,fill:(z=k==null?void 0:k.fill)!==null&&z!==void 0?z:N==null?void 0:N.fill});y.push(kA({tooltipEntrySettings:Z,dataKey:U,payload:ae,value:Ot(ae,U),name:H==null?void 0:String(H)}))});else{var R;y.push(kA({tooltipEntrySettings:N,dataKey:T,payload:C,value:Ot(C,T),name:(R=Ot(C,A))!==null&&R!==void 0?R:N==null?void 0:N.name}))}return y},g)}},Lw=Q([Ut,Y4,Qj],F4),cX=Q([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),dX=Q([Xt,iu],V4),bo=Q([cX,Ut,dX],Q4,{memoizeOptions:{resultEqualityCheck:kp}}),fX=Q([bo],e=>e.filter(Mp)),BD=Q([bo],Z4,{memoizeOptions:{resultEqualityCheck:kp}}),hX=Q([bo],e=>e.some(t=>!t.data)),lo=Q([BD,Hn],eD),mX=Q([fX,Hn,Ut],l4),$w=Q([lo,Ut,bo,Hn,hX,BD],tD),UD=Q([Ut],Tw),pX=Q([Ut],e=>e.allowDataOverflow),qD=Q([UD,pX],q3),gX=Q([bo],e=>e.filter(Mp)),yX=Q([mX,gX,Ap,t4],nD),vX=Q([yX,Hn,Xt,qD],aD),xX=Q([bo],W4),bX=Q([lo,Ut,xX,Cw,Xt,BK],oD,{memoizeOptions:{resultEqualityCheck:Dp}}),jX=Q([lD,Xt,iu],lu),wX=Q([jX,Xt],dD),SX=Q([uD,Xt,iu],lu),NX=Q([SX,Xt],fD),_X=Q([cD,Xt,iu],lu),OX=Q([_X,Xt],hD),EX=Q([wX,OX,NX],Mm),AX=Q([Ut,UD,qD,vX,bX,EX,We,Xt],mD),Jl=Q([Ut,We,lo,$w,Ap,Xt,AX],pD),TX=Q([Jl,Ut,Lw],gD),CX=Q([Ut,Jl,TX,Xt],yD),FD=e=>{var t=Xt(e),r=iu(e),n=!1;return Pd(e,t,r,n)},HD=Q([Ut,FD],Tp),PX=Q([Ut,Lw,CX,HD],Ow),KD=Q([PX],rw),RX=Q([We,$w,Ut,Xt],_D),MX=Q([We,$w,Ut,Xt],bD),DX=(e,t,r,n,i,o,l,c)=>{if(t){var{type:h}=t,f=Xa(e,c);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=h==="category"&&n.bandwidth?n.bandwidth()/p:0;return g=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?Br(i[0]-i[1])*2*g:g,f&&l?l.map((y,x)=>{var b=n.map(y);return Be(b)?{coordinate:b+g,value:y,index:x,offset:g}:null}).filter(Ur):n.domain().map((y,x)=>{var b=n.map(y);return Be(b)?{coordinate:b+g,value:o?o[y]:y,index:x,offset:g}:null}).filter(Ur)}}},ri=Q([We,Ut,Lw,KD,FD,RX,MX,Xt],DX),Iw=Q([ED,AD,IQ],(e,t,r)=>TD(r.shared,e,t)),GD=e=>e.tooltip.settings.trigger,zw=e=>e.tooltip.settings.defaultIndex,Md=Q([cu,Iw,GD,zw],kD),uo=Q([Md,lo,Zl,Jl],Ec),YD=Q([ri,uo],CD),VD=Q([Md],e=>{if(e)return e.dataKey}),kX=Q([Md],e=>{if(e)return e.graphicalItemId}),QD=Q([cu,Iw,GD,zw],$D),LX=Q([Wa,Za,We,Vt,ri,zw,QD],LD),$X=Q([Md,LX],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),IX=Q([Md],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),zX=Q([QD,uo,Hn,Zl,YD,ID,Iw],zD),BX=Q([zX],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function HC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function KC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HC(Object(r),!0).forEach(function(n){UX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UX(e,t,r){return(t=qX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qX(e){var t=FX(e,"string");return typeof t=="symbol"?t:t+""}function FX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HX=()=>ve(Ut),KX=()=>{var e=HX(),t=ve(ri),r=ve(KD);return Gl(!e||!r?void 0:KC(KC({},e),{},{scale:r}),t)};function GC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GC(Object(r),!0).forEach(function(n){GX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GX(e,t,r){return(t=YX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YX(e){var t=VX(e,"string");return typeof t=="symbol"?t:t+""}function VX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var QX=(e,t,r,n)=>{var i=t.find(o=>o&&o.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},XX=(e,t,r,n)=>{var i=t.find(f=>f&&f.index===r);if(i){if(e==="centric"){var o=i.coordinate,{radius:l}=n;return hl(hl(hl({},n),lr(n.cx,n.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,{angle:h}=n;return hl(hl(hl({},n),lr(n.cx,n.cy,c,h)),{},{angle:h,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function WX(e,t){var{relativeX:r,relativeY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var XD=(e,t,r,n,i)=>{var o,l=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(l<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<l;c++){var h,f,p,g,y,x=c>0?(h=r[c-1])===null||h===void 0?void 0:h.coordinate:(f=r[l-1])===null||f===void 0?void 0:f.coordinate,b=(p=r[c])===null||p===void 0?void 0:p.coordinate,w=c>=l-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(y=r[c+1])===null||y===void 0?void 0:y.coordinate,N=void 0;if(!(x==null||b==null||w==null))if(Br(b-x)!==Br(w-b)){var _=[];if(Br(w-b)===Br(i[1]-i[0])){N=w;var E=b+i[1]-i[0];_[0]=Math.min(E,(E+x)/2),_[1]=Math.max(E,(E+x)/2)}else{N=x;var T=w+i[1]-i[0];_[0]=Math.min(b,(T+b)/2),_[1]=Math.max(b,(T+b)/2)}var A=[Math.min(b,(N+b)/2),Math.max(b,(N+b)/2)];if(e>A[0]&&e<=A[1]||e>=_[0]&&e<=_[1]){var C;return(C=r[c])===null||C===void 0?void 0:C.index}}else{var R=Math.min(x,w),D=Math.max(x,w);if(e>(R+b)/2&&e<=(D+b)/2){var M;return(M=r[c])===null||M===void 0?void 0:M.index}}}else if(t)for(var z=0;z<l;z++){var k=t[z];if(k!=null){var H=t[z+1],U=t[z-1];if(z===0&&H!=null&&e<=(k.coordinate+H.coordinate)/2||z===l-1&&U!=null&&e>(k.coordinate+U.coordinate)/2||z>0&&z<l-1&&U!=null&&H!=null&&e>(k.coordinate+U.coordinate)/2&&e<=(k.coordinate+H.coordinate)/2)return k.index}}return-1},ZX=()=>ve(Qj),Bw=(e,t)=>t,WD=(e,t,r)=>r,Uw=(e,t,r,n)=>n,JX=Q(ri,e=>op(e,t=>t.coordinate)),qw=Q([cu,Bw,WD,Uw],kD),Fw=Q([qw,lo,Zl,Jl],Ec),eW=(e,t,r)=>{if(t!=null){var n=cu(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},ZD=Q([cu,Bw,WD,Uw],$D),km=Q([Wa,Za,We,Vt,ri,Uw,ZD],LD),tW=Q([qw,km],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),JD=Q([ri,Fw],CD),rW=Q([ZD,Fw,Hn,Zl,JD,ID,Bw],zD),nW=Q([qw,Fw],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),aW=(e,t,r,n,i,o,l)=>{if(!(!e||!r||!n||!i)&&WX(e,l)){var c=L7(e,t),h=XD(c,o,i,r,n),f=QX(t,i,h,e);return{activeIndex:String(h),activeCoordinate:f}}},iW=(e,t,r,n,i,o,l)=>{if(!(!e||!n||!i||!o||!r)){var c=AK(e,r);if(c){var h=$7(c,t),f=XD(h,l,o,n,i),p=XX(t,o,f,c);return{activeIndex:String(f),activeCoordinate:p}}}},sW=(e,t,r,n,i,o,l,c)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?aW(e,t,n,i,o,l,c):iW(e,t,r,n,i,o,l)},oW=Q(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),lW=Q(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Gt)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:eG}});function YC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function VC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YC(Object(r),!0).forEach(function(n){uW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uW(e,t,r){return(t=cW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cW(e){var t=dW(e,"string");return typeof t=="symbol"?t:t+""}function dW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fW={},hW={zIndexMap:Object.values(Gt).reduce((e,t)=>VC(VC({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),fW)},mW=new Set(Object.values(Gt));function pW(e){return mW.has(e)}var ek=br({name:"zIndex",initialState:hW,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:ot()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!pW(r)&&delete e.zIndexMap[r])},prepare:ot()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:i}=t.payload;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:i?void 0:n,panoramaElement:i?n:void 0}},prepare:ot()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:ot()}}}),{registerZIndexPortal:gW,unregisterZIndexPortal:ex,registerZIndexPortalElement:yW,unregisterZIndexPortalElement:vW}=ek.actions,xW=ek.reducer;function Cn(e){var{zIndex:t,children:r}=e,n=gF(),i=n&&t!==void 0&&t!==0,o=jr(),l=S.useRef(void 0),c=S.useRef(new Set),h=ct(),f=ve(g=>oW(g,t,o));if(S.useLayoutEffect(()=>{if(!i){var g=c.current;g.forEach(x=>{h(ex({zIndex:x}))}),g.clear(),l.current=void 0;return}if(c.current.has(t)||(h(gW({zIndex:t})),c.current.add(t)),f){l.current=f;var y=c.current;y.forEach(x=>{x!==t&&(h(ex({zIndex:x})),y.delete(x))})}},[h,t,i,f]),S.useLayoutEffect(()=>{var g=c.current;return()=>{g.forEach(y=>{h(ex({zIndex:y}))}),g.clear()}},[h]),!i)return r;var p=f??l.current;return p?Wm.createPortal(r,p):null}function Ab(){return Ab=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ab.apply(null,arguments)}function QC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QC(Object(r),!0).forEach(function(n){bW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bW(e,t,r){return(t=jW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jW(e){var t=wW(e,"string");return typeof t=="symbol"?t:t+""}function wW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SW(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return S.isValidElement(t)?S.cloneElement(t,n):S.createElement(r,n)}function NW(e){var t,{coordinate:r,payload:n,index:i,offset:o,tooltipAxisBandSize:l,layout:c,cursor:h,tooltipEventType:f,chartName:p}=e,g=r,y=n,x=i;if(!h||!g||p!=="ScatterChart"&&f!=="axis")return null;var b,w,N;if(p==="ScatterChart")b=g,w=qH,N=Gt.cursorLine;else if(p==="BarChart")b=FH(c,g,o,l),w=$3,N=Gt.cursorRectangle;else if(c==="radial"&&bM(g)){var{cx:_,cy:E,radius:T,startAngle:A,endAngle:C}=I3(g);b={cx:_,cy:E,startAngle:A,endAngle:C,innerRadius:T,outerRadius:T},w=B3,N=Gt.cursorLine}else b={points:RK(c,g,o)},w=R3,N=Gt.cursorLine;var R=typeof h=="object"&&"className"in h?h.className:void 0,D=vh(vh(vh(vh({stroke:"#ccc",pointerEvents:"none"},o),b),gd(h)),{},{payload:y,payloadIndex:x,className:Xe("recharts-tooltip-cursor",R)});return S.createElement(Cn,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:N},S.createElement(SW,{cursor:h,cursorComp:w,cursorProps:D}))}function _W(e){var t=KX(),r=x3(),n=yo(),i=ZX();return t==null||r==null||n==null||i==null?null:S.createElement(NW,Ab({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var tk=S.createContext(null),OW=()=>S.useContext(tk),tx={exports:{}},XC;function EW(){return XC||(XC=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(h,f,p){this.fn=h,this.context=f,this.once=p||!1}function o(h,f,p,g,y){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new i(p,g||h,y),b=r?r+f:f;return h._events[b]?h._events[b].fn?h._events[b]=[h._events[b],x]:h._events[b].push(x):(h._events[b]=x,h._eventsCount++),h}function l(h,f){--h._eventsCount===0?h._events=new n:delete h._events[f]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var f=[],p,g;if(this._eventsCount===0)return f;for(g in p=this._events)t.call(p,g)&&f.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},c.prototype.listeners=function(f){var p=r?r+f:f,g=this._events[p];if(!g)return[];if(g.fn)return[g.fn];for(var y=0,x=g.length,b=new Array(x);y<x;y++)b[y]=g[y].fn;return b},c.prototype.listenerCount=function(f){var p=r?r+f:f,g=this._events[p];return g?g.fn?1:g.length:0},c.prototype.emit=function(f,p,g,y,x,b){var w=r?r+f:f;if(!this._events[w])return!1;var N=this._events[w],_=arguments.length,E,T;if(N.fn){switch(N.once&&this.removeListener(f,N.fn,void 0,!0),_){case 1:return N.fn.call(N.context),!0;case 2:return N.fn.call(N.context,p),!0;case 3:return N.fn.call(N.context,p,g),!0;case 4:return N.fn.call(N.context,p,g,y),!0;case 5:return N.fn.call(N.context,p,g,y,x),!0;case 6:return N.fn.call(N.context,p,g,y,x,b),!0}for(T=1,E=new Array(_-1);T<_;T++)E[T-1]=arguments[T];N.fn.apply(N.context,E)}else{var A=N.length,C;for(T=0;T<A;T++)switch(N[T].once&&this.removeListener(f,N[T].fn,void 0,!0),_){case 1:N[T].fn.call(N[T].context);break;case 2:N[T].fn.call(N[T].context,p);break;case 3:N[T].fn.call(N[T].context,p,g);break;case 4:N[T].fn.call(N[T].context,p,g,y);break;default:if(!E)for(C=1,E=new Array(_-1);C<_;C++)E[C-1]=arguments[C];N[T].fn.apply(N[T].context,E)}}return!0},c.prototype.on=function(f,p,g){return o(this,f,p,g,!1)},c.prototype.once=function(f,p,g){return o(this,f,p,g,!0)},c.prototype.removeListener=function(f,p,g,y){var x=r?r+f:f;if(!this._events[x])return this;if(!p)return l(this,x),this;var b=this._events[x];if(b.fn)b.fn===p&&(!y||b.once)&&(!g||b.context===g)&&l(this,x);else{for(var w=0,N=[],_=b.length;w<_;w++)(b[w].fn!==p||y&&!b[w].once||g&&b[w].context!==g)&&N.push(b[w]);N.length?this._events[x]=N.length===1?N[0]:N:l(this,x)}return this},c.prototype.removeAllListeners=function(f){var p;return f?(p=r?r+f:f,this._events[p]&&l(this,p)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,e.exports=c})(tx)),tx.exports}var AW=EW();const TW=rs(AW);var ed=new TW,Tb="recharts.syncEvent.tooltip",WC="recharts.syncEvent.brush",rk=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!la(r))return e[r]}},CW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},nk=br({name:"options",initialState:CW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),PW=nk.reducer,{createEventEmitter:RW}=nk.actions;function MW(e){return e.tooltip.syncInteraction}var DW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},ak=br({name:"chartData",initialState:DW,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:ZC,setDataStartEndIndexes:kW,setComputedData:Sle}=ak.actions,LW=ak.reducer,$W=["x","y"];function JC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ml(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JC(Object(r),!0).forEach(function(n){IW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IW(e,t,r){return(t=zW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zW(e){var t=BW(e,"string");return typeof t=="symbol"?t:t+""}function BW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UW(e,t){if(e==null)return{};var r,n,i=qW(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function qW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function FW(){var e=ve(Xj),t=ve(Wj),r=ct(),n=ve(r4),i=ve(ri),o=yo(),l=wp(),c=ve(h=>h.rootProps.className);S.useEffect(()=>{if(e==null)return go;var h=(f,p,g)=>{if(t!==g&&e===f){if(p.payload.active===!1){r(_c({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var y;if(l&&p!==null&&p!==void 0&&(y=p.payload)!==null&&y!==void 0&&y.coordinate&&p.payload.sourceViewBox){var x=p.payload.coordinate,{x:b,y:w}=x,N=UW(x,$W),{x:_,y:E,width:T,height:A}=p.payload.sourceViewBox,C=ml(ml({},N),{},{x:l.x+(T?(b-_)/T:0)*l.width,y:l.y+(A?(w-E)/A:0)*l.height});r(ml(ml({},p),{},{payload:ml(ml({},p.payload),{},{coordinate:C})}))}else r(p);return}if(i!=null){var R;if(typeof n=="function"){var D={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},M=n(i,D);R=i[M]}else n==="value"&&(R=i.find(L=>String(L.value)===p.payload.label));var{coordinate:z}=p.payload;if(z==null||l==null){r(_c({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(R==null){r(_c({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:k,y:H}=z,U=Math.min(k,l.x+l.width),ae=Math.min(H,l.y+l.height),Z={x:o==="horizontal"?R.coordinate:U,y:o==="horizontal"?ae:R.coordinate},G=_c({active:p.payload.active,coordinate:Z,dataKey:p.payload.dataKey,index:String(R.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(G)}}};return ed.on(Tb,h),()=>{ed.off(Tb,h)}},[c,r,t,e,n,i,o,l])}function HW(){var e=ve(Xj),t=ve(Wj),r=ct();S.useEffect(()=>{if(e==null)return go;var n=(i,o,l)=>{t!==l&&e===i&&r(kW(o))};return ed.on(WC,n),()=>{ed.off(WC,n)}},[r,t,e])}function KW(){var e=ct();S.useEffect(()=>{e(RW())},[e]),FW(),HW()}function GW(e,t,r,n,i,o){var l=ve(b=>eW(b,e,t)),c=ve(kX),h=ve(Wj),f=ve(Xj),p=ve(r4),g=ve(MW),y=(g==null?void 0:g.sourceViewBox)!=null,x=wp();S.useEffect(()=>{if(!y&&f!=null&&h!=null){var b=_c({active:o,coordinate:r,dataKey:l,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:x,graphicalItemId:c});ed.emit(Tb,f,b,h)}},[y,r,l,c,i,n,h,f,p,o,x])}function eP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eP(Object(r),!0).forEach(function(n){YW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YW(e,t,r){return(t=VW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VW(e){var t=QW(e,"string");return typeof t=="symbol"?t:t+""}function QW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XW(e){return e.dataKey}function WW(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(yH,t)}var rP=[],ZW={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Hw(e){var t,r,n=fr(e,ZW),{active:i,allowEscapeViewBox:o,animationDuration:l,animationEasing:c,content:h,filterNull:f,isAnimationActive:p,offset:g,payloadUniqBy:y,position:x,reverseDirection:b,useTranslate3d:w,wrapperStyle:N,cursor:_,shared:E,trigger:T,defaultIndex:A,portal:C,axisId:R}=n,D=ct(),M=typeof A=="number"?String(A):A;S.useEffect(()=>{D(FQ({shared:E,trigger:T,axisId:R,active:i,defaultIndex:M}))},[D,E,T,R,i,M]);var z=wp(),k=P3(),H=$Q(E),{activeIndex:U,isActive:ae}=(t=ve(_e=>nW(_e,H,T,M)))!==null&&t!==void 0?t:{},Z=ve(_e=>rW(_e,H,T,M)),G=ve(_e=>JD(_e,H,T,M)),L=ve(_e=>tW(_e,H,T,M)),F=Z,J=OW(),re=(r=i??ae)!==null&&r!==void 0?r:!1,[oe,$]=LM([F,re]),X=H==="axis"?G:void 0;GW(H,T,L,X,U,re);var le=C??J;if(le==null||z==null||H==null)return null;var ue=F??rP;re||(ue=rP),f&&ue.length&&(ue=PM(ue.filter(_e=>_e.value!=null&&(_e.hide!==!0||n.includeHidden)),y,XW));var pe=ue.length>0,xe=tP(tP({},n),{},{payload:ue,label:X,active:re,activeIndex:U,coordinate:L,accessibilityLayer:k}),we=S.createElement(AH,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:p,active:re,coordinate:L,hasPayload:pe,offset:g,position:x,reverseDirection:b,useTranslate3d:w,viewBox:z,wrapperStyle:N,lastBoundingBox:oe,innerRef:$,hasPortalFromProps:!!C},WW(h,xe));return S.createElement(S.Fragment,null,Wm.createPortal(we,le),re&&S.createElement(_W,{cursor:_,tooltipEventType:H,coordinate:L,payload:ue,index:U}))}var Kw=e=>null;Kw.displayName="Cell";function JW(e,t,r){return(t=eZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eZ(e){var t=tZ(e,"string");return typeof t=="symbol"?t:t+""}function tZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class rZ{constructor(t){JW(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function nP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nZ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nP(Object(r),!0).forEach(function(n){aZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aZ(e,t,r){return(t=iZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iZ(e){var t=sZ(e,"string");return typeof t=="symbol"?t:t+""}function sZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oZ={cacheSize:2e3,enableCache:!0},ik=nZ({},oZ),aP=new rZ(ik.cacheSize),lZ={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},iP="recharts_measurement_span";function uZ(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",l=t.letterSpacing||"",c=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(o,"|").concat(l,"|").concat(c)}var sP=(e,t)=>{try{var r=document.getElementById(iP);r||(r=document.createElement("span"),r.setAttribute("id",iP),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,lZ,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Ac=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Sd.isSsr)return{width:0,height:0};if(!ik.enableCache)return sP(t,r);var n=uZ(t,r),i=aP.get(n);if(i)return i;var o=sP(t,r);return aP.set(n,o),o},sk;function cZ(e,t,r){return(t=dZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dZ(e){var t=fZ(e,"string");return typeof t=="symbol"?t:t+""}function fZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,lP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,hZ=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,mZ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,pZ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},gZ=["cm","mm","pt","pc","in","Q","px"];function yZ(e){return gZ.includes(e)}var Sl="NaN";function vZ(e,t){return e*pZ[t]}class sr{static parse(t){var r,[,n,i]=(r=mZ.exec(t))!==null&&r!==void 0?r:[];return n==null?sr.NaN:new sr(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,la(t)&&(this.unit=""),r!==""&&!hZ.test(r)&&(this.num=NaN,this.unit=""),yZ(r)&&(this.num=vZ(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new sr(NaN,""):new sr(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new sr(NaN,""):new sr(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new sr(NaN,""):new sr(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new sr(NaN,""):new sr(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return la(this.num)}}sk=sr;cZ(sr,"NaN",new sk(NaN,""));function ok(e){if(e==null||e.includes(Sl))return Sl;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,o]=(r=oP.exec(t))!==null&&r!==void 0?r:[],l=sr.parse(n??""),c=sr.parse(o??""),h=i==="*"?l.multiply(c):l.divide(c);if(h.isNaN())return Sl;t=t.replace(oP,h.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,[,p,g,y]=(f=lP.exec(t))!==null&&f!==void 0?f:[],x=sr.parse(p??""),b=sr.parse(y??""),w=g==="+"?x.add(b):x.subtract(b);if(w.isNaN())return Sl;t=t.replace(lP,w.toString())}return t}var uP=/\(([^()]*)\)/;function xZ(e){for(var t=e,r;(r=uP.exec(t))!=null;){var[,n]=r;t=t.replace(uP,ok(n))}return t}function bZ(e){var t=e.replace(/\s+/g,"");return t=xZ(t),t=ok(t),t}function jZ(e){try{return bZ(e)}catch{return Sl}}function rx(e){var t=jZ(e.slice(5,-1));return t===Sl?"":t}var wZ=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],SZ=["dx","dy","angle","className","breakAll"];function Cb(){return Cb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cb.apply(null,arguments)}function cP(e,t){if(e==null)return{};var r,n,i=NZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function NZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var lk=/[ \f\n\r\t\v\u2028\u2029]+/,uk=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];mt(t)||(r?i=t.toString().split(""):i=t.toString().split(lk));var o=i.map(c=>({word:c,width:Ac(c,n).width})),l=r?0:Ac(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}};function ck(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function _Z(e){return mt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var dk=(e,t,r,n)=>e.reduce((i,o)=>{var{word:l,width:c}=o,h=i[i.length-1];if(h&&c!=null&&(t==null||n||h.width+c+r<Number(t)))h.words.push(l),h.width+=c+r;else{var f={words:[l],width:c};i.push(f)}return i},[]),fk=e=>e.reduce((t,r)=>t.width>r.width?t:r),OZ="…",dP=(e,t,r,n,i,o,l,c)=>{var h=e.slice(0,t),f=uk({breakAll:r,style:n,children:h+OZ});if(!f)return[!1,[]];var p=dk(f.wordsWithComputedWidth,o,l,c),g=p.length>i||fk(p).width>Number(o);return[g,p]},EZ=(e,t,r,n,i)=>{var{maxLines:o,children:l,style:c,breakAll:h}=e,f=ge(o),p=String(l),g=dk(t,n,r,i);if(!f||i)return g;var y=g.length>o||fk(g).width>Number(n);if(!y)return g;for(var x=0,b=p.length-1,w=0,N;x<=b&&w<=p.length-1;){var _=Math.floor((x+b)/2),E=_-1,[T,A]=dP(p,E,h,c,o,n,r,i),[C]=dP(p,_,h,c,o,n,r,i);if(!T&&!C&&(x=_+1),T&&C&&(b=_-1),!T&&C){N=A;break}w++}return N||g},fP=e=>{var t=mt(e)?[]:e.toString().split(lk);return[{words:t,width:void 0}]},AZ=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:o,maxLines:l}=e;if((t||r)&&!Sd.isSsr){var c,h,f=uk({breakAll:o,children:n,style:i});if(f){var{wordsWithComputedWidth:p,spaceWidth:g}=f;c=p,h=g}else return fP(n);return EZ({breakAll:o,children:n,maxLines:l,style:i},c,h,t,!!r)}return fP(n)},hk="#808080",TZ={angle:0,breakAll:!1,capHeight:"0.71em",fill:hk,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Gw=S.forwardRef((e,t)=>{var r=fr(e,TZ),{x:n,y:i,lineHeight:o,capHeight:l,fill:c,scaleToFit:h,textAnchor:f,verticalAnchor:p}=r,g=cP(r,wZ),y=S.useMemo(()=>AZ({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:h,style:g.style,width:g.width}),[g.breakAll,g.children,g.maxLines,h,g.style,g.width]),{dx:x,dy:b,angle:w,className:N,breakAll:_}=g,E=cP(g,SZ);if(!ua(n)||!ua(i)||y.length===0)return null;var T=Number(n)+(ge(x)?x:0),A=Number(i)+(ge(b)?b:0);if(!Be(T)||!Be(A))return null;var C;switch(p){case"start":C=rx("calc(".concat(l,")"));break;case"middle":C=rx("calc(".concat((y.length-1)/2," * -").concat(o," + (").concat(l," / 2))"));break;default:C=rx("calc(".concat(y.length-1," * -").concat(o,")"));break}var R=[],D=y[0];if(h&&D!=null){var M=D.width,{width:z}=g;R.push("scale(".concat(ge(z)&&ge(M)?z/M:1,")"))}return w&&R.push("rotate(".concat(w,", ").concat(T,", ").concat(A,")")),R.length&&(E.transform=R.join(" ")),S.createElement("text",Cb({},Er(E),{ref:t,x:T,y:A,className:Xe("recharts-text",N),textAnchor:f,fill:c.includes("url")?hk:c}),y.map((k,H)=>{var U=k.words.join(_?"":" ");return S.createElement("tspan",{x:T,dy:H===0?C:o,key:"".concat(U,"-").concat(H)},U)}))});Gw.displayName="Text";function hP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hP(Object(r),!0).forEach(function(n){CZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CZ(e,t,r){return(t=PZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PZ(e){var t=RZ(e,"string");return typeof t=="symbol"?t:t+""}function RZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MZ=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i}=e,{x:o,y:l,height:c,upperWidth:h,lowerWidth:f}=Bj(t),p=o,g=o+(h-f)/2,y=(p+g)/2,x=(h+f)/2,b=p+h/2,w=c>=0?1:-1,N=w*n,_=w>0?"end":"start",E=w>0?"start":"end",T=h>=0?1:-1,A=T*n,C=T>0?"end":"start",R=T>0?"start":"end",D=i;if(r==="top"){var M={x:p+h/2,y:l-N,horizontalAnchor:"middle",verticalAnchor:_};return D&&(M.height=Math.max(l-D.y,0),M.width=h),M}if(r==="bottom"){var z={x:g+f/2,y:l+c+N,horizontalAnchor:"middle",verticalAnchor:E};return D&&(z.height=Math.max(D.y+D.height-(l+c),0),z.width=f),z}if(r==="left"){var k={x:y-A,y:l+c/2,horizontalAnchor:C,verticalAnchor:"middle"};return D&&(k.width=Math.max(k.x-D.x,0),k.height=c),k}if(r==="right"){var H={x:y+x+A,y:l+c/2,horizontalAnchor:R,verticalAnchor:"middle"};return D&&(H.width=Math.max(D.x+D.width-H.x,0),H.height=c),H}var U=D?{width:x,height:c}:{};return r==="insideLeft"?Zn({x:y+A,y:l+c/2,horizontalAnchor:R,verticalAnchor:"middle"},U):r==="insideRight"?Zn({x:y+x-A,y:l+c/2,horizontalAnchor:C,verticalAnchor:"middle"},U):r==="insideTop"?Zn({x:p+h/2,y:l+N,horizontalAnchor:"middle",verticalAnchor:E},U):r==="insideBottom"?Zn({x:g+f/2,y:l+c-N,horizontalAnchor:"middle",verticalAnchor:_},U):r==="insideTopLeft"?Zn({x:p+A,y:l+N,horizontalAnchor:R,verticalAnchor:E},U):r==="insideTopRight"?Zn({x:p+h-A,y:l+N,horizontalAnchor:C,verticalAnchor:E},U):r==="insideBottomLeft"?Zn({x:g+A,y:l+c-N,horizontalAnchor:R,verticalAnchor:_},U):r==="insideBottomRight"?Zn({x:g+f-A,y:l+c-N,horizontalAnchor:C,verticalAnchor:_},U):r&&typeof r=="object"&&(ge(r.x)||no(r.x))&&(ge(r.y)||no(r.y))?Zn({x:o+Bn(r.x,x),y:l+Bn(r.y,c),horizontalAnchor:"end",verticalAnchor:"end"},U):Zn({x:b,y:l+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},U)},DZ=["labelRef"],kZ=["content"];function mP(e,t){if(e==null)return{};var r,n,i=LZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function LZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function pP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pP(Object(r),!0).forEach(function(n){$Z(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $Z(e,t,r){return(t=IZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IZ(e){var t=zZ(e,"string");return typeof t=="symbol"?t:t+""}function zZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$a.apply(null,arguments)}var mk=S.createContext(null),BZ=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:l,children:c}=e,h=S.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:l}),[t,r,n,i,o,l]);return S.createElement(mk.Provider,{value:h},c)},pk=()=>{var e=S.useContext(mk),t=wp();return e||(t?Bj(t):void 0)},UZ=S.createContext(null),qZ=()=>{var e=S.useContext(UZ),t=ve(o4);return e||t},FZ=e=>{var{value:t,formatter:r}=e,n=mt(e.children)?t:e.children;return typeof r=="function"?r(n):n},Yw=e=>e!=null&&typeof e=="function",HZ=(e,t)=>{var r=Br(t-e),n=Math.min(Math.abs(t-e),360);return r*n},KZ=(e,t,r,n,i)=>{var{offset:o,className:l}=e,{cx:c,cy:h,innerRadius:f,outerRadius:p,startAngle:g,endAngle:y,clockWise:x}=i,b=(f+p)/2,w=HZ(g,y),N=w>=0?1:-1,_,E;switch(t){case"insideStart":_=g+N*o,E=x;break;case"insideEnd":_=y-N*o,E=!x;break;case"end":_=y+N*o,E=x;break;default:throw new Error("Unsupported position ".concat(t))}E=w<=0?E:!E;var T=lr(c,h,b,_),A=lr(c,h,b,_+(E?1:-1)*359),C="M".concat(T.x,",").concat(T.y,`
|
|
109
|
+
A`).concat(b,",").concat(b,",0,1,").concat(E?0:1,`,
|
|
110
|
+
`).concat(A.x,",").concat(A.y),R=mt(e.id)?Uc("recharts-radial-line-"):e.id;return S.createElement("text",$a({},n,{dominantBaseline:"central",className:Xe("recharts-radial-bar-label",l)}),S.createElement("defs",null,S.createElement("path",{id:R,d:C})),S.createElement("textPath",{xlinkHref:"#".concat(R)},r))},GZ=(e,t,r)=>{var{cx:n,cy:i,innerRadius:o,outerRadius:l,startAngle:c,endAngle:h}=e,f=(c+h)/2;if(r==="outside"){var{x:p,y:g}=lr(n,i,l+t,f);return{x:p,y:g,textAnchor:p>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var y=(o+l)/2,{x,y:b}=lr(n,i,y,f);return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Dh=e=>e!=null&&"cx"in e&&ge(e.cx),YZ={angle:0,offset:5,zIndex:Gt.label,position:"middle",textBreakAll:!1};function VZ(e){if(!Dh(e))return e;var{cx:t,cy:r,outerRadius:n}=e,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function Mi(e){var t=fr(e,YZ),{viewBox:r,parentViewBox:n,position:i,value:o,children:l,content:c,className:h="",textBreakAll:f,labelRef:p}=t,g=qZ(),y=pk(),x=i==="center"?y:g??y,b,w,N;r==null?b=x:Dh(r)?b=r:b=Bj(r);var _=VZ(b);if(!b||mt(o)&&mt(l)&&!S.isValidElement(c)&&typeof c!="function")return null;var E=Oc(Oc({},t),{},{viewBox:b});if(S.isValidElement(c)){var{labelRef:T}=E,A=mP(E,DZ);return S.cloneElement(c,A)}if(typeof c=="function"){var{content:C}=E,R=mP(E,kZ);if(w=S.createElement(c,R),S.isValidElement(w))return w}else w=FZ(t);var D=Er(t);if(Dh(b)){if(i==="insideStart"||i==="insideEnd"||i==="end")return KZ(t,i,w,D,b);N=GZ(b,t.offset,t.position)}else{if(!_)return null;var M=MZ({viewBox:_,position:i,offset:t.offset,parentViewBox:Dh(n)?void 0:n});N=Oc(Oc({x:M.x,y:M.y,textAnchor:M.horizontalAnchor,verticalAnchor:M.verticalAnchor},M.width!==void 0?{width:M.width}:{}),M.height!==void 0?{height:M.height}:{})}return S.createElement(Cn,{zIndex:t.zIndex},S.createElement(Gw,$a({ref:p,className:Xe("recharts-label",h)},D,N,{textAnchor:ck(D.textAnchor)?D.textAnchor:N.textAnchor,breakAll:f}),w))}Mi.displayName="Label";var QZ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?S.createElement(Mi,$a({key:"label-implicit"},n)):ua(e)?S.createElement(Mi,$a({key:"label-implicit",value:e},n)):S.isValidElement(e)?e.type===Mi?S.cloneElement(e,Oc({key:"label-implicit"},n)):S.createElement(Mi,$a({key:"label-implicit",content:e},n)):Yw(e)?S.createElement(Mi,$a({key:"label-implicit",content:e},n)):e&&typeof e=="object"?S.createElement(Mi,$a({},e,{key:"label-implicit"},n)):null};function XZ(e){var{label:t,labelRef:r}=e,n=pk();return QZ(t,n,r)||null}var WZ=["valueAccessor"],ZZ=["dataKey","clockWise","id","textBreakAll","zIndex"];function Lm(){return Lm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lm.apply(null,arguments)}function gP(e,t){if(e==null)return{};var r,n,i=JZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function JZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var eJ=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(_Z(t))return t},gk=S.createContext(void 0),yk=gk.Provider,vk=S.createContext(void 0);vk.Provider;function tJ(){return S.useContext(gk)}function rJ(){return S.useContext(vk)}function kh(e){var{valueAccessor:t=eJ}=e,r=gP(e,WZ),{dataKey:n,clockWise:i,id:o,textBreakAll:l,zIndex:c}=r,h=gP(r,ZZ),f=tJ(),p=rJ(),g=f||p;return!g||!g.length?null:S.createElement(Cn,{zIndex:c??Gt.label},S.createElement(sn,{className:"recharts-label-list"},g.map((y,x)=>{var b,w=mt(n)?t(y,x):Ot(y.payload,n),N=mt(o)?{}:{id:"".concat(o,"-").concat(x)};return S.createElement(Mi,Lm({key:"label-".concat(x)},Er(y),h,N,{fill:(b=r.fill)!==null&&b!==void 0?b:y.fill,parentViewBox:y.parentViewBox,value:w,textBreakAll:l,viewBox:y.viewBox,index:x,zIndex:0}))})))}kh.displayName="LabelList";function xk(e){var{label:t}=e;return t?t===!0?S.createElement(kh,{key:"labelList-implicit"}):S.isValidElement(t)||Yw(t)?S.createElement(kh,{key:"labelList-implicit",content:t}):typeof t=="object"?S.createElement(kh,Lm({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Pb(){return Pb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pb.apply(null,arguments)}var bk=e=>{var{cx:t,cy:r,r:n,className:i}=e,o=Xe("recharts-dot",i);return ge(t)&&ge(r)&&ge(n)?S.createElement("circle",Pb({},zn(e),Aj(e),{className:o,cx:t,cy:r,r:n})):null},nJ={radiusAxis:{},angleAxis:{}},jk=br({name:"polarAxis",initialState:nJ,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:Nle,removeRadiusAxis:_le,addAngleAxis:Ole,removeAngleAxis:Ele}=jk.actions,aJ=jk.reducer;function iJ(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var nx={exports:{}},tt={};/**
|
|
111
|
+
* @license React
|
|
112
|
+
* react-is.production.js
|
|
113
|
+
*
|
|
114
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
115
|
+
*
|
|
116
|
+
* This source code is licensed under the MIT license found in the
|
|
117
|
+
* LICENSE file in the root directory of this source tree.
|
|
118
|
+
*/var yP;function sJ(){if(yP)return tt;yP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function b(w){if(typeof w=="object"&&w!==null){var N=w.$$typeof;switch(N){case e:switch(w=w.type,w){case r:case i:case n:case h:case f:case y:return w;default:switch(w=w&&w.$$typeof,w){case l:case c:case g:case p:return w;case o:return w;default:return N}}case t:return N}}}return tt.ContextConsumer=o,tt.ContextProvider=l,tt.Element=e,tt.ForwardRef=c,tt.Fragment=r,tt.Lazy=g,tt.Memo=p,tt.Portal=t,tt.Profiler=i,tt.StrictMode=n,tt.Suspense=h,tt.SuspenseList=f,tt.isContextConsumer=function(w){return b(w)===o},tt.isContextProvider=function(w){return b(w)===l},tt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},tt.isForwardRef=function(w){return b(w)===c},tt.isFragment=function(w){return b(w)===r},tt.isLazy=function(w){return b(w)===g},tt.isMemo=function(w){return b(w)===p},tt.isPortal=function(w){return b(w)===t},tt.isProfiler=function(w){return b(w)===i},tt.isStrictMode=function(w){return b(w)===n},tt.isSuspense=function(w){return b(w)===h},tt.isSuspenseList=function(w){return b(w)===f},tt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===i||w===n||w===h||w===f||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===l||w.$$typeof===o||w.$$typeof===c||w.$$typeof===x||w.getModuleId!==void 0)},tt.typeOf=b,tt}var vP;function oJ(){return vP||(vP=1,nx.exports=sJ()),nx.exports}var lJ=oJ(),xP=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",bP=null,ax=null,wk=e=>{if(e===bP&&Array.isArray(ax))return ax;var t=[];return S.Children.forEach(e,r=>{mt(r)||(lJ.isFragment(r)?t=t.concat(wk(r.props.children)):t.push(r))}),ax=t,bP=e,t};function uJ(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>xP(i)):n=[xP(t)],wk(e).forEach(i=>{var o=Hl(i,"type.displayName")||Hl(i,"type.name");o&&n.indexOf(o)!==-1&&r.push(i)}),r}var Sk=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,ix={},jP;function cJ(){return jP||(jP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var i;if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const o=r[Symbol.toStringTag];return o==null||!((i=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag))!=null&&i.writable)?!1:r.toString()===`[object ${o}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(ix)),ix}var sx,wP;function dJ(){return wP||(wP=1,sx=cJ().isPlainObject),sx}var fJ=dJ();const hJ=rs(fJ);var SP,NP,_P,OP,EP;function AP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function TP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AP(Object(r),!0).forEach(function(n){mJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mJ(e,t,r){return(t=pJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pJ(e){var t=gJ(e,"string");return typeof t=="symbol"?t:t+""}function gJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $m(){return $m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$m.apply(null,arguments)}function xc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var CP=(e,t,r,n,i)=>{var o=r-n,l;return l=bt(SP||(SP=xc(["M ",",",""])),e,t),l+=bt(NP||(NP=xc(["L ",",",""])),e+r,t),l+=bt(_P||(_P=xc(["L ",",",""])),e+r-o/2,t+i),l+=bt(OP||(OP=xc(["L ",",",""])),e+r-o/2-n,t+i),l+=bt(EP||(EP=xc(["L ",","," Z"])),e,t),l},yJ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},vJ=e=>{var t=fr(e,yJ),{x:r,y:n,upperWidth:i,lowerWidth:o,height:l,className:c}=t,{animationEasing:h,animationDuration:f,animationBegin:p,isUpdateAnimationActive:g}=t,y=S.useRef(null),[x,b]=S.useState(-1),w=S.useRef(i),N=S.useRef(o),_=S.useRef(l),E=S.useRef(r),T=S.useRef(n),A=Ep(e,"trapezoid-");if(S.useEffect(()=>{if(y.current&&y.current.getTotalLength)try{var Z=y.current.getTotalLength();Z&&b(Z)}catch{}},[]),r!==+r||n!==+n||i!==+i||o!==+o||l!==+l||i===0&&o===0||l===0)return null;var C=Xe("recharts-trapezoid",c);if(!g)return S.createElement("g",null,S.createElement("path",$m({},Er(t),{className:C,d:CP(r,n,i,o,l)})));var R=w.current,D=N.current,M=_.current,z=E.current,k=T.current,H="0px ".concat(x===-1?1:x,"px"),U="".concat(x,"px ").concat(x,"px"),ae=M3(["strokeDasharray"],f,h);return S.createElement(Op,{animationId:A,key:A,canBegin:x>0,duration:f,easing:h,isActive:g,begin:p},Z=>{var G=jt(R,i,Z),L=jt(D,o,Z),F=jt(M,l,Z),J=jt(z,r,Z),re=jt(k,n,Z);y.current&&(w.current=G,N.current=L,_.current=F,E.current=J,T.current=re);var oe=Z>0?{transition:ae,strokeDasharray:U}:{strokeDasharray:H};return S.createElement("path",$m({},Er(t),{className:C,d:CP(J,re,G,L,F),ref:y,style:TP(TP({},oe),t.style)}))})},xJ=["option","shapeType","activeClassName","inActiveClassName"];function bJ(e,t){if(e==null)return{};var r,n,i=jJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jJ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function PP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Im(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PP(Object(r),!0).forEach(function(n){wJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wJ(e,t,r){return(t=SJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SJ(e){var t=NJ(e,"string");return typeof t=="symbol"?t:t+""}function NJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _J(e,t){return Im(Im({},t),e)}function OJ(e,t){return e==="symbols"}function RP(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return S.createElement($3,r);case"trapezoid":return S.createElement(vJ,r);case"sector":return S.createElement(B3,r);case"symbols":if(OJ(t))return S.createElement(Ej,r);break;case"curve":return S.createElement(R3,r);default:return null}}function EJ(e){return S.isValidElement(e)?e.props:e}function Nk(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=bJ(e,xJ),l;if(S.isValidElement(t))l=S.cloneElement(t,Im(Im({},o),EJ(t)));else if(typeof t=="function")l=t(o,o.index);else if(hJ(t)&&typeof t!="boolean"){var c=_J(t,o);l=S.createElement(RP,{shapeType:r,elementProps:c})}else{var h=o;l=S.createElement(RP,{shapeType:r,elementProps:h})}return o.isActive?S.createElement(sn,{className:n},l):S.createElement(sn,{className:i},l)}var _k=(e,t,r)=>{var n=ct();return(i,o)=>l=>{e==null||e(i,o,l),n(RD({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},Ok=e=>{var t=ct();return(r,n)=>i=>{e==null||e(r,n,i),t(HQ())}},Ek=(e,t,r)=>{var n=ct();return(i,o)=>l=>{e==null||e(i,o,l),n(KQ({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function Ak(e){var{tooltipEntrySettings:t}=e,r=ct(),n=jr(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(BQ(t)):i.current!==t&&r(UQ({prev:i.current,next:t})),i.current=t)},[t,r,n]),S.useLayoutEffect(()=>()=>{i.current&&(r(qQ(i.current)),i.current=null)},[r]),null}function Tk(e){var{legendPayload:t}=e,r=ct(),n=jr(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(CF(t)):i.current!==t&&r(PF({prev:i.current,next:t})),i.current=t)},[r,n,t]),S.useLayoutEffect(()=>()=>{i.current&&(r(RF(i.current)),i.current=null)},[r]),null}var ox,AJ=()=>{var[e]=S.useState(()=>Uc("uid-"));return e},TJ=(ox=ZI.useId)!==null&&ox!==void 0?ox:AJ;function CJ(e,t){var r=TJ();return t||(e?"".concat(e,"-").concat(r):r)}var PJ=S.createContext(void 0),Ck=e=>{var{id:t,type:r,children:n}=e,i=CJ("recharts-".concat(r),t);return S.createElement(PJ.Provider,{value:i},n(i))},RJ={cartesianItems:[],polarItems:[]},Pk=br({name:"graphicalItems",initialState:RJ,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ot()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:ot()},removeCartesianGraphicalItem:{reducer(e,t){var r=On(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:ot()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ot()},removePolarGraphicalItem:{reducer(e,t){var r=On(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:ot()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).polarItems.indexOf(r);i>-1&&(e.polarItems[i]=n)},prepare:ot()}}}),{addCartesianGraphicalItem:MJ,replaceCartesianGraphicalItem:DJ,removeCartesianGraphicalItem:kJ,addPolarGraphicalItem:Ale,removePolarGraphicalItem:Tle,replacePolarGraphicalItem:Cle}=Pk.actions,LJ=Pk.reducer,$J=e=>{var t=ct(),r=S.useRef(null);return S.useLayoutEffect(()=>{r.current===null?t(MJ(e)):r.current!==e&&t(DJ({prev:r.current,next:e})),r.current=e},[t,e]),S.useLayoutEffect(()=>()=>{r.current&&(t(kJ(r.current)),r.current=null)},[t]),null},Rk=S.memo($J),IJ=["points"];function MP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MP(Object(r),!0).forEach(function(n){zJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zJ(e,t,r){return(t=BJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BJ(e){var t=UJ(e,"string");return typeof t=="symbol"?t:t+""}function UJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zm(){return zm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zm.apply(null,arguments)}function qJ(e,t){if(e==null)return{};var r,n,i=FJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function FJ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function HJ(e){var{option:t,dotProps:r,className:n}=e;if(S.isValidElement(t))return S.cloneElement(t,r);if(typeof t=="function")return t(r);var i=Xe(n,typeof t!="boolean"?t.className:""),o=r??{},{points:l}=o,c=qJ(o,IJ);return S.createElement(bk,zm({},c,{className:i}))}function KJ(e,t){return e==null?!1:t?!0:e.length===1}function GJ(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:o,baseProps:l,needClip:c,clipPathId:h,zIndex:f=Gt.scatter}=e;if(!KJ(t,r))return null;var p=Sk(r),g=g9(r),y=t.map((b,w)=>{var N,_,E=lx(lx(lx({r:3},l),g),{},{index:w,cx:(N=b.x)!==null&&N!==void 0?N:void 0,cy:(_=b.y)!==null&&_!==void 0?_:void 0,dataKey:o,value:b.value,payload:b.payload,points:t});return S.createElement(HJ,{key:"dot-".concat(w),option:r,dotProps:E,className:i})}),x={};return c&&h!=null&&(x.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(h,")")),S.createElement(Cn,{zIndex:f},S.createElement(sn,zm({className:n},x),y))}function DP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DP(Object(r),!0).forEach(function(n){YJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YJ(e,t,r){return(t=VJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VJ(e){var t=QJ(e,"string");return typeof t=="symbol"?t:t+""}function QJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mk=0,XJ={xAxis:{},yAxis:{},zAxis:{}},Dk=br({name:"cartesianAxis",initialState:XJ,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:ot()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=n)},prepare:ot()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:ot()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:ot()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=n)},prepare:ot()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:ot()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:ot()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=n)},prepare:ot()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:ot()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var o,l=i.widthHistory||[];if(l.length===3&&l[0]===l[2]&&n===l[1]&&n!==i.width&&Math.abs(n-((o=l[0])!==null&&o!==void 0?o:0))<=1)return;var c=[...l,n].slice(-3);e.yAxis[r]=kP(kP({},i),{},{width:n,widthHistory:c})}}}}),{addXAxis:WJ,replaceXAxis:ZJ,removeXAxis:JJ,addYAxis:eee,replaceYAxis:tee,removeYAxis:ree,addZAxis:Ple,replaceZAxis:Rle,removeZAxis:Mle,updateYAxisWidth:nee}=Dk.actions,aee=Dk.reducer,iee=Q([Vt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),see=Q([iee,Wa,Za],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),Vw=()=>ve(see),oee=()=>ve(BX);function LP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ux(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LP(Object(r),!0).forEach(function(n){lee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lee(e,t,r){return(t=uee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uee(e){var t=cee(e,"string");return typeof t=="symbol"?t:t+""}function cee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dee=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:o,clipPath:l}=e;if(i===!1||t.x==null||t.y==null)return null;var c={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},h=ux(ux(ux({},c),gd(i)),Aj(i)),f;return S.isValidElement(i)?f=S.cloneElement(i,h):typeof i=="function"?f=i(h):f=S.createElement(bk,h),S.createElement(sn,{className:"recharts-active-dot",clipPath:l},f)};function fee(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:o,zIndex:l=Gt.activeDot}=e,c=ve(uo),h=oee();if(t==null||h==null)return null;var f=t.find(p=>h.includes(p.payload));return mt(f)?null:S.createElement(Cn,{zIndex:l},S.createElement(dee,{point:f,childIndex:Number(c),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var $P=(e,t,r)=>{var n=r??e;if(!mt(n))return Bn(n,t,0)},hee=(e,t,r)=>{var n={},i=e.filter(Mp),o=e.filter(f=>f.stackId==null),l=i.reduce((f,p)=>{var g=f[p.stackId];return g==null&&(g=[]),g.push(p),f[p.stackId]=g,f},n),c=Object.entries(l).map(f=>{var p,[g,y]=f,x=y.map(w=>w.dataKey),b=$P(t,r,(p=y[0])===null||p===void 0?void 0:p.barSize);return{stackId:g,dataKeys:x,barSize:b}}),h=o.map(f=>{var p=[f.dataKey].filter(y=>y!=null),g=$P(t,r,f.barSize);return{stackId:void 0,dataKeys:p,barSize:g}});return[...c,...h]};function IP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IP(Object(r),!0).forEach(function(n){mee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mee(e,t,r){return(t=pee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pee(e){var t=gee(e,"string");return typeof t=="symbol"?t:t+""}function gee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yee(e,t,r,n,i){var o,l=n.length;if(!(l<1)){var c=Bn(e,r,0,!0),h,f=[];if(Be((o=n[0])===null||o===void 0?void 0:o.barSize)){var p=!1,g=r/l,y=n.reduce((E,T)=>E+(T.barSize||0),0);y+=(l-1)*c,y>=r&&(y-=(l-1)*c,c=0),y>=r&&g>0&&(p=!0,g*=.9,y=l*g);var x=(r-y)/2>>0,b={offset:x-c,size:0};h=n.reduce((E,T)=>{var A,C={stackId:T.stackId,dataKeys:T.dataKeys,position:{offset:b.offset+b.size+c,size:p?g:(A=T.barSize)!==null&&A!==void 0?A:0}},R=[...E,C];return b=C.position,R},f)}else{var w=Bn(t,r,0,!0);r-2*w-(l-1)*c<=0&&(c=0);var N=(r-2*w-(l-1)*c)/l;N>1&&(N>>=0);var _=Be(i)?Math.min(N,i):N;h=n.reduce((E,T,A)=>[...E,{stackId:T.stackId,dataKeys:T.dataKeys,position:{offset:w+(N+c)*A+(N-_)/2,size:_}}],f)}return h}}var vee=(e,t,r,n,i,o,l)=>{var c=mt(l)?t:l,h=yee(r,n,i!==o?i:o,e,c);return i!==o&&h!=null&&(h=h.map(f=>xh(xh({},f),{},{position:xh(xh({},f.position),{},{offset:f.position.offset-i/2})}))),h},xee=(e,t)=>{var r=tw(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:o}=i;if(o)return o.find(l=>l.key===r)}}}},bee=(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}};function jee(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Be(e.zIndex)?e.zIndex:t}var wee=e=>{var{chartData:t}=e,r=ct(),n=jr();return S.useEffect(()=>n?()=>{}:(r(ZC(t)),()=>{r(ZC(void 0))}),[t,r,n]),null},zP={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},kk=br({name:"brush",initialState:zP,reducers:{setBrushSettings(e,t){return t.payload==null?zP:t.payload}}}),{setBrushSettings:Dle}=kk.actions,See=kk.reducer;function Nee(e){return(e%180+180)%180}var _ee=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Nee(i),l=o*Math.PI/180,c=Math.atan(n/r),h=l>c&&l<Math.PI-c?n/Math.sin(l):r/Math.cos(l);return Math.abs(h)},Oee={dots:[],areas:[],lines:[]},Lk=br({name:"referenceElements",initialState:Oee,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=On(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=On(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=On(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:kle,removeDot:Lle,addArea:$le,removeArea:Ile,addLine:zle,removeLine:Ble}=Lk.actions,Eee=Lk.reducer,Aee=S.createContext(void 0),Tee=e=>{var{children:t}=e,[r]=S.useState("".concat(Uc("recharts"),"-clip")),n=Vw();if(n==null)return null;var{x:i,y:o,width:l,height:c}=n;return S.createElement(Aee.Provider,{value:r},S.createElement("defs",null,S.createElement("clipPath",{id:r},S.createElement("rect",{x:i,y:o,height:c,width:l}))),t)};function $k(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var i=e[n];i!==void 0&&r.push(i)}return r}function Cee(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return _ee(n,r)}function Pee(e,t,r){var n=r==="width",{x:i,y:o,width:l,height:c}=e;return t===1?{start:n?i:o,end:n?i+l:o+c}:{start:n?i+l:o+c,end:n?i:o}}function td(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function Ree(e,t){return $k(e,t+1)}function Mee(e,t,r,n,i){for(var o=(n||[]).slice(),{start:l,end:c}=t,h=0,f=1,p=l,g=function(){var b=n==null?void 0:n[h];if(b===void 0)return{v:$k(n,f)};var w=h,N,_=()=>(N===void 0&&(N=r(b,w)),N),E=b.coordinate,T=h===0||td(e,E,_,p,c);T||(h=0,p=l,f+=1),T&&(p=E+e*(_()/2+i),h+=f)},y;f<=o.length;)if(y=g(),y)return y.v;return[]}function Dee(e,t,r,n,i){var o=(n||[]).slice(),l=o.length;if(l===0)return[];for(var{start:c,end:h}=t,f=1;f<=l;f++){for(var p=(l-1)%f,g=c,y=!0,x=function(){var A=n[w];if(A==null)return 0;var C=w,R,D=()=>(R===void 0&&(R=r(A,C)),R),M=A.coordinate,z=w===p||td(e,M,D,g,h);if(!z)return y=!1,1;z&&(g=M+e*(D()/2+i))},b,w=p;w<l&&(b=x(),!(b!==0&&b===1));w+=f);if(y){for(var N=[],_=p;_<l;_+=f){var E=n[_];E!=null&&N.push(E)}return N}}return[]}function BP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BP(Object(r),!0).forEach(function(n){kee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kee(e,t,r){return(t=Lee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lee(e){var t=$ee(e,"string");return typeof t=="symbol"?t:t+""}function $ee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Iee(e,t,r,n,i){for(var o=(n||[]).slice(),l=o.length,{start:c}=t,{end:h}=t,f=function(y){var x=o[y];if(x==null)return 1;var b=x,w,N=()=>(w===void 0&&(w=r(x,y)),w);if(y===l-1){var _=e*(b.coordinate+e*N()/2-h);o[y]=b=yr(yr({},b),{},{tickCoord:_>0?b.coordinate-_*e:b.coordinate})}else o[y]=b=yr(yr({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var E=td(e,b.tickCoord,N,c,h);E&&(h=b.tickCoord-e*(N()/2+i),o[y]=yr(yr({},b),{},{isShow:!0}))}},p=l-1;p>=0;p--)f(p);return o}function zee(e,t,r,n,i,o){var l=(n||[]).slice(),c=l.length,{start:h,end:f}=t;if(o){var p=n[c-1];if(p!=null){var g=r(p,c-1),y=e*(p.coordinate+e*g/2-f);if(l[c-1]=p=yr(yr({},p),{},{tickCoord:y>0?p.coordinate-y*e:p.coordinate}),p.tickCoord!=null){var x=td(e,p.tickCoord,()=>g,h,f);x&&(f=p.tickCoord-e*(g/2+i),l[c-1]=yr(yr({},p),{},{isShow:!0}))}}}for(var b=o?c-1:c,w=function(E){var T=l[E];if(T==null)return 1;var A=T,C,R=()=>(C===void 0&&(C=r(T,E)),C);if(E===0){var D=e*(A.coordinate-e*R()/2-h);l[E]=A=yr(yr({},A),{},{tickCoord:D<0?A.coordinate-D*e:A.coordinate})}else l[E]=A=yr(yr({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var M=td(e,A.tickCoord,R,h,f);M&&(h=A.tickCoord+e*(R()/2+i),l[E]=yr(yr({},A),{},{isShow:!0}))}},N=0;N<b;N++)w(N);return l}function Qw(e,t,r){var{tick:n,ticks:i,viewBox:o,minTickGap:l,orientation:c,interval:h,tickFormatter:f,unit:p,angle:g}=e;if(!i||!i.length||!n)return[];if(ge(h)||Sd.isSsr){var y;return(y=Ree(i,ge(h)?h:0))!==null&&y!==void 0?y:[]}var x=[],b=c==="top"||c==="bottom"?"width":"height",w=p&&b==="width"?Ac(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},N=(C,R)=>{var D=typeof f=="function"?f(C.value,R):C.value;return b==="width"?Cee(Ac(D,{fontSize:t,letterSpacing:r}),w,g):Ac(D,{fontSize:t,letterSpacing:r})[b]},_=i[0],E=i[1],T=i.length>=2&&_!=null&&E!=null?Br(E.coordinate-_.coordinate):1,A=Pee(o,T,b);return h==="equidistantPreserveStart"?Mee(T,A,N,i,l):h==="equidistantPreserveEnd"?Dee(T,A,N,i,l):(h==="preserveStart"||h==="preserveStartEnd"?x=zee(T,A,N,i,l,h==="preserveStartEnd"):x=Iee(T,A,N,i,l),x.filter(C=>C.isShow))}var Bee=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:o=0}=e,l=0;if(t){Array.from(t).forEach(p=>{if(p){var g=p.getBoundingClientRect();g.width>l&&(l=g.width)}});var c=r?r.getBoundingClientRect().width:0,h=i+o,f=l+h+c+(r?n:0);return Math.round(f)}return 0},Uee={xAxis:{},yAxis:{}},Ik=br({name:"renderedTicks",initialState:Uee,reducers:{setRenderedTicks:(e,t)=>{var{axisType:r,axisId:n,ticks:i}=t.payload;e[r][n]=i},removeRenderedTicks:(e,t)=>{var{axisType:r,axisId:n}=t.payload;delete e[r][n]}}}),{setRenderedTicks:qee,removeRenderedTicks:Fee}=Ik.actions,Hee=Ik.reducer,Kee=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function Gee(e,t){if(e==null)return{};var r,n,i=Yee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Yee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function co(){return co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},co.apply(null,arguments)}function UP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UP(Object(r),!0).forEach(function(n){Vee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vee(e,t,r){return(t=Qee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qee(e){var t=Xee(e,"string");return typeof t=="symbol"?t:t+""}function Xee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ka={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Gt.axis};function Wee(e){var{x:t,y:r,width:n,height:i,orientation:o,mirror:l,axisLine:c,otherSvgProps:h}=e;if(!c)return null;var f=xt(xt(xt({},h),zn(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var p=+(o==="top"&&!l||o==="bottom"&&l);f=xt(xt({},f),{},{x1:t,y1:r+p*i,x2:t+n,y2:r+p*i})}else{var g=+(o==="left"&&!l||o==="right"&&l);f=xt(xt({},f),{},{x1:t+g*n,y1:r,x2:t+g*n,y2:r+i})}return S.createElement("line",co({},f,{className:Xe("recharts-cartesian-axis-line",Hl(c,"className"))}))}function Zee(e,t,r,n,i,o,l,c,h){var f,p,g,y,x,b,w=c?-1:1,N=e.tickSize||l,_=ge(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":f=p=e.coordinate,y=r+ +!c*i,g=y-w*N,b=g-w*h,x=_;break;case"left":g=y=e.coordinate,p=t+ +!c*n,f=p-w*N,x=f-w*h,b=_;break;case"right":g=y=e.coordinate,p=t+ +c*n,f=p+w*N,x=f+w*h,b=_;break;default:f=p=e.coordinate,y=r+ +c*i,g=y+w*N,b=g+w*h,x=_;break}return{line:{x1:f,y1:g,x2:p,y2:y},tick:{x,y:b}}}function Jee(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function ete(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function tte(e){var{option:t,tickProps:r,value:n}=e,i,o=Xe(r.className,"recharts-cartesian-axis-tick-value");if(S.isValidElement(t))i=S.cloneElement(t,xt(xt({},r),{},{className:o}));else if(typeof t=="function")i=t(xt(xt({},r),{},{className:o}));else{var l="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(l=Xe(l,iJ(t))),i=S.createElement(Gw,co({},r,{className:l}),n)}return i}function rte(e){var{ticks:t,axisType:r,axisId:n}=e,i=ct();return S.useEffect(()=>{if(n==null||r==null)return go;var o=t.map(l=>({value:l.value,coordinate:l.coordinate,offset:l.offset,index:l.index}));return i(qee({ticks:o,axisId:n,axisType:r})),()=>{i(Fee({axisId:n,axisType:r}))}},[i,t,n,r]),null}var nte=S.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:o,tickFormatter:l,unit:c,padding:h,tickTextProps:f,orientation:p,mirror:g,x:y,y:x,width:b,height:w,tickSize:N,tickMargin:_,fontSize:E,letterSpacing:T,getTicksConfig:A,events:C,axisType:R,axisId:D}=e,M=Qw(xt(xt({},A),{},{ticks:r}),E,T),z=zn(A),k=gd(n),H=ck(z.textAnchor)?z.textAnchor:Jee(p,g),U=ete(p,g),ae={};typeof i=="object"&&(ae=i);var Z=xt(xt({},z),{},{fill:"none"},ae),G=M.map(J=>xt({entry:J},Zee(J,y,x,b,w,p,N,g,_))),L=G.map(J=>{var{entry:re,line:oe}=J;return S.createElement(sn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(re.value,"-").concat(re.coordinate,"-").concat(re.tickCoord)},i&&S.createElement("line",co({},Z,oe,{className:Xe("recharts-cartesian-axis-tick-line",Hl(i,"className"))})))}),F=G.map((J,re)=>{var oe,$,{entry:X,tick:le}=J,ue=xt(xt(xt(xt({verticalAnchor:U},z),{},{textAnchor:H,stroke:"none",fill:o},le),{},{index:re,payload:X,visibleTicksCount:M.length,tickFormatter:l,padding:h},f),{},{angle:(oe=($=f==null?void 0:f.angle)!==null&&$!==void 0?$:z.angle)!==null&&oe!==void 0?oe:0}),pe=xt(xt({},ue),k);return S.createElement(sn,co({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(X.value,"-").concat(X.coordinate,"-").concat(X.tickCoord)},sp(C,X,re)),n&&S.createElement(tte,{option:n,tickProps:pe,value:"".concat(typeof l=="function"?l(X.value,re):X.value).concat(c||"")}))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(R,"-ticks")},S.createElement(rte,{ticks:M,axisId:D,axisType:R}),F.length>0&&S.createElement(Cn,{zIndex:Gt.label},S.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(R,"-tick-labels"),ref:t},F)),L.length>0&&S.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(R,"-tick-lines")},L))}),ate=S.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:o,hide:l,ticks:c,axisType:h,axisId:f}=e,p=Gee(e,Kee),[g,y]=S.useState(""),[x,b]=S.useState(""),w=S.useRef(null);S.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return Bee({ticks:w.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var N=S.useCallback(_=>{if(_){var E=_.getElementsByClassName("recharts-cartesian-axis-tick-value");w.current=E;var T=E[0];if(T){var A=window.getComputedStyle(T),C=A.fontSize,R=A.letterSpacing;(C!==g||R!==x)&&(y(C),b(R))}}},[g,x]);return l||n!=null&&n<=0||i!=null&&i<=0?null:S.createElement(Cn,{zIndex:e.zIndex},S.createElement(sn,{className:Xe("recharts-cartesian-axis",o)},S.createElement(Wee,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:zn(e)}),S.createElement(nte,{ref:N,axisType:h,events:p,fontSize:g,getTicksConfig:e,height:e.height,letterSpacing:x,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:f}),S.createElement(BZ,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},S.createElement(XZ,{label:e.label,labelRef:e.labelRef}),e.children)))}),Xw=S.forwardRef((e,t)=>{var r=fr(e,Ka);return S.createElement(ate,co({},r,{ref:t}))});Xw.displayName="CartesianAxis";var ite=["x1","y1","x2","y2","key"],ste=["offset"],ote=["xAxisId","yAxisId"],lte=["xAxisId","yAxisId"];function qP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qP(Object(r),!0).forEach(function(n){ute(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ute(e,t,r){return(t=cte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cte(e){var t=dte(e,"string");return typeof t=="symbol"?t:t+""}function dte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $s(){return $s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$s.apply(null,arguments)}function Bm(e,t){if(e==null)return{};var r,n,i=fte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var hte=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:o,height:l,ry:c}=e;return S.createElement("rect",{x:n,y:i,ry:c,width:o,height:l,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function zk(e){var{option:t,lineItemProps:r}=e,n;if(S.isValidElement(t))n=S.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,{x1:o,y1:l,x2:c,y2:h,key:f}=r,p=Bm(r,ite),g=(i=zn(p))!==null&&i!==void 0?i:{},{offset:y}=g,x=Bm(g,ste);n=S.createElement("line",$s({},x,{x1:o,y1:l,x2:c,y2:h,fill:"none",key:f}))}return n}function mte(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:o,yAxisId:l}=e,c=Bm(e,ote),h=i.map((f,p)=>{var g=vr(vr({},c),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(p),index:p});return S.createElement(zk,{key:"line-".concat(p),option:n,lineItemProps:g})});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},h)}function pte(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:o,yAxisId:l}=e,c=Bm(e,lte),h=i.map((f,p)=>{var g=vr(vr({},c),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(p),index:p});return S.createElement(zk,{option:n,lineItemProps:g,key:"line-".concat(p)})});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},h)}function gte(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:o,height:l,horizontalPoints:c,horizontal:h=!0}=e;if(!h||!t||!t.length||c==null)return null;var f=c.map(g=>Math.round(g+i-i)).sort((g,y)=>g-y);i!==f[0]&&f.unshift(0);var p=f.map((g,y)=>{var x=f[y+1],b=x==null,w=b?i+l-g:x-g;if(w<=0)return null;var N=y%t.length;return S.createElement("rect",{key:"react-".concat(y),y:g,x:n,height:w,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function yte(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:o,width:l,height:c,verticalPoints:h}=e;if(!t||!r||!r.length)return null;var f=h.map(g=>Math.round(g+i-i)).sort((g,y)=>g-y);i!==f[0]&&f.unshift(0);var p=f.map((g,y)=>{var x=f[y+1],b=x==null,w=b?i+l-g:x-g;if(w<=0)return null;var N=y%r.length;return S.createElement("rect",{key:"react-".concat(y),x:g,y:o,width:w,height:c,stroke:"none",fill:r[N],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var vte=(e,t)=>{var{xAxis:r,width:n,height:i,offset:o}=e;return h3(Qw(vr(vr(vr({},Ka),r),{},{ticks:m3(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},xte=(e,t)=>{var{yAxis:r,width:n,height:i,offset:o}=e;return h3(Qw(vr(vr(vr({},Ka),r),{},{ticks:m3(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},bte={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Gt.grid};function Gp(e){var t=Uj(),r=qj(),n=x3(),i=vr(vr({},fr(e,bte)),{},{x:ge(e.x)?e.x:n.left,y:ge(e.y)?e.y:n.top,width:ge(e.width)?e.width:n.width,height:ge(e.height)?e.height:n.height}),{xAxisId:o,yAxisId:l,x:c,y:h,width:f,height:p,syncWithTicks:g,horizontalValues:y,verticalValues:x}=i,b=jr(),w=ve(z=>zC(z,"xAxis",o,b)),N=ve(z=>zC(z,"yAxis",l,b));if(!ca(f)||!ca(p)||!ge(c)||!ge(h))return null;var _=i.verticalCoordinatesGenerator||vte,E=i.horizontalCoordinatesGenerator||xte,{horizontalPoints:T,verticalPoints:A}=i;if((!T||!T.length)&&typeof E=="function"){var C=y&&y.length,R=E({yAxis:N?vr(vr({},N),{},{ticks:C?y:N.ticks}):void 0,width:t??f,height:r??p,offset:n},C?!0:g);dm(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof R,"]")),Array.isArray(R)&&(T=R)}if((!A||!A.length)&&typeof _=="function"){var D=x&&x.length,M=_({xAxis:w?vr(vr({},w),{},{ticks:D?x:w.ticks}):void 0,width:t??f,height:r??p,offset:n},D?!0:g);dm(Array.isArray(M),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof M,"]")),Array.isArray(M)&&(A=M)}return S.createElement(Cn,{zIndex:i.zIndex},S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(hte,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),S.createElement(gte,$s({},i,{horizontalPoints:T})),S.createElement(yte,$s({},i,{verticalPoints:A})),S.createElement(mte,$s({},i,{offset:n,horizontalPoints:T,xAxis:w,yAxis:N})),S.createElement(pte,$s({},i,{offset:n,verticalPoints:A,xAxis:w,yAxis:N}))))}Gp.displayName="CartesianGrid";var jte={},Bk=br({name:"errorBars",initialState:jte,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(o=>o.dataKey===n.dataKey&&o.direction===n.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:Ule,replaceErrorBar:qle,removeErrorBar:Fle}=Bk.actions,wte=Bk.reducer,Ste=["children"];function Nte(e,t){if(e==null)return{};var r,n,i=_te(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function _te(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Ote={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Ete=S.createContext(Ote);function Uk(e){var{children:t}=e,r=Nte(e,Ste);return S.createElement(Ete.Provider,{value:r},t)}function Ww(e,t){var r,n,i=ve(f=>ei(f,e)),o=ve(f=>ti(f,t)),l=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:Lt.allowDataOverflow,c=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:$t.allowDataOverflow,h=l||c;return{needClip:h,needClipX:l,needClipY:c}}function qk(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=Vw(),{needClipX:o,needClipY:l,needClip:c}=Ww(t,r);if(!c||!i)return null;var{x:h,y:f,width:p,height:g}=i;return S.createElement("clipPath",{id:"clipPath-".concat(n)},S.createElement("rect",{x:o?h:h-p/2,y:l?f:f-g/2,width:o?p:p*2,height:l?g:g*2}))}var Fk=(e,t,r,n)=>es(e,"xAxis",t,n),Hk=(e,t,r,n)=>Ji(e,"xAxis",t,n),Kk=(e,t,r,n)=>es(e,"yAxis",r,n),Gk=(e,t,r,n)=>Ji(e,"yAxis",r,n),Ate=Q([We,Fk,Kk,Hk,Gk],(e,t,r,n,i)=>Xa(e,"xAxis")?Gl(t,n,!1):Gl(r,i,!1)),Tte=(e,t,r,n,i)=>i;function Cte(e){return e.type==="line"}var Pte=Q([qp,Tte],(e,t)=>e.filter(Cte).find(r=>r.id===t)),Rte=Q([We,Fk,Kk,Hk,Gk,Pte,Ate,Nd],(e,t,r,n,i,o,l,c)=>{var{chartData:h,dataStartIndex:f,dataEndIndex:p}=c;if(!(o==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||l==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:g,data:y}=o,x;if(y!=null&&y.length>0?x=y:x=h==null?void 0:h.slice(f,p+1),x!=null)return Jte({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:g,bandSize:l,displayedData:x})}});function Mte(e){var t=gd(e),r=3,n=2;if(t!=null){var{r:i,strokeWidth:o}=t,l=Number(i),c=Number(o);return(Number.isNaN(l)||l<0)&&(l=r),(Number.isNaN(c)||c<0)&&(c=n),{r:l,strokeWidth:c}}return{r,strokeWidth:n}}var Dte=["id"],kte=["type","layout","connectNulls","needClip","shape"],Lte=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function rd(){return rd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rd.apply(null,arguments)}function FP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(r),!0).forEach(function(n){$te(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $te(e,t,r){return(t=Ite(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ite(e){var t=zte(e,"string");return typeof t=="symbol"?t:t+""}function zte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zw(e,t){if(e==null)return{};var r,n,i=Bte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Bte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Ute=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:n,value:yp(r,t),payload:e}]},qte=S.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:o,name:l,hide:c,unit:h,tooltipType:f,id:p}=e,g={dataDefinedOnItem:r,getPosition:go,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:yp(l,t),hide:c,type:f,color:n,unit:h,graphicalItemId:p}};return S.createElement(Ak,{tooltipEntrySettings:g})}),Yk=(e,t)=>"".concat(t,"px ").concat(e,"px");function Fte(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n.push(...r);return n}var Hte=(e,t,r)=>{var n=r.reduce((y,x)=>y+x,0);if(!n)return Yk(t,e);for(var i=Math.floor(e/n),o=e%n,l=[],c=0,h=0;c<r.length;h+=(f=r[c])!==null&&f!==void 0?f:0,++c){var f,p=r[c];if(p!=null&&h+p>o){l=[...r.slice(0,c),o-h];break}}var g=l.length%2===0?[0,t]:[t];return[...Fte(r,i),...l,...g].map(y=>"".concat(y,"px")).join(", ")};function Kte(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:o,needClip:l}=n,{id:c}=n,h=Zw(n,Dte),f=zn(h);return S.createElement(GJ,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:f,needClip:l,clipPathId:t})}function Gte(e){var{showLabels:t,children:r,points:n}=e,i=S.useMemo(()=>n==null?void 0:n.map(o=>{var l,c,h={x:(l=o.x)!==null&&l!==void 0?l:0,y:(c=o.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return na(na({},h),{},{value:o.value,payload:o.payload,viewBox:h,parentViewBox:void 0,fill:void 0})}),[n]);return S.createElement(yk,{value:t?i:void 0},r)}function HP(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:o}=e,{type:l,layout:c,connectNulls:h,needClip:f,shape:p}=o,g=Zw(o,kte),y=na(na({},Er(g)),{},{fill:"none",className:"recharts-line-curve",clipPath:f?"url(#clipPath-".concat(t,")"):void 0,points:n,type:l,layout:c,connectNulls:h,strokeDasharray:i??o.strokeDasharray});return S.createElement(S.Fragment,null,(n==null?void 0:n.length)>1&&S.createElement(Nk,rd({shapeType:"curve",option:p},y,{pathRef:r})),S.createElement(Kte,{points:n,clipPathId:t,props:o}))}function Yte(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Vte(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:l,strokeDasharray:c,isAnimationActive:h,animationBegin:f,animationDuration:p,animationEasing:g,animateNewValues:y,width:x,height:b,onAnimationEnd:w,onAnimationStart:N}=r,_=i.current,E=Ep(l,"recharts-line-"),T=S.useRef(E),[A,C]=S.useState(!1),R=!A,D=S.useCallback(()=>{typeof w=="function"&&w(),C(!1)},[w]),M=S.useCallback(()=>{typeof N=="function"&&N(),C(!0)},[N]),z=Yte(n.current),k=S.useRef(0);T.current!==E&&(k.current=o.current,T.current=E);var H=k.current;return S.createElement(Gte,{points:l,showLabels:R},r.children,S.createElement(Op,{animationId:E,begin:f,duration:p,isActive:h,easing:g,onAnimationEnd:D,onAnimationStart:M,key:E},U=>{var ae=jt(H,z+H,U),Z=Math.min(ae,z),G;if(h)if(c){var L="".concat(c).split(/[,\s]+/gim).map(re=>parseFloat(re));G=Hte(Z,z,L)}else G=Yk(z,Z);else G=c==null?void 0:String(c);if(U>0&&z>0&&(i.current=l,o.current=Math.max(o.current,Z)),_){var F=_.length/l.length,J=U===1?l:l.map((re,oe)=>{var $=Math.floor(oe*F);if(_[$]){var X=_[$];return na(na({},re),{},{x:jt(X.x,re.x,U),y:jt(X.y,re.y,U)})}return y?na(na({},re),{},{x:jt(x*2,re.x,U),y:jt(b/2,re.y,U)}):na(na({},re),{},{x:re.x,y:re.y})});return i.current=J,S.createElement(HP,{props:r,points:J,clipPathId:t,pathRef:n,strokeDasharray:G})}return S.createElement(HP,{props:r,points:l,clipPathId:t,pathRef:n,strokeDasharray:G})}),S.createElement(xk,{label:r.label}))}function Qte(e){var{clipPathId:t,props:r}=e,n=S.useRef(null),i=S.useRef(0),o=S.useRef(null);return S.createElement(Vte,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:o})}var Xte=(e,t)=>{var r,n;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(n=e.y)!==null&&n!==void 0?n:void 0,value:e.value,errorVal:Ot(e.payload,t)}};class Wte extends S.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:o,yAxisId:l,top:c,left:h,width:f,height:p,id:g,needClip:y,zIndex:x}=this.props;if(t)return null;var b=Xe("recharts-line",i),w=g,{r:N,strokeWidth:_}=Mte(r),E=Sk(r),T=N*2+_,A=y?"url(#clipPath-".concat(E?"":"dots-").concat(w,")"):void 0;return S.createElement(Cn,{zIndex:x},S.createElement(sn,{className:b},y&&S.createElement("defs",null,S.createElement(qk,{clipPathId:w,xAxisId:o,yAxisId:l}),!E&&S.createElement("clipPath",{id:"clipPath-dots-".concat(w)},S.createElement("rect",{x:h-T/2,y:c-T/2,width:f+T,height:p+T}))),S.createElement(Uk,{xAxisId:o,yAxisId:l,data:n,dataPointFormatter:Xte,errorBarOffset:0},S.createElement(Qte,{props:this.props,clipPathId:w}))),S.createElement(fee,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:A}))}}var Vk={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Gt.line,type:"linear"};function Zte(e){var t=fr(e,Vk),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:o,animationEasing:l,connectNulls:c,dot:h,hide:f,isAnimationActive:p,label:g,legendType:y,xAxisId:x,yAxisId:b,id:w}=t,N=Zw(t,Lte),{needClip:_}=Ww(x,b),E=Vw(),T=yo(),A=jr(),C=ve(k=>Rte(k,x,b,A,w));if(T!=="horizontal"&&T!=="vertical"||C==null||E==null)return null;var{height:R,width:D,x:M,y:z}=E;return S.createElement(Wte,rd({},N,{id:w,connectNulls:c,dot:h,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:o,animationEasing:l,isAnimationActive:p,hide:f,label:g,legendType:y,xAxisId:x,yAxisId:b,points:C,layout:T,height:R,width:D,left:M,top:z,needClip:_}))}function Jte(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,dataKey:l,bandSize:c,displayedData:h}=e;return h.map((f,p)=>{var g=Ot(f,l);if(t==="horizontal"){var y=PA({axis:r,ticks:i,bandSize:c,entry:f,index:p}),x=mt(g)?null:n.scale.map(g);return{x:y,y:x??null,value:g,payload:f}}var b=mt(g)?null:r.scale.map(g),w=PA({axis:n,ticks:o,bandSize:c,entry:f,index:p});return b==null||w==null?null:{x:b,y:w,value:g,payload:f}}).filter(Boolean)}function ere(e){var t=fr(e,Vk),r=jr();return S.createElement(Ck,{id:t.id,type:"line"},n=>S.createElement(S.Fragment,null,S.createElement(Tk,{legendPayload:Ute(t)}),S.createElement(qte,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),S.createElement(Rk,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),S.createElement(Zte,rd({},t,{id:n}))))}var Qk=S.memo(ere,ru);Qk.displayName="Line";function jo(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:Mk}function wo(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:Mk}var tre="Invariant failed";function rre(e,t){throw new Error(tre)}function Rb(){return Rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rb.apply(null,arguments)}function Jw(e){return S.createElement(Nk,Rb({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var nre=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(ge(t))return t;var o=ge(n)||mt(n);return o?t(n,i):(o||rre(),r)}},are=(e,t,r)=>r,ire=(e,t)=>t,Dd=Q([qp,ire],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),sre=Q([Dd],e=>e==null?void 0:e.maxBarSize),ore=(e,t,r,n)=>n,lre=Q([We,qp,jo,wo,are],(e,t,r,n,i)=>t.filter(o=>e==="horizontal"?o.xAxisId===r:o.yAxisId===n).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),ure=(e,t,r)=>{var n=We(e),i=jo(e,t),o=wo(e,t);if(!(i==null||o==null))return n==="horizontal"?Eb(e,"yAxis",o,r):Eb(e,"xAxis",i,r)},cre=(e,t)=>{var r=We(e),n=jo(e,t),i=wo(e,t);if(!(n==null||i==null))return r==="horizontal"?IC(e,"xAxis",n):IC(e,"yAxis",i)},dre=Q([lre,YK,cre],hee),fre=(e,t,r)=>{var n,i,o=Dd(e,t);if(o==null)return 0;var l=jo(e,t),c=wo(e,t);if(l==null||c==null)return 0;var h=We(e),f=J3(e),{maxBarSize:p}=o,g=mt(p)?f:p,y,x;return h==="horizontal"?(y=es(e,"xAxis",l,r),x=Ji(e,"xAxis",l,r)):(y=es(e,"yAxis",c,r),x=Ji(e,"yAxis",c,r)),(n=(i=Gl(y,x,!0))!==null&&i!==void 0?i:g)!==null&&n!==void 0?n:0},Xk=(e,t,r)=>{var n=We(e),i=jo(e,t),o=wo(e,t);if(!(i==null||o==null)){var l,c;return n==="horizontal"?(l=es(e,"xAxis",i,r),c=Ji(e,"xAxis",i,r)):(l=es(e,"yAxis",o,r),c=Ji(e,"yAxis",o,r)),Gl(l,c)}},hre=Q([dre,J3,GK,e4,fre,Xk,sre],vee),mre=(e,t,r)=>{var n=jo(e,t);if(n!=null)return es(e,"xAxis",n,r)},pre=(e,t,r)=>{var n=wo(e,t);if(n!=null)return es(e,"yAxis",n,r)},gre=(e,t,r)=>{var n=jo(e,t);if(n!=null)return Ji(e,"xAxis",n,r)},yre=(e,t,r)=>{var n=wo(e,t);if(n!=null)return Ji(e,"yAxis",n,r)},vre=Q([hre,Dd],bee),xre=Q([ure,Dd],xee),bre=Q([Vt,$j,mre,pre,gre,yre,vre,We,IK,Xk,xre,Dd,ore],(e,t,r,n,i,o,l,c,h,f,p,g,y)=>{var{chartData:x,dataStartIndex:b,dataEndIndex:w}=h;if(!(g==null||l==null||t==null||c!=="horizontal"&&c!=="vertical"||r==null||n==null||i==null||o==null||f==null)){var{data:N}=g,_;if(N!=null&&N.length>0?_=N:_=x==null?void 0:x.slice(b,w+1),_!=null)return Vre({layout:c,barSettings:g,pos:l,parentViewBox:t,bandSize:f,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,stackedData:p,displayedData:_,offset:e,cells:y,dataStartIndex:b})}}),jre=["index"];function Mb(){return Mb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mb.apply(null,arguments)}function wre(e,t){if(e==null)return{};var r,n,i=Sre(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Sre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Wk=S.createContext(void 0),Nre=e=>{var t=S.useContext(Wk);if(t!=null)return t.stackId;if(e!=null)return P7(e)},_re=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),Ore=e=>{var t=S.useContext(Wk);if(t!=null){var{stackId:r}=t;return"url(#".concat(_re(r,e),")")}},Zk=e=>{var{index:t}=e,r=wre(e,jre),n=Ore(t);return S.createElement(sn,Mb({className:"recharts-bar-stack-layer",clipPath:n},r))},Ere=["onMouseEnter","onMouseLeave","onClick"],Are=["value","background","tooltipPosition"],Tre=["id"],Cre=["onMouseEnter","onClick","onMouseLeave"];function ts(){return ts=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ts.apply(null,arguments)}function KP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KP(Object(r),!0).forEach(function(n){Pre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pre(e,t,r){return(t=Rre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rre(e){var t=Mre(e,"string");return typeof t=="symbol"?t:t+""}function Mre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Um(e,t){if(e==null)return{};var r,n,i=Dre(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Dre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var kre=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:n,value:yp(r,t),payload:e}]},Lre=S.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:o,hide:l,unit:c,tooltipType:h,id:f}=e,p={dataDefinedOnItem:void 0,getPosition:go,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:yp(o,t),hide:l,type:h,color:i,unit:c,graphicalItemId:f}};return S.createElement(Ak,{tooltipEntrySettings:p})});function $re(e){var t=ve(uo),{data:r,dataKey:n,background:i,allOtherBarProps:o}=e,{onMouseEnter:l,onMouseLeave:c,onClick:h}=o,f=Um(o,Ere),p=_k(l,n,o.id),g=Ok(c),y=Ek(h,n,o.id);if(!i||r==null)return null;var x=gd(i);return S.createElement(Cn,{zIndex:jee(i,Gt.barBackground)},r.map((b,w)=>{var{value:N,background:_,tooltipPosition:E}=b,T=Um(b,Are);if(!_)return null;var A=p(b,w),C=g(b,w),R=y(b,w),D=Nr(Nr(Nr(Nr(Nr({option:i,isActive:String(w)===t},T),{},{fill:"#eee"},_),x),sp(f,b,w)),{},{onMouseEnter:A,onMouseLeave:C,onClick:R,dataKey:n,index:w,className:"recharts-bar-background-rectangle"});return S.createElement(Jw,ts({key:"background-bar-".concat(w)},D))}))}function Ire(e){var{showLabels:t,children:r,rects:n}=e,i=n==null?void 0:n.map(o=>{var l={x:o.x,y:o.y,width:o.width,lowerWidth:o.width,upperWidth:o.width,height:o.height};return Nr(Nr({},l),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:l,fill:o.fill})});return S.createElement(yk,{value:t?i:void 0},r)}function zre(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:o,dataKey:l}=e,c=ve(uo),h=ve(VD),f=r&&String(i.originalDataIndex)===c&&(h==null||l===h),[p,g]=S.useState(!1),[y,x]=S.useState(!1);S.useEffect(()=>{var T;return f?(g(!0),T=requestAnimationFrame(()=>{x(!0)})):x(!1),()=>{cancelAnimationFrame(T)}},[f]);var b=S.useCallback(()=>{f||g(!1)},[f]),w=f&&y,N=f||p,_;f?r===!0?_=t:_=r:_=t;var E=S.createElement(Jw,ts({},n,{name:String(n.name)},i,{isActive:w,option:_,index:o,dataKey:l,onTransitionEnd:b}));return N?S.createElement(Cn,{zIndex:Gt.activeBar},S.createElement(Zk,{index:i.originalDataIndex},E)):E}function Bre(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:o}=e;return S.createElement(Jw,ts({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:o}))}function Ure(e){var t,{data:r,props:n}=e,i=(t=zn(n))!==null&&t!==void 0?t:{},{id:o}=i,l=Um(i,Tre),{shape:c,dataKey:h,activeBar:f}=n,{onMouseEnter:p,onClick:g,onMouseLeave:y}=n,x=Um(n,Cre),b=_k(p,h,o),w=Ok(y),N=Ek(g,h,o);return r?S.createElement(S.Fragment,null,r.map((_,E)=>S.createElement(Zk,ts({index:_.originalDataIndex,key:"rectangle-".concat(_==null?void 0:_.x,"-").concat(_==null?void 0:_.y,"-").concat(_==null?void 0:_.value,"-").concat(E),className:"recharts-bar-rectangle"},sp(x,_,E),{onMouseEnter:b(_,E),onMouseLeave:w(_,E),onClick:N(_,E)}),f?S.createElement(zre,{shape:c,activeBar:f,baseProps:l,entry:_,index:E,dataKey:h}):S.createElement(Bre,{shape:c,baseProps:l,entry:_,index:E,dataKey:h})))):null}function qre(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:o,animationBegin:l,animationDuration:c,animationEasing:h,onAnimationEnd:f,onAnimationStart:p}=t,g=r.current,y=Ep(t,"recharts-bar-"),[x,b]=S.useState(!1),w=!x,N=S.useCallback(()=>{typeof f=="function"&&f(),b(!1)},[f]),_=S.useCallback(()=>{typeof p=="function"&&p(),b(!0)},[p]);return S.createElement(Ire,{showLabels:w,rects:n},S.createElement(Op,{animationId:y,begin:l,duration:c,isActive:o,easing:h,onAnimationEnd:N,onAnimationStart:_,key:y},E=>{var T=E===1?n:n==null?void 0:n.map((A,C)=>{var R=g&&g[C];if(R)return Nr(Nr({},A),{},{x:jt(R.x,A.x,E),y:jt(R.y,A.y,E),width:jt(R.width,A.width,E),height:jt(R.height,A.height,E)});if(i==="horizontal"){var D=jt(0,A.height,E),M=jt(A.stackedBarStart,A.y,E);return Nr(Nr({},A),{},{y:M,height:D})}var z=jt(0,A.width,E),k=jt(A.stackedBarStart,A.x,E);return Nr(Nr({},A),{},{width:z,x:k})});return E>0&&(r.current=T??null),T==null?null:S.createElement(sn,null,S.createElement(Ure,{props:t,data:T}))}),S.createElement(xk,{label:t.label}),t.children)}function Fre(e){var t=S.useRef(null);return S.createElement(qre,{previousRectanglesRef:t,props:e})}var Jk=0,Hre=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Ot(e,t)}};class Kre extends S.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:o,yAxisId:l,needClip:c,background:h,id:f}=this.props;if(t||r==null)return null;var p=Xe("recharts-bar",i),g=f;return S.createElement(sn,{className:p,id:f},c&&S.createElement("defs",null,S.createElement(qk,{clipPathId:g,xAxisId:o,yAxisId:l})),S.createElement(sn,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(g,")"):void 0},S.createElement($re,{data:r,dataKey:n,background:h,allOtherBarProps:this.props}),S.createElement(Fre,this.props)))}}var Gre={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:Jk,xAxisId:0,yAxisId:0,zIndex:Gt.bar};function Yre(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:h,animationEasing:f,isAnimationActive:p}=e,{needClip:g}=Ww(t,r),y=yo(),x=jr(),b=uJ(e.children,Kw),w=ve(E=>bre(E,e.id,x,b));if(y!=="vertical"&&y!=="horizontal")return null;var N,_=w==null?void 0:w[0];return _==null||_.height==null||_.width==null?N=0:N=y==="vertical"?_.height/2:_.width/2,S.createElement(Uk,{xAxisId:t,yAxisId:r,data:w,dataPointFormatter:Hre,errorBarOffset:N},S.createElement(Kre,ts({},e,{layout:y,needClip:g,data:w,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:h,animationEasing:f,isAnimationActive:p})))}function Vre(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n,hasCustomShape:i},pos:o,bandSize:l,xAxis:c,yAxis:h,xAxisTicks:f,yAxisTicks:p,stackedData:g,displayedData:y,offset:x,cells:b,parentViewBox:w,dataStartIndex:N}=e,_=t==="horizontal"?h:c,E=g?_.scale.domain():null,T=R7({numericAxis:_}),A=_.scale.map(T);return y.map((C,R)=>{var D,M,z,k,H,U;if(g){var ae=g[R+N];if(ae==null)return null;D=O7(ae,E)}else D=Ot(C,r),Array.isArray(D)||(D=[T,D]);var Z=nre(n,Jk)(D[1],R);if(t==="horizontal"){var G,L=h.scale.map(D[0]),F=h.scale.map(D[1]);if(L==null||F==null)return null;M=RA({axis:c,ticks:f,bandSize:l,offset:o.offset,entry:C,index:R}),z=(G=F??L)!==null&&G!==void 0?G:void 0,k=o.size;var J=L-F;if(H=la(J)?0:J,U={x:M,y:x.top,width:k,height:x.height},Math.abs(Z)>0&&Math.abs(H)<Math.abs(Z)){var re=Br(H||Z)*(Math.abs(Z)-Math.abs(H));z-=re,H+=re}}else{var oe=c.scale.map(D[0]),$=c.scale.map(D[1]);if(oe==null||$==null)return null;if(M=oe,z=RA({axis:h,ticks:p,bandSize:l,offset:o.offset,entry:C,index:R}),k=$-oe,H=o.size,U={x:x.left,y:z,width:x.width,height:H},Math.abs(Z)>0&&Math.abs(k)<Math.abs(Z)){var X=Br(k||Z)*(Math.abs(Z)-Math.abs(k));k+=X}}if(M==null||z==null||k==null||H==null||!i&&(k===0||H===0))return null;var le=Nr(Nr({},C),{},{stackedBarStart:A,x:M,y:z,width:k,height:H,value:g?D:D[1],payload:C,background:U,tooltipPosition:{x:M+k/2,y:z+H/2},parentViewBox:w,originalDataIndex:R},b&&b[R]&&b[R].props);return le}).filter(Boolean)}function Qre(e){var t=fr(e,Gre),r=Nre(t.stackId),n=jr();return S.createElement(Ck,{id:t.id,type:"bar"},i=>S.createElement(S.Fragment,null,S.createElement(Tk,{legendPayload:kre(t)}),S.createElement(Lre,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:i}),S.createElement(Rk,{type:"bar",id:i,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n,hasCustomShape:t.shape!=null}),S.createElement(Cn,{zIndex:t.zIndex},S.createElement(Yre,ts({},t,{id:i})))))}var eS=S.memo(Qre,ru);eS.displayName="Bar";var Xre=["domain","range"],Wre=["domain","range"];function GP(e,t){if(e==null)return{};var r,n,i=Zre(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function YP(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function e5(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=GP(e,Xre),{domain:o,range:l}=t,c=GP(t,Wre);return!YP(r,o)||!YP(n,l)?!1:ru(i,c)}var Jre=["type"],ene=["dangerouslySetInnerHTML","ticks","scale"],tne=["id","scale"];function Db(){return Db=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Db.apply(null,arguments)}function VP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function QP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VP(Object(r),!0).forEach(function(n){rne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rne(e,t,r){return(t=nne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nne(e){var t=ane(e,"string");return typeof t=="symbol"?t:t+""}function ane(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kb(e,t){if(e==null)return{};var r,n,i=ine(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ine(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function sne(e){var t=ct(),r=S.useRef(null),n=b3(),{type:i}=e,o=kb(e,Jre),l=Cp(n,"xAxis",i),c=S.useMemo(()=>{if(l!=null)return QP(QP({},o),{},{type:l})},[o,l]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(WJ(c)):r.current!==c&&t(ZJ({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(JJ(r.current)),r.current=null)},[t]),null}var one=e=>{var{xAxisId:t,className:r}=e,n=ve($j),i=jr(),o="xAxis",l=ve(_=>OD(_,o,t,i)),c=ve(_=>SD(_,t)),h=ve(_=>AQ(_,t)),f=ve(_=>K4(_,t));if(c==null||h==null||f==null)return null;var{dangerouslySetInnerHTML:p,ticks:g,scale:y}=e,x=kb(e,ene),{id:b,scale:w}=f,N=kb(f,tne);return S.createElement(Xw,Db({},x,N,{x:h.x,y:h.y,width:c.width,height:c.height,className:Xe("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:l,axisType:o,axisId:t}))},lne={allowDataOverflow:Lt.allowDataOverflow,allowDecimals:Lt.allowDecimals,allowDuplicatedCategory:Lt.allowDuplicatedCategory,angle:Lt.angle,axisLine:Ka.axisLine,height:Lt.height,hide:!1,includeHidden:Lt.includeHidden,interval:Lt.interval,label:!1,minTickGap:Lt.minTickGap,mirror:Lt.mirror,orientation:Lt.orientation,padding:Lt.padding,reversed:Lt.reversed,scale:Lt.scale,tick:Lt.tick,tickCount:Lt.tickCount,tickLine:Ka.tickLine,tickSize:Ka.tickSize,type:Lt.type,niceTicks:Lt.niceTicks,xAxisId:0},une=e=>{var t=fr(e,lne);return S.createElement(S.Fragment,null,S.createElement(sne,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),S.createElement(one,t))},Yp=S.memo(une,e5);Yp.displayName="XAxis";var cne=["type"],dne=["dangerouslySetInnerHTML","ticks","scale"],fne=["id","scale"];function Lb(){return Lb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lb.apply(null,arguments)}function XP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function WP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XP(Object(r),!0).forEach(function(n){hne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hne(e,t,r){return(t=mne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mne(e){var t=pne(e,"string");return typeof t=="symbol"?t:t+""}function pne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $b(e,t){if(e==null)return{};var r,n,i=gne(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function gne(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function yne(e){var t=ct(),r=S.useRef(null),n=b3(),{type:i}=e,o=$b(e,cne),l=Cp(n,"yAxis",i),c=S.useMemo(()=>{if(l!=null)return WP(WP({},o),{},{type:l})},[l,o]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(eee(c)):r.current!==c&&t(tee({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(ree(r.current)),r.current=null)},[t]),null}function vne(e){var{yAxisId:t,className:r,width:n,label:i}=e,o=S.useRef(null),l=S.useRef(null),c=ve($j),h=jr(),f=ct(),p="yAxis",g=ve(R=>ND(R,t)),y=ve(R=>CQ(R,t)),x=ve(R=>OD(R,p,t,h)),b=ve(R=>G4(R,t));if(S.useLayoutEffect(()=>{if(!(n!=="auto"||!g||Yw(i)||S.isValidElement(i)||b==null)){var R=o.current;if(R){var D=R.getCalculatedWidth();Math.round(g.width)!==Math.round(D)&&f(nee({id:t,width:D}))}}},[x,g,f,i,t,n,b]),g==null||y==null||b==null)return null;var{dangerouslySetInnerHTML:w,ticks:N,scale:_}=e,E=$b(e,dne),{id:T,scale:A}=b,C=$b(b,fne);return S.createElement(Xw,Lb({},E,C,{ref:o,labelRef:l,x:y.x,y:y.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:Xe("recharts-".concat(p," ").concat(p),r),viewBox:c,ticks:x,axisType:p,axisId:t}))}var xne={allowDataOverflow:$t.allowDataOverflow,allowDecimals:$t.allowDecimals,allowDuplicatedCategory:$t.allowDuplicatedCategory,angle:$t.angle,axisLine:Ka.axisLine,hide:!1,includeHidden:$t.includeHidden,interval:$t.interval,label:!1,minTickGap:$t.minTickGap,mirror:$t.mirror,orientation:$t.orientation,padding:$t.padding,reversed:$t.reversed,scale:$t.scale,tick:$t.tick,tickCount:$t.tickCount,tickLine:Ka.tickLine,tickSize:Ka.tickSize,type:$t.type,niceTicks:$t.niceTicks,width:$t.width,yAxisId:0},bne=e=>{var t=fr(e,xne);return S.createElement(S.Fragment,null,S.createElement(yne,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),S.createElement(vne,t))},Vp=S.memo(bne,e5);Vp.displayName="YAxis";var jne=(e,t)=>t,tS=Q([jne,We,o4,Xt,HD,ri,JX,Vt],sW);function wne(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function rS(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(wne(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var l=(c,h)=>({relativeX:Math.round((c-t.left)/r),relativeY:Math.round((h-t.top)/n)});return"touches"in e?Array.from(e.touches).map(c=>l(c.clientX,c.clientY)):l(e.clientX,e.clientY)}var t5=on("mouseClick"),r5=xd();r5.startListening({actionCreator:t5,effect:(e,t)=>{var r=e.payload,n=tS(t.getState(),rS(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(GQ({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Ib=on("mouseMove"),n5=xd(),pl=null,_s=null,cx=null;n5.startListening({actionCreator:Ib,effect:(e,t)=>{var r=e.payload,n=t.getState(),{throttleDelay:i,throttledEvents:o}=n.eventSettings,l=o==="all"||(o==null?void 0:o.includes("mousemove"));pl!==null&&(cancelAnimationFrame(pl),pl=null),_s!==null&&(typeof i!="number"||!l)&&(clearTimeout(_s),_s=null),cx=rS(r);var c=()=>{var h=t.getState(),f=Rd(h,h.tooltip.settings.shared);if(!cx){pl=null,_s=null;return}if(f==="axis"){var p=tS(h,cx);(p==null?void 0:p.activeIndex)!=null?t.dispatch(DD({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(MD())}pl=null,_s=null};if(!l){c();return}i==="raf"?pl=requestAnimationFrame(c):typeof i=="number"&&_s===null&&(_s=setTimeout(c,i))}});function Sne(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var ZP={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},a5=br({name:"rootProps",initialState:ZP,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:ZP.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),Nne=a5.reducer,{updateOptions:_ne}=a5.actions,One=null,Ene={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},i5=br({name:"polarOptions",initialState:One,reducers:Ene}),{updatePolarOptions:Hle}=i5.actions,Ane=i5.reducer,s5=on("keyDown"),o5=on("focus"),l5=on("blur"),Qp=xd(),gl=null,Os=null,bh=null;Qp.startListening({actionCreator:s5,effect:(e,t)=>{bh=e.payload,gl!==null&&(cancelAnimationFrame(gl),gl=null);var r=t.getState(),{throttleDelay:n,throttledEvents:i}=r.eventSettings,o=i==="all"||i.includes("keydown");Os!==null&&(typeof n!="number"||!o)&&(clearTimeout(Os),Os=null);var l=()=>{try{var c=t.getState(),h=c.rootProps.accessibilityLayer!==!1;if(!h)return;var{keyboardInteraction:f}=c.tooltip,p=bh;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var g=Ec(f,lo(c),Zl(c),Jl(c)),y=g==null?-1:Number(g),x=!Number.isFinite(y)||y<0,b=ri(c),w=lo(c),N=Rd(c,c.tooltip.settings.shared);if(p==="Enter"){if(x)return;var _=km(c,N,"hover",String(f.index));t.dispatch(Dm({active:!f.active,activeIndex:f.index,activeCoordinate:_}));return}var E=kQ(c),T=E==="left-to-right"?1:-1,A=p==="ArrowRight"?1:-1,C;if(x){var R=Zl(c),D=Jl(c),M=A*T,z=Z=>({active:!1,index:String(Z),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(C=-1,M>0){for(var k=0;k<w.length;k++)if(Ec(z(k),w,R,D)!=null){C=k;break}}else for(var H=w.length-1;H>=0;H--)if(Ec(z(H),w,R,D)!=null){C=H;break}if(C<0)return}else{C=y+A*T;var U=(b==null?void 0:b.length)||w.length;if(U===0||C>=U||C<0)return}var ae=km(c,N,"hover",String(C));t.dispatch(Dm({active:!0,activeIndex:C.toString(),activeCoordinate:ae}))}finally{gl=null,Os=null}};if(!o){l();return}n==="raf"?gl=requestAnimationFrame(l):typeof n=="number"&&Os===null&&(l(),bh=null,Os=setTimeout(()=>{bh?l():(Os=null,gl=null)},n))}});Qp.startListening({actionCreator:o5,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var o="0",l=Rd(r,r.tooltip.settings.shared),c=km(r,l,"hover",String(o));t.dispatch(Dm({active:!0,activeIndex:o,activeCoordinate:c}))}}}});Qp.startListening({actionCreator:l5,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;i.active&&t.dispatch(Dm({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function u5(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var jn=on("externalEvent"),c5=xd(),jh=new Map,bc=new Map,dx=new Map;c5.startListening({actionCreator:jn,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){var i=n.type,o=u5(n);dx.set(i,{handler:r,reactEvent:o});var l=jh.get(i);l!==void 0&&(cancelAnimationFrame(l),jh.delete(i));var c=t.getState(),{throttleDelay:h,throttledEvents:f}=c.eventSettings,p=f,g=p==="all"||(p==null?void 0:p.includes(i)),y=bc.get(i);y!==void 0&&(typeof h!="number"||!g)&&(clearTimeout(y),bc.delete(i));var x=()=>{var N=dx.get(i);try{if(!N)return;var{handler:_,reactEvent:E}=N,T=t.getState(),A={activeCoordinate:$X(T),activeDataKey:VD(T),activeIndex:uo(T),activeLabel:YD(T),activeTooltipIndex:uo(T),isTooltipActive:IX(T)};_&&_(A,E)}finally{jh.delete(i),bc.delete(i),dx.delete(i)}};if(!g){x();return}if(h==="raf"){var b=requestAnimationFrame(x);jh.set(i,b)}else if(typeof h=="number"){if(!bc.has(i)){x();var w=setTimeout(x,h);bc.set(i,w)}}else x()}}});var Tne=Q([cu],e=>e.tooltipItemPayloads),Cne=Q([Tne,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var{getPosition:i}=n;if(i!=null)return i(t)}}}),d5=on("touchMove"),f5=xd(),Es=null,Ti=null,JP=null,jc=null;f5.startListening({actionCreator:d5,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){jc=u5(r);var n=t.getState(),{throttleDelay:i,throttledEvents:o}=n.eventSettings,l=o==="all"||o.includes("touchmove");Es!==null&&(cancelAnimationFrame(Es),Es=null),Ti!==null&&(typeof i!="number"||!l)&&(clearTimeout(Ti),Ti=null),JP=Array.from(r.touches).map(h=>rS({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var c=()=>{if(jc!=null){var h=t.getState(),f=Rd(h,h.tooltip.settings.shared);if(f==="axis"){var p,g=(p=JP)===null||p===void 0?void 0:p[0];if(g==null){Es=null,Ti=null;return}var y=tS(h,g);(y==null?void 0:y.activeIndex)!=null&&t.dispatch(DD({activeIndex:y.activeIndex,activeDataKey:void 0,activeCoordinate:y.activeCoordinate}))}else if(f==="item"){var x,b=jc.touches[0];if(document.elementFromPoint==null||b==null)return;var w=document.elementFromPoint(b.clientX,b.clientY);if(!w||!w.getAttribute)return;var N=w.getAttribute(z7),_=(x=w.getAttribute(B7))!==null&&x!==void 0?x:void 0,E=bo(h).find(C=>C.id===_);if(N==null||E==null||_==null)return;var{dataKey:T}=E,A=Cne(h,N,_);t.dispatch(RD({activeDataKey:T,activeIndex:N,activeCoordinate:A,activeGraphicalItemId:_}))}Es=null,Ti=null}};if(!l){c();return}i==="raf"?Es=requestAnimationFrame(c):typeof i=="number"&&Ti===null&&(c(),jc=null,Ti=setTimeout(()=>{jc?c():(Ti=null,Es=null)},i))}}});var h5={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},m5=br({name:"eventSettings",initialState:h5,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:Pne}=m5.actions,Rne=m5.reducer,Mne=IM({brush:See,cartesianAxis:aee,chartData:LW,errorBars:wte,eventSettings:Rne,graphicalItems:LJ,layout:j7,legend:MF,options:PW,polarAxis:aJ,polarOptions:Ane,referenceElements:Eee,renderedTicks:Hee,rootProps:Nne,tooltip:YQ,zIndex:xW}),Dne=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Gq({reducer:Mne,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([r5.middleware,n5.middleware,Qp.middleware,c5.middleware,f5.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(JM({type:"raf"}))},devTools:{serialize:{replacer:Sne},name:"recharts-".concat(r)}})};function kne(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=jr(),o=S.useRef(null);if(i)return r;o.current==null&&(o.current=Dne(t,n));var l=Cj;return S.createElement(QF,{context:l,store:o.current},r)}function Lne(e){var{layout:t,margin:r}=e,n=ct(),i=jr();return S.useEffect(()=>{i||(n(v7(t)),n(y7(r)))},[n,i,t,r]),null}var $ne=S.memo(Lne,ru);function Ine(e){var t=ct();return S.useEffect(()=>{t(_ne(e))},[t,e]),null}var zne=e=>{var t=ct();return S.useEffect(()=>{t(Pne(e))},[t,e]),null},Bne=S.memo(zne,ru);function e2(e){var{zIndex:t,isPanorama:r}=e,n=S.useRef(null),i=ct();return S.useLayoutEffect(()=>(n.current&&i(yW({zIndex:t,element:n.current,isPanorama:r})),()=>{i(vW({zIndex:t,isPanorama:r}))}),[i,t,r]),S.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function t2(e){var{children:t,isPanorama:r}=e,n=ve(lW);if(!n||n.length===0)return t;var i=n.filter(l=>l<0),o=n.filter(l=>l>0);return S.createElement(S.Fragment,null,i.map(l=>S.createElement(e2,{key:l,zIndex:l,isPanorama:r})),t,o.map(l=>S.createElement(e2,{key:l,zIndex:l,isPanorama:r})))}var Une=["children"];function qne(e,t){if(e==null)return{};var r,n,i=Fne(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Fne(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function qm(){return qm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qm.apply(null,arguments)}var Hne={width:"100%",height:"100%",display:"block"},Kne=S.forwardRef((e,t)=>{var r=Uj(),n=qj(),i=P3();if(!ca(r)||!ca(n))return null;var{children:o,otherAttributes:l,title:c,desc:h}=e,f,p;return l!=null&&(typeof l.tabIndex=="number"?f=l.tabIndex:f=i?0:void 0,typeof l.role=="string"?p=l.role:p=i?"application":void 0),S.createElement(bj,qm({},l,{title:c,desc:h,role:p,tabIndex:f,width:r,height:n,style:Hne,ref:t}),o)}),Gne=e=>{var{children:t}=e,r=ve(jp);if(!r)return null;var{width:n,height:i,y:o,x:l}=r;return S.createElement(bj,{width:n,height:i,x:l,y:o},t)},r2=S.forwardRef((e,t)=>{var{children:r}=e,n=qne(e,Une),i=jr();return i?S.createElement(Gne,null,S.createElement(t2,{isPanorama:!0},r)):S.createElement(Kne,qm({ref:t},n),S.createElement(t2,{isPanorama:!1},r))});function Yne(){var e=ct(),[t,r]=S.useState(null),n=ve(I7);return S.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;Be(o)&&o!==n&&e(b7(o))}},[t,e,n]),r}function n2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n2(Object(r),!0).forEach(function(n){Qne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qne(e,t,r){return(t=Xne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xne(e){var t=Wne(e,"string");return typeof t=="symbol"?t:t+""}function Wne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wi(){return Wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wi.apply(null,arguments)}var Zne=()=>(KW(),null);function Fm(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Jne=S.forwardRef((e,t)=>{var r,n,i=S.useRef(null),[o,l]=S.useState({containerWidth:Fm((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Fm((n=e.style)===null||n===void 0?void 0:n.height)}),c=S.useCallback((f,p)=>{l(g=>{var y=Math.round(f),x=Math.round(p);return g.containerWidth===y&&g.containerHeight===x?g:{containerWidth:y,containerHeight:x}})},[]),h=S.useCallback(f=>{if(typeof t=="function"&&t(f),i.current!=null&&(i.current.disconnect(),i.current=null),f!=null&&typeof ResizeObserver<"u"){var{width:p,height:g}=f.getBoundingClientRect();c(p,g);var y=b=>{var w=b[0];if(w!=null){var{width:N,height:_}=w.contentRect;c(N,_)}},x=new ResizeObserver(y);x.observe(f),i.current=x}},[t,c]);return S.useEffect(()=>()=>{var f=i.current;f!=null&&f.disconnect()},[c]),S.createElement(S.Fragment,null,S.createElement(jd,{width:o.containerWidth,height:o.containerHeight}),S.createElement("div",Wi({ref:h},e)))}),eae=S.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,o]=S.useState({containerWidth:Fm(r),containerHeight:Fm(n)}),l=S.useCallback((h,f)=>{o(p=>{var g=Math.round(h),y=Math.round(f);return p.containerWidth===g&&p.containerHeight===y?p:{containerWidth:g,containerHeight:y}})},[]),c=S.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null){var{width:f,height:p}=h.getBoundingClientRect();l(f,p)}},[t,l]);return S.createElement(S.Fragment,null,S.createElement(jd,{width:i.containerWidth,height:i.containerHeight}),S.createElement("div",Wi({ref:c},e)))}),tae=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return S.createElement(S.Fragment,null,S.createElement(jd,{width:r,height:n}),S.createElement("div",Wi({ref:t},e)))}),rae=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?S.createElement(eae,Wi({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?S.createElement(tae,Wi({},e,{width:r,height:n,ref:t})):S.createElement(S.Fragment,null,S.createElement(jd,{width:r,height:n}),S.createElement("div",Wi({ref:t},e)))});function nae(e){return e?Jne:rae}var aae=S.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:o,onContextMenu:l,onDoubleClick:c,onMouseDown:h,onMouseEnter:f,onMouseLeave:p,onMouseMove:g,onMouseUp:y,onTouchEnd:x,onTouchMove:b,onTouchStart:w,style:N,width:_,responsive:E,dispatchTouchEvents:T=!0}=e,A=S.useRef(null),C=ct(),[R,D]=S.useState(null),[M,z]=S.useState(null),k=Yne(),H=Ij(),U=(H==null?void 0:H.width)>0?H.width:_,ae=(H==null?void 0:H.height)>0?H.height:i,Z=S.useCallback(te=>{k(te),typeof t=="function"&&t(te),D(te),z(te),te!=null&&(A.current=te)},[k,t,D,z]),G=S.useCallback(te=>{C(t5(te)),C(jn({handler:o,reactEvent:te}))},[C,o]),L=S.useCallback(te=>{C(Ib(te)),C(jn({handler:f,reactEvent:te}))},[C,f]),F=S.useCallback(te=>{C(MD()),C(jn({handler:p,reactEvent:te}))},[C,p]),J=S.useCallback(te=>{C(Ib(te)),C(jn({handler:g,reactEvent:te}))},[C,g]),re=S.useCallback(()=>{C(o5())},[C]),oe=S.useCallback(()=>{C(l5())},[C]),$=S.useCallback(te=>{C(s5(te.key))},[C]),X=S.useCallback(te=>{C(jn({handler:l,reactEvent:te}))},[C,l]),le=S.useCallback(te=>{C(jn({handler:c,reactEvent:te}))},[C,c]),ue=S.useCallback(te=>{C(jn({handler:h,reactEvent:te}))},[C,h]),pe=S.useCallback(te=>{C(jn({handler:y,reactEvent:te}))},[C,y]),xe=S.useCallback(te=>{C(jn({handler:w,reactEvent:te}))},[C,w]),we=S.useCallback(te=>{T&&C(d5(te)),C(jn({handler:b,reactEvent:te}))},[C,T,b]),_e=S.useCallback(te=>{C(jn({handler:x,reactEvent:te}))},[C,x]),de=nae(E);return S.createElement(tk.Provider,{value:R},S.createElement(JR.Provider,{value:M},S.createElement(de,{width:U??(N==null?void 0:N.width),height:ae??(N==null?void 0:N.height),className:Xe("recharts-wrapper",n),style:Vne({position:"relative",cursor:"default",width:U,height:ae},N),onClick:G,onContextMenu:X,onDoubleClick:le,onFocus:re,onBlur:oe,onKeyDown:$,onMouseDown:ue,onMouseEnter:L,onMouseLeave:F,onMouseMove:J,onMouseUp:pe,onTouchEnd:_e,onTouchMove:we,onTouchStart:xe,ref:Z},S.createElement(Zne,null),r)))}),iae=["width","height","responsive","children","className","style","compact","title","desc"];function sae(e,t){if(e==null)return{};var r,n,i=oae(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function oae(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var lae=S.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:o,className:l,style:c,compact:h,title:f,desc:p}=e,g=sae(e,iae),y=zn(g);return h?S.createElement(S.Fragment,null,S.createElement(jd,{width:r,height:n}),S.createElement(r2,{otherAttributes:y,title:f,desc:p},o)):S.createElement(aae,{className:l,style:c,width:r,height:n,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},S.createElement(r2,{otherAttributes:y,title:f,desc:p,ref:t},S.createElement(Tee,null,o)))});function zb(){return zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zb.apply(null,arguments)}function a2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?a2(Object(r),!0).forEach(function(n){cae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cae(e,t,r){return(t=dae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dae(e){var t=fae(e,"string");return typeof t=="symbol"?t:t+""}function fae(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hae={top:5,right:5,bottom:5,left:5},mae=uae({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:hae,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},h5),p5=S.forwardRef(function(t,r){var n,i=fr(t.categoricalChartProps,mae),{chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:h,categoricalChartProps:f}=t,p={chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:h,eventEmitter:void 0};return S.createElement(kne,{preloadedState:{options:p},reduxStoreName:(n=f.id)!==null&&n!==void 0?n:o},S.createElement(wee,{chartData:f.data}),S.createElement($ne,{layout:i.layout,margin:i.margin}),S.createElement(Bne,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),S.createElement(Ine,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),S.createElement(lae,zb({},i,{ref:r})))}),pae=["axis"],gae=S.forwardRef((e,t)=>S.createElement(p5,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:pae,tooltipPayloadSearcher:rk,categoricalChartProps:e,ref:t})),yae=["axis","item"],g5=S.forwardRef((e,t)=>S.createElement(p5,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:yae,tooltipPayloadSearcher:rk,categoricalChartProps:e,ref:t}));const y5="Uncategorized";function v5(e){const t=e==null?void 0:e.replace(/\\/g,"/").split("/").map(r=>r.trim()).filter(r=>r.length>0).join("/");return t&&t.length>0?t:y5}function vae(e,t){const r=new Map,n=o=>{const l=r.get(o);if(l)return l;const c={results:[],suites:new Set,children:new Set};return r.set(o,c),c};for(const o of e){const l=v5(o.category),c=o.suite??"Uncategorized",h=xae(l);for(const f of h){const p=n(f);p.results.push(o),p.suites.add(c)}for(let f=1;f<h.length;f++)n(h[f-1]).children.add(h[f])}const i=new Map([...r.entries()].map(([o,l])=>[o,wae(o,l,t)]));return[...i.values()].filter(o=>!o.parent).sort(b5).map(o=>x5(o,r,i))}function xae(e){const t=e.split("/").filter(r=>r.length>0);return t.length===0?[y5]:t.map((r,n)=>t.slice(0,n+1).join("/"))}function bae(e){const t=e.split("/");return t.length>1?t.slice(0,-1).join("/"):void 0}function jae(e){return e.split("/").at(-1)??e}function wae(e,t,r){const n=rp(t.results,r),i=bae(e);return{name:e,label:jae(e),...i&&{parent:i},depth:e.split("/").filter(Boolean).length-1,total:n.total,passed:n.passed,failed:n.failed,executionErrors:n.executionErrors,avgScore:n.avgScore,suiteCount:t.suites.size,childCount:t.children.size,children:[]}}function x5(e,t,r){var i;const n=[...((i=t.get(e.name))==null?void 0:i.children)??[]].map(o=>r.get(o)).filter(o=>!!o).sort(b5).map(o=>x5(o,t,r));return{...e,children:n}}function b5(e,t){return e.name.localeCompare(t.name)}const Di="",Bb=[{value:"all",label:"All time"},{value:"24h",label:"Last 24h",windowMs:1440*60*1e3},{value:"7d",label:"Last 7d",windowMs:10080*60*1e3},{value:"30d",label:"Last 30d",windowMs:720*60*60*1e3}],fx=10;function Sae(e,t,r=new Date){const n=Nae(e),i=Oae(e,n),o=Eae(n.flatMap(g=>g.category?Cae(g.category):[])),l=o.length>0,c=n.some(g=>g.startedAtMs!==void 0),h=Bb.find(g=>g.value===t.timePeriod)??Bb[0],f=h.windowMs===void 0?void 0:r.getTime()-h.windowMs,p=n.filter(g=>t.experiment&&g.experiment!==t.experiment||t.category&&!Pae(g.category,t.category)?!1:f!==void 0?g.startedAtMs!==void 0&&g.startedAtMs>=f:!0);return{buckets:Aae(p.map(g=>g.score)),experimentOptions:i,categoryOptions:o,totalScores:n.length,filteredScores:p.length,categoryAvailable:l,hasTimestampedScores:c}}function Nae(e){return e.runs&&e.runs.length>0?e.runs.flatMap(t=>_ae(t)):e.cells.flatMap(t=>t.tests.flatMap(r=>{const n=j5(r,t.experiment);return n?[n]:[]}))}function _ae(e){const t=Rae(e.started_at);return e.tests.flatMap(r=>{const n=j5(r,e.experiment);return n?[{...n,startedAtMs:t}]:[]})}function j5(e,t){if(!Number.isFinite(e.score))return;const r=Tae(e.category);return{score:e.score,experiment:t,...r&&{category:r}}}function Oae(e,t){const r=new Map,n=new Set(e.experiments);for(const i of e.cells)n.add(i.experiment);for(const i of t)n.add(i.experiment),r.set(i.experiment,(r.get(i.experiment)??0)+1);return[...n].sort((i,o)=>i.localeCompare(o)).map(i=>({value:i,label:i,count:r.get(i)??0}))}function Eae(e){const t=new Map;for(const r of e)t.set(r,(t.get(r)??0)+1);return[...t.entries()].sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>({value:r,label:r,count:n}))}function Aae(e){if(e.length===0)return[];const t=Array.from({length:fx},(r,n)=>({range:`${n*10}-${(n+1)*10}%`,count:0}));for(const r of e){const n=Math.max(0,Math.min(r,1)),i=Math.min(Math.floor(n*fx),fx-1);t[i].count++}return t}function Tae(e){const t=e==null?void 0:e.trim();return t?v5(t):void 0}function Cae(e){const t=e.split("/").filter(r=>r.length>0);return t.map((r,n)=>t.slice(0,n+1).join("/"))}function Pae(e,t){return e!==void 0&&(e===t||e.startsWith(`${t}/`))}function Rae(e){const t=Date.parse(e);return Number.isFinite(t)?t:void 0}const _t={green:"#34d399",red:"#f87171",gray:"#4b5563",cyan:"#22d3ee",gridLine:"#1f2937",labelText:"#9ca3af"},i2=["#22d3ee","#34d399","#facc15","#f87171","#a78bfa","#fb923c","#f472b6","#60a5fa"];function Mae(e){return i2[e%i2.length]}function Dae({data:e,projectId:t}){const[r,n]=S.useState(!0),[i,o]=S.useState(""),l=e.targets,c=Ue(t?MR(t,i||void 0):a6(i||void 0)),h=i?c.data:void 0,f=S.useMemo(()=>Bae(e.runs??[]),[e.runs]);return d.jsxs("div",{className:"rounded-lg border border-gray-800",children:[d.jsxs("button",{type:"button",onClick:()=>n(p=>!p),className:"flex w-full items-center justify-between px-4 py-3 text-left transition-colors hover:bg-gray-900/30",children:[d.jsx("span",{className:"text-sm font-medium text-gray-300",children:"Analytics"}),d.jsx("span",{className:"text-xs text-gray-500",children:r?"▸ Show":"▾ Hide"})]}),!r&&d.jsxs("div",{className:"space-y-6 border-t border-gray-800 px-4 py-4",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{htmlFor:"baseline-select",className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Baseline target"}),d.jsxs("select",{id:"baseline-select",value:i,onChange:p=>o(p.target.value),className:"rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:[d.jsx("option",{value:"",children:"Select a baseline…"}),l.map(p=>d.jsx("option",{value:p,children:p},p))]}),i&&c.isLoading&&d.jsx("span",{className:"text-xs text-gray-500",children:"Loading…"})]}),i&&h&&d.jsx(kae,{data:h,baseline:i}),i&&h&&d.jsx(Lae,{data:h,baseline:i}),d.jsx($ae,{data:e}),f.length>1&&l.length>0&&d.jsx(Uae,{data:f,targets:l}),!i&&d.jsx("p",{className:"text-xs text-gray-500",children:"Select a baseline target above to see gain and delta charts."})]})]})}function nS({active:e,payload:t,label:r}){return!e||!(t!=null&&t.length)?null:d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-xs shadow-xl",children:[r&&d.jsx("div",{className:"mb-1 font-medium text-gray-300",children:r}),t.map((n,i)=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color}}),d.jsxs("span",{className:"text-gray-400",children:[n.name,":"]}),d.jsx("span",{className:"tabular-nums text-gray-200",children:typeof n.value=="number"?n.value.toFixed(3):n.value})]},`${n.name}-${i}`))]})}function nd({title:e,children:t}){return d.jsxs("div",{className:"space-y-3",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:e}),t]})}function kae({data:e,baseline:t}){const r=S.useMemo(()=>{const i=[];for(const o of e.cells)o.target!==t&&o.delta!==void 0&&i.push({experiment:o.experiment,target:o.target,g:o.normalized_gain??null,delta:o.delta});return i.sort((o,l)=>Math.abs(l.g??0)-Math.abs(o.g??0)),i},[e.cells,t]);if(r.length===0)return d.jsx(nd,{title:"Normalized Gain (g)",children:d.jsx("p",{className:"text-xs text-gray-500",children:"No gain data available. Ensure multiple targets exist."})});const n=r.map(i=>({name:`${i.target} · ${i.experiment}`,g:i.g??0,isNull:i.g===null}));return d.jsx(nd,{title:"Normalized Gain (g)",children:d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(zj,{width:"100%",height:Math.max(200,n.length*32),children:d.jsxs(g5,{data:n,layout:"vertical",margin:{left:120,right:20,top:5,bottom:5},children:[d.jsx(Gp,{strokeDasharray:"3 3",stroke:_t.gridLine,horizontal:!1}),d.jsx(Yp,{type:"number",tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),d.jsx(Vp,{type:"category",dataKey:"name",tick:{fill:_t.labelText,fontSize:11},width:120,axisLine:{stroke:_t.gridLine}}),d.jsx(Hw,{content:d.jsx(nS,{})}),d.jsx(eS,{dataKey:"g",name:"Normalized Gain",children:n.map(i=>d.jsx(Kw,{fill:i.isNull?_t.gray:i.g>0?_t.green:i.g<0?_t.red:_t.gray},i.name))})]})})})})}function Lae({data:e,baseline:t}){const r=S.useMemo(()=>e.cells.filter(n=>n.target!==t&&n.delta!==void 0&&n.delta<0).sort((n,i)=>(n.delta??0)-(i.delta??0)),[e.cells,t]);return r.length===0?null:d.jsx(nd,{title:"Regressions vs. Baseline",children:d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg Score"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Delta"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"g"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:r.map(n=>{var i;return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:n.experiment}),d.jsx("td",{className:"px-4 py-3 text-gray-300",children:n.target}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[Math.round(n.avg_score*100),"%"]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:(i=n.delta)==null?void 0:i.toFixed(3)}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:n.normalized_gain!==void 0&&n.normalized_gain!==null?n.normalized_gain.toFixed(3):"—"})]},`${n.experiment}::${n.target}`)})})]})})})}const s2={experiment:Di,category:Di,timePeriod:"all"};function $ae({data:e}){const[t,r]=S.useState(s2),n=S.useMemo(()=>Sae(e,t),[e,t]);S.useEffect(()=>{r(f=>{const p=!f.experiment||n.experimentOptions.some(x=>x.value===f.experiment),g=!f.category||n.categoryOptions.some(x=>x.value===f.category),y=f.timePeriod==="all"||n.hasTimestampedScores;return p&&g&&y?f:{experiment:p?f.experiment:Di,category:g?f.category:Di,timePeriod:y?f.timePeriod:"all"}})},[n.experimentOptions,n.categoryOptions,n.hasTimestampedScores]);const i=(f,p)=>{r(g=>({...g,[f]:p}))},o=()=>r(s2),l=t.experiment!==Di||t.category!==Di||t.timePeriod!=="all",c=n.totalScores>0,h=zae(n,t);return d.jsx(nd,{title:"Score Distribution",children:d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 px-3 py-3",children:[d.jsxs("div",{className:"grid gap-3 sm:grid-cols-3",children:[d.jsxs(hx,{id:"score-distribution-experiment",label:"Experiment",value:t.experiment,onChange:f=>i("experiment",f),disabled:n.experimentOptions.length===0,children:[d.jsx("option",{value:Di,children:"All experiments"}),n.experimentOptions.map(f=>d.jsxs("option",{value:f.value,children:[f.label," (",f.count,")"]},f.value))]}),d.jsxs(hx,{id:"score-distribution-category",label:"Category",value:t.category,onChange:f=>i("category",f),disabled:!n.categoryAvailable,help:n.categoryAvailable||!c?void 0:"Category metadata is not present in these compare results.",children:[d.jsx("option",{value:Di,children:"All categories"}),n.categoryOptions.map(f=>d.jsxs("option",{value:f.value,children:[f.label," (",f.count,")"]},f.value))]}),d.jsx(hx,{id:"score-distribution-time",label:"Time period",value:t.timePeriod,onChange:f=>i("timePeriod",f),disabled:!n.hasTimestampedScores,help:n.hasTimestampedScores||!c?void 0:"Recent windows need run timestamps from compare data.",children:Bb.map(f=>d.jsx("option",{value:f.value,children:f.label},f.value))})]}),d.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-2 border-t border-gray-800/70 pt-3 text-xs",children:[d.jsxs("span",{className:"tabular-nums text-gray-400",children:["Showing ",d.jsx("span",{className:"text-gray-200",children:n.filteredScores})," of"," ",d.jsx("span",{className:"text-gray-200",children:n.totalScores})," scores"]}),l&&d.jsx("button",{type:"button",onClick:o,className:"text-gray-500 underline-offset-2 transition-colors hover:text-gray-300 hover:underline",children:"Clear filters"})]})]}),n.buckets.length>0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(zj,{width:"100%",height:200,children:d.jsxs(g5,{data:n.buckets,margin:{left:10,right:10,top:5,bottom:5},children:[d.jsx(Gp,{strokeDasharray:"3 3",stroke:_t.gridLine,vertical:!1}),d.jsx(Yp,{dataKey:"range",tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),d.jsx(Vp,{tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),d.jsx(Hw,{content:d.jsx(nS,{})}),d.jsx(eS,{dataKey:"count",name:"Tests",fill:_t.cyan,radius:[2,2,0,0]})]})})}):d.jsx(Iae,{message:h})]})})}function hx({id:e,label:t,value:r,onChange:n,disabled:i,help:o,children:l}){return d.jsxs("div",{className:"min-w-0 space-y-1",children:[d.jsx("label",{htmlFor:e,className:"block text-xs font-medium uppercase tracking-wider text-gray-500",children:t}),d.jsx("select",{id:e,value:r,disabled:i,onChange:c=>n(c.target.value),className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 transition-colors focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500 disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-600",children:l}),o&&d.jsx("p",{className:"text-xs leading-5 text-gray-500",children:o})]})}function Iae({message:e}){return d.jsx("div",{className:"rounded-lg border border-dashed border-gray-800 bg-gray-900/20 px-4 py-8 text-center",children:d.jsx("p",{className:"text-sm text-gray-400",children:e})})}function zae(e,t){return e.totalScores===0?"No test scores are available in this comparison yet.":t.category&&!e.categoryAvailable?"Category metadata is not available in these compare results.":"No scores match the selected distribution filters."}function Bae(e){if(e.length===0)return[];const t=new Map;for(const n of e){const i=n.started_at.slice(0,10);let o=t.get(i);o||(o=new Map,t.set(i,o));let l=o.get(n.target);l||(l={scoreSum:0,count:0},o.set(n.target,l)),l.scoreSum+=n.avg_score,l.count++}return[...t.keys()].sort().map(n=>{const i={date:n},o=t.get(n);if(!o)return i;for(const[l,c]of o)i[l]=Math.round(c.scoreSum/c.count*1e3)/1e3;return i})}function Uae({data:e,targets:t}){return d.jsx(nd,{title:"Score Trend Over Time",children:d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(zj,{width:"100%",height:250,children:d.jsxs(gae,{data:e,margin:{left:10,right:20,top:5,bottom:5},children:[d.jsx(Gp,{strokeDasharray:"3 3",stroke:_t.gridLine}),d.jsx(Yp,{dataKey:"date",tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),d.jsx(Vp,{domain:[0,1],tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),d.jsx(Hw,{content:d.jsx(nS,{})}),d.jsx(T3,{wrapperStyle:{fontSize:12,color:_t.labelText}}),t.map((r,n)=>d.jsx(Qk,{type:"monotone",dataKey:r,stroke:Mae(n),strokeWidth:2,dot:{r:3},connectNulls:!0},r))]})})})})}function an({rate:e}){const t=Math.round(e*100);return d.jsxs("div",{className:"relative h-5 w-20 overflow-hidden rounded-full bg-gray-800",children:[d.jsx("div",{className:"absolute inset-y-0 left-0 bg-gradient-to-r from-blue-400 to-blue-600",style:{width:`${t}%`}}),d.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold tabular-nums text-white",children:[t,"%"]})]})}function w5({data:e,isLoading:t,isError:r,error:n,projectId:i}){var f;const[o,l]=S.useState("aggregated"),c=((f=e==null?void 0:e.runs)==null?void 0:f.length)??0,h=e&&e.cells.length>0;return d.jsxs("div",{className:"space-y-4",children:[d.jsx(qae,{mode:o,onModeChange:l,runsCount:c}),t&&d.jsx(rie,{}),!t&&r&&n&&d.jsx(eie,{message:`Failed to load comparison data: ${n.message}`}),!t&&!r&&!h&&d.jsx(tie,{}),!t&&!r&&h&&e&&d.jsxs(d.Fragment,{children:[o==="aggregated"&&d.jsx(Hae,{data:e,projectId:i}),o==="per-run"&&d.jsx(Qae,{data:e})]})]})}function qae({mode:e,onModeChange:t,runsCount:r}){return d.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:"Analyze runs"}),d.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Study one experiment against another, or pit individual runs head-to-head."})]}),d.jsx(Fae,{mode:e,onChange:t,runsCount:r})]})}function Fae({mode:e,onChange:t,runsCount:r}){const n=r===0;return d.jsxs("div",{role:"tablist","aria-label":"Comparison view mode",className:"inline-flex items-center rounded-lg border border-gray-800 bg-gray-900/50 p-1",children:[d.jsx(o2,{active:e==="aggregated",onClick:()=>t("aggregated"),children:"Aggregated"}),d.jsxs(o2,{active:e==="per-run",onClick:()=>t("per-run"),disabled:n,title:n?"No runs available":void 0,children:["Per run",r>0&&d.jsx("span",{className:"ml-1.5 rounded bg-gray-800 px-1.5 py-0.5 text-xs tabular-nums text-gray-400",children:r})]})]})}function o2({active:e,onClick:t,disabled:r,title:n,children:i}){return d.jsx("button",{type:"button",role:"tab","aria-selected":e,onClick:t,disabled:r,title:n,className:`rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${e?"bg-gray-800 text-cyan-400 shadow-sm":"text-gray-400 hover:text-gray-200 disabled:text-gray-600 disabled:hover:text-gray-600"}`,children:i})}function Hae({data:e,projectId:t}){const{experiments:r,targets:n,cells:i}=e,o=S.useMemo(()=>{const l=new Map;for(const c of i)l.set(`${c.experiment}::${c.target}`,c);return l},[i]);return r.length<=1&&n.length<=1?d.jsx(aS,{headline:"Not enough variation to compare",body:`The aggregated matrix requires at least 2 experiments or 2 targets. Currently ${r.length} experiment(s) and ${n.length} target(s).`}):d.jsxs("div",{className:"space-y-3",children:[d.jsx(Jae,{}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:d.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Target ↓ / Experiment →"})}),r.map(l=>d.jsx("th",{className:"px-4 py-3 font-medium text-gray-300",children:l},l))]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(l=>d.jsx(Kae,{target:l,experiments:r,cellMap:o},l))})]})}),d.jsx(Dae,{data:e,projectId:t})]})}function Kae({target:e,experiments:t,cellMap:r}){return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:e}),t.map(n=>{const i=r.get(`${n}::${e}`);return d.jsx("td",{className:"px-4 py-3",children:i?d.jsx(Gae,{cell:i}):d.jsx(Yae,{})},n)})]})}function Gae({cell:e}){const[t,r]=S.useState(!1),n=Math.round(e.avg_score*100),i=Bc(e),o=ur(e);return d.jsxs("div",{className:"space-y-2",children:[d.jsxs("button",{type:"button",className:"group flex w-full flex-col gap-1 rounded-md border border-gray-800 bg-gray-900/40 px-3 py-2 text-left transition-colors hover:border-gray-700 hover:bg-gray-900/70",onClick:()=>r(l=>!l),"aria-expanded":t,children:[d.jsx(an,{rate:e.pass_rate}),d.jsxs("div",{className:"flex items-center gap-2 text-xs tabular-nums text-gray-500",children:[d.jsxs("span",{children:[d.jsx("span",{className:"text-emerald-400",children:e.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),d.jsx("span",{children:i})]}),d.jsx("span",{className:"text-gray-700",children:"·"}),d.jsxs("span",{children:["avg ",n,"%"]}),o>0&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-gray-700",children:"·"}),d.jsxs("span",{className:"text-amber-400",children:[o," errors"]})]})]})]}),t&&d.jsx(Vae,{tests:e.tests})]})}function Yae(){return d.jsx("div",{className:"text-center text-gray-600",children:"—"})}function Vae({tests:e}){return d.jsxs("div",{className:"rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2",children:[d.jsx("div",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Test cases"}),d.jsx("ul",{className:"space-y-1",children:e.map(t=>{const r=t.execution_status==="execution_error";return d.jsxs("li",{className:"flex items-center gap-2 text-xs",children:[d.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${r?"bg-amber-400":t.passed?"bg-emerald-400":"bg-red-400"}`}),d.jsx("span",{className:"flex-1 truncate text-gray-300",title:t.test_id,children:t.test_id}),d.jsx("span",{className:`tabular-nums ${r?"text-amber-400":t.passed?"text-emerald-400":"text-red-400"}`,children:r?"error":`${Math.round(t.score*100)}%`})]},t.test_id)})})]})}function Qae({data:e}){const t=e.runs??[],[r,n]=S.useState(new Set),[i,o]=S.useState(!1),l=f=>{n(p=>{const g=new Set(p);return g.has(f)?g.delete(f):g.add(f),g})},c=()=>n(new Set),h=S.useMemo(()=>t.filter(f=>r.has(f.run_id)),[t,r]);return t.length===0?d.jsx(aS,{headline:"No runs yet",body:"Run an evaluation to populate the per-run view."}):i&&h.length>=2?d.jsx(Wae,{runs:h,onBack:()=>o(!1)}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("div",{className:"flex items-center justify-between text-sm text-gray-400",children:d.jsxs("span",{children:[d.jsx("span",{className:"font-medium text-gray-300",children:t.length})," run",t.length===1?"":"s"," — select two or more to compare side-by-side"]})}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"w-10 px-3 py-3","aria-label":"Select"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Timestamp"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Tests"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:t.map(f=>d.jsx(Xae,{run:f,checked:r.has(f.run_id),onToggle:()=>l(f.run_id)},f.run_id))})]})}),r.size>0&&d.jsxs("div",{role:"toolbar","aria-label":"Selection actions",className:"sticky bottom-4 z-10 flex items-center justify-between gap-3 rounded-lg border border-cyan-900/50 bg-gray-900/95 px-4 py-3 shadow-xl backdrop-blur",children:[d.jsxs("div",{className:"text-sm text-gray-300",children:[d.jsx("span",{className:"font-semibold tabular-nums text-cyan-400",children:r.size})," ","selected"]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:c,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Clear"}),d.jsxs("button",{type:"button",disabled:r.size<2,onClick:()=>o(!0),className:"inline-flex items-center gap-1.5 rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:["Compare ",r.size,d.jsx("span",{"aria-hidden":!0,children:"→"})]})]})]})]})}function Xae({run:e,checked:t,onToggle:r}){const n=Math.round(e.avg_score*100),i=Bc(e),o=ur(e),l=nie(e.run_id);return d.jsxs("tr",{className:`transition-colors ${t?"bg-cyan-950/20 hover:bg-cyan-950/30":"hover:bg-gray-900/30"}`,children:[d.jsx("td",{className:"px-3 py-3 align-middle",children:d.jsx("input",{type:"checkbox",className:"h-4 w-4 cursor-pointer rounded border-gray-700 bg-gray-900 text-cyan-500 accent-cyan-500 focus:ring-cyan-500",checked:t,onChange:r,"aria-label":`Select run ${e.run_id}`})}),d.jsxs("td",{className:"px-4 py-3 align-middle",title:e.run_id,children:[d.jsx("div",{className:"font-medium text-gray-200 tabular-nums",children:S5(e.started_at)}),l&&d.jsx("div",{className:"text-xs text-gray-500",children:l})]}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.experiment}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.target}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[d.jsx("div",{children:i}),o>0&&d.jsxs("div",{className:"text-xs text-amber-400",children:[o," errors"]})]}),d.jsx("td",{className:"px-4 py-3 align-middle",children:d.jsx(an,{rate:e.pass_rate})}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[n,"%"]})]})}function Wae({runs:e,onBack:t}){const r=S.useMemo(()=>{const i=new Set,o=[];for(const l of e)for(const c of l.tests)i.has(c.test_id)||(i.add(c.test_id),o.push(c.test_id));return o},[e]),n=S.useMemo(()=>e.map(i=>{const o=new Map;for(const l of i.tests)o.set(l.test_id,l);return o}),[e]);return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("button",{type:"button",onClick:t,className:"inline-flex items-center gap-1 text-sm text-cyan-400 transition-colors hover:text-cyan-300",children:[d.jsx("span",{"aria-hidden":!0,children:"←"})," Back to runs"]}),d.jsxs("span",{className:"text-sm text-gray-500",children:[e.length," runs · ",r.length," tests"]})]}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsxs("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:[d.jsxs("tr",{children:[d.jsx("th",{className:"sticky left-0 z-10 bg-gray-900/80 px-4 py-3 font-medium text-gray-400 backdrop-blur",children:"Test case"}),e.map(i=>d.jsx("th",{className:"px-4 py-3 align-bottom",children:d.jsx(Zae,{run:i})},i.run_id))]}),d.jsxs("tr",{className:"border-t border-gray-800/50 bg-gray-900/30",children:[d.jsx("th",{className:"sticky left-0 z-10 bg-gray-900/80 px-4 py-2 text-xs font-medium uppercase tracking-wider text-gray-500 backdrop-blur",children:"Pass rate"}),e.map(i=>d.jsx("th",{className:"px-4 py-2",children:d.jsx(an,{rate:i.pass_rate})},i.run_id))]})]}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:r.map(i=>d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"sticky left-0 z-10 bg-gray-950/70 px-4 py-3 font-medium text-gray-200 backdrop-blur",children:i}),n.map((o,l)=>{const c=o.get(i),h=e[l].run_id;return c?d.jsx("td",{className:"px-4 py-3",children:d.jsx("div",{className:"flex items-center gap-2",children:c.execution_status==="execution_error"?d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":!0,className:"h-1.5 w-1.5 rounded-full bg-amber-400"}),d.jsx("span",{className:"tabular-nums text-amber-400",children:"error"})]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${c.passed?"bg-emerald-400":"bg-red-400"}`}),d.jsxs("span",{className:`tabular-nums ${c.passed?"text-emerald-400":"text-red-400"}`,children:[Math.round(c.score*100),"%"]})]})})},h):d.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:"—"},h)})]},i))})]})})]})}function Zae({run:e}){return d.jsxs("div",{className:"min-w-[140px] space-y-1",children:[d.jsx("div",{className:"text-sm font-medium text-gray-200 tabular-nums",title:e.run_id,children:S5(e.started_at)}),d.jsxs("div",{className:"text-xs text-gray-500",children:[e.experiment," · ",e.target]})]})}function Jae(){return d.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",role:"note",children:[d.jsx(wh,{className:"bg-emerald-400",label:"80%+"}),d.jsx(wh,{className:"bg-yellow-400",label:"50–80%"}),d.jsx(wh,{className:"bg-red-400",label:"< 50%"}),d.jsx(wh,{className:"bg-gray-700",label:"no data"})]})}function wh({className:e,label:t}){return d.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[d.jsx("span",{className:`h-2 w-2 rounded-full ${e}`,"aria-hidden":!0}),d.jsx("span",{children:t})]})}function eie({message:e}){return d.jsx("div",{className:"rounded-lg border border-red-900/60 bg-red-950/30 p-4 text-sm text-red-400",children:e})}function tie(){return d.jsx(aS,{headline:"No comparison data yet",body:"Run evaluations with different experiment and target combinations to populate this view."})}function aS({headline:e,body:t}){return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-300",children:e}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:t})]})}function rie(){return d.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:d.jsxs("div",{className:"animate-pulse",children:[d.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>d.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[d.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},e))]})})}function S5(e){try{const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const r=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0"),l=String(t.getMinutes()).padStart(2,"0");return`${r}-${n}-${i} ${o}:${l}`}catch{return e}}function nie(e){const t=e.split("::");return t.length<2?null:t.slice(0,-1).join(" · ")}function aie(e){if(!e)return"No runs";const t=new Date(e);if(Number.isNaN(t.getTime()))return"N/A";const r=Date.now()-t.getTime(),n=Math.floor(r/6e4);if(n<1)return"Just now";if(n<60)return`${n}m ago`;const i=Math.floor(n/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function iie({project:e,canRemove:t=!1,onRemove:r}){const n=Math.round(e.pass_rate*100),i=ur(e),[o,l]=S.useState(!1),[c,h]=S.useState(!1),[f,p]=S.useState(!1),[g,y]=S.useState(null),x=S.useId(),b=S.useId(),w=S.useRef(null),N=S.useRef(null),_=S.useRef(null);S.useEffect(()=>{if(!o)return;function C(D){var z,k;const M=D.target;(z=w.current)!=null&&z.contains(M)||(k=N.current)!=null&&k.contains(M)||l(!1)}function R(D){var M;D.key==="Escape"&&(l(!1),(M=w.current)==null||M.focus())}return document.addEventListener("pointerdown",C),document.addEventListener("keydown",R),()=>{document.removeEventListener("pointerdown",C),document.removeEventListener("keydown",R)}},[o]),S.useEffect(()=>{var C;c&&((C=_.current)==null||C.focus())},[c]);function E(){l(!1),y(null),h(!0)}async function T(){if(!(!r||f)){p(!0),y(null);try{await r(e)}catch(C){y(C.message),p(!1)}}}function A(){var C;f||(h(!1),y(null),(C=w.current)==null||C.focus())}return d.jsxs("article",{className:"group relative rounded-lg border border-gray-800 bg-gray-900/50 transition-colors hover:border-cyan-800 hover:bg-gray-900",children:[d.jsxs(Ee,{to:"/projects/$projectId",params:{projectId:e.id},className:"block p-5 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:[d.jsx("div",{className:"flex items-start justify-between",children:d.jsxs("div",{className:"min-w-0 flex-1 pr-10",children:[d.jsx("h3",{className:"truncate text-lg font-semibold text-white group-hover:text-cyan-400",children:e.id}),d.jsx("p",{className:"mt-1 truncate text-xs text-gray-500",children:e.path})]})}),d.jsxs("div",{className:"mt-4 grid grid-cols-4 gap-3",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Runs"}),d.jsx("p",{className:"text-lg font-semibold text-white",children:e.run_count})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Pass Rate"}),d.jsx("p",{className:`text-lg font-semibold ${e.run_count===0?"text-gray-500":n>=80?"text-emerald-400":n>=50?"text-yellow-400":"text-red-400"}`,children:e.run_count>0?`${n}%`:"--"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Errors"}),d.jsx("p",{className:`text-lg font-semibold ${i>0?"text-amber-300":"text-gray-500"}`,children:i})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Last Run"}),d.jsx("p",{className:"text-sm text-gray-300",children:aie(e.last_run)})]})]})]}),t&&r?d.jsxs("div",{className:"absolute right-3 top-3 z-10",children:[d.jsx("button",{ref:w,type:"button","aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?x:void 0,"aria-label":`Open ${e.id} project menu`,onClick:()=>l(C=>!C),className:"flex h-8 w-8 items-center justify-center rounded-md text-lg leading-none text-gray-500 transition-colors hover:bg-gray-800 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:d.jsx("span",{"aria-hidden":"true",children:"..."})}),o?d.jsx("div",{ref:N,id:x,role:"menu","aria-label":`${e.id} actions`,className:"absolute right-0 top-10 w-44 overflow-hidden rounded-md border border-gray-800 bg-gray-950 py-1 shadow-xl",children:d.jsx("button",{type:"button",role:"menuitem",onClick:E,className:"block w-full px-3 py-2 text-left text-sm text-red-400 transition-colors hover:bg-red-950/30 hover:text-red-300 focus:bg-red-950/30 focus:outline-none",children:"Remove project"})}):null]}):null,c?d.jsx("dialog",{ref:_,open:!0,"aria-modal":"true","aria-labelledby":b,tabIndex:-1,onKeyDown:C=>{C.key==="Escape"&&(C.preventDefault(),A())},className:"fixed inset-0 z-50 flex h-full max-h-none w-full max-w-none items-center justify-center bg-black/70 p-4 text-left text-gray-100 backdrop:bg-black/70",children:d.jsxs("div",{className:"w-full max-w-md overflow-hidden rounded-lg border border-gray-800 bg-gray-950 shadow-xl",children:[d.jsx("div",{className:"border-b border-gray-800 px-4 py-3",children:d.jsx("h2",{id:b,className:"text-lg font-semibold text-white",children:"Remove project?"})}),d.jsxs("div",{className:"space-y-3 p-4",children:[d.jsxs("p",{className:"text-sm text-gray-300",children:["Remove ",d.jsx("span",{className:"font-medium text-white",children:e.id})," from this Dashboard registry."]}),d.jsxs("p",{className:"text-sm text-gray-500",children:["The project folder and files stay on disk at ",e.path,"."]}),g?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:g}):null]}),d.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("button",{type:"button",onClick:A,disabled:f,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200 disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),d.jsx("button",{type:"button",onClick:()=>void T(),disabled:f,className:"rounded-md border border-red-900/60 px-3 py-1.5 text-sm font-medium text-red-400 transition-colors hover:border-red-800 hover:bg-red-950/30 hover:text-red-300 disabled:cursor-not-allowed disabled:opacity-50",children:f?"Removing...":"Remove project"})]})]})}):null]})}function sie(e){return e.map(t=>({path:t.path,relativePath:t.relative_path,category:t.category}))}function oie(e){return(e.split(",").at(-1)??"").trim()}function lie(e,t){const r=oie(t).toLowerCase();return r?e.filter(n=>n.relativePath.toLowerCase().includes(r)||n.category.toLowerCase().includes(r)):e}function uie(e,t){const r=e.split(",");return[...(/,\s*$/.test(e)?r:r.slice(0,-1)).map(c=>c.trim()).filter(Boolean).filter(c=>c!==t),t].join(", ")}function cie(e,t,r){return t?e:iS(e,r)}function iS(e,t){return e||String(t??Ic)}function die({suiteFilter:e,testIds:t,target:r,experiment:n,thresholdInput:i,studioThreshold:o,workers:l}){const c={};e.trim()&&(c.suite_filter=e.trim()),t.length>0&&(c.test_ids=t),r&&(c.target=r),n.trim()&&(c.experiment=n.trim());const h=iS(i,o);return h&&(c.threshold=Number.parseFloat(h)),l&&(c.workers=Number.parseInt(l,10)),c}const mx="default";function So({open:e,onClose:t,projectId:r,prefill:n}){const i=ho(),o=po(),[l,c]=S.useState((n==null?void 0:n.suiteFilter)??""),[h,f]=S.useState(""),[p,g]=S.useState((n==null?void 0:n.testIds)??[]),[y,x]=S.useState((n==null?void 0:n.target)??""),[b,w]=S.useState(mx),[N,_]=S.useState(""),[E,T]=S.useState(!1),[A,C]=S.useState(""),[R,D]=S.useState(!1),[M,z]=S.useState(null),[k,H]=S.useState(null),[U,ae]=S.useState(!1),[Z,G]=S.useState(null),{data:L}=R6(r),{data:F}=D6(r),{data:J}=hj(M,r),{data:re}=pt(r),oe=S.useMemo(()=>sie((L==null?void 0:L.eval_files)??[]),[L]),$=S.useMemo(()=>lie(oe,l),[oe,l]),X=S.useMemo(()=>(F==null?void 0:F.targets)??[],[F]),le=S.useMemo(()=>iS(N,re==null?void 0:re.threshold),[re==null?void 0:re.threshold,N]),ue=S.useMemo(()=>cie(N,E,re==null?void 0:re.threshold),[re==null?void 0:re.threshold,N,E]);S.useEffect(()=>{e&&(c((n==null?void 0:n.suiteFilter)??""),g((n==null?void 0:n.testIds)??[]),x((n==null?void 0:n.target)??""),w(mx),f(""),_(""),T(!1),C(""),D(!1),z(null),H(null),ae(!1),G(null))},[e,n]),S.useEffect(()=>{((J==null?void 0:J.status)==="finished"||(J==null?void 0:J.status)==="failed")&&(i.invalidateQueries({queryKey:["runs"]}),i.invalidateQueries({queryKey:["projects"]}))},[J==null?void 0:J.status,i]);const pe=S.useCallback(()=>die({suiteFilter:l,testIds:p,target:y,experiment:b,thresholdInput:N,studioThreshold:re==null?void 0:re.threshold,workers:A}),[b,re==null?void 0:re.threshold,l,y,p,N,A]);S.useEffect(()=>{const te=pe();if(!te.suite_filter&&(!te.test_ids||te.test_ids.length===0)){G(null);return}I6(te,r).then(je=>G(je.command)).catch(()=>G(null))},[pe,r]);function xe(){const te=h.trim();te&&!p.includes(te)&&g([...p,te]),f("")}function we(te){g(p.filter(je=>je!==te))}async function _e(){H(null),ae(!0);try{const te=pe(),je=await $R(te,r);z(je.id)}catch(te){H(te.message)}finally{ae(!1)}}if(!e)return null;if(M&&J){let te=function(){t(),o({to:IB(r)})};return d.jsx(l2,{onClose:t,title:"Eval Run",children:d.jsx(fie,{status:J,onClose:t,onRunInBackground:te,runId:M})})}const de=!!(l.trim()||p.length>0);return d.jsx(l2,{onClose:t,title:"Start",children:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"suite-filter",className:"mb-1 block text-sm font-medium text-gray-300",children:"Suite Filter"}),d.jsx("input",{id:"suite-filter",type:"text",value:l,onChange:te=>c(te.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"}),oe.length>0&&d.jsx("div",{className:"mt-1.5 max-h-44 overflow-y-auto rounded-md border border-gray-800 bg-gray-950/60 p-1",children:$.length>0?$.map(te=>d.jsxs("button",{type:"button",onClick:()=>c(je=>uie(je,te.relativePath)),className:"block w-full rounded px-2 py-1 text-left text-xs text-gray-400 hover:bg-gray-800 hover:text-gray-200",children:[d.jsx("span",{className:"block truncate",children:te.relativePath}),te.category&&d.jsx("span",{className:"block truncate text-[11px] text-gray-600",children:te.category})]},te.relativePath)):d.jsx("div",{className:"px-2 py-1 text-xs text-gray-500",children:"No matching eval files"})})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"test-id-input",className:"mb-1 block text-sm font-medium text-gray-300",children:"Test ID Filter"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:"test-id-input",type:"text",value:h,onChange:te=>f(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),xe())},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"}),d.jsx("button",{type:"button",onClick:xe,disabled:!h.trim(),className:"rounded-md bg-gray-700 px-3 py-2 text-sm text-white hover:bg-gray-600 disabled:opacity-50",children:"Add"})]}),p.length>0&&d.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:p.map(te=>d.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:[te,d.jsx("button",{type:"button",onClick:()=>we(te),className:"text-cyan-400 hover:text-white",children:"×"})]},te))})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"target-override",className:"mb-1 block text-sm font-medium text-gray-300",children:"Target Override"}),d.jsxs("select",{id:"target-override",value:y,onChange:te=>x(te.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:[d.jsx("option",{value:"",children:"Use eval's configured target"}),X.map(te=>d.jsx("option",{value:te,children:te},te))]})]}),d.jsx("div",{className:"rounded-md border border-gray-800 bg-gray-950/40 p-3",children:d.jsxs("div",{children:[d.jsx("label",{htmlFor:"experiment-input",className:"mb-1 block text-xs font-medium text-gray-400",children:"Experiment"}),d.jsx("input",{id:"experiment-input",type:"text",value:b,onChange:te=>w(te.target.value),placeholder:mx,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"})]})}),d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>D(!R),className:"text-sm text-gray-400 hover:text-gray-200",children:[R?"▾":"▸"," Advanced Options"]}),R&&d.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"threshold-input",className:"mb-1 block text-xs text-gray-400",children:"Threshold (0–1)"}),d.jsx("input",{id:"threshold-input",type:"number",value:ue,onChange:te=>{T(!0),_(te.target.value)},min:"0",max:"1",step:"0.1",placeholder:le,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"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"workers-input",className:"mb-1 block text-xs text-gray-400",children:"Workers"}),d.jsx("input",{id:"workers-input",type:"number",value:A,onChange:te=>C(te.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"})]})]})]}),Z&&d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:[d.jsx("div",{className:"mb-1 text-xs text-gray-500",children:"CLI Preview"}),d.jsx("code",{className:"block break-all text-xs text-cyan-300",children:Z})]}),k&&d.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:k}),d.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[d.jsx("button",{type:"button",onClick:t,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Cancel"}),d.jsx("button",{type:"button",onClick:_e,disabled:!de||U,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:U?"Launching…":"Start"})]})]})})}function l2({children:e,onClose:t,title:r}){return d.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 pt-[10vh]",children:d.jsxs("div",{className:"max-h-[80vh] w-full max-w-lg overflow-y-auto rounded-lg border border-gray-700 bg-gray-900 shadow-xl",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-5 py-3",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:r}),d.jsx("button",{type:"button",onClick:t,className:"text-gray-400 hover:text-white",children:"✕"})]}),d.jsx("div",{className:"px-5 py-4",children:e})]})})}function fie({status:e,onClose:t,onRunInBackground:r,runId:n}){const i=e.status==="finished"||e.status==="failed",o={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"};return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("span",{className:`text-sm font-medium ${o[e.status]??"text-gray-400"}`,children:[e.status==="running"&&"●"," ",e.status.charAt(0).toUpperCase()+e.status.slice(1)]}),!i&&d.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]}),d.jsx("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:d.jsx("code",{className:"block break-all text-xs text-cyan-300",children:e.command})}),e.stdout&&d.jsx("div",{className:"max-h-48 overflow-y-auto rounded-md bg-gray-950 p-3",children:d.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-300",children:e.stdout.slice(-3e3)})}),e.stderr&&d.jsx("div",{className:"max-h-24 overflow-y-auto rounded-md bg-red-950/20 p-3",children:d.jsx("pre",{className:"whitespace-pre-wrap text-xs text-red-300",children:e.stderr.slice(-2e3)})}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs text-gray-500",children:i?d.jsxs(d.Fragment,{children:["Exit code: ",e.exit_code,e.finished_at&&` · ${new Date(e.finished_at).toLocaleTimeString()}`]}):n&&d.jsx("button",{type:"button",onClick:r,className:"text-xs text-gray-400 hover:text-cyan-400",children:"Run in background"})}),i&&d.jsx("button",{type:"button",onClick:t,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Close"})]})]})}function px(e){if(e.source==="remote")return"Remote runs cannot be combined or deleted from the local workspace.";if(e.status==="starting"||e.status==="running")return"Running runs cannot be combined or deleted yet."}function hie(e){return`${e} local run${e===1?"":"s"} selected`}function mie(e,t){return`Combined ${e} local run${e===1?"":"s"} into ${t}.`}function pie(e){return`Deleted ${e} local run${e===1?"":"s"}.`}function gie(e){if(!e)return{date:"N/A",full:"N/A"};try{const t=new Date(e);if(Number.isNaN(t.getTime()))return{date:"N/A",full:"N/A"};const r=t.toLocaleString(),n=Date.now()-t.getTime(),i=Math.floor(n/6e4),o=Math.floor(n/36e5);let l;return i<1?l="just now":i<60?l=`${i} min ago`:o<24?l=`${o} hour${o===1?"":"s"} ago`:l=t.toLocaleDateString(),{date:l,full:r}}catch{return{date:"N/A",full:"N/A"}}}function yie(e,t){const r=gie(e.timestamp),n=e.status==="starting"||e.status==="running",i=yj(e,{includePassRate:!1}),o=i.label,l=ur(e),c=e.test_count,h=Math.max(0,e.test_count-l),f=h>0?e.pass_rate>=t:l===0,p=Math.round(e.pass_rate*h),g=h-p,y=IR(e),x=e.runtime_source?pj(e.runtime_source):void 0,b=e.runtime_source?B6(e.runtime_source):void 0;return{run:e,ts:r,isActive:n,label:o,display:i,errors:l,totalCount:c,qualityCount:h,passing:f,passedCount:p,failedCount:g,experimentNamespace:y,runtimeSourceLabel:x,runtimeSourceTitle:b}}function Xp({runs:e,projectId:t,emptyMessage:r,hasNextPage:n=!1,isFetchingNextPage:i=!1,onLoadMore:o,enableCombine:l=!1,remoteBranch:c}){const{data:h}=pt(t),f=ho(),p=(h==null?void 0:h.threshold)??Ic,g=S.useRef(null),y=S.useRef(null),x=S.useRef(!1),[b,w]=S.useState([]),[N,_]=S.useState(null),[E,T]=S.useState(!1),[A,C]=S.useState(!1),R=S.useMemo(()=>e.map(L=>yie(L,p)),[p,e]),D=S.useMemo(()=>e.filter(L=>l&&!px(L)).map(L=>L.filename),[l,e]),M=new Set(b),z=S.useMemo(()=>new Map(e.map(L=>[L.filename,L])),[e]);S.useEffect(()=>{i||(x.current=!1)},[i]),S.useEffect(()=>{if(!n||!o)return;const L=[];if(g.current&&L.push(g.current),y.current&&L.push(y.current),L.length===0)return;const F=new IntersectionObserver(J=>{J.some(re=>re.isIntersecting)&&!i&&!x.current&&(x.current=!0,o())},{rootMargin:"200px 0px"});for(const J of L)F.observe(J);return()=>F.disconnect()},[n,i,o]),S.useEffect(()=>{const L=new Set(D);w(F=>F.filter(J=>L.has(J)))},[D]);async function k(){if(t){await Promise.all([f.invalidateQueries({queryKey:["projects",t,"runs"]}),f.invalidateQueries({queryKey:["projects",t,"tags"]}),f.invalidateQueries({queryKey:["projects",t,"compare"]}),f.invalidateQueries({queryKey:["projects",t,"targets"]})]);return}await Promise.all([f.invalidateQueries({queryKey:["runs"]}),f.invalidateQueries({queryKey:["tags"]}),f.invalidateQueries({queryKey:["compare"]}),f.invalidateQueries({queryKey:["targets"]})])}async function H(){if(b.length<2||E)return;const L=[...b],F=[...new Set(L.map(re=>{var oe,$;return(($=(oe=z.get(re))==null?void 0:oe.experiment)==null?void 0:$.trim())||"default"}).filter(Boolean))].sort();let J;if(F.length>1){const re=window.prompt(`Selected runs span experiments (${F.join(", ")}). Enter a new experiment name for the combined run:`);if(re===null)return;if(J=re.trim(),!J){_({kind:"error",message:"Experiment name is required to combine runs from multiple experiments."});return}}_(null),T(!0);try{let re;try{re=await uE(L,"error",t,void 0,J)}catch(oe){if(!(oe instanceof LR)||oe.status!==409)throw oe;const $=oe.duplicates.length;if(!window.confirm(`${$} duplicate (test_id, target) pair${$===1?"":"s"} found. Replace duplicates with the latest timestamp?`))return;re=await uE(L,"latest",t,void 0,J)}w([]),_({kind:"success",message:mie(L.length,re.display_name),combinedRunId:re.run_id,sourceRunIds:L}),await k()}catch(re){_({kind:"error",message:re.message})}finally{T(!1)}}async function U(){b.length===0||A||await Z(b,"selected")}async function ae(){const L=(N==null?void 0:N.sourceRunIds)??[];L.length===0||A||await Z(L,"combined-sources")}async function Z(L,F){const J=L.length,re=J===1?"run":"runs",oe=F==="combined-sources"?`Delete the ${J} source local ${re} used for the combined run? The combined run will remain.`:`Delete ${J} local ${re}? This removes the run workspace and artifacts from disk.`;if(window.confirm(oe)){_(null),C(!0);try{for(const X of L)await T6(X,t);w([]),_({kind:"success",message:pie(J)}),await k()}catch(X){_({kind:"error",message:X.message})}finally{C(!1)}}}function G(L){w(F=>F.includes(L)?F.filter(J=>J!==L):[...F,L])}return e.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:r??d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found."}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Run an evaluation first:"," ",d.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"agentv eval <eval-file>"})]})]})}):d.jsxs("div",{className:"space-y-3",children:[l&&d.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0 space-y-1",children:[d.jsx("p",{className:"text-sm font-medium text-gray-200",children:hie(b.length)}),d.jsx("p",{className:"text-xs text-gray-500",children:"Select completed local runs to combine or delete. Remote runs stay read-only here."}),N&&d.jsx("div",{className:`mt-2 rounded-md border px-3 py-2 text-sm ${N.kind==="success"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":"border-red-900/60 bg-red-950/20 text-red-300"}`,role:N.kind==="error"?"alert":"status",children:d.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[d.jsx("span",{children:N.message}),N.combinedRunId?t?d.jsx(Ee,{to:"/projects/$projectId/runs/$runId",params:{projectId:t,runId:N.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):d.jsx(Ee,{to:"/runs/$runId",params:{runId:N.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):null,N.sourceRunIds&&N.sourceRunIds.length>0?d.jsx("button",{type:"button",onClick:()=>void ae(),disabled:A||E,className:"font-medium text-red-300 hover:text-red-200 hover:underline disabled:cursor-not-allowed disabled:text-gray-500",children:A?"Deleting sources...":"Delete source runs"}):null]})})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>void U(),disabled:b.length===0||A||E,className:"whitespace-nowrap rounded-md border border-red-900/70 px-3 py-1.5 text-sm font-medium text-red-300 hover:border-red-700 hover:bg-red-950/40 disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-500",children:A?"Deleting...":"Delete selected"}),d.jsx("button",{type:"button",onClick:()=>void H(),disabled:b.length<2||E||A,className:"whitespace-nowrap rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-400",children:E?"Combining...":"Combine selected"})]})]}),d.jsxs("div",{className:"space-y-2 sm:hidden",children:[R.map(L=>{const{run:F,ts:J,label:re,display:oe,errors:$,totalCount:X,passedCount:le,failedCount:ue,experimentNamespace:pe,runtimeSourceLabel:xe,runtimeSourceTitle:we}=L,_e=px(F),de=!_e&&D.includes(F.filename);return d.jsxs("article",{className:"rounded-lg border border-gray-800 bg-gray-900/40 px-3 py-3",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[l&&d.jsx("input",{type:"checkbox",checked:M.has(F.filename),disabled:!de,onChange:()=>G(F.filename),title:_e,"aria-label":_e?`${re}: ${_e}`:`Select ${re}`,className:"mt-1 h-4 w-4 shrink-0 rounded border-gray-700 bg-gray-900 text-cyan-500 disabled:opacity-30"}),d.jsx(d2,{view:L,className:"mt-1 shrink-0"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx(u2,{projectId:t,runId:F.filename,label:oe.primary,title:oe.title,className:"block truncate text-sm font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),oe.secondary?d.jsx("p",{className:"mt-0.5 truncate text-xs text-gray-500",title:oe.title,children:oe.secondary}):null,d.jsx(bie,{experimentNamespace:pe,runtimeSourceLabel:xe,runtimeSourceTitle:we}),d.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[d.jsx(c2,{onRemote:F.on_remote===!0,branch:c}),d.jsx("span",{className:"text-xs text-gray-500",title:J.full,children:J.date})]})]})]}),d.jsxs("dl",{className:"mt-3 grid grid-cols-2 gap-x-3 gap-y-2 border-t border-gray-800/70 pt-3",children:[d.jsx(yl,{label:"Pass Rate",valueClassName:"text-gray-300",children:d.jsx(an,{rate:F.pass_rate})}),d.jsx(yl,{label:"Total",valueClassName:"text-gray-300",children:X}),d.jsx(yl,{label:"Passed",valueClassName:"text-emerald-300",children:le}),d.jsx(yl,{label:"Failures",valueClassName:"text-red-400",children:ue>0?ue:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(yl,{label:"Errors",valueClassName:"text-amber-300",children:$>0?$:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(yl,{label:"Remote",valueClassName:"text-gray-400",children:F.on_remote===!0?"On remote":"Local only"})]})]},F.filename)}),(n||i)&&d.jsx("div",{ref:y,className:"rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})]}),d.jsx("div",{className:"hidden max-w-full overflow-x-auto rounded-lg border border-gray-800 sm:block",children:d.jsxs("table",{className:"min-w-[860px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[l&&d.jsx("th",{className:"w-10 px-4 py-3"}),d.jsx("th",{className:"w-8 px-4 py-3"}),d.jsx("th",{className:"w-[18rem] px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"w-[16rem] px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Remote"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Passed"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Failures"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Errors"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Total"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"When"})]})}),d.jsxs("tbody",{className:"divide-y divide-gray-800/50",children:[R.map(L=>{var je;const{run:F,ts:J,label:re,display:oe,errors:$,totalCount:X,passedCount:le,failedCount:ue,experimentNamespace:pe,runtimeSourceLabel:xe,runtimeSourceTitle:we}=L,_e=px(F),de=!_e&&D.includes(F.filename),te=((je=F.target)==null?void 0:je.trim())||oe.primary;return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[l&&d.jsx("td",{className:"px-4 py-3",children:d.jsx("input",{type:"checkbox",checked:M.has(F.filename),disabled:!de,onChange:()=>G(F.filename),title:_e,"aria-label":_e?`${re}: ${_e}`:`Select ${re}`,className:"h-4 w-4 rounded border-gray-700 bg-gray-900 text-cyan-500 disabled:opacity-30"})}),d.jsx("td",{className:"px-4 py-3 text-center",children:d.jsx(d2,{view:L})}),d.jsx("td",{className:"w-[18rem] max-w-[18rem] px-4 py-3",children:d.jsxs("div",{className:"min-w-0",children:[d.jsx("div",{className:"truncate font-medium text-gray-200",title:`Experiment: ${pe}`,children:pe}),xe?d.jsx("div",{className:"mt-0.5 truncate text-xs text-cyan-300",title:we??xe,children:xe}):null]})}),d.jsx("td",{className:"w-[16rem] max-w-[16rem] px-4 py-3",children:d.jsx("div",{className:"min-w-0",children:d.jsx("div",{className:"flex min-w-0 items-center gap-2",children:d.jsx(u2,{projectId:t,runId:F.filename,label:te,title:oe.title,className:"block min-w-0 truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline"})})})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(c2,{onRemote:F.on_remote===!0,branch:c})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-emerald-300",children:le}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:ue>0?ue:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums",children:$>0?d.jsx("span",{className:"text-amber-300",children:$}):d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:X}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(an,{rate:F.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:J.full,children:J.date})]},F.filename)}),(n||i)&&d.jsx("tr",{ref:g,children:d.jsx("td",{colSpan:l?11:10,className:"px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})})]})]})})]})}function u2({projectId:e,runId:t,label:r,title:n,className:i}){return e?d.jsx(Ee,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:i,title:n,children:r}):d.jsx(Ee,{to:"/runs/$runId",params:{runId:t},className:i,title:n,children:r})}function c2({onRemote:e,branch:t}){return e?d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",title:t?`On ${t}`:"On the remote results branch","aria-label":t?`On remote branch ${t}`:"On the remote results branch",children:[d.jsx(vie,{}),"Synced"]}):d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-gray-800 bg-gray-900/70 px-2 py-0.5 text-xs font-medium text-gray-500",title:"Local only — not pushed","aria-label":"Local only — not pushed",children:[d.jsx(xie,{}),"Local only"]})}function vie(){return d.jsxs("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M7 18a4 4 0 0 1-.5-7.97A5 5 0 0 1 16 9a3.5 3.5 0 0 1 1 6.86"}),d.jsx("path",{d:"m9 14 2 2 4-4"})]})}function xie(){return d.jsx("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:d.jsx("path",{d:"M7 18a4 4 0 0 1-.5-7.97A5 5 0 0 1 16 9a3.5 3.5 0 0 1 1 6.86"})})}function bie({experimentNamespace:e,runtimeSourceLabel:t,runtimeSourceTitle:r}){return d.jsxs("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 text-[11px]",children:[d.jsxs("span",{className:"max-w-full truncate rounded-md border border-gray-800 bg-gray-950/50 px-1.5 py-0.5 text-gray-400",title:`Experiment namespace: ${e}`,children:["Experiment: ",e]}),t?d.jsxs("span",{className:"max-w-full truncate rounded-md border border-cyan-900/50 bg-cyan-950/20 px-1.5 py-0.5 text-cyan-300",title:r??t,children:["Runtime: ",t]}):null]})}function d2({view:e,className:t=""}){return e.isActive?d.jsx("span",{className:`inline-block h-2 w-2 animate-pulse rounded-full bg-cyan-400 ${t}`,title:e.run.status==="starting"?"Starting...":"Running...","aria-label":e.run.status==="starting"?"Starting":"Running"}):e.qualityCount===0&&e.errors>0?d.jsx("span",{className:`text-base font-bold text-amber-300 ${t}`,title:"Execution errors",children:"!"}):d.jsx("span",{className:`text-base font-bold ${e.passing?"text-emerald-400":"text-red-400"} ${t}`,children:e.passing?"✓":"✗"})}function yl({label:e,valueClassName:t,children:r}){return d.jsxs("div",{className:"min-w-0",children:[d.jsx("dt",{className:"text-xs text-gray-500",children:e}),d.jsx("dd",{className:`mt-1 min-w-0 text-sm tabular-nums ${t}`,children:r})]})}function N5({remoteStatus:e,syncInFlight:t,onSync:r,projectName:n,syncFeedback:i,onRemoteSummary:o,onConfirmMerge:l,confirmMergeInFlight:c}){var _,E;const h=(e==null?void 0:e.configured)===!0,f=YB(e,t),p=t===!0||!f.canSync,g=f.pendingMerge,y={neutral:"border-gray-700 bg-gray-800/70 text-gray-300",good:"border-emerald-800/70 bg-emerald-950/30 text-emerald-300",info:"border-cyan-800/70 bg-cyan-950/30 text-cyan-300",warn:"border-yellow-800/70 bg-yellow-950/30 text-yellow-300",danger:"border-red-800/70 bg-red-950/30 text-red-300"}[f.tone],x=(i==null?void 0:i.kind)==="success"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":(i==null?void 0:i.kind)==="warning"?"border-yellow-900/60 bg-yellow-950/20 text-yellow-300":"border-red-900/60 bg-red-950/20 text-red-300",b=((_=e==null?void 0:e.dirty_paths)==null?void 0:_.length)??0,w=((E=e==null?void 0:e.conflicted_paths)==null?void 0:E.length)??0,N=KB(e,n,o);return d.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-gray-200",children:"Recent Runs"}),h&&o?d.jsx("p",{className:"mt-0.5 text-xs text-gray-500",children:o}):null]}),h?d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium ${y}`,children:f.label}),r?d.jsx("button",{type:"button",onClick:r,disabled:p,title:f.canSync?void 0:f.nextAction,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:t?"Syncing...":f.actionLabel}):null]}):null]}),h?d.jsxs("div",{className:"space-y-2 text-sm",children:[d.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-gray-400",children:N.map(T=>d.jsx("span",{children:T},T))}),d.jsx("p",{className:f.tone==="danger"?"text-red-300":"text-gray-400",children:f.summary}),f.nextAction?d.jsx("p",{className:"text-xs text-gray-500",children:f.nextAction}):null,b>0||w>0?d.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[b>0?d.jsxs("span",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-yellow-300",children:[b," dirty path",b===1?"":"s"]}):null,w>0?d.jsxs("span",{className:"rounded-md border border-red-900/60 bg-red-950/20 px-2 py-0.5 text-red-300",children:[w," conflicted path",w===1?"":"s"]}):null]}):null]}):d.jsxs("p",{className:"text-sm text-gray-500",children:["Remote results are not configured. Add"," ",d.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:"results"})," to"," ",d.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:".agentv/config.yaml"})," to enable."]}),g?d.jsxs("div",{className:"space-y-2 rounded-md border border-yellow-900/60 bg-yellow-950/20 px-3 py-2.5 text-sm text-yellow-200",children:[d.jsx("p",{className:"font-medium text-yellow-300",children:"Pending merge on GitHub"}),d.jsxs("p",{className:"text-yellow-200/90",children:["Local results were pushed to"," ",d.jsx("code",{className:"rounded bg-yellow-950/60 px-1 font-mono text-xs text-yellow-200",children:g.tempBranch})," ","instead of force-pushing"," ",d.jsx("code",{className:"rounded bg-yellow-950/60 px-1 font-mono text-xs text-yellow-200",children:g.targetBranch}),typeof g.contributedRunCount=="number"?` (${g.contributedRunCount} run${g.contributedRunCount===1?"":"s"})`:"",". Merge it on GitHub, then resync."]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-0.5",children:[g.compareUrl?d.jsx("a",{href:g.compareUrl,target:"_blank",rel:"noreferrer noopener",className:"rounded-md border border-yellow-700 bg-yellow-950/40 px-3 py-1.5 text-sm font-medium text-yellow-200 transition-colors hover:bg-yellow-900/40",children:"Open merge on GitHub ↗"}):null,l?d.jsx("button",{type:"button",onClick:l,disabled:c===!0||t===!0,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:c?"Resyncing...":"I merged it — resync"}):null]})]}):null,i?d.jsx("div",{className:`rounded-md border px-3 py-2 text-sm ${x}`,role:i.kind==="error"?"alert":"status",children:i.message}):null,e!=null&&e.last_error?d.jsxs("div",{className:"rounded-md border border-red-900/60 bg-red-950/20 px-3 py-2 text-sm text-red-300",role:"alert",children:[d.jsx("p",{className:"font-medium",children:"Remote sync error"}),d.jsx("p",{children:e.last_error}),d.jsx("p",{className:"mt-1 text-xs text-red-200/80",children:oj(e)})]}):null,e!=null&&e.git_diff_summary&&f.state!=="clean"?d.jsx("pre",{className:"max-h-32 overflow-auto whitespace-pre-wrap rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2 text-xs text-gray-500",children:e.git_diff_summary}):null]})}function _5({projectId:e,tagKey:t,onTagKeyChange:r}){const{data:n}=Ue(e?n6(e):r6),i=(n==null?void 0:n.keys)??[jl],o=i.includes(t),l=o?t:i.includes(jl)?jl:i[0]??jl;S.useEffect(()=>{n&&!o&&l!==t&&r(l)},[n,o,l,t,r]);const{data:c,isLoading:h}=Ue(e?cj(e,l):uj(l)),f=(c==null?void 0:c.groups)??[];return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("label",{htmlFor:"tag-key-select",className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Group by"}),d.jsx("select",{id:"tag-key-select",value:l,onChange:p=>r(p.target.value),className:"rounded-md border border-gray-700 bg-gray-900 px-2 py-1 text-sm text-gray-200 focus:border-cyan-700 focus:outline-none",children:i.map(p=>d.jsx("option",{value:p,children:Zi(p)},p))})]}),h?d.jsx(jie,{}):f.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsxs("p",{className:"text-lg text-gray-400",children:["No values found for tag `",l,"`"]}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Values will appear here once evaluations are run with a ",d.jsx("code",{children:l})," tag."]})]}):d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[760px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:Zi(l)}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Targets"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Execution Errors"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Last Run"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:f.map(p=>{const g=Bc(p),y=ur(p);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:e?d.jsx(Ee,{to:"/projects/$projectId/tags/$key/$value",params:{projectId:e,key:l,value:p.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:p.name}):d.jsx(Ee,{to:"/tags/$key/$value",params:{key:l,value:p.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:p.name})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:p.run_count}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:p.target_count}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[d.jsx("span",{className:"text-emerald-400",children:p.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),g]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:y>0?y:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(an,{rate:p.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:f2(p.last_run).full,children:f2(p.last_run).date})]},p.name)})})]})})]})}function f2(e){if(!e)return{date:"N/A",full:"N/A"};try{const t=new Date(e);if(Number.isNaN(t.getTime()))return{date:"N/A",full:"N/A"};const r=t.toLocaleString(),n=Date.now()-t.getTime(),i=Math.floor(n/6e4),o=Math.floor(n/36e5);let l;return i<1?l="just now":i<60?l=`${i} min ago`:o<24?l=`${o} hour${o===1?"":"s"} ago`:l=t.toLocaleDateString(),{date:l,full:r}}catch{return{date:"N/A",full:"N/A"}}}function jie(){return d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("div",{className:"min-w-[760px] animate-pulse",children:[d.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>d.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[d.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},e))]})})}const h2="remote::";function wie(e){return e.startsWith(h2)?e.slice(h2.length):e}function Wp(e){const t=new Map;for(const r of e){const n=wie(r.filename),i=t.get(n);if(!i){t.set(n,r);continue}const o=i.source==="remote"&&r.source==="local"?r:i;t.set(n,{...o,on_remote:i.on_remote===!0||r.on_remote===!0})}return[...t.values()]}function O5({projectId:e}={}){var g,y;const[t,r]=S.useState(null),n=Ue(e?E6(e):s6),i=Ue(e?fj(e):lj),o=((g=n.data)==null?void 0:g.targets)??[],l=((y=i.data)==null?void 0:y.runs)??[],c=n.error??i.error,h=n.isLoading||i.isLoading,f=S.useMemo(()=>o.find(x=>x.name===t)??null,[t,o]);S.useEffect(()=>{t&&!o.some(x=>x.name===t)&&r(null)},[t,o]);const p=S.useMemo(()=>{if(!f)return[];const x=new Map;for(const b of l){if((b.target??"default")!==f.name)continue;const N=b.experiment??"default",_=x.get(N)??[];_.push(b),x.set(N,_)}return[...x.entries()].map(([b,w])=>Sie(b,Wp(w))).sort((b,w)=>b.latestTimestamp&&w.latestTimestamp&&b.latestTimestamp!==w.latestTimestamp?w.latestTimestamp.localeCompare(b.latestTimestamp):b.latestTimestamp?-1:w.latestTimestamp?1:b.name.localeCompare(w.name))},[l,f]);return h?d.jsx(Oie,{}):c?d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load targets: ",c.message]}):o.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Targets will appear here once evaluations are run with target labels."})]}):f?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"space-y-3",children:[d.jsx("button",{type:"button",onClick:()=>r(null),className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"← Back to targets"}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:d.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:f.name}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[f.run_count," run",f.run_count===1?"":"s"," ·"," ",f.experiment_count," experiment",f.experiment_count===1?"":"s"," ·"," ",d.jsx("span",{className:"text-emerald-400",children:f.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),Bc(f)," evals passed",ur(f)>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",ur(f)," execution errors"]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(an,{rate:f.pass_rate})})]})})]}),p.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No runs found for this target"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This target summary exists, but there are no matching runs to group by experiment."})]}):d.jsx("div",{className:"space-y-6",children:p.map(x=>d.jsxs("section",{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-medium text-gray-200",children:Nie(x.name)}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[x.runs.length," run",x.runs.length===1?"":"s"," ·"," ",d.jsx("span",{className:"text-emerald-400",children:x.passedCount}),d.jsx("span",{className:"text-gray-600",children:" / "}),x.qualityCount," evals passed",x.executionErrorCount>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",x.executionErrorCount," execution errors"]}),x.latestTimestamp&&d.jsxs("span",{className:"ml-2 text-gray-500",children:["· Last run ",_ie(x.latestTimestamp)]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(an,{rate:x.passRate})})]}),d.jsx(Xp,{runs:x.runs,projectId:e})]},x.name))})]}):d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[720px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Experiments"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Execution Errors"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:o.map(x=>{const b=Bc(x),w=ur(x);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:d.jsx("button",{type:"button",onClick:()=>r(x.name),className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:x.name})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.run_count}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.experiment_count}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(an,{rate:x.pass_rate})}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[d.jsx("span",{className:"text-emerald-400",children:x.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),d.jsx("span",{children:b})]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:w>0?w:d.jsx("span",{className:"text-gray-600",children:"0"})})]},x.name)})})]})})}function Sie(e,t){let r=0,n=0,i=0,o=0,l=null;for(const c of t){const h=ur(c),f=Math.max(0,c.test_count-h);r+=c.test_count,n+=f,o+=h,i+=Math.round(c.pass_rate*f),c.timestamp&&(!l||c.timestamp>l)&&(l=c.timestamp)}return{name:e,runs:t,latestTimestamp:l,evalCount:r,qualityCount:n,passedCount:i,executionErrorCount:o,passRate:n>0?i/n:0}}function Nie(e){return e==="default"?"Default experiment":e}function _ie(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const r=Date.now()-t.getTime(),n=Math.floor(r/6e4),i=Math.floor(r/36e5);return n<1?"just now":n<60?`${n} min ago`:i<24?`${i} hour${i===1?"":"s"} ago`:t.toLocaleDateString()}function Oie(){return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[d.jsx("div",{className:"h-6 w-40 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"mt-3 h-4 w-72 animate-pulse rounded bg-gray-800"})]}),d.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:d.jsxs("div",{className:"animate-pulse",children:[d.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>d.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[d.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-20 rounded bg-gray-800"})]},e))]})}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[d.jsx("div",{className:"h-5 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"mt-3 h-4 w-56 animate-pulse rounded bg-gray-800"})]})]})}const m2=[{id:"runs",label:"🏃 Recent Runs"},{id:"tags",label:"🏷️ Tags"},{id:"analytics",label:"📊 Analytics"},{id:"targets",label:"🤖 Targets"}],Eie=dr("/")({component:Aie});function Aie(){const e=po(),n=nj().location.search.tab,{data:i,isLoading:o}=dj(),{data:l,isLoading:c}=pt(),h=(i==null?void 0:i.projects)??[],[f,p]=S.useState(void 0);S.useEffect(()=>{if(o||c)return;const y=l==null?void 0:l.current_project_id;if(!y){p(null);return}const x=LB(y),b=typeof window<"u"&&window.sessionStorage.getItem(x)==="1",w=zB(h.map(N=>N.id),y,b);typeof window<"u"&&w&&window.sessionStorage.setItem(x,"1"),p(w??null)},[l==null?void 0:l.current_project_id,c,h,o]);const g=BB(h.map(y=>y.id),l==null?void 0:l.project_dashboard,f??void 0,n);return S.useEffect(()=>{g.kind==="redirect"&&g.redirectPath&&e({to:g.redirectPath,replace:!0})},[g,e]),o||c||f===void 0?d.jsx(Ub,{}):g.kind==="redirect"?d.jsx(Ub,{}):g.kind==="dashboard"?d.jsx(Tie,{}):d.jsx(Cie,{})}function Tie(){const{data:e}=dj(),{data:t}=pt(),r=ho(),[n,i]=S.useState(!1),[o,l]=S.useState(!1),[c,h]=S.useState(null),f=(e==null?void 0:e.projects)??[],p=(t==null?void 0:t.read_only)===!0;async function g(y){await b6(y.id),r.setQueryData(["projects"],x=>x&&{projects:x.projects.filter(b=>b.id!==y.id)}),h(`Project removed from Dashboard: ${y.id}. Files were left on disk.`),r.invalidateQueries({queryKey:["projects"]})}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Projects"}),d.jsx("div",{className:"flex gap-2",children:!p&&d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>l(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"Start"}),d.jsx("button",{type:"button",onClick:()=>{h(null),i(!0)},className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400",children:"Add Project"})]})})]}),c&&d.jsx("div",{className:"rounded-lg border border-cyan-900/60 bg-cyan-950/30 p-3 text-sm text-cyan-300",children:c}),f.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-300",children:"No projects registered yet."}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Add a project path to start browsing runs, tags, analytics, and targets."})]}):d.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:f.map(y=>d.jsx(iie,{project:y,canRemove:!p,onRemove:g},y.id))}),!p&&d.jsx(So,{open:o,onClose:()=>l(!1)}),!p&&d.jsx(f9,{open:n,onClose:()=>i(!1),onAdded:y=>{h(`Project registered: ${y.id}`),r.invalidateQueries({queryKey:["projects"]})}})]})}function Cie(){var ae;const t=nj().location.search,r=t.tab,n=(ae=t.key)!=null&&ae.trim()?t.key:jl,i=po(),o=ho(),{data:l,isLoading:c,error:h,hasNextPage:f,fetchNextPage:p,isFetchingNextPage:g}=h6(),{data:y}=ep(),{data:x}=pt(),[b,w]=S.useState(!1),[N,_]=S.useState(!1),[E,T]=S.useState(!1),[A,C]=S.useState(null),R=(x==null?void 0:x.read_only)===!0,D=m2.some(Z=>Z.id===r)?r:"runs",M=Wp((l==null?void 0:l.runs)??[]),z=M.filter(Z=>Z.on_remote===!0).length,k=(y==null?void 0:y.configured)===!0?AR(z,M.length,y.branch):void 0;async function H(){_(!0),C(null);try{const Z=await DR();o.setQueryData($c().queryKey,Z),C(Hh(Z)),Promise.all([o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["tags"]}),o.invalidateQueries({queryKey:["compare"]}),o.invalidateQueries({queryKey:["targets"]}),o.invalidateQueries({queryKey:["remote-status",""]})]).catch(()=>{})}catch(Z){C(Kh(Z,y)),o.invalidateQueries({queryKey:["remote-status",""]}).catch(()=>{})}finally{_(!1)}}S.useEffect(()=>{if((A==null?void 0:A.kind)!=="success")return;const Z=window.setTimeout(()=>C(null),7e3);return()=>window.clearTimeout(Z)},[A]);async function U(){T(!0),C(null);try{const Z=await kR();o.setQueryData($c().queryKey,Z),C(Hh(Z)),Promise.all([o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["tags"]}),o.invalidateQueries({queryKey:["compare"]}),o.invalidateQueries({queryKey:["targets"]}),o.invalidateQueries({queryKey:["remote-status",""]})]).catch(()=>{})}catch(Z){C(Kh(Z,y)),o.invalidateQueries({queryKey:["remote-status",""]}).catch(()=>{})}finally{T(!1)}}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Evaluation Runs"}),(x==null?void 0:x.project_name)&&d.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:x.project_name})]}),!R&&d.jsx("button",{type:"button",onClick:()=>w(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"Start"})]}),d.jsx("div",{className:"border-b border-gray-800",children:d.jsx("div",{className:"flex flex-wrap gap-1 sm:flex-nowrap",children:m2.map(Z=>d.jsx("button",{type:"button",onClick:()=>i({to:"/",search:Z.id==="tags"?{tab:Z.id,key:n}:{tab:Z.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${D===Z.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:Z.label},Z.id))})}),D==="runs"&&d.jsx(Rie,{runs:M,isLoading:c,error:h,remoteStatus:y,syncInFlight:N,syncFeedback:A,onSyncRemote:H,onConfirmMerge:U,confirmMergeInFlight:E,projectName:x==null?void 0:x.project_name,onRemoteSummary:k,hasNextPage:f,isFetchingNextPage:g,onLoadMore:()=>void p(),readOnly:R}),D==="tags"&&d.jsx(_5,{tagKey:n,onTagKeyChange:Z=>i({to:"/",search:{tab:"tags",key:Z}})}),D==="analytics"&&d.jsx(Pie,{readOnly:R}),D==="targets"&&d.jsx(O5,{}),!R&&d.jsx(So,{open:b,onClose:()=>w(!1)})]})}function Pie({readOnly:e}){const{data:t,isLoading:r,isError:n,error:i}=m6();return d.jsx(w5,{data:t,isLoading:r,isError:n,error:i,readOnly:e})}function Rie({runs:e,isLoading:t,error:r,remoteStatus:n,syncInFlight:i,syncFeedback:o,onSyncRemote:l,onConfirmMerge:c,confirmMergeInFlight:h,projectName:f,onRemoteSummary:p,hasNextPage:g,isFetchingNextPage:y,onLoadMore:x,readOnly:b}){return t?d.jsx(Ub,{}):r?d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",r.message]}):d.jsxs("div",{className:"space-y-4",children:[d.jsx(Mie,{}),d.jsx(N5,{remoteStatus:n,syncInFlight:i,onSync:l,projectName:f,syncFeedback:o,onRemoteSummary:p,onConfirmMerge:c,confirmMergeInFlight:h}),d.jsx(Xp,{runs:e,enableCombine:!b,remoteBranch:n==null?void 0:n.branch,hasNextPage:g,isFetchingNextPage:y,onLoadMore:x})]})}function Mie(){const{data:e}=mj(),t=((e==null?void 0:e.runs)??[]).filter(r=>r.status==="starting"||r.status==="running");return t.length===0?null:d.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[d.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),d.jsx("ul",{className:"divide-y divide-gray-800/50",children:t.map(r=>d.jsxs("li",{className:"flex items-center justify-between px-4 py-3",children:[d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[d.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),d.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:r.id}),d.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(r.started_at).toLocaleTimeString()})]}),d.jsx(Ee,{to:"/jobs/$runId",params:{runId:r.id},className:"ml-4 flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},r.id))})]})}function Ub(){return d.jsx("div",{className:"space-y-2",children:["s1","s2","s3","s4","s5"].map(e=>d.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},e))})}function E5(e){return e==="finished"||e==="failed"}function Die(e,t){return t||!e?!1:!E5(e)}function kie(e,t,r,n){return t||n&&!E5(n)?!1:!!(e.some(i=>i.executionStatus==="execution_error")||r!==void 0&&e.length<r)}function Lie(e){const t={suite_filter:e.suiteFilter,output:e.runDir};return e.target&&(t.target=e.target),e.mode==="resume"?t.resume=!0:t.rerun_failed=!0,t}function $ie(e){const t=!e.ready||e.busy!==null;return[{mode:"rerun",label:"Re-run",title:e.ready?"Re-run failed or missing work, keep passing results":e.disabledReason,disabled:t,testId:"rerun-failed-menu-item"},{mode:"resume",label:"Resume",title:e.ready?"Resume missing or errored work":e.disabledReason,disabled:t,testId:"resume-run-menu-item"}]}function A5({results:e,runDir:t,suiteFilter:r,target:n,projectId:i,isReadOnly:o,plannedTestCount:l,runStatus:c}){const h=po(),f=S.useRef(null),[p,g]=S.useState(null),[y,x]=S.useState(null),[b,w]=S.useState(!1),N=kie(e,o,l,c),_=!!t&&!!r,T=$ie({ready:_,busy:p,disabledReason:t?r?"":"Original eval file path missing from summary.json — cannot determine what to resume":"Run directory unavailable (remote run cannot be resumed in place)"});if(S.useEffect(()=>{if(!b)return;function C(D){f.current&&!f.current.contains(D.target)&&w(!1)}function R(D){D.key==="Escape"&&w(!1)}return document.addEventListener("pointerdown",C),document.addEventListener("keydown",R),()=>{document.removeEventListener("pointerdown",C),document.removeEventListener("keydown",R)}},[b]),!N)return null;async function A(C){if(!(!_||!t||!r)){w(!1),g(C),x(null);try{const R=Lie({mode:C,runDir:t,suiteFilter:r,target:n}),D=await $R(R,i);h(i?{to:"/projects/$projectId/jobs/$runId",params:{projectId:i,runId:D.id}}:{to:"/jobs/$runId",params:{runId:D.id}})}catch(R){x(R instanceof Error?R.message:"Failed to launch resume"),g(null)}}}return d.jsxs("div",{className:"flex flex-col items-end gap-1",ref:f,children:[d.jsxs("div",{className:"relative",children:[d.jsx("button",{type:"button",onClick:()=>w(C=>!C),disabled:p!==null,"aria-haspopup":"menu","aria-expanded":b,className:"rounded-md border border-gray-700 bg-gray-900 px-3 py-1.5 text-sm font-medium text-gray-200 hover:border-gray-600 hover:bg-gray-800 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"run-actions-menu-button",children:p==="resume"?"Resuming...":p==="rerun"?"Re-running...":"Actions"}),b&&d.jsx("div",{className:"absolute left-0 z-20 mt-2 w-48 overflow-hidden rounded-md border border-gray-700 bg-gray-950 py-1 text-sm shadow-xl shadow-black/30 sm:left-auto sm:right-0",role:"menu","aria-label":"Run actions",children:T.map(C=>d.jsx("button",{type:"button",role:"menuitem",onClick:()=>void A(C.mode),disabled:C.disabled,title:C.title,className:"block w-full px-3 py-2 text-left text-gray-200 hover:bg-gray-800 disabled:cursor-not-allowed disabled:text-gray-500","data-testid":C.testId,children:C.label},C.mode))})]}),y&&d.jsx("p",{className:"text-xs text-red-400",children:y})]})}function T5(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function C5(e){return typeof e=="string"&&e.trim().length>0?e.trim():void 0}function Iie(e){const t=C5(e);if(t)try{const r=new URL(t);return!["http:","https:"].includes(r.protocol)||r.username||r.password?void 0:(r.search="",r.hash="",r.toString())}catch{return}}function zie(e){const t=C5(e.provider);return t===void 0||t.toLowerCase()==="phoenix"}function Bie(e){if(e)return{provider:e.external_trace_provider??e["external_trace.provider"],ui_url:e.external_trace_ui_url??e.external_trace_url??e["external_trace.ui_url"]??e["external_trace.url"]}}function Uie(e){const t=e,r=T5(e.metadata)?e.metadata:void 0;return[t.external_trace,t.externalTrace,r==null?void 0:r.external_trace,r==null?void 0:r.externalTrace,Bie(r)]}function qie(e){for(const t of e)for(const r of Uie(t)){if(!T5(r)||!zie(r))continue;const n=Iie(r.ui_url??r.uiUrl??r.url??r.href);if(n)return n}}const P5=[{id:"all",label:"All"},{id:"passing",label:"Passing"},{id:"failing",label:"Failing"},{id:"errors",label:"Errors"},{id:"grader_errors",label:"Grader errors"}],R5="all",M5="all";function zt(e){if(typeof e!="string")return;const t=e.trim();return t||void 0}function p2(e){return[...new Set([...e].filter(t=>t.trim().length>0))].sort((t,r)=>t.localeCompare(r))}function D5(e,t){return zt(e.name)??zt(e.type)??`Grader ${t+1}`}function k5(e,t){var r,n;return e.verdict==="fail"||e.score<t||(r=e.assertions)!=null&&r.some(i=>!i.passed)?!0:((n=e.scores)==null?void 0:n.some(i=>k5(i,t)))??!1}function L5(e){if(!e||e.length===0)return[];const t=[];return e.forEach((r,n)=>{t.push(D5(r,n),r.type??"",r.verdict??"");for(const i of r.assertions??[])t.push(i.text,i.evidence??"");t.push(...L5(r.scores))}),t.filter(r=>r.length>0)}function qb(e){return!e||e.length===0?[]:e.flatMap(t=>[...t.assertions??[],...qb(t.scores)])}function Fie(e){const t=new Set;return e.filter(r=>{const n=`${r.text}\0${r.evidence??""}\0${r.passed}`;return t.has(n)?!1:(t.add(n),!0)})}function Hie(e){const t=new Map;return e==null||e.forEach((r,n)=>{const i=D5(r,n);t.has(i)||t.set(i,r)}),t}function Kie(e){const t=e.tokenUsage;if(!t)return;const r=[t.input,t.output,t.reasoning,t.cached].filter(n=>typeof n=="number"&&Number.isFinite(n));if(r.length!==0)return r.reduce((n,i)=>n+i,0)}function gx(e){return e.filter(t=>typeof t=="number"&&Number.isFinite(t))}function Lh(e){return e.attempts??e.trials??[]}function Gie(e,t){return e.verdict==="pass"?!0:e.verdict==="fail"?!1:typeof e.score=="number"?e.score>=t:!1}function Yie(e){return[e.metrics_path,e.timing_path,e.grading_path,e.transcript_path,e.answer_path].filter(Boolean).length}function Vie(e){const t=zt(e.model);if(t)return t;const r=e.metadata;if(r)return zt(r.model)??zt(r.model_name)??zt(r.target_model)??zt(r.provider_model)}function Qie(e){const t=zt(e.target)??"default",r=zt(e.targetUsed);return r&&r!==t?`${t} -> ${r}`:t}function Xie(e){return zt(e.eval_path)??zt(e.suite)}function Wie(e,t){const r=zt(e.result_dir);return r?`result_dir:${r}`:["result",zt(e.eval_path)??zt(e.suite)??"",e.testId,zt(e.target)??"",zt(e.targetUsed)??"",zt(e.timestamp)??"",String(t)].join(":")}function Zie(e,t,r){var N;const n=VR(e),i=!n&&e.score>=r,o=n?"error":i?"passing":"failing",l=Hie(e.scores),c=[...l.keys()],h=((N=e.scores)==null?void 0:N.some(_=>k5(_,r)))??!1,f=Vie(e),p=Qie(e),g=Xie(e),y=zt(e.suite),x=zt(e.category),b=Kie(e),w=[e.testId,p,f??"",g??"",y??"",x??"",e.executionStatus??"",e.error??"",...L5(e.scores),...(e.assertions??[]).flatMap(_=>[_.text,_.evidence??""])];return{key:Wie(e,t),result:e,index:t,testId:e.testId,status:o,statusLabel:n?"Error":i?"Passing":"Failing",passing:i,executionError:n,graderError:h,targetLabel:p,...f&&{modelLabel:f},...g&&{evalLabel:g},...x&&{categoryLabel:x},...b!==void 0&&{tokenTotal:b},graderNames:c,graderScores:l,searchText:w.join(" ").toLowerCase()}}function Jie(e,t){const r=Lh(e.result).filter(g=>g.sample_path||g.attempt_path||g.run_path||g.verdict);if(r.length<=1)return;const n=r.filter(g=>Gie(g,t)).length,i=r.filter(g=>g.execution_status==="execution_error").length,o=gx(r.map(g=>g.duration_ms)),l=gx(r.map(g=>g.score)),c=gx(r.map(g=>g.total_tool_calls)),h=r.reduce((g,y)=>g+Yie(y),0),f=Fie([...e.result.assertions??[],...qb(e.result.scores),...r.flatMap(g=>[...g.assertions??[],...qb(g.scores)])]),p=f.filter(g=>g.passed).length;return{row:e,trials:r,trialCount:r.length,passedTrials:n,failedTrials:r.length-n,executionErrorTrials:i,passRate:r.length>0?n/r.length:0,meanScore:l.length>0?l.reduce((g,y)=>g+y,0)/l.length:e.result.score,assertionCount:f.length,passedAssertions:p,...f.length>0&&{assertionPassRate:p/f.length},...o.length>0&&{meanDurationMs:o.reduce((g,y)=>g+y,0)/o.length},...c.length>0&&{totalToolCalls:c.reduce((g,y)=>g+y,0)},artifactCount:h}}function ese(e,t){const r=e.some(f=>Lh(f.result).length>1),n=e.some(f=>f.evalLabel),i=e.some(f=>f.categoryLabel),o=e.some(f=>f.result.durationMs!=null||Lh(f.result).some(p=>p.duration_ms!=null)),l=e.some(f=>f.result.costUsd!=null||f.tokenTotal!=null||Lh(f.result).some(p=>p.cost_usd!=null||p.total_tokens!=null||p.token_usage!=null)),c=e.some(f=>f.result.error);return[{id:"status",label:"Status",kind:"base",defaultVisible:!0},...r?[{id:"expander",label:"Expand",kind:"base",defaultVisible:!0}]:[],{id:"test",label:"Test ID",kind:"base",defaultVisible:!0},{id:"target",label:"Target",kind:"base",defaultVisible:!0},...n?[{id:"eval",label:"Eval",kind:"base",defaultVisible:!0}]:[],{id:"score",label:"Score",kind:"base",defaultVisible:!0},...i?[{id:"category",label:"Category",kind:"base",defaultVisible:!1}]:[],...o?[{id:"duration",label:"Duration",kind:"base",defaultVisible:!0}]:[],...l?[{id:"cost_tokens",label:"Cost / Tokens",kind:"base",defaultVisible:!0}]:[],...c?[{id:"error",label:"Error",kind:"base",defaultVisible:!1}]:[],...t.map(f=>({id:`grader:${f}`,label:f,kind:"grader",defaultVisible:!0}))]}function tse(e){return e==="scorer_errors"?"grader_errors":P5.some(t=>t.id===e)?e:"all"}function rse(e){const t=e.filter(r=>r.defaultVisible).map(r=>r.id);return t.length>0?t:e.slice(0,4).map(r=>r.id)}function nse(e,t){if(!t.some(l=>l.id==="expander"))return[...e];if(e.includes("expander")||!e.includes("test"))return[...e];const r=[...e],n=r.indexOf("status"),i=r.indexOf("test"),o=n>=0?n+1:i;return r.splice(o,0,"expander"),r}function ase(e,t,r,n){var p,g;const i=new Set(t.map(y=>y.id)),o=((p=e==null?void 0:e.visibleColumnIds)==null?void 0:p.map(y=>y.startsWith("scorer:")?`grader:${y.slice(7)}`:y).filter(y=>i.has(y)))??[],l=o.length>0?nse(o,t):rse(t),c=e!=null&&e.target&&r.includes(e.target)?e.target:R5,h=(e==null?void 0:e.grader)??(e==null?void 0:e.scorer),f=h&&n.includes(h)?h:M5;return{view:tse(e==null?void 0:e.view),search:((g=e==null?void 0:e.search)==null?void 0:g.trim())??"",target:c,grader:f,visibleColumnIds:l}}function ise(e,t){switch(t){case"passing":return e.status==="passing";case"failing":return e.status==="failing";case"errors":return e.status==="error";case"grader_errors":return e.graderError;case"all":return!0}}function sse(e){return{all:e.length,passing:e.filter(t=>t.status==="passing").length,failing:e.filter(t=>t.status==="failing").length,errors:e.filter(t=>t.status==="error").length,grader_errors:e.filter(t=>t.graderError).length}}function ose(e){const t=e.results.map((y,x)=>Zie(y,x,e.passThreshold)),r=p2(t.map(y=>y.targetLabel)),n=p2(t.flatMap(y=>y.graderNames)),i=ese(t,n),o=ase(e.state,i,r,n),l=o.search.toLowerCase(),c=new Set(o.visibleColumnIds),h=t.filter(y=>!(!ise(y,o.view)||o.target!==R5&&y.targetLabel!==o.target||o.grader!==M5&&!y.graderScores.has(o.grader)||l&&!y.searchText.includes(l))),f=t.map(y=>Jie(y,e.passThreshold)).filter(y=>!!y),p=new Set(h.map(y=>y.key)),g=f.filter(y=>p.has(y.row.key));return{rows:t,filteredRows:h,repeatGroups:f,filteredRepeatGroups:g,columns:i,visibleColumns:i.filter(y=>c.has(y.id)),state:o,targetOptions:r,graderOptions:n,viewCounts:sse(t)}}function lse(e){var r;switch((r=e.split(".").pop())==null?void 0:r.toLowerCase()){case"ts":case"tsx":return"📘";case"json":return"📋";case"log":case"txt":return"📜";case"md":return"📝";default:return"📄"}}function use(e){if(e.type==="file")return e.storage==="git"&&e.ref?e.ref:e.storage&&e.storage!=="local"?e.storage:void 0}function $5(e){const t=[];for(const r of e)r.type==="dir"&&(t.push(r.path),r.children&&t.push(...$5(r.children)));return t}function I5({node:e,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:o=0}){const l=e.type==="dir",c=n.has(e.path),h=t===e.path,f=use(e);return d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>{l?i(e.path):r(e.path)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors ${h?"bg-cyan-400/20 text-cyan-400":"text-gray-300 hover:bg-gray-800/50 hover:text-gray-200"}`,style:{paddingLeft:`${o*16+8}px`},children:[d.jsx("span",{className:"flex-shrink-0 text-xs",children:l?c?"📂":"📁":lse(e.name)}),d.jsx("span",{className:"truncate",children:e.name}),f&&d.jsx("span",{className:"ml-auto max-w-32 flex-shrink-0 truncate rounded border border-gray-700 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-gray-400",title:[e.kind?`kind: ${e.kind}`:void 0,e.ref?`ref: ${e.ref}`:void 0,e.key?`key: ${e.key}`:void 0].filter(Boolean).join(`
|
|
119
|
+
`),children:f})]}),l&&c&&e.children&&d.jsx("div",{children:e.children.map(p=>d.jsx(I5,{node:p,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:o+1},p.path))})]})}function cse({files:e,selectedPath:t,onSelect:r}){const[n,i]=S.useState(()=>new Set($5(e))),o=l=>{i(c=>{const h=new Set(c);return h.has(l)?h.delete(l):h.add(l),h})};return d.jsxs("div",{className:"w-full md:w-64 overflow-y-auto rounded-lg border border-gray-800 bg-gray-900 py-2",children:[e.length===0&&d.jsx("p",{className:"px-4 py-2 text-sm text-gray-500",children:"No files."}),e.map(l=>d.jsx(I5,{node:l,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:o},l.path))]})}const dse="modulepreload",fse=function(e){return"/"+e},g2={},hse=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let l=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),h=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=l(r.map(f=>{if(f=fse(f),f in g2)return;g2[f]=!0;const p=f.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":dse,p||(y.as="script"),y.crossOrigin="",y.href=f,h&&y.setAttribute("nonce",h),document.head.appendChild(y),p)return new Promise((x,b)=>{y.addEventListener("load",x),y.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})},mse=S.lazy(()=>hse(()=>import("./index-DNgf3qJ2.js"),[]));function pse({value:e,language:t="json",height:r="400px"}){return d.jsx(S.Suspense,{fallback:d.jsx("div",{className:"flex items-center justify-center rounded-lg bg-gray-900 p-8 text-gray-500",children:"Loading editor..."}),children:d.jsx(mse,{height:r,language:t,value:e,theme:"vs-dark",options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbers:"on",wordWrap:"on",padding:{top:12}}})})}function fo({score:e,className:t=""}){const r=Math.round(Math.max(0,Math.min(1,e))*100);return d.jsxs("div",{className:`flex items-center gap-3 ${t}`,children:[d.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-gray-800",children:d.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-cyan-400 to-blue-500 transition-all duration-300",style:{width:`${r}%`}})}),d.jsxs("span",{className:"w-12 text-right text-sm font-medium tabular-nums text-gray-300",children:[r,"%"]})]})}const gse={system:{container:"border-gray-800 bg-gray-900/70",badge:"border-gray-700 bg-gray-800 text-gray-300",label:"System",accent:"text-gray-400"},user:{container:"border-cyan-900/60 bg-cyan-950/20",badge:"border-cyan-900/60 bg-cyan-950/30 text-cyan-300",label:"User",accent:"text-cyan-300"},assistant:{container:"border-gray-800 bg-gray-900",badge:"border-gray-700 bg-gray-800 text-gray-200",label:"Assistant",accent:"text-gray-300"},tool:{container:"border-amber-900/60 bg-amber-950/20",badge:"border-amber-900/60 bg-amber-950/30 text-amber-300",label:"Tool result",accent:"text-amber-300"},function:{container:"border-amber-900/60 bg-amber-950/20",badge:"border-amber-900/60 bg-amber-950/30 text-amber-300",label:"Function result",accent:"text-amber-300"}};function Fr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function yse(e){return!Fr(e)||e.tool_calls!==void 0&&!Array.isArray(e.tool_calls)?!1:typeof e.test_id=="string"&&typeof e.target=="string"&&typeof e.message_index=="number"&&Number.isFinite(e.message_index)&&typeof e.role=="string"}function y2(e){return Fr(e)&&e.v===1&&typeof e.agent=="string"&&(e.type==="system"||e.type==="user"||e.type==="assistant")&&Array.isArray(e.content)}function vse(e){const t=Fr(e.result)?e.result:void 0,r=xse(e.metadata,t==null?void 0:t.metadata);return{id:typeof e.id=="string"?e.id:void 0,tool:typeof e.tool_name=="string"?e.tool_name:typeof e.name=="string"?e.name:"tool",input:e.input,output:t==null?void 0:t.output,error:t==null?void 0:t.error,status:typeof(t==null?void 0:t.status)=="string"?t.status:void 0,duration_ms:typeof(t==null?void 0:t.duration_ms)=="number"?t.duration_ms:void 0,metadata:r}}function xse(e,t){const r=Fr(e),n=Fr(t);if(r&&n)return{...e,result:t};if(r)return e;if(n)return t}function v2(e,t,r){const n=e.content,i=n.filter(h=>Fr(h)&&h.type==="tool_use").map(vse),o=typeof e.input_tokens=="number"?e.input_tokens:void 0,l=typeof e.output_tokens=="number"?e.output_tokens:void 0,c=o!==void 0||l!==void 0?{input:o??0,output:l??0}:void 0;return{test_id:(r==null?void 0:r.testId)??"",target:(r==null?void 0:r.target)??e.agent,message_index:t,role:e.type,agent:e.agent,model:typeof e.model=="string"?e.model:void 0,content:n,tool_calls:i.length>0?i:void 0,start_time:typeof e.ts=="string"?e.ts:void 0,token_usage:c,metadata:typeof e.id=="string"?{id:e.id}:void 0,source:{provider:e.agent,session_id:"",model:typeof e.model=="string"?e.model:void 0,timestamp:typeof e.ts=="string"?e.ts:void 0}}}function z5(e){const t=e.trim();if(t.startsWith("{"))try{const i=JSON.parse(t);if(Fr(i)&&Array.isArray(i.turns)){const o=typeof i.target=="string"?i.target:void 0,l=Fr(i.metadata)&&typeof i.metadata.test_id=="string"?i.metadata.test_id:void 0;return{entries:i.turns.flatMap((h,f)=>y2(h)?[v2(h,f,{target:o,testId:l})]:[])}}}catch{}const r=[],n=e.split(/\r?\n/);for(let i=0;i<n.length;i+=1){const o=n[i].trim();if(o)try{const l=JSON.parse(o);if(y2(l)){r.push(v2(l,r.length));continue}if(!yse(l))return{entries:r,error:`Line ${i+1} is not a transcript JSONL row.`};r.push(l)}catch(l){return{entries:r,error:`Line ${i+1} is invalid JSON: ${l.message}`}}}return{entries:r}}function Hm(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function bse(e){if(typeof e=="number")return`$${e.toFixed(4)}`}function sS(e){if(!e)return;const t=[];return typeof e.input=="number"&&t.push(`${e.input} in`),typeof e.output=="number"&&t.push(`${e.output} out`),typeof e.reasoning=="number"&&t.push(`${e.reasoning} reasoning`),typeof e.cached=="number"&&t.push(`${e.cached} cached`),t.length>0?t.join(" / "):void 0}function B5(e){if(e===void 0)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function jse(e){if(Array.isArray(e)){const t=e.map(r=>{if(Fr(r)&&r.type==="text"&&typeof r.text=="string")return r.text;if(Fr(r)&&r.type==="thinking"&&typeof r.text=="string")return`Thinking:
|
|
120
|
+
${r.text}`;if(Fr(r)&&r.type==="image"&&typeof r.source=="string")return`Image: ${r.source}`}).filter(r=>r!==void 0);if(t.length>0)return t.join(`
|
|
121
|
+
`)}return B5(e)}function ad(e,t){for(const r of t){const n=e[r];if(typeof n=="string"&&n.trim())return n}}function Fb(e,t){for(const r of t)if(e[r]!==void 0)return e[r]}function U5(e,t){const r=e[t];return Fr(r)?r:void 0}function wse(e,t){const r=U5(e,"function");return ad(e,["tool","name","tool_name"])??(r?ad(r,["name"]):void 0)??`Tool ${t+1}`}function Sse(e){const t=U5(e,"function");return Fb(e,["input","arguments","args","parameters"])??(t?Fb(t,["arguments"]):void 0)}function Nse(e){return Fb(e,["output","result","content"])}function _se(e,t){return`${e.message_index}-${e.role}-${t}`}function Ose(e){return[...e].sort((t,r)=>t.message_index-r.message_index).map((t,r)=>{const n=gse[t.role]??{container:"border-gray-800 bg-gray-900",badge:"border-gray-700 bg-gray-800 text-gray-300",label:t.role,accent:"text-gray-300"},i=_se(t,r),o=(Array.isArray(t.tool_calls)?t.tool_calls.filter(Fr):[]).map((l,c)=>{const h=ad(l,["id","call_id","tool_call_id"]);return{id:`${i}-tool-${h??c}`,call:l,index:c,name:wse(l,c),status:ad(l,["status"]),duration:typeof l.duration_ms=="number"?Hm(l.duration_ms):void 0}});return{id:i,anchorId:`message-${r+1}`,line:t,ordinal:r,roleStyle:n,content:jse(t.content),duration:Hm(t.duration_ms),tokenUsage:sS(t.token_usage),toolCalls:o}})}function x2(e){const t=new Set;e[0]&&t.add(e[0].id);const r=e[e.length-1];return r&&t.add(r.id),t}function Ese(e){const t=new Map;for(const r of e)t.set(r.line.role,(t.get(r.line.role)??0)+1);return t}function Ase(e){const t=new Map;let r=0;for(const n of e)for(const i of n.toolCalls)r+=1,t.set(i.name,(t.get(i.name)??0)+1);return{total:r,byName:t}}function Tse(e){return e!=null&&!(typeof e=="string"&&e.length===0)}function Is({label:e,value:t,tone:r="default"}){return Tse(t)?d.jsxs("div",{className:"min-w-0 space-y-1",children:[d.jsx("div",{className:r==="error"?"text-xs font-medium text-red-300":"text-xs font-medium text-gray-400",children:e}),d.jsx("pre",{className:"max-h-80 max-w-full overflow-auto rounded-md border border-gray-800 bg-gray-950 p-3 text-xs text-gray-200",children:d.jsx("code",{children:B5(t)})})]}):null}function ir({children:e}){return d.jsx("span",{className:"inline-flex min-w-0 max-w-full break-all rounded-md border border-gray-800 bg-gray-950 px-2 py-0.5 text-xs text-gray-400",children:e})}function Sh({href:e,children:t,download:r=!1}){return e?d.jsx("a",{href:e,target:"_blank",rel:"noreferrer",download:r,className:"rounded-md px-3 py-1.5 text-sm text-cyan-400 transition-colors hover:text-cyan-300 hover:underline",children:t}):null}function yx({path:e,onOpenFile:t,children:r}){return!e||!t?null:d.jsx("button",{type:"button",onClick:()=>t(e),className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:r})}function Cse({toolCall:e,expanded:t,onToggle:r}){const{call:n,index:i,name:o,status:l,duration:c}=e,h=ad(n,["id","call_id","tool_call_id"]),f=Fr(n.metadata)?n.metadata:void 0;return d.jsxs("details",{className:"min-w-0 rounded-md border border-gray-800 bg-gray-950/80 p-3",open:t,"data-testid":`tool-call-${h??i}`,"data-expanded":t?"true":"false",onToggle:p=>r(e.id,p.currentTarget.open),children:[d.jsx("summary",{className:"min-w-0 cursor-pointer list-none text-sm font-medium text-gray-200",children:d.jsxs("span",{className:"inline-flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("span",{className:"text-xs text-gray-500",children:t?"-":"+"}),d.jsx("span",{children:"Tool call"}),d.jsx("span",{className:"rounded-md border border-amber-900/60 bg-amber-950/30 px-2 py-0.5 text-xs text-amber-300",children:o}),l&&d.jsx("span",{className:"text-xs text-gray-500",children:l}),c&&d.jsx("span",{className:"tabular-nums text-xs text-gray-500",children:c})]})}),d.jsxs("div",{className:"mt-3 min-w-0 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[h&&d.jsxs(ir,{children:["id: ",h]}),c&&d.jsxs(ir,{children:["duration: ",c]}),l&&d.jsxs(ir,{children:["status: ",l]})]}),d.jsx(Is,{label:"Arguments",value:Sse(n)}),d.jsx(Is,{label:"Result",value:Nse(n)}),d.jsx(Is,{label:"Error",value:n.error,tone:"error"}),d.jsx(Is,{label:"Metadata",value:f})]})]})}function Pse({line:e}){const t=Hm(e.duration_ms),r=sS(e.token_usage);return d.jsxs("details",{className:"min-w-0 rounded-md border border-amber-900/50 bg-gray-950/60 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-amber-300",children:[e.name?`Tool result · ${e.name}`:"Tool result",t&&d.jsx("span",{className:"ml-2 tabular-nums text-xs text-gray-500",children:t})]}),d.jsxs("div",{className:"mt-3 min-w-0 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.name&&d.jsxs(ir,{children:["name: ",e.name]}),t&&d.jsxs(ir,{children:["duration: ",t]}),r&&d.jsxs(ir,{children:["tokens: ",r]})]}),d.jsx(Is,{label:"Result",value:e.content}),d.jsx(Is,{label:"Metadata",value:e.metadata})]})]})}function Rse({message:e,expanded:t,expandedToolIds:r,onToggleMessage:n,onToggleTool:i}){const{line:o,ordinal:l,roleStyle:c,content:h,duration:f,tokenUsage:p,toolCalls:g}=e;return d.jsxs("details",{id:e.anchorId,className:`min-w-0 scroll-mt-6 rounded-lg border ${c.container}`,open:t,"data-testid":`message-row-${l+1}`,"data-expanded":t?"true":"false",onToggle:y=>n(e.id,y.currentTarget.open),children:[d.jsx("summary",{className:"min-w-0 cursor-pointer list-none px-4 py-3",children:d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("span",{className:"text-xs text-gray-500",children:t?"-":"+"}),d.jsx("span",{className:`rounded-md border px-2 py-0.5 text-xs font-medium ${c.badge}`,children:c.label}),o.name&&d.jsx("span",{className:`truncate text-sm font-medium ${c.accent}`,children:o.name}),g.length>0&&d.jsxs("span",{className:"rounded-md border border-amber-900/60 bg-amber-950/30 px-2 py-0.5 text-xs text-amber-300",children:[g.length," tool ",g.length===1?"call":"calls"]})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-gray-500",children:[d.jsxs("a",{href:`#${e.anchorId}`,className:"tabular-nums text-gray-400 hover:text-cyan-300 hover:underline",onClick:y=>y.stopPropagation(),children:["#",l+1]}),o.start_time&&d.jsx("span",{children:o.start_time}),f&&d.jsx("span",{className:"tabular-nums",children:f}),p&&d.jsx("span",{children:p})]})]})}),d.jsxs("div",{className:"space-y-3 border-t border-gray-800/70 px-4 py-3",children:[o.role==="tool"||o.role==="function"?d.jsx(Pse,{line:o}):h.trim().length>0?d.jsx("pre",{className:"max-w-full whitespace-pre-wrap break-words text-sm leading-6 text-gray-200",children:h}):d.jsx("p",{className:"text-sm text-gray-500",children:"No message content recorded."}),g.length>0&&d.jsx("div",{className:"space-y-2",children:g.map(y=>d.jsx(Cse,{toolCall:y,expanded:r.has(y.id),onToggle:i},y.id))}),o.metadata&&o.role!=="tool"&&o.role!=="function"&&d.jsxs("details",{className:"min-w-0 rounded-md border border-gray-800 bg-gray-950/60 p-3",children:[d.jsx("summary",{className:"cursor-pointer text-xs font-medium text-gray-400",children:"Message metadata"}),d.jsx("div",{className:"mt-3",children:d.jsx(Is,{label:"Metadata",value:o.metadata})})]})]})]})}function Mse({messages:e,transcriptPath:t}){var g,y,x,b;const r=(g=e[0])==null?void 0:g.line,n=((y=r==null?void 0:r.source)==null?void 0:y.provider)??(r==null?void 0:r.agent),i=((x=r==null?void 0:r.source)==null?void 0:x.model)??(r==null?void 0:r.model),o=(b=r==null?void 0:r.source)==null?void 0:b.session_id,l=Hm(r==null?void 0:r.transcript_duration_ms),c=sS(r==null?void 0:r.transcript_token_usage),h=bse(r==null?void 0:r.transcript_cost_usd),f=Ese(e),p=Ase(e);return d.jsxs("div",{className:"flex min-w-0 flex-wrap gap-2",children:[d.jsxs(ir,{children:[e.length," messages"]}),Array.from(f.entries()).map(([w,N])=>d.jsxs(ir,{children:[w,": ",N]},w)),p.total>0&&d.jsxs(ir,{children:[p.total," tool calls"]}),Array.from(p.byName.entries()).map(([w,N])=>d.jsxs(ir,{children:[w,": ",N]},w)),n&&d.jsxs(ir,{children:["provider: ",n]}),i&&d.jsxs(ir,{children:["model: ",i]}),o&&d.jsxs(ir,{children:["session: ",o]}),l&&d.jsxs(ir,{children:["duration: ",l]}),c&&d.jsxs(ir,{children:["tokens: ",c]}),h&&d.jsxs(ir,{children:["cost: ",h]}),t&&d.jsx(ir,{children:t})]})}function Dse(e,t){switch(t){case"messages":return e.filter(r=>r.line.role!=="tool"&&r.line.role!=="function");case"with-tools":return e.filter(r=>r.toolCalls.length>0);case"tool-results":return e.filter(r=>r.line.role==="tool"||r.line.role==="function");case"all":return[...e]}}function Nh({active:e,count:t,children:r,onClick:n}){return d.jsxs("button",{type:"button",onClick:n,className:e?"rounded-md border border-cyan-800 bg-cyan-950/40 px-3 py-1.5 text-sm text-cyan-200":"rounded-md border border-gray-800 bg-gray-950 px-3 py-1.5 text-sm text-gray-400 transition-colors hover:border-gray-700 hover:text-gray-200",children:[r,d.jsx("span",{className:"ml-2 text-xs text-gray-500",children:t})]})}function q5({entries:e,finalAnswer:t,answerPath:r,transcriptPath:n,transcriptRawPath:i,answerHref:o,transcriptHref:l,transcriptDownloadHref:c,transcriptRawHref:h,onOpenFile:f}){const p=S.useMemo(()=>Ose(e),[e]),[g,y]=S.useState(()=>x2(p)),[x,b]=S.useState(()=>new Set),[w,N]=S.useState("all"),_=!!r,E=S.useMemo(()=>p.flatMap(k=>k.toolCalls.map(H=>H.id)),[p]),T=S.useMemo(()=>Dse(p,w),[p,w]),A=p.filter(k=>k.line.role!=="tool"&&k.line.role!=="function").length,C=p.filter(k=>k.line.role==="tool"||k.line.role==="function").length,R=p.filter(k=>k.toolCalls.length>0).length;S.useEffect(()=>{y(x2(p)),b(new Set),N("all")},[p]);function D(k,H){y(U=>{const ae=new Set(U);return H?ae.add(k):ae.delete(k),ae})}function M(k,H){b(U=>{const ae=new Set(U);return H?ae.add(k):ae.delete(k),ae})}function z(){b(new Set(E)),y(k=>{const H=new Set(k);for(const U of p)U.toolCalls.length>0&&H.add(U.id);return H})}return d.jsxs("div",{className:"min-w-0 space-y-4",children:[_&&d.jsxs("section",{className:"min-w-0 rounded-lg border border-emerald-900/50 bg-emerald-950/20 p-4",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("h3",{className:"text-sm font-medium text-emerald-300",children:"Final answer"}),d.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Highlighted from canonical ",d.jsx("code",{children:"outputs/answer.md"}),"; transcript context stays below."]})]}),d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx(yx,{path:r,onOpenFile:f,children:"Open answer.md in Files"}),d.jsx(Sh,{href:o,children:"Open answer.md"})]})]}),d.jsx("pre",{className:"mt-3 max-h-64 max-w-full overflow-auto whitespace-pre-wrap break-words rounded-md border border-emerald-900/40 bg-gray-950/80 p-3 text-sm leading-6 text-gray-100",children:t&&t.trim().length>0?t:"answer.md is empty."})]}),d.jsx("section",{className:"min-w-0 rounded-lg border border-gray-800 bg-gray-900 p-4",children:d.jsxs("div",{className:"flex min-w-0 flex-wrap items-start justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0 space-y-2",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Transcript timeline"}),d.jsx(Mse,{messages:p,transcriptPath:n})]}),d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx(yx,{path:n,onOpenFile:f,children:"Open transcript.json in Files"}),d.jsx(Sh,{href:l,children:"Open normalized JSON"}),d.jsx(Sh,{href:c,download:!0,children:"Download normalized JSON"}),d.jsx(yx,{path:i,onOpenFile:f,children:"Open transcript-raw.jsonl in Files"}),d.jsx(Sh,{href:h,children:"Open raw JSONL"}),!i&&d.jsx("span",{className:"rounded-md border border-gray-800 bg-gray-950 px-3 py-1.5 text-sm text-gray-500",children:"Raw JSONL unavailable"})]})]})}),d.jsx("section",{className:"min-w-0 rounded-lg border border-gray-800 bg-gray-900 p-3",children:d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap gap-2",children:[d.jsx(Nh,{active:w==="all",count:p.length,onClick:()=>N("all"),children:"All"}),d.jsx(Nh,{active:w==="messages",count:A,onClick:()=>N("messages"),children:"Messages"}),d.jsx(Nh,{active:w==="with-tools",count:R,onClick:()=>N("with-tools"),children:"Has tools"}),d.jsx(Nh,{active:w==="tool-results",count:C,onClick:()=>N("tool-results"),children:"Tool results"})]}),E.length>0&&d.jsxs("div",{className:"flex min-w-0 flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:z,className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-amber-800 hover:text-amber-200",children:"Expand all tool calls"}),d.jsx("button",{type:"button",onClick:()=>b(new Set),className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-gray-600 hover:text-gray-100",children:"Collapse all tool calls"})]})]})}),d.jsx("div",{className:"space-y-3",children:T.map(k=>d.jsx(Rse,{message:k,expanded:g.has(k.id),expandedToolIds:x,onToggleMessage:D,onToggleTool:M},k.id))})]})}function F5(e){for(const t of e){if(t.type==="file")return t.path;if(t.children){const r=F5(t.children);if(r)return r}}return null}function oS(e,t=0){return e.sample_path??e.attempt_path??e.run_path??`sample-${t+1}`}function kse(e,t=0){return typeof e.sample_index=="number"?e.sample_index:typeof e.attempt=="number"?e.attempt+1:t+1}function H5(e,t=0){const r=`Attempt ${kse(e,t)}`;return typeof e.retry_index=="number"&&e.retry_index>0?`${r} retry ${e.retry_index}`:r}function Lse(e){if(e.total_tokens!=null)return e.total_tokens;const t=e.token_usage;if(!t)return;const r=[t.input,t.output,t.reasoning,t.cached].filter(n=>typeof n=="number"&&Number.isFinite(n));return r.length>0?r.reduce((n,i)=>n+i,0):void 0}function eo(e){return e==null||!Number.isFinite(e)?"-":`${Math.round(e*100)}%`}function K5(e){if(e==null)return"-";if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;const t=Math.floor(e/6e4),r=Math.round(e%6e4/1e3);return`${t}m ${r}s`}function $se(e){if(e!=null)return e===0?"$0":e<.01?`$${e.toFixed(5)}`:`$${e.toFixed(4)}`}function Ise(e){if(e!=null)return e>=1e6?`${(e/1e6).toFixed(1)}M tok`:e>=1e3?`${(e/1e3).toFixed(1)}k tok`:`${e} tok`}function zse(e,t){return{...e,score:t.score??e.score,executionStatus:t.execution_status??e.executionStatus,error:t.error,costUsd:t.cost_usd??e.costUsd,durationMs:t.duration_ms??e.durationMs,scores:t.scores,assertions:t.assertions,trials:void 0,aggregation:void 0,grading_path:t.grading_path,timing_path:t.timing_path,metrics_path:t.metrics_path,transcript_path:t.transcript_path,transcript_raw_path:t.transcript_raw_path,output_path:t.answer_path,answer_path:t.answer_path}}function lS({eval:e,runId:t,projectId:r,repeatGroup:n,selectedTrial:i=null,initialTab:o="checks",initialSelectedFilePath:l=null,onSelectTrial:c}){const[h,f]=S.useState(o),[p,g]=S.useState(l),y=i?zse(e,i):e,x=n!=null&&i==null;S.useEffect(()=>{f(o),g(l)},[o,l]);const b=[{id:"checks",label:"Grading"},{id:"transcript",label:"Transcript"},{id:"source",label:"Source"},{id:"files",label:"Files"}],w=N=>{g(N),f("files")};return d.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[d.jsx("div",{className:"min-w-0 border-b border-gray-800",children:d.jsx("div",{className:"flex min-w-0 gap-1 overflow-x-auto px-4",children:b.map(N=>d.jsx("button",{type:"button",onClick:()=>f(N.id),className:`px-4 py-2 text-sm font-medium transition-colors ${h===N.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:N.label},N.id))})}),d.jsxs("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden",children:[h==="checks"&&d.jsx("div",{className:"min-w-0 overflow-auto p-4",children:x?d.jsx(Hse,{result:e,group:n,onSelectTrial:c}):i?d.jsx(j2,{result:y,trial:i,runId:t,projectId:r,onOpenFile:w}):y.grading_path?d.jsx(j2,{result:y,runId:t,projectId:r,onOpenFile:w}):d.jsx(Y5,{result:y,projectId:r})}),h==="files"&&d.jsx("div",{className:"h-full min-h-0 p-4",children:d.jsx(ioe,{result:y,runId:t,projectId:r,selectedPath:p,onSelectedPathChange:g})}),h==="transcript"&&d.jsx("div",{className:"min-w-0 overflow-auto p-4",children:x?d.jsx(roe,{result:e,group:n,runId:t,projectId:r,onSelectTrial:c}):i?d.jsx(noe,{result:y,trial:i,runId:t,projectId:r,onOpenFile:w}):d.jsx(aoe,{result:y,runId:t,projectId:r,onOpenFile:w})}),h==="source"&&d.jsx("div",{className:"min-w-0 overflow-auto p-4",children:d.jsx(qse,{result:y})})]})]})}function Bse(e){if(e!==void 0)return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Jr({label:e,value:t}){return t===void 0||t===""?null:d.jsxs("div",{className:"min-w-0",children:[d.jsx("dt",{className:"text-xs font-medium uppercase text-gray-500",children:e}),d.jsx("dd",{className:"mt-1 break-words font-mono text-sm text-gray-200",children:String(t)})]})}function G5({file:e}){var r,n;const t=Bse(e.size_bytes);return d.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(Jr,{label:"Path",value:e.display_path}),d.jsx(Jr,{label:"SHA-256",value:e.content_sha256}),d.jsx(Jr,{label:"Size",value:t}),d.jsx(Jr,{label:"Omitted",value:((r=e.omitted)==null?void 0:r.message)??((n=e.omitted)==null?void 0:n.reason)})]})}function Tc({value:e,language:t}){return d.jsx("pre",{className:"max-h-96 overflow-auto rounded-md border border-gray-800 bg-gray-950 p-3 text-xs text-gray-200",children:d.jsx("code",{"data-language":t,children:e})})}function Use({file:e}){const t=`${e.kind}${e.grader_name?` · ${e.grader_name}`:""}`;return d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-900 p-3",open:!1,children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-gray-200",children:[d.jsx("span",{children:t}),d.jsx("span",{className:"ml-3 font-mono text-xs text-gray-500",children:e.display_path})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsx(G5,{file:e}),e.command&&e.command.length>0&&d.jsx(Tc,{value:JSON.stringify(e.command,null,2),language:"json"}),e.content&&d.jsx(Tc,{value:e.content})]})]})}function qse({result:e}){var r,n,i;const t=e.source_traceability;return!t||t.status!=="captured"?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Source metadata"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:(t==null?void 0:t.message)??"Source metadata was not captured for this run."})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("section",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-300",children:"Traceability"}),d.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(Jr,{label:"Eval file",value:(r=t.eval_file)==null?void 0:r.display_path}),d.jsx(Jr,{label:"Eval",value:e.eval_path}),d.jsx(Jr,{label:"Test ID",value:t.test_id??e.testId}),d.jsx(Jr,{label:"Legacy suite",value:e.suite}),d.jsx(Jr,{label:"Category",value:e.category}),d.jsx(Jr,{label:"Target",value:e.target})]})]}),((n=t.source_test)==null?void 0:n.yaml)&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Source Test"}),d.jsx(Tc,{value:t.source_test.yaml,language:"yaml"})]}),((i=t.eval_file)==null?void 0:i.content)&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Eval File Snapshot"}),d.jsx(G5,{file:t.eval_file}),d.jsx(Tc,{value:t.eval_file.content,language:"yaml"})]}),t.graders&&t.graders.length>0&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Graders"}),d.jsx("div",{className:"space-y-3",children:t.graders.map(o=>d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-900 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-gray-200",children:[o.name,d.jsx("span",{className:"ml-3 font-mono text-xs text-gray-500",children:o.type})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("dl",{className:"grid gap-3 md:grid-cols-3",children:[d.jsx(Jr,{label:"Weight",value:o.weight}),d.jsx(Jr,{label:"Required",value:o.required}),d.jsx(Jr,{label:"Min score",value:o.min_score})]}),d.jsx(Tc,{value:JSON.stringify(o.definition,null,2),language:"json"})]})]},`${o.name}-${o.type}`))})]}),t.referenced_files&&t.referenced_files.length>0&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Referenced Files"}),d.jsx("div",{className:"space-y-3",children:t.referenced_files.map((o,l)=>d.jsx(Use,{file:o},`${o.kind}-${o.display_path}-${o.grader_name??""}-${l}`))})]})]})}function b2({assertion:e}){return d.jsxs("div",{className:`flex items-start gap-3 rounded-lg border p-3 ${e.passed?"border-emerald-900/50 bg-emerald-950/20":"border-red-900/50 bg-red-950/20"}`,children:[d.jsx("span",{className:`mt-0.5 text-lg ${e.passed?"text-emerald-400":"text-red-400"}`,children:e.passed?"✓":"✗"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("p",{className:"text-sm text-gray-200",children:[e.text,e.durationMs!=null&&d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",(e.durationMs/1e3).toFixed(1),"s)"]})]}),e.evidence&&d.jsx("p",{className:"mt-1 text-xs text-gray-400",children:e.evidence})]})]})}function Y5({result:e,projectId:t}){const{data:r}=pt(t),n=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,i=!to(e.score,n)||e.executionStatus==="error"||e.executionStatus==="failed",o=(e.scores??[]).filter(p=>Array.isArray(p.assertions)&&p.assertions.length>0),l=o.length>0,c=e.assertions??[],h=[];e.error&&h.push(e.error),(e.executionStatus==="error"||e.executionStatus==="failed")&&h.push(`Execution status: ${e.executionStatus}`);const f=l?o.flatMap(p=>p.assertions):c;for(const p of f.filter(g=>!g.passed)){const g=p.evidence?`${p.text}: ${p.evidence}`:p.text;h.push(g)}if(e.scores){for(const p of e.scores)if(!to(p.score,n)&&p.details){const g=typeof p.details=="string"?p.details:JSON.stringify(p.details,null,2);h.push(`[${p.name??p.type??"evaluator"}] ${g}`)}}return d.jsxs("div",{className:"space-y-6",children:[d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"text-sm font-medium text-gray-400",children:"Overall score"}),d.jsx("div",{className:"flex-1",children:d.jsx(fo,{score:e.score})})]})}),e.scores&&e.scores.length>0&&d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-400",children:"Grader Scores"}),d.jsx("div",{className:"space-y-3",children:e.scores.map((p,g)=>d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:p.name??p.type??`Score ${g+1}`}),d.jsx("div",{className:"flex-1",children:d.jsx(fo,{score:p.score})})]},`${p.name??p.type??g}`))})]}),l?d.jsx("div",{className:"space-y-6",children:o.map((p,g)=>{const y=p.name??p.type??`Grader ${g+1}`;return d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:y}),p.assertions.map((x,b)=>d.jsx(b2,{assertion:x},`${x.text}-${b}`))]},`${p.name??p.type??g}`)})}):c.length>0?d.jsx("div",{className:"space-y-2",children:c.map((p,g)=>d.jsx(b2,{assertion:p},`${p.text}-${g}`))}):d.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded."}),i&&h.length>0&&d.jsxs("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-4",children:[d.jsx("h4",{className:"mb-2 text-sm font-medium text-red-400",children:"Failure Reason"}),d.jsx("div",{className:"space-y-2",children:h.map(p=>d.jsx("p",{className:"text-sm text-gray-300",children:p},p))})]})]})}function Ia({label:e,value:t}){return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-3",children:[d.jsx("div",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:e}),d.jsx("div",{className:"mt-1 font-mono text-sm text-gray-200",children:t??"-"})]})}function Fse({trial:e,index:t,onSelectTrial:r}){const n=oS(e,t),i=H5(e,t);return d.jsxs("div",{className:"grid gap-2 rounded-md border border-gray-800 bg-gray-950/50 p-3 text-sm md:grid-cols-[minmax(8rem,1fr)_auto] md:items-center",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("span",{className:"font-medium text-gray-200",children:i}),d.jsx("span",{className:"rounded-md border border-gray-800 px-1.5 py-0.5 text-[11px] font-medium text-gray-500",children:n})]}),d.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1 text-xs text-gray-500",children:[d.jsxs("span",{children:[eo(e.score)," score"]}),d.jsx("span",{children:e.verdict??"unknown"}),e.duration_ms!=null?d.jsx("span",{children:K5(e.duration_ms)}):null,e.total_tool_calls!=null?d.jsxs("span",{children:[e.total_tool_calls," tool calls"]}):null]})]}),d.jsxs("div",{className:"flex flex-wrap gap-2 md:justify-end",children:[d.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(e,"checks"),className:"rounded-md border border-gray-700 px-2.5 py-1 text-xs text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:"Grading"}),d.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(e,"files"),disabled:!e.grading_path&&!e.metrics_path&&!e.timing_path,className:"rounded-md border border-gray-700 px-2.5 py-1 text-xs text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300 disabled:cursor-not-allowed disabled:opacity-50",children:"Files"})]})]})}function Hse({result:e,group:t,onSelectTrial:r}){return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsxs("p",{className:"mb-3 text-sm text-gray-400",children:["Aggregate across ",t.trialCount," attempts for this test case."]}),d.jsxs("div",{className:"grid gap-3 md:grid-cols-4",children:[d.jsx(Ia,{label:"Attempt success",value:eo(t.passRate)}),d.jsx(Ia,{label:"Mean score",value:eo(t.meanScore)}),d.jsx(Ia,{label:"Attempts passed",value:`${t.passedTrials}/${t.trialCount}`}),d.jsx(Ia,{label:"Assertion pass",value:eo(t.assertionPassRate)}),t.executionErrorTrials>0?d.jsx(Ia,{label:"Execution errors",value:String(t.executionErrorTrials)}):null]})]}),e.scores&&e.scores.length>0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-400",children:"Aggregate Grader Scores"}),d.jsx("div",{className:"space-y-3",children:e.scores.map((n,i)=>d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:n.name??n.type??`Score ${i+1}`}),d.jsx("div",{className:"flex-1",children:d.jsx(fo,{score:n.score})})]},`${n.name??n.type??i}`))})]}):null,d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:"Attempts"}),t.trials.map((n,i)=>d.jsx(Fse,{trial:n,index:i,onSelectTrial:r},oS(n,i)))]})]})}function Km(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Kse(e,t){const r=e[t];return typeof r=="string"&&r.trim().length>0?r:void 0}function Gse(e,t){const r=e[t];return typeof r=="number"&&Number.isFinite(r)?r:void 0}function Yse(e,t){const r=e[t];return typeof r=="boolean"?r:void 0}function Vse(e){if(!Km(e))return;const t=Object.entries(e).filter(r=>typeof r[1]=="number"&&Number.isFinite(r[1]));return t.length>0?Object.fromEntries(t):void 0}function Qse(e){if(Km(e))return Object.keys(e).length>0?e:void 0}function V5(e){if(!Km(e))return null;const t=Array.isArray(e.component_results)?e.component_results.flatMap(i=>{const o=V5(i);return o?[o]:[]}):[],r=Vse(e.named_scores),n=Km(e.metadata)&&Object.keys(e.metadata).length>0?e.metadata:void 0;return{pass:Yse(e,"pass"),score:Gse(e,"score"),reason:Kse(e,"reason"),assertion:Qse(e.assertion),namedScores:r,metadata:n,componentResults:t}}function Xse(e){if(!e)return null;try{const t=V5(JSON.parse(e));return t?{result:t}:{error:"grading.json must contain a JSON object."}}catch(t){return{error:t instanceof Error?t.message:String(t)}}}function Wse(e){return typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):JSON.stringify(e)}function Q5(e){return e===!0?"Pass":e===!1?"Fail":"Unknown"}function X5(e){return e===!0?"border-emerald-900/50 bg-emerald-950/20 text-emerald-300":e===!1?"border-red-900/50 bg-red-950/20 text-red-300":"border-gray-800 bg-gray-950/50 text-gray-300"}function Zse(e,t){if(!e)return{title:t,details:[]};const r=typeof e.metric=="string"&&e.metric||typeof e.type=="string"&&e.type||t,n=[];return typeof e.type=="string"&&e.type!==r&&n.push(`type: ${e.type}`),typeof e.metric=="string"&&e.metric!==r&&n.push(`metric: ${e.metric}`),e.value!==void 0&&n.push(`value: ${Wse(e.value)}`),{title:r,details:n}}function W5({scores:e}){return!e||Object.keys(e).length===0?null:d.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:Object.entries(e).map(([t,r])=>d.jsx(Ia,{label:t,value:eo(r)},t))})}function Z5({metadata:e}){return!e||Object.keys(e).length===0?null:d.jsxs("details",{className:"rounded-lg border border-gray-800 bg-gray-950/50 p-3",children:[d.jsx("summary",{className:"cursor-pointer text-sm font-medium text-gray-300",children:"Metadata"}),d.jsx("pre",{className:"mt-3 max-h-64 overflow-auto text-xs text-gray-300",children:JSON.stringify(e,null,2)})]})}function J5({score:e}){return e==null?d.jsx("div",{className:"h-2 rounded-full bg-gray-800"}):d.jsx(fo,{score:e})}function Jse({result:e}){return d.jsxs("div",{className:"space-y-4 rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsxs("div",{className:"grid gap-3 md:grid-cols-[minmax(9rem,12rem)_1fr] md:items-center",children:[d.jsx("div",{className:`rounded-lg border px-3 py-2 text-sm font-medium ${X5(e.pass)}`,children:Q5(e.pass)}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3 text-xs text-gray-500",children:[d.jsx("span",{children:"Aggregate score"}),d.jsx("span",{className:"font-mono",children:eo(e.score)})]}),d.jsx(J5,{score:e.score})]})]}),e.reason?d.jsx("p",{className:"text-sm text-gray-300",children:e.reason}):null,d.jsx(W5,{scores:e.namedScores}),d.jsx(Z5,{metadata:e.metadata})]})}function eoe({components:e}){return e.length===0?null:d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:"Component Results"}),d.jsx("div",{className:"space-y-2",children:e.map((t,r)=>d.jsx(eL,{component:t,index:r,depth:0},`${t.reason??"component"}-${r}`))})]})}function toe({result:e}){return d.jsxs("div",{className:"space-y-6",children:[d.jsx(Jse,{result:e}),d.jsx(eoe,{components:e.componentResults})]})}function eL({component:e,index:t,depth:r}){const n=Zse(e.assertion,`Component ${t+1}`),i=e.componentResults.length>0,o=d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"grid gap-3 md:grid-cols-[minmax(10rem,1fr)_minmax(8rem,12rem)] md:items-center",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("span",{className:"font-medium text-gray-200",children:n.title}),d.jsx("span",{className:`rounded-md border px-1.5 py-0.5 text-[11px] font-medium ${X5(e.pass)}`,children:Q5(e.pass)})]}),n.details.length>0?d.jsx("div",{className:"mt-1 flex flex-wrap gap-2 text-xs text-gray-500",children:n.details.map(l=>d.jsx("span",{children:l},l))}):null]}),d.jsxs("div",{className:"min-w-0",children:[d.jsx("div",{className:"mb-1 text-right font-mono text-xs text-gray-500",children:eo(e.score)}),d.jsx(J5,{score:e.score})]})]}),e.reason?d.jsx("p",{className:"text-sm text-gray-300",children:e.reason}):null]});return d.jsxs("details",{open:r===0,className:"rounded-lg border border-gray-800 bg-gray-900 p-3",style:{marginLeft:r>0?`${Math.min(r,4)*1}rem`:void 0},children:[d.jsxs("summary",{className:"flex cursor-pointer list-none items-start gap-3",children:[d.jsx("span",{className:"mt-1 text-xs text-gray-500",children:i?"v":"-"}),o]}),e.namedScores||e.metadata?d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsx(W5,{scores:e.namedScores}),d.jsx(Z5,{metadata:e.metadata})]}):null,i?d.jsx("div",{className:"mt-3 space-y-2",children:e.componentResults.map((l,c)=>d.jsx(eL,{component:l,index:c,depth:r+1},`${l.reason??"component"}-${c}`))}):null]})}function j2({result:e,trial:t,runId:r,projectId:n,onOpenFile:i}){const o=e.grading_path??(t==null?void 0:t.grading_path),l=e.result_dir,c=e.testId,{data:h,isLoading:f}=n&&o?Ue(Yh(n,r,c,o,l)):Gh(r,c,o??"",l),p=Xse(h==null?void 0:h.content);return o?d.jsxs("div",{className:"space-y-6",children:[d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"text-sm font-medium text-gray-400",children:t?"Attempt score":"Overall score"}),d.jsx("div",{className:"flex-1",children:d.jsx(fo,{score:e.score})})]})}),t?d.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[d.jsx(Ia,{label:"Duration",value:K5(t.duration_ms)}),d.jsx(Ia,{label:"Cost",value:$se(t.cost_usd)}),d.jsx(Ia,{label:"Tokens",value:Ise(Lse(t))})]}):null,d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-400",children:"Grading"}),d.jsx("button",{type:"button",onClick:()=>i(o),className:"rounded-md border border-gray-700 px-3 py-1.5 text-xs text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:"Open grading JSON"})]}),f?d.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Loading grading artifact..."}):null,p!=null&&p.error?d.jsx("p",{className:"mt-3 text-sm text-red-300",children:p.error}):null,!f&&!p?d.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"No grading artifact content available."}):null]}),p!=null&&p.result?d.jsx(toe,{result:p.result}):null]}):d.jsx(Y5,{result:e,projectId:n})}function tL(e,t){if(!t)return!1;for(const r of e)if(r.type==="file"&&r.path===t||r.children&&tL(r.children,t))return!0;return!1}function roe({result:e,group:t,runId:r,projectId:n,onSelectTrial:i}){return d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:"Attempt transcripts"}),t.trials.map((o,l)=>{const c=oS(o,l),h=H5(o,l),f=o.transcript_path,p=f?_n({projectId:n,runId:r,evalId:e.testId,filePath:f,resultDir:e.result_dir,raw:!0}):void 0;return d.jsxs("div",{className:"grid gap-2 rounded-md border border-gray-800 bg-gray-950/50 p-3 text-sm md:grid-cols-[minmax(8rem,1fr)_auto] md:items-center",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("span",{className:"font-medium text-gray-200",children:h}),d.jsx("span",{className:"rounded-md border border-gray-800 px-1.5 py-0.5 text-[11px] font-medium text-gray-500",children:c})]}),d.jsx("div",{className:"mt-1 truncate font-mono text-xs text-gray-500",title:f,children:f??"No transcript artifact"})]}),d.jsxs("div",{className:"flex flex-wrap gap-2 md:justify-end",children:[d.jsx("button",{type:"button",onClick:()=>i==null?void 0:i(o,"transcript"),disabled:!f,className:"rounded-md border border-gray-700 px-2.5 py-1 text-xs text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300 disabled:cursor-not-allowed disabled:opacity-50",children:"View"}),p?d.jsx("a",{href:p,target:"_blank",rel:"noreferrer",className:"rounded-md px-2.5 py-1 text-xs text-cyan-400 transition-colors hover:text-cyan-300 hover:underline",children:"Raw"}):null]})]},c)})]})}function noe({result:e,trial:t,runId:r,projectId:n,onOpenFile:i}){const o=e.testId,l=e.result_dir,c=t.transcript_path,h=t.transcript_raw_path,f=t.answer_path,{data:p,isLoading:g}=n&&c?Ue(Yh(n,r,o,c,l)):Gh(r,o,c??"",l),{data:y}=n&&f?Ue(Yh(n,r,o,f,l)):Gh(r,o,f??"",l),x=(p==null?void 0:p.content)??"",b=S.useMemo(()=>z5(x),[x]);if(!c)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"No structured transcript"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This attempt does not include a transcript artifact."})]});if(g)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4 text-sm text-gray-500",children:"Loading transcript artifact..."});if(b.error)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-red-300",children:"Transcript could not be parsed"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:b.error}),d.jsx("button",{type:"button",onClick:()=>i(c),className:"mt-3 rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:"Open raw JSONL in Files"})]});if(b.entries.length===0)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Empty transcript"}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:[d.jsx("code",{children:c})," exists but contains no JSONL rows."]})]});const w=f?_n({projectId:n,runId:r,evalId:o,filePath:f,resultDir:l,raw:!0}):void 0,N=_n({projectId:n,runId:r,evalId:o,filePath:c,resultDir:l,raw:!0}),_=_n({projectId:n,runId:r,evalId:o,filePath:c,resultDir:l,download:!0}),E=h?_n({projectId:n,runId:r,evalId:o,filePath:h,resultDir:l,raw:!0}):void 0;return d.jsx(q5,{entries:b.entries,finalAnswer:f?(y==null?void 0:y.content)??e.output:void 0,answerPath:f,transcriptPath:c,transcriptRawPath:h,answerHref:w,transcriptHref:N,transcriptDownloadHref:_,transcriptRawHref:E,onOpenFile:i})}function aoe({result:e,runId:t,projectId:r,onOpenFile:n}){const i=e.testId,o=e.result_dir,{data:l,isLoading:c,error:h}=r?Ue(O6(r,t,i,o)):g6(t,i,o),f=l==null?void 0:l.transcript_path,p=l==null?void 0:l.transcript_raw_path,g=l==null?void 0:l.answer_path,y=(l==null?void 0:l.status)==="ok"?l.content??"":"",x=S.useMemo(()=>z5(y),[y]);if(c)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4 text-sm text-gray-500",children:"Loading transcript artifact..."});if(h)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-red-300",children:"Transcript could not be loaded"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:h.message})]});if(!l||l.status==="missing")return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"No structured transcript"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:(l==null?void 0:l.message)??"This run does not include canonical transcript.json. Dashboard does not parse response.md or markdown transcripts for this view."})]});if(l.status==="dangling"||l.status==="unsupported")return d.jsxs("div",{className:"rounded-lg border border-amber-900/50 bg-amber-950/20 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-amber-300",children:l.status==="dangling"?"Transcript artifact unavailable":"Transcript pointer unsupported"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:l.message??"The transcript artifact could not be resolved."}),f?d.jsx("p",{className:"mt-2 font-mono text-xs text-gray-500",children:f}):null,l.pointer?d.jsx("p",{className:"mt-2 font-mono text-xs text-gray-500",children:l.pointer}):null]});if(x.error)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-red-300",children:"Transcript could not be parsed"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:x.error}),d.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:f?d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>n(f),className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:"Open raw JSONL in Files"}),d.jsx("a",{href:_n({projectId:r,runId:t,evalId:i,filePath:f,resultDir:o,raw:!0}),target:"_blank",rel:"noreferrer",className:"rounded-md px-3 py-1.5 text-sm text-cyan-400 transition-colors hover:text-cyan-300 hover:underline",children:"Open raw JSONL"})]}):null})]});if(x.entries.length===0)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Empty transcript"}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:[d.jsx("code",{children:f})," exists but contains no JSONL rows."]})]});const b=g?_n({projectId:r,runId:t,evalId:i,filePath:g,resultDir:o,raw:!0}):void 0,w=f?_n({projectId:r,runId:t,evalId:i,filePath:f,resultDir:o,raw:!0}):void 0,N=f?_n({projectId:r,runId:t,evalId:i,filePath:f,resultDir:o,download:!0}):void 0,_=p?_n({projectId:r,runId:t,evalId:i,filePath:p,resultDir:o,raw:!0}):void 0;return d.jsx(q5,{entries:x.entries,finalAnswer:g?l.answer_content??e.output:void 0,answerPath:g,transcriptPath:f,transcriptRawPath:p,answerHref:b,transcriptHref:w,transcriptDownloadHref:N,transcriptRawHref:_,onOpenFile:n})}function ioe({result:e,runId:t,projectId:r,selectedPath:n,onSelectedPathChange:i}){const o=e.testId,l=e.result_dir,{data:c}=r?Ue(_6(r,t,o,l)):p6(t,o,l),h=(c==null?void 0:c.files)??[],[f,p]=S.useState(null),[g,y]=S.useState(!1),x=n??f,b=tL(h,x)?x:h.length>0?F5(h):null,{data:w,isLoading:N}=r?Ue(Yh(r,t,o,b??"",l)):Gh(t,o,b??"",l);if(h.length===0)return d.jsx("p",{className:"text-sm text-gray-500",children:"No artifact files available."});const _=b?N?"Loading...":(w==null?void 0:w.content)??"":"",E=b?(w==null?void 0:w.language)??"plaintext":"plaintext";return d.jsxs("div",{className:"relative flex h-full min-h-0 min-w-0 gap-4 overflow-hidden",children:[d.jsx("div",{className:`${g?"block":"hidden"} min-h-0 w-full overflow-auto md:block md:w-auto`,children:d.jsx(cse,{files:h,selectedPath:b,onSelect:T=>{p(T),i(T),y(!1)}})}),d.jsx("div",{className:`${g?"hidden":"block"} h-full min-h-0 min-w-0 flex-1 overflow-hidden md:block`,children:d.jsx(pse,{value:_,language:E,height:"100%"})}),d.jsx("button",{type:"button",onClick:()=>y(!g),className:"md:hidden fixed bottom-4 right-4 z-50 flex items-center gap-2 rounded-full bg-gray-800 px-4 py-2.5 text-sm font-medium text-gray-200 shadow-lg border border-gray-700 hover:bg-gray-700 active:bg-gray-600 transition-colors","aria-label":g?"Switch to file content viewer":"Switch to file tree",children:g?d.jsxs(d.Fragment,{children:[d.jsx("span",{children:"📄"}),d.jsx("span",{children:"Content"})]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{children:"📁"}),d.jsx("span",{children:"Files"})]})})]})}const Nt={view:"results_view",search:"results_q",target:"results_target",grader:"results_grader",legacyScorer:"results_scorer",columns:"results_cols",detail:"results_detail"},soe="✓",ooe="✗";function vx(){var t;if(typeof window>"u")return{};const e=new URLSearchParams(window.location.search);return{view:e.get(Nt.view)??void 0,search:e.get(Nt.search)??void 0,target:e.get(Nt.target)??void 0,grader:e.get(Nt.grader)??e.get(Nt.legacyScorer)??void 0,visibleColumnIds:((t=e.get(Nt.columns))==null?void 0:t.split(",").map(r=>r.trim()).filter(Boolean))??void 0}}function loe(e){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search);e.view==="all"?t.delete(Nt.view):t.set(Nt.view,e.view),e.search?t.set(Nt.search,e.search):t.delete(Nt.search),e.target==="all"?t.delete(Nt.target):t.set(Nt.target,e.target),t.delete(Nt.legacyScorer),e.grader==="all"?t.delete(Nt.grader):t.set(Nt.grader,e.grader),e.visibleColumnIds.length>0?t.set(Nt.columns,e.visibleColumnIds.join(",")):t.delete(Nt.columns);const r=t.toString(),n=`${window.location.pathname}${r?`?${r}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",n)}function w2(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(Nt.detail)}function _h(e){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search);e?t.set(Nt.detail,e):t.delete(Nt.detail);const r=t.toString(),n=`${window.location.pathname}${r?`?${r}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",n)}function Gm(e){return`${Math.round(e*100)}%`}function uS(e){if(e==null)return"-";if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;const t=Math.floor(e/6e4),r=Math.round(e%6e4/1e3);return`${t}m ${r}s`}function rL(e){if(e!=null)return e===0?"$0":e<.01?`$${e.toFixed(5)}`:`$${e.toFixed(4)}`}function nL(e){if(e!=null)return e>=1e6?`${(e/1e6).toFixed(1)}M tok`:e>=1e3?`${(e/1e3).toFixed(1)}k tok`:`${e} tok`}function uoe(e){if(!e)return;const t=[e.input,e.output,e.reasoning,e.cached].filter(r=>typeof r=="number"&&Number.isFinite(r));return t.length>0?t.reduce((r,n)=>r+n,0):void 0}function aL(e){return e.total_tokens??uoe(e.token_usage)}function Ym(e,t=0){return e.sample_path??e.attempt_path??e.run_path??`sample-${t+1}`}function coe(e){const t=e.tokenUsage;if(!t)return;const r=[t.input!=null?`${t.input} in`:void 0,t.output!=null?`${t.output} out`:void 0,t.reasoning!=null?`${t.reasoning} reason`:void 0,t.cached!=null?`${t.cached} cached`:void 0].filter(n=>!!n);return r.length>0?r.join(" / "):void 0}function doe(e){return e>=.8?"text-emerald-300":e>=.5?"text-yellow-300":"text-red-300"}function iL(e){var t,r;return e.verdict==="fail"||(t=e.assertions)!=null&&t.some(n=>!n.passed)?!0:((r=e.scores)==null?void 0:r.some(iL))??!1}function cS({results:e,runId:t,projectId:r,passThreshold:n,title:i="Results",emptyMessage:o}){const[l,c]=S.useState(()=>vx()),[h,f]=S.useState(()=>w2()),[p,g]=S.useState(null),[y,x]=S.useState(null),[b,w]=S.useState("checks"),[N,_]=S.useState(()=>new Set),E=S.useMemo(()=>ose({results:e,passThreshold:n,state:l}),[n,e,l]),T=new Set(E.state.visibleColumnIds),A=h!=null?E.filteredRows.find(G=>G.key===h)??null:null,C=S.useMemo(()=>new Map(E.repeatGroups.map(G=>[G.row.key,G])),[E.repeatGroups]),R=A?C.get(A.key):void 0,D=R&&p?R.trials.find((G,L)=>Ym(G,L)===p)??null:null;S.useEffect(()=>{const G=()=>{c(vx()),f(w2()),g(null),x(null),w("checks")};return window.addEventListener("popstate",G),()=>window.removeEventListener("popstate",G)},[]),S.useEffect(()=>{!h||A||(_h(null),f(null))},[A,h]);function M(G){const L={...E.state,...G};loe(L),c(vx())}function z(){if(typeof window>"u")return;const G=new URLSearchParams(window.location.search);for(const J of Object.values(Nt))G.delete(J);const L=G.toString(),F=`${window.location.pathname}${L?`?${L}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",F),c({}),f(null),g(null),x(null),w("checks")}function k(G){const L=new Set(E.state.visibleColumnIds);L.has(G)?L.delete(G):L.add(G),M({visibleColumnIds:[...L]})}function H(G){_h(G),f(G),g(null),x(null),w("checks")}function U(G,L,F="checks"){_h(G),f(G),g(Ym(L)),w(F),x(poe(L))}function ae(){_h(null),f(null),g(null),x(null),w("checks")}function Z(G){_(L=>{const F=new Set(L);return F.has(G)?F.delete(G):F.add(G),F})}return e.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:o??d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"})}):d.jsxs("section",{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-baseline sm:justify-between",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:i}),d.jsxs("p",{className:"text-xs text-gray-500",children:[E.filteredRows.length," of ",E.rows.length," rows"]})]}),d.jsxs("div",{className:"space-y-3 rounded-lg border border-gray-800 bg-gray-900/40 p-3",children:[d.jsx("div",{className:"flex flex-wrap gap-2",children:P5.map(G=>d.jsxs("button",{type:"button",onClick:()=>M({view:G.id}),className:`inline-flex items-center gap-2 rounded-md border px-2.5 py-1.5 text-sm transition-colors ${E.state.view===G.id?"border-cyan-900/60 bg-cyan-950/30 text-cyan-300":"border-gray-800 bg-gray-950/70 text-gray-400 hover:border-gray-700 hover:text-gray-200"}`,children:[d.jsx("span",{children:G.label}),d.jsx("span",{className:"tabular-nums text-xs text-gray-500",children:E.viewCounts[G.id]})]},G.id))}),d.jsxs("div",{className:"grid gap-2 lg:grid-cols-[minmax(220px,1fr)_minmax(150px,220px)_minmax(150px,220px)_auto_auto]",children:[d.jsxs("label",{className:"min-w-0",children:[d.jsx("span",{className:"sr-only",children:"Search results"}),d.jsx("input",{type:"search",value:E.state.search,onChange:G=>M({search:G.target.value}),placeholder:"Search tests, targets, graders, assertions",className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 placeholder:text-gray-600 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500"})]}),d.jsxs("label",{children:[d.jsx("span",{className:"sr-only",children:"Filter by target"}),d.jsxs("select",{value:E.state.target,onChange:G=>M({target:G.target.value}),className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:[d.jsx("option",{value:"all",children:"All targets"}),E.targetOptions.map(G=>d.jsx("option",{value:G,children:G},G))]})]}),d.jsxs("label",{children:[d.jsx("span",{className:"sr-only",children:"Filter by grader"}),d.jsxs("select",{value:E.state.grader,onChange:G=>M({grader:G.target.value}),className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:[d.jsx("option",{value:"all",children:"All graders"}),E.graderOptions.map(G=>d.jsx("option",{value:G,children:G},G))]})]}),d.jsxs("details",{className:"group relative",children:[d.jsx("summary",{className:"list-none rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-gray-600 hover:text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"Display"}),d.jsxs("div",{className:"absolute right-0 z-10 mt-2 w-64 max-w-[calc(100vw-2rem)] rounded-lg border border-gray-800 bg-gray-950 p-3",children:[d.jsx("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Columns"}),d.jsx("div",{className:"max-h-72 space-y-2 overflow-auto pr-1",children:E.columns.map(G=>d.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-300",children:[d.jsx("input",{type:"checkbox",checked:T.has(G.id),onChange:()=>k(G.id),className:"h-4 w-4 rounded border-gray-700 bg-gray-900 text-cyan-500"}),d.jsx("span",{className:"min-w-0 truncate",title:G.label,children:G.label})]},G.id))})]})]}),d.jsx("button",{type:"button",onClick:z,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Clear"})]})]}),d.jsxs("div",{className:A?"grid min-w-0 max-w-full gap-4 xl:grid-cols-[minmax(0,1fr)_minmax(360px,42rem)]":"",children:[d.jsx("div",{className:"min-w-0",children:E.filteredRows.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No matching evaluations"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Adjust the result filters or display preset."})]}):d.jsx(foe,{rows:E.filteredRows,visibleColumns:E.visibleColumns,passThreshold:n,selectedRowKey:h,selectedTrialPath:p,repeatGroupsByRowKey:C,expandedRepeatRows:N,onToggleRepeatGroup:Z,onOpenDetail:H,onOpenTrialDetail:U})}),A&&d.jsx(Eoe,{row:A,runId:t,projectId:r,repeatGroup:R,selectedTrial:D,selectedTrialPath:p,initialTab:b,initialFilePath:y,onOpenTrialDetail:(G,L)=>U(A.key,G,L),onClose:ae})]})]})}function foe({rows:e,visibleColumns:t,passThreshold:r,selectedRowKey:n,selectedTrialPath:i,repeatGroupsByRowKey:o,expandedRepeatRows:l,onToggleRepeatGroup:c,onOpenDetail:h,onOpenTrialDetail:f}){return d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full whitespace-nowrap text-left text-sm",style:{minWidth:`${Soe(t)}px`},children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsx("tr",{children:t.map(p=>d.jsx("th",{className:Noe(p.id),title:p.label,children:d.jsx("span",{className:woe(p.id)?"sr-only":"block max-w-48 truncate",children:p.label})},p.id))})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:e.map(p=>{const g=o.get(p.key),y=n===p.key&&!i,x=g?l.has(p.key):!1;return d.jsxs(S.Fragment,{children:[d.jsx("tr",{className:`cursor-pointer transition-colors ${y?"bg-cyan-950/20":"hover:bg-gray-900/30"} ${g?"bg-gray-950/20":""}`,onClick:()=>h(p.key),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),h(p.key))},tabIndex:0,"aria-selected":y,children:t.map(b=>d.jsx("td",{className:S2(b.id,"py-3"),children:d.jsx(_oe,{column:b,row:p,repeatGroup:g,repeatExpanded:x,passThreshold:r,isSelected:y,onToggleRepeatGroup:c})},`${p.key}:${b.id}`))}),g&&x?g.trials.map((b,w)=>{const N=Ym(b,w),_=n===p.key&&i===N;return d.jsx("tr",{className:`cursor-pointer bg-gray-950/60 transition-colors ${_?"bg-cyan-950/20":"hover:bg-gray-900/50"}`,"aria-label":`${dS(b,w)} for ${p.testId}`,onClick:()=>f(p.key,b),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),f(p.key,b))},tabIndex:0,"aria-selected":_,children:t.map(E=>d.jsx("td",{className:S2(E.id,"py-2"),children:d.jsx(goe,{column:E,row:p,trial:b,index:w,passThreshold:r})},`${p.key}:${N}:${E.id}`))},`${p.key}:${N}`)}):null]},p.key)})})]})})}function hoe(e,t){return e.verdict==="pass"?!0:e.verdict==="fail"?!1:typeof e.score=="number"?e.score>=t:!1}function moe(e,t=0){return typeof e.sample_index=="number"?e.sample_index:typeof e.attempt=="number"?e.attempt+1:t+1}function dS(e,t=0){const r=`Attempt ${moe(e,t)}`;return typeof e.retry_index=="number"&&e.retry_index>0?`${r} retry ${e.retry_index}`:r}function poe(e){return e.grading_path??e.metrics_path??e.timing_path??e.transcript_path??e.answer_path??null}function sL(e,t){return e?t?`[target:${t}] ${e}`:e:t?`Target error: ${t}`:void 0}function oL(e){var t,r,n,i;return((t=e.target_execution)==null?void 0:t.error_kind)??((r=e.target_execution)==null?void 0:r.errorKind)??((n=e.targetExecution)==null?void 0:n.error_kind)??((i=e.targetExecution)==null?void 0:i.errorKind)}function goe({column:e,row:t,trial:r,index:n,passThreshold:i}){const o=hoe(r,i),l=r.execution_status==="execution_error",c=l?"error":o?"passing":"failing",h=l?"Error":o?"Passing":"Failing",f=dS(r,n),p=Ym(r,n);switch(e.id){case"status":return d.jsx(fS,{status:c,label:h});case"expander":return d.jsx("span",{"aria-hidden":"true",className:"mx-auto block h-7 w-px bg-gray-800"});case"test":return d.jsx(yoe,{label:f,artifactLabel:p,parentTestId:t.testId,trial:r});case"target":return d.jsx(uL,{target:t.targetLabel,tone:"text-gray-500"});case"score":return d.jsx(an,{rate:r.score??0});case"eval":return d.jsx(Al,{value:t.evalLabel,tone:"text-gray-500"});case"category":return d.jsx(Al,{value:t.categoryLabel,tone:"text-gray-500"});case"duration":return d.jsx("span",{className:"text-gray-500",children:uS(r.duration_ms)});case"cost_tokens":return d.jsx(Poe,{trial:r});case"review":return d.jsx("span",{className:"text-gray-700",children:"-"});case"error":return d.jsx(Al,{value:sL(r.error,oL(r)),tone:"text-red-300"});default:return d.jsx("span",{className:"text-gray-700",children:"-"})}}function yoe({label:e,artifactLabel:t,parentTestId:r,trial:n}){return d.jsxs("div",{className:"max-w-[28rem] min-w-0 border-l border-gray-800 pl-3",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"rounded-md border border-gray-800 bg-gray-900 px-1.5 py-0.5 text-[11px] font-medium text-gray-500",children:"Attempt"}),d.jsx("span",{className:"truncate font-medium text-gray-300",title:e,children:e})]}),d.jsxs("div",{className:"mt-0.5 truncate text-xs text-gray-600",title:`${r} · ${t}`,children:["Under ",r," · ",t]}),d.jsx("div",{className:"mt-0.5 flex min-w-0 flex-wrap gap-x-3 gap-y-0.5 text-xs text-gray-600",children:n.total_tool_calls!=null?d.jsxs("span",{children:[n.total_tool_calls," tool calls"]}):null}),n.error?d.jsx("div",{className:"mt-0.5 truncate text-xs text-red-300",title:n.error,children:n.error}):null]})}function fS({status:e,label:t}){const r=e==="passing",n=e==="error"||e==="partial",i=r?soe:ooe,o=r?"text-emerald-300":n?"text-amber-300":"text-red-300";return d.jsx("span",{className:`inline-flex text-base font-semibold ${o}`,title:t,children:i})}function voe({group:e,passThreshold:t}){const n=e.passRate>=t?"passing":e.passedTrials>0?"partial":"failing";return d.jsx(fS,{status:n,label:`${e.passedTrials}/${e.trialCount} attempts passed`})}function xoe({group:e}){const t=e.passedTrials===e.trialCount?"Stable pass":e.passedTrials===0?"Stable fail":"Flaky",r=[`${e.passedTrials}/${e.trialCount} attempts passed`,`${Gm(e.passRate)} success`,`${Gm(e.meanScore)} mean score`,e.executionErrorTrials>0?`${e.executionErrorTrials} execution errors`:void 0,e.assertionPassRate!=null?`${e.passedAssertions}/${e.assertionCount} assertions`:void 0].filter(n=>!!n);return d.jsxs("div",{className:"mt-1 flex max-w-[34rem] flex-wrap items-center gap-x-2 gap-y-1 text-xs",children:[d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-1.5 py-0.5 font-medium text-cyan-300",children:"Aggregate case"}),d.jsx("span",{className:t==="Stable pass"?"text-emerald-300":t==="Stable fail"?"text-red-300":"text-yellow-300",children:t}),d.jsx("span",{className:"min-w-0 truncate text-gray-500",title:r.join(" · "),children:r.join(" · ")})]})}function boe({group:e}){return d.jsxs("div",{className:"flex min-w-0 flex-col items-end gap-1",children:[d.jsx(an,{rate:e.passRate}),d.jsx("div",{className:"text-xs text-gray-500",children:"Attempt success"}),d.jsxs("div",{className:"text-xs tabular-nums text-gray-600",children:["Mean score ",Gm(e.meanScore)]})]})}function joe({group:e,row:t}){return d.jsxs("span",{className:"text-gray-400",children:["Avg ",uS(e.meanDurationMs??t.result.durationMs)]})}function lL(e){return["duration","cost_tokens"].includes(e)||e.startsWith("grader:")}function Zp(e){return e==="status"||e==="expander"}function woe(e){return Zp(e)}function Soe(e){const t=e.reduce((r,n)=>r+(Zp(n.id)?44:136),0);return Math.max(760,t)}function Noe(e){return Zp(e)?"w-11 min-w-11 max-w-11 px-2 py-3 text-center font-medium text-gray-400":`px-4 py-3 font-medium text-gray-400 ${lL(e)?"text-right":""}`}function S2(e,t){return Zp(e)?`w-11 min-w-11 max-w-11 px-2 ${t} text-center align-middle`:`px-4 ${t} align-middle ${lL(e)?"text-right tabular-nums":""}`}function _oe({column:e,row:t,repeatGroup:r,repeatExpanded:n,passThreshold:i,isSelected:o,onToggleRepeatGroup:l}){if(e.id.startsWith("grader:")){const c=e.id.slice(7);return d.jsx(Roe,{score:t.graderScores.get(c),passThreshold:i})}switch(e.id){case"status":return r?d.jsx(voe,{group:r,passThreshold:i}):d.jsx(fS,{status:t.status,label:t.statusLabel});case"expander":return r?d.jsx(Aoe,{row:t,repeatExpanded:n,onToggleRepeatGroup:l}):d.jsx("span",{"aria-hidden":"true",className:"block h-5"});case"test":return d.jsx(Ooe,{row:t,repeatGroup:r,isSelected:o});case"target":return d.jsx(uL,{target:t.targetLabel});case"score":return t.executionError?d.jsx("span",{className:"inline-flex rounded-md border border-amber-900/60 bg-amber-950/20 px-2 py-0.5 text-xs font-medium text-amber-300",children:"Execution error"}):r?d.jsx(boe,{group:r}):d.jsx(an,{rate:t.result.score});case"eval":return d.jsx(Al,{value:t.evalLabel});case"category":return d.jsx(Al,{value:t.categoryLabel});case"duration":return r?d.jsx(joe,{group:r,row:t}):d.jsx("span",{className:"text-gray-400",children:uS(t.result.durationMs)});case"cost_tokens":return d.jsx(Coe,{row:t,repeatGroup:r});case"error":return d.jsx(Al,{value:sL(t.result.error,oL(t.result)),tone:"text-red-300"});default:return d.jsx("span",{className:"text-gray-600",children:"-"})}}function Ooe({row:e,repeatGroup:t,isSelected:r}){return d.jsxs("div",{className:"max-w-[24rem] min-w-0",children:[d.jsx("span",{className:`block min-w-0 truncate text-left font-medium ${r?"text-cyan-200":"text-cyan-400"}`,title:e.testId,children:e.testId}),t?d.jsx(xoe,{group:t}):null,e.result.error?d.jsx("div",{className:"mt-0.5 truncate text-xs text-red-300",title:e.result.error,children:e.result.error}):null]})}function Eoe({row:e,runId:t,projectId:r,repeatGroup:n,selectedTrial:i,selectedTrialPath:o,initialTab:l,initialFilePath:c,onOpenTrialDetail:h,onClose:f}){const p=$B(t,e.testId,{projectId:r,resultDir:e.result.result_dir,evalPath:e.result.eval_path}),g=i?`${e.testId} · ${dS(i)}`:e.testId,y=n&&!i,x=`${e.key}:${o??""}:${l}`;return d.jsxs("aside",{ref:Toe,className:"min-w-0 max-w-full overflow-hidden rounded-lg border border-gray-800 bg-gray-950/80 xl:sticky xl:top-4 xl:max-h-[calc(100vh-2rem)]",children:[d.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3 border-b border-gray-800 px-4 py-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Row detail"}),d.jsx("h4",{className:"mt-1 truncate text-base font-semibold text-white",title:g,children:g}),d.jsxs("p",{className:"mt-1 truncate text-xs text-gray-500",title:e.targetLabel,children:[e.targetLabel,e.evalLabel?` · ${e.evalLabel}`:""]})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsx("a",{href:p,className:"rounded-md border border-gray-800 px-2.5 py-1.5 text-xs text-gray-400 transition-colors hover:border-gray-700 hover:text-gray-200",children:"Full page"}),d.jsx("button",{type:"button",onClick:f,className:"rounded-md border border-gray-800 px-2.5 py-1.5 text-xs text-gray-400 transition-colors hover:border-gray-700 hover:text-gray-200",children:"Close"})]})]}),d.jsx("div",{className:"h-[36rem] min-h-[28rem] min-w-0 overflow-hidden xl:h-[calc(100vh-9rem)]",children:d.jsx(lS,{eval:e.result,runId:t,projectId:r,repeatGroup:y?n:void 0,selectedTrial:i,initialTab:l,initialSelectedFilePath:c,onSelectTrial:h},`${e.key}:${o??"aggregate"}:${c??""}`)})]},x)}function uL({target:e,tone:t="text-gray-300"}){return d.jsx("div",{className:`max-w-[14rem] truncate ${t}`,title:e,children:e})}function Aoe({row:e,repeatExpanded:t,onToggleRepeatGroup:r}){return d.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),r(e.key)},className:"inline-flex h-6 w-6 items-center justify-center rounded-md border border-gray-800 text-xs text-gray-400 transition-colors hover:border-gray-700 hover:text-gray-200","aria-expanded":t,"aria-label":`${t?"Collapse":"Expand"} attempts for ${e.testId}`,children:t?"-":"+"})}function Toe(e){e&&window.requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest",inline:"nearest"})})}function Coe({row:e,repeatGroup:t}){const r=(t==null?void 0:t.trials.map(f=>f.cost_usd).filter(f=>typeof f=="number"&&Number.isFinite(f)))??[],n=(t==null?void 0:t.trials.map(aL).filter(f=>typeof f=="number"&&Number.isFinite(f)))??[],i=r.length>0?r.reduce((f,p)=>f+p,0):void 0,o=n.length>0?n.reduce((f,p)=>f+p,0):void 0,l=rL(e.result.costUsd??i),c=nL(e.tokenTotal??o),h=coe(e.result);return!l&&!c?d.jsx("span",{className:"text-gray-600",children:"-"}):d.jsxs("div",{className:"min-w-0 text-right",children:[l?d.jsx("div",{className:"tabular-nums text-gray-300",children:l}):null,c?d.jsx("div",{className:"text-xs tabular-nums text-gray-500",title:h,children:c}):null]})}function Poe({trial:e}){const t=rL(e.cost_usd),r=nL(aL(e));return!t&&!r?d.jsx("span",{className:"text-gray-700",children:"-"}):d.jsxs("div",{className:"min-w-0 text-right",children:[t?d.jsx("div",{className:"tabular-nums text-gray-500",children:t}):null,r?d.jsx("div",{className:"text-xs tabular-nums text-gray-600",children:r}):null]})}function Roe({score:e,passThreshold:t}){if(!e)return d.jsx("span",{className:"text-gray-600",children:"-"});const r=e.score<t||iL(e);return d.jsxs("div",{className:"min-w-0 text-right",children:[d.jsx("div",{className:`tabular-nums ${doe(e.score)}`,children:Gm(e.score)}),d.jsx("div",{className:r?"text-xs text-red-300":"text-xs text-gray-500",children:r?"Fail":e.verdict??"Pass"})]})}function Al({value:e,tone:t="text-gray-400"}){return e?d.jsx("span",{className:`block max-w-[14rem] truncate ${t}`,title:e,children:e}):d.jsx("span",{className:"text-gray-600",children:"-"})}function eu({total:e,passed:t,failed:r,passRate:n,executionErrors:i=0,totalCost:o}){const l=Math.round(n*100),c=l>=80?"text-cyan-400":l>=60?"text-amber-400":"text-red-400";return d.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:[d.jsx(vl,{label:"Pass Rate",value:`${l}%`,accent:c,large:!0}),d.jsx("div",{className:"h-6 w-px bg-gray-700"}),d.jsx(vl,{label:"Passed",value:String(t),accent:"text-emerald-400"}),d.jsx(vl,{label:"Failures",value:String(r),accent:"text-red-400"}),i>0&&d.jsx(vl,{label:"Execution Errors",value:String(i),accent:"text-amber-400"}),d.jsx(vl,{label:"Total",value:String(e)}),o!==void 0&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"h-6 w-px bg-gray-700"}),d.jsx(vl,{label:"Cost",value:`$${o.toFixed(4)}`,accent:"text-amber-400"})]})]})}function vl({label:e,value:t,accent:r,large:n}){return d.jsxs("div",{className:"flex flex-col",children:[d.jsx("span",{className:"text-xs text-gray-500",children:e}),d.jsx("span",{className:`tabular-nums font-semibold ${n?"text-2xl":"text-lg"} ${r??"text-white"}`,children:t})]})}function cL({results:e,runId:t,projectId:r}){const{data:n}=pt(r),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,[o,l]=S.useState({}),c=qie(e),h=e.length,f=rp(e,i),p=e.reduce((b,w)=>b+(w.costUsd??0),0),g=vae(e,i),y=dL(g,o),x=b=>{l(w=>({...w,[b]:!w[b]}))};return h===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(eu,{total:0,passed:0,failed:0,passRate:0}),d.jsx(N2,{href:c}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This run has no results yet."})]})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsx(eu,{total:h,passed:f.passed,failed:f.failed,passRate:f.passRate,executionErrors:f.executionErrors,totalCost:p>0?p:void 0}),d.jsx(N2,{href:c}),d.jsxs("div",{children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Category Breakdown"}),d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[620px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Category"}),d.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Passed"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Failures"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Execution Errors"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Total"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:y.map(b=>{const w=o[b.name]===!0;return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"w-[18rem] max-w-[18rem] px-4 py-2.5 font-medium text-gray-200",children:d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"inline-block h-4 shrink-0",style:{width:`${b.depth*16}px`}}),b.childCount>0?d.jsx("button",{type:"button",className:"flex h-5 w-5 shrink-0 items-center justify-center rounded border border-gray-700 text-xs text-gray-400 hover:border-gray-600 hover:text-gray-200",onClick:()=>x(b.name),"aria-label":`${w?"Collapse":"Expand"} ${b.name}`,"aria-expanded":w,children:w?"-":"+"}):d.jsx("span",{className:"h-5 w-5 shrink-0"}),r?d.jsx(Ee,{to:"/projects/$projectId/runs/$runId/category/$category",params:{projectId:r,runId:t,category:b.name},className:"min-w-0 truncate text-cyan-400 hover:text-cyan-300 hover:underline",title:b.name,children:b.label}):d.jsx(Ee,{to:"/runs/$runId/category/$category",params:{runId:t,category:b.name},className:"min-w-0 truncate text-cyan-400 hover:text-cyan-300 hover:underline",title:b.name,children:b.label}),b.depth>0?d.jsx("span",{className:"truncate text-xs font-normal text-gray-500",children:b.name}):null,b.childCount>0?d.jsx("span",{className:"shrink-0 text-xs font-normal text-gray-500",children:b.childCount}):null]})}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(an,{rate:b.total-b.executionErrors>0?b.passed/(b.total-b.executionErrors):0})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:b.passed}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:b.failed>0?b.failed:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-amber-400",children:b.executionErrors>0?b.executionErrors:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-gray-400",children:b.total})]},b.name)})})]})})]}),d.jsx(cS,{results:e,runId:t,projectId:r,passThreshold:i,title:"All Evals"}),d.jsx(Moe,{runId:t,projectId:r})]})}function dL(e,t){return e.flatMap(r=>[r,...t[r.name]?dL(r.children,t):[]])}function N2({href:e}){return e?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-medium text-gray-200",children:"External trace"}),d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Phoenix"})]}),d.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"inline-flex items-center rounded-md border border-cyan-900/70 px-2.5 py-1 text-sm font-medium text-cyan-300 transition-colors hover:border-cyan-700 hover:bg-cyan-950/40 hover:text-cyan-200 hover:underline",children:"Open in Phoenix"})]})}):null}function Moe({runId:e,projectId:t}){const[r,n]=S.useState(!1),{data:i,isLoading:o,error:l}=t6(e,t);return!o&&!l&&i==null?null:d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"flex w-full items-center justify-between rounded-lg border border-gray-800 bg-gray-900/50 px-4 py-2 text-left text-sm font-medium text-gray-300 transition-colors hover:bg-gray-900","aria-expanded":r,children:[d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx("span",{"aria-hidden":"true",children:r?"▾":"▸"}),"Run Log"]}),d.jsx("span",{className:"text-xs text-gray-500",children:o?"Loading…":l?"Failed to load":i?`${i.length} chars`:""})]}),r&&d.jsx("div",{className:"mt-2 overflow-hidden rounded-lg border border-gray-800 bg-black",children:l?d.jsxs("div",{className:"p-4 text-sm text-red-400",children:["Failed to load run log: ",l.message]}):d.jsx("pre",{className:"max-h-[480px] overflow-auto whitespace-pre-wrap break-words p-4 font-mono text-xs leading-relaxed text-gray-200",children:i??""})})]})}function Jp({status:e}){const t=e==="finished"||e==="failed",n={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"}[e]??"text-gray-400";return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:`text-sm font-medium ${n}`,children:e.charAt(0).toUpperCase()+e.slice(1)}),!t&&d.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]})}function eg({runId:e,status:t,isReadOnly:r,projectId:n}){const[i,o]=S.useState(!1),[l,c]=S.useState(null);if(!Die(t,r))return null;async function h(){o(!0),c(null);try{await k6(e,n)}catch(f){c(f instanceof Error?f.message:"Failed to stop run"),o(!1)}}return d.jsxs("div",{className:"flex flex-col items-end gap-1",children:[d.jsx("button",{type:"button",onClick:h,disabled:i,className:"inline-flex items-center gap-2 rounded-md border border-gray-700 bg-transparent px-3 py-1.5 text-sm font-medium text-gray-300 hover:bg-gray-800 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"stop-run-button",children:i?"Stopping…":d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":"true",className:"inline-block h-2.5 w-2.5 rounded-[1px] bg-current"}),"Stop"]})}),l&&d.jsx("p",{className:"text-xs text-red-400",children:l})]})}const fL=dr("/runs/$runId")({component:Doe});function Doe(){var w;const{runId:e}=fL.useParams(),{data:t,isLoading:r,error:n}=md(e),{data:i}=pt(),{data:o}=ep(),[l,c]=S.useState(!1),h=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(N=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},N))})]});if(n)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",n.message]});const f=(w=t==null?void 0:t.results)==null?void 0:w[0],p=f==null?void 0:f.target,g=p?{target:p}:void 0,y=t==null?void 0:t.status,x=y==="starting"||y==="running",b=BR({runId:e,results:(t==null?void 0:t.results)??[],source:t==null?void 0:t.source,sourceLabel:t==null?void 0:t.source_label,runtimeSource:t==null?void 0:t.runtime_source,remoteRepo:(t==null?void 0:t.source)==="remote"?o==null?void 0:o.repo:void 0,formatTimestamp:N=>new Date(N).toLocaleString()});return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("h1",{className:"min-w-0 truncate text-xl font-semibold text-white sm:text-2xl",title:b.heading,children:b.heading}),b.sourceBadge?d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",children:b.sourceBadge}):null]}),b.meta?d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:b.meta}):null,b.sourceContext.length>0?d.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:b.sourceContext.map(N=>d.jsxs("span",{children:[d.jsxs("span",{className:"text-gray-600",children:[N.label,":"]})," ",N.value]},`${N.label}:${N.value}`))}):null]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!h&&x?d.jsx(eg,{runId:e,status:y,isReadOnly:h}):d.jsx(A5,{results:(t==null?void 0:t.results)??[],runDir:t==null?void 0:t.run_dir,suiteFilter:t==null?void 0:t.suite_filter,target:p??void 0,isReadOnly:h,plannedTestCount:t==null?void 0:t.planned_test_count,runStatus:y}),y&&d.jsx(Jp,{status:y}),!h&&!x&&d.jsx("button",{type:"button",onClick:()=>c(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"Start"})]})]}),d.jsx(cL,{results:(t==null?void 0:t.results)??[],runId:e}),!h&&d.jsx(So,{open:l,onClose:()=>c(!1),prefill:g})]})}const xx=[{id:"runs",label:"🏃 Recent Runs",title:"Recent Runs"},{id:"tags",label:"🏷️ Tags",title:"Tags"},{id:"analytics",label:"📊 Analytics",title:"Analytics"},{id:"targets",label:"🤖 Targets",title:"Targets"}],hL=dr("/projects/$projectId")({component:koe});function koe(){var x,b;const{projectId:e}=hL.useParams(),r=nj().location.search,n=r.tab,i=(x=r.key)!=null&&x.trim()?r.key:jl,o=po(),[l,c]=S.useState(!1),{data:h}=pt(e),f=(h==null?void 0:h.read_only)===!0,p=e,g=xx.some(w=>w.id===n)?n:"runs",y=((b=xx.find(w=>w.id===g))==null?void 0:b.title)??"Recent Runs";return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:y}),!f&&d.jsx("button",{type:"button",onClick:()=>c(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"Start"})]}),d.jsx("div",{className:"border-b border-gray-800 sm:overflow-x-auto",children:d.jsx("div",{className:"flex flex-wrap gap-1 sm:min-w-max sm:flex-nowrap",children:xx.map(w=>d.jsx("button",{type:"button",onClick:()=>o({to:"/projects/$projectId",params:{projectId:e},search:w.id==="tags"?{tab:w.id,key:i}:{tab:w.id}}),className:`shrink-0 px-4 py-2 text-sm font-medium transition-colors ${g===w.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:w.label},w.id))})}),g==="runs"&&d.jsx(Loe,{projectId:e,projectName:p,readOnly:f}),g==="tags"&&d.jsx(_5,{projectId:e,tagKey:i,onTagKeyChange:w=>o({to:"/projects/$projectId",params:{projectId:e},search:{tab:"tags",key:w}})}),g==="analytics"&&d.jsx($oe,{projectId:e,readOnly:f}),g==="targets"&&d.jsx(O5,{projectId:e}),!f&&d.jsx(So,{open:l,onClose:()=>c(!1),projectId:e})]})}function Loe({projectId:e,projectName:t,readOnly:r}){const n=ho(),{data:i,isLoading:o,error:l,hasNextPage:c,fetchNextPage:h,isFetchingNextPage:f}=S6(e),{data:p}=mj(e),{data:g}=ep(e),[y,x]=S.useState(!1),[b,w]=S.useState(!1),[N,_]=S.useState(null),E=((p==null?void 0:p.runs)??[]).filter(M=>M.status==="starting"||M.status==="running"),T=Wp((i==null?void 0:i.runs)??[]),A=T.filter(M=>M.on_remote===!0).length,C=(g==null?void 0:g.configured)===!0?AR(A,T.length,g.branch):void 0;async function R(){x(!0),_(null);try{const M=await DR(e);n.setQueryData($c(e).queryKey,M);const z=Hh(M);_(z),Promise.all([n.invalidateQueries({queryKey:["projects",e,"runs"]}),n.invalidateQueries({queryKey:["projects",e,"tags"]}),n.invalidateQueries({queryKey:["projects",e,"compare"]}),n.invalidateQueries({queryKey:["projects",e,"targets"]}),n.invalidateQueries({queryKey:["remote-status",e]})]).catch(()=>{})}catch(M){_(Kh(M,g)),n.invalidateQueries({queryKey:["remote-status",e]}).catch(()=>{})}finally{x(!1)}}async function D(){w(!0),_(null);try{const M=await kR(e);n.setQueryData($c(e).queryKey,M),_(Hh(M)),Promise.all([n.invalidateQueries({queryKey:["projects",e,"runs"]}),n.invalidateQueries({queryKey:["projects",e,"tags"]}),n.invalidateQueries({queryKey:["projects",e,"compare"]}),n.invalidateQueries({queryKey:["projects",e,"targets"]}),n.invalidateQueries({queryKey:["remote-status",e]})]).catch(()=>{})}catch(M){_(Kh(M,g)),n.invalidateQueries({queryKey:["remote-status",e]}).catch(()=>{})}finally{w(!1)}}return S.useEffect(()=>{if((N==null?void 0:N.kind)!=="success")return;const M=window.setTimeout(()=>_(null),7e3);return()=>window.clearTimeout(M)},[N]),o?d.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(M=>d.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},M))}):l?d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",l.message]}):d.jsxs("div",{className:"space-y-4",children:[E.length>0&&d.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[d.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),d.jsx("ul",{className:"divide-y divide-gray-800/50",children:E.map(M=>d.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[d.jsxs("div",{className:"min-w-0 flex items-center gap-3",children:[d.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),d.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:M.id}),d.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(M.started_at).toLocaleTimeString()})]}),d.jsx(Ee,{to:"/projects/$projectId/jobs/$runId",params:{projectId:e,runId:M.id},className:"flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},M.id))})]}),d.jsx(N5,{remoteStatus:g,syncInFlight:y,onSync:R,projectName:t,syncFeedback:N,onRemoteSummary:C,onConfirmMerge:D,confirmMergeInFlight:b}),d.jsx(Xp,{runs:T,projectId:e,enableCombine:!r,remoteBranch:g==null?void 0:g.branch,hasNextPage:c,isFetchingNextPage:f,onLoadMore:()=>void h()})]})}function $oe({projectId:e,readOnly:t}){const{data:r,isLoading:n,isError:i,error:o}=Ue(MR(e));return d.jsx(w5,{data:r,isLoading:n,isError:i,error:o,projectId:e,readOnly:t})}const mL=dr("/jobs/$runId")({component:Ioe});function Ioe(){const{runId:e}=mL.useParams(),{data:t,isLoading:r,error:n}=hj(e),{data:i}=pt(),o=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(bx,{}),d.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-gray-900"})]});if(n||!t)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(bx,{}),d.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-400",children:n?`Failed to load run: ${n.message}`:"Run not found."})]});const l=t.status==="finished"||t.status==="failed";return d.jsxs("div",{className:"space-y-4",children:[d.jsx(bx,{}),d.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("h1",{className:"truncate font-mono text-base font-semibold text-white",children:e}),d.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["Started ",new Date(t.started_at).toLocaleString(),t.finished_at&&d.jsxs(d.Fragment,{children:[" · ","Finished ",new Date(t.finished_at).toLocaleString()," · ",Math.round((new Date(t.finished_at).getTime()-new Date(t.started_at).getTime())/1e3),"s"]})]})]}),d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-3",children:[d.jsx(eg,{runId:e,status:t.status,isReadOnly:o}),d.jsx(Jp,{status:t.status})]})]}),d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 px-4 py-3",children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Command"}),d.jsx("code",{className:"break-all text-xs text-cyan-300",children:t.command})]}),t.stdout?d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Output"}),d.jsx("div",{className:"max-h-[60vh] overflow-y-auto rounded-lg border border-gray-700 bg-gray-950 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-gray-200",children:t.stdout})})]}):!l&&d.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[d.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…"]}),t.stderr&&d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-red-500",children:"Stderr"}),d.jsx("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-red-900/40 bg-red-950/20 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-red-300",children:t.stderr})})]}),l&&d.jsxs("p",{className:"text-xs text-gray-500",children:["Exit code:"," ",d.jsx("span",{className:t.exit_code===0?"text-emerald-400":"text-red-400",children:t.exit_code})]})]})}function bx(){return d.jsx(Ee,{to:"/",search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const zoe=dr("/experiments/$experimentName")({beforeLoad:({params:e})=>{throw Zb({to:"/tags/$key/$value",params:{key:"experiment",value:e.experimentName}})}});function Boe(e){return`(no ${e})`}function Uoe(e,t){var n,i;if(t==="experiment")return e.experiment??((n=e.run_tags)==null?void 0:n.experiment)??"default";const r=(i=e.run_tags)==null?void 0:i[t];return r===void 0||r===""?Boe(t):r}function pL({tagKey:e,tagValue:t,projectId:r}){var x;const{data:n,isLoading:i}=Ue(r?cj(r,e):uj(e)),{data:o,isLoading:l}=Ue(r?fj(r):lj);if(i||l)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-4 gap-4",children:["s1","s2","s3","s4"].map(b=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},b))})]});const h=(x=n==null?void 0:n.groups)==null?void 0:x.find(b=>b.name===t),f=Wp(((o==null?void 0:o.runs)??[]).filter(b=>Uoe(b,e)===t)),p=(h==null?void 0:h.pass_rate)??0,g=f.length,y=(h==null?void 0:h.target_count)??0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:Zi(e)}),d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[g," run",g!==1?"s":""," · ",y," target",y!==1?"s":"",(h==null?void 0:h.last_run)&&d.jsxs("span",{className:"ml-2",children:["· Last run: ",_2(h.last_run)]})]})]}),h&&d.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[d.jsx(Oh,{label:"Runs",value:String(g)}),d.jsx(Oh,{label:"Targets",value:String(y)}),d.jsx(Oh,{label:"Pass Rate",value:`${Math.round(p*100)}%`,accent:"text-cyan-400"}),d.jsx(Oh,{label:"Last Run",value:_2(h.last_run)})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-4 text-lg font-medium text-gray-200",children:"All Runs"}),d.jsx(Xp,{runs:f,projectId:r,emptyMessage:d.jsxs("div",{children:[d.jsxs("p",{className:"text-lg text-gray-400",children:["No evaluation runs found for ",Zi(e)," ",d.jsx("code",{children:t}),"."]}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Runs will appear here once this value has execution results."})]})})]})]})}function Oh({label:e,value:t,accent:r}){return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("p",{className:"text-sm text-gray-400",children:e}),d.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${r??"text-white"}`,children:t})]})}function _2(e){if(!e)return"N/A";try{const t=new Date(e);return Number.isNaN(t.getTime())?"N/A":t.toLocaleString()}catch{return"N/A"}}const gL=dr("/tags/$key/$value")({component:qoe});function qoe(){const{key:e,value:t}=gL.useParams();return d.jsx(pL,{tagKey:e,tagValue:t})}const yL=dr("/evals/$runId/$evalId")({component:Foe});function Foe(){const{runId:e,evalId:t}=yL.useParams(),r=typeof window>"u"?void 0:new URLSearchParams(window.location.search).get("result_dir")??void 0,n=typeof window>"u"?void 0:new URLSearchParams(window.location.search).get("eval_path")??void 0,{data:i,isLoading:o,error:l}=md(e),{data:c}=pt(),[h,f]=S.useState(!1),p=(c==null?void 0:c.read_only)===!0;if(o)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(l)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",l.message]});const g=i==null?void 0:i.results.find(b=>Jm(b,t,{resultDir:r,evalPath:n}));if(!g)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:d.jsxs("p",{className:"text-gray-400",children:["Eval ",d.jsx("code",{className:"text-cyan-400",children:t})," not found in run"," ",d.jsx("code",{className:"text-cyan-400",children:e}),"."]})});const y=(c==null?void 0:c.threshold)??(c==null?void 0:c.pass_threshold)??.8,x=to(g.score,y)&&g.executionStatus!=="error"&&g.executionStatus!=="failed";return d.jsxs("div",{className:"flex h-full flex-col gap-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",e," / Eval: ",g.eval_path??t]}),d.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold text-white",children:[d.jsx("span",{className:`text-2xl font-bold leading-none ${x?"text-emerald-400":"text-red-400"}`,children:x?"✓":"✗"}),t]})]}),!p&&d.jsx("button",{type:"button",onClick:()=>f(!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"})]}),d.jsx(lS,{eval:g,runId:e}),!p&&d.jsx(So,{open:h,onClose:()=>f(!1),prefill:{testIds:[t],target:g.target}})]})}const vL=dr("/runs/$runId_/suite/$suite")({component:Hoe});function Hoe(){const{runId:e,suite:t}=vL.useParams(),{data:r,isLoading:n,error:i}=md(e),{data:o}=pt(),l=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(g=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},g))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",i.message]});const c=((r==null?void 0:r.results)??[]).filter(g=>(g.suite??"Uncategorized")===t),h=c.length,f=rp(c,l),p=c.reduce((g,y)=>g+(y.costUsd??0),0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",e]})]}),d.jsx(eu,{total:h,passed:f.passed,failed:f.failed,passRate:f.passRate,executionErrors:f.executionErrors,totalCost:p>0?p:void 0}),h===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):d.jsx(cS,{results:c,runId:e,passThreshold:l,title:"Suite Evals"})]})}const xL=dr("/runs/$runId_/category/$category")({component:Koe});function Koe(){const{runId:e,category:t}=xL.useParams(),{data:r,isLoading:n,error:i}=PR(e,t);if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(y=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},y))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",i.message]});const o=(r==null?void 0:r.suites)??[],l=o.reduce((y,x)=>y+x.total,0),c=o.reduce((y,x)=>y+x.passed,0),h=o.reduce((y,x)=>y+x.failed,0),f=o.reduce((y,x)=>y+ur(x),0),p=l-f,g=p>0?c/p:0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",e]})]}),d.jsx(eu,{total:l,passed:c,failed:h,passRate:g,executionErrors:f}),o.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),d.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:o.map(y=>d.jsxs(Ee,{to:"/runs/$runId/suite/$suite",params:{runId:e,suite:y.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:y.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[y.passed,"/",QR(y)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(fo,{score:y.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[y.passed," passed"]}),y.failed>0&&d.jsxs("span",{className:"text-red-400",children:[y.failed," failed"]}),ur(y)>0&&d.jsxs("span",{className:"text-amber-400",children:[ur(y)," execution errors"]})]})]},y.name))})]})]})}const bL=dr("/projects/$projectId_/runs/$runId")({component:Goe});function Goe(){var N;const{projectId:e,runId:t}=bL.useParams(),{data:r,isLoading:n,error:i}=pd(e,t),{data:o}=pt(e),{data:l}=ep(e),[c,h]=S.useState(!1),f=(o==null?void 0:o.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(_=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},_))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",i.message]});const p=(N=r==null?void 0:r.results)==null?void 0:N[0],g=p==null?void 0:p.target,y=g?{target:g}:void 0,x=r==null?void 0:r.status,b=x==="starting"||x==="running",w=BR({runId:t,results:(r==null?void 0:r.results)??[],source:r==null?void 0:r.source,sourceLabel:r==null?void 0:r.source_label,runtimeSource:r==null?void 0:r.runtime_source,remoteRepo:(r==null?void 0:r.source)==="remote"?l==null?void 0:l.repo:void 0,formatTimestamp:_=>new Date(_).toLocaleString()});return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("h1",{className:"min-w-0 truncate text-xl font-semibold text-white sm:text-2xl",title:w.heading,children:w.heading}),w.sourceBadge?d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",children:w.sourceBadge}):null]}),w.meta?d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:w.meta}):null,w.sourceContext.length>0?d.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:w.sourceContext.map(_=>d.jsxs("span",{children:[d.jsxs("span",{className:"text-gray-600",children:[_.label,":"]})," ",_.value]},`${_.label}:${_.value}`))}):null]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!f&&b?d.jsx(eg,{runId:t,status:x,isReadOnly:f,projectId:e}):d.jsx(A5,{results:(r==null?void 0:r.results)??[],runDir:r==null?void 0:r.run_dir,suiteFilter:r==null?void 0:r.suite_filter,target:g??void 0,projectId:e,isReadOnly:f,plannedTestCount:r==null?void 0:r.planned_test_count,runStatus:x}),x&&d.jsx(Jp,{status:x}),!f&&!b&&d.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:"Start"})]})]}),d.jsx(cL,{results:(r==null?void 0:r.results)??[],runId:t,projectId:e}),!f&&d.jsx(So,{open:c,onClose:()=>h(!1),projectId:e,prefill:y})]})}const jL=dr("/projects/$projectId_/jobs/$runId")({component:Yoe});function Yoe(){const{projectId:e,runId:t}=jL.useParams(),{data:r,isLoading:n,error:i}=hj(t,e),{data:o}=pt(e),l=(o==null?void 0:o.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(jx,{projectId:e}),d.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-gray-900"})]});if(i||!r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(jx,{projectId:e}),d.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-400",children:i?`Failed to load run: ${i.message}`:"Run not found."})]});const c=r.status==="finished"||r.status==="failed";return d.jsxs("div",{className:"space-y-4",children:[d.jsx(jx,{projectId:e}),d.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("h1",{className:"truncate font-mono text-base font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["Started ",new Date(r.started_at).toLocaleString(),r.finished_at&&d.jsxs(d.Fragment,{children:[" · ","Finished ",new Date(r.finished_at).toLocaleString()," · ",Math.round((new Date(r.finished_at).getTime()-new Date(r.started_at).getTime())/1e3),"s"]})]})]}),d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-3",children:[d.jsx(eg,{runId:t,status:r.status,isReadOnly:l,projectId:e}),d.jsx(Jp,{status:r.status})]})]}),d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 px-4 py-3",children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Command"}),d.jsx("code",{className:"break-all text-xs text-cyan-300",children:r.command})]}),r.stdout?d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Output"}),d.jsx("div",{className:"max-h-[60vh] overflow-y-auto rounded-lg border border-gray-700 bg-gray-950 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-gray-200",children:r.stdout})})]}):!c&&d.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[d.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…"]}),r.stderr&&d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-red-500",children:"Stderr"}),d.jsx("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-red-900/40 bg-red-950/20 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-red-300",children:r.stderr})})]}),c&&d.jsxs("p",{className:"text-xs text-gray-500",children:["Exit code:"," ",d.jsx("span",{className:r.exit_code===0?"text-emerald-400":"text-red-400",children:r.exit_code})]})]})}function jx({projectId:e}){return d.jsx(Ee,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const Voe=dr("/projects/$projectId_/experiments/$experimentName")({beforeLoad:({params:e})=>{throw Zb({to:"/projects/$projectId/tags/$key/$value",params:{projectId:e.projectId,key:"experiment",value:e.experimentName}})}}),wL=dr("/projects/$projectId_/tags/$key/$value")({component:Qoe});function Qoe(){const{projectId:e,key:t,value:r}=wL.useParams();return d.jsx(pL,{tagKey:t,tagValue:r,projectId:e})}const SL=dr("/projects/$projectId_/evals/$runId/$evalId")({component:Xoe});function Xoe(){const{projectId:e,runId:t,evalId:r}=SL.useParams(),n=typeof window>"u"?void 0:new URLSearchParams(window.location.search).get("result_dir")??void 0,i=typeof window>"u"?void 0:new URLSearchParams(window.location.search).get("eval_path")??void 0,{data:o,isLoading:l,error:c}=pd(e,t),{data:h}=pt(e),[f,p]=S.useState(!1),g=(h==null?void 0:h.read_only)===!0;if(l)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(c)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",c.message]});const y=o==null?void 0:o.results.find(w=>Jm(w,r,{resultDir:n,evalPath:i}));if(!y)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:d.jsxs("p",{className:"text-gray-400",children:["Eval ",d.jsx("code",{className:"text-cyan-400",children:r})," not found in run"," ",d.jsx("code",{className:"text-cyan-400",children:t}),"."]})});const x=(h==null?void 0:h.threshold)??(h==null?void 0:h.pass_threshold)??.8,b=to(y.score,x)&&y.executionStatus!=="error"&&y.executionStatus!=="failed";return d.jsxs("div",{className:"flex h-full flex-col gap-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",t," / Eval: ",y.eval_path??r]}),d.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold text-white",children:[d.jsx("span",{className:`text-2xl font-bold leading-none ${b?"text-emerald-400":"text-red-400"}`,children:b?"✓":"✗"}),r]})]}),!g&&d.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"})]}),d.jsx(lS,{eval:y,runId:t,projectId:e}),!g&&d.jsx(So,{open:f,onClose:()=>p(!1),projectId:e,prefill:{testIds:[r],target:y.target}})]})}const NL=dr("/projects/$projectId_/runs/$runId_/suite/$suite")({component:Woe});function Woe(){const{projectId:e,runId:t,suite:r}=NL.useParams(),{data:n,isLoading:i,error:o}=pd(e,t),{data:l}=pt(e),c=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8;if(i)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(y=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},y))})]});if(o)return d.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 h=((n==null?void 0:n.results)??[]).filter(y=>(y.suite??"Uncategorized")===r),f=h.length,p=rp(h,c),g=h.reduce((y,x)=>y+(x.costUsd??0),0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",t]})]}),d.jsx(eu,{total:f,passed:p.passed,failed:p.failed,passRate:p.passRate,executionErrors:p.executionErrors,totalCost:g>0?g:void 0}),f===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):d.jsx(cS,{results:h,runId:t,projectId:e,passThreshold:c,title:"Suite Evals"})]})}const _L=dr("/projects/$projectId_/runs/$runId_/category/$category")({component:Zoe});function Zoe(){const{projectId:e,runId:t,category:r}=_L.useParams(),{data:n,isLoading:i,error:o}=Ue(RR(e,t,r));if(i)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(x=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},x))})]});if(o)return d.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 l=(n==null?void 0:n.suites)??[],c=l.reduce((x,b)=>x+b.total,0),h=l.reduce((x,b)=>x+b.passed,0),f=l.reduce((x,b)=>x+b.failed,0),p=l.reduce((x,b)=>x+ur(b),0),g=c-p,y=g>0?h/g:0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",t]})]}),d.jsx(eu,{total:c,passed:h,failed:f,passRate:y,executionErrors:p}),l.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),d.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:l.map(x=>d.jsxs(Ee,{to:"/projects/$projectId/runs/$runId/suite/$suite",params:{projectId:e,runId:t,suite:x.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"truncate text-sm font-medium text-gray-200",children:x.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[x.passed,"/",QR(x)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(fo,{score:x.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[x.passed," passed"]}),x.failed>0&&d.jsxs("span",{className:"text-red-400",children:[x.failed," failed"]}),ur(x)>0&&d.jsxs("span",{className:"text-amber-400",children:[ur(x)," execution errors"]})]})]},x.name))})]})]})}const Joe=c9.update({id:"/settings",path:"/settings",getParentRoute:()=>Yt}),ele=Eie.update({id:"/",path:"/",getParentRoute:()=>Yt}),tle=fL.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>Yt}),rle=hL.update({id:"/projects/$projectId",path:"/projects/$projectId",getParentRoute:()=>Yt}),nle=mL.update({id:"/jobs/$runId",path:"/jobs/$runId",getParentRoute:()=>Yt}),ale=zoe.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>Yt}),ile=gL.update({id:"/tags/$key/$value",path:"/tags/$key/$value",getParentRoute:()=>Yt}),sle=yL.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>Yt}),ole=vL.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>Yt}),lle=xL.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>Yt}),ule=bL.update({id:"/projects/$projectId_/runs/$runId",path:"/projects/$projectId/runs/$runId",getParentRoute:()=>Yt}),cle=jL.update({id:"/projects/$projectId_/jobs/$runId",path:"/projects/$projectId/jobs/$runId",getParentRoute:()=>Yt}),dle=Voe.update({id:"/projects/$projectId_/experiments/$experimentName",path:"/projects/$projectId/experiments/$experimentName",getParentRoute:()=>Yt}),fle=wL.update({id:"/projects/$projectId_/tags/$key/$value",path:"/projects/$projectId/tags/$key/$value",getParentRoute:()=>Yt}),hle=SL.update({id:"/projects/$projectId_/evals/$runId/$evalId",path:"/projects/$projectId/evals/$runId/$evalId",getParentRoute:()=>Yt}),mle=NL.update({id:"/projects/$projectId_/runs/$runId_/suite/$suite",path:"/projects/$projectId/runs/$runId/suite/$suite",getParentRoute:()=>Yt}),ple=_L.update({id:"/projects/$projectId_/runs/$runId_/category/$category",path:"/projects/$projectId/runs/$runId/category/$category",getParentRoute:()=>Yt}),gle={IndexRoute:ele,SettingsRoute:Joe,ExperimentsExperimentNameRoute:ale,JobsRunIdRoute:nle,ProjectsProjectIdRoute:rle,RunsRunIdRoute:tle,EvalsRunIdEvalIdRoute:sle,TagsKeyValueRoute:ile,ProjectsProjectIdExperimentsExperimentNameRoute:dle,ProjectsProjectIdJobsRunIdRoute:cle,ProjectsProjectIdRunsRunIdRoute:ule,RunsRunIdCategoryCategoryRoute:lle,RunsRunIdSuiteSuiteRoute:ole,ProjectsProjectIdEvalsRunIdEvalIdRoute:hle,ProjectsProjectIdTagsKeyValueRoute:fle,ProjectsProjectIdRunsRunIdCategoryCategoryRoute:ple,ProjectsProjectIdRunsRunIdSuiteSuiteRoute:mle},yle=Yt._addFileChildren(gle)._addFileTypes(),vle=new Cz({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),xle=PB({routeTree:yle}),OL=document.getElementById("root");if(!OL)throw new Error("Root element not found");az.createRoot(OL).render(d.jsx(S.StrictMode,{children:d.jsx(Pz,{client:vle,children:d.jsx(DB,{router:xle})})}));export{Ul as W,S as r};
|